优化
This commit is contained in:
parent
eb7af8c9f1
commit
fe31203171
@ -9,7 +9,7 @@
|
||||
<div class="detail_content">
|
||||
<el-button
|
||||
@click="handleChange"
|
||||
style="margin-bottom:20px">{{selectDepName}}<i class="el-icon-arrow-down"></i></el-button>
|
||||
style="margin-bottom:20px">{{personnelList.list.length>0?(personnelList.title + '等'+personnelList.list.length+'个部门'):'全部'}}<i class="el-icon-arrow-down"></i></el-button>
|
||||
<el-table :data="tableData"
|
||||
border
|
||||
:header-cell-style="{ background:'#F5F7FA'}"
|
||||
@ -48,9 +48,8 @@
|
||||
<dialog-depart
|
||||
v-if="showDialogDepart"
|
||||
:isShow.sync='showDialogDepart'
|
||||
:showDataList.sync='showData'
|
||||
:len.sync="len"
|
||||
:isSignle.sync="isSignle"
|
||||
:showDataList.sync='personnelList'
|
||||
@cb='handleGetDepart'
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -67,8 +66,10 @@ export default {
|
||||
return {
|
||||
// 表格数据
|
||||
tableData: [],
|
||||
// 当前选中部门
|
||||
selectDepName: '全部',
|
||||
personnelList: {
|
||||
list: []
|
||||
},
|
||||
departmentIds: '',
|
||||
// 当前选中部门id
|
||||
selectDepId: '',
|
||||
showDialogDepart: false,
|
||||
@ -77,7 +78,7 @@ export default {
|
||||
list: []
|
||||
},
|
||||
//
|
||||
len: 1,
|
||||
len: 9999,
|
||||
//
|
||||
isSignle: true
|
||||
}
|
||||
@ -89,6 +90,13 @@ export default {
|
||||
this.handleDetailReq()
|
||||
},
|
||||
methods: {
|
||||
handleGetDepart (list) {
|
||||
this.departmentIds = list.value
|
||||
this.personnelList = list
|
||||
this.handleDetailReq()
|
||||
console.log('list: ', list)
|
||||
this.showDialogDepart = false
|
||||
},
|
||||
handlePush (item) {
|
||||
console.log('item: ', item.recordId)
|
||||
this.$router.push({
|
||||
@ -107,10 +115,10 @@ export default {
|
||||
this.showDialogDepart = true
|
||||
},
|
||||
// 请求详情页面信息
|
||||
async handleDetailReq (depId) {
|
||||
async handleDetailReq (departmentIds = this.departmentIds) {
|
||||
let params = {
|
||||
currPage: 1,
|
||||
departmentId: depId,
|
||||
departmentIds: departmentIds,
|
||||
flowProcess: this.$route.query.flowProcess,
|
||||
scoreLevel: this.$route.query.scoreLevel,
|
||||
startId: this.$route.query.startId,
|
||||
@ -122,13 +130,6 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
showDialogDepart (newV, oldV) {
|
||||
if (!newV && oldV) {
|
||||
this.selectDepName = this.showData.list.length > 0 ? this.showData.list[0].departmentName : '全部'
|
||||
this.selectDepId = this.showData.list.length > 0 ? this.showData.list[0].departmentId : ''
|
||||
this.handleDetailReq(this.selectDepId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user