|
|
|
@ -10,7 +10,7 @@ |
|
|
|
|
<el-card shadow="hover" class="m-b-20 teacher_tab"> |
|
|
|
|
<div class="flex j-between m-b-20"> |
|
|
|
|
<div> |
|
|
|
|
<el-input placeholder="请输入员工姓名/工号" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input> |
|
|
|
|
<el-input style="width: 250px" placeholder="请输入员工姓名/工号/角色名称" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" size="small" round @click="addTeacher" v-auth="'/system/list:员工管理:新增员工'">新增员工</el-button> |
|
|
|
@ -119,6 +119,7 @@ |
|
|
|
|
:on-success="uploadSuccess" |
|
|
|
|
:before-remove="beforeRemove" |
|
|
|
|
:limit="1" |
|
|
|
|
:data="{schoolId: this.clientId}" |
|
|
|
|
:on-exceed="handleExceed" |
|
|
|
|
:action="this.api.uploadFileStaff" |
|
|
|
|
:file-list="uploadList" |
|
|
|
@ -264,7 +265,7 @@ export default { |
|
|
|
|
keyword: function(val) { |
|
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
this.getData() |
|
|
|
|
this.initData() |
|
|
|
|
},500) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -306,17 +307,30 @@ export default { |
|
|
|
|
this.handleCheck(val2) |
|
|
|
|
}, |
|
|
|
|
getData(){ |
|
|
|
|
let totalPage = Math.ceil((this.total - 1) / this.pageSize) |
|
|
|
|
let currentPage = this.pageNo > totalPage ? totalPage : this.pageNo |
|
|
|
|
this.pageNo = currentPage < 1 ? 1 : currentPage |
|
|
|
|
let data = { |
|
|
|
|
staffProfessionalArchitectureIds: this.oneDepartmentIds, |
|
|
|
|
staffGradeIds: this.twoDepartmentIds, |
|
|
|
|
searchContent: this.keyword, |
|
|
|
|
schoolId: this.clientId |
|
|
|
|
schoolId: this.clientId, |
|
|
|
|
pageNum: this.pageNo, |
|
|
|
|
pageSize: this.pageSize |
|
|
|
|
} |
|
|
|
|
this.$get(`${this.api.queryStaff}/${this.pageNo}/${this.pageSize}`,data).then(res => { |
|
|
|
|
this.listData = res.data.staffList |
|
|
|
|
this.total = res.data.total |
|
|
|
|
this.listData = res.data.staffList.list |
|
|
|
|
this.total = res.data.staffList.totalCount |
|
|
|
|
if(!this.listData.length && this.total){ |
|
|
|
|
this.pageNo-- |
|
|
|
|
this.getData() |
|
|
|
|
} |
|
|
|
|
}).catch(res => {}); |
|
|
|
|
}, |
|
|
|
|
initData(){ |
|
|
|
|
this.pageNo = 1 |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
getRoles(){ |
|
|
|
|
let data = { |
|
|
|
|
clientId: this.clientId |
|
|
|
|