|
|
@ -121,7 +121,13 @@ export default { |
|
|
|
} |
|
|
|
let endOption = res.data.options |
|
|
|
for (let i = 0; i < endOption.length; i++) { |
|
|
|
endOption[i].children = '' |
|
|
|
if (endOption[i].children) { |
|
|
|
for (let m = 0; m < endOption[i].children.length; m++) { |
|
|
|
if (endOption[i].children[m].children) { |
|
|
|
endOption[i].children[m].children = '' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.options = endOption |
|
|
|
}) |
|
|
@ -140,11 +146,9 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
getUserList () { |
|
|
|
if (!this.dataForm.id) { |
|
|
|
this.dataForm.userId = '' |
|
|
|
this.nickname = '' |
|
|
|
} |
|
|
|
let deptId = Array.isArray(this.deptIdList) ? this.deptIdList[0] : this.deptIdList |
|
|
|
this.dataForm.userId = '' |
|
|
|
this.nickname = '' |
|
|
|
let deptId = Array.isArray(this.deptIdList) ? this.deptIdList[1] : this.deptIdList |
|
|
|
this.dataForm.deptId = deptId |
|
|
|
}, |
|
|
|
handleAvatarSuccess (res, file) { |
|
|
@ -182,9 +186,10 @@ export default { |
|
|
|
...this.dataForm, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
this.deptIdList = res.data.deptId |
|
|
|
this.deptIdList = res.data.deptIdList |
|
|
|
this.nickname = res.data.nickname |
|
|
|
this.getUserList() |
|
|
|
let deptId = Array.isArray(this.deptIdList) ? this.deptIdList[1] : this.deptIdList |
|
|
|
this.dataForm.deptId = deptId |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|