|
|
@ -100,6 +100,7 @@ export default { |
|
|
|
userCheck: false, |
|
|
|
userCheck: false, |
|
|
|
users: [], |
|
|
|
users: [], |
|
|
|
userKeyword: '', |
|
|
|
userKeyword: '', |
|
|
|
|
|
|
|
accountIds: [], |
|
|
|
|
|
|
|
|
|
|
|
checkedKeyword: '', |
|
|
|
checkedKeyword: '', |
|
|
|
checkedAllCheck: false, |
|
|
|
checkedAllCheck: false, |
|
|
@ -114,7 +115,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
userKeyword: function () { |
|
|
|
userKeyword: function () { |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
this.searchTimer = setTimeout(this.getNakadaiUser, 500) |
|
|
|
this.searchTimer = setTimeout(this[this.userType ? 'getExpert' : 'getNakadaiUser'], 500) |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
@ -130,22 +131,27 @@ export default { |
|
|
|
if (curRecords.length === 1) { |
|
|
|
if (curRecords.length === 1) { |
|
|
|
this.checked = [] |
|
|
|
this.checked = [] |
|
|
|
const res = await this.$post(`${this.api.assignedPersonnelList}?evaluationId=${row.evaluationId}&reportId=${curRecords[0].reportId}`) |
|
|
|
const res = await this.$post(`${this.api.assignedPersonnelList}?evaluationId=${row.evaluationId}&reportId=${curRecords[0].reportId}`) |
|
|
|
const ids = res.accountIds |
|
|
|
this.accountIds = res.accountIds |
|
|
|
if (ids && ids.length) { |
|
|
|
this.handleUserCheck() |
|
|
|
const { users, checked } = this |
|
|
|
|
|
|
|
ids.forEach(e => { |
|
|
|
|
|
|
|
const cur = users.find(n => n.accountId === e) |
|
|
|
|
|
|
|
if (cur) { |
|
|
|
|
|
|
|
cur.check = true |
|
|
|
|
|
|
|
checked.push(cur) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.loaded = true |
|
|
|
this.loaded = true |
|
|
|
} catch (e) { } |
|
|
|
} catch (e) { } |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 匹配用户选择框 |
|
|
|
|
|
|
|
handleUserCheck () { |
|
|
|
|
|
|
|
const ids = this.accountIds |
|
|
|
|
|
|
|
if (ids && ids.length) { |
|
|
|
|
|
|
|
const checked = [] |
|
|
|
|
|
|
|
const { users } = this |
|
|
|
|
|
|
|
ids.forEach(e => { |
|
|
|
|
|
|
|
const cur = users.find(n => n.accountId === e) |
|
|
|
|
|
|
|
cur.check = !!cur |
|
|
|
|
|
|
|
cur && checked.push(cur) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.checked = checked |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取中台部门 |
|
|
|
// 获取中台部门 |
|
|
|
async getNakadaiDep () { |
|
|
|
async getNakadaiDep () { |
|
|
|
const res = await this.$post(this.api.treeListArch) |
|
|
|
const res = await this.$post(this.api.treeListArch) |
|
|
@ -194,12 +200,7 @@ export default { |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 1000 |
|
|
|
pageSize: 1000 |
|
|
|
}) |
|
|
|
}) |
|
|
|
const list = page.records |
|
|
|
this.users = page.records |
|
|
|
const { checked } = this |
|
|
|
|
|
|
|
list.forEach(e => { |
|
|
|
|
|
|
|
e.check = !!checked.find(n => n.accountId === e.accountId) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.users = list |
|
|
|
|
|
|
|
this.getDetail(init) |
|
|
|
this.getDetail(init) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 查询专家列表 |
|
|
|
// 查询专家列表 |
|
|
@ -207,15 +208,11 @@ export default { |
|
|
|
this.$post(this.api.expertList, { |
|
|
|
this.$post(this.api.expertList, { |
|
|
|
type: 1, |
|
|
|
type: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 1000 |
|
|
|
pageSize: 1000, |
|
|
|
|
|
|
|
keyWord: this.userKeyword |
|
|
|
}).then(({ page }) => { |
|
|
|
}).then(({ page }) => { |
|
|
|
const list = page.records |
|
|
|
this.users = page.records |
|
|
|
const { checked } = this |
|
|
|
this.handleUserCheck() |
|
|
|
list.forEach(e => { |
|
|
|
|
|
|
|
e.check = !!checked.find(n => n.accountId === e.accountId) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.users = list |
|
|
|
|
|
|
|
this.getDetail(1) |
|
|
|
|
|
|
|
}).catch(err => { }) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|