ソースを参照

修改角色选中

zhaoke 3 年 前
コミット
ba65d72095
1 ファイル変更6 行追加4 行削除
  1. 6 4
      src/components/rolelist/index.vue

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

@@ -173,9 +173,11 @@ export default {
           if (this.roleType == 'account') {
             this.checkBoxs('UserId')
           }
-          // if (this.roleType == 'onlyRole' || this.roleType == 'roleByUpId' || this.roleType === 'groups') {
-          //   this.checkBoxs('RoleId')
-          // }
+          if (this.roleType == 'onlyRole' || this.roleType == 'roleByUpId' || this.roleType === 'groups') {
+            if (!this.GroupIds.length) {
+              this.checkBoxs('RoleId')
+            }
+          }
         }
       },
       deep: true
@@ -201,7 +203,7 @@ export default {
           return
         }
         if (arr && arr.length >= 2) {
-            this.getRoleDataByUpId()
+          this.getRoleDataByUpId()
         } else {
           if (this.roleType == 'account') {
             this.getRoleData('UserId', 'UserName')