zhaoke 3 년 전
부모
커밋
df6acdbc4b

+ 12 - 2
src/components/rolelist/index.vue

@@ -97,6 +97,11 @@ export default {
       type: String,
       default: "",
     },
+    needType: {
+      type: String,
+      default: "",
+    },
+    needId: [String, Number],
     GroupIds: {
       type: Array,
       default: () => [],
@@ -178,7 +183,7 @@ export default {
           if (this.roleType == 'account') {
             this.getRoleData('UserId', 'UserName');
           }
-          if (!this.OpenGroup) {
+          if (!this.OpenGroup || this.needType) {
             if (this.roleType == "roleByUpId") {
               this.getRoleDataByUpId("roleId");
             }
@@ -297,7 +302,12 @@ export default {
           msgs.forEach(item => {
             item.name = item[names]
           });
-          this.dataList = msgs;
+          if (this.needId) {
+            const yrts = msgs.filter(item => item.RoleId != this.needId);
+            this.dataList = yrts;
+          } else {
+            this.dataList = msgs;
+          }
           this.total = num;
           this.$emit('roleListChange', msgs)
 

+ 1 - 1
src/views/authorityManagement/components/authorityRoleAdd.vue

@@ -35,7 +35,7 @@
         <Rulesofcompetency @getData="getData" title="权限规则" />
       </div>
       <div v-is="['role_add_mutually_exclusive','role_add_mutually_exclusive_list']" class="flex1 part">
-        <Rolelist v-is="['role_add_mutually_exclusive']" @checkChange="checkChange" @checkClick="checkClick" :imageSize="80" :roleType="roleType" :active="true" class="hucRole" :number="8" style="height: 280px; overflow: hidden" title="互斥角色" />
+        <Rolelist v-is="['role_add_mutually_exclusive']" @checkChange="checkChange" @checkClick="checkClick" :imageSize="80" needType="1" :roleType="roleType" :active="true" class="hucRole" :number="8" style="height: 280px; overflow: hidden" title="互斥角色" />
         <Permissionlist v-is="['role_add_mutually_exclusive_list']" v-loading="permission" :imageSize="80" :RoleList="RoleList" :check="true" class="hucPower" style="margin-top: 24px" title="互斥角色已有权限列表" />
       </div>
     </div>

+ 1 - 1
src/views/authorityManagement/components/authorityRoleEdit.vue

@@ -43,7 +43,7 @@
         <Rulesofcompetency v-loading="loading" element-loading-text="数据加载中" :authList="authList" :authTo="authTo" title="权限规则" />
       </div>
       <div v-is="['role_edit_mutually_exclusive','role_edit_mutually_exclusive_list']" class="flex1 part">
-        <Rolelist v-is="['role_edit_mutually_exclusive']" v-loading="loading" element-loading-text="数据加载中" @checkChange="checkChange" @checkClick="checkClick" :roleType="roleType" :checkBoxList="radioCheck" :active="true" class="hucRole" :imageSize="80" :number="8" style="height: 280px; overflow: hidden" title="互斥角色" />
+        <Rolelist v-is="['role_edit_mutually_exclusive']" v-loading="loading" element-loading-text="数据加载中" @checkChange="checkChange" @checkClick="checkClick" :roleType="roleType" needType="1" :needId="roleId" :checkBoxList="radioCheck" :active="true" class="hucRole" :imageSize="80" :number="8" style="height: 280px; overflow: hidden" title="互斥角色" />
 
         <Permissionlist v-is="['role_edit_mutually_exclusive_list']" v-loading="permission" element-loading-text="数据加载中" :check="true" :imageSize="80" :RoleList="RoleList" class="hucPower" style="margin-top: 24px" title="互斥角色已有权限列表" />
       </div>