fix(系统设置): 修复编辑用户用户组选择值显示成id

--user=郭雨琦
--bug=1013525
https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001013525
This commit is contained in:
guoyuqi 2022-05-27 15:12:20 +08:00 committed by 刘瑞斌
parent 9576fed0ac
commit 6ed15e2f32
1 changed files with 12 additions and 1 deletions

View File

@ -28,7 +28,7 @@
:rules="{required: true, message: $t('user.select_group'), trigger: 'change'}"
>
<el-select filterable v-model="group.type" :placeholder="$t('user.select_group')"
class="edit-user-select" @change="getResource(group.type, index)">
class="edit-user-select" :disabled="form.groups[index].type != null && form.groups[index].type !== '' " @change="getResource(group.type, index)">
<el-option
v-for="item in activeGroup(group)"
:key="item.id"
@ -227,6 +227,14 @@ export default {
if (!isRemove) {
return;
}
let _type = item.type.split("+")[1];
if (_type === 'WORKSPACE') {
this.currentWSGroupIndex = -1;
} else {
if (this.currentWSGroupIndex > index) {
this.currentWSGroupIndex = this.currentWSGroupIndex-1
}
}
if (index !== -1) {
this.form.groups.splice(index, 1)
}
@ -320,6 +328,9 @@ export default {
}
let id = idType.split("+")[0];
let type = idType.split("+")[1];
if (index>0 && this.form.groups[index].ids && this.form.groups[index].ids.length >0) {
return;
}
let isHaveWorkspace = false;
if (type === 'PROJECT') {
for (let i = 0; i < this.form.groups.length; i++) {