fix(系统设置): 添加用户组后,点击删除按钮 删除不了 控制台报错
--user=郭雨琦 --bug=1013361 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001013361
This commit is contained in:
parent
8323a17479
commit
10ca66774b
|
@ -227,12 +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 (item.type) {
|
||||
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) {
|
||||
|
@ -366,16 +368,25 @@ export default {
|
|||
}
|
||||
},
|
||||
addWorkspaceGroup(id,index){
|
||||
let isHaveWorkSpace ;
|
||||
this.form.groups.forEach(item =>{
|
||||
if (item.type === "ws_member+WORKSPACE") {
|
||||
isHaveWorkSpace = true;
|
||||
}
|
||||
})
|
||||
if (isHaveWorkSpace) {
|
||||
return;
|
||||
}
|
||||
this.result = this.$get('/workspace/list/resource/' + id + "/WORKSPACE", res => {
|
||||
let data = res.data;
|
||||
if (data) {
|
||||
let roleInfo = {};
|
||||
roleInfo.selects = [];
|
||||
roleInfo.type = "ws_member+WORKSPACE";
|
||||
let ids = this.form.groups.map(r => r.type);
|
||||
ids.forEach(id => {
|
||||
roleInfo.selects.push(id);
|
||||
})
|
||||
roleInfo.type = "ws_member+WORKSPACE";
|
||||
if (this.currentGroupWSIds.size > 0) {
|
||||
roleInfo.ids = [];
|
||||
this.currentGroupWSIds.forEach(item =>{
|
||||
|
|
Loading…
Reference in New Issue