Browse Source

界面的样式和接口调整 新增员工管理,楼栋管理,房间列表界面样式和接口已完成

hzj18279462576@163.com 1 year ago
parent
commit
b0ff0df46b

BIN
src/assets/icons/eyes.png


+ 247 - 20
src/layout/sidebar/SidevarItem copy.vue

@@ -16,7 +16,7 @@
         /></el-icon>
         /></el-icon>
       </div>
       </div>
       <!-- 菜单项 -->
       <!-- 菜单项 -->
-      <div v-for="item in roles" class="items">
+      <div v-for="item in roleData" class="items">
         <!-- 房态管理 -->
         <!-- 房态管理 -->
         <el-menu-item
         <el-menu-item
           v-if="item.name == 'roomStatus'"
           v-if="item.name == 'roomStatus'"
@@ -37,7 +37,7 @@
           <span>房态管理</span>
           <span>房态管理</span>
         </el-menu-item>
         </el-menu-item>
         <!-- 房型管理 -->
         <!-- 房型管理 -->
-        <el-sub-menu :index="item.name" v-if="item.name == 'roomTypes'">
+        <el-sub-menu index="roomTypes" v-if="item.name == 'roomTypes'">
           <template #title>
           <template #title>
             <img
             <img
               v-if="
               v-if="
@@ -79,7 +79,7 @@
           <span>订单管理</span>
           <span>订单管理</span>
         </el-menu-item>
         </el-menu-item>
         <!-- 授权管理 -->
         <!-- 授权管理 -->
-        <el-sub-menu :index="item.name" v-else-if="item.name == 'classs'">
+        <el-sub-menu index="classs" v-if="item.name == 'classs'">
           <template #title>
           <template #title>
             <img
             <img
               v-if="
               v-if="
@@ -120,7 +120,7 @@
           <span>统计报表</span>
           <span>统计报表</span>
         </el-menu-item>
         </el-menu-item>
         <!-- 设备管理 -->
         <!-- 设备管理 -->
-        <el-sub-menu :index="item.name" v-else-if="item.name == 'doorLocks'">
+        <el-sub-menu index="doorLocks" v-if="item.name == 'doorLocks'">
           <template #title>
           <template #title>
             <img
             <img
               v-if="
               v-if="
@@ -146,11 +146,12 @@
           </el-menu-item>
           </el-menu-item>
         </el-sub-menu>
         </el-sub-menu>
         <!-- 组织架构 -->
         <!-- 组织架构 -->
-        <el-sub-menu :index="item.name" v-else-if="item.name == 'users'">
+        <el-sub-menu index="users" v-if="item.name == 'users'">
           <template #title>
           <template #title>
             <img
             <img
               v-if="
               v-if="
-                activeIndex == '/hotel/user' || activeIndex == '/hotel/roles'
+                activeIndex == '/hotel/user' ||
+                activeIndex == '/hotel/userRoles'
               "
               "
               src="@/assets/icons/userS.png"
               src="@/assets/icons/userS.png"
               style="width: 22px; height: 22px; margin: 0 18px 0 18px"
               style="width: 22px; height: 22px; margin: 0 18px 0 18px"
@@ -200,7 +201,7 @@
             alt=""
             alt=""
             style="width: 22px; height: 22px; margin: 0 18px"
             style="width: 22px; height: 22px; margin: 0 18px"
           />
           />
-          <span>系统通知</span>
+          <span>系统设置</span>
         </el-menu-item>
         </el-menu-item>
       </div>
       </div>
 
 
@@ -244,9 +245,8 @@ const store = useStore();
 const router = useRouter();
 const router = useRouter();
 
 
 const menuClose = ref(false);
 const menuClose = ref(false);
-const activeIndex = ref(1);
-const acitveItems = reactive({ list: [] });
-const roles = ref();
+const activeIndex = ref();
+const roleData = ref();
 
 
 watch(
 watch(
   () => store.state.user.collapse,
   () => store.state.user.collapse,
@@ -254,10 +254,18 @@ watch(
     menuClose.value = newValue;
     menuClose.value = newValue;
   }
   }
 );
 );
+// watch(
+//   () => store.state.user.activeIndex,
+//   (newValue, oldValue) => {
+//     console.log(newValue);
+//     activeIndex.value = newValue;
+//   }
+// );
 watch(
 watch(
-  () => store.state.user.activeIndex,
+  () => router.currentRoute.value.fullPath,
   (newValue, oldValue) => {
   (newValue, oldValue) => {
     console.log(newValue);
     console.log(newValue);
+    store.commit("indexUp", newValue);
     activeIndex.value = newValue;
     activeIndex.value = newValue;
   }
   }
 );
 );
@@ -265,16 +273,17 @@ watch(
 const handleSelect = (key, keyPath) => {
 const handleSelect = (key, keyPath) => {
   // store.commit("indexUp", key);
   // store.commit("indexUp", key);
   // activeIndex.value = key;
   // activeIndex.value = key;
-  // sessionStorage.setItem("sidevarItem", key);
-  console.log(key, keyPath);
-
+  // sessionStorage.setItem("activeItem", key);
+  // console.log(key, keyPath);
   router.push({
   router.push({
     path: `${key}`,
     path: `${key}`,
   });
   });
 
 
-  activeIndex.value = key;
-  store.commit("indexUp", key);
-  sessionStorage.setItem("sidevarItem", key);
+  // activeIndex.value = key;
+  // console.log(key);
+
+  // store.commit("indexUp", key);
+  // sessionStorage.setItem("activeItem", key);
   // if (activeIndex.value == 1) {
   // if (activeIndex.value == 1) {
   //   router.push({
   //   router.push({
   //     path: `/seniorCelebrity/order`,
   //     path: `/seniorCelebrity/order`,
@@ -283,8 +292,226 @@ const handleSelect = (key, keyPath) => {
 };
 };
 onBeforeMount(() => {
 onBeforeMount(() => {
   activeIndex.value = sessionStorage.getItem("sidevarItem");
   activeIndex.value = sessionStorage.getItem("sidevarItem");
-  roles.value = store.state.user.roles;
-  console.log(roles.value);
+  let arr = JSON.parse(sessionStorage.getItem("roleList"));
+  let roles = [];
+  arr.forEach((i) => {
+    // 房态管理
+    if (i.path == "roomStatus") {
+      roles.push({
+        name: "roomStatus",
+        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") {
+      roles.push({
+        name: "order",
+        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") {
+      roles.push({
+        name: "statement",
+        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" || 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") {
+      roles.push({
+        name: "account",
+        meta: { isAuth: true, title: "账号管理" },
+      });
+    }
+    // 系统管理
+    else if (i.path == "system") {
+      roles.push({
+        name: "system",
+        meta: { isAuth: true, title: "系统管理" },
+      });
+    }
+  });
+  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,"整理后的路由");
 });
 });
 </script>
 </script>
 
 
@@ -298,7 +525,7 @@ onBeforeMount(() => {
   height: calc(100vh);
   height: calc(100vh);
 }
 }
 .el-menu {
 .el-menu {
-  // width: 100%;
+  width: 220px;
   height: 100%;
   height: 100%;
   background: rgba(24, 51, 82, 1);
   background: rgba(24, 51, 82, 1);
   box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.16);
   box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.16);

+ 72 - 24
src/layout/sidebar/SidevarItem.vue

@@ -41,8 +41,10 @@
           <template #title>
           <template #title>
             <img
             <img
               v-if="
               v-if="
+                activeIndex == '/hotel/building' ||
                 activeIndex == '/hotel/roomType' ||
                 activeIndex == '/hotel/roomType' ||
-                activeIndex == '/hotel/roomPrice'
+                activeIndex == '/hotel/roomList' ||
+                activeIndex == '/hotel/roomPrice' 
               "
               "
               src="@/assets/icons/roomTypeS.png"
               src="@/assets/icons/roomTypeS.png"
               style="width: 20px; height: 20px; margin: 0 20px 0 18px"
               style="width: 20px; height: 20px; margin: 0 20px 0 18px"
@@ -145,12 +147,14 @@
             </template>
             </template>
           </el-menu-item>
           </el-menu-item>
         </el-sub-menu>
         </el-sub-menu>
-        <!-- 组织架构 -->
-        <el-sub-menu index="users" v-if="item.name == 'users'">
+        <!-- 账号管理 -->
+        <el-sub-menu index="users" v-if="item.name == 'accounts'">
           <template #title>
           <template #title>
             <img
             <img
               v-if="
               v-if="
                 activeIndex == '/hotel/user' ||
                 activeIndex == '/hotel/user' ||
+                activeIndex == '/hotel/account' ||
+                activeIndex == '/hotel/staff' ||
                 activeIndex == '/hotel/userRoles'
                 activeIndex == '/hotel/userRoles'
               "
               "
               src="@/assets/icons/userS.png"
               src="@/assets/icons/userS.png"
@@ -172,7 +176,7 @@
           </el-menu-item>
           </el-menu-item>
         </el-sub-menu>
         </el-sub-menu>
         <!-- 账号管理 -->
         <!-- 账号管理 -->
-        <el-menu-item v-if="item.name == 'account'" index="/hotel/account">
+        <!-- <el-menu-item v-if="item.name == 'account'" index="/hotel/account">
           <img
           <img
             v-if="activeIndex == '/hotel/account'"
             v-if="activeIndex == '/hotel/account'"
             src="@/assets/icons/accountS.png"
             src="@/assets/icons/accountS.png"
@@ -186,7 +190,7 @@
             style="width: 22px; height: 22px; margin: 0 18px"
             style="width: 22px; height: 22px; margin: 0 18px"
           />
           />
           <span>账号管理</span>
           <span>账号管理</span>
-        </el-menu-item>
+        </el-menu-item> -->
         <!-- 系统通知 -->
         <!-- 系统通知 -->
         <el-menu-item v-if="item.name == 'system'" index="/hotel/system">
         <el-menu-item v-if="item.name == 'system'" index="/hotel/system">
           <img
           <img
@@ -303,7 +307,7 @@ onBeforeMount(() => {
       });
       });
     }
     }
     // 房型管理
     // 房型管理
-    else if (i.path == "roomType" || i.path == "roomPrice") {
+    else if (i.path == "building" || i.path == "roomType" || i.path == "roomList" || i.path == "roomPrice" ) {
       let flag=roles.some(item=>{
       let flag=roles.some(item=>{
         return item.name=='roomTypes'
         return item.name=='roomTypes'
       })
       })
@@ -382,15 +386,15 @@ onBeforeMount(() => {
         });
         });
       }
       }
     }
     }
