ソースを参照

Merge remote-tracking branch 'origin/master'

tianyabing 2 年 前
コミット
7c421f7f86
1 ファイル変更29 行追加22 行削除
  1. 29 22
      src/components/auth/authRole.vue

+ 29 - 22
src/components/auth/authRole.vue

@@ -3,62 +3,67 @@ import publicFunc from "@/utils/publicFunc";
 export default {
   data() {
     return {
-      tableData:[],
+      checkedUsers:[],
+      tableData: [],
       roleListData: [
         {
           id: publicFunc.buildGuid("group"),
-          column_name: "普通员工角色组",
+          label: "普通员工角色组",
           type: "group",
         },
       ],
       systemListData: [
         {
           id: publicFunc.buildGuid("system"),
-          column_name: "空间管理系统",
+          label: "空间管理系统",
           type: "system",
         },
         {
           id: publicFunc.buildGuid("system"),
           type: "system",
-          column_name: "停车管理系统",
+          label: "停车管理系统",
         },
         {
           id: publicFunc.buildGuid("system"),
           type: "system",
-          column_name: "能源管理系统",
+          label: "能源管理系统",
         },
         {
           id: publicFunc.buildGuid("system"),
           type: "system",
-          column_name: "中枢",
+          label: "中枢",
         },
       ],
       userListData: [
         {
           id: publicFunc.buildGuid("user"),
-          column_name: "超级管理员",
+          label: "超级管理员",
           type: "user",
+          value:"超级管理员"
         },
         {
           id: publicFunc.buildGuid("user"),
-          column_name: "普通管理员",
+          label: "普通管理员",
           type: "user",
+          value:"普通管理员"
         },
         {
           id: publicFunc.buildGuid("user"),
-          column_name: "决策组",
+          label: "决策组",
           type: "user",
+          value:"决策组"
         },
         {
           id: publicFunc.buildGuid("user"),
-          column_name: "普通用户",
+          label: "普通用户",
           type: "user",
+          value: "普通用户",
         },
       ],
     };
   },
   mounted() {
-    this.initRoleData();
+    // this.initRoleData();
   },
   watch: {},
   methods: {},
@@ -76,7 +81,7 @@ export default {
             :key="item.id"
           >
             <div class="group-icon"></div>
-            <div class="text">{{ item.column_name }}</div>
+            <div class="text">{{ item.label }}</div>
           </div>
         </div>
         <div class="left-box-list">
@@ -86,23 +91,25 @@ export default {
             :key="item.id"
           >
             <div class="system-icon"></div>
-            <div class="text">{{ item.column_name }}</div>
+            <div class="text">{{ item.label }}</div>
           </div>
         </div>
         <div class="left-box-list">
-          <div
+          <a-checkbox-group :options="userListData" :value="checkedUsers"></a-checkbox-group>
+          <!-- <div
             class="left-box-list-item"
             v-for="item in userListData"
             :key="item.id"
           >
             <div class="role-icon"></div>
-            <div class="text">{{ item.column_name }}</div>
-          </div>
+            <div class="text">{{ item.label }}</div>
+          </div> -->
+        
         </div>
       </div>
       <div class="right-box">
         <div class="title">权限列表</div>
-        <a-table  :data-source="tableData" bordered></a-table>
+        <a-table :data-source="tableData" bordered></a-table>
       </div>
     </div>
     <div class="auth-role-infolist">123</div>
@@ -163,7 +170,7 @@ export default {
           .group-icon {
             background: url("@/assets/images/auth/group_gray.png") no-repeat
               center;
-            &-click {
+            &.active {
               background: url("@/assets/images/auth/group_blue.png") no-repeat
                 center;
             }
@@ -171,7 +178,7 @@ export default {
           .system-icon {
             background: url("@/assets/images/auth/system_gray.png") no-repeat
               center;
-            &-click {
+            &.active {
               background: url("@/assets/images/auth/system_blue.png") no-repeat
                 center;
             }
@@ -179,7 +186,7 @@ export default {
           .role-icon {
             background: url("@/assets/images/auth/role_gray.png") no-repeat
               center;
-            &-click {
+            &.active {
               background: url("@/assets/images/auth/role_blue.png") no-repeat
                 center;
             }
@@ -198,7 +205,7 @@ export default {
       height: 100%;
       width: 45%;
       background: rgb(255, 165, 0, 0.1);
-      .title{
+      .title {
         width: 100%;
         height: 12%;
         display: flex;
@@ -207,7 +214,7 @@ export default {
         font-weight: 400;
         font-size: 16px;
       }
-      .table{
+      .table {
         width: 100%;
         height: 88%;
         display: flex;