Browse Source

将页面所有按钮权限添加进去

hzj18279462576@163.com 1 year ago
parent
commit
5309d1259e

+ 176 - 65
src/layout/sidebar/SidevarItem.vue

@@ -37,7 +37,7 @@
           <span>房态管理</span>
         </el-menu-item>
         <!-- 房型管理 -->
-        <el-sub-menu :index="item.name" v-if="item.name == 'roomType'">
+        <el-sub-menu index="roomTypes" v-if="item.name == 'roomTypes'">
           <template #title>
             <img
               v-if="
@@ -79,7 +79,7 @@
           <span>订单管理</span>
         </el-menu-item>
         <!-- 授权管理 -->
-        <el-sub-menu :index="item.name" v-if="item.name == 'class'">
+        <el-sub-menu index="classs" v-if="item.name == 'classs'">
           <template #title>
             <img
               v-if="
@@ -120,7 +120,7 @@
           <span>统计报表</span>
         </el-menu-item>
         <!-- 设备管理 -->
-        <el-sub-menu :index="item.name" v-if="item.name == 'doorLock'">
+        <el-sub-menu index="doorLocks" v-if="item.name == 'doorLocks'">
           <template #title>
             <img
               v-if="
@@ -146,7 +146,7 @@
           </el-menu-item>
         </el-sub-menu>
         <!-- 组织架构 -->
-        <el-sub-menu :index="item.name" v-if="item.name == 'user'">
+        <el-sub-menu index="users" v-if="item.name == 'users'">
           <template #title>
             <img
               v-if="
@@ -303,21 +303,26 @@ onBeforeMount(() => {
       });
     }
     // 房型管理
-    else if (i.path == "roomType") {
-      roles.push({
-        name: "roomType",
-        meta: { isAuth: true, title: "房型管理", sign: "roomTypes" },
-        children: [
-          {
-            name: "roomType",
-            meta: { isAuth: true, title: "房型管理" },
-          },
-          {
-            name: "roomPrice",
-            meta: { isAuth: true, title: "房价管理" },
-          },
-        ],
-      });
+    else if (i.path == "roomType" || i.path == "roomPrice") {
+      let flag=roles.some(item=>{
+        return item.name=='roomTypes'
+      })
+      if(!flag){
+        roles.push({
+          name: "roomTypes",
+          meta: { isAuth: true, title: "房型管理", sign: "roomTypes" },
+          children: [
+            // {
+            //   name: "roomType",
+            //   meta: { isAuth: true, title: "房型管理" },
+            // },
+            // {
+            //   name: "roomPrice",
+            //   meta: { isAuth: true, title: "房价管理" },
+            // },
+          ],
+        });
+      }
     }
     // 订单管理
     else if (i.path == "order") {
@@ -327,21 +332,26 @@ onBeforeMount(() => {
       });
     }
     // 授权管理
-    else if (i.path == "class") {
-      roles.push({
-        name: "class",
-        meta: { isAuth: true, title: "授权管理", sign: "classs" },
-        children: [
-          {
-            name: "class",
-            meta: { isAuth: true, title: "课表管理" },
-          },
-          {
-            name: "process",
-            meta: { isAuth: true, title: "流程管理" },
-          },
-        ],
-      });
+    else if (i.path == "class"  || i.path == "process") {
+      let flag=roles.some(item=>{
+        return item.name=='classs'
+      })
+      if(!flag){
+        roles.push({
+          name: "classs",
+          meta: { isAuth: true, title: "授权管理", sign: "classs" },
+          children: [
+            // {
+            //   name: "class",
+            //   meta: { isAuth: true, title: "课表管理" },
+            // },
+            // {
+            //   name: "process",
+            //   meta: { isAuth: true, title: "流程管理" },
+            // },
+          ],
+        });
+      }
     }
     // 统计报表
     else if (i.path == "statement") {
@@ -351,38 +361,48 @@ onBeforeMount(() => {
       });
     }
     // 设备管理
-    else if (i.path == "doorLock") {
-      roles.push({
-        name: "doorLock",
-        meta: { isAuth: true, title: "设备管理", sign: "doorLocks" },
-        children: [
-          {
-            name: "doorLock",
-            meta: { isAuth: true, title: "门锁管理" },
-          },
-          {
-            name: "meter",
-            meta: { isAuth: true, title: "水电表管理" },
-          },
-        ],
-      });
+    else if (i.path == "doorLock" || i.path == "meter") {
+      let flag=roles.some(item=>{
+        return item.name=='doorLocks'
+      })
+      if(!flag){
+        roles.push({
+          name: "doorLocks",
+          meta: { isAuth: true, title: "设备管理", sign: "doorLocks" },
+          children: [
+            // {
+            //   name: "doorLock",
+            //   meta: { isAuth: true, title: "门锁管理" },
+            // },
+            // {
+            //   name: "meter",
+            //   meta: { isAuth: true, title: "水电表管理" },
+            // },
+          ],
+        });
+      }
     }
-    // 组织架构
-    else if (i.path == "user") {
-      roles.push({
-        name: "user",
-        meta: { isAuth: true, title: "组织架构", sign: "roomTypes" },
-        children: [
-          {
-            name: "user",
-            meta: { isAuth: true, title: "用户管理" },
-          },
-          {
-            name: "userRoles",
-            meta: { isAuth: true, title: "用户角色" },
-          },
-        ],
-      });
+    // 组织架构 
+    else if (i.path == "user" || i.path == "userRoles") {
+      let flag=roles.some(item=>{
+        return item.name=='users'
+      })
+      if(!flag){
+        roles.push({
+          name: "users",
+          meta: { isAuth: true, title: "组织架构", sign: "roomTypes" },
+          children: [
+            // {
+            //   name: "user",
+            //   meta: { isAuth: true, title: "用户管理" },
+            // },
+            // {
+            //   name: "userRoles",
+            //   meta: { isAuth: true, title: "用户角色" },
+            // },
+          ],
+        });
+      }
     }
     // 账号管理
     else if (i.path == "account") {
@@ -399,6 +419,97 @@ onBeforeMount(() => {
       });
     }
   });
+  let roleArr=[]
+  arr.forEach(i=>{
+    //房型管理  房型管理
+    if(i.path == "roomType"){
+      roles.forEach(item=>{
+        if(item.name=='roomTypes'){
+          item.children.push( {
+            name: "roomType",
+            meta: { isAuth: true, title: "房型管理" },
+          },)
+        }
+      })
+    }
+    //房型管理  房价管理
+    else if(i.path == "roomPrice"){
+      roles.forEach(item=>{
+        if(item.name=='roomTypes'){
+          item.children.push( {
+            name: "roomPrice",
+            meta: { isAuth: true, title: "房价管理" },
+          },)
+        }
+      })
+    }
+    //授权管理  课表管理
+    else if(i.path == "class"){
+      roles.forEach(item=>{
+        if(item.name=='classs'){
+          item.children.push( {
+            name: "class",
+            meta: { isAuth: true, title: "课表管理" },
+          },)
+        }
+      })
+    }
+    //授权管理  流程管理
+    else if(i.path == "process"){
+      roles.forEach(item=>{
+        if(item.name=='classs'){
+          item.children.push( {
+            name: "process",
+            meta: { isAuth: true, title: "流程管理" },
+          },)
+        }
+      })
+    }
+    //设备管理  门锁管理
+    else if(i.path == "doorLock"){
+      roles.forEach(item=>{
+        if(item.name=='doorLocks'){
+          item.children.push( {
+            name: "doorLock",
+            meta: { isAuth: true, title: "门锁管理" },
+          },)
+        }
+      })
+    }
+    //设备管理  水电表管理
+    else if(i.path == "meter"){
+      roles.forEach(item=>{
+        if(item.name=='doorLocks'){
+          item.children.push( {
+            name: "meter",
+            meta: { isAuth: true, title: "水电表管理" },
+          },)
+        }
+      })
+    }
+    //组织架构  用户管理
+    else if(i.path == "user"){
+      roles.forEach(item=>{
+        if(item.name=='users'){
+          item.children.push( {
+            name: "user",
+            meta: { isAuth: true, title: "用户管理" },
+          },)
+        }
+      })
+    }
+    //组织架构  用户角色
+    else if(i.path == "userRoles"){
+      roles.forEach(item=>{
+        if(item.name=='users'){
+          item.children.push( {
+            name: "userRoles",
+            meta: { isAuth: true, title: "用户角色" },
+          },)
+        }
+      })
+    }
+  })
   roleData.value = roles;
   console.log(roleData.value,"整理后的路由");
 });

+ 268 - 134
src/store/modules/user.js

@@ -288,11 +288,6 @@ const mutations = {
     let arrFlag = {};
     ress.data.data.forEach((i) => {
       if (i.name == "房态管理") {
-        roleList.push({
-          name: "房态管理",
-          path: "roomStatus",
-          route: "/hotel/roomStatus",
-        });
         let roomStatus = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "预定") {
@@ -317,16 +312,28 @@ const mutations = {
             roomStatus.huanfang = j.status;
           } else if (j.functionPoint == "开房") {
             roomStatus.kaifang = j.status;
+          } else if (j.functionPoint == "开电") {
+            roomStatus.kaidian = j.status;
+          } else if (j.functionPoint == "关电") {
+            roomStatus.guandian = j.status;
+          } else if (j.functionPoint == "取消预定") {
+            roomStatus.quxiaoyuding = j.status;
+          } else if (j.functionPoint == "取消维修") {
+            roomStatus.quxiaoweixiu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            roomStatus.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "房态管理",
+                path: "roomStatus",
+                route: "/hotel/roomStatus",
+              });
+            }
           }
         });
         arrFlag.roomStatus = roomStatus;
         // sessionStorage.setItem("roomStatus", JSON.stringify(roomStatus));
       } else if (i.name == "房型管理") {
-        roleList.push({
-          name: "房型管理",
-          path: "roomType",
-          route: "/hotel/roomType",
-        });
         let roomType = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "添加") {
@@ -339,32 +346,40 @@ const mutations = {
             roomType.pilianggaijia = j.status;
           } else if (j.functionPoint == "改价记录") {
             roomType.gaijiajilu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            roomType.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "房型管理",
+                path: "roomType",
+                route: "/hotel/roomType",
+              });
+            }
           }
         });
         arrFlag.roomType = roomType;
         // sessionStorage.setItem("roomType", JSON.stringify(roomType));
       } else if (i.name == "房价管理") {
-        roleList.push({
-          name: "房价管理",
-          path: "roomPrice",
-          route: "/hotel/roomPrice",
-        });
         let roomPrice = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "批量改价") {
             roomPrice.pilianggaijia = j.status;
           } else if (j.functionPoint == "改价记录") {
             roomPrice.gaijiajilu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            roomPrice.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "房价管理",
+                path: "roomPrice",
+                route: "/hotel/roomPrice",
+              });
+            }
           }
         });
         arrFlag.roomPrice = roomPrice;
         // sessionStorage.setItem("roomPrice", JSON.stringify(roomPrice));
       } else if (i.name == "订单管理") {
-        roleList.push({
-          name: "订单管理",
-          path: "order",
-          route: "/hotel/order",
-        });
         let order = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "取消") {
@@ -381,32 +396,40 @@ const mutations = {
             order.huanfang = j.status;
           } else if (j.functionPoint == "导出") {
             order.daochu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            order.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "订单管理",
+                path: "order",
+                route: "/hotel/order",
+              });
+            }
           }
         });
         arrFlag.order = order;
         // sessionStorage.setItem("order", JSON.stringify(order));
       } else if (i.name == "课表管理") {
-        roleList.push({
-          name: "课表管理",
-          path: "class",
-          route: "/hotel/class",
-        });
         let classs = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "导入值班") {
             classs.daoruzhiban = j.status;
           } else if (j.functionPoint == "导出") {
             classs.daochu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            classs.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "课表管理",
+                path: "class",
+                route: "/hotel/class",
+              });
+            }
           }
         });
         arrFlag.classs = classs;
         // sessionStorage.setItem("classs", JSON.stringify(classs));
       } else if (i.name == "流程管理") {
-        roleList.push({
-          name: "流程管理",
-          path: "process",
-          route: "/hotel/process",
-        });
         let process = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "同意") {
@@ -415,30 +438,40 @@ const mutations = {
             process.bohui = j.status;
           } else if (j.functionPoint == "规则设置") {
             process.guizeshezhi = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            process.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "流程管理",
+                path: "process",
+                route: "/hotel/process",
+              });
+            }
           }
         });
         arrFlag.process = process;
         // sessionStorage.setItem("process", JSON.stringify(process));
       } else if (i.name == "统计报表") {
-        roleList.push({
-          name: "统计报表",
-          path: "statement",
-          route: "/hotel/statement",
-        });
         let statement = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "导出") {
             statement.daochu = j.status;
+          } else if (j.functionPoint == "详情") {
+            statement.xiangqing = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            statement.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "统计报表",
+                path: "statement",
+                route: "/hotel/statement",
+              });
+            }
           }
         });
         arrFlag.statement = statement;
         // sessionStorage.setItem("statement", JSON.stringify(statement));
       } else if (i.name == "门锁管理") {
-        roleList.push({
-          name: "门锁管理",
-          path: "doorLock",
-          route: "/hotel/doorLock",
-        });
         let doorLock = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "导入") {
@@ -453,32 +486,46 @@ const mutations = {
             doorLock.jiesuoshebei = j.status;
           } else if (j.functionPoint == "NFC设置") {
             doorLock.nfcshezhi = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            doorLock.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "门锁管理",
+                path: "doorLock",
+                route: "/hotel/doorLock",
+              });
+            }
           }
         });
         arrFlag.doorLock = doorLock;
         // sessionStorage.setItem("doorLock", JSON.stringify(doorLock));
       } else if (i.name == "水电表管理") {
-        roleList.push({
-          name: "水电表管理",
-          path: "meter",
-          route: "/hotel/meter",
-        });
         let meter = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "导出") {
             meter.daochu = j.status;
+          } else if (j.functionPoint == "添加") {
+            meter.tianjia = j.status;
+          } else if (j.functionPoint == "编辑") {
+            meter.bianji = j.status;
+          } else if (j.functionPoint == "删除") {
+            meter.shanchu = j.status;
           } else if (j.functionPoint == "导入") {
             meter.daoru = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            meter.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "水电表管理",
+                path: "meter",
+                route: "/hotel/meter",
+              });
+            }
           }
         });
         arrFlag.meter = meter;
         // sessionStorage.setItem("meter", JSON.stringify(meter));
       } else if (i.name == "用户管理") {
-        roleList.push({
-          name: "用户管理",
-          path: "user",
-          route: "/hotel/user",
-        });
         let user = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "添加") {
@@ -487,16 +534,20 @@ const mutations = {
             user.bianji = j.status;
           } else if (j.functionPoint == "删除") {
             user.shanchu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            user.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "用户管理",
+                path: "user",
+                route: "/hotel/user",
+              });
+            }
           }
         });
         arrFlag.user = user;
         // sessionStorage.setItem("user", JSON.stringify(user));
       } else if (i.name == "角色管理") {
-        roleList.push({
-          name: "角色管理",
-          path: "userRoles",
-          route: "/hotel/userRoles",
-        });
         let userRoles = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "添加") {
@@ -505,16 +556,20 @@ const mutations = {
             userRoles.bianji = j.status;
           } else if (j.functionPoint == "删除") {
             userRoles.shanchu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            userRoles.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "角色管理",
+                path: "userRoles",
+                route: "/hotel/userRoles",
+              });
+            }
           }
         });
         arrFlag.userRoles = userRoles;
         // sessionStorage.setItem("userRoles", JSON.stringify(userRoles));
       } else if (i.name == "账号管理") {
-        roleList.push({
-          name: "账号管理",
-          path: "account",
-          route: "/hotel/account",
-        });
         let account = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "添加") {
@@ -523,16 +578,20 @@ const mutations = {
             account.bianji = j.status;
           } else if (j.functionPoint == "删除") {
             account.shanchu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            account.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "账号管理",
+                path: "account",
+                route: "/hotel/account",
+              });
+            }
           }
         });
         arrFlag.account = account;
         // sessionStorage.setItem("account", JSON.stringify(account));
       } else if (i.name == "系统管理") {
-        roleList.push({
-          name: "系统管理",
-          path: "system",
-          route: "/hotel/system",
-        });
         let system = {};
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "退房设置") {
@@ -545,14 +604,23 @@ const mutations = {
             system.cuijiaoshezhi = j.status;
           } else if (j.functionPoint == "设施服务设置") {
             system.sheshifuwushezhi = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            system.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "系统管理",
+                path: "system",
+                route: "/hotel/system",
+              });
+            }
           }
         });
         arrFlag.system = system;
         // sessionStorage.setItem("system", JSON.stringify(system));
       }
     });
