From a86a70ebbd668f9e4f669c58a8a106fdc463a58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Tue, 22 Apr 2025 10:36:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/organization/organization.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index adee93749..cf5488a2e 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -1778,14 +1778,19 @@ export default { }, // 人员修改 async updatePeoDo () { - const targetAgencyIds = this.peoForm.manageScopes.map(innerArray => innerArray[innerArray.length - 1]); + const manageScopeArra=[] + if(this.peoForm.manageScopes){ + const targetAgencyIds =this.peoForm.manageScopes?this.peoForm.manageScopes.map(innerArray => innerArray[innerArray.length - 1]):this.peoForm.manageScopes; // 用于存储提取结果的 Set 对象 const result = new Set(); // 调用递归函数提取 level 与 agencyId 组合成的字符串 this.extractLevelAndAgencyId(this.orgOptions[0], targetAgencyIds, result); // 将 Set 对象转换为数组 + manageScopeArray = Array.from(result); + console.log(this.peoForm,"查看"); + } - const manageScopeArray = Array.from(result); + const url = "/gov/org/staff/editstaff"; let params = { staffId: this.userStaffId, @@ -2072,7 +2077,6 @@ export default { this.gridTableFlag = false; this.agencyTableFlag = false; this.departmentTableFlag = false; - this.selDeptType = row.deptType; this.getDepartmentStaffListData(); this.assembleBreadcrumbArr(row.departmentId, "department"); @@ -2254,7 +2258,7 @@ export default { this.peoForm.post = data.workType; this.peoForm.idCard = data.idCard; this.peoForm.manageOrgIds = data.manageOrgIdStr?data.manageOrgIdStr.split(','):[]; - this.peoForm.orgLevels = data.orgLevels; + this.peoForm.orgLevels = data.manageLevelStr; this.manageOrgIds = data.manageOrgIdStr; // 已有的权限(角色) let existedRoleArr = []; @@ -2264,6 +2268,7 @@ export default { } }); this.peoForm.newRoles = existedRoleArr; + } else { this.$message.error(msg); }