|
|
|
|
@@ -42,6 +42,7 @@
|
|
|
|
|
<div class="content-right relative">
|
|
|
|
|
<avue-crud height="900" ref="crud2" :data="rightDataList"
|
|
|
|
|
:option="rightTabs ? rightPostOptions : rightPolicyOptions" :page.sync="rightPages"
|
|
|
|
|
@current-change="rightCurrentPageChange" @size-change="rightSizePageChange"
|
|
|
|
|
@selection-change="rightSelectionChange">
|
|
|
|
|
<template slot="menuLeft">
|
|
|
|
|
<el-input style="width: 300px" placeholder="搜索岗位" v-show="rightTabs === 1"
|
|
|
|
|
@@ -289,6 +290,16 @@ export default {
|
|
|
|
|
this.getLeftUserList()
|
|
|
|
|
console.log('leftpages:', this.leftPages)
|
|
|
|
|
},
|
|
|
|
|
rightCurrentPageChange(current) {
|
|
|
|
|
this.rightPages.currentPage = current
|
|
|
|
|
this.rightTabs === 0 && this.getRightListPolicy()
|
|
|
|
|
this.rightTabs === 1 && this.getRightSearchByUserId()
|
|
|
|
|
},
|
|
|
|
|
rightSizePageChange(current) {
|
|
|
|
|
this.rightPages.size = current
|
|
|
|
|
this.rightTabs === 0 && this.getRightListPolicy()
|
|
|
|
|
this.rightTabs === 1 && this.getRightSearchByUserId()
|
|
|
|
|
},
|
|
|
|
|
leftSelectionChange(val) {
|
|
|
|
|
this.leftUserSelections = val
|
|
|
|
|
console.log(val, '--------------------00000');
|
|
|
|
|
@@ -374,28 +385,42 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getRightSearchByUserId() {
|
|
|
|
|
const {currentPage, size} = this.rightPages
|
|
|
|
|
const ids = this.leftUserSelections.map(item => item.userId).join(',');
|
|
|
|
|
const createTime = Date.now() + 3000
|
|
|
|
|
this.rightLoading = true
|
|
|
|
|
let resData = await getSearchAllByUserId({ids})
|
|
|
|
|
let params = {
|
|
|
|
|
ids, current: currentPage,
|
|
|
|
|
size,
|
|
|
|
|
}
|
|
|
|
|
let resData = await getSearchAllByUserId(params)
|
|
|
|
|
if (resData.data.code === 200) {
|
|
|
|
|
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const {records, total, size, current} = resData.data.data
|
|
|
|
|
this.rightLoading = false
|
|
|
|
|
this.rightDataList = resData.data.data
|
|
|
|
|
this.rightDataList = records
|
|
|
|
|
this.rightPages = {total, size, currentPage: current}
|
|
|
|
|
}, timed)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getRightListPolicy() {
|
|
|
|
|
let params = {ids: this.rowData.policyIds}
|
|
|
|
|
const {currentPage, size} = this.rightPages
|
|
|
|
|
let params = {
|
|
|
|
|
ids: this.rowData.policyIds,
|
|
|
|
|
current: currentPage,
|
|
|
|
|
size,
|
|
|
|
|
}
|
|
|
|
|
const createTime = Date.now() + 3000
|
|
|
|
|
this.rightLoading = true
|
|
|
|
|
let resData = await getListByids(params)
|
|
|
|
|
if (resData.data.code === 200) {
|
|
|
|
|
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const {records, total, size, current} = resData.data.data
|
|
|
|
|
this.rightLoading = false
|
|
|
|
|
this.rightDataList = resData.data.data
|
|
|
|
|
this.rightDataList = records
|
|
|
|
|
this.rightPages = {total, size, currentPage: current}
|
|
|
|
|
}, timed)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|