|
|
|
@ -1655,6 +1655,16 @@ export default { |
|
|
|
|
|
|
|
// 添加人员 |
|
|
|
async submitPeoDo () { |
|
|
|
const targetAgencyIds = this.peoForm.manageScopes.map(innerArray => innerArray[innerArray.length - 1]); |
|
|
|
|
|
|
|
// 用于存储提取结果的 Set 对象 |
|
|
|
const result = new Set(); |
|
|
|
|
|
|
|
// 调用递归函数提取 level 与 agencyId 组合成的字符串 |
|
|
|
this.extractLevelAndAgencyId(this.orgOptions[0], targetAgencyIds, result); |
|
|
|
|
|
|
|
// 将 Set 对象转换为数组 |
|
|
|
const manageScopeArray = Array.from(result); |
|
|
|
const url = "/gov/org/staff/addstaffv2"; |
|
|
|
const { |
|
|
|
peoForm: { orgType }, |
|
|
|
@ -1674,7 +1684,7 @@ export default { |
|
|
|
: orgType == "dept" |
|
|
|
? this.currentDepartmentId |
|
|
|
: this.currentGridOrgId, |
|
|
|
manageScopes:this.peoForm.manageScopes |
|
|
|
manageScopes:manageScopeArray |
|
|
|
}; |
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
|