Pārlūkot izejas kodu

修改角色选中

zhaoke 3 gadi atpakaļ
vecāks
revīzija
ba65d72095
1 mainītis faili ar 6 papildinājumiem un 4 dzēšanām
  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')