Commit 50b23939 authored by zhengke's avatar zhengke

修改

parent 18402c29
...@@ -3,27 +3,76 @@ ...@@ -3,27 +3,76 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.EmployeeName" <q-input @input="resetSearch" class="col-6 q-pr-lg q-pr-lg" clearable standout="bg-primary text-white" v-model="msg.EmployeeName"
label="员工姓名/账号" /> label="员工姓名/账号" />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select filled stack-label @input="resetSearch(),getDepartList(msg.School_Id)" option-value="SId" option-label="SName" v-model="msg.School_Id" <q-select filled stack-label @input="getDepartList(msg.School_Id),resetSearch()" option-value="SId"
ref="School_Id" :options="schoolList" label="所属校区" :dense="false" class="col-6 q-pb-lg q-pr-lg" emit-value option-label="SName" v-model="msg.School_Id" ref="School_Id" :options="schoolList" label="所属校区"
map-options /> :dense="false" class="col-6 q-pr-lg q-pr-lg" emit-value map-options />
</div> </div>
<div class="col-3"> <div class="col-3">
<selectTree :treeData='DeptList' :defaultArray="returnString" <selectTree :treeData='DeptList' :defaultArray="returnString" nodeKey="DeptId" :multiple="false"
nodeKey="DeptId" :multiple="false" labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild"
@getChild="getChild" classStr="col-6 q-pr-lg q-pb-lg"></selectTree> classStr="col-6 q-pr-lg q-pb-lg"></selectTree>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select filled stack-label @input="resetSearch" option-value="PostId" option-label="PostName" v-model="msg.Post_Id" <q-select filled stack-label @input="resetSearch" option-value="PostId" option-label="PostName"
ref="Post_Id" :options="PostList" label="岗位" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value v-model="msg.Post_Id" ref="Post_Id" :options="PostList" label="岗位" :dense="false"
map-options /> class="col-6 q-pr-lg q-pb-lg" emit-value map-options />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MTel" label="电话" /> <q-select filled @input="resetSearch" stack-label option-value="Id" option-label="Name"
v-model="msg.LeaveStatus" ref="LeaveStatus" :options="LeaveStatusList" label="在职状态" :dense="false"
class="col-6 q-pr-lg q-pb-lg" emit-value map-options />
</div>
<div class="col-3">
<q-input filled v-model="msg.StartEntryTime" clearable @input="resetSearch" class="col-6 q-pr-lg q-pb-lg" mask="date" label="入职时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.StartEntryTime" @input="resetSearch(),() => $refs.qDateProxy1.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="col-3">
<q-input filled v-model="msg.EndEntryTime" clearable @input="resetSearch" class="col-6 q-pr-lg q-pb-lg" mask="date" label="离职时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy2" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.EndEntryTime" @input="resetSearch(),() => $refs.qDateProxy2.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="col-3">
<q-input filled v-model="msg.StartBirthDate" clearable @input="resetSearch" class="col-3 q-pr-lg q-pb-lg" mask="date" label="生日开始日期">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy3" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.StartBirthDate" @input="resetSearch(),() => $refs.qDateProxy3.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="col-3">
<q-input filled v-model="msg.EndBirthDate" clearable @input="resetSearch" class="col-3 q-pr-lg q-pb-lg" mask="date" label="生日结束日期">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy4" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.EndBirthDate" @input="resetSearch(),() => $refs.qDateProxy4.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div> </div>
<!-- <div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MTel" label="电话" />
</div> -->
</div> </div>
<div class="page-option"> <div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增管理者" @click="EditManager(null)" /> <q-btn color="accent" class="q-mr-md" icon="add" label="新增管理者" @click="EditManager(null)" />
...@@ -52,6 +101,22 @@ ...@@ -52,6 +101,22 @@
<q-badge :color="props.value==1?'negative':'primary'" :label="props.value==1?'女':'男'" /> <q-badge :color="props.value==1?'negative':'primary'" :label="props.value==1?'女':'男'" />
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-LeaveStatus="props">
<q-td :props="props">
<span v-if="props.row.LeaveStatus=='在职'" style="color:#000">{{props.value}}</span>
<span v-if="props.row.LeaveStatus=='兼职'" style="color:blue">{{props.value}}</span>
<span v-if="props.row.LeaveStatus=='临时工'" style="color:orange">{{props.value}}</span>
<span v-if="props.row.LeaveStatus=='离职'" style="color:red">{{props.value}}</span>
</q-td>
</template>
<template v-slot:body-cell-BirthDate="props">
<q-td :props="props">
<span v-if="props.row.IsBirth==1" style="color:red">{{props.value}}</span>
<span v-else>{{props.value}}</span>
</q-td>
</template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-toggle size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status" <q-toggle size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status"
...@@ -85,15 +150,20 @@ ...@@ -85,15 +150,20 @@
queryManagerPage, queryManagerPage,
getSchoolDropdown, getSchoolDropdown,
deleteManagerInfo, deleteManagerInfo,
createManagerAccount createManagerAccount,
GetLeaveStatus
} from '../../api/school/index' } from '../../api/school/index'
import { import {
resetPassword resetPassword
} from '../../api/users/user.js' } from '../../api/users/user.js'
import{ //岗位
import {
getPostList
} from '../../api/system/post'
import {
getChildDepartment, getChildDepartment,
getDeptTree getDeptTree
}from '../../api/system/dept.js' } from '../../api/system/dept.js'
import managerForm from '../../components/school/manager/manager-form' import managerForm from '../../components/school/manager/manager-form'
import selectTree from '../../components/common/select-tree' import selectTree from '../../components/common/select-tree'
export default { export default {
...@@ -209,17 +279,21 @@ ...@@ -209,17 +279,21 @@
pageCount: 0, pageCount: 0,
managerOption: null, managerOption: null,
schoolList: [], //校区数组 schoolList: [], //校区数组
DeptList:[], // 部门下拉 DeptList: [], // 部门下拉
isShowManagerForm: false, isShowManagerForm: false,
resetLoading: false, resetLoading: false,
returnString: [], //默认岗位 returnString: [], //默认岗位
PostList:[], //岗位 PostList: [], //岗位
LeaveStatusList: [], //在职状态
} }
}, },
mounted() { mounted() {
this.currentUrl = this.$route.path this.currentUrl = this.$route.path
this.getSchool() this.getSchool()
this.getManager() this.getManager();
this.getDepartList(0);
this.queryPostList(0);
this.getLeaveState();
}, },
methods: { methods: {
resetSearch() { resetSearch() {
...@@ -333,11 +407,10 @@ ...@@ -333,11 +407,10 @@
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
this.schoolList = res.Data; this.schoolList = res.Data;
var obj = { var obj = {
SName:'全部', SName: '全部',
SId:0 SId: 0
} }
this.schoolList.unshift(obj); this.schoolList.unshift(obj);
console.log(res,'学校');
}) })
}, },
getManager() { getManager() {
...@@ -376,23 +449,26 @@ ...@@ -376,23 +449,26 @@
if (deptArray && deptArray != '') { if (deptArray && deptArray != '') {
tempStr = deptArray; tempStr = deptArray;
} }
this.msg.Dept_Id = tempStr; if (tempStr) {
this.queryPostList(this.objOption.Dept_Id); this.msg.Dept_Id = tempStr;
} else {
this.msg.Dept_Id = 0;
}
this.queryPostList(this.msg.Dept_Id);
}, },
//获取部门下拉数据 //获取部门下拉数据
getDepartList(id){ getDepartList(id) {
let msg = { let msg = {
School_Id: id School_Id: id
} }
getDeptTree(msg).then(res => { getDeptTree(msg).then(res => {
console.log(res,'部门数据');
if (res.Code == 1) { if (res.Code == 1) {
this.DeptList = res.Data; this.DeptList = res.Data;
} }
}) })
}, },
//获取岗位 //获取岗位
queryPostList(){ queryPostList(deptId) {
this.PostList = []; this.PostList = [];
var postMsg = { var postMsg = {
RB_Dept_Id: deptId, RB_Dept_Id: deptId,
...@@ -400,6 +476,19 @@ ...@@ -400,6 +476,19 @@
getPostList(postMsg).then(res => { getPostList(postMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.PostList = res.Data; this.PostList = res.Data;
var obj = {
PostName: '全部',
PostId: 0
}
this.PostList.unshift(obj);
}
})
},
//获取在职状态
getLeaveState() {
GetLeaveStatus({}).then(res => {
if (res.Code == 1) {
this.LeaveStatusList = res.Data;
} }
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment