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