-    // 组织架构 
-    else if (i.path == "user" || i.path == "userRoles") {
+    // 账号管理 
+    else if (i.path == "userRoles" || i.path == "account" || i.path == "staff" || i.path == "user") {
       let flag=roles.some(item=>{
       let flag=roles.some(item=>{
-        return item.name=='users'
+        return item.name=='accounts'
       })
       })
       if(!flag){
       if(!flag){
         roles.push({
         roles.push({
-          name: "users",
-          meta: { isAuth: true, title: "组织架构", sign: "roomTypes" },
+          name: "accounts",
+          meta: { isAuth: true, title: "账号管理", sign: "accounts" },
           children: [
           children: [
             // {
             // {
             //   name: "user",
             //   name: "user",
@@ -404,23 +408,34 @@ onBeforeMount(() => {
         });
         });
       }
       }
     }
     }
-    // 账号管理
-    else if (i.path == "account") {
-      roles.push({
-        name: "account",
-        meta: { isAuth: true, title: "账号管理" },
-      });
-    }
+    // // 账号管理
+    // else if (i.path == "account") {
+    //   roles.push({
+    //     name: "account",
+    //     meta: { isAuth: true, title: "账号管理" },
+    //   });
+    // }
     // 系统管理
     // 系统管理
     else if (i.path == "system") {
     else if (i.path == "system") {
       roles.push({
       roles.push({
         name: "system",
         name: "system",
-        meta: { isAuth: true, title: "系统管理" },
+        meta: { isAuth: true, title: "系统设置" },
       });
       });
     }
     }
   });
   });
   let roleArr=[]
   let roleArr=[]
   arr.forEach(i=>{
   arr.forEach(i=>{
+    //房型管理  楼栋单元管理
+    if(i.path == "building"){
+      roles.forEach(item=>{
+        if(item.name=='roomTypes'){
+          item.children.push( {
+            name: "building",
+            meta: { isAuth: true, title: "楼栋单元管理" },
+          },)
+        }
+      })
+    }
     //房型管理  房型管理
     //房型管理  房型管理
     if(i.path == "roomType"){
     if(i.path == "roomType"){
       roles.forEach(item=>{
       roles.forEach(item=>{
@@ -432,6 +447,17 @@ onBeforeMount(() => {
         }
         }
       })
       })
     }
     }
+    //房型管理  房间列表
+    if(i.path == "roomList"){
+      roles.forEach(item=>{
+        if(item.name=='roomTypes'){
+          item.children.push( {
+            name: "roomList",
+            meta: { isAuth: true, title: "房间列表" },
+          },)
+        }
+      })
+    }
     //房型管理  房价管理
     //房型管理  房价管理
     else if(i.path == "roomPrice"){
     else if(i.path == "roomPrice"){
       roles.forEach(item=>{
       roles.forEach(item=>{
@@ -487,10 +513,10 @@ onBeforeMount(() => {
         }
         }
       })
       })
     }
     }
-    //组织架构  用户管理
+    //账号管理  用户管理
     else if(i.path == "user"){
     else if(i.path == "user"){
       roles.forEach(item=>{
       roles.forEach(item=>{
-        if(item.name=='users'){
+        if(item.name=='accounts'){
           item.children.push( {
           item.children.push( {
             name: "user",
             name: "user",
             meta: { isAuth: true, title: "用户管理" },
             meta: { isAuth: true, title: "用户管理" },
@@ -498,13 +524,35 @@ onBeforeMount(() => {
         }
         }
       })
       })
     }
     }
-    //组织架构  用户角色
+    //账号管理  员工管理
+    else if(i.path == "staff"){
+      roles.forEach(item=>{
+        if(item.name=='accounts'){
+          item.children.push( {
+            name: "staff",
+            meta: { isAuth: true, title: "员工管理" },
+          },)
+        }
+      })
+    }
+    //账号管理  账号管理
+    else if(i.path == "account"){
+      roles.forEach(item=>{
+        if(item.name=='accounts'){
+          item.children.push( {
+            name: "account",
+            meta: { isAuth: true, title: "账号管理" },
+          },)
+        }
+      })
+    }
+    //账号管理  用户角色
     else if(i.path == "userRoles"){
     else if(i.path == "userRoles"){
       roles.forEach(item=>{
       roles.forEach(item=>{
-        if(item.name=='users'){
+        if(item.name=='accounts'){
           item.children.push( {
           item.children.push( {
             name: "userRoles",
             name: "userRoles",
-            meta: { isAuth: true, title: "用户角色" },
+            meta: { isAuth: true, title: "角色管理" },
           },)
           },)
         }
         }
       })
       })

+ 12 - 12
src/router/index.js

@@ -24,22 +24,22 @@ const routes = [
     component: Layout,
     component: Layout,
     children: [
     children: [
       // {
       // {
-      //   path: "roomStatus",
-      //   name: "roomStatus",
-      //   meta: { isAuth: true, title: "房态管理" },
-      //   component: () => import("@/views/roomStatus/roomStatus.vue"),
+      //   path: "building",
+      //   name: "building",
+      //   meta: { isAuth: true, title: "楼栋单元管理" },
+      //   component: () => import("@/views/building/building.vue"),
       // },
       // },
       // {
       // {
-      //   path: "roomType",
-      //   name: "roomType",
-      //   meta: { isAuth: true, title: "房型管理" },
-      //   component: () => import("@/views/roomType/roomType.vue"),
+      //   path: "roomList",
+      //   name: "roomList",
+      //   meta: { isAuth: true, title: "房间列表" },
+      //   component: () => import("@/views/roomList/roomList.vue"),
       // },
       // },
       // {
       // {
-      //   path: "roomPrice",
-      //   name: "roomPrice",
-      //   meta: { isAuth: true, title: "房价管理" },
-      //   component: () => import("@/views/roomPrice/roomPrice.vue"),
+      //   path: "staff",
+      //   name: "staff",
+      //   meta: { isAuth: true, title: "员工管理" },
+      //   component: () => import("@/views/staff/staff.vue"),
       // },
       // },
       // {
       // {
       //   path: "order",
       //   path: "order",

+ 138 - 2
src/store/modules/user.js

@@ -333,6 +333,28 @@ const mutations = {
         });
         });
         arrFlag.roomStatus = roomStatus;
         arrFlag.roomStatus = roomStatus;
         // sessionStorage.setItem("roomStatus", JSON.stringify(roomStatus));
         // sessionStorage.setItem("roomStatus", JSON.stringify(roomStatus));
+      } else if (i.name == "楼栋单元管理") {
+        let building = {};
+        i.functionPoints.forEach((j) => {
+          if (j.functionPoint == "添加") {
+            building.tianjia = j.status;
+          } else if (j.functionPoint == "编辑") {
+            building.bianji = j.status;
+          } else if (j.functionPoint == "删除") {
+            building.shanchu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            building.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "楼栋单元管理",
+                path: "building",
+                route: "/hotel/building",
+              });
+            }
+          }
+        });
+        arrFlag.building = building;
+        // sessionStorage.setItem("roomType", JSON.stringify(roomType));
       } else if (i.name == "房型管理") {
       } else if (i.name == "房型管理") {
         let roomType = {};
         let roomType = {};
         i.functionPoints.forEach((j) => {
         i.functionPoints.forEach((j) => {
@@ -359,6 +381,30 @@ const mutations = {
         });
         });
         arrFlag.roomType = roomType;
         arrFlag.roomType = roomType;
         // sessionStorage.setItem("roomType", JSON.stringify(roomType));
         // sessionStorage.setItem("roomType", JSON.stringify(roomType));
+      } else if (i.name == "房间列表") {
+        let roomList = {};
+        i.functionPoints.forEach((j) => {
+          if (j.functionPoint == "添加") {
+            roomList.tianjia = j.status;
+          } else if (j.functionPoint == "编辑") {
+            roomList.bianji = j.status;
+          } else if (j.functionPoint == "删除") {
+            roomList.shanchu = j.status;
+          } else if (j.functionPoint == "导入") {
+            roomList.daoru = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            roomList.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "房间列表",
+                path: "roomList",
+                route: "/hotel/roomList",
+              });
+            }
+          }
+        });
+        arrFlag.roomList = roomList;
+        // sessionStorage.setItem("roomType", JSON.stringify(roomType));
       } else if (i.name == "房价管理") {
       } else if (i.name == "房价管理") {
         let roomPrice = {};
         let roomPrice = {};
         i.functionPoints.forEach((j) => {
         i.functionPoints.forEach((j) => {
@@ -591,7 +637,29 @@ const mutations = {
         });
         });
         arrFlag.account = account;
         arrFlag.account = account;
         // sessionStorage.setItem("account", JSON.stringify(account));
         // sessionStorage.setItem("account", JSON.stringify(account));
-      } else if (i.name == "系统管理") {
+      } else if (i.name == "员工管理") {
+        let staff = {};
+        i.functionPoints.forEach((j) => {
+          if (j.functionPoint == "添加") {
+            staff.tianjia = j.status;
+          } else if (j.functionPoint == "编辑") {
+            staff.bianji = j.status;
+          } else if (j.functionPoint == "删除") {
+            staff.shanchu = j.status;
+          } else if (j.functionPoint == "查看界面") {
+            staff.chakanjiemian = j.status;
+            if (j.status == 1) {
+              roleList.push({
+                name: "员工管理",
+                path: "staff",
+                route: "/hotel/staff",
+              });
+            }
+          }
+        });
+        arrFlag.staff = staff;
+        // sessionStorage.setItem("roomType", JSON.stringify(roomType));
+      } else if (i.name == "系统设置") {
         let system = {};
         let system = {};
         i.functionPoints.forEach((j) => {
         i.functionPoints.forEach((j) => {
           if (j.functionPoint == "退房设置") {
           if (j.functionPoint == "退房设置") {
@@ -723,6 +791,28 @@ const actions = {
             });
             });
             arrFlag.roomStatus = roomStatus;
             arrFlag.roomStatus = roomStatus;
             // sessionStorage.setItem("roomStatus", JSON.stringify(roomStatus));
             // sessionStorage.setItem("roomStatus", JSON.stringify(roomStatus));
+          } else if (i.name == "楼栋单元管理") {
+            let building = {};
+            i.functionPoints.forEach((j) => {
+              if (j.functionPoint == "添加") {
+                building.tianjia = j.status;
+              } else if (j.functionPoint == "编辑") {
+                building.bianji = j.status;
+              } else if (j.functionPoint == "删除") {
+                building.shanchu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                building.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "楼栋单元管理",
+                    path: "building",
+                    route: "/hotel/building",
+                  });
+                }
+              }
+            });
+            arrFlag.building = building;
+            // sessionStorage.setItem("roomType", JSON.stringify(roomType));
           } else if (i.name == "房型管理") {
           } else if (i.name == "房型管理") {
             let roomType = {};
             let roomType = {};
             i.functionPoints.forEach((j) => {
             i.functionPoints.forEach((j) => {
@@ -749,6 +839,30 @@ const actions = {
             });
             });
             arrFlag.roomType = roomType;
             arrFlag.roomType = roomType;
             // sessionStorage.setItem("roomType", JSON.stringify(roomType));
             // sessionStorage.setItem("roomType", JSON.stringify(roomType));
+          } else if (i.name == "房间列表") {
+            let roomList = {};
+            i.functionPoints.forEach((j) => {
+              if (j.functionPoint == "添加") {
+                roomList.tianjia = j.status;
+              } else if (j.functionPoint == "编辑") {
+                roomList.bianji = j.status;
+              } else if (j.functionPoint == "删除") {
+                roomList.shanchu = j.status;
+              } else if (j.functionPoint == "导入") {
+                roomList.daoru = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                roomList.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "房间列表",
+                    path: "roomList",
+                    route: "/hotel/roomList",
+                  });
+                }
+              }
+            });
+            arrFlag.roomList = roomList;
+            // sessionStorage.setItem("roomType", JSON.stringify(roomType));
           } else if (i.name == "房价管理") {
           } else if (i.name == "房价管理") {
             let roomPrice = {};
             let roomPrice = {};
             i.functionPoints.forEach((j) => {
             i.functionPoints.forEach((j) => {
@@ -981,7 +1095,29 @@ const actions = {
             });
             });
             arrFlag.account = account;
             arrFlag.account = account;
             // sessionStorage.setItem("account", JSON.stringify(account));
             // sessionStorage.setItem("account", JSON.stringify(account));
-          } else if (i.name == "系统管理") {
+          } else if (i.name == "员工管理") {
+            let staff = {};
+            i.functionPoints.forEach((j) => {
+              if (j.functionPoint == "添加") {
+                staff.tianjia = j.status;
+              } else if (j.functionPoint == "编辑") {
+                staff.bianji = j.status;
+              } else if (j.functionPoint == "删除") {
+                staff.shanchu = j.status;
+              } else if (j.functionPoint == "查看界面") {
+                staff.chakanjiemian = j.status;
+                if (j.status == 1) {
+                  roleList.push({
+                    name: "员工管理",
+                    path: "staff",
+                    route: "/hotel/staff",
+                  });
+                }
+              }
+            });
+            arrFlag.staff = staff;
+            // sessionStorage.setItem("roomType", JSON.stringify(roomType));
+          } else if (i.name == "系统设置") {
             let system = {};
             let system = {};
             i.functionPoints.forEach((j) => {
             i.functionPoints.forEach((j) => {
               if (j.functionPoint == "退房设置") {
               if (j.functionPoint == "退房设置") {

+ 1 - 0
src/views/account/account.vue

@@ -1014,6 +1014,7 @@ onUnmounted(() => {
     width: calc(100% - 60px);
     width: calc(100% - 60px);
     flex:1;
     flex:1;
     margin: 0 auto;
     margin: 0 auto;
+    overflow: auto;
     .el-table--fit {
     .el-table--fit {
       height: calc(100% - 60px);
       height: calc(100% - 60px);
       :deep(.el-table__header-wrapper) {
       :deep(.el-table__header-wrapper) {

+ 731 - 0
src/views/building/building.vue

@@ -0,0 +1,731 @@
+<template>
+  <div class="content-box">
+    <div class="left">
+      <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
+      <span class="cameratxt">楼栋单元管理</span>
+    </div>
+    <div class="scroll">
+      <div class="middle">
+        <div class="filter">
+          <div class="condition">
+            <el-input
+              clearable
+              v-model="searchInput.name"
+              class="w-50 m-2"
+              placeholder="请输入关键字"
+              style="width: 180px"
+              @clear="searchBtn"
+            />
+          </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" v-if="flagBtn.tianjia==1" color="rgba(0, 97, 255, 1)" @click="addlist"
+            ><img
+              src="@/assets/add.png"
+              style="width: 14px; height: 14px; margin-right: 4px"
+              alt=""
+            /><span>新增楼栋单元</span></el-button
+          >
+        </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="building" label="楼栋" />
+          <el-table-column align="center" prop="element" label="单元">
+          </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 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="520"
+          :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-form-item label="楼栋 :" prop="build">
+              <el-input
+                v-model="ruleForm.build"
+                placeholder="请输入楼栋"
+                clearable
+              />
+            </el-form-item>
+            <el-form-item label="单元 :" prop="unit">
+              <el-input
+                v-model="ruleForm.unit"
+                placeholder="请输入单元"
+                clearable
+              />
+            </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>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import {
+  ref,
+  watch,
+  reactive,
+  nextTick,
+  onBeforeMount,
+  onUnmounted,
+} from "vue";
+import { useRouter } from "vue-router";
+import { ElMessage, ElMessageBox } from "element-plus";
+import { Calendar } from "@element-plus/icons-vue";
+import { dayjs } from "element-plus";
+import lodash, { reduce } from "lodash";
+import axios from "axios";
+import { useStore } from "vuex";
+const store = useStore();
+const router = useRouter();
+// 表格数据
+const loading = ref(false);
+const tableData = reactive({
+  list: [],
+});
+const activeIndex = ref(); // 默认跳转路由
+const dialongTitle = ref("新增楼栋单元"); // 弹窗标题
+
+const searchInput = reactive({
+  status: "",
+  name: "",
+  createTime: "",
+}); // 搜索按钮数据
+const flagBtn = ref(); // 按钮权限
+
+watch(
+  () => searchInput.createTime,
+  (newVal, oldVal) => {
+    console.log("监听时间:", newVal);
+    if (newVal == null) {
+      getList();
+    }
+  }
+);
+
+const currentPage = ref(1); // 当前页
+const pageSize = ref(10);
+const total = ref(); // 当前总数
+
+const api = ref("");
+const schoolCardList = ref();
+const schoolCardSearch = ref(); // 微信卡号下拉框搜索词
+const schoolCardPage = ref(1);
+const schoolCardSize = ref(20);
+const schoolCardTotalPage = ref();
+const addDialogVisible = ref(false); // 控制添加账号弹窗
+const editMemberTree = ref(); // 角色ref
+const roleData = ref(); // 角色列表
+
+const defaultProps = ref({
+  children: "children",
+  label: "name",
+});
+// 表单数据
+const formSize = ref("default");
+const ruleFormRef = ref();
+const ruleForm = reactive({
+  build: "",
+  unit: "",
+  id: "",
+});
+// 表单验证
+const rules = reactive({
+  build: [
+    { required: true, message: "楼栋不能为空", trigger: "blur" },
+  ],
+  unit: [
+    { required: true, message: "单元不能为空", trigger: "blur" },
+  ],
+
+  // desc: [{ required: true, message: "Please input activity form", trigger: "blur" }],
+});
+
+// 获取账户列表
+const getList = async () => {
+  loading.value = true;
+  let data = {
+    page: currentPage.value, // 当前页
+    size: pageSize.value, // 一页数据条数
+    // permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+    keyWord: searchInput.name,
+  };
+  // if (searchInput.createTime) {
+  //   data.startTime = searchInput.createTime[0];
+  //   data.endTime = searchInput.createTime[1];
+  // }
+  let res = await axios({
+    method: "get",
+    url: api.value + "/building/list",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+    params: data,
+  });
+  console.log(res, "楼栋管理");
+  if (res.data.code == 200) {
+    tableData.list = res.data.data.records;
+    total.value = res.data.data.total;
+    loading.value = false;
+    // ElMessage({
+    //   type: "success",
+    //   showClose: true,
+    //   message: res.data.message,
+    //   center: true,
+    // });
+  } else {
+    loading.value = false;
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+
+// 搜索功能
+const searchBtn = lodash.debounce(async () => {
+  getList();
+}, 300);
+
+// 添加账号
+const addlist = () => {
+  dialongTitle.value = "新增楼栋单元";
+  addDialogVisible.value = true;
+  ruleForm.build = "";
+  ruleForm.unit = "";
+  ruleForm.id = "";
+};
+
+// 取消添加员工
+const cancelAdd = () => {
+  addDialogVisible.value = false;
+  ruleFormRef.value.resetFields();
+};
+//编辑按钮
+const edit = (row) => {
+  console.log(row);
+  dialongTitle.value = "编辑楼栋单元";
+  addDialogVisible.value = true;
+  ruleForm.build = row.building;
+  ruleForm.unit = row.element;
+  ruleForm.id = row.id;
+};
+// 确认添加员工
+const submitAdd = lodash.debounce(async (formEl) => {
+  if (!formEl) return;
+  await formEl.validate(async (valid, fields) => {
+    if (valid) {
+      if (ruleForm.id) {
+         let data = {
+          id:ruleForm.id,
+        	"building": ruleForm.build,
+        	"element": ruleForm.unit
+        };
+        let res = await axios({
+          method: "post",
+          url: api.value + "/building/update",
+          headers: {
+            token: sessionStorage.getItem("token"),
+            user_head: sessionStorage.getItem("user_head"),
+          },
+          data: data,
+        });
+        console.log(res, "编辑楼栋管理");
+        if (res.data.code == 200) {
+          getList();
+          ElMessage({
+            type: "success",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+          addDialogVisible.value = false;
+          ruleFormRef.value.resetFields();
+        } else {
+          ElMessage({
+            type: "error",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        }
+      } else {
+        let data = {
+        	"building": ruleForm.build,
+        	"element": ruleForm.unit
+        }
+        let res = await axios({
+          method: "post",
+          url: api.value + "/building/save",
+          headers: {
+            token: sessionStorage.getItem("token"),
+            user_head: sessionStorage.getItem("user_head"),
+          },
+          data: data,
+        });
+        console.log(res, "添加楼栋");
+        if (res.data.code == 200) {
+          getList();
+          ElMessage({
+            type: "success",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+          addDialogVisible.value = false;
+          ruleFormRef.value.resetFields();
+        } else {
+          ElMessage({
+            type: "error",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        }
+      }
+    } else {
+      console.log("error submit!", fields);
+    }
+  });
+}, 1000);
+
+//删除按钮
+const del = async (row) => {
+  // console.log(row);
+  let data = {
+    buildingId: row.id,
+    // permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+  };
+  let res = await axios({
+    method: "get",
+    url: api.value + "/building/delete",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+    params: data,
+  });
+  if (res.data.code == 200) {
+    if (tableData.list.length == 1 && currentPage.value != 1) {
+      currentPage.value = currentPage.value - 1;
+    }
+    getList();
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+  // console.log(res);
+};
+// 取消删除
+const cancelEvent = () => {
+  ElMessage({
+    type: "info",
+    showClose: true,
+    message: "取消删除",
+    center: true,
+  });
+};
+
+// 多选框功能
+// const handleSelectionChange = (val) => {
+//   console.log(val);
+//   selectData.list = val;
+// };
+
+// 表格斑马纹颜色修改
+const tableRowClassName = ({ row, rowIndex }) => {
+  if (rowIndex % 2 === 0) {
+    return "even";
+  } else if (rowIndex % 2 !== 0) {
+    return "odd";
+  }
+  return "";
+};
+// 分页
+const handleCurrentChange = (value) => {
+  // console.log(value);
+  currentPage.value = value;
+  getList();
+};
+
+onBeforeMount(() => {
+  api.value = store.state.user.api;
+  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
+  flagBtn.value = btnflag.account;
+  console.log(flagBtn.value, "按钮权限");
+
+  getList();
+});
+onUnmounted(() => {
+  // document.removeEventListener("keyup", Enters);
+});
+</script>
+
+<style scoped lang="scss">
+.content-box {
+  width: calc(100% - 40px);
+  height: calc(100% - 105px);
+  margin: 20px auto;
+  background-color: #fff;
+  color: #fff;
+  display: flex;
+  flex-direction: column;
+  box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
+
+  .left {
+    // width: calc(100wh - 40px);
+    display: flex;
+    align-items: center;
+    height: 60px;
+    margin: 0 30px;
+    border-bottom: 1px solid #ccc;
+    color: #000;
+    font-size: 18px;
+    font-weight: 600;
+    .camera {
+      margin-right: 15px;
+      color: #4392f7;
+    }
+  }
+  .scroll{
+    width:calc(100% );
+    height: calc(100% - 61px);
+    display:flex;
+    flex-direction:column;
+  }
+  .middle {
+    width: calc(100% - 60px);
+    margin: 0 auto;
+
+    color: #000;
+    // border-bottom: 1px solid rgb(231, 231, 231);
+    .filter {
+      display: flex;
+      flex-wrap: wrap;
+      align-items: center;
+        // margin: 10px 0 0 0;
+      .search {
+        margin-left: 0 !important;
+        color: #fff;
+      }
+      .condition {
+        display: flex;
+        align-items: center;
+        margin: 10px 30px 10px 0;
+        :deep(.el-input .el-input__inner) {
+          font-size: 14px;
+        }
+        span {
+          margin: 0 10px 0 0;
+        }
+      }
+    }
+    .gongneng {
+      margin: 10px 0;
+      .el-button {
+        color: #fff;
+        margin-right: 15px;
+      }
+    }
+    :deep(.cont) {
+      width: 60%;
+      margin: 20px auto;
+    }
+    :deep(.download) {
+      display: flex;
+      align-items: center;
+      margin: 10px;
+    }
+    :deep(.download span) {
+      font-size: 16px;
+      margin-left: 20px;
+    }
+    :deep(.cont .el-button) {
+      margin-left: 60px;
+      margin-bottom: 30px;
+    }
+
+    :deep(.cont .accomplish) {
+      width: 100%;
+      display: flex;
+      justify-content: center;
+    }
+    :deep(.cont .accomplish .el-button) {
+      width: 50%;
+      margin: 0;
+    }
+  }
+  .footer {
+    width: calc(100% - 60px);
+    flex:1;
+    margin: 0 auto;
+    .el-table--fit {
+      height: calc(100% - 60px);
+      :deep(.el-table__header-wrapper) {
+        background-color: #000;
+        font-size: 15px;
+        color: #000;
+        .cell {
+          color: #000;
+        }
+      }
+      :deep(.el-table__row) {
+        height: 50px;
+        font-size: 15px;
+        color: #000;
+      }
+      :deep(.el-table__row td) {
+        padding: 0;
+        border: 0;
+      }
+
+      .el-button--primary {
+        margin-left: 5px;
+      }
+      :deep(.el-table__body .even) {
+        background-color: #fff;
+      }
+      :deep(.el-table__body .odd) {
+        background-color: rgba(240, 243, 247, 1);
+      }
+      :deep(.options) {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .reset {
+          color: rgba(9, 101, 98, 1);
+          cursor: pointer;
+        }
+        .look {
+          margin: 0 15px;
+          color: rgba(30, 125, 251, 1);
+          cursor: pointer;
+        }
+        .del {
+          color: rgba(212, 48, 48, 1);
+          cursor: pointer;
+        }
+      }
+    }
+
+    // 添加员工弹窗样式
+    :deep(.addStaff) {
+      //   height: 420px;
+      border-radius: 11px;
+      .el-dialog__header {
+        border-radius: 11px 11px 0 0;
+        background: rgba(237, 241, 245, 1);
+        font-weight: 600;
+        margin: 0;
+        .el-dialog__headerbtn {
+          outline: none;
+        }
+      }
+      .el-dialog__body {
+        padding: 20px 20px 10px 20px;
+        .el-input {
+          width: 200px;
+          .el-input__suffix-inner {
+            color: rgba(61, 81, 232, 1);
+          }
+        }
+
+        .options {
+          margin: 40px 20px 20px 0;
+          width: 100%;
+          .el-form-item__content {
+            display: flex;
+            flex-direction: row-reverse;
+          }
+          .queding {
+            color: #fff;
+            margin-left: 15px;
+          }
+        }
+      }
+    }
+  }
+
+  .pageSize {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin: 0 30px;
+    height:60px;
+
+    span {
+      color: #000;
+    }
+
+    .el-pagination {
+      // width: 1600px;
+      :deep(.el-pagination__total) {
+        color: #000;
+      }
+
+      :deep(.el-pagination__goto) {
+        color: #000;
+      }
+
+      :deep(.el-pagination__classifier) {
+        color: #000;
+      }
+
+      :deep(.el-input__wrapper) {
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        box-shadow: none;
+      }
+
+      :deep(.el-pager li) {
+        margin: 0 5px;
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        background-color: transparent;
+      }
+
+      :deep(.el-pager li.is-active) {
+        // background-color: rgba(0, 97, 255, 0.8);
+        border: 1px solid rgba(0, 97, 255, 1);
+        color: rgba(0, 97, 255, 1);
+      }
+
+      :deep(.btn-prev) {
+        margin-right: 5px;
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        background-color: transparent;
+      }
+
+      :deep(.btn-next) {
+        margin-left: 5px;
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        background-color: transparent;
+      }
+    }
+  }
+}
+.el-input {
+  width: 192px;
+}
+</style>
+<style lang="scss">
+//添加成员 联系人下拉框样式
+.more-tag-data {
+  // border: 1px solid red;
+  .el-select-dropdown__wrap {
+    height: 200px;
+  }
+}
+.el-popper {
+  .addStudentMore {
+    text-align: center;
+  }
+}
+</style>

+ 270 - 125
src/views/doorLock/doorLock.vue

@@ -36,6 +36,37 @@
               @click="bulkImportClick"
               @click="bulkImportClick"
               >批量导入</el-button
               >批量导入</el-button
             >
             >
+            <div class="condition" style="margin-left:30px">
+              <span>楼栋单元</span>
+              <el-select
+                v-model="searchInput.buildingId"
+                placeholder="请选择楼栋单元"
+                style="width: 200px;margin-left: 20px"
+                @change="searchBtn"
+                :clearable="true"
+              >
+                <el-option
+                  v-for="item in buildData"
+                  :key="item.id"
+                  :label="`${item.building}${item.element}`"
+                  :value="item.id"
+                />
+              </el-select>
+            </div>
+            <div class="condition">
+              <span>房间类型</span>
+              <el-select
+                style="width: 180px; margin-left: 20px"
+                v-model="searchInput.houseType"
+                class="m-2"
+                placeholder="请选择类型"
+                :clearable="true"
+                @change="searchBtn"
+              >
+                <el-option label="全日房" value="1" />
+                <el-option label="钟点房" value="2" />
+              </el-select>
+            </div>
           </div>
           </div>
         </div>
         </div>
         <div class="changeItems">
         <div class="changeItems">
@@ -559,7 +590,7 @@
             <div class="keyTitle">
             <div class="keyTitle">
               <span class="txt">住客</span>
               <span class="txt">住客</span>
             </div>
             </div>
-            <el-collapse>
+            <el-collapse v-model="activeUser">
               <el-collapse-item name="1">
               <el-collapse-item name="1">
                 <div class="table">
                 <div class="table">
                   <el-table
                   <el-table
@@ -589,6 +620,8 @@
                         <span v-if="row.lockStatus == 1">密码</span>
                         <span v-if="row.lockStatus == 1">密码</span>
                         <span v-if="row.lockStatus == 2">卡片</span>
                         <span v-if="row.lockStatus == 2">卡片</span>
                         <span v-if="row.lockStatus == 3">指纹</span>
                         <span v-if="row.lockStatus == 3">指纹</span>
+                        <span v-if="row.lockStatus == 4">身份证</span>
+                        <span v-if="row.lockStatus == 5">钥匙</span>
                       </template>
                       </template>
                     </el-table-column>
                     </el-table-column>
                     <el-table-column
                     <el-table-column
@@ -663,28 +696,31 @@
           </div>
           </div>
           <div class="title titles">
           <div class="title titles">
             <div class="keyTitle">
             <div class="keyTitle">
-              <span class="txt">系统用户</span>
+              <span class="txt">员工</span>
               <div class="dropdown">
               <div class="dropdown">
                 <el-dropdown trigger="click" :hide-on-click="false">
                 <el-dropdown trigger="click" :hide-on-click="false">
                   <el-button type="primary"> 添加电子钥匙 </el-button>
                   <el-button type="primary"> 添加电子钥匙 </el-button>
                   <template #dropdown>
                   <template #dropdown>
                     <el-dropdown-menu>
                     <el-dropdown-menu>
+                      <el-dropdown-item @click="passManagementClick('系统')"
+                        >密码</el-dropdown-item
+                      >
+                      <el-dropdown-item @click="identityCardClick('系统','房卡')"
+                        >房卡</el-dropdown-item
+                      >
                       <el-dropdown-item @click="fingerprintClick('系统')"
                       <el-dropdown-item @click="fingerprintClick('系统')"
                         >指纹</el-dropdown-item
                         >指纹</el-dropdown-item
                       >
                       >
-                      <el-dropdown-item @click="identityCardClick('系统')"
-                        >卡片/身份证</el-dropdown-item
-                      >
-                      <el-dropdown-item @click="passManagementClick('系统')"
-                        >密码</el-dropdown-item
+                      <el-dropdown-item @click="identityCardClick('系统','身份证')"
+                        >身份证</el-dropdown-item
                       >
                       >
                     </el-dropdown-menu>
                     </el-dropdown-menu>
                   </template>
                   </template>
                 </el-dropdown>
                 </el-dropdown>
               </div>
               </div>
             </div>
             </div>
-            <el-collapse>
-              <el-collapse-item>
+            <el-collapse v-model="activeSystem">
+              <el-collapse-item name="2">
                 <div class="table">
                 <div class="table">
                   <el-table
                   <el-table
                     :row-class-name="tableRowClassName"
                     :row-class-name="tableRowClassName"
@@ -703,6 +739,7 @@
                       align="center"
                       align="center"
                       prop="phone"
                       prop="phone"
                       label="手机号"
                       label="手机号"
+                      width="130"
                     />
                     />
                     <el-table-column
                     <el-table-column
                       align="center"
                       align="center"
@@ -711,7 +748,7 @@
                     >
                     >
                       <template #default="{ row }">
                       <template #default="{ row }">
                         <span v-if="row.lockStatus == 1">密码</span>
                         <span v-if="row.lockStatus == 1">密码</span>
-                        <span v-if="row.lockStatus == 2">卡</span>
+                        <span v-if="row.lockStatus == 2">卡</span>
                         <span v-if="row.lockStatus == 3">指纹</span>
                         <span v-if="row.lockStatus == 3">指纹</span>
                         <span v-if="row.lockStatus == 4">身份证</span>
                         <span v-if="row.lockStatus == 4">身份证</span>
                       </template>
                       </template>
@@ -757,19 +794,19 @@
                     <el-table-column align="center" label="操作" width="200">
                     <el-table-column align="center" label="操作" width="200">
                       <template #default="scope">
                       <template #default="scope">
                         <div class="options">
                         <div class="options">
-                          <div
+                          <!-- <div
                             class="reset"
                             class="reset"
                             @click="fingerprintEdit(scope.row)"
                             @click="fingerprintEdit(scope.row)"
                           >
                           >
                             修改
                             修改
-                          </div>
+                          </div> -->
                           <el-popconfirm
                           <el-popconfirm
                             width="220"
                             width="220"
                             confirm-button-text="确认"
                             confirm-button-text="确认"
                             cancel-button-text="取消"
                             cancel-button-text="取消"
                             :icon="InfoFilled"
                             :icon="InfoFilled"
                             icon-color="#f89626"
                             icon-color="#f89626"
-                            title="是否删除此账号?"
+                            title="是否删除此用户?"
                             @confirm="fingerprintDel(scope.row)"
                             @confirm="fingerprintDel(scope.row)"
                             @cancel="cancelEvent"
                             @cancel="cancelEvent"
                           >
                           >
@@ -796,22 +833,25 @@
                   </el-button>
                   </el-button>
                   <template #dropdown>
                   <template #dropdown>
                     <el-dropdown-menu>
                     <el-dropdown-menu>
+                      <el-dropdown-item @click="passManagementClick('自定义')"
+                        >密码</el-dropdown-item
+                      >
+                      <el-dropdown-item @click="identityCardClick('自定义','房卡')"
+                        >房卡</el-dropdown-item
+                      >
                       <el-dropdown-item @click="fingerprintClick('自定义')"
                       <el-dropdown-item @click="fingerprintClick('自定义')"
                         >指纹</el-dropdown-item
                         >指纹</el-dropdown-item
                       >
                       >
-                      <el-dropdown-item @click="identityCardClick('自定义')"
-                        >卡片/身份证</el-dropdown-item
-                      >
-                      <el-dropdown-item @click="passManagementClick('自定义')"
-                        >密码</el-dropdown-item
+                      <el-dropdown-item @click="identityCardClick('自定义','身份证')"
+                        >身份证</el-dropdown-item
                       >
                       >
                     </el-dropdown-menu>
                     </el-dropdown-menu>
                   </template>
                   </template>
                 </el-dropdown>
                 </el-dropdown>
               </div>
               </div>
             </div>
             </div>
-            <el-collapse>
-              <el-collapse-item>
+            <el-collapse v-model="activeCustom">
+              <el-collapse-item name="3">
                 <div class="table">
                 <div class="table">
                   <el-table
                   <el-table
                     :row-class-name="tableRowClassName"
                     :row-class-name="tableRowClassName"
@@ -830,6 +870,7 @@
                       align="center"
                       align="center"
                       prop="phone"
                       prop="phone"
                       label="手机号"
                       label="手机号"
+                      width="130"
                     />
                     />
                     <el-table-column
                     <el-table-column
                       align="center"
                       align="center"
@@ -838,7 +879,7 @@
                     >
                     >
                       <template #default="{ row }">
                       <template #default="{ row }">
                         <span v-if="row.lockStatus == 1">密码</span>
                         <span v-if="row.lockStatus == 1">密码</span>
-                        <span v-if="row.lockStatus == 2">卡</span>
+                        <span v-if="row.lockStatus == 2">卡</span>
                         <span v-if="row.lockStatus == 3">指纹</span>
                         <span v-if="row.lockStatus == 3">指纹</span>
                         <span v-if="row.lockStatus == 4">身份证</span>
                         <span v-if="row.lockStatus == 4">身份证</span>
                       </template>
                       </template>
@@ -884,14 +925,14 @@
                     <el-table-column align="center" label="操作" width="200">
                     <el-table-column align="center" label="操作" width="200">
                       <template #default="scope">
                       <template #default="scope">
                         <div class="options">
                         <div class="options">
-                          <div class="reset" @click="edit(scope.row)">修改</div>
+                          <!-- <div class="reset" @click="edit(scope.row)">修改</div> -->
                           <el-popconfirm
                           <el-popconfirm
                             width="220"
                             width="220"
                             confirm-button-text="确认"
                             confirm-button-text="确认"
                             cancel-button-text="取消"
                             cancel-button-text="取消"
                             :icon="InfoFilled"
                             :icon="InfoFilled"
                             icon-color="#f89626"
                             icon-color="#f89626"
-                            title="是否删除此账号?"
+                            title="是否删除此用户?"
                             @confirm="customDel(scope.row)"
                             @confirm="customDel(scope.row)"
                             @cancel="cancelEvent"
                             @cancel="cancelEvent"
                           >
                           >
@@ -940,7 +981,7 @@
           label-position="left"
           label-position="left"
           status-icon
           status-icon
         >
         >
-          <el-form-item
+          <!-- <el-form-item
             label="角色 :"
             label="角色 :"
             prop="level"
             prop="level"
             v-if="keypassflag == '系统'"
             v-if="keypassflag == '系统'"
@@ -953,25 +994,26 @@
               :show-all-levels="false"
               :show-all-levels="false"
               :clearable="false"
               :clearable="false"
             />
             />
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="用户 :" prop="name">
           <el-form-item label="用户 :" prop="name">
             <el-select
             <el-select
               v-model="passManagementRuleForm.name"
               v-model="passManagementRuleForm.name"
               class="m-2"
               class="m-2"
-              placeholder="先选角色,再请选择用户"
-              style="width: 214px"
+              placeholder="请选择用户"
+              style="width: 500px"
+              @change="staffChange($event,'密码')"
               v-if="keypassflag == '系统'"
               v-if="keypassflag == '系统'"
             >
             >
               <el-option
               <el-option
-                v-for="i in fingerprintChangeList"
-                :label="i.name"
+                v-for="i in staffList"
+                :label="`${i.userName} ( ${i.department} )`"
                 :value="i.id"
                 :value="i.id"
               />
               />
             </el-select>
             </el-select>
             <el-input
             <el-input
               v-model="passManagementRuleForm.name"
               v-model="passManagementRuleForm.name"
               placeholder="请输入用户"
               placeholder="请输入用户"
-              style="width: 214px"
+              style="width: 500px"
               v-if="keypassflag == '自定义'"
               v-if="keypassflag == '自定义'"
             >
             >
             </el-input>
             </el-input>
@@ -984,7 +1026,7 @@
             <el-input
             <el-input
               v-model="passManagementRuleForm.phone"
               v-model="passManagementRuleForm.phone"
               placeholder="请输入号码"
               placeholder="请输入号码"
-              style="width: 214px"
+              style="width: 500px"
             >
             >
             </el-input>
             </el-input>
           </el-form-item>
           </el-form-item>
@@ -1060,20 +1102,11 @@
           label-position="left"
           label-position="left"
           status-icon
           status-icon
         >
         >
-          <el-form-item
+          <!-- <el-form-item
             label="角色 :"
             label="角色 :"
             prop="level"
             prop="level"
             v-if="keypassflag == '系统'"
             v-if="keypassflag == '系统'"
           >
           >
-            <!-- <el-select
-              v-model="fingerprintRuleForm.level"
-              class="m-2"
-              placeholder="请选择角色"
-              style="width: 200px"
-            >
-              <el-option label="角色一" :value="1" />
-              <el-option label="角色二" :value="2" />
-            </el-select> -->
             <el-cascader
             <el-cascader
               @change="fingerprintChange"
               @change="fingerprintChange"
               v-model="fingerprintRuleForm.level"
               v-model="fingerprintRuleForm.level"
@@ -1082,18 +1115,19 @@
               :show-all-levels="false"
               :show-all-levels="false"
               :clearable="false"
               :clearable="false"
             />
             />
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="用户 :" prop="name">
           <el-form-item label="用户 :" prop="name">
             <el-select
             <el-select
               v-model="fingerprintRuleForm.name"
               v-model="fingerprintRuleForm.name"
               class="m-2"
               class="m-2"
-              placeholder="先选角色,再请选择用户"
+              placeholder="请选择用户"
               style="width: 214px"
               style="width: 214px"
+              @change="staffChange($event,'指纹')"
               v-if="keypassflag == '系统'"
               v-if="keypassflag == '系统'"
             >
             >
               <el-option
               <el-option
-                v-for="i in fingerprintChangeList"
-                :label="i.name"
+                v-for="i in staffList"
+                :label="`${i.userName} ( ${i.department} )`"
                 :value="i.id"
                 :value="i.id"
               />
               />
             </el-select>
             </el-select>
@@ -1217,7 +1251,7 @@
           label-position="left"
           label-position="left"
           status-icon
           status-icon
         >
         >
-          <el-form-item
+          <!-- <el-form-item
             label="角色 :"
             label="角色 :"
             prop="level"
             prop="level"
             v-if="keypassflag == '系统'"
             v-if="keypassflag == '系统'"
@@ -1230,18 +1264,19 @@
               :show-all-levels="false"
               :show-all-levels="false"
               :clearable="false"
               :clearable="false"
             />
             />
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="用户 :" prop="name">
           <el-form-item label="用户 :" prop="name">
             <el-select
             <el-select
               v-model="identityCardRuleForm.name"
               v-model="identityCardRuleForm.name"
               class="m-2"
               class="m-2"
-              placeholder="先选角色,再请选择用户"
+              placeholder="再请选择用户"
               style="width: 214px"
               style="width: 214px"
+              @change="staffChange($event,'房卡')"
               v-if="keypassflag == '系统'"
               v-if="keypassflag == '系统'"
             >
             >
               <el-option
               <el-option
-                v-for="i in fingerprintChangeList"
-                :label="i.name"
+                v-for="i in staffList"
+                :label="`${i.userName} ( ${i.department} )`"
                 :value="i.id"
                 :value="i.id"
               />
               />
             </el-select>
             </el-select>
@@ -1263,12 +1298,15 @@
               style="width: 214px"
               style="width: 214px"
             />
             />
           </el-form-item>
           </el-form-item>
-          <el-form-item label="类型 :" prop="cardType">
+          <!-- <el-form-item label="类型 :" prop="cardType">
             <el-radio-group v-model="identityCardRuleForm.cardType">
             <el-radio-group v-model="identityCardRuleForm.cardType">
-              <el-radio :value="0">卡片</el-radio>
-              <el-radio :value="1">身份证</el-radio>
+              <el-radio :value="1">密码</el-radio>
+              <el-radio :value="2">房卡</el-radio>
+              <el-radio :value="3">指纹</el-radio>
+              <el-radio :value="4">身份证</el-radio>
+              <el-radio :value="5">钥匙</el-radio>
             </el-radio-group>
             </el-radio-group>
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="卡号 :" prop="icCard">
           <el-form-item label="卡号 :" prop="icCard">
             <el-input
             <el-input
               v-model="identityCardRuleForm.icCard"
               v-model="identityCardRuleForm.icCard"
@@ -1426,7 +1464,10 @@ const tableData = reactive({
 
 
 const searchInput = reactive({
 const searchInput = reactive({
   keyWord: "",
   keyWord: "",
+  buildingId:"",
+  houseType:''
 }); // 搜索按钮数据
 }); // 搜索按钮数据
+const buildData = ref(); // 楼栋数据
 
 
 const roomTypes = ref(); // 房间类型数据
 const roomTypes = ref(); // 房间类型数据
 const roomTypeIndex = ref("全部"); // 选中的房间类型
 const roomTypeIndex = ref("全部"); // 选中的房间类型
@@ -1868,17 +1909,21 @@ const keyData = reactive({
   houseNumberId: "",
   houseNumberId: "",
   equipmentType: "",
   equipmentType: "",
 });
 });
+const activeUser=ref('1')
+const activeSystem=ref('2')
+const activeCustom=ref('3')
 const keyTitle = ref();
 const keyTitle = ref();
 const userList = ref(); // 用户
 const userList = ref(); // 用户
 const systemUserList = ref(); // 系统用户
 const systemUserList = ref(); // 系统用户
 const customList = ref(); // 自定义用户
 const customList = ref(); // 自定义用户
 const keypassflag = ref(''); // 添加系统或者自定义用户
 const keypassflag = ref(''); // 添加系统或者自定义用户
+const cardFlag = ref(''); // 判断是添加房卡还是身份证
 // 钥匙管理 密码管理(--------------------------------------------------------)
 // 钥匙管理 密码管理(--------------------------------------------------------)
 const passManagementVisible = ref(false);
 const passManagementVisible = ref(false);
 const passManagementIndex = ref(1); // 默认选中 时效密码
 const passManagementIndex = ref(1); // 默认选中 时效密码
 const passManagementRef = ref();
 const passManagementRef = ref();
 const passManagementRuleForm = reactive({
 const passManagementRuleForm = reactive({
-  level: '',
+  // level: '',
   name: "",
   name: "",
   phone: "",
   phone: "",
   effectiveTime: "",
   effectiveTime: "",
@@ -1922,6 +1967,8 @@ const passManagementRules = reactive({
   ],
   ],
 });
 });
 
 
+const staffList=ref();// 选择的员工数据
+
 // 钥匙管理 添加指纹(--------------------------------------------------------)
 // 钥匙管理 添加指纹(--------------------------------------------------------)
 const fingerprintVisible = ref(false);
 const fingerprintVisible = ref(false);
 const fingerprintRef = ref();
 const fingerprintRef = ref();
@@ -1931,7 +1978,7 @@ const fingerprintprops = {
   value: "id",
   value: "id",
 };
 };
 const fingerprintoptions = ref();
 const fingerprintoptions = ref();
-const fingerprintChangeList = ref();
+// const fingerprintChangeList = ref();
 const fingerprintRuleForm = reactive({
 const fingerprintRuleForm = reactive({
   level: "",
   level: "",
   name: "",
   name: "",
@@ -2146,6 +2193,29 @@ const changeTypes = (val) => {
   });
   });
 };
 };
 
 
+// 楼栋单元数据
+const schoolData = async () => {
+  let res = await axios({
+    method: "get",
+    url: api.value + "/building/beDisplayBar",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+  });
+  console.log(res, "楼栋单元下拉框");
+  if (res.data.code == 200) {
+    buildData.value = res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+
 // 查看员工列表
 // 查看员工列表
 const getList = async () => {
 const getList = async () => {
   loading.value = true;
   loading.value = true;
@@ -2153,6 +2223,8 @@ const getList = async () => {
     roomNumber: searchInput.keyWord,
     roomNumber: searchInput.keyWord,
     permissionSettingId: sessionStorage.getItem("permissionSettingId"),
     permissionSettingId: sessionStorage.getItem("permissionSettingId"),
     roomName: roomTypeIndex.value,
     roomName: roomTypeIndex.value,
+    buildingId:searchInput.buildingId,
+    houseType:searchInput.houseType
   };
   };
   if (roomTypeIndex.value == "全部") {
   if (roomTypeIndex.value == "全部") {
     data.roomName = "";
     data.roomName = "";
@@ -2169,10 +2241,14 @@ const getList = async () => {
   console.log(res, "门锁页面展示");
   console.log(res, "门锁页面展示");
   if (res.data.code == 200) {
   if (res.data.code == 200) {
     loading.value = false;
     loading.value = false;
+    let arr=[]
     res.data.data.forEach((item) => {
     res.data.data.forEach((item) => {
-      item.total = item.vos.length;
+      if(item.vos){
+        item.total = item.vos.length;
+        arr.push(item)
+      }
     });
     });
-    roomList.list = res.data.data;
+    roomList.list = arr;
   } else {
   } else {
     loading.value = false;
     loading.value = false;
     ElMessage({
     ElMessage({
@@ -2186,7 +2262,7 @@ const getList = async () => {
 
 
 // 搜索功能
 // 搜索功能
 const searchBtn = lodash.debounce(async () => {
 const searchBtn = lodash.debounce(async () => {
-  //   getList();
+    getList();
 }, 300);
 }, 300);
 
 
 // 消息列表 (---------------------------------------------------------------)
 // 消息列表 (---------------------------------------------------------------)
@@ -2689,7 +2765,7 @@ const keyListData = async () => {
   console.log(res, "住客,系统用户");
   console.log(res, "住客,系统用户");
   if (res.data.code == 200) {
   if (res.data.code == 200) {
     userList.value = res.data.data.order;
     userList.value = res.data.data.order;
-    systemUserList.value = res.data.data.system;
+    systemUserList.value = res.data.data.employee;
     customList.value = res.data.data.custom;
     customList.value = res.data.data.custom;
   } else {
   } else {
     ElMessage({
     ElMessage({
@@ -2700,13 +2776,63 @@ const keyListData = async () => {
     });
     });
   }
   }
 };
 };
+// 员工数据
+const staffData=async ()=>{
+  // let data = {
+  //   permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+  //   houseNumberId: keyData.houseNumberId,
+  // };
+  let res = await axios({
+    method: "get",
+    url: api.value + "/employeeUsers/getAllUser",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+  });
+  console.log(res, "员工数据");
+  if (res.data.code == 200) {
+    staffList.value=res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+}
+// 改变用户选择
+const staffChange=(val,flag)=>{
+  console.log(val,flag,'改变用户选择');
+  if(flag=='房卡'){
+    staffList.value.forEach(i=>{
+      if(i.id==val){
+        // console.log(i,'房卡  用户数据');
+        if(cardFlag.value=='房卡'){
+          identityCardRuleForm.icCard=""
+        }else if(cardFlag.value=='身份证'){
+          identityCardRuleForm.icCard=i.idCardInformation
+        }
+      }
+    })
+  }else if(flag=='指纹'){
+    staffList.value.forEach(i=>{
+      if(i.id==val){
+        console.log(i,'指纹  用户数据');
+        fingerprintRuleForm.fingerprintNum=i.fingerprint
+      }
+    })
+  }
+}
 const keyClick = async (row) => {
 const keyClick = async (row) => {
   console.log(row, "钥匙管理");
   console.log(row, "钥匙管理");
   keyTitle.value = row.roomNumber;
   keyTitle.value = row.roomNumber;
   keyData.houseNumberId = row.houseNumberId;
   keyData.houseNumberId = row.houseNumberId;
   keyData.equipmentType = row.equipmentType;
   keyData.equipmentType = row.equipmentType;
   keyVisible.value = true;
   keyVisible.value = true;
-  keyListData();
+  keyListData();// 住客,员工  自定义用户
+  staffData();// 员工筛选数据
 };
 };
 const cancelKey = () => {
 const cancelKey = () => {
   keyVisible.value = false;
   keyVisible.value = false;
@@ -2714,10 +2840,10 @@ const cancelKey = () => {
 // 钥匙管理 密码管理(-----------------------------------------------------------------)
 // 钥匙管理 密码管理(-----------------------------------------------------------------)
 const passManagementClick = (val) => {
 const passManagementClick = (val) => {
   keypassflag.value=val
   keypassflag.value=val
-  rolesList();
-  fingerprintChangeList.value=""
+  // rolesList();
+  // fingerprintChangeList.value=""
   passManagementVisible.value = true;
   passManagementVisible.value = true;
-  passManagementRuleForm.level = "";
+  // passManagementRuleForm.level = "";
   passManagementRuleForm.name = "";
   passManagementRuleForm.name = "";
   passManagementRuleForm.phone = "";
   passManagementRuleForm.phone = "";
   passManagementRuleForm.effectiveTime = "";
   passManagementRuleForm.effectiveTime = "";
@@ -2736,7 +2862,7 @@ const passManagementHandleClick = (value) => {
   console.log(value);
   console.log(value);
   passManagementRef.value.resetFields();
   passManagementRef.value.resetFields();
 };
 };
-// 确定发送
+// 确定密码
 const passManagementSend = (formEl) => {
 const passManagementSend = (formEl) => {
   if (!formEl) return;
   if (!formEl) return;
   formEl.validate(async (valid, fields) => {
   formEl.validate(async (valid, fields) => {
@@ -2755,7 +2881,7 @@ const passManagementSend = (formEl) => {
         };
         };
         let res = await axios({
         let res = await axios({
           method: "post",
           method: "post",
-          url: api.value + "/unlocking-admin/savePassWord",
+          url: api.value + "/unlocking-employee/savePassWord",
           headers: {
           headers: {
             token: sessionStorage.getItem("token"),
             token: sessionStorage.getItem("token"),
             user_head: sessionStorage.getItem("userhead"),
             user_head: sessionStorage.getItem("userhead"),
@@ -2848,63 +2974,65 @@ const randomCipher =async () => {
     });
     });
   }
   }
 };
 };
-// 获取管理端角色信息
-const rolesList = async () => {
-  let res = await axios({
-    method: "get",
-    url: api.value + "/admin-menu/getUserRole",
-    headers: {
-      token: sessionStorage.getItem("token"),
-      user_head: sessionStorage.getItem("userhead"),
-    },
-  });
-  console.log(res, "管理端角色");
-  if (res.data.code == 200) {
-    fingerprintoptions.value = res.data.data;
-  } else {
-    ElMessage({
-      type: "error",
-      showClose: true,
-      message: res.data.message,
-      center: true,
-    });
-  }
-};
-// 改变管理端角色  获取用户角色信息
-const fingerprintChange = async (val) => {
-  console.log(val);
-  let data = {
-    adminMenuId: val[val.length - 1],
-  };
-  let res = await axios({
-    method: "get",
-    url: api.value + "/admin/userList",
-    headers: {
-      token: sessionStorage.getItem("token"),
-      user_head: sessionStorage.getItem("userhead"),
-    },
-    params: data,
-  });
-  console.log(res, "用户角色");
-  if (res.data.code == 200) {
-    fingerprintChangeList.value = res.data.data;
-  } else {
-    ElMessage({
-      type: "error",
-      showClose: true,
-      message: res.data.message,
-      center: true,
-    });
-  }
-};
+
+// // 获取管理端角色信息
+// const rolesList = async () => {
+//   let res = await axios({
+//     method: "get",
+//     url: api.value + "/admin-menu/getUserRole",
+//     headers: {
+//       token: sessionStorage.getItem("token"),
+//       user_head: sessionStorage.getItem("userhead"),
+//     },
+//   });
+//   console.log(res, "管理端角色");
+//   if (res.data.code == 200) {
+//     fingerprintoptions.value = res.data.data;
+//   } else {
+//     ElMessage({
+//       type: "error",
+//       showClose: true,
+//       message: res.data.message,
+//       center: true,
+//     });
+//   }
+// };
+// // 改变管理端角色  获取用户角色信息
+// const fingerprintChange = async (val) => {
+//   console.log(val);
+//   let data = {
+//     adminMenuId: val[val.length - 1],
+//   };
+//   let res = await axios({
+//     method: "get",
+//     url: api.value + "/admin/userList",
+//     headers: {
+//       token: sessionStorage.getItem("token"),
+//       user_head: sessionStorage.getItem("userhead"),
+//     },
+//     params: data,
+//   });
+//   console.log(res, "用户角色");
+//   if (res.data.code == 200) {
+//     fingerprintChangeList.value = res.data.data;
+//   } else {
+//     ElMessage({
+//       type: "error",
+//       showClose: true,
+//       message: res.data.message,
+//       center: true,
+//     });
+//   }
+// };
+
 // 钥匙管理 添加指纹(-----------------------------------------------------------------)
 // 钥匙管理 添加指纹(-----------------------------------------------------------------)
 const fingerprintClick = (val) => {
 const fingerprintClick = (val) => {
   console.log("添加指纹",val);
   console.log("添加指纹",val);
   keypassflag.value=val
   keypassflag.value=val
-  rolesList();
-  fingerprintChangeList.value=""
+  // rolesList();
+  // fingerprintChangeList.value=""
   fingerprintVisible.value = true;
   fingerprintVisible.value = true;
-  fingerprintRuleForm.level = "";
+  // fingerprintRuleForm.level = "";
   fingerprintRuleForm.name = "";
   fingerprintRuleForm.name = "";
   fingerprintRuleForm.phone = "";
   fingerprintRuleForm.phone = "";
   fingerprintRuleForm.fingerprintNum = "";
   fingerprintRuleForm.fingerprintNum = "";
@@ -3034,7 +3162,7 @@ const fingerprintconfig = (formEl) => {
         };
         };
         let res = await axios({
         let res = await axios({
           method: "post",
           method: "post",
-          url: api.value + "/unlocking-admin/saveFingerprint",
+          url: api.value + "/unlocking-employee/saveFingerprint",
           headers: {
           headers: {
             token: sessionStorage.getItem("token"),
             token: sessionStorage.getItem("token"),
             user_head: sessionStorage.getItem("userhead"),
             user_head: sessionStorage.getItem("userhead"),
@@ -3107,11 +3235,11 @@ const fingerprintconfig = (formEl) => {
 const fingerprintDel=async (row)=>{
 const fingerprintDel=async (row)=>{
   console.log(row);
   console.log(row);
   let data = {
   let data = {
-    unlockingAdminId: row.id, //权限表id
+    unlockingEmpId: row.id, //权限表id
   };
   };
   let res = await axios({
   let res = await axios({
     method: "get",
     method: "get",
-    url: api.value + "/unlocking-admin/deleteLock",
+    url: api.value + "/unlocking-employee/deleteLock",
     headers: {
     headers: {
       token: sessionStorage.getItem("token"),
       token: sessionStorage.getItem("token"),
       user_head: sessionStorage.getItem("userhead"),
       user_head: sessionStorage.getItem("userhead"),
@@ -3178,10 +3306,15 @@ const cancelAddFingerprint = () => {
 };
 };
 
 
 // 钥匙管理 添加身份证(-----------------------------------------------------------------)
 // 钥匙管理 添加身份证(-----------------------------------------------------------------)
-const identityCardClick = (val) => {
+const identityCardClick = (val,card) => {
   keypassflag.value=val
   keypassflag.value=val
-  rolesList();
-  fingerprintChangeList.value=""
+  if(card){
+    cardFlag.value=card
+  }else{
+    cardFlag.value=""
+  }
+  // rolesList();
+  // fingerprintChangeList.value=""
   identityCardVisible.value = true;
   identityCardVisible.value = true;
   identityCardRuleForm.level = "";
   identityCardRuleForm.level = "";
   identityCardRuleForm.name = "";
   identityCardRuleForm.name = "";
@@ -3259,6 +3392,11 @@ const identityCardConfig = (formEl) => {
   formEl.validate(async (valid, fields) => {
   formEl.validate(async (valid, fields) => {
     if (valid) {
     if (valid) {
       if(keypassflag.value=='系统'){
       if(keypassflag.value=='系统'){
+        if(cardFlag.value=='房卡'){
+          identityCardRuleForm.cardType=0  // 0:房卡  1:身份证
+        }else if(cardFlag.value=='身份证'){
+          identityCardRuleForm.cardType=1
+        }
         let data = {
         let data = {
           permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
           permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
           adminId: sessionStorage.getItem("id"), //管理员id
           adminId: sessionStorage.getItem("id"), //管理员id
@@ -3271,9 +3409,10 @@ const identityCardConfig = (formEl) => {
           cardType: identityCardRuleForm.cardType, //指纹特征值
           cardType: identityCardRuleForm.cardType, //指纹特征值
           type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
           type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
         };
         };
+        
         let res = await axios({
         let res = await axios({
           method: "post",
           method: "post",
-          url: api.value + "/unlocking-admin/saveCard",
+          url: api.value + "/unlocking-employee/saveCard",
           headers: {
           headers: {
             token: sessionStorage.getItem("token"),
             token: sessionStorage.getItem("token"),
             user_head: sessionStorage.getItem("userhead"),
             user_head: sessionStorage.getItem("userhead"),
@@ -3299,6 +3438,11 @@ const identityCardConfig = (formEl) => {
           });
           });
         }
         }
       }else if(keypassflag.value=='自定义'){
       }else if(keypassflag.value=='自定义'){
+        if(cardFlag.value=='房卡'){
+          identityCardRuleForm.cardType=0  // 0:房卡  1:身份证
+        }else if(cardFlag.value=='身份证'){
+          identityCardRuleForm.cardType=1
+        }
         let data = {
         let data = {
           permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
           permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
           adminId: sessionStorage.getItem("id"), //管理员id
           adminId: sessionStorage.getItem("id"), //管理员id
@@ -3425,6 +3569,7 @@ onBeforeMount(async () => {
   console.log(flagBtn.value, "按钮权限");
   console.log(flagBtn.value, "按钮权限");
   roomNameTypeData();
   roomNameTypeData();
   getList();
   getList();
+  schoolData()
 });
 });
 onUnmounted(() => {
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
   // document.removeEventListener("keyup", Enters);

+ 111 - 11
src/views/meter/meter.vue

@@ -17,6 +17,16 @@
               placeholder="请输入房间号,电、水表设备编码"
               placeholder="请输入房间号,电、水表设备编码"
             />
             />
           </div>
           </div>
+          <el-button
+            color="rgba(0, 97, 255, 1)"
+            type="primary"
+            class="search"
+            @click="searchBtn"
+            ><el-icon>
+              <Search />
+            </el-icon>
+            <span>查询</span></el-button
+          >
           <div class="condition">
           <div class="condition">
             <span>创建时间&nbsp;&nbsp;</span>
             <span>创建时间&nbsp;&nbsp;</span>
             <el-date-picker
             <el-date-picker
@@ -29,19 +39,52 @@
               value-format="YYYY-MM-DD"
               value-format="YYYY-MM-DD"
               :prefix-icon="Calendar"
               :prefix-icon="Calendar"
               placeholder="请选择日期"
               placeholder="请选择日期"
+              style="width: 270px"
               @change="searchBtn"
               @change="searchBtn"
             />
             />
           </div>
           </div>
-          <el-button
-            color="rgba(0, 97, 255, 1)"
-            type="primary"
-            class="search"
-            @click="searchBtn"
-            ><el-icon>
-              <Search />
-            </el-icon>
-            <span>查询</span></el-button
-          >
+          <div class="condition">
+            <span>楼栋单元 </span>
+            <el-select
+              v-model="searchInput.buildingId"
+              placeholder="请选择楼栋单元"
+              style="width: 200px"
+              @change="searchBtn"
+              :clearable="true"
+            >
+              <el-option
+                v-for="item in buildData"
+                :key="item.id"
+                :label="`${item.building}${item.element}`"
+                :value="item.id"
+              />
+            </el-select>
+            <!-- <el-cascader
+              v-model="searchInput.buildingId"
+              :options="buildData"
+              :props="defaultProps"
+              clearable
+              @change="searchBtn"
+            /> -->
+          </div>
+          <div class="condition">
+            <span>房型 </span>
+            <el-select
+              style="width: 180px"
+              v-model="searchInput.houseId"
+              class="m-2"
+              placeholder="请选择房型"
+              :clearable="true"
+              @change="searchBtn"
+            >
+              <el-option
+                :label="`${i.roomName}(${i.roomType == 1 ? '全' : '钟'})`"
+                :value="i.id"
+                v-for="i in roomTypeData"
+              />
+            </el-select>
+          </div>
+          
         </div>
         </div>
         <!-- 按钮列表 -->
         <!-- 按钮列表 -->
         <div class="gongneng">
         <div class="gongneng">
@@ -331,8 +374,12 @@ const tableData = reactive({
 
 
 const searchInput = reactive({
 const searchInput = reactive({
   keyWord: "",
   keyWord: "",
-  createTime: "",
+  buildingId: "", // 楼栋
+  houseId: "", // 房型
+  createTime:"",
 }); // 搜索按钮数据
 }); // 搜索按钮数据
+const roomTypeData = ref(); // 房型数据
+const buildData = ref(); // 楼栋数据
 
 
 const currentPage = ref(1); // 当前页
 const currentPage = ref(1); // 当前页
 const pageSize = ref(10);
 const pageSize = ref(10);
@@ -383,6 +430,8 @@ const getList = async () => {
     size: pageSize.value,
     size: pageSize.value,
     keyWord: searchInput.keyWord, // 房型名称
     keyWord: searchInput.keyWord, // 房型名称
     permissionSettingId: sessionStorage.getItem("permissionSettingId"),
     permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+    houseId: searchInput.houseId,
+    buildingId: searchInput.buildingId,
   };
   };
   if (searchInput.createTime) {
   if (searchInput.createTime) {
     data.startTime = searchInput.createTime[0];
     data.startTime = searchInput.createTime[0];
@@ -654,6 +703,51 @@ const handleSelectionChange = (val) => {
   selectData.list = val;
   selectData.list = val;
 };
 };
 
 
+// 楼栋单元数据
+const schoolData = async () => {
+  let res = await axios({
+    method: "get",
+    url: api.value + "/building/beDisplayBar",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+  });
+  console.log(res, "楼栋单元下拉框");
+  if (res.data.code == 200) {
+    buildData.value = res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 房型列表数据
+const roomTypeList = async () => {
+  let res = await axios({
+    method: "get",
+    url: api.value + "/house/displayBar",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+  });
+  console.log(res, "房型列表数据");
+  if (res.data.code == 200) {
+    roomTypeData.value = res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+
 // 导入 (--------------------------------------------------------------)
 // 导入 (--------------------------------------------------------------)
 const handleRemove = (uploadFile, uploadFiles) => {
 const handleRemove = (uploadFile, uploadFiles) => {
   // console.log(uploadFile.uid, uploadFiles);
   // console.log(uploadFile.uid, uploadFiles);
@@ -713,6 +807,8 @@ const handleUpload = async (file) => {
 const exportExcel = async () => {
 const exportExcel = async () => {
   let data = {
   let data = {
     keyWord: searchInput.keyWord, // 房型名称
     keyWord: searchInput.keyWord, // 房型名称
+    houseId: searchInput.houseId,
+    buildingId: searchInput.buildingId,
     permissionSettingId: sessionStorage.getItem("permissionSettingId"),
     permissionSettingId: sessionStorage.getItem("permissionSettingId"),
   };
   };
   if (searchInput.createTime) {
   if (searchInput.createTime) {
@@ -777,6 +873,8 @@ onBeforeMount(async () => {
   flagBtn.value = btnflag.meter;
   flagBtn.value = btnflag.meter;
   console.log(flagBtn.value, "按钮权限");
   console.log(flagBtn.value, "按钮权限");
   getList();
   getList();
+  roomTypeList();
+  schoolData();
 });
 });
 onUnmounted(() => {
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
   // document.removeEventListener("keyup", Enters);
@@ -837,6 +935,7 @@ onUnmounted(() => {
 
 
       .search {
       .search {
         color: #fff;
         color: #fff;
+        margin-right:30px;
       }
       }
 
 
       .condition {
       .condition {
@@ -908,6 +1007,7 @@ onUnmounted(() => {
     width: calc(100% - 60px);
     width: calc(100% - 60px);
     flex: 1;
     flex: 1;
     margin: 0 auto;
     margin: 0 auto;
+    overflow: auto;
 
 
     .el-table--fit {
     .el-table--fit {
       height: calc(100% - 60px);
       height: calc(100% - 60px);

File diff suppressed because it is too large
+ 1064 - 298
src/views/order/order.vue


+ 53 - 39
src/views/process/process.vue

@@ -14,7 +14,7 @@
       </div>
       </div>
       <div
       <div
         class="changeItem"
         class="changeItem"
-        v-if="flagBtn.guizeshezhi==1"
+        v-if="flagBtn.guizeshezhi == 1"
         :class="changeIndex == 2 ? 'changeItem_active' : ''"
         :class="changeIndex == 2 ? 'changeItem_active' : ''"
         @click="changeItem(2)"
         @click="changeItem(2)"
       >
       >
@@ -99,11 +99,11 @@
               style="width: 150px"
               style="width: 150px"
               @change="flowTypeSearchBtn"
               @change="flowTypeSearchBtn"
             >
             >
-              <el-option label="换课流程" :value="1" />
+              <!-- <el-option label="换课流程" :value="1" /> -->
               <el-option label="临时人员流程" :value="2" />
               <el-option label="临时人员流程" :value="2" />
             </el-select>
             </el-select>
           </div>
           </div>
-          <div class="condition">
+          <!-- <div class="condition">
             <span>部门 : </span>
             <span>部门 : </span>
             <el-select
             <el-select
               :clearable="true"
               :clearable="true"
@@ -119,7 +119,7 @@
                 :value="i.id"
                 :value="i.id"
               />
               />
             </el-select>
             </el-select>
-          </div>
+          </div> -->
         </div>
         </div>
       </div>
       </div>
       <div class="inputSearch">
       <div class="inputSearch">
@@ -189,7 +189,12 @@
               width="150"
               width="150"
             />
             />
             <el-table-column align="center" prop="usersName" label="提交人" />
             <el-table-column align="center" prop="usersName" label="提交人" />
-            <el-table-column align="center" width="120" prop="changeUsersName" label="替课老师" />
+            <el-table-column
+              align="center"
+              width="120"
+              prop="changeUsersName"
+              label="替课老师"
+            />
             <el-table-column
             <el-table-column
               align="center"
               align="center"
               prop="secondaryExamineAndApproveTime"
               prop="secondaryExamineAndApproveTime"
@@ -213,13 +218,6 @@
                 {{ row.startTime }} - {{ row.endTime }}
                 {{ row.startTime }} - {{ row.endTime }}
               </template>
               </template>
             </el-table-column>
             </el-table-column>
-
-            <el-table-column
-              align="center"
-              prop="department"
-              label="部门"
-              width="100"
-            />
             <el-table-column
             <el-table-column
               align="center"
               align="center"
               prop="approverUserName"
               prop="approverUserName"
@@ -227,10 +225,10 @@
             />
             />
             <el-table-column align="center" width="100" label="状态"
             <el-table-column align="center" width="100" label="状态"
               ><template #default="{ row }">
               ><template #default="{ row }">
-                <span v-if="row.status == 0" style="color:red;">已拒绝</span>
+                <span v-if="row.status == 0" style="color: red">已拒绝</span>
                 <span v-if="row.status == 1">待审批</span>
                 <span v-if="row.status == 1">待审批</span>
                 <span v-if="row.status == 2">处理中</span>
                 <span v-if="row.status == 2">处理中</span>
-                <span v-if="row.status == 3" style="color:green;">已同意</span>
+                <span v-if="row.status == 3" style="color: green">已同意</span>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
             <el-table-column
             <el-table-column
@@ -241,8 +239,23 @@
             >
             >
               <template #default="{ row }">
               <template #default="{ row }">
                 <div class="options">
                 <div class="options">
-                  <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
+                    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>
                 </div>
                 </div>
@@ -310,7 +323,7 @@
         </div>
         </div>
       </el-dialog>
       </el-dialog>
     </div>
     </div>
-    <div v-if="changeIndex == 2 " class="regulation">
+    <div v-if="changeIndex == 2" class="regulation">
       <!-- <div class="condition">
       <!-- <div class="condition">
         <span>可见范围&nbsp;&nbsp; </span>
         <span>可见范围&nbsp;&nbsp; </span>
         <el-select
         <el-select
@@ -374,7 +387,7 @@ const searchInput = reactive({
   submitTime: "", // 提交时间
   submitTime: "", // 提交时间
   approvalTime: "", // 审批时间
   approvalTime: "", // 审批时间
   status: 10, // 审批状态
   status: 10, // 审批状态
-  flowType: 1, // 审批流程类型
+  flowType: 2, // 审批流程类型
   department: "", // 部门
   department: "", // 部门
 }); // 搜索按钮数据
 }); // 搜索按钮数据
 
 
@@ -385,12 +398,12 @@ const tableData = reactive({
   list: [],
   list: [],
 });
 });
 const departmentData = ref([
 const departmentData = ref([
-  {name:'学生',id:1},
-  {name:'教职工',id:4},
-  {name:'校友',id:5},
-  {name:'访客应用身份',id:6},
-  {name:'临时人员',id:7},
-  {name:'其他',id:0},
+  { name: "学生", id: 1 },
+  { name: "教职工", id: 4 },
+  { name: "校友", id: 5 },
+  { name: "访客应用身份", id: 6 },
+  { name: "临时人员", id: 7 },
+  { name: "其他", id: 0 },
 ]); // 部门数据
 ]); // 部门数据
 const currentPage = ref(1); // 当前页
 const currentPage = ref(1); // 当前页
 const pageSize = ref(9);
 const pageSize = ref(9);
@@ -412,7 +425,7 @@ const remarksRules = reactive({
 const regulation = reactive({
 const regulation = reactive({
   scope: "", // 可见范围
   scope: "", // 可见范围
   destination: "", // 指定终点
   destination: "", // 指定终点
-  id:""
+  id: "",
 });
 });
 
 
 // 切换 申请记录 规则设置
 // 切换 申请记录 规则设置
@@ -421,11 +434,11 @@ const changeItem = (ind) => {
   if (ind == 1) {
   if (ind == 1) {
     getList();
     getList();
   } else if (ind == 2) {
   } else if (ind == 2) {
-    ruleInfo()
+    ruleInfo();
   }
   }
 };
 };
 // 规则设置 (------------------------------------------------------)
 // 规则设置 (------------------------------------------------------)
-const ruleInfo= async () => {
+const ruleInfo = async () => {
   let res = await axios({
   let res = await axios({
     method: "get",
     method: "get",
     url: api.value + "/application-procedure-setting/list",
     url: api.value + "/application-procedure-setting/list",
@@ -433,9 +446,9 @@ const ruleInfo= async () => {
       token: sessionStorage.getItem("token"),
       token: sessionStorage.getItem("token"),
       user_head: sessionStorage.getItem("user_head"),
       user_head: sessionStorage.getItem("user_head"),
     },
     },
-    params:{
-      permissionSettingId:sessionStorage.getItem('permissionSettingId')
-    }
+    params: {
+      permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+    },
   });
   });
   console.log(res, "规则设置");
   console.log(res, "规则设置");
   if (res.data.code == 200) {
   if (res.data.code == 200) {
@@ -451,7 +464,7 @@ const ruleInfo= async () => {
   }
   }
 };
 };
 // 改变规则
 // 改变规则
-const destinationChange=async ()=>{
+const destinationChange = async () => {
   let res = await axios({
   let res = await axios({
     method: "post",
     method: "post",
     url: api.value + "/application-procedure-setting/update",
     url: api.value + "/application-procedure-setting/update",
@@ -459,11 +472,11 @@ const destinationChange=async ()=>{
       token: sessionStorage.getItem("token"),
       token: sessionStorage.getItem("token"),
       user_head: sessionStorage.getItem("user_head"),
       user_head: sessionStorage.getItem("user_head"),
     },
     },
-    data:{
-      adminMenuId: sessionStorage.getItem('permissionSettingId'),
+    data: {
+      adminMenuId: sessionStorage.getItem("permissionSettingId"),
       id: regulation.id,
       id: regulation.id,
-      approverType: regulation.destination
-    }
+      approverType: regulation.destination,
+    },
   });
   });
   console.log(res, "规则设置");
   console.log(res, "规则设置");
   if (res.data.code == 200) {
   if (res.data.code == 200) {
@@ -481,7 +494,7 @@ const destinationChange=async ()=>{
       center: true,
       center: true,
     });
     });
   }
   }
-}
+};
 
 
 // 查看员工列表
 // 查看员工列表
 const getList = async () => {
 const getList = async () => {
@@ -595,7 +608,7 @@ const submitRemarks = lodash.debounce(async (formEl) => {
       let res = "";
       let res = "";
       // 换课流程
       // 换课流程
       console.log(data, "同意审核参数");
       console.log(data, "同意审核参数");
-      if(searchInput.flowType == 1){
+      if (searchInput.flowType == 1) {
         res = await axios({
         res = await axios({
           method: "post",
           method: "post",
           url: api.value + "/application-procedure/update",
           url: api.value + "/application-procedure/update",
@@ -607,7 +620,7 @@ const submitRemarks = lodash.debounce(async (formEl) => {
         });
         });
       }
       }
       // 临时人员流程
       // 临时人员流程
-      else{
+      else {
         res = await axios({
         res = await axios({
           method: "post",
           method: "post",
           url: api.value + "/application-procedure-temporary/update",
           url: api.value + "/application-procedure-temporary/update",
@@ -900,7 +913,8 @@ onUnmounted(() => {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: space-between;
     justify-content: space-between;
-    height: 60px;
+    // height: 60px;
+    margin-top: 12px;
 
 
     span {
     span {
       color: #000;
       color: #000;

File diff suppressed because it is too large
+ 1336 - 0
src/views/roomList/roomList.vue


+ 3 - 3
src/views/roomPrice/roomPrice.vue

@@ -236,7 +236,7 @@
         :close-on-press-escape="false"
         :close-on-press-escape="false"
         title="改价记录"
         title="改价记录"
         align-center
         align-center
-        width="1400"
+        width="1200"
         :before-close="cancelRecord"
         :before-close="cancelRecord"
       >
       >
         <div class="middle">
         <div class="middle">
@@ -1485,7 +1485,7 @@ onBeforeMount(async () => {
       padding: 0px 20px 10px 20px;
       padding: 0px 20px 10px 20px;
 
 
       .middle {
       .middle {
-        width: 96%;
+        width: 100%;
         margin: 0 auto;
         margin: 0 auto;
 
 
         color: #000;
         color: #000;
@@ -1563,7 +1563,7 @@ onBeforeMount(async () => {
       }
       }
 
 
       .footer {
       .footer {
-        width: 96%;
+        width: 100%;
         // height: 402px;
         // height: 402px;
         margin: 10px auto 20px;
         margin: 10px auto 20px;
 
 

File diff suppressed because it is too large
+ 830 - 352
src/views/roomStatus/roomStatus.vue


+ 151 - 108
src/views/roomType/roomType.vue

@@ -41,9 +41,26 @@
               <el-option label="钟点房" :value="2" />
               <el-option label="钟点房" :value="2" />
             </el-select>
             </el-select>
           </div>
           </div>
+          <!-- <div class="condition" style="margin-left: 50px">
+            <span>房间名称</span>
+            <el-select
+              style="width: 180px"
+              v-model="searchInput.name"
+              class="m-2"
+              placeholder="请选择房型"
+              :clearable="true"
+              @change="searchBtn"
+            >
+              <el-option
+                :label="`${i.roomName}(${i.roomType == 1 ? '全' : '钟'})`"
+                :value="i.id"
+                v-for="i in houseTypeList"
+              />
+            </el-select>
+          </div> -->
         </div>
         </div>
         <!-- 按钮列表 -->
         <!-- 按钮列表 -->
-        <div class="gongneng" v-if="flagBtn.tianjia==1">
+        <div class="gongneng" v-if="flagBtn.tianjia == 1">
           <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
           <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
             ><img
             ><img
               src="@/assets/add.png"
               src="@/assets/add.png"
@@ -78,24 +95,36 @@
             prop="time"
             prop="time"
             label="钟点时长"
             label="钟点时长"
           />
           />
-          <el-table-column align="center" prop="name" label="房型" />
+          <el-table-column align="center" prop="name" label="房型名称">
+            <template #default="{ row }">
+              <span>{{ row.name }}</span
+              ><span style="color: #1e7dfb"
+                >({{ row.type == 1 ? "全" : "钟" }})</span
+              >
+            </template>
+          </el-table-column>
           <el-table-column align="center" prop="roomId" label="房号" />
           <el-table-column align="center" prop="roomId" label="房号" />
           <el-table-column align="center" prop="price" label="房费(元)" />
           <el-table-column align="center" prop="price" label="房费(元)" />
-          <!-- <el-table-column align="center" prop="visibleName" label="可见范围" /> -->
-          <el-table-column align="center" prop="count" label="数量" />
-          <el-table-column align="center" prop="count" label="类型">
+          <!-- <el-table-column align="center" prop="count" label="数量" /> -->
+          <!-- <el-table-column align="center" prop="count" label="类型">
             <template #default="scope">
             <template #default="scope">
               <span v-if="scope.row.type == 1">全日房</span>
               <span v-if="scope.row.type == 1">全日房</span>
               <span v-if="scope.row.type == 2">钟点房</span>
               <span v-if="scope.row.type == 2">钟点房</span>
             </template>
             </template>
-          </el-table-column>
+          </el-table-column> -->
 
 
           <el-table-column align="center" label="操作" width="150">
           <el-table-column align="center" label="操作" width="150">
             <template #default="scope">
             <template #default="scope">
               <div class="edit">
               <div class="edit">
-                <div class="look" v-if="flagBtn.xiugai==1" @click="edit(scope.row)">编辑</div>
+                <div
+                  class="look"
+                  v-if="flagBtn.xiugai == 1"
+                  @click="edit(scope.row)"
+                >
+                  编辑
+                </div>
                 <el-popconfirm
                 <el-popconfirm
-                  v-if="flagBtn.shanchu==1"
+                  v-if="flagBtn.shanchu == 1"
                   width="220"
                   width="220"
                   confirm-button-text="确认"
                   confirm-button-text="确认"
                   cancel-button-text="取消"
                   cancel-button-text="取消"
@@ -232,7 +261,7 @@
                 </div>
                 </div>
               </div>
               </div>
               <div class="form_item">
               <div class="form_item">
-                <div class="items">
+                <!-- <div class="items">
                   <el-form-item label="数量 :" prop="number">
                   <el-form-item label="数量 :" prop="number">
                     <el-input
                     <el-input
                       v-model="ruleForm.number"
                       v-model="ruleForm.number"
@@ -240,7 +269,7 @@
                       clearable
                       clearable
                     />
                     />
                   </el-form-item>
                   </el-form-item>
-                </div>
+                </div> -->
                 <div class="items">
                 <div class="items">
                   <el-form-item label="面积 :" prop="roomArea">
                   <el-form-item label="面积 :" prop="roomArea">
                     <el-input
                     <el-input
@@ -252,26 +281,17 @@
                   </el-form-item>
                   </el-form-item>
                 </div>
                 </div>
               </div>
               </div>
-              <div class="form_item">
+              <!-- <div class="form_item">
                 <div class="roomUl">
                 <div class="roomUl">
                   <div class="title">房间</div>
                   <div class="title">房间</div>
                   <div class="delRoom">
                   <div class="delRoom">
                     <div class="ul">
                     <div class="ul">
-                      <!-- <div class="li">
-                          <span>102</span>
-                          <div class="del"></div>
-                        </div>
-                        <div class="li">
-                          <span>103</span>
-                          <div class="del"></div>
-                        </div> -->
                       <div class="li">
                       <div class="li">
                         <div
                         <div
                           class="li_items"
                           class="li_items"
                           v-for="i in ruleForm.roomNumbers"
                           v-for="i in ruleForm.roomNumbers"
                           :key="i.id"
                           :key="i.id"
                         >
                         >
-                          <!-- <span>{{ i.numberName }}</span> -->
                           <div
                           <div
                             class="li_item"
                             class="li_item"
                             :class="i.numberName ? '' : 'li_item_warning'"
                             :class="i.numberName ? '' : 'li_item_warning'"
@@ -295,27 +315,20 @@
                     </div>
                     </div>
                   </div>
                   </div>
                 </div>
                 </div>
-              </div>
+                <el-form-item label="房间号 :" prop="roomNumbers">
+                  <el-tree-select
+                    v-model="roomSelNumList"
+                    :data="roomNumList"
+                    multiple
+                    :render-after-expand="false"
+                    show-checkbox
+                    style="width: 240px"
+                    :props="defaultProps"
+                    node-key="id"
+                  />
+                </el-form-item>
+              </div> -->
               <div class="form_item">
               <div class="form_item">
-                <!-- <div class="items">
-                  <el-form-item label="可见范围 :" prop="visible">
-                    <el-select
-                      v-model="ruleForm.visible"
-                      multiple
-                      placeholder="选择可见范围"
-                      style="width: 200px"
-                    >
-                      <el-option label="全部" value="0" />
-                      <el-option label="学生" value="1" />
-                      <el-option label="教职工" value="2" />
-                      <el-option label="校友" value="3" />
-                      <el-option label="访客" value="4" />
-                      <el-option label="临时人员" value="5" />
-                      <el-option label="其他" value="6" />
-                      <el-option label="领导" value="7" />
-                    </el-select>
-                  </el-form-item>
-                </div> -->
                 <div class="items">
                 <div class="items">
                   <el-form-item label="类型 :" prop="roomType">
                   <el-form-item label="类型 :" prop="roomType">
                     <el-select
                     <el-select
@@ -485,7 +498,7 @@ const cities = ref([
   "无停车场",
   "无停车场",
 ]); // 名宿配置数据
 ]); // 名宿配置数据
 
 
-const houseType = ref(); // 房型选择
+const houseTypeList = ref(); // 房型选择
 
 
 const searchInput = reactive({
 const searchInput = reactive({
   keyWord: "",
   keyWord: "",
@@ -519,6 +532,15 @@ const ruleForm = reactive({
   roomPicture: [], // 房间图片
   roomPicture: [], // 房间图片
   id: "",
   id: "",
 });
 });
+const roomNumList = ref(); // 房间号列表数据
+const roomSelNumList = ref(); // 房间号列表数据选择
+const defaultProps = {
+  children: "vos",
+  label: "roomNumber",
+  value: "id",
+  // checkStrictly: true,
+};
+
 const imgShow = ref(false);
 const imgShow = ref(false);
 const fileList = reactive({ list: [] }); // 添加多张图片的文件
 const fileList = reactive({ list: [] }); // 添加多张图片的文件
 const roomConfig = ref([]); //房型配置
 const roomConfig = ref([]); //房型配置
@@ -569,6 +591,7 @@ const rules = reactive({
   ],
   ],
   visible: [{ required: true, message: "请选择可见范围", trigger: "blur" }],
   visible: [{ required: true, message: "请选择可见范围", trigger: "blur" }],
   roomType: [{ required: true, message: "类型不能为空", trigger: "blur" }],
   roomType: [{ required: true, message: "类型不能为空", trigger: "blur" }],
+  roomNumbers: [{ required: true, message: "房间号不能为空", trigger: "blur" }],
   roomLiveTime: [
   roomLiveTime: [
     { required: true, message: "钟点时长不能为空", trigger: "blur" },
     { required: true, message: "钟点时长不能为空", trigger: "blur" },
   ],
   ],
@@ -666,6 +689,50 @@ const systemList = async () => {
     });
     });
   }
   }
 };
 };
+// 房型列表数据
+const roomTypeList = async () => {
+  let res = await axios({
+    method: "get",
+    url: api.value + "/house/displayBar",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+  });
+  console.log(res, "房型列表数据");
+  if (res.data.code == 200) {
+    houseTypeList.value = res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 房间号列表数据
+const roomNumberList = async () => {
+  let res = await axios({
+    method: "get",
+    url: api.value + "/house-number/houseNumberPullDown",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+  });
+  console.log(res, "房间号列表数据");
+  if (res.data.code == 200) {
+    roomNumList.value = res.data.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
 
 
 // 搜索功能
 // 搜索功能
 const searchBtn = lodash.debounce(async () => {
 const searchBtn = lodash.debounce(async () => {
@@ -752,7 +819,6 @@ const addlist = async () => {
   ruleForm.number = ""; //数量
   ruleForm.number = ""; //数量
   ruleForm.roomType = ""; // 类型
   ruleForm.roomType = ""; // 类型
   ruleForm.visible = ""; // 可见范围
   ruleForm.visible = ""; // 可见范围
-  // roomConfig.value = []; //房型配置
   ruleForm.roomConfig = []; //房型配置
   ruleForm.roomConfig = []; //房型配置
   ruleForm.id = ""; // id
   ruleForm.id = ""; // id
   ruleForm.roomNumbers = []; // 房间号列表
   ruleForm.roomNumbers = []; // 房间号列表
@@ -936,23 +1002,23 @@ const submitAdd = lodash.debounce(async (formEl) => {
   await formEl.validate(async (valid, fields) => {
   await formEl.validate(async (valid, fields) => {
     if (valid) {
     if (valid) {
       if (dialongTitle.value == "添加房型") {
       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 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 = [];
         const imgArr = [];
         ruleForm.roomPicture.forEach((i) => {
         ruleForm.roomPicture.forEach((i) => {
           imgArr.push(i.url);
           imgArr.push(i.url);
@@ -961,14 +1027,14 @@ const submitAdd = lodash.debounce(async (formEl) => {
         console.log(imgArr, "图片列表");
         console.log(imgArr, "图片列表");
 
 
         let data = {
         let data = {
-          roomNumbers: arr, //房间号
+          // roomNumbers: arr, //房间号
           house: {
           house: {
             roomName: ruleForm.roomName, //房间名字
             roomName: ruleForm.roomName, //房间名字
             roomType: ruleForm.roomType, //1:全日房,2:钟点房
             roomType: ruleForm.roomType, //1:全日房,2:钟点房
             roomPrice: ruleForm.roomPrice,
             roomPrice: ruleForm.roomPrice,
-            number: ruleForm.number,
+            // number: ruleForm.number,
             roomArea: ruleForm.roomArea,
             roomArea: ruleForm.roomArea,
-            roomLiveTime: ruleForm.roomLiveTime,
+            // 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:领导)
             // visible: ruleForm.visible.join(","), //可见类型(0:全部,1:学生,2:教职工,3:校友,4:访客,5:临时人员,6:其他,7:领导)
             roomConfiguration: ruleForm.roomConfig.join(","),
             roomConfiguration: ruleForm.roomConfig.join(","),
@@ -1008,24 +1074,24 @@ const submitAdd = lodash.debounce(async (formEl) => {
           });
           });
         }
         }
       } else {
       } 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 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 = [];
         const imgArr = [];
         ruleForm.roomPicture.forEach((i) => {
         ruleForm.roomPicture.forEach((i) => {
           imgArr.push(i.url);
           imgArr.push(i.url);
@@ -1033,15 +1099,15 @@ const submitAdd = lodash.debounce(async (formEl) => {
         console.log(ruleForm.roomPicture, "图片列表");
         console.log(ruleForm.roomPicture, "图片列表");
         console.log(imgArr, "图片列表");
         console.log(imgArr, "图片列表");
         let data = {
         let data = {
-          roomNumbers: arr, //房间号
+          // roomNumbers: arr, //房间号
           house: {
           house: {
             id: ruleForm.id,
             id: ruleForm.id,
             roomName: ruleForm.roomName, //房间名字
             roomName: ruleForm.roomName, //房间名字
             roomType: ruleForm.roomType, //1:全日房,2:钟点房
             roomType: ruleForm.roomType, //1:全日房,2:钟点房
             roomPrice: ruleForm.roomPrice,
             roomPrice: ruleForm.roomPrice,
-            number: ruleForm.number,
+            // number: ruleForm.number,
             roomArea: ruleForm.roomArea,
             roomArea: ruleForm.roomArea,
-            roomLiveTime: ruleForm.roomLiveTime,
+            // 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:领导)
             // visible: ruleForm.visible.join(","), //可见类型(0:全部,1:学生,2:教职工,3:校友,4:访客,5:临时人员,6:其他,7:领导)
             roomConfiguration: ruleForm.roomConfig.join(","),
             roomConfiguration: ruleForm.roomConfig.join(","),
@@ -1215,31 +1281,8 @@ onBeforeMount(async () => {
   flagBtn.value = btnflag.roomType;
   flagBtn.value = btnflag.roomType;
   console.log(flagBtn.value, "按钮权限");
   console.log(flagBtn.value, "按钮权限");
   getList();
   getList();
-  // 查看房型配置
-  let data = {
-    code: 4,
-  };
-  // let res = await axios({
-  //   method: "get",
-  //   url: api.value + "/mhotel/hotelqueryList.action",
-  //   headers: {},
-  //   params: data,
-  // });
-  // console.log(res, "房型配置");
-  // cities.value = res.data.data;
-
-  // 查看房型
-  let datas = {
-    code: 3,
-  };
-  // let ress = await axios({
-  //   method: "get",
-  //   url: api.value + "/mhotel/hotelqueryList.action",
-  //   headers: {},
-  //   params: datas,
-  // });
-  // console.log(ress, "查看房型");
-  // houseType.value = ress.data.data;
+  // roomTypeList();
+  // roomNumberList();
 });
 });
 onUnmounted(() => {
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
   // document.removeEventListener("keyup", Enters);

File diff suppressed because it is too large
+ 1391 - 0
src/views/staff/staff.vue


+ 1 - 0
src/views/statement/statement.vue

@@ -779,6 +779,7 @@ onUnmounted(() => {
   //   待结账页面样式
   //   待结账页面样式
   .regulation {
   .regulation {
     height: calc(100% - 106px);
     height: calc(100% - 106px);
+    overflow: auto;
     .condition {
     .condition {
       color: #000;
       color: #000;
       margin: 20px 30px;
       margin: 20px 30px;

+ 5 - 5
src/views/user/user.vue

@@ -214,15 +214,15 @@
               style="width: 500px"
               style="width: 500px"
             />
             />
           </el-form-item>
           </el-form-item>
-          <el-form-item label="身份证号 :" prop="idNumber">
+          <!-- <el-form-item label="身份证号 :" prop="idNumber">
             <el-input
             <el-input
               v-model="editRuleForm.idNumber"
               v-model="editRuleForm.idNumber"
               placeholder="请输入身份证号"
               placeholder="请输入身份证号"
               style="width: 500px"
               style="width: 500px"
             >
             >
-              <!-- <template #append>
+              <template #append>
                 <div @click="readCard">读卡</div>
                 <div @click="readCard">读卡</div>
-              </template> -->
+              </template>
             </el-input>
             </el-input>
           </el-form-item>
           </el-form-item>
           <el-form-item label="指纹 :" prop="fingerprint">
           <el-form-item label="指纹 :" prop="fingerprint">
@@ -235,7 +235,7 @@
                 <div @click="entering">录入</div>
                 <div @click="entering">录入</div>
               </template>
               </template>
             </el-input>
             </el-input>
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item class="options">
           <el-form-item class="options">
             <el-button
             <el-button
               color="rgba(41, 109, 227, 1)"
               color="rgba(41, 109, 227, 1)"
@@ -1109,7 +1109,7 @@ onUnmounted(() => {
   .footer {
   .footer {
     width: calc(100%);
     width: calc(100%);
     flex: 1;
     flex: 1;
-
+    overflow: auto;
     .el-table--fit {
     .el-table--fit {
       height: calc(100% - 60px);
       height: calc(100% - 60px);
 
 

File diff suppressed because it is too large
+ 1196 - 363
src/views/userRoles/userRoles.vue