Commit b456a094 by 胡悦

选择员工修改

1 parent 5da2e1a3
...@@ -86,8 +86,10 @@ export default { ...@@ -86,8 +86,10 @@ export default {
this.$apis.customerTransform.listDepartmentTree(params).then(res => { this.$apis.customerTransform.listDepartmentTree(params).then(res => {
this.listTree = res this.listTree = res
this.loading = false this.loading = false
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree) if (this.listTree.length) {
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses) this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
}
this.selectData.forEach(i => { this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId) const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
this.clearSelect(row) this.clearSelect(row)
...@@ -114,7 +116,10 @@ export default { ...@@ -114,7 +116,10 @@ export default {
d.forEach(i => { d.forEach(i => {
if (i.entmicroStaffResponses) { if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => { i.entmicroStaffResponses.forEach(j => {
arr.push(j) const flag = arr.find(m => m.id == j.id)
if (!flag) {
arr.push(j)
}
}) })
} }
if (i.children) { if (i.children) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!