-    console.log(arrFlag,"按钮权限");
-    
+    console.log(arrFlag, "按钮权限");
+
     sessionStorage.setItem("roleList", JSON.stringify(roleList));
     sessionStorage.setItem("btnflag", JSON.stringify(arrFlag));
     // window.location.reload();
@@ -610,11 +678,6 @@ const actions = {
         let arrFlag = {};
         ress.data.data.forEach((i) => {
           if (i.name == "房态管理") {
-            roleList.push({
-              name: "房态管理",
-              path: "roomStatus",
-              route: "/hotel/roomStatus",
-            });
             let roomStatus = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "预定") {
@@ -639,16 +702,28 @@ const actions = {
                 roomStatus.huanfang = j.status;
               } else if (j.functionPoint == "开房") {
                 roomStatus.kaifang = j.status;
+              } else if (j.functionPoint == "开电") {
+                roomStatus.kaidian = j.status;
+              } else if (j.functionPoint == "关电") {
+                roomStatus.guandian = j.status;
+              } else if (j.functionPoint == "取消预定") {
+                roomStatus.quxiaoyuding = j.status;
+              } else if (j.functionPoint == "取消维修") {
+                roomStatus.quxiaoweixiu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                roomStatus.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "房态管理",
+                    path: "roomStatus",
+                    route: "/hotel/roomStatus",
+                  });
+                }
               }
             });
             arrFlag.roomStatus = roomStatus;
             // sessionStorage.setItem("roomStatus", JSON.stringify(roomStatus));
           } else if (i.name == "房型管理") {
-            roleList.push({
-              name: "房型管理",
-              path: "roomType",
-              route: "/hotel/roomType",
-            });
             let roomType = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "添加") {
@@ -661,32 +736,40 @@ const actions = {
                 roomType.pilianggaijia = j.status;
               } else if (j.functionPoint == "改价记录") {
                 roomType.gaijiajilu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                roomType.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "房型管理",
+                    path: "roomType",
+                    route: "/hotel/roomType",
+                  });
+                }
               }
             });
             arrFlag.roomType = roomType;
             // sessionStorage.setItem("roomType", JSON.stringify(roomType));
           } else if (i.name == "房价管理") {
-            roleList.push({
-              name: "房价管理",
-              path: "roomPrice",
-              route: "/hotel/roomPrice",
-            });
             let roomPrice = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "批量改价") {
                 roomPrice.pilianggaijia = j.status;
               } else if (j.functionPoint == "改价记录") {
                 roomPrice.gaijiajilu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                roomPrice.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "房价管理",
+                    path: "roomPrice",
+                    route: "/hotel/roomPrice",
+                  });
+                }
               }
             });
             arrFlag.roomPrice = roomPrice;
             // sessionStorage.setItem("roomPrice", JSON.stringify(roomPrice));
           } else if (i.name == "订单管理") {
-            roleList.push({
-              name: "订单管理",
-              path: "order",
-              route: "/hotel/order",
-            });
             let order = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "取消") {
@@ -703,32 +786,40 @@ const actions = {
                 order.huanfang = j.status;
               } else if (j.functionPoint == "导出") {
                 order.daochu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                order.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "订单管理",
+                    path: "order",
+                    route: "/hotel/order",
+                  });
+                }
               }
             });
             arrFlag.order = order;
             // sessionStorage.setItem("order", JSON.stringify(order));
           } else if (i.name == "课表管理") {
-            roleList.push({
-              name: "课表管理",
-              path: "class",
-              route: "/hotel/class",
-            });
             let classs = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "导入值班") {
                 classs.daoruzhiban = j.status;
               } else if (j.functionPoint == "导出") {
                 classs.daochu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                classs.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "课表管理",
+                    path: "class",
+                    route: "/hotel/class",
+                  });
+                }
               }
             });
             arrFlag.classs = classs;
             // sessionStorage.setItem("classs", JSON.stringify(classs));
           } else if (i.name == "流程管理") {
-            roleList.push({
-              name: "流程管理",
-              path: "process",
-              route: "/hotel/process",
-            });
             let process = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "同意") {
@@ -737,36 +828,44 @@ const actions = {
                 process.bohui = j.status;
               } else if (j.functionPoint == "规则设置") {
                 process.guizeshezhi = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                process.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "流程管理",
+                    path: "process",
+                    route: "/hotel/process",
+                  });
+                }
               }
             });
             arrFlag.process = process;
             // sessionStorage.setItem("process", JSON.stringify(process));
           } else if (i.name == "统计报表") {
-            roleList.push({
-              name: "统计报表",
-              path: "statement",
-              route: "/hotel/statement",
-            });
             let statement = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "导出") {
                 statement.daochu = j.status;
+              } else if (j.functionPoint == "详情") {
+                statement.xiangqing = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                statement.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "统计报表",
+                    path: "statement",
+                    route: "/hotel/statement",
+                  });
+                }
               }
             });
             arrFlag.statement = statement;
             // sessionStorage.setItem("statement", JSON.stringify(statement));
           } else if (i.name == "门锁管理") {
-            roleList.push({
-              name: "门锁管理",
-              path: "doorLock",
-              route: "/hotel/doorLock",
-            });
             let doorLock = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "导入") {
                 doorLock.daoru = j.status;
-              } else if (j.functionPoint == "禁用门锁") {
-                doorLock.jinyongmensuo = j.status;
               } else if (j.functionPoint == "钥匙管理") {
                 doorLock.yaoshiguanli = j.status;
               } else if (j.functionPoint == "消息列表") {
@@ -777,32 +876,46 @@ const actions = {
                 doorLock.jiesuoshebei = j.status;
               } else if (j.functionPoint == "NFC设置") {
                 doorLock.nfcshezhi = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                doorLock.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "门锁管理",
+                    path: "doorLock",
+                    route: "/hotel/doorLock",
+                  });
+                }
               }
             });
             arrFlag.doorLock = doorLock;
             // sessionStorage.setItem("doorLock", JSON.stringify(doorLock));
           } else if (i.name == "水电表管理") {
-            roleList.push({
-              name: "水电表管理",
-              path: "meter",
-              route: "/hotel/meter",
-            });
             let meter = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "导出") {
                 meter.daochu = j.status;
+              } else if (j.functionPoint == "添加") {
+                meter.tianjia = j.status;
+              } else if (j.functionPoint == "编辑") {
+                meter.bianji = j.status;
+              } else if (j.functionPoint == "删除") {
+                meter.shanchu = j.status;
               } else if (j.functionPoint == "导入") {
                 meter.daoru = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                meter.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "水电表管理",
+                    path: "meter",
+                    route: "/hotel/meter",
+                  });
+                }
               }
             });
             arrFlag.meter = meter;
             // sessionStorage.setItem("meter", JSON.stringify(meter));
           } else if (i.name == "用户管理") {
-            roleList.push({
-              name: "用户管理",
-              path: "user",
-              route: "/hotel/user",
-            });
             let user = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "添加") {
@@ -811,16 +924,20 @@ const actions = {
                 user.bianji = j.status;
               } else if (j.functionPoint == "删除") {
                 user.shanchu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                user.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "用户管理",
+                    path: "user",
+                    route: "/hotel/user",
+                  });
+                }
               }
             });
             arrFlag.user = user;
             // sessionStorage.setItem("user", JSON.stringify(user));
           } else if (i.name == "角色管理") {
-            roleList.push({
-              name: "角色管理",
-              path: "userRoles",
-              route: "/hotel/userRoles",
-            });
             let userRoles = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "添加") {
@@ -829,16 +946,20 @@ const actions = {
                 userRoles.bianji = j.status;
               } else if (j.functionPoint == "删除") {
                 userRoles.shanchu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                userRoles.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "角色管理",
+                    path: "userRoles",
+                    route: "/hotel/userRoles",
+                  });
+                }
               }
             });
             arrFlag.userRoles = userRoles;
             // sessionStorage.setItem("userRoles", JSON.stringify(userRoles));
           } else if (i.name == "账号管理") {
-            roleList.push({
-              name: "账号管理",
-              path: "account",
-              route: "/hotel/account",
-            });
             let account = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "添加") {
@@ -847,16 +968,20 @@ const actions = {
                 account.bianji = j.status;
               } else if (j.functionPoint == "删除") {
                 account.shanchu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                account.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "账号管理",
+                    path: "account",
+                    route: "/hotel/account",
+                  });
+                }
               }
             });
             arrFlag.account = account;
             // sessionStorage.setItem("account", JSON.stringify(account));
           } else if (i.name == "系统管理") {
-            roleList.push({
-              name: "系统管理",
-              path: "system",
-              route: "/hotel/system",
-            });
             let system = {};
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "退房设置") {
@@ -869,6 +994,15 @@ const actions = {
                 system.cuijiaoshezhi = j.status;
               } else if (j.functionPoint == "设施服务设置") {
                 system.sheshifuwushezhi = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                system.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "系统管理",
+                    path: "system",
+                    route: "/hotel/system",
+                  });
+                }
               }
             });
             arrFlag.system = system;

+ 318 - 267
src/views/account/account.vue

@@ -4,280 +4,289 @@
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
       <span class="cameratxt">账号管理</span>
     </div>
-    <div class="middle">
-      <div class="filter">
-        <div class="condition">
-          <span>状态 </span>
-          <el-select
-            style="width: 180px"
-            v-model="searchInput.status"
-            class="m-2"
-            placeholder="选择状态"
+    <div class="scroll">
+      <div class="middle">
+        <div class="filter">
+          <div class="condition">
+            <span>状态 </span>
+            <el-select
+              style="width: 180px"
+              v-model="searchInput.status"
+              class="m-2"
+              placeholder="选择状态"
+            >
+              <el-option label="全部" value="" />
+              <el-option label="正常" value="1" />
+              <el-option label="冻结" value="2" />
+            </el-select>
+          </div>
+          <div class="condition">
+            <span>真实姓名 </span>
+            <el-input
+              clearable
+              v-model="searchInput.name"
+              class="w-50 m-2"
+              placeholder="请输入姓名"
+              style="width: 180px"
+              @clear="searchBtn"
+            />
+          </div>
+          <div class="condition">
+            <span>创建日期 </span>
+            <el-date-picker
+              v-model="searchInput.createTime"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="起始时间"
+              end-placeholder="结束时间"
+              format="YYYY-MM-DD"
+              value-format="YYYY-MM-DD"
+              :prefix-icon="Calendar"
+              placeholder="请选择日期"
+              style="width: 240px"
+            />
+          </div>
+
+          <el-button
+            style="margin-left: 20px"
+            color="rgba(0, 97, 255, 1)"
+            type="primary"
+            class="search"
+            @click="searchBtn"
+            ><el-icon><Search /></el-icon> <span>查询</span></el-button
           >
-            <el-option label="全部" value="" />
-            <el-option label="正常" value="1" />
-            <el-option label="冻结" value="2" />
-          </el-select>
-        </div>
-        <div class="condition">
-          <span>真实姓名 </span>
-          <el-input
-            clearable
-            v-model="searchInput.name"
-            class="w-50 m-2"
-            placeholder="请输入姓名"
-            style="width: 180px"
-            @clear="searchBtn"
-          />
         </div>
-        <div class="condition">
-          <span>创建日期 </span>
-          <el-date-picker
-            v-model="searchInput.createTime"
-            type="daterange"
-            range-separator="-"
-            start-placeholder="起始时间"
-            end-placeholder="结束时间"
-            format="YYYY-MM-DD"
-            value-format="YYYY-MM-DD"
-            :prefix-icon="Calendar"
-            placeholder="请选择日期"
-            style="width: 240px"
-          />
+        <!-- 按钮列表 -->
+        <div class="gongneng">
+          <el-button type="primary" v-if="flagBtn.tianjia==1" color="rgba(0, 97, 255, 1)" @click="addlist"
+            >添加</el-button
+          >
         </div>
-
-        <el-button
-          style="margin-left: 20px"
-          color="rgba(0, 97, 255, 1)"
-          type="primary"
-          class="search"
-          @click="searchBtn"
-          ><el-icon><Search /></el-icon> <span>查询</span></el-button
-        >
       </div>
