Jelajahi Sumber

feat: 组织架构

ystl_myq 1 bulan lalu
induk
melakukan
f80855f9cb

+ 8 - 1
src/views/background/framework/proson/prosonDepartment.vue

@@ -159,6 +159,11 @@ const ChangeRole = row => {
   changeRoleRef.value.open();
   console.log(row);
 };
+// 部门配置角色
+const editRoles = row => {
+  changeRoleRef.value.open();
+  console.log(row);
+};
 </script>
 
 <template>
@@ -202,7 +207,9 @@ const ChangeRole = row => {
                   编辑部门
                 </el-dropdown-item>
                 <el-dropdown-item> 添加子部门 </el-dropdown-item>
-                <el-dropdown-item> 配置角色 </el-dropdown-item>
+                <el-dropdown-item @click="editRoles">
+                  配置角色
+                </el-dropdown-item>
                 <el-dropdown-item>
                   <el-link type="danger" @click="deleteDepartment"
                     >删除</el-link

+ 31 - 11
src/views/background/framework/roles/rolePower.vue

@@ -14,28 +14,34 @@ const addRoleShow = ref(false);
 // 新增角色组人员
 const addPersonRef = ref();
 const addPersonShow = ref(false);
-const tableData = [
+const tableData = ref([
   {
     date: "2016-05-03",
     name: "Tom",
-    address: "No. 189"
+    address: "No. 189",
+    show: false,
+    show1: true,
+    show2: false
   },
   {
     date: "2016-05-02",
     name: "Tom",
-    address: "No. 189"
+    address: "No. 189",
+    show: true
   },
   {
     date: "2016-05-04",
     name: "Tom",
-    address: "No. 189"
+    address: "No. 189",
+    show: false
   },
   {
     date: "2016-05-01",
     name: "Tom",
-    address: "No. 189"
+    address: "No. 189",
+    show: true
   }
-];
+]);
 const rolesList = reactive({
   data: [
     { name: "管理员", id: 1 },
@@ -215,23 +221,37 @@ const deltetePerson = item => {
           <el-table :data="tableData" border style="width: 100%">
             <el-table-column prop="date" label="模块">
               <template #default="{ row }">
-                <div><input checked type="checkbox" />{{ row.date }}</div>
+                <div>
+                  <input v-model="row.show" type="checkbox" />{{ row.date }}
+                  <br />
+                  <input v-model="row.show1" type="checkbox" />{{ row.name }}
+                  <br />
+                  <input v-model="row.show2" type="checkbox" />{{ row.address }}
+                </div>
               </template>
             </el-table-column>
             <el-table-column prop="name" label="菜单">
               <template #default="{ row }">
-                <div><input checked type="checkbox" />{{ row.date }}</div>
-                <div><input checked type="checkbox" />{{ row.date }}</div>
+                <div>
+                  <input v-model="row.show" type="checkbox" />{{ row.date }}
+                </div>
+                <div>
+                  <input v-model="row.show" type="checkbox" />{{ row.date }}
+                </div>
               </template>
             </el-table-column>
             <el-table-column prop="address" label="全选">
               <template #default="{ row }">
-                <div><input checked type="checkbox" />{{ row.date }}</div>
+                <div>
+                  <input v-model="row.show" type="checkbox" />{{ row.date }}
+                </div>
               </template>
             </el-table-column>
             <el-table-column prop="address" label="权限点">
               <template #default="{ row }">
-                <div><input checked type="checkbox" />{{ row.date }}</div>
+                <div>
+                  <input v-model="row.show" type="checkbox" />{{ row.date }}
+                </div>
               </template>
             </el-table-column>
           </el-table>