浏览代码

角色列表修改

zhongxiaoyu 3 年之前
父节点
当前提交
f337bba5a8
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      src/components/rolelist/index.vue

+ 6 - 4
src/components/rolelist/index.vue

@@ -173,10 +173,12 @@ export default {
           if (this.roleType == 'account') {
             this.checkBoxs('UserId')
           }
-          if (this.roleType == 'onlyRole' || this.roleType == 'roleByUpId' || this.roleType === 'groups') {
-            if (!this.GroupIds.length) {
-              this.checkBoxs('RoleId')
-            }
+           if (
+            (this.roleType == 'onlyRole' && !this.GroupIds.length) ||
+            (this.roleType == 'onlyRole' && this.GroupIds.length === 1 && this.GroupIds[0] === -1) ||
+            (this.roleType === 'group' && this.GroupIds.length)
+          ) {
+            this.checkBoxs('RoleId')
           }
         }
       },