From f02ab27e56523559dcc0187d798a1d524e8e1bdc Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 9 Mar 2023 19:23:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=88=90=E5=91=98=E6=96=B0=E5=A2=9E=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=9A=84=E6=9D=83=E9=99=90=E6=9C=AA=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=80=E5=B1=9E=E7=9A=84=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=A9=BA=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018403 --user=李玉号 【系统设置】用户-编辑用户-新增一个项目的权限-未同步新增所属的工作空间 https://www.tapd.cn/55049933/s/1347786 --- .../frontend/src/business/system/user/EditUser.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system-setting/frontend/src/business/system/user/EditUser.vue b/system-setting/frontend/src/business/system/user/EditUser.vue index 9bfb6d3aff..198a1e12ac 100644 --- a/system-setting/frontend/src/business/system/user/EditUser.vue +++ b/system-setting/frontend/src/business/system/user/EditUser.vue @@ -433,6 +433,10 @@ export default { this.currentGroupWSIds.add(project.workspaceId); if (this.form.groups[this.currentWSGroupIndex] && this.form.groups[this.currentWSGroupIndex].ids.indexOf(project.workspaceId) === -1) { this.form.groups[this.currentWSGroupIndex].ids.push(project.workspaceId); + } else if (this.form.groups.filter(g => g.type === "ws_member+WORKSPACE").length > 0 + && this.form.groups.filter(g => g.type === "ws_member+WORKSPACE")[0].ids + && this.form.groups.filter(g => g.type === "ws_member+WORKSPACE")[0].ids.indexOf(project.workspaceId) === -1) { + this.form.groups.filter(g => g.type === "ws_member+WORKSPACE")[0].ids.push(project.workspaceId); } } }) @@ -442,7 +446,9 @@ export default { let _type = type.split("+")[1]; if (_type === GROUP_TYPE.WORKSPACE) { this.currentGroupWSIds.forEach(item => { - this.form.groups[index].ids.push(item); + if (this.form.groups[index] && this.form.groups[index].ids) { + this.form.groups[index].ids.push(item); + } }) } else { this.form.groups[index].ids = [];