-      <!-- 按钮列表 -->
-      <div class="gongneng">
-        <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
-          >添加</el-button
+      <div class="footer" v-loading="loading">
+        <el-table
+          :row-class-name="tableRowClassName"
+          :data="tableData.list"
+          @selection-change="handleSelectionChange"
+          style="width: 100%"
+          :header-cell-style="{
+            background: 'rgba(240, 243, 247, 1)',
+            height: '50px',
+            border: 0,
+          }"
         >
-      </div>
-    </div>
-    <div class="footer" v-loading="loading">
-      <el-table
-        :row-class-name="tableRowClassName"
-        :data="tableData.list"
-        @selection-change="handleSelectionChange"
-        style="width: 100%"
-        :header-cell-style="{
-          background: 'rgba(240, 243, 247, 1)',
-          height: '50px',
-          border: 0,
-        }"
-      >
-        <!-- <el-table-column align="center" type="selection" width="80" /> -->
-        <el-table-column
-          width="120"
-          align="center"
-          label="序号"
-          type="index"
-          index="1"
-        />
-        <el-table-column align="center" prop="userNumber" label="账号" />
-        <el-table-column align="center" prop="adminName" label="角色">
-          <template #default="{ row }">
-            <span>{{ row.adminMenuName }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column align="center" prop="name" label="真实姓名" />
-        <el-table-column align="center" prop="phoneNumber" label="手机号码" />
-        <el-table-column align="center" prop="department" label="身份">
-          <template #default="{ row }">
-              <span v-if="row.department==0">其他</span>
-              <span v-if="row.department==1">学生</span>
-              <span v-if="row.department==4">教职工</span>
-              <span v-if="row.department==5">校友</span>
+          <!-- <el-table-column align="center" type="selection" width="80" /> -->
+          <el-table-column
+            width="120"
+            align="center"
+            label="序号"
+            type="index"
+            index="1"
+          />
+          <el-table-column align="center" prop="userNumber" label="账号" />
+          <el-table-column align="center" prop="adminName" label="角色">
+            <template #default="{ row }">
+              <span>{{ row.adminMenuName }}</span>
             </template>
-        </el-table-column>
-        <el-table-column align="center" prop="createTime" label="创建时间" />
-
-        <el-table-column align="center" label="操作" width="180">
-          <template #default="scope">
-            <div class="options">
-              <div class="look" @click="edit(scope.row)">编辑</div>
-              <el-popconfirm
-                width="220"
-                confirm-button-text="确认"
-                cancel-button-text="取消"
-                :icon="InfoFilled"
-                icon-color="#f89626"
-                title="是否删除此账号?"
-                @confirm="del(scope.row)"
-                @cancel="cancelEvent"
-              >
-                <template #reference>
-                  <div class="del">删除</div>
-                </template>
-              </el-popconfirm>
-            </div>
-          </template>
-        </el-table-column>
-      </el-table>
+          </el-table-column>
+          <el-table-column align="center" prop="name" label="真实姓名" />
+          <el-table-column align="center" prop="phoneNumber" label="手机号码" />
+          <el-table-column align="center" prop="department" label="身份">
+            <template #default="{ row }">
+              <span v-if="row.department == 0">其他</span>
+              <span v-if="row.department == 1">学生</span>
+              <span v-if="row.department == 4">教职工</span>
+              <span v-if="row.department == 5">校友</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="createTime" label="创建时间" />
 
-      <!-- 添加账号弹窗 -->
-      <el-dialog
-        class="addStaff"
-        v-model="addDialogVisible"
-        :close-on-click-modal="false"
-        :close-on-press-escape="false"
-        :title="dialongTitle"
-        align-center
-        width="609"
-        :before-close="cancelAdd"
-      >
-        <el-form
-          ref="ruleFormRef"
-          :model="ruleForm"
-          :rules="rules"
-          label-width="100px"
-          class="demo-ruleForm"
-          :size="formSize"
-          label-position="left"
-          status-icon
+          <el-table-column align="center" label="操作" width="180">
+            <template #default="scope">
+              <div class="options">
+                <div v-if="flagBtn.bianji==1" class="look" @click="edit(scope.row)">编辑</div>
+                <el-popconfirm
+                  v-if="flagBtn.shanchu==1"
+                  width="220"
+                  confirm-button-text="确认"
+                  cancel-button-text="取消"
+                  :icon="InfoFilled"
+                  icon-color="#f89626"
+                  title="是否删除此账号?"
+                  @confirm="del(scope.row)"
+                  @cancel="cancelEvent"
+                >
+                  <template #reference>
+                    <div class="del">删除</div>
+                  </template>
+                </el-popconfirm>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页组件 -->
+        <div class="pageSize">
+          <span></span>
+          <el-pagination
+            background
+            :current-page="currentPage"
+            :page-size="pageSize"
+            layout="total, prev, pager, next, jumper, slot"
+            :total="total"
+            @update:current-page="handleCurrentChange"
+          />
+        </div>
+        <!-- 添加账号弹窗 -->
+        <el-dialog
+          class="addStaff"
+          v-model="addDialogVisible"
+          :close-on-click-modal="false"
+          :close-on-press-escape="false"
+          :title="dialongTitle"
+          align-center
+          width="609"
+          :before-close="cancelAdd"
         >
-          <el-form-item label="微校卡号 :" prop="cardNum">
-            <!-- <el-input
+          <el-form
+            ref="ruleFormRef"
+            :model="ruleForm"
+            :rules="rules"
+            label-width="100px"
+            class="demo-ruleForm"
+            :size="formSize"
+            label-position="left"
+            status-icon
+          >
+            <el-form-item label="微校卡号 :" prop="cardNum">
+              <!-- <el-input
               v-model="ruleForm.cardNum"
               placeholder="请输入微校卡号"
               clearable
               :disabled="dialongTitle == '编辑信息'"
             /> -->
-            <el-select
-              v-model="ruleForm.cardNum"
-              popper-class="more-tag-data"
-              filterable
-              remote
-              :remote-method="conteactMethod"
-              placeholder="请选择微校卡号"
-              style="width: 200px"
-              @change="schoolCardChange"
-            >
-              <el-option
-                v-for="item in schoolCardList"
-                :key="item.id"
-                :label="item.cardNumber"
-                :value="item.cardNumber"
+              <el-select
+                v-model="ruleForm.cardNum"
+                popper-class="more-tag-data"
+                filterable
+                remote
+                :remote-method="conteactMethod"
+                placeholder="请选择微校卡号"
+                style="width: 200px"
+                @change="schoolCardChange"
               >
-                <span style="float: left">{{
-                  `${item.userName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;部门:${item.department}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 微校卡号:${item.cardNumber}`
-                }}</span>
-              </el-option>
-              <template #footer>
-                <div class="addStudentMore">
-                  <el-button
-                    v-if="
-                      schoolCardPage < schoolCardTotalPage &&
-                      schoolCardTotalPage != 0
-                    "
-                    @click="addschoolCardListMore"
-                    >加载更多+</el-button
-                  >
-                </div>
-              </template>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="姓名 :" prop="corpnName">
-            <el-input
-              v-model="ruleForm.corpnName"
-              placeholder="请输入姓名"
-              clearable
-            />
-          </el-form-item>
-          <el-form-item label="手机号码 :" prop="corpnPhone">
-            <el-input
-              v-model="ruleForm.corpnPhone"
-              placeholder="请输入手机号码"
-              clearable
-            />
-          </el-form-item>
-          <el-form-item label="用户名 :" prop="adminName">
-            <el-input
-              v-model="ruleForm.adminName"
-              placeholder="请输入用户名"
-              clearable
-            />
-          </el-form-item>
-          <el-form-item label="密码 :" prop="password">
-            <el-input
-              v-model="ruleForm.password"
-              placeholder="请输入密码"
-              clearable
-            />
-          </el-form-item>
-          <!-- <el-form-item label="确认密码 :" prop="againPass">
-            <el-input
-              v-model="ruleForm.againPass"
-              placeholder="请再一次输入密码"
-              clearable
-            />
-          </el-form-item> -->
-          <el-form-item label="角色 :" prop="adminMenuId">
-            <el-tree
-              style="max-width: 600px"
-              :data="roleData"
-              ref="editMemberTree"
-              show-checkbox
-              default-expand-all
-              check-strictly
-              node-key="id"
-              :props="defaultProps"
-              @check="editMemberCheckChange"
-            />
-          </el-form-item>
-          <el-form-item label="身份 :" prop="department">
-            <!-- <el-input
+                <el-option
+                  v-for="item in schoolCardList"
+                  :key="item.id"
+                  :label="item.cardNumber"
+                  :value="item.cardNumber"
+                >
+                  <div style="float: left">
+                    <span style="display:inline-block;width: 80px;">{{ item.userName }}</span>
+                    <span style="display:inline-block;width: 120px;">部门 : {{ item.departmentName }}</span>
+                    <span >微校卡号 : {{ item.cardNumber }}</span>
+                  </div>
+                </el-option>
+                <template #footer>
+                  <div class="addStudentMore">
+                    <el-button
+                      v-if="
+                        schoolCardPage < schoolCardTotalPage &&
+                        schoolCardTotalPage != 0
+                      "
+                      @click="addschoolCardListMore"
+                      >加载更多+</el-button
+                    >
+                  </div>
+                </template>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="姓名 :" prop="corpnName">
+              <el-input
+                v-model="ruleForm.corpnName"
+                placeholder="请输入姓名"
+                clearable
+                :disabled="true"
+              />
+            </el-form-item>
+            <el-form-item label="身份 :" prop="department">
+              <!-- <el-input
               v-model="ruleForm.department"
               placeholder="请输入部门"
               clearable
             /> -->
-            <el-select
-              style="width: 200px"
-              v-model="ruleForm.department"
-              class="m-2"
-              placeholder="请选择身份"
-            >
+              <el-select
+                style="width: 200px"
+                v-model="ruleForm.department"
+                class="m-2"
+                placeholder="请选择身份"
+                :disabled="true"
+              >
               <el-option label="学生" value="1" />
               <el-option label="教职工" value="4" />
               <el-option label="校友" value="5" />
+              <el-option label="访客应用身份" value="6" />
+              <el-option label="临时人员" value="7" />
               <el-option label="其他" value="0" />
-            </el-select>
-          </el-form-item>
-
-          <el-form-item class="options">
-            <el-button
-              color="rgba(0, 97, 255, 1)"
-              class="queding"
-              type="primary"
-              @click="submitAdd(ruleFormRef)"
-            >
-              确定
-            </el-button>
-            <el-button @click="cancelAdd(ruleFormRef)">取消</el-button>
-          </el-form-item>
-        </el-form>
-      </el-dialog>
-    </div>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="手机号码 :" prop="corpnPhone">
+              <el-input
+                v-model="ruleForm.corpnPhone"
+                placeholder="请输入手机号码"
+                clearable
+                :disabled="true"
+              />
+            </el-form-item>
+            <el-form-item label="用户名 :" prop="adminName">
+              <el-input
+                v-model="ruleForm.adminName"
+                placeholder="请输入用户名"
+                clearable
+              />
+            </el-form-item>
+            <el-form-item label="密码 :" prop="password">
+              <el-input
+                v-model="ruleForm.password"
+                placeholder="请输入密码"
+                clearable
+              />
+            </el-form-item>
+            <!-- <el-form-item label="确认密码 :" prop="againPass">
+            <el-input
+              v-model="ruleForm.againPass"
+              placeholder="请再一次输入密码"
+              clearable
+            />
+          </el-form-item> -->
+            <el-form-item label="角色 :" prop="adminMenuId">
+              <el-tree
+                style="max-width: 600px"
+                :data="roleData"
+                ref="editMemberTree"
+                show-checkbox
+                default-expand-all
+                check-strictly
+                node-key="id"
+                :props="defaultProps"
+                @check="editMemberCheckChange"
+              />
+            </el-form-item>
+           
 
-    <!-- 分页组件 -->
-    <div class="pageSize">
-      <span></span>
-      <el-pagination
-        background
-        :current-page="currentPage"
-        :page-size="pageSize"
-        layout="total, prev, pager, next, jumper, slot"
-        :total="total"
-        @update:current-page="handleCurrentChange"
-      />
+            <el-form-item class="options">
+              <el-button
+                color="rgba(0, 97, 255, 1)"
+                class="queding"
+                type="primary"
+                @click="submitAdd(ruleFormRef)"
+              >
+                确定
+              </el-button>
+              <el-button @click="cancelAdd(ruleFormRef)">取消</el-button>
+            </el-form-item>
+          </el-form>
+        </el-dialog>
+      </div>
     </div>
   </div>
 </template>
@@ -313,6 +322,7 @@ const searchInput = reactive({
   name: "",
   createTime: "",
 }); // 搜索按钮数据
+const flagBtn = ref(); // 按钮权限
 
 watch(
   () => searchInput.createTime,
@@ -360,9 +370,9 @@ var checkUserName = (rule, value, callback) => {
     return callback(new Error("请输入用户名)"));
   }
 
-  var reg = /^[a-zA-Z0-9]{6,16}$/;
+  var reg = /^[a-zA-Z0-9]{5,16}$/;
   if (!reg.test(value)) {
-    callback(new Error("必须为6-16个数字或字母!"));
+    callback(new Error("必须为5-16个数字或字母!"));
   } else {
     callback();
   }
@@ -455,7 +465,7 @@ const rules = reactive({
       message: "电话号码不能为空",
       trigger: "blur",
     },
-    { validator: checkPhone, trigger: "blur" },
+    // { validator: checkPhone, trigger: "blur" },
   ],
 
   // desc: [{ required: true, message: "Please input activity form", trigger: "blur" }],
@@ -514,6 +524,7 @@ const getList = async () => {
 };
 // 微校卡号数据
 const schoolData = async () => {
+  schoolCardPage.value=1
   let data = {
     permissionSettingId: sessionStorage.getItem("permissionSettingId"),
     page: schoolCardPage.value,
@@ -521,13 +532,13 @@ const schoolData = async () => {
     keyWord: schoolCardSearch.value,
   };
   let res = await axios({
-    method: "get",
+    method: "post",
     url: api.value + "/admin/getUsersPage",
     headers: {
       token: sessionStorage.getItem("token"),
       user_head: sessionStorage.getItem("user_head"),
     },
-    params: data,
+    data: data,
   });
   console.log(res, "微校卡号人");
   if (res.data.code == 200) {
@@ -560,13 +571,13 @@ const addschoolCardListMore = async () => {
       keyWord: schoolCardSearch.value,
     };
     let res = await axios({
-      method: "get",
+      method: "post",
       url: api.value + "/admin/getUsersPage",
       headers: {
         token: sessionStorage.getItem("token"),
         user_head: sessionStorage.getItem("user_head"),
       },
-      params: data,
+      data: data,
     });
     console.log(res, "微校卡号人员加载更多");
     if (res.data.code == 200) {
@@ -589,8 +600,37 @@ const addschoolCardListMore = async () => {
   }
 };
 // 改变微校卡号
-const schoolCardChange = (value) => {
+const schoolCardChange =async (value) => {
   console.log(value);
+  let data = {
+    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+    page: 1,
+    size: 20,
+    keyWord: value,
+  };
+  let res = await axios({
+    method: "post",
+    url: api.value + "/admin/getUsersPage",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+    data: data,
+  });
+  console.log(res, "微校卡号人");
+  if (res.data.code == 200) {
+    let resdata=res;
+    ruleForm.corpnName=res.data.data.records[0].userName
+    ruleForm.corpnPhone=res.data.data.records[0].phone
+    ruleForm.department=res.data.data.records[0].department
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
 };
 // 角色列表数据
 const roleList = async () => {
@@ -863,6 +903,10 @@ const handleCurrentChange = (value) => {
 
 onBeforeMount(() => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.account;
+  console.log(flagBtn.value, "按钮权限");
+
   getList();
   roleList();
   schoolData();
@@ -874,8 +918,8 @@ onUnmounted(() => {
 
 <style scoped lang="scss">
 .content-box {
-  width: 97.5%;
-  height: 89%;
+  width: calc(100% - 40px);
+  height: calc(100% - 105px);
   margin: 20px auto;
   background-color: #fff;
   color: #fff;
@@ -898,8 +942,14 @@ onUnmounted(() => {
       color: #4392f7;
     }
   }
+  .scroll{
+    width:calc(100% );
+    height: calc(100% - 61px);
+    display:flex;
+    flex-direction:column;
+  }
   .middle {
-    width: 96%;
+    width: calc(100% - 60px);
     margin: 0 auto;
 
     color: #000;
@@ -908,7 +958,7 @@ onUnmounted(() => {
       display: flex;
       flex-wrap: wrap;
       align-items: center;
-      margin: 10px 0 0 0;
+        // margin: 10px 0 0 0;
       .search {
         margin-left: 0 !important;
         color: #fff;
@@ -961,11 +1011,11 @@ onUnmounted(() => {
     }
   }
   .footer {
-    width: 96%;
-    height: 550px;
-    margin: 10px auto 30px;
+    width: calc(100% - 60px);
+    flex:1;
+    margin: 0 auto;
     .el-table--fit {
-      height: 100%;
+      height: calc(100% - 60px);
       :deep(.el-table__header-wrapper) {
         background-color: #000;
         font-size: 15px;
@@ -1056,6 +1106,7 @@ onUnmounted(() => {
     align-items: center;
     justify-content: space-between;
     margin: 0 30px;
+    height:60px;
 
     span {
       color: #000;

+ 9 - 3
src/views/class/class.vue

@@ -61,6 +61,7 @@
         <div class="filter">
           <div class="filter_block">
             <el-upload
+            v-if="flagBtn.daoruzhiban==1"
                 class="avatar-uploader"
                 action=""
                 :on-preview="handlePreview"
@@ -80,7 +81,7 @@
                   </div> -->
                 </template>
               </el-upload>
-            <el-button type="primary" @click="importExcel" plain>导出</el-button>
+            <el-button v-if="flagBtn.daochu==1" type="primary" @click="importExcel" plain>导出</el-button>
           </div>
         </div>
       </div>
@@ -159,6 +160,7 @@ import { useStore } from "vuex";
 const store = useStore();
 const api = ref("");
 const router = useRouter();
+const flagBtn = ref(); // 按钮权限
 // 表格数据(-----------------------------------)
 const loading = ref(false);
 const tableHead = ref(20); // 表头循环日期
@@ -259,9 +261,9 @@ const handleChange = async (file, fileLists) => {
 const handleUpload = async (file) => {
   console.log(file, "22222222");
   let data = new FormData();
-  data.set("file", file.file);
+  data.append("file", file.file);
   let res = await axios({
-    method: "get",
+    method: "post",
     url: api.value + "/class-schedule/uploadSchedule",
     headers: {
       token: sessionStorage.getItem("token"),
@@ -361,6 +363,10 @@ const handleCurrentChange2 = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.classs;
+  console.log(flagBtn.value, "按钮权限");
+
   const startTime=dayjs().format('YYYY-MM-DD');
   const endTime=dayjs(startTime).add(6,'day').format('YYYY-MM-DD')
   searchInput.createTime=[startTime,endTime]

+ 11 - 6
src/views/doorLock/doorLock.vue

@@ -28,6 +28,7 @@
               <span>查询</span></el-button
             >
             <el-button
+              v-if="flagBtn.daoru==1"
               style="margin-left: 20px"
               color="rgba(41, 109, 227, 1)"
               type="primary"
@@ -172,15 +173,15 @@
                         <img src="@/assets/icons/forbidden.png" alt="" />
                         <span>禁用门锁</span>
                       </div> -->
-                      <div @click="keyClick(i)">
+                      <div @click="keyClick(i)" v-if="flagBtn.daoru==1">
                         <img src="@/assets/icons/key.png" alt="" />
                         <span>钥匙管理</span>
                       </div>
-                      <div @click="newsClick(i)">
+                      <div @click="newsClick(i)" v-if="flagBtn.daoru==1">
                         <img src="@/assets/icons/news.png" alt="" />
                         <span>消息列表</span>
                       </div>
-                      <div @click="unlockingClick(i)">
+                      <div @click="unlockingClick(i)" v-if="flagBtn.daoru==1">
                         <img src="@/assets/icons/unlocking.png" alt="" />
                         <span>远程开锁</span>
                       </div>
@@ -190,7 +191,7 @@
                       </div> -->
                       <div
                         @click="bindingClick(i)"
-                        v-if="i.equipmentState != 1"
+                        v-if="i.equipmentState != 1 && flagBtn.daoru==1"
                       >
                         <img
                           class="deblocking"
@@ -201,7 +202,7 @@
                       </div>
                       <div
                         @click="deblockingClick(i)"
-                        v-if="i.equipmentState == 1"
+                        v-if="i.equipmentState == 1 && flagBtn.daoru==1"
                       >
                         <img
                           class="deblocking"
@@ -212,7 +213,7 @@
                       </div>
                       <div
                         @click="nfcClick(i,1)"
-                        v-if="nfcFunction==0"
+                        v-if="nfcFunction==0 && flagBtn.daoru==1"
                       >
                         <img
                           class="deblocking"
@@ -1405,6 +1406,7 @@ const store = useStore();
 const api = ref("");
 const router = useRouter();
 
+const flagBtn = ref(); // 按钮权限
 const nowDay = ref(dayjs().format("YYYY-MM-DD HH:mm:ss"));
 // 表格数据
 const loading = ref(false);
@@ -3418,6 +3420,9 @@ const handleCurrentChange = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.doorLock;
+  console.log(flagBtn.value, "按钮权限");
   roomNameTypeData();
   getList();
 });

+ 42 - 25
src/views/meter/meter.vue

@@ -4,7 +4,7 @@
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
       <span class="cameratxt">水电表管理</span>
     </div>
-    <div>
+    <div class="scroll">
       <div class="middle">
         <div class="filter">
           <div class="condition">
@@ -45,19 +45,22 @@
         </div>
         <!-- 按钮列表 -->
         <div class="gongneng">
-          <el-button
+          <el-button 
+            v-if="flagBtn.tianjia==1"
             type="primary"
             color="rgba(0, 97, 255, 1)"
             @click="addClick"
             ><span>添加</span></el-button
           >
           <el-button
+            v-if="flagBtn.daochu==1"
             @click="exportExcel"
             type="primary"
             color="rgba(0, 97, 255, 1)"
             ><span>导出</span></el-button
           >
           <el-upload
+            v-if="flagBtn.daoru==1"
             class="avatar-uploader"
             action=""
             :on-preview="handlePreview"
@@ -124,8 +127,9 @@
           <el-table-column align="center" label="操作" width="200">
             <template #default="scope">
               <div class="edit">
-                <div class="look" @click="editClick(scope.row)">编辑</div>
+                <div v-if="flagBtn.bianji==1" class="look" @click="editClick(scope.row)">编辑</div>
                 <el-popconfirm
+                  v-if="flagBtn.shanchu==1"
                   width="220"
                   confirm-button-text="确认"
                   cancel-button-text="取消"
@@ -143,6 +147,18 @@
             </template>
           </el-table-column>
         </el-table>
+         <!-- 分页组件 -->
+        <div class="pageSize">
+          <span></span>
+          <el-pagination
+            background
+            :current-page="currentPage"
+            :page-size="pageSize"
+            layout="total, prev, pager, next, jumper, slot"
+            :total="total"
+            @update:current-page="handleCurrentChange"
+          />
+        </div>
       </div>
 
       <!-- 编辑按钮 -->
@@ -246,19 +262,6 @@
           </el-form-item>
         </el-form>
       </el-dialog>
-
-      <!-- 分页组件 -->
-      <div class="pageSize">
-        <span></span>
-        <el-pagination
-          background
-          :current-page="currentPage"
-          :page-size="pageSize"
-          layout="total, prev, pager, next, jumper, slot"
-          :total="total"
-          @update:current-page="handleCurrentChange"
-        />
-      </div>
     </div>
     <div class="bgImg" v-if="bgImg">
       <el-carousel
@@ -297,6 +300,8 @@ import { useStore } from "vuex";
 const store = useStore();
 const api = ref("");
 const router = useRouter();
+
+const flagBtn = ref(); // 按钮权限
 // 表格数据
 const loading = ref(false);
 const tableData = reactive({
@@ -674,10 +679,11 @@ const handleChange = async (file, fileLists) => {
 const handleUpload = async (file) => {
   console.log(file, "22222222");
   let data = new FormData();
-  data.set("file", file.file);
+  data.append("file", file.file);
   let res = await axios({
     method: "post",
     url: api.value + "/house-number/importList",
+
     headers: {
       token: sessionStorage.getItem("token"),
       user_head: sessionStorage.getItem("user_head"),
@@ -767,6 +773,9 @@ const handleCurrentChange = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.meter;
+  console.log(flagBtn.value, "按钮权限");
   getList();
 });
 onUnmounted(() => {
@@ -776,8 +785,8 @@ onUnmounted(() => {
 
 <style scoped lang="scss">
 .content-box {
-  width: 97.5%;
-  height: 89%;
+  width: calc(100% - 40px);
+  height: calc(100% - 105px);
   margin: 20px auto;
   background-color: #fff;
   color: #fff;
@@ -806,8 +815,15 @@ onUnmounted(() => {
     }
   }
 
+  .scroll{
+    width:calc(100% );
+    height: calc(100% - 61px);
+    display:flex;
+    flex-direction:column;
+  }
+
   .middle {
-    width: 96%;
+    width: calc(100% - 60px);
     margin: 0 auto;
 
     color: #000;
@@ -839,7 +855,7 @@ onUnmounted(() => {
     }
 
     .gongneng {
-      margin: 10px 0 20px 0;
+      margin: 10px 0 10px 0;
       display:flex;
       span {
         color: #fff;
@@ -889,12 +905,12 @@ onUnmounted(() => {
   }
 
   .footer {
-    width: 96%;
-    height: 550px;
-    margin: 10px auto 30px;
+    width: calc(100% - 60px);
+    flex: 1;
+    margin: 0 auto;
 
     .el-table--fit {
-      height: 100%;
+      height: calc(100% - 60px);
 
       :deep(.el-table__header-wrapper) {
         background-color: #000;
@@ -1010,6 +1026,7 @@ onUnmounted(() => {
     align-items: center;
     justify-content: space-between;
     margin: 0 30px;
+    height: 60px;
 
     span {
       color: #000;

+ 22 - 27
src/views/order/order.vue

@@ -145,6 +145,7 @@
             <span>查询</span></el-button
           > -->
           <el-button
+            v-if="flagBtn.daochu==1"
             style="margin-left: 20px"
             color="rgba(41, 109, 227, 1)"
             type="primary"
@@ -331,7 +332,7 @@
               <div class="edit">
                 <!-- 取消订单 -->
                 <el-popconfirm
-                  v-if="scope.row.orderStart == 1"
+                  v-if="scope.row.orderStart == 1 && flagBtn.quxiao==1"
                   width="220"
                   confirm-button-text="确认"
                   cancel-button-text="取消"
@@ -363,16 +364,10 @@
                     <div class="look">退款</div>
                   </template>
                 </el-popconfirm> -->
-                <!-- 入住 -->
-                <span
-                  v-if="scope.row.orderStart == 3"
-                  style="cursor: pointer; margin: 0 10px"
-                  @click="orderliveRoom(scope.row)"
-                  >入住</span
-                >
+                
                 <!-- 退房 -->
                 <el-popconfirm
-                  v-if="scope.row.orderStart == 4"
+                  v-if="scope.row.orderStart == 4 && flagBtn.ruzhu==1"
                   width="220"
                   confirm-button-text="确认"
                   cancel-button-text="取消"
@@ -387,7 +382,7 @@
                 </el-popconfirm>
                 <!-- 退款 -->
                 <el-popconfirm
-                  v-if="scope.row.orderStart == 2 || scope.row.orderStart == 3"
+                  v-if="(scope.row.orderStart == 2 || scope.row.orderStart == 3) && flagBtn.tuikuan==1"
                   width="220"
                   confirm-button-text="确认"
                   cancel-button-text="取消"
@@ -402,35 +397,21 @@
                 </el-popconfirm>
                 <!-- 换房 -->
                 <span
-                  v-if="scope.row.orderStart == 4"
+                  v-if="scope.row.orderStart == 4 && flagBtn.huanfang==1"
                   style="cursor: pointer; margin: 0 10px"
                   @click="roomChangeClick(scope.row)"
                   >换房</span
                 >
-                <!-- 下发密码 -->
-                <!-- <el-popconfirm
-                  v-if="scope.row.orderStart == 4"
-                  width="220"
-                  confirm-button-text="确认"
-                  cancel-button-text="取消"
-                  :icon="InfoFilled"
-                  icon-color="#f89626"
-                  title="是否下发密码?"
-                  @confirm="orderCancel(scope.row)"
-                >
-                  <template #reference>
-                    <div class="look">下发密码</div>
-                  </template>
-                </el-popconfirm> -->
                 <!-- 入住 -->
                 <span
-                  v-if="scope.row.orderStart == 1 || scope.row.orderStart == 2"
+                  v-if="(scope.row.orderStart == 1 || scope.row.orderStart == 2 || scope.row.orderStart == 3) && flagBtn.ruzhu==1"
                   style="cursor: pointer; margin: 0 10px"
                   @click="orderliveRoom(scope.row)"
                   >入住</span
                 >
                 <!-- 详情 -->
                 <span
+                  v-if="flagBtn.xiangqing==1"
                   style="cursor: pointer; margin: 0 10px"
                   @click="orderInfoClick(scope.row)"
                   >详情</span
@@ -630,6 +611,7 @@
                     placeholder="请输入预订人"
                     clearable
                     style="width: 150px"
+                    :disabled="true"
                   />
                 </el-form-item>
                 <el-form-item label="手机号码 :" prop="phone">
@@ -638,6 +620,7 @@
                     placeholder="请输入手机号码"
                     clearable
                     style="width: 150px"
+                    :disabled="true"
                   />
                 </el-form-item>
               </div>
@@ -651,6 +634,7 @@
                     v-model="checkInRuleForm.type"
                     class="m-2"
                     placeholder="请选择类型"
+                    :disabled="true"
                     style="width: 150px"
                   >
                     <el-option label="全日房" :value="1" />
@@ -665,6 +649,7 @@
                       placeholder="选择预抵日期"
                       format="YYYY-MM-DD HH:mm:ss"
                       value-format="YYYY-MM-DD HH:mm:ss"
+                    :disabled="true"
                       style="width: 200px"
                     />
                   </div>
@@ -677,6 +662,7 @@
                       placeholder="选择预抵日期"
                       format="YYYY-MM-DD HH:mm:ss"
                       value-format="YYYY-MM-DD HH:mm:ss"
+                    :disabled="true"
                       style="width: 200px"
                     />
                   </div>
@@ -688,6 +674,7 @@
                       v-model="checkInRuleForm.roomPrice"
                       clearable
                       placeholder="请输入房价"
+                    :disabled="true"
                       style="width: 150px"
                     />
                   </div>
@@ -698,6 +685,7 @@
                       v-model="checkInRuleForm.dayNum"
                       placeholder="请输入预住天数"
                       clearable
+                    :disabled="true"
                       style="width: 150px"
                     />
                   </div>
@@ -925,6 +913,7 @@
                     v-model="payPriceRuleForm.order"
                     clearable
                     placeholder="请输入入住订单"
+                    :disabled="true"
                     style="width: 300px"
                   />
                 </div>
@@ -935,6 +924,7 @@
                     v-model="payPriceRuleForm.price"
                     clearable
                     placeholder="请输入金额"
+                    :disabled="true"
                     style="width: 300px"
                   />
                 </div>
@@ -1228,6 +1218,7 @@ const api = ref("");
 const router = useRouter();
 const flag = ref(true);
 
+const flagBtn = ref(); // 按钮权限
 const nowDay = ref(dayjs().format("YYYY-MM-DD HH:mm:ss"));
 // 表格数据
 const loading = ref(false);
@@ -2542,6 +2533,10 @@ const handleCurrentChange = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.order;
+  console.log(flagBtn.value, "按钮权限");
+
   flag.value = sessionStorage.getItem("isLogin");
   if (sessionStorage.getItem("isLogin") != 1) {
     getList();

+ 11 - 8
src/views/process/process.vue

@@ -14,6 +14,7 @@
       </div>
       <div
         class="changeItem"
+        v-if="flagBtn.guizeshezhi==1"
         :class="changeIndex == 2 ? 'changeItem_active' : ''"
         @click="changeItem(2)"
       >
@@ -188,7 +189,7 @@
               width="150"
             />
             <el-table-column align="center" prop="usersName" label="提交人" />
-            <el-table-column align="center" prop="changeUsersName" label="替课老师" />
+            <el-table-column align="center" width="120" prop="changeUsersName" label="替课老师" />
             <el-table-column
               align="center"
               prop="secondaryExamineAndApproveTime"
@@ -226,10 +227,10 @@
             />
             <el-table-column align="center" width="100" label="状态"
               ><template #default="{ row }">
-                <span v-if="row.status == 0">已拒绝</span>
+                <span v-if="row.status == 0" style="color:red;">已拒绝</span>
                 <span v-if="row.status == 1">待审批</span>
                 <span v-if="row.status == 2">处理中</span>
-                <span v-if="row.status == 3">已同意</span>
+                <span v-if="row.status == 3" style="color:green;">已同意</span>
               </template>
             </el-table-column>
             <el-table-column
@@ -240,8 +241,8 @@
             >
               <template #default="{ row }">
                 <div class="options">
-                  <div class="agree" v-if="row.status==1  || row.status==2" @click="agreeRemarksClick(row)">同意</div>
-                  <div class="reject" v-if="row.status==1 || row.status==2" @click="rejectRemarksClick(row)">
+                  <div class="agree" v-if="(row.status==1  || row.status==2) && flagBtn.tongyi==1" @click="agreeRemarksClick(row)">同意</div>
+                  <div class="reject" v-if="(row.status==1 || row.status==2) && flagBtn.bohui==1" @click="rejectRemarksClick(row)">
                     驳回
                   </div>
                 </div>
@@ -309,7 +310,7 @@
         </div>
       </el-dialog>
     </div>
-    <div v-if="changeIndex == 2" class="regulation">
+    <div v-if="changeIndex == 2 " class="regulation">
       <!-- <div class="condition">
         <span>可见范围&nbsp;&nbsp; </span>
         <el-select
@@ -365,7 +366,7 @@ import { useStore } from "vuex";
 const store = useStore();
 const api = ref("");
 const router = useRouter();
-
+const flagBtn = ref(); // 按钮权限
 const changeIndex = ref(1); // 申请记录 规则设置 切换
 
 const searchInput = reactive({
@@ -664,7 +665,9 @@ const handleCurrentChange = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
-  // departmentList();
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.process;
+  console.log(flagBtn.value, "按钮权限");
   getList();
   // changeItem(changeIndex.value);
 });

+ 9 - 2
src/views/roomPrice/roomPrice.vue

@@ -43,6 +43,7 @@
           </div>
           <div class="filter_block">
             <el-button
+              v-if="flagBtn.pilianggaijia==1"
               style="margin-left: 20px"
               color="rgba(0, 97, 255, 1)"
               type="primary"
@@ -51,6 +52,7 @@
               ><span>批量改价</span></el-button
             >
             <el-button
+              v-if="flagBtn.gaijiajilu==1"
               style="margin-left: 20px"
               color="rgba(0, 97, 255, 1)"
               type="primary"
@@ -417,6 +419,8 @@ import { useStore } from "vuex";
 const store = useStore();
 const api = ref("");
 const router = useRouter();
+
+const flagBtn = ref(); // 按钮权限
 // 表格数据(-----------------------------------)
 const loading = ref(false);
 const tableHead = ref([
@@ -640,7 +644,7 @@ const roomTypeChange = async (val) => {
   changePriceData.list = [];
   let res = await axios({
     method: "get",
-    url: api.value + "house-price/roomType",
+    url: api.value + "/house-price/roomType",
     headers: {
       token: sessionStorage.getItem("token"),
       user_head: sessionStorage.getItem("userhead"),
@@ -1031,12 +1035,15 @@ const handleCurrentChange2 = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.roomPrice;
+  console.log(flagBtn.value, "按钮权限");
   const data = {
     managerId: sessionStorage.getItem("token"),
   };
   let res = await axios({
     method: "get",
-    url: api.value + "house-price/roomType",
+    url: api.value + "/house-price/roomType",
     headers: {
       token: sessionStorage.getItem("token"),
       user_head: sessionStorage.getItem("userhead"),

+ 30 - 26
src/views/roomStatus/roomStatus.vue

@@ -9,14 +9,14 @@
       </div>
       <!-- 按钮列表 -->
       <div class="gongneng">
-        <el-dropdown>
+        <el-dropdown v-if="flagBtn.kaidian==1 || flagBtn.guandian==1">
           <el-button type="primary" color="rgba(41, 109, 227, 1)">
             批量控制电</el-button
           >
           <template #dropdown>
             <el-dropdown-menu>
-              <el-dropdown-item @click="clean(1)">批量开电</el-dropdown-item>
-              <el-dropdown-item @click="clean(2)">批量关电</el-dropdown-item>
+              <el-dropdown-item @click="clean(1)" v-if="flagBtn.kaidian==1">批量开电</el-dropdown-item>
+              <el-dropdown-item @click="clean(2)" v-if="flagBtn.guandian==1">批量关电</el-dropdown-item>
             </el-dropdown-menu>
           </template>
         </el-dropdown>
@@ -26,31 +26,31 @@
         <!-- <el-button type="primary" color="rgba(9, 101, 98, 1)" @click="addlist"
           ><el-icon><CirclePlus /></el-icon><span>批量开/关房</span></el-button
         > -->
-        <el-dropdown>
+        <el-dropdown v-if="flagBtn.kaifang==1 || flagBtn.guanfang==1">
           <el-button type="primary" color="rgba(41, 109, 227, 1)">
             <span>批量开/关房</span></el-button
           >
           <template #dropdown>
             <el-dropdown-menu>
-              <el-dropdown-item @click="roomClose(1)"
+              <el-dropdown-item @click="roomClose(1)" v-if="flagBtn.kaifang==1"
                 >批量开房</el-dropdown-item
               >
-              <el-dropdown-item @click="roomClose(2)"
+              <el-dropdown-item @click="roomClose(2)" v-if="flagBtn.guanfang==1"
                 >批量关房</el-dropdown-item
               >
             </el-dropdown-menu>
           </template>
         </el-dropdown>
-        <el-dropdown>
+        <el-dropdown v-if="flagBtn.zhijing==1 || flagBtn.zhizang==1">
           <el-button type="primary" color="rgba(41, 109, 227, 1)">
             <span>批量置脏/净</span></el-button
           >
           <template #dropdown>
             <el-dropdown-menu>
-              <el-dropdown-item @click="roomDirtyClose(1)"
+              <el-dropdown-item @click="roomDirtyClose(1)" v-if="flagBtn.zhizang==1"
                 >批量置脏</el-dropdown-item
               >
-              <el-dropdown-item @click="roomDirtyClose(2)"
+              <el-dropdown-item @click="roomDirtyClose(2)" v-if="flagBtn.zhijing==1"
                 >批量置净</el-dropdown-item
               >
             </el-dropdown-menu>
@@ -246,7 +246,7 @@
                       <div
                         class="setAside"
                         @click="setAside(i)"
-                        v-if="i.status == 2"
+                        v-if="i.status == 2 && flagBtn.zhijing==1"
                       >
                         <img src="@/assets/icons/setAside.png" alt="" />
                         <span>置净</span>
@@ -254,7 +254,7 @@
                       <div
                         class="setAside"
                         @click="mess(i)"
-                        v-if="i.status == 1"
+                        v-if="i.status == 1 && flagBtn.zhizang==1"
                       >
                         <img src="@/assets/icons/setAside.png" alt="" />
                         <span>置脏</span>
@@ -264,12 +264,12 @@
                       <div
                         class="setAside"
                         @click="setAside(i)"
-                        v-if="i.houseStatus == 2"
+                        v-if="i.houseStatus == 2 && flagBtn.zhijing==1"
                       >
                         <img src="@/assets/icons/setAside.png" alt="" />
                         <span>置净</span>
                       </div>
-                      <div class="setAside" @click="mess(i)" v-else>
+                      <div class="setAside" @click="mess(i)" v-else-if="i.houseStatus!=2 && flagBtn.zhizang==1">
                         <img src="@/assets/icons/setAside.png" alt="" />
                         <span>置脏</span>
                       </div>
@@ -286,15 +286,15 @@
                         </div>
                       </div>
                       <div class="rigths">
-                        <div @click="reserveClick(i)">
+                        <div @click="reserveClick(i)" v-if="flagBtn.yuding==1">
                           <img src="@/assets/icons/yuding.png" alt="" />
                           <span>预定</span>
                         </div>
-                        <div @click="maintainClick(i)">
+                        <div @click="maintainClick(i)" v-if="flagBtn.weixiu==1">
                           <img src="@/assets/icons/weixiu.png" alt="" />
                           <span>维修</span>
                         </div>
-                        <div @click="lockRoomClick(i)">
+                        <div @click="lockRoomClick(i)" v-if="flagBtn.suofang==1">
                           <img src="@/assets/icons/suofang.png" alt="" />
                           <span>锁房</span>
                         </div>
@@ -321,15 +321,15 @@
                         </div>
                       </div>
                       <div class="rigths">
-                        <div @click="reserveClick(i)">
+                        <div @click="reserveClick(i)" v-if="flagBtn.yuding==1">
                           <img src="@/assets/icons/yuding.png" alt="" />
                           <span>预定</span>
                         </div>
-                        <div @click="maintainClick(i)">
+                        <div @click="maintainClick(i)" v-if="flagBtn.weixiu==1">
                           <img src="@/assets/icons/weixiu.png" alt="" />
                           <span>维修</span>
                         </div>
-                        <div @click="lockRoomClick(i)">
+                        <div @click="lockRoomClick(i)" v-if="flagBtn.suofang==1">
                           <img src="@/assets/icons/suofang.png" alt="" />
                           <span>锁房</span>
                         </div>
@@ -447,11 +447,11 @@
                       </div>
                     </div>
                     <div class="rigths">
-                      <div @click="reserveClick(i)" v-if="i.roomType == 2">
+                      <div @click="reserveClick(i)" v-if="i.roomType == 2 && flagBtn.yuding==1">
                         <img src="@/assets/icons/yuding.png" alt="" />
                         <span>预定</span>
                       </div>
-                      <div @click="checkInClick(i)">
+                      <div @click="checkInClick(i)" v-if="flagBtn.ruzhu==1">
                         <img src="@/assets/icons/ruzhu.png" alt="" />
                         <span>入住</span>
                       </div>
@@ -463,7 +463,7 @@
                         <img src="@/assets/icons/suofang.png" alt="" />
                         <span>锁房</span>
                       </div> -->
-                      <div @click="reserveCancal(i)">
+                      <div @click="reserveCancal(i)" v-if="flagBtn.quxiaoyuding==1">
                         <img src="@/assets/icons/close1.png" alt="" />
                         <span>取消预订</span>
                       </div>
@@ -524,7 +524,7 @@
                       </div> -->
                     </div>
                     <div class="rigths">
-                      <div @click="checkOutClick(i)">
+                      <div @click="checkOutClick(i)" v-if="flagBtn.tuifang==1">
                         <img
                           src="@/assets/icons/checkOut.png"
                           style="height: 20px"
@@ -536,7 +536,7 @@
                         <img src="@/assets/icons/refund.png" alt="" />
                         <span>退款</span>
                       </div> -->
-                      <div @click="roomChangeClick(i)">
+                      <div @click="roomChangeClick(i)" v-if="flagBtn.huanfang==1">
                         <img src="@/assets/icons/roomChange.png" alt="" />
                         <span>换房</span>
                       </div>
@@ -574,7 +574,7 @@
                       </div>
                     </div>
                     <div class="rigths">
-                      <div @click="unlockClick(i)">
+                      <div @click="unlockClick(i)" v-if="flagBtn.kaifang==1">
                         <img src="@/assets/icons/key.png" alt="" />
                         <span>开房</span>
                       </div>
@@ -607,7 +607,7 @@
                       </div>
                     </div>
                     <div class="rigths">
-                      <div @click="maintainCancel(i)">
+                      <div @click="maintainCancel(i)" v-if="flagBtn.quxiaoweixiu==1">
                         <img src="@/assets/icons/close1.png" alt="" />
                         <span>取消维修</span>
                       </div>
@@ -2511,6 +2511,7 @@ import axios from "axios";
 import { useStore } from "vuex";
 import QRCode from "qrcode";
 
+const flagBtn = ref(); // 按钮权限
 const store = useStore();
 const api = ref("");
 const router = useRouter();
@@ -5296,6 +5297,9 @@ const tableRowClassName = ({ row, rowIndex }) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.roomStatus;
+  console.log(flagBtn.value, "按钮权限");
   getList();
 });
 onUnmounted(() => {

+ 119 - 53
src/views/roomType/roomType.vue

@@ -43,7 +43,7 @@
           </div>
         </div>
         <!-- 按钮列表 -->
-        <div class="gongneng">
+        <div class="gongneng" v-if="flagBtn.tianjia==1">
           <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
             ><img
               src="@/assets/add.png"
@@ -93,8 +93,9 @@
           <el-table-column align="center" label="操作" width="150">
             <template #default="scope">
               <div class="edit">
-                <div class="look" @click="edit(scope.row)">编辑</div>
+                <div class="look" v-if="flagBtn.xiugai==1" @click="edit(scope.row)">编辑</div>
                 <el-popconfirm
+                  v-if="flagBtn.shanchu==1"
                   width="220"
                   confirm-button-text="确认"
                   cancel-button-text="取消"
@@ -140,7 +141,7 @@
                 <div class="items">
                   <!-- prop="fileListJson" -->
                   <el-form-item label="房间图片 :" prop="roomPicture">
-                    <div class="tooltips">
+                    <div class="tooltips" v-loading="imgShow">
                       <div class="img img1">
                         <div class="updateImg">
                           <div class="imglist" v-if="fileList.list.length">
@@ -329,7 +330,7 @@
                   </el-form-item>
                 </div>
               </div>
-              <div class="form_item" v-if="ruleForm.roomType==2">
+              <div class="form_item" v-if="ruleForm.roomType == 2">
                 <div class="items">
                   <el-form-item label="钟点时长 :" prop="roomLiveTime">
                     <el-select
@@ -384,7 +385,11 @@
                       v-model="ruleForm.roomConfig"
                       :max="5"
                     >
-                      <el-checkbox v-for="i in roomConfig" :label="i.houseService">{{i.houseService}}</el-checkbox>
+                      <el-checkbox
+                        v-for="i in roomConfig"
+                        :label="i.houseService"
+                        >{{ i.houseService }}</el-checkbox
+                      >
                       <!-- <el-checkbox label="电视">电视</el-checkbox>
                       <el-checkbox label="双人床">双人床</el-checkbox>
                       <el-checkbox label="浴室">浴室</el-checkbox>
@@ -461,6 +466,8 @@ import { useStore } from "vuex";
 const store = useStore();
 const api = ref("");
 const router = useRouter();
+
+const flagBtn = ref(); // 按钮权限
 // 表格数据
 const loading = ref(false);
 const tableData = reactive({
@@ -477,7 +484,7 @@ const cities = ref([
   "无早餐",
   "无停车场",
 ]); // 名宿配置数据
-const fileList = reactive({ list: [] }); // 添加多张图片的文件
+
 const houseType = ref(); // 房型选择
 
 const searchInput = reactive({
@@ -509,10 +516,12 @@ const ruleForm = reactive({
   receivingTime: "", // 使用时间
   roomConfig: "", //房型配置
   roomNumbers: [], // 房间号列表
-  roomPicture: "", // 房间图片
+  roomPicture: [], // 房间图片
   id: "",
 });
-const roomConfig=ref([]) //房型配置
+const imgShow = ref(false);
+const fileList = reactive({ list: [] }); // 添加多张图片的文件
+const roomConfig = ref([]); //房型配置
 
 // 房费验证
 const validatePrice = (rule, value, callback) => {
@@ -541,7 +550,7 @@ const validateNumber = (rule, value, callback) => {
 };
 // 表单验证
 const rules = reactive({
-  fileListJson: [
+  roomPicture: [
     { required: true, message: "民宿图片不能为空", trigger: "blur" },
   ],
   roomName: [{ required: true, message: "房型名称不能为空", trigger: "blur" }],
@@ -631,9 +640,9 @@ const getList = async () => {
     });
   }
 };
-const systemList=async ()=>{
+const systemList = async () => {
   let data = {
-    permissionSettingId: sessionStorage.getItem('permissionSettingId'),
+    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
   };
   let res = await axios({
     method: "get",
@@ -646,7 +655,7 @@ const systemList=async ()=>{
   });
   console.log(res, "房型配置");
   if (res.data.code == 200) {
-    roomConfig.value=res.data.data;
+    roomConfig.value = res.data.data;
   } else {
     loading.value = false;
     ElMessage({
@@ -656,7 +665,7 @@ const systemList=async ()=>{
       center: true,
     });
   }
-}
+};
 
 // 搜索功能
 const searchBtn = lodash.debounce(async () => {
@@ -696,32 +705,46 @@ const handleChange = async (file, fileLists) => {
 // 可以获取图片参数
 const handleUpload = async (file) => {
   if (fileList.list.length >= 6) {
-    ElMessage.error("最多可上传6张图片!");
+    ElMessage.warning("最多可上传6张图片!");
     return false;
   }
+  imgShow.value = true;
   console.log(file, "2222");
   let data = new FormData();
   data.set("file", file.file);
-  // let res = await axios({
-  //   method: "post",
-  //   url: api.value + "/upload/save",
-  //   headers: {},
-  //   data: data,
-  // });
-  // console.log(res, "图片上传成功");
-  // if (res.data.code == 1) {
-  //   // res.data.uid = file.file.uid;
-  //   fileList.list.push({ url: res.data.data, uid: file.file.uid });
-  //   // ruleForm.roomPicture = fileList.list;
-  // }
+  let res = await axios({
+    method: "post",
+    url: api.value + "/upload/save",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+    data: data,
+  });
+  console.log(res, "图片上传成功");
+  if (res.data.code == 200) {
+    // res.data.uid = file.file.uid;
+    fileList.list.push({ url: res.data.data.url, uid: file.file.uid });
+    ruleForm.roomPicture = fileList.list;
+    console.log(fileList.list);
+    imgShow.value = false;
+  } else {
+    imgShow.value = false;
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
 };
 
 //添加房型 (--------------------------------------)
 const addlist = async () => {
   dialongTitle.value = "添加房型";
   addDialogVisible.value = true;
-  systemList()
-  ruleForm.roomPicture = ""; // 房间图片
+  systemList();
+  ruleForm.roomPicture = []; // 房间图片
   fileList.list = []; // 将选中的图片文件置为空
   ruleForm.roomName = ""; // 房型名称
   ruleForm.roomArea = ""; //房型面积
@@ -739,7 +762,7 @@ const addlist = async () => {
 
 //编辑按钮  (-------------------------------------------)
 const edit = async (row) => {
-  console.log(row);
+  console.log(row, "编辑房型");
   dialongTitle.value = "编辑房型";
   ruleForm.id = row.id;
   let data = {
@@ -764,15 +787,28 @@ const edit = async (row) => {
     // ruleForm.visible = res.data.data.visible.split(",");
     ruleForm.roomType = String(res.data.data.roomType);
     ruleForm.roomLiveTime = res.data.data.roomLiveTime;
-    if(res.data.data.receivingTime){
+    if (res.data.data.receivingTime) {
       ruleForm.receivingTime = res.data.data.receivingTime.split("-");
-    }else{
-      ruleForm.receivingTime =""
+    } else {
+      ruleForm.receivingTime = "";
     }
-    systemList().then(()=>{
+    systemList().then(() => {
       ruleForm.roomConfig = res.data.data.roomConfiguration.split(",");
-    })
-    // roomConfig.value = res.data.data.roomConfiguration.split(",");
+    });
+    let imgArr = [];
+    if (res.data.data.housePicture) {
+      res.data.data.housePicture.split(",").forEach((i, ind) => {
+        imgArr.push({
+          url: i,
+          uid: ind,
+        });
+      });
+      ruleForm.roomPicture = imgArr;
+      fileList.list = imgArr;
+    } else {
+      ruleForm.roomPicture = imgArr;
+      fileList.list = imgArr;
+    }
 
     let arr = [];
     res.data.data.roomIds.split(",").forEach((item, ind) => {
@@ -782,18 +818,6 @@ const edit = async (row) => {
       });
     });
     ruleForm.roomNumbers = arr;
-    ruleForm.roomPicture = res.data.data.roomPicture;
-    // res.data.data.forEach((item) => {
-    //   item.uid = item.id;
-    // });
-    // fileList.list = res.data.data;
-    // ruleForm.fileListJson = fileList.list;
-    // ElMessage({
-    //   type: "success",
-    //   showClose: true,
-    //   message: res.data.message,
-    //   center: true,
-    // });
   } else {
     ElMessage({
       type: "error",
@@ -829,7 +853,8 @@ const cancelAdd = () => {
   ruleForm.roomConfig = "";
   // roomConfig.value = '';
   ruleForm.roomNumbers = "";
-  ruleForm.roomPicture = "";
+  ruleForm.roomPicture = [];
+  fileList.list = [];
 };
 // 选择房型配置
 const checkHouse = (val) => {
@@ -912,10 +937,28 @@ const submitAdd = lodash.debounce(async (formEl) => {
     if (valid) {
       if (dialongTitle.value == "添加房型") {
         const arr = [];
+        let flag = ruleForm.roomNumbers.some(i=>{
+          return i.numberName==''
+        })
+        if(flag){
+          ElMessage({
+            type: "warning",
+            showClose: true,
+            message: '房间号不能为空',
+            center: true,
+          });
+          return false
+        }
         ruleForm.roomNumbers.forEach((item) => {
           arr.push(item.numberName);
           console.log(item);
         });
+        const imgArr = [];
+        ruleForm.roomPicture.forEach((i) => {
+          imgArr.push(i.url);
+        });
+        console.log(ruleForm.roomPicture, "图片列表");
+        console.log(imgArr, "图片列表");
 
         let data = {
           roomNumbers: arr, //房间号
@@ -926,10 +969,11 @@ const submitAdd = lodash.debounce(async (formEl) => {
             number: ruleForm.number,
             roomArea: ruleForm.roomArea,
             roomLiveTime: ruleForm.roomLiveTime,
-            receivingTime: `${ruleForm.receivingTime[0]}-${ruleForm.receivingTime[1]}`,
+            // receivingTime: `${ruleForm.receivingTime[0]}-${ruleForm.receivingTime[1]}`,
             // visible: ruleForm.visible.join(","), //可见类型(0:全部,1:学生,2:教职工,3:校友,4:访客,5:临时人员,6:其他,7:领导)
             roomConfiguration: ruleForm.roomConfig.join(","),
-            roomPicture: ruleForm.roomPicture,
+            roomPicture: imgArr[0], // 房型首页图
+            housePicture: imgArr.join(","), //房型图,多张用逗号隔开
           },
           adminId: sessionStorage.getItem("permissionSettingId"),
         };
@@ -965,11 +1009,29 @@ const submitAdd = lodash.debounce(async (formEl) => {
         }
       } else {
         const arr = [];
+        let flag = ruleForm.roomNumbers.some(i=>{
+          return i.numberName==''
+        })
+        if(flag){
+          ElMessage({
+            type: "warning",
+            showClose: true,
+            message: '房间号不能为空',
+            center: true,
+          });
+          return false
+        }
         ruleForm.roomNumbers.forEach((item) => {
           arr.push(item.numberName);
           console.log(item);
         });
-
+        
+        const imgArr = [];
+        ruleForm.roomPicture.forEach((i) => {
+          imgArr.push(i.url);
+        });
+        console.log(ruleForm.roomPicture, "图片列表");
+        console.log(imgArr, "图片列表");
         let data = {
           roomNumbers: arr, //房间号
           house: {
@@ -980,10 +1042,11 @@ const submitAdd = lodash.debounce(async (formEl) => {
             number: ruleForm.number,
             roomArea: ruleForm.roomArea,
             roomLiveTime: ruleForm.roomLiveTime,
-            receivingTime: `${ruleForm.receivingTime[0]}-${ruleForm.receivingTime[1]}`,
+            // receivingTime: `${ruleForm.receivingTime[0]}-${ruleForm.receivingTime[1]}`,
             // visible: ruleForm.visible.join(","), //可见类型(0:全部,1:学生,2:教职工,3:校友,4:访客,5:临时人员,6:其他,7:领导)
             roomConfiguration: ruleForm.roomConfig.join(","),
-            roomPicture: ruleForm.roomPicture,
+            roomPicture: imgArr[0], // 房型首页图
+            housePicture: imgArr.join(","), //房型图,多张用逗号隔开
           },
           adminId: sessionStorage.getItem("permissionSettingId"),
         };
@@ -1148,6 +1211,9 @@ const lookImg = (i) => {
 };
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.roomType;
+  console.log(flagBtn.value, "按钮权限");
   getList();
   // 查看房型配置
   let data = {

+ 9 - 2
src/views/statement/statement.vue

@@ -68,6 +68,7 @@
               type="primary"
               plain
               @click="importExcel"
+              v-if="flagBtn.daochu"
             >
               导出</el-button
             >
@@ -175,9 +176,10 @@
             fixed="right"
             label="操作"
             width="150"
+            v-if="flagBtn.xiangqing==1"
           >
             <template #default="scope">
-              <div class="look" @click="clickOrderInfo(scope.row)">详情</div>
+              <div class="look"  @click="clickOrderInfo(scope.row)">详情</div>
             </template>
           </el-table-column>
         </el-table>
@@ -362,6 +364,8 @@ const router = useRouter();
 
 const changeIndex = ref(1); // 1支付成功订单  2待结账 切换
 
+const flagBtn = ref(); // 按钮权限
+
 const searchInput = reactive({
   keyWord: "", // 关键字
   createTime: "",
@@ -473,7 +477,7 @@ const searchBtn = lodash.debounce(async () => {
 // 详情弹窗 (----------------------------------------------)
 const clickOrderInfo = async (row) => {
   orderInfoVisible.value = true;
-  order.floor = row.houseName + " " + row.houseNumber;
+  order.floor = row.roomName + " " + row.roomNumber;
   console.log(row);
   let data = {
     orderNumber: row.orderNumber,
@@ -595,6 +599,9 @@ const importExcel = lodash.debounce(async () => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.statement;
+  console.log(flagBtn.value, "按钮权限");
   changeItem(changeIndex.value);
 });
 onUnmounted(() => {

+ 38 - 5
src/views/system/system.vue

@@ -37,12 +37,13 @@
                 <span class="numImg" v-if="systemData.coverPicture">{{
                   switchImgInd2 + 1 + "/" + systemData.coverPicture.length
                 }}</span>
-                <div class="lookImg" v-if="systemData.coverPicture">
+                <div class="lookImg" v-if="systemData.coverPicture" >
                   <img src="@/assets/lookImg.png" alt="" @click="lookImg" />
-                  <div class="delimg" @click="delImgList(item)"></div>
+                  <div class="delimg" @click="delImgList(item)" v-if=" flagBtn.gongyushezhi == 1"></div>
                 </div>
               </div>
               <el-upload
+                v-if="flagBtn.gongyushezhi == 1"
                 class="avatar-uploader"
                 action=""
                 :on-preview="handlePreview2"
@@ -70,16 +71,19 @@
             <div class="conts">
               <div class="name">名称:</div>
               <el-input
+                v-if="flagBtn.gongyushezhi == 1"
                 clearable
                 v-model="systemData.name"
                 @blur="systemChange"
                 placeholder="请输入名称"
                 style="max-width: 300px; width: 280px"
               />
+              <span v-else style="display: inline-block;max-width: 300px; width: 280px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;">{{ systemData.name }}</span>
             </div>
             <div class="conts">
               <div class="name">开业时间:</div>
               <el-date-picker
+                v-if="flagBtn.gongyushezhi == 1"
                 v-model="systemData.openingTime"
                 type="datetime"
                 format="YYYY-MM-DD HH:mm:ss"
@@ -89,6 +93,7 @@
                 style="max-width: 300px; width: 280px"
                 @change="systemChange"
               />
+              <span v-else style="display: inline-block;max-width: 300px; width: 280px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;">{{ systemData.openingTime }}</span>
             </div>
           </div>
         </div>
@@ -97,16 +102,19 @@
             <div class="conts">
               <div class="name">地址:</div>
               <el-input
+                v-if="flagBtn.gongyushezhi == 1"
                 clearable
                 v-model="systemData.address"
                 @blur="systemChange"
                 placeholder="请输入地址"
                 style="max-width: 300px; width: 280px"
               />
+              <span v-else style="display: inline-block;max-width: 300px; width: 280px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;overflow-x: auto;">{{ systemData.address }}</span>
             </div>
             <div class="conts">
               <div class="name">装修时间:</div>
               <el-date-picker
+                v-if="flagBtn.gongyushezhi == 1"
                 v-model="systemData.decorationTime"
                 type="datetime"
                 format="YYYY-MM-DD HH:mm:ss"
@@ -116,6 +124,7 @@
                 style="max-width: 300px; width: 280px"
                 @change="systemChange"
               />
+              <span v-else style="display: inline-block;max-width: 300px; width: 280px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;">{{ systemData.decorationTime }}</span>
             </div>
           </div>
         </div>
@@ -133,6 +142,7 @@
                 @change="systemChange"
               /> -->
               <el-time-picker
+                v-if="flagBtn.gongyushezhi == 1"
                 v-model="systemData.liveTime"
                 is-range
                 range-separator="-"
@@ -142,6 +152,7 @@
                 end-placeholder="结束时间"
                 @change="systemChange"
               />
+              <span v-else style="display: inline-block;max-width: 300px; width: 280px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;">{{ systemData.liveTime[0] }} - {{ systemData.liveTime[1] }}</span>
             </div>
             <!-- <div class="conts">
               <div class="name">离店时间:</div>
@@ -167,6 +178,7 @@
                   v-for="(i, ind) in systemData.hourlivetime"
                 >
                   <el-time-picker
+                    v-if="flagBtn.gongyushezhi == 1"
                     v-model="i.time"
                     is-range
                     range-separator="-"
@@ -176,7 +188,9 @@
                     value-format="HH:mm:ss"
                     @change="systemChange"
                   />
+                  <span v-else style="display: inline-block;max-width: 300px; width: 280px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;">{{ i.time[0] }} - {{ i.time[1] }}</span>
                   <img
+                    v-if="flagBtn.gongyushezhi == 1"
                     class="img"
                     src="@/assets/addRoom.png"
                     @click="addhourClick(ind)"
@@ -187,7 +201,7 @@
                     src="@/assets/delRoom.png"
                     @click="delhourClick(ind)"
                     alt=""
-                    v-if="ind != 0"
+                    v-if="ind != 0 && flagBtn.gongyushezhi == 1"
                   />
                   <div class="img" alt="" v-else />
                 </div>
@@ -200,6 +214,7 @@
             <div class="conts">
               <div class="name">电话号码:</div>
               <el-input
+                v-if="flagBtn.gongyushezhi == 1"
                 clearable
                 v-model="systemData.phoneNumbr"
                 @blur="systemChange"
@@ -207,6 +222,7 @@
                 placeholder="请输入电话号码"
                 style="max-width: 300px; width: 280px"
               />
+              <span v-else style="display: inline-block;max-width: 300px; width: 280px">{{ systemData.phoneNumbr }}</span>
             </div>
           </div>
         </div>
@@ -216,6 +232,7 @@
             <div class="textarea">
               <div class="name">公寓简介:</div>
               <el-input
+                v-if="flagBtn.gongyushezhi == 1"
                 v-model="systemData.introductory"
                 :rows="9"
                 maxlength="1000"
@@ -224,6 +241,7 @@
                 placeholder="请输入公寓简介"
                 @blur="systemChange"
               />
+              <span v-else style="display: inline-block;max-width: 600px; width: 1000px;height:200px;border: 1px solid #ccc;overflow: auto;border-radius: 3px;padding: 5px 8px;">{{ systemData.introductory }}</span>
             </div>
           </div>
         </div>
@@ -233,6 +251,7 @@
           <div class="titles">
             <div class="title">设施服务设置</div>
             <el-button
+              v-if="flagBtn.sheshifuwushezhi==1"
               @click="facilityServicesAdd"
               type="primary"
               color="rgba(0, 97, 255, 1)"
@@ -268,9 +287,9 @@
               prop="houseService"
               label="房型服务"
             />
-            <el-table-column align="center" label="操作">
+            <el-table-column v-if="flagBtn.sheshifuwushezhi==1" align="center" label="操作">
               <template #default="scope">
-                <div class="options">
+                <div class="options" >
                   <div class="look" @click="facilityServicesEdit(scope.row)">
                     编辑
                   </div>
@@ -298,6 +317,7 @@
           <div class="system">
             <span>退房后 </span>
             <el-input
+              v-if="flagBtn.tuifangshezhi==1"
               clearable
               v-model="checkOutData.turnOffTime"
               style="width: 150px; margin: 0 8px"
@@ -312,11 +332,13 @@
                 />
               </template>
             </el-input>
+            <span v-else style="display: inline-block;width: 150px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;margin:0 8px;">{{ checkOutData.turnOffTime }}</span>
             <span>分钟,断电</span>
           </div>
           <div class="system">
             <span>预定时间最多 </span>
             <el-input
+              v-if="flagBtn.tuifangshezhi==1"
               clearable
               v-model="checkOutData.preDay"
               style="width: 150px; margin: 0 8px"
@@ -324,6 +346,7 @@
               @blur="checkOutSettingUpdate"
             >
             </el-input>
+            <span v-else style="display: inline-block;width: 150px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;margin: 0 8px;">{{ checkOutData.preDay }}</span>
             <span>天</span>
           </div>
           <div class="titles">
@@ -336,6 +359,7 @@
           <div class="system">
             <span>每人补助水量 </span>
             <el-input
+              v-if="flagBtn.buzhushezhi==1"
               clearable
               v-model="subsidySetupData.freeQuotaOfWater"
               style="width: 150px; margin: 0 8px"
@@ -343,6 +367,7 @@
               @blur="subsidySetupUpdate"
             >
             </el-input>
+            <span v-else style="display: inline-block;width: 150px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;margin: 0 8px;">{{ subsidySetupData.freeQuotaOfWater }}</span>
             <span>吨</span>
             <span
               style="
@@ -355,6 +380,7 @@
             ></span>
             <span>每人补助电量 </span>
             <el-input
+              v-if="flagBtn.buzhushezhi==1"
               clearable
               v-model="subsidySetupData.freeQuotaOfElectric"
               style="width: 150px; margin: 0 8px"
@@ -362,6 +388,7 @@
               @blur="subsidySetupUpdate"
             >
             </el-input>
+            <span v-else style="display: inline-block;width: 150px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;margin: 0 8px;">{{ subsidySetupData.freeQuotaOfElectric }}</span>
             <span>度</span>
           </div>
           <div class="titles">
@@ -370,6 +397,7 @@
           <div class="system">
             <span>每 </span>
             <el-input
+              v-if="flagBtn.cuijiaoshezhi==1"
               clearable
               v-model="callSystemData.askForPayment"
               style="width: 150px; margin: 0 8px"
@@ -377,6 +405,7 @@
               @blur="callSystemDataUpdate"
             >
             </el-input>
+            <span v-else style="display: inline-block;width: 150px;border: 1px solid #ccc;border-radius: 3px;height: 30px;line-height: 30px;padding-left: 8px;margin: 0 8px;">{{ callSystemData.askForPayment }}</span>
             <span>天,对待结账老师进行催缴</span>
           </div>
         </div>
@@ -495,6 +524,7 @@ const api = ref("");
 const router = useRouter();
 const route = useRoute(); // 获取router-push传过来的flag
 
+const flagBtn = ref(); // 按钮权限
 // 设置详情数据  (====================)
 const systemData = reactive({
   address: null,
@@ -1212,6 +1242,9 @@ const tableRowClassName = ({ row, rowIndex }) => {
 };
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.system;
+  console.log(flagBtn.value, "按钮权限");
   getList();
   facilityServices();
   checkOutSetting();

+ 39 - 34
src/views/user/user.vue

@@ -43,7 +43,7 @@
           >
         </div>
         <!-- 按钮列表 -->
-        <div class="gongneng">
+        <div class="gongneng" v-if="flagBtn.tianjia==1">
           <el-button
             type="primary"
             color="rgba(0, 97, 255, 1)"
@@ -78,6 +78,7 @@
             label="序号"
           />
           <el-table-column align="center" prop="userName" label="姓名" />
+          <!-- <el-table-column align="center" prop="cardNumber" label="微校卡号" /> -->
           <el-table-column align="center" prop="phone" label="手机号码" />
           <!-- <el-table-column align="center" prop="userMenuId" label="角色">
             <template #default="{ row }">
@@ -97,20 +98,21 @@
           <el-table-column
             align="center"
             prop="createTime"
-            width="180"
+            width="280"
             label="创建时间"
           />
-          <el-table-column align="center" label="操作" width="200">
+          <!-- <el-table-column align="center" label="操作" width="200">
             <template #default="scope">
               <div class="edit">
-                <div class="look" @click="editClick(scope.row)">编辑</div>
+                <div class="look" v-if="flagBtn.bianji==1" @click="editClick(scope.row)">编辑</div>
                 <el-popconfirm
+                  v-if="flagBtn.shanchu==1"
                   width="220"
                   confirm-button-text="确认"
                   cancel-button-text="取消"
                   :icon="InfoFilled"
                   icon-color="#f89626"
-                  title="是否删除此房型?"
+                  title="是否删除此用户?"
                   @confirm="del(scope.row)"
                   @cancel="cancelEvent"
                 >
@@ -120,22 +122,23 @@
                 </el-popconfirm>
               </div>
             </template>
-          </el-table-column>
+          </el-table-column> -->
         </el-table>
+        <!-- 分页组件 -->
+        <div class="pageSize">
+          <span></span>
+          <el-pagination
+            background
+            :current-page="currentPage"
+            :page-size="pageSize"
+            layout="total, prev, pager, next, jumper, slot"
+            :total="total"
+            @update:current-page="handleCurrentChange"
+          />
+        </div>
       </div>
 
-      <!-- 分页组件 -->
-      <div class="pageSize">
-        <span></span>
-        <el-pagination
-          background
-          :current-page="currentPage"
-          :page-size="pageSize"
-          layout="total, prev, pager, next, jumper, slot"
-          :total="total"
-          @update:current-page="handleCurrentChange"
-        />
-      </div>
+      
 
       <!-- 编辑按钮 -->
       <el-dialog
@@ -217,9 +220,9 @@
               placeholder="请输入身份证号"
               style="width: 500px"
             >
-              <template #append>
+              <!-- <template #append>
                 <div @click="readCard">读卡</div>
-              </template>
+              </template> -->
             </el-input>
           </el-form-item>
           <el-form-item label="指纹 :" prop="fingerprint">
@@ -372,7 +375,7 @@ const loading = ref(false);
 const tableData = reactive({
   list: [],
 });
-
+const flagBtn = ref(); // 按钮权限
 const searchInput = reactive({
   keyWord: "",
   createTime: "",
@@ -440,7 +443,7 @@ const editRules = reactive({
     {
       required: true,
       message: "身份证号不能为空",
-      trigger: "change",
+      trigger: "blur",
     },
   ],
   fingerprint: [
@@ -979,7 +982,9 @@ const handleCurrentChange = (value) => {
 onBeforeMount(async () => {
   api.value = store.state.user.api;
   getList();
-  // rolesList();
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.user;
+  console.log(flagBtn.value, "按钮权限");
 });
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
@@ -1021,13 +1026,14 @@ onUnmounted(() => {
     }
   }
   .btm {
-    width: 100%;
-    height: 100%;
-  }
-  .middle {
     width: calc(100% - 60px);
+    height: calc(100% - 60px);
     margin: 0 auto;
-
+    display: flex;
+    flex-direction: column;
+  }
+  .middle {
+    width: calc(100%);
     color: #000;
 
     // border-bottom: 1px solid rgb(231, 231, 231);
@@ -1035,7 +1041,7 @@ onUnmounted(() => {
       display: flex;
       flex-wrap: wrap;
       align-items: center;
-      margin: 10px 0 0 0;
+      // margin: 10px 0 0 0;
 
       .search {
         color: #fff;
@@ -1101,12 +1107,11 @@ onUnmounted(() => {
   }
 
   .footer {
-    width: calc(100% - 60px);
-    height: calc(100% - 190px);
-    margin: 10px auto 10px;
+    width: calc(100%);
+    flex: 1;
 
     .el-table--fit {
-      height: 100%;
+      height: calc(100% - 60px);
 
       :deep(.el-table__header-wrapper) {
         background-color: #000;
@@ -1312,7 +1317,7 @@ onUnmounted(() => {
     align-items: center;
     justify-content: space-between;
     margin: 0 30px;
-
+    height: 60px;
     span {
       color: #000;
     }

+ 92 - 49
src/views/userRoles/userRoles.vue

@@ -4,7 +4,7 @@
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
       <span class="cameratxt">角色管理</span>
     </div>
-    <div>
+    <div class="scroll">
       <div class="middle">
         <div class="filter">
           <div class="condition">
@@ -43,7 +43,7 @@
           >
         </div>
         <!-- 按钮列表 -->
-        <div class="gongneng">
+        <div class="gongneng" v-if="flagBtn.tianjia == 1">
           <el-button
             type="primary"
             color="rgba(0, 97, 255, 1)"
@@ -93,20 +93,27 @@
             <template #default="{ row }">
               <div class="edit">
                 <div
-                  v-if="row.parentId == 0"
+                  v-if="row.parentId == 0 && flagBtn.tianjia == 1"
                   class="look"
                   @click="addRolesClicks(row)"
                 >
                   添加
                 </div>
-                <div class="look" @click="editClick(row)">编辑</div>
+                <div
+                  v-if="flagBtn.bianji == 1"
+                  class="look"
+                  @click="editClick(row)"
+                >
+                  编辑
+                </div>
                 <el-popconfirm
+                  v-if="flagBtn.shanchu == 1"
                   width="220"
                   confirm-button-text="确认"
                   cancel-button-text="取消"
                   :icon="InfoFilled"
                   icon-color="#f89626"
-                  title="是否删除此房型?"
+                  title="是否删除此角色?"
                   @confirm="delRoles(row)"
                   @cancel="cancelEvent"
                 >
@@ -118,6 +125,18 @@
             </template>
           </el-table-column>
         </el-table>
+        <!-- 分页组件 -->
+        <div class="pageSize">
+          <span></span>
+          <el-pagination
+            background
+            :current-page="currentPage"
+            :page-size="pageSize"
+            layout="total, prev, pager, next, jumper, slot"
+            :total="total"
+            @update:current-page="handleCurrentChange"
+          />
+        </div>
       </div>
 
       <!-- 添加角色 -->
@@ -271,19 +290,6 @@
           </el-form-item>
         </el-form>
       </el-dialog>
-
-      <!-- 分页组件 -->
-      <div class="pageSize">
-        <span></span>
-        <el-pagination
-          background
-          :current-page="currentPage"
-          :page-size="pageSize"
-          layout="total, prev, pager, next, jumper, slot"
-          :total="total"
-          @update:current-page="handleCurrentChange"
-        />
-      </div>
     </div>
   </div>
 </template>
@@ -298,7 +304,7 @@ import {
   onUnmounted,
 } from "vue";
 import { useRouter } from "vue-router";
-import { ElMessage, ElMessageBox } from "element-plus";
+import { ElMessage, ElMessageBox, ElLoading } from "element-plus";
 import { Calendar } from "@element-plus/icons-vue";
 import vidiconsApi from "@/api/vidicons.js";
 import { dayjs } from "element-plus";
@@ -313,7 +319,7 @@ const loading = ref(false);
 const tableData = reactive({
   list: [],
 });
-
+const flagBtn = ref(); // 按钮权限
 const searchInput = reactive({
   keyWord: "",
   createTime: "",
@@ -377,6 +383,11 @@ const addRolesData = reactive({
             { name: "换房", id: 11 },
             { name: "开房", id: 12 },
             // { name: "门锁管理", id: 13 },
+            { name: "查看界面", id: 14 },
+            { name: "开电", id: 15 },
+            { name: "关电", id: 16 },
+            { name: "取消预定", id: 17 },
+            { name: "取消维修", id: 18 },
           ],
         },
       ],
@@ -394,6 +405,7 @@ const addRolesData = reactive({
             { name: "添加", id: 1 },
             { name: "修改", id: 2 },
             { name: "删除", id: 3 },
+            { name: "查看界面", id: 6 },
           ],
         },
       ],
@@ -410,6 +422,7 @@ const addRolesData = reactive({
           children: [
             { name: "批量改价", id: 4 },
             { name: "改价记录", id: 5 },
+            { name: "查看界面", id: 7 },
           ],
         },
       ],
@@ -429,7 +442,7 @@ const addRolesData = reactive({
             { name: "入住", id: 3 },
             { name: "退款", id: 4 },
             { name: "退房", id: 5 },
-            // { name: "查询", id: 6 },
+            { name: "查看界面", id: 6 },
             // { name: "删除", id: 7 },
             { name: "换房", id: 8 },
             { name: "导出", id: 9 },
@@ -449,6 +462,7 @@ const addRolesData = reactive({
           children: [
             { name: "导入值班", id: 1 },
             { name: "导出", id: 2 },
+            { name: "查看界面", id: 3 },
           ],
         },
       ],
@@ -467,7 +481,7 @@ const addRolesData = reactive({
             // { name: "编辑流程", id: 2 },
             { name: "同意", id: 3 },
             { name: "驳回", id: 4 },
-            // { name: "查询", id: 5 },
+            { name: "查看界面", id: 5 },
             { name: "规则设置", id: 6 },
             // { name: "导出", id: 7 },
           ],
@@ -484,8 +498,9 @@ const addRolesData = reactive({
           name: "全部",
           id: 0,
           children: [
-            // { name: "查询", id: 1 },
+            { name: "查看界面", id: 1 },
             { name: "导出", id: 2 },
+            { name: "详情", id: 3 },
           ],
         },
       ],
@@ -503,7 +518,7 @@ const addRolesData = reactive({
             // { name: "添加", id: 1 },
             // { name: "编辑", id: 2 },
             // { name: "删除", id: 3 },
-            // { name: "查询", id: 4 },
+            { name: "查看界面", id: 4 },
             // { name: "导出", id: 5 },
             { name: "导入", id: 6 },
             // { name: "批量重置密码", id: 7 },
@@ -529,10 +544,10 @@ const addRolesData = reactive({
           name: "全部",
           id: 0,
           children: [
-            // { name: "添加", id: 1 },
-            // { name: "编辑", id: 2 },
-            // { name: "删除", id: 3 },
-            // { name: "查询", id: 4 },
+            { name: "添加", id: 1 },
+            { name: "编辑", id: 2 },
+            { name: "删除", id: 3 },
+            { name: "查看界面", id: 4 },
             { name: "导出", id: 5 },
             { name: "导入", id: 6 },
           ],
@@ -552,7 +567,7 @@ const addRolesData = reactive({
             { name: "添加", id: 1 },
             { name: "编辑", id: 2 },
             { name: "删除", id: 3 },
-            // { name: "查询", id: 4 },
+            { name: "查看界面", id: 4 },
             // { name: "导出", id: 5 },
             // { name: "导入", id: 6 },
           ],
@@ -572,7 +587,7 @@ const addRolesData = reactive({
             { name: "添加", id: 1 },
             { name: "编辑", id: 2 },
             { name: "删除", id: 3 },
-            // { name: "查询", id: 4 },
+            { name: "查看界面", id: 4 },
             // { name: "导出", id: 5 },
             // { name: "导入", id: 6 },
           ],
@@ -592,7 +607,7 @@ const addRolesData = reactive({
             { name: "添加", id: 1 },
             { name: "编辑", id: 2 },
             { name: "删除", id: 3 },
-            // { name: "查询", id: 4 },
+            { name: "查看界面", id: 4 },
             // { name: "导出", id: 5 },
             // { name: "导入", id: 6 },
           ],
@@ -614,6 +629,7 @@ const addRolesData = reactive({
             { name: "补助设置", id: 3 },
             { name: "催缴设置", id: 4 },
             { name: "设施服务设置", id: 5 },
+            { name: "查看界面", id: 6 },
           ],
         },
       ],
@@ -888,7 +904,7 @@ const addRolesClicks = (row) => {
   }
   if (addRolesData12.value) {
     addRolesData12.value.setCheckedKeys([]);
-  } 
+  }
   if (addRolesData13.value) {
     addRolesData13.value.setCheckedKeys([]);
   }
@@ -932,7 +948,8 @@ const editClick = async (row) => {
       res.data.data.houseTypeManagement.split(",")
     );
 
-    addRoles.housePriceManagement = res.data.data.housePriceManagement.split(",");
+    addRoles.housePriceManagement =
+      res.data.data.housePriceManagement.split(",");
     addRolesData3.value.setCheckedKeys(
       res.data.data.housePriceManagement.split(",")
     );
@@ -968,7 +985,9 @@ const editClick = async (row) => {
     );
 
     addRoles.userManagement = res.data.data.userManagement.split(",");
-    addRolesData10.value.setCheckedKeys(res.data.data.userManagement.split(","));
+    addRolesData10.value.setCheckedKeys(
+      res.data.data.userManagement.split(",")
+    );
 
     addRoles.roleManagement = res.data.data.roleManagement.split(",");
     addRolesData11.value.setCheckedKeys(
@@ -1031,6 +1050,11 @@ const editMemberCheckChange = (data, nodes, row) => {
 };
 // 确定
 const confirmEdit = async () => {
+  const loading = ElLoading.service({
+    lock: true,
+    text: "Loading",
+    background: "rgba(0, 0, 0, 0.7)",
+  });
   if (addRoles.id) {
     let data = {
       id: addRoles.id,
@@ -1051,8 +1075,8 @@ const confirmEdit = async () => {
       accountManagement: addRoles.accountManagement.join(","),
       systemManagement: addRoles.systemManagement.join(","),
     };
-    console.log(data,"编辑参数");
-    
+    console.log(data, "编辑参数");
+
     if (!addRoles.name) {
       ElMessage({
         type: "warning",
@@ -1072,10 +1096,14 @@ const confirmEdit = async () => {
       data: data,
     });
     if (res.data.code == 200) {
-      if(addRoles.id== sessionStorage.getItem('permissionSettingId')){
-        store.commit('ROLELIST',addRoles.id)
+      if (addRoles.id == sessionStorage.getItem("permissionSettingId")) {
+        store.commit("ROLELIST", addRoles.id);
+        setTimeout(() => {
+          window.location.reload();
+        }, 1000);
       }
       addRolesVisible.value = false;
+      loading.close();
       ElMessage({
         type: "success",
         showClose: true,
@@ -1130,7 +1158,13 @@ const confirmEdit = async () => {
       });
       console.log(res, "添加T1角色");
       if (res.data.code == 200) {
-        getList();
+        if (addRoles.id == sessionStorage.getItem("permissionSettingId")) {
+          store.commit("ROLELIST", addRoles.id);
+          setTimeout(() => {
+            window.location.reload();
+          }, 1000);
+        }
+        loading.close();
         addRolesVisible.value = false;
         ElMessage({
           type: "success",
@@ -1159,6 +1193,7 @@ const confirmEdit = async () => {
       console.log(res, "添加T0角色");
       if (res.data.code == 200) {
         getList();
+        loading.close();
         addRolesVisible.value = false;
         ElMessage({
           type: "success",
@@ -1290,6 +1325,9 @@ const handleCurrentChange = (value) => {
 onBeforeMount(async () => {
   api.value = store.state.user.api;
   getList();
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.userRoles;
+  console.log(flagBtn.value, "按钮权限");
 });
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
@@ -1298,8 +1336,8 @@ onUnmounted(() => {
 
 <style scoped lang="scss">
 .content-box {
-  width: 97.5%;
-  height: 89%;
+  width: calc(100% - 40px);
+  height: calc(100% - 105px);
   margin: 20px auto;
   background-color: #fff;
   color: #fff;
@@ -1328,10 +1366,16 @@ onUnmounted(() => {
     }
   }
 
-  .middle {
-    width: 96%;
+  .scroll {
+    width: calc(100% - 60px);
+    height: calc(100% - 61px);
     margin: 0 auto;
+    display: flex;
+    flex-direction: column;
+  }
 
+  .middle {
+    width: 100%;
     color: #000;
 
     // border-bottom: 1px solid rgb(231, 231, 231);
@@ -1339,7 +1383,7 @@ onUnmounted(() => {
       display: flex;
       flex-wrap: wrap;
       align-items: center;
-      margin: 10px 0 0 0;
+      // margin: 10px 0 0 0;
 
       .search {
         color: #fff;
@@ -1405,12 +1449,11 @@ onUnmounted(() => {
   }
 
   .footer {
-    width: 96%;
-    height: 550px;
-    margin: 10px auto 30px;
+    width: 100%;
+    flex: 1;
 
     .el-table--fit {
-      height: 100%;
+      height: calc(100% - 60px);
 
       :deep(.el-table__header-wrapper) {
         background-color: #000;
@@ -1639,7 +1682,7 @@ onUnmounted(() => {
     display: flex;
     align-items: center;
     justify-content: space-between;
-    margin: 0 30px;
+    height: 60px;
 
     span {
       color: #000;