zhongxiaoyu 3 жил өмнө
parent
commit
f337bba5a8

+ 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')
           }
         }
       },