Bladeren bron

房态页面和系统设置页面样式变动

hzj18279462576@163.com 2 jaren geleden
bovenliggende
commit
0d24842d30

+ 1 - 1
index.html

@@ -8,7 +8,7 @@
       href="./src/assets/items/favicon.ico"
     />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>靖安乡村民宿民宿端</title>
+    <title>智慧公寓</title>
   </head>
 
   <body>

+ 50 - 34
package-lock.json

@@ -10,9 +10,9 @@
       "integrity": "sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg=="
     },
     "@ctrl/tinycolor": {
-      "version": "3.5.0",
-      "resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.5.0.tgz",
-      "integrity": "sha512-tlJpwF40DEQcfR/QF+wNMVyGMaO9FQp6Z1Wahj4Gk3CJQYHwA2xVG7iKDFdW6zuxZY9XWOpGcfNCTsX4McOsOg=="
+      "version": "3.6.1",
+      "resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz",
+      "integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA=="
     },
     "@easydarwin/easyplayer": {
       "version": "5.0.7",
@@ -179,18 +179,27 @@
       "optional": true
     },
     "@floating-ui/core": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.2.0.tgz",
-      "integrity": "sha512-GHUXPEhMEmTpnpIfesFA2KAoMJPb1SPQw964tToQwt+BbGXdhqTCWT1rOb0VURGylsxsYxiGMnseJ3IlclVpVA=="
+      "version": "1.6.1",
+      "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.1.tgz",
+      "integrity": "sha512-42UH54oPZHPdRHdw6BgoBD6cg/eVTmVrFcgeRDM3jbO7uxSoipVcmcIGFcA5jmOHO5apcyvBhkSKES3fQJnu7A==",
+      "requires": {
+        "@floating-ui/utils": "^0.2.0"
+      }
     },
     "@floating-ui/dom": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.2.0.tgz",
-      "integrity": "sha512-QXzg57o1cjLz3cGETzKXjI3kx1xyS49DW9l7kV2jw2c8Yftd434t2hllX0sVGn2Q8MtcW/4pNm8bfE1/4n6mng==",
+      "version": "1.6.5",
+      "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.5.tgz",
+      "integrity": "sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw==",
       "requires": {
-        "@floating-ui/core": "^1.2.0"
+        "@floating-ui/core": "^1.0.0",
+        "@floating-ui/utils": "^0.2.0"
       }
     },
+    "@floating-ui/utils": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.2.tgz",
+      "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw=="
+    },
     "@jridgewell/gen-mapping": {
       "version": "0.3.2",
       "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
@@ -245,14 +254,14 @@
       "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
     },
     "@types/lodash": {
-      "version": "4.14.191",
-      "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.14.191.tgz",
-      "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ=="
+      "version": "4.17.1",
+      "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.1.tgz",
+      "integrity": "sha512-X+2qazGS3jxLAIz5JDXDzglAF3KpijdhFxlf/V1+hEsOUc+HnWi81L/uv/EvGuV90WY+7mPGFCUDGfQC3Gj95Q=="
     },
     "@types/lodash-es": {
-      "version": "4.17.6",
-      "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.6.tgz",
-      "integrity": "sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==",
+      "version": "4.17.12",
+      "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
+      "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
       "requires": {
         "@types/lodash": "*"
       }
@@ -373,25 +382,25 @@
       "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ=="
     },
     "@vueuse/core": {
-      "version": "9.12.0",
-      "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.12.0.tgz",
-      "integrity": "sha512-h/Di8Bvf6xRcvS/PvUVheiMYYz3U0tH3X25YxONSaAUBa841ayMwxkuzx/DGUMCW/wHWzD8tRy2zYmOC36r4sg==",
+      "version": "9.13.0",
+      "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz",
+      "integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
       "requires": {
         "@types/web-bluetooth": "^0.0.16",
-        "@vueuse/metadata": "9.12.0",
-        "@vueuse/shared": "9.12.0",
+        "@vueuse/metadata": "9.13.0",
+        "@vueuse/shared": "9.13.0",
         "vue-demi": "*"
       }
     },
     "@vueuse/metadata": {
-      "version": "9.12.0",
-      "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.12.0.tgz",
-      "integrity": "sha512-9oJ9MM9lFLlmvxXUqsR1wLt1uF7EVbP5iYaHJYqk+G2PbMjY6EXvZeTjbdO89HgoF5cI6z49o2zT/jD9SVoNpQ=="
+      "version": "9.13.0",
+      "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.13.0.tgz",
+      "integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ=="
     },
     "@vueuse/shared": {
-      "version": "9.12.0",
-      "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.12.0.tgz",
-      "integrity": "sha512-TWuJLACQ0BVithVTRbex4Wf1a1VaRuSpVeyEd4vMUWl54PzlE0ciFUshKCXnlLuD0lxIaLK4Ypj3NXYzZh4+SQ==",
+      "version": "9.13.0",
+      "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.13.0.tgz",
+      "integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
       "requires": {
         "vue-demi": "*"
       }
@@ -506,12 +515,12 @@
       }
     },
     "element-plus": {
-      "version": "2.2.29",
-      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.29.tgz",
-      "integrity": "sha512-g4dcrURrKkR5uUX8n5RVnnqGnimoki9HfqS4yHHG6XwCHBkZGozdq4x+478BzeWUe31h++BO+7dakSx4VnM8RQ==",
+      "version": "2.7.2",
+      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.7.2.tgz",
+      "integrity": "sha512-AdEzBU/A68iUleio0MkQ46JeU5SeQvFFd915GJFScJmUEo5AmYg3OQ4pVjcu+p3b3Nupg9MC5Wa4xjAiC51kUg==",
       "requires": {
         "@ctrl/tinycolor": "^3.4.1",
-        "@element-plus/icons-vue": "^2.0.6",
+        "@element-plus/icons-vue": "^2.3.1",
         "@floating-ui/dom": "^1.0.1",
         "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
         "@types/lodash": "^4.14.182",
@@ -525,6 +534,13 @@
         "lodash-unified": "^1.0.2",
         "memoize-one": "^6.0.0",
         "normalize-wheel-es": "^1.2.0"
+      },
+      "dependencies": {
+        "@element-plus/icons-vue": {
+          "version": "2.3.1",
+          "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
+          "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg=="
+        }
       }
     },
     "esbuild": {
@@ -898,9 +914,9 @@
       }
     },
     "vue-demi": {
-      "version": "0.13.11",
-      "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.11.tgz",
-      "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A=="
+      "version": "0.14.7",
+      "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.7.tgz",
+      "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA=="
     },
     "vue-router": {
       "version": "4.0.10",

+ 1 - 1
package.json

@@ -15,7 +15,7 @@
     "axios": "^1.3.2",
     "dayjs": "^1.11.8",
     "echarts": "^5.4.2",
-    "element-plus": "^2.2.29",
+    "element-plus": "^2.7.2",
     "hls.js": "^1.3.4",
     "jsencrypt": "^3.3.1",
     "lodash": "^4.17.21",

+ 15 - 0
src/App.vue

@@ -30,4 +30,19 @@ onBeforeMount(() => {
   // margin: 0;
   // padding: 0;
 }
+.el-dialog {
+  padding: 0;
+  .el-dialog__header {
+    padding: 0;
+    height: 50px;
+    display: flex;
+    align-items: center;
+    .el-dialog__title {
+      margin-left: 20px;
+    }
+  }
+}
+.el-button {
+  outline: 0 !important;
+}
 </style>

BIN
src/assets/icons/close.png


BIN
src/assets/icons/close1.png


+ 2 - 1
src/layout/index.vue

@@ -45,7 +45,8 @@ onBeforeMount(async () => {
     // min-width: 800px;
     // max-width: calc(100vw - 81px);
     // min-width: calc(100vw - 220px);
-    width: 100%;
+    width: calc(100vw - 220px);
+    // width: 100%;
     height: calc(100vh);
     background-color: rgba(238, 238, 238, 1);
 

+ 82 - 1
src/layout/sidebar/Navbar.vue

@@ -60,7 +60,7 @@
                 <span>修改密码</span>
               </el-dropdown-item>
               <el-dialog
-                :append-to-body="true"
+                class="updatePass"
                 custom-class="pw"
                 v-model="uppasswordShow"
                 title="修改密码"
@@ -445,6 +445,87 @@ onBeforeMount(() => {
   }
 }
 
+:deep(.updatePass) {
+  //   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 30px 20px 30px;
+    .table {
+      width: 100%;
+      border-radius: 4px;
+      overflow: auto;
+      display: flex;
+      &::-webkit-scrollbar-track {
+        background-color: #daeeff;
+        border-radius: 4px;
+      }
+      // 滚动条的滚动区域(轨道)
+      &::-webkit-scrollbar {
+        background-color: #242424;
+        height: 5px;
+        width: 4px;
+        border-radius: 4px;
+      }
+      // 滚动条的可拖拽部分(滑块)
+      &::-webkit-scrollbar-thumb {
+        background: #57b2ff;
+        border-radius: 4px;
+      }
+      .items {
+        &:last-child {
+          border-right: 1px solid rgba(230, 230, 230, 1);
+        }
+        .txt {
+          height: 40px;
+          line-height: 40px;
+          text-align: center;
+          border-left: 1px solid rgba(230, 230, 230, 1);
+          border-top: 1px solid rgba(230, 230, 230, 1);
+          &.scoreItem {
+            background-color: rgba(240, 243, 247, 1);
+          }
+          &:nth-child(2) {
+            border-bottom: 1px solid rgba(230, 230, 230, 1);
+          }
+          .el-input__wrapper {
+            box-shadow: none;
+            .el-input__inner {
+              text-align: center;
+            }
+          }
+        }
+
+        .items_li {
+          display: flex;
+          flex-wrap: nowrap;
+          .lis {
+            width: 120px;
+          }
+        }
+      }
+    }
+    .options {
+      margin: 20px 30px 0 0;
+      width: 100%;
+      display: flex;
+      flex-direction: row-reverse;
+
+      .queding {
+        color: #fff;
+        margin-left: 15px;
+      }
+    }
+  }
+}
 .el-dialog__body {
   .options {
     display: flex;

+ 17 - 11
src/layout/sidebar/SidevarItem.vue

@@ -172,11 +172,11 @@
           </el-menu-item>
         </el-sub-menu>
         <!-- 账号管理 -->
-        <el-sub-menu :index="item.name" v-if="item.name == 'accounts'">
+        <!-- <el-sub-menu :index="item.name" v-if="item.name == 'accounts'">
           <template #title>
             <img
               v-if="
-                activeIndex == '/hotel/user' || activeIndex == '/hotel/account'
+                activeIndex == '/hotel/roles' || activeIndex == '/hotel/account'
               "
               src="@/assets/icons/accountS.png"
               style="width: 22px; height: 22px; margin: 0 18px 0 18px"
@@ -195,12 +195,10 @@
               <span>{{ i.meta.title }}</span>
             </template>
           </el-menu-item>
-        </el-sub-menu>
-        <!-- <el-menu-item v-if="item.name == 'accounts'" index="/hotel/account">
+        </el-sub-menu> -->
+        <el-menu-item v-if="item.name == 'account'" index="/hotel/account">
           <img
-            v-if="
-              activeIndex == '/hotel/account' || activeIndex == '/hotel/roles'
-            "
+            v-if="activeIndex == '/hotel/account'"
             src="@/assets/icons/accountS.png"
             alt=""
             style="width: 24px; height: 22px; margin: 0 18px"
@@ -212,7 +210,7 @@
             style="width: 22px; height: 22px; margin: 0 18px"
           />
           <span>账号管理</span>
-        </el-menu-item> -->
+        </el-menu-item>
         <!-- 系统通知 -->
         <el-menu-item v-if="item.name == 'system'" index="/hotel/system">
           <img
@@ -227,7 +225,7 @@
             alt=""
             style="width: 22px; height: 22px; margin: 0 18px"
           />
-          <span>系统通知</span>
+          <span>系统设置</span>
         </el-menu-item>
       </div>
 
@@ -280,10 +278,18 @@ watch(
     menuClose.value = newValue;
   }
 );
+// watch(
+//   () => store.state.user.activeIndex,
+//   (newValue, oldValue) => {
+//     console.log(newValue);
+//     activeIndex.value = newValue;
+//   }
+// );
 watch(
-  () => store.state.user.activeIndex,
+  () => router.currentRoute.value.fullPath,
   (newValue, oldValue) => {
     console.log(newValue);
+    store.commit("indexUp", newValue);
     activeIndex.value = newValue;
   }
 );
@@ -292,7 +298,7 @@ const handleSelect = (key, keyPath) => {
   // store.commit("indexUp", key);
   // activeIndex.value = key;
   // sessionStorage.setItem("activeItem", key);
-  console.log(key, keyPath);
+  // console.log(key, keyPath);
   router.push({
     path: `${key}`,
   });

+ 43 - 44
src/router/index.js

@@ -121,53 +121,52 @@ const routes = [
 ];
 const router = createRouter({
   // history: createWebHashHistory("/business"), // 线上地址
-  history: createWebHashHistory("/business"), // 测试环境发布地址
+  history: createWebHashHistory("/hotel/testManage"), // 测试环境发布地址
   // history: createWebHashHistory("/hotelReservation/pc3/"), // 测试环境发布地址
   routes: routes,
 });
 export default router;
 router.beforeEach(async (to, from, next) => {
-  // let hasRoutes = store.state.user.hasRoutes;
-  // if (sessionStorage.getItem("token")) {
-  //   if (!hasRoutes || to.path == "/login") {
-  //     console.log("第一次登录也触发");
-  //     store.commit("SET_ROUTES_STATE", true);
-  //     let res = await store.dispatch("login", {
-  //       adminName: sessionStorage.getItem("username"),
-  //       password: sessionStorage.getItem("name"),
-  //     });
-  //     console.log(res, "路由判断登录");
-  //     if (res == "success") {
-  //       if (store.state.user.level == 2) {
-  //         let modules = import.meta.glob("../views/**/*.vue");
-  //         let arr = {
-  //           path: "account",
-  //           name: "account",
-  //           component: modules[`../views/account/account.vue`],
-  //         };
-  //         router.addRoute("seniorCelebrity", arr);
-  //       }
-  //       next({ ...to, replace: true });
-  //     } else {
-  //       sessionStorage.removeItem("token");
-  //       sessionStorage.removeItem("name");
-  //       ElMessage({
-  //         type: "error",
-  //         showClose: true,
-  //         message: res.data.data.message,
-  //         center: true,
-  //       });
-  //     }
-  //     //----------解决
-  //     // next({ path: "/index" }); //----------解决
-  //   }
-  //   next(); //放行
-  // } else {
-  //   if (to.path == "/login") {
-  //     next();
-  //   } else {
-  //     next(`/login`);
-  //   }
-  // }
-  next();
+  let hasRoutes = store.state.user.hasRoutes;
+  if (sessionStorage.getItem("token")) {
+    // if (!hasRoutes || to.path == "/login") {
+    //   console.log("第一次登录也触发");
+    //   store.commit("SET_ROUTES_STATE", true);
+    //   let res = await store.dispatch("login", {
+    //     adminName: sessionStorage.getItem("username"),
+    //     password: sessionStorage.getItem("name"),
+    //   });
+    //   console.log(res, "路由判断登录");
+    //   if (res == "success") {
+    //     if (store.state.user.level == 2) {
+    //       let modules = import.meta.glob("../views/**/*.vue");
+    //       let arr = {
+    //         path: "account",
+    //         name: "account",
+    //         component: modules[`../views/account/account.vue`],
+    //       };
+    //       router.addRoute("seniorCelebrity", arr);
+    //     }
+    //     next({ ...to, replace: true });
+    //   } else {
+    //     sessionStorage.removeItem("token");
+    //     sessionStorage.removeItem("name");
+    //     ElMessage({
+    //       type: "error",
+    //       showClose: true,
+    //       message: res.data.data.message,
+    //       center: true,
+    //     });
+    //   }
+    //   //----------解决
+    //   // next({ path: "/index" }); //----------解决
+    // }
+    next(); //放行
+  } else {
+    if (to.path == "/login") {
+      next();
+    } else {
+      next(`/login`);
+    }
+  }
 });

+ 27 - 21
src/store/modules/user.js

@@ -9,8 +9,8 @@ const state = {
   activeIndex: "",
   username: "",
   password: "",
-  // api: "/carstop/carbook", // 线上
-  api: "/ihotel/auto", // 测试
+  api: "/hotel/ihotel/auto", // 线上
+  // api: "/ihotel/auto", // 测试
   islogin: 1,
   hasRoutes: false,
   level: 1,
@@ -87,25 +87,25 @@ const state = {
         },
       ],
     },
-    {
-      name: "accounts",
-      meta: { isAuth: true, title: "账号管理", sign: "users" },
-      children: [
-        {
-          name: "account",
-          meta: { isAuth: true, title: "账号管理" },
-        },
-        {
-          name: "roles",
-          meta: { isAuth: true, title: "角色管理" },
-        },
-      ],
-    },
     // {
-    //   name: "account",
-    //   meta: { isAuth: true, title: "账号管理" },
+    //   name: "accounts",
+    //   meta: { isAuth: true, title: "账号管理", sign: "users" },
+    //   children: [
+    //     {
+    //       name: "account",
+    //       meta: { isAuth: true, title: "账号管理" },
+    //     },
+    //     {
+    //       name: "roles",
+    //       meta: { isAuth: true, title: "角色管理" },
+    //     },
+    //   ],
     // },
     {
+      name: "account",
+      meta: { isAuth: true, title: "账号管理" },
+    },
+    {
       name: "system",
       meta: { isAuth: true, title: "系统通知" },
     },
@@ -235,6 +235,8 @@ const mutations = {
   },
   indexUp: (state, value) => {
     state.activeIndex = value;
+    console.log(value);
+    sessionStorage.setItem("sidevarItem", value);
   },
   userName: (state, value) => {
     state.username = value;
@@ -282,10 +284,14 @@ const actions = {
         // sessionStorage.setItem("name", data.userName);
         sessionStorage.setItem("token", res.data.data.token);
         sessionStorage.setItem("id", res.data.data.id);
-        sessionStorage.setItem("adminMenuId", res.data.data.permissionSettingId);
+        sessionStorage.setItem("user_head", res.data.data.user_head);
+        sessionStorage.setItem(
+          "permissionSettingId",
+          res.data.data.permissionSettingId
+        );
         sessionStorage.setItem("username", res.data.data.userName);
-        console.log(res.data.data.userName,"名字账号");
-        
+        console.log(res.data.data.userName, "名字账号");
+
         // commit("LEVEL", res.data.data.level);
 
         // commit("userName", data.user);

+ 383 - 188
src/views/account/account.vue

@@ -10,23 +10,24 @@
           <span>状态 </span>
           <el-select
             style="width: 180px"
-            v-model="value"
+            v-model="searchInput.status"
             class="m-2"
-            placeholder="Select"
+            placeholder="选择状态"
           >
-            <el-option label="全部" value="1" />
-            <el-option label="禁用" value="2" />
+            <el-option label="全部" value="" />
+            <el-option label="正常" value="1" />
+            <el-option label="冻结" value="2" />
           </el-select>
         </div>
         <div class="condition">
           <span>真实姓名 </span>
           <el-input
             clearable
-            v-model="searchInput.adminName"
-            @clear="searchBtn"
+            v-model="searchInput.name"
             class="w-50 m-2"
             placeholder="请输入姓名"
             style="width: 180px"
+            @clear="searchBtn"
           />
         </div>
         <div class="condition">
@@ -59,9 +60,6 @@
         <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
           >添加</el-button
         >
-        <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
-          >导出</el-button
-        >
       </div>
     </div>
     <div class="footer" v-loading="loading">
@@ -84,18 +82,25 @@
           type="index"
           index="1"
         />
-        <el-table-column align="center" prop="corpnPhone" label="账号" />
-        <el-table-column align="center" prop="adminName" label="角色" />
-        <el-table-column align="center" prop="corpnName" label="真实姓名" />
-        <el-table-column align="center" prop="corpnPhone" label="手机号码" />
-        <el-table-column align="center" label="部门">
+        <el-table-column align="center" prop="userNumber" label="账号" />
+        <el-table-column align="center" prop="adminName" label="角色">
           <template #default="{ row }">
-            {{ row.level == 1 ? "管理员" : "超级管理员" }}
+            <span>{{ row.adminMenuName }}</span>
           </template>
         </el-table-column>
-        <el-table-column align="center" prop="remark" label="创建时间" />
+        <el-table-column align="center" prop="name" label="真实姓名" />
+        <el-table-column align="center" prop="phoneNumber" label="手机号码" />
+        <el-table-column align="center" prop="department" label="身份">
+          <template #default="{ row }">
+              <span v-if="row.department==0">其他</span>
+              <span v-if="row.department==1">学生</span>
+              <span v-if="row.department==4">教职工</span>
+              <span v-if="row.department==5">校友</span>
+            </template>
+        </el-table-column>
+        <el-table-column align="center" prop="createTime" label="创建时间" />
 
-        <el-table-column align="center" label="操作" width="220">
+        <el-table-column align="center" label="操作" width="180">
           <template #default="scope">
             <div class="options">
               <div class="look" @click="edit(scope.row)">编辑</div>
@@ -118,7 +123,7 @@
         </el-table-column>
       </el-table>
 
-      <!-- 添加车辆弹窗 -->
+      <!-- 添加账号弹窗 -->
       <el-dialog
         class="addStaff"
         v-model="addDialogVisible"
@@ -139,12 +144,46 @@
           label-position="left"
           status-icon
         >
-          <el-form-item label="用户名 :" prop="adminName">
-            <el-input
-              v-model="ruleForm.adminName"
-              placeholder="请输入用户名"
+          <el-form-item label="微校卡号 :" prop="cardNum">
+            <!-- <el-input
+              v-model="ruleForm.cardNum"
+              placeholder="请输入微校卡号"
               clearable
-            />
+              :disabled="dialongTitle == '编辑信息'"
+            /> -->
+            <el-select
+              v-model="ruleForm.cardNum"
+              popper-class="more-tag-data"
+              filterable
+              remote
+              :remote-method="conteactMethod"
+              placeholder="请选择微校卡号"
+              style="width: 200px"
+              @change="schoolCardChange"
+            >
+              <el-option
+                v-for="item in schoolCardList"
+                :key="item.id"
+                :label="item.cardNumber"
+                :value="item.cardNumber"
+              >
+                <span style="float: left">{{
+                  `${item.userName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;部门:${item.department}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 微校卡号:${item.cardNumber}`
+                }}</span>
+              </el-option>
+              <template #footer>
+                <div class="addStudentMore">
+                  <el-button
+                    v-if="
+                      schoolCardPage < schoolCardTotalPage &&
+                      schoolCardTotalPage != 0
+                    "
+                    @click="addschoolCardListMore"
+                    >加载更多+</el-button
+                  >
+                </div>
+              </template>
+            </el-select>
           </el-form-item>
           <el-form-item label="姓名 :" prop="corpnName">
             <el-input
@@ -160,6 +199,13 @@
               clearable
             />
           </el-form-item>
+          <el-form-item label="用户名 :" prop="adminName">
+            <el-input
+              v-model="ruleForm.adminName"
+              placeholder="请输入用户名"
+              clearable
+            />
+          </el-form-item>
           <el-form-item label="密码 :" prop="password">
             <el-input
               v-model="ruleForm.password"
@@ -167,29 +213,44 @@
               clearable
             />
           </el-form-item>
-          <el-form-item label="确认密码 :" prop="againPass">
+          <!-- <el-form-item label="确认密码 :" prop="againPass">
             <el-input
               v-model="ruleForm.againPass"
               placeholder="请再一次输入密码"
               clearable
             />
-          </el-form-item>
-          <el-form-item label="角色 :" prop="level">
-            <el-radio-group v-model="ruleForm.level">
-              <el-radio :label="1" v-if="ruleForm.level == 1">管理员</el-radio>
-              <el-radio :label="2" v-if="ruleForm.level == 2"
-                >超级管理员</el-radio
-              >
-            </el-radio-group>
-          </el-form-item>
-          <el-form-item label="简介 :" prop="remark">
-            <el-input
-              v-model="ruleForm.remark"
-              :rows="3"
-              type="textarea"
-              placeholder="请输入民宿简介信息"
+          </el-form-item> -->
+          <el-form-item label="角色 :" prop="adminMenuId">
+            <el-tree
+              style="max-width: 600px"
+              :data="roleData"
+              ref="editMemberTree"
+              show-checkbox
+              default-expand-all
+              check-strictly
+              node-key="id"
+              :props="defaultProps"
+              @check="editMemberCheckChange"
             />
           </el-form-item>
+          <el-form-item label="身份 :" prop="department">
+            <!-- <el-input
+              v-model="ruleForm.department"
+              placeholder="请输入部门"
+              clearable
+            /> -->
+            <el-select
+              style="width: 200px"
+              v-model="ruleForm.department"
+              class="m-2"
+              placeholder="请选择身份"
+            >
+              <el-option label="学生" value="1" />
+              <el-option label="教职工" value="4" />
+              <el-option label="校友" value="5" />
+              <el-option label="其他" value="0" />
+            </el-select>
+          </el-form-item>
 
           <el-form-item class="options">
             <el-button
@@ -222,7 +283,14 @@
 </template>
 
 <script setup>
-import { ref, reactive, nextTick, onBeforeMount, onUnmounted } from "vue";
+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";
@@ -235,65 +303,56 @@ const router = useRouter();
 // 表格数据
 const loading = ref(false);
 const tableData = reactive({
-  list: [
-    // {
-    //   phone: 1234,
-    //   adminName: "admin",
-    //   userName: "张三",
-    //   level: 1,
-    //   remark: "测试",
-    // },
-    // {
-    //   phone: 1234,
-    //   adminName: "test",
-    //   userName: "李四",
-    //   level: 1,
-    //   remark: "测试11",
-    // },
-    // {
-    //   phone: 1234,
-    //   adminName: "admin1",
-    //   userName: "张三",
-    //   level: 1,
-    //   remark: "测试",
-    // },
-    // {
-    //   phone: 1234,
-    //   adminName: "admin2",
-    //   userName: "张三",
-    //   level: 1,
-    //   remark: "测试",
-    // },
-  ],
+  list: [],
 });
 const activeIndex = ref(); // 默认跳转路由
 const dialongTitle = ref("新增账号"); // 弹窗标题
 
 const searchInput = reactive({
-  adminName: "",
+  status: "",
+  name: "",
+  createTime: "",
 }); // 搜索按钮数据
-5;
+
+watch(
+  () => searchInput.createTime,
+  (newVal, oldVal) => {
+    console.log("监听时间:", newVal);
+    if (newVal == null) {
+      getList();
+    }
+  }
+);
 
 const currentPage = ref(1); // 当前页
 const pageSize = ref(10);
 const total = ref(); // 当前总数
-const selectData = reactive({
-  list: [],
-}); // 多选框选择的数据
+
 const api = ref("");
-const addDialogVisible = ref(false); // 控制添加员工弹窗
+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({
+  adminMenuId: "",
+  cardNum: "",
+  corpnName: "",
   corpnPhone: "",
   adminName: "",
-  corpnName: "",
-  level: 1,
-  remark: "",
   password: "",
-  againPass: "",
+  department: "",
   id: "",
 });
 var checkUserName = (rule, value, callback) => {
@@ -343,6 +402,7 @@ const rules = reactive({
     { required: true, message: "用户名不能为空", trigger: "blur" },
     { validator: checkUserName, trigger: "blur" },
   ],
+  cardNum: [{ required: true, message: "微校卡号不能为空", trigger: "blur" }],
   // ^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,20}$
   password: [
     {
@@ -354,8 +414,9 @@ const rules = reactive({
       min: 8,
       max: 20,
       pattern:
-        /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,20}$/,
-      message: "请输入8-20位正确密码(大小写字母·字符·数字)",
+        // /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,20}$/,
+        /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z]).{8,20}$/,
+      message: "请输入8-20位正确密码(大小写字母·数字·(字符可选填))",
       trigger: "blur",
     },
   ],
@@ -374,17 +435,17 @@ const rules = reactive({
       trigger: "blur",
     },
   ],
-  level: [
+  adminMenuId: [
     {
       required: true,
       message: "角色不能为空",
       trigger: "blur",
     },
   ],
-  remark: [
+  department: [
     {
       required: true,
-      message: "备注不能为空",
+      message: "部门不能为空",
       trigger: "blur",
     },
   ],
@@ -399,29 +460,40 @@ const rules = reactive({
 
   // desc: [{ required: true, message: "Please input activity form", trigger: "blur" }],
 });
+
 // 获取账户列表
 const getList = async () => {
-  // if (searchInput.account) {
-  //   data.adminName = searchInput.adminName;
-  // }
   loading.value = true;
   let data = {
     page: currentPage.value, // 当前页
-    rows: pageSize.value, // 一页数据条数
-    adminName: searchInput.adminName, //用户名
-    managerId: sessionStorage.getItem("token"),
+    size: pageSize.value, // 一页数据条数
+    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+    keyWord: searchInput.name,
+    status: searchInput.status,
   };
+  if (searchInput.createTime) {
+    data.startTime = searchInput.createTime[0];
+    data.endTime = searchInput.createTime[1];
+  }
   let res = await axios({
     method: "get",
-    url: api.value + "/mhotel/managerAdminqueryPage.action",
+    url: api.value + "/admin/getListPage",
     headers: {
-      // token: sessionStorage.getItem("token"),
+      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.pageList;
+    res.data.data.records.forEach((item) => {
+      if (item.adminMenu) {
+        item.adminMenuName = item.adminMenu.name;
+      } else {
+        item.adminMenuName = "";
+      }
+    });
+    tableData.list = res.data.data.records;
     total.value = res.data.data.total;
     loading.value = false;
     // ElMessage({
@@ -440,24 +512,138 @@ const getList = async () => {
     });
   }
 };
+// 微校卡号数据
+const schoolData = async () => {
+  let data = {
+    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+    page: schoolCardPage.value,
+    size: schoolCardSize.value,
+    keyWord: schoolCardSearch.value,
+  };
+  let res = await axios({
+    method: "get",
+    url: api.value + "/admin/getUsersPage",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+    params: data,
+  });
+  console.log(res, "微校卡号人");
+  if (res.data.code == 200) {
+    schoolCardList.value = res.data.data.records;
+    schoolCardTotalPage.value = res.data.data.pages;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 微校卡号搜索
+const conteactMethod = (query) => {
+  console.log(query);
+  schoolCardSearch.value = query;
+  schoolData();
+};
+// 加载更多微校卡号
+const addschoolCardListMore = async () => {
+  if (schoolCardPage.value < schoolCardTotalPage.value) {
+    schoolCardPage.value++;
+    // console.log(conteactListInput.value, "滚动里面");
+    let data = {
+      permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+      page: schoolCardPage.value,
+      size: schoolCardSize.value,
+      keyWord: schoolCardSearch.value,
+    };
+    let res = await axios({
+      method: "get",
+      url: api.value + "/admin/getUsersPage",
+      headers: {
+        token: sessionStorage.getItem("token"),
+        user_head: sessionStorage.getItem("user_head"),
+      },
+      params: data,
+    });
+    console.log(res, "微校卡号人员加载更多");
+    if (res.data.code == 200) {
+      // schoolCardList.value = res.data.data.records;
+      // schoolCardTotalPage.value = res.data.data.pages;
+      schoolCardList.value = [
+        ...schoolCardList.value,
+        ...res.data.data.records,
+      ];
+    } else {
+      ElMessage({
+        type: "error",
+        showClose: true,
+        message: res.data.message,
+        center: true,
+      });
+    }
+  } else {
+    console.log("数据全部加载完成");
+  }
+};
+// 改变微校卡号
+const schoolCardChange = (value) => {
+  console.log(value);
+};
+// 角色列表数据
+const roleList = async () => {
+  let res = await axios({
+    method: "get",
+    url: api.value + "/admin-menu/getRole",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+  });
+  console.log(res, "角色列表");
+  if (res.data.code == 200) {
+    roleData.value = res.data.data;
+  } else {
+    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.corpnPhone = "";
-  ruleForm.adminName = "";
   ruleForm.corpnName = "";
-  ruleForm.level = 1;
-  ruleForm.remake = "";
+  ruleForm.adminName = "";
+  ruleForm.cardNum = "";
+  ruleForm.adminMenuId = "";
   ruleForm.password = "";
-  ruleForm.againPass = "";
-  ruleForm.reamark = "";
+  ruleForm.department = "";
+  ruleForm.id = "";
+  nextTick(() => {
+    editMemberTree.value.setCheckedKeys([]);
+  });
+};
+// 勾选角色
+const editMemberCheckChange = (data, nodes) => {
+  // console.log(data, nodes, "勾选角色");
+  editMemberTree.value.setCheckedKeys([]);
+  nextTick(() => {
+    editMemberTree.value.setCheckedKeys([data.id]);
+    ruleForm.adminMenuId = data.id;
+  });
 };
 // 取消添加员工
 const cancelAdd = () => {
@@ -468,110 +654,102 @@ const cancelAdd = () => {
 const edit = (row) => {
   dialongTitle.value = "编辑信息";
   addDialogVisible.value = true;
-  ruleForm.adminName = row.adminName;
-  ruleForm.corpnName = row.corpnName;
-  ruleForm.level = Number(row.level);
-  ruleForm.remark = row.remark;
-  ruleForm.password = row.password;
-  ruleForm.againPass = row.password;
-  ruleForm.corpnPhone = row.corpnPhone;
+  ruleForm.corpnPhone = row.phoneNumber;
+  ruleForm.corpnName = row.name;
+  ruleForm.adminName = row.userNumber;
+  ruleForm.cardNum = row.cardNumber;
+  ruleForm.adminMenuId = row.usersId;
+  ruleForm.password = row.passWord;
+  ruleForm.department = row.department;
   ruleForm.id = row.id;
+  nextTick(() => {
+    editMemberTree.value.setCheckedKeys([row.adminMenu.id]);
+  });
 };
 // 确认添加员工
 const submitAdd = lodash.debounce(async (formEl) => {
   if (!formEl) return;
   await formEl.validate(async (valid, fields) => {
     if (valid) {
-      if (dialongTitle.value == "新增账号") {
-        if (ruleForm.password == ruleForm.againPass) {
-          let data = {
-            adminName: ruleForm.adminName,
-            corpnName: ruleForm.corpnName,
-            level: ruleForm.level,
-            remark: ruleForm.remark,
-            password: ruleForm.password,
-            corpnPhone: ruleForm.corpnPhone,
-            managerId: sessionStorage.getItem("token"),
-          };
-          let res = await axios({
-            method: "post",
-            url: api.value + "/mhotel/managerAdmininsertAdminManager.action",
-            headers: {
-              // token: sessionStorage.getItem("token"),
-            },
-            params: data,
+      if (ruleForm.id) {
+        let data = {
+          permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+          cardNumber: ruleForm.cardNum,
+          admin: {
+            adminMenuId: ruleForm.adminMenuId,
+            // usersId: ruleForm.cardNum,
+            name: ruleForm.corpnName,
+            userNumber: ruleForm.adminName,
+            passWord: ruleForm.password,
+            phoneNumber: ruleForm.corpnPhone,
+            department: ruleForm.department,
+            id: ruleForm.id,
+          },
+        };
+        let res = await axios({
+          method: "post",
+          url: api.value + "/admin/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,
           });
-          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,
-            });
-          }
+          addDialogVisible.value = false;
+          ruleFormRef.value.resetFields();
         } else {
           ElMessage({
             type: "error",
             showClose: true,
-            message: "两次密码输入不一致",
+            message: res.data.message,
             center: true,
           });
         }
       } else {
-        if (ruleForm.password == ruleForm.againPass) {
-          let data = {
-            adminName: ruleForm.adminName,
-            corpnName: ruleForm.corpnName,
-            level: ruleForm.level,
-            remark: ruleForm.remark,
-            password: ruleForm.password,
-            corpnPhone: ruleForm.corpnPhone,
-            id: ruleForm.id,
-          };
-          let res = await axios({
-            method: "post",
-            url: api.value + "/mhotel/managerAdminupdateAdminManager.action",
-            headers: {
-              // token: sessionStorage.getItem("token"),
-              // user_head: sessionStorage.getItem("userhead"),
-            },
-            params: data,
+        let data = {
+          permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+          adminMenuId: ruleForm.adminMenuId,
+          cardNumber: ruleForm.cardNum,
+          name: ruleForm.corpnName,
+          userNumber: ruleForm.adminName,
+          passWord: ruleForm.password,
+          phoneNumber: ruleForm.corpnPhone,
+          department: ruleForm.department,
+        };
+        let res = await axios({
+          method: "post",
+          url: api.value + "/admin/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,
           });
-          // 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,
-            });
-          }
+          addDialogVisible.value = false;
+          ruleFormRef.value.resetFields();
         } else {
           ElMessage({
             type: "error",
             showClose: true,
-            message: "两次密码输入不一致",
+            message: res.data.message,
             center: true,
           });
         }
@@ -587,13 +765,14 @@ const del = async (row) => {
   // console.log(row);
   let data = {
     id: row.id,
+    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
   };
   let res = await axios({
-    method: "post",
-    url: api.value + "/mhotel/managerAdmindelAdmin.action",
+    method: "get",
+    url: api.value + "/admin/delete",
     headers: {
-      // token: sessionStorage.getItem("token"),
-      // user_head: sessionStorage.getItem("userhead"),
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
     },
     params: data,
   });
@@ -685,6 +864,8 @@ const handleCurrentChange = (value) => {
 onBeforeMount(() => {
   api.value = store.state.user.api;
   getList();
+  roleList();
+  schoolData();
 });
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
@@ -846,7 +1027,7 @@ onUnmounted(() => {
         }
       }
       .el-dialog__body {
-        padding: 30px 20px 10px 20px;
+        padding: 20px 20px 10px 20px;
         .el-input {
           width: 200px;
           .el-input__suffix-inner {
@@ -933,3 +1114,17 @@ onUnmounted(() => {
   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>

+ 66 - 130
src/views/class/class.vue

@@ -2,7 +2,7 @@
   <div class="content-box">
     <div class="left">
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
-      <span class="cameratxt">房价管理</span>
+      <span class="cameratxt">课表管理</span>
     </div>
     <div>
       <div class="middle">
@@ -31,6 +31,7 @@
                 value-format="YYYY-MM-DD"
                 :prefix-icon="Calendar"
                 placeholder="请选择日期"
+                @change="searchBtn"
               />
               <!-- <el-date-picker
                 v-model="searchInput.createTime"
@@ -94,17 +95,30 @@
             height: '50px',
           }"
         >
-          <el-table-column align="center" prop="houseName" label="日期/星期" />
-          <el-table-column align="center" prop="houseName" label="有无替换" />
           <el-table-column
-            v-for="(i, index) in tableHead"
+            width="200"
             align="center"
-            :key="index"
-            label="资格老师"
-            width="130"
+            prop="dateName"
+            label="日期/星期"
+          />
+          <el-table-column
+            width="150"
+            align="center"
+            prop="remarks"
+            show-overflow-tooltip
+            label="有无替换"
+          >
+          </el-table-column>
+          <el-table-column
+            align="center"
+            v-for="i in tableHead"
           >
+          <template #header>
+            <div>教师资格</div>
+          </template>
             <template #default="{ row }">
-              <span>老师</span>
+              <span v-if="row.list[i-1]">{{ row.list[i-1].jsxm }}</span>
+              <span v-else></span>
             </template>
           </el-table-column>
         </el-table>
@@ -407,96 +421,11 @@ const api = ref("");
 const router = useRouter();
 // 表格数据(-----------------------------------)
 const loading = ref(false);
-const tableHead = ref([
-  {
-    data: "2023-08-10",
-    roomY: "剩2间房",
-  },
-  {
-    data: "2023-08-11",
-    roomY: "剩6间房",
-  },
-  {
-    data: "2023-08-12",
-    roomY: "剩2间房",
-  },
-  {
-    data: "2023-08-13",
-    roomY: "剩6间房",
-  },
-  {
-    data: "2023-08-14",
-    roomY: "剩2间房",
-  },
-  {
-    data: "2023-08-15",
-    roomY: "剩6间房",
-  },
-]); // 表头循环日期
+const tableHead = ref(20); // 表头循环日期
 const tableData = reactive({
   list: [
-    {
-      orderNum: "双人床",
-      money: 78,
-      inputPriceShow: true,
-      dataList: [
-        {
-          data: "2023-08-10",
-          money: "120",
-        },
-        {
-          data: "2023-08-11",
-          money: "130",
-        },
-        {
-          data: "2023-08-12",
-          money: "140",
-        },
-        {
-          data: "2023-08-13",
-          money: "150",
-        },
-        {
-          data: "2023-08-14",
-          money: "160",
-        },
-        {
-          data: "2023-08-15",
-          money: "170",
-        },
-      ],
-    },
-    {
-      orderNum: "单人床",
-      money: 37,
-      inputPriceShow: true,
-      dataList: [
-        {
-          data: "2023-08-10",
-          money: "120",
-        },
-        {
-          data: "2023-08-11",
-          money: "130",
-        },
-        {
-          data: "2023-08-12",
-          money: "140",
-        },
-        {
-          data: "2023-08-13",
-          money: "150",
-        },
-        {
-          data: "2023-08-14",
-          money: "160",
-        },
-        {
-          data: "2023-08-15",
-          money: "170",
-        },
-      ],
-    },
+    { time: "2023/10/11  星期一", name: "张发财替换张晓才" },
+    { time: "2023/10/11  星期一", name: "张发财替换张晓才" },
   ],
 });
 const currentPage = ref(1); // 当前页
@@ -507,8 +436,8 @@ const changePriceSelect = ref();
 // const selectData = reactive({ list: [] }); // 多选框选择的数据
 // 搜索按钮数据
 const searchInput = reactive({
-  changePriceSelId: "",
-  createTime: dayjs().format("YYYY-MM-DD"),
+  keyWord: "",
+  createTime: ["2023-09-04", "2023-09-06"],
 });
 
 const addDialogVisible = ref(false); // 控制添加员工弹窗
@@ -586,29 +515,36 @@ watch(
 const getList = async () => {
   loading.value = true;
   let data = {
-    page: currentPage.value,
-    rows: pageSize.value,
-    // setDate: searchInput.createTime, // 关键字查询
-    managerId: sessionStorage.getItem("token"),
-    houseId: searchInput.changePriceSelId, //  房型id
+    teacherName: searchInput.keyWord, // 关键字查询
+    stateTime:"",
+    endTime:""
   };
   if (searchInput.createTime) {
-    data.setDate = searchInput.createTime;
+    data.stateTime = searchInput.createTime[0];
+    data.endTime = searchInput.createTime[1];
   }
   let res = await axios({
     method: "get",
-    url: api.value + "/mhotel/house/price/queryPage.action",
+    url: api.value + "/class-schedule/schedule",
     headers: {
-      // token: sessionStorage.getItem("token"),
-      // user_head: sessionStorage.getItem("userhead"),
+      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.pageList;
-    tableHead.value = res.data.data.dateTimes;
-    total.value = res.data.data.total;
+    let maxNum = 0;
+    res.data.data.forEach((item) => {
+      item.list = item.classListVo.list;
+      item.remarks = item.classListVo.remarks;
+      if (item.classListVo.list.length > maxNum) {
+        maxNum = item.classListVo.list.length;
+      }
+    });
+    tableHead.value = maxNum;
+    console.log(maxNum);
+    tableData.list = res.data.data;
     loading.value = false;
   } else {
     loading.value = false;
@@ -622,8 +558,7 @@ const getList = async () => {
 };
 
 // 搜索功能  改变日期和房型改变数据
-const searchData = (val) => {
-  // console.log(val);
+const searchBtn = () => {
   getList();
 };
 // const searchData = lodash.debounce(async () => {
@@ -633,7 +568,7 @@ const searchData = (val) => {
 // 批量改价功能(------------------------------------)
 const roomClose = () => {
   roomCloseDialogVisible.value = true;
-  changePrice.createTime = [[]];
+  changePrice.createTime = [];
 };
 // 关闭批量改价
 const cancelRoomClose = () => {
@@ -942,22 +877,23 @@ const handleCurrentChange2 = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
-  const data = {
-    managerId: sessionStorage.getItem("token"),
-  };
-  let res = await axios({
-    method: "get",
-    url: api.value + "/mhotel/house/price/queryHouseListByManagerId.action",
-    headers: {
-      token: sessionStorage.getItem("token"),
-      user_head: sessionStorage.getItem("userhead"),
-    },
-    params: data,
-  });
-  console.log(res, "改价下拉框数据");
-  changePriceSelect.value = res.data.data;
-  recordRoomType.value = res.data.data;
-  changePirceRoomType.value = res.data.data;
+
+  // const data = {
+  //   managerId: sessionStorage.getItem("token"),
+  // };
+  // let res = await axios({
+  //   method: "get",
+  //   url: api.value + "/mhotel/house/price/queryHouseListByManagerId.action",
+  //   headers: {
+  //     token: sessionStorage.getItem("token"),
+  //     user_head: sessionStorage.getItem("userhead"),
+  //   },
+  //   params: data,
+  // });
+  // console.log(res, "改价下拉框数据");
+  // changePriceSelect.value = res.data.data;
+  // recordRoomType.value = res.data.data;
+  // changePirceRoomType.value = res.data.data;
   // searchInput.changePriceSelId = changePriceSelect.value[0].id;
   getList();
 });
@@ -1050,7 +986,7 @@ onBeforeMount(async () => {
       height: 100%;
 
       :deep(.el-table__header-wrapper) {
-        background-color: #000;
+        background-color: #fff;
         font-size: 15px;
 
         tr {

+ 63 - 41
src/views/doorLock/doorLock.vue

@@ -4,7 +4,7 @@
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
       <span class="cameratxt">门锁管理</span>
     </div>
-    <div>
+    <div class="middles">
       <div class="middle">
         <div class="filter">
           <div class="condition">
@@ -31,33 +31,11 @@
         </div>
         <div class="changeItems">
           <div
+            v-for="i in roomTypes"
             class="changeItem"
-            :class="changeIndex == 1 ? 'changeItem_active' : ''"
-            @click="changeItem(1)"
-          >
-            全部
-          </div>
-          <div
-            class="changeItem"
-            :class="changeIndex == 2 ? 'changeItem_active' : ''"
-            @click="changeItem(2)"
-          >
-            大床房
-          </div>
-          <div
-            class="changeItem"
-            :class="changeIndex == 3 ? 'changeItem_active' : ''"
-            @click="changeItem(3)"
-          >
-            小床房
-          </div>
-          <div
-            class="changeItem"
-            :class="changeIndex == 4 ? 'changeItem_active' : ''"
-            @click="changeItem(4)"
-          >
-            单间
-          </div>
+            :class="roomTypeIndex == i ? 'changeItem_active' : ''"
+            @click="changeTypes(i)"
+          >{{ i }}</div>
         </div>
         <div class="changeItems">
           <el-button
@@ -613,7 +591,7 @@
                       label="创建时间"
                     >
                     </el-table-column>
-                    <el-table-column align="center" label="操作" width="140">
+                    <el-table-column align="center" label="操作" width="200">
                       <template #default="scope">
                         <div class="options">
                           <div class="reset" @click="edit(scope.row)">修改</div>
@@ -729,7 +707,7 @@
                       label="创建时间"
                     >
                     </el-table-column>
-                    <el-table-column align="center" label="操作" width="140">
+                    <el-table-column align="center" label="操作" width="200">
                       <template #default="scope">
                         <div class="options">
                           <div class="reset" @click="edit(scope.row)">修改</div>
@@ -830,7 +808,7 @@
                       label="创建时间"
                     >
                     </el-table-column>
-                    <el-table-column align="center" label="操作" width="140">
+                    <el-table-column align="center" label="操作" width="200">
                       <template #default="scope">
                         <div class="options">
                           <div class="reset" @click="edit(scope.row)">修改</div>
@@ -1236,6 +1214,8 @@ const searchInput = reactive({
   keyWord: "",
 }); // 搜索按钮数据
 
+const roomTypes=ref();// 房间类型数据
+const roomTypeIndex=ref()// 选中的房间类型
 const roomList = reactive({
   list: [
     {
@@ -1856,6 +1836,41 @@ const itemClick = (i) => {
   // }
 };
 
+// 房型列表展示条
+const roomNameTypeData=async ()=>{
+  let res = await axios({
+    method: "get",
+    url: api.value + "/house/roomNameType",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+  });
+  console.log(res, "房型管理");
+  if (res.data.code == 200) {
+    roomTypes.value=res.data.data
+    roomTypeIndex.value=roomTypes.value[0]
+    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 changeTypes=(val)=>{
+  roomTypeIndex.value=val
+}
+
 // 查看员工列表
 const getList = async () => {
   loading.value = true;
@@ -2280,6 +2295,7 @@ const handleCurrentChange = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
+  roomNameTypeData()
 });
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
@@ -2307,10 +2323,18 @@ onUnmounted(() => {
     color: rgb(0, 0, 0);
     font-size: 18px;
     font-weight: 600;
+    .cameratxt{
+      height: 60px;
+      line-height: 60px;
+    }
+  }
+
+  .middles{
+    height: calc(100% - 61px);
   }
 
   .middle {
-    width: 96%;
+    width: calc(100% - 60px);
     margin: 0 auto;
 
     color: #000;
@@ -2346,10 +2370,12 @@ onUnmounted(() => {
         border-radius: 3px;
         color: rgba(166, 166, 166, 1);
         cursor: pointer;
+        border: 1px solid transparent;
       }
       .changeItem_active {
         background-color: rgba(222, 234, 252, 1);
         color: rgba(0, 97, 255, 1);
+        border: 1px solid rgba(0, 97, 255, 1);
       }
       .search {
         margin-right: 5px;
@@ -2398,8 +2424,8 @@ onUnmounted(() => {
   }
 
   .footer {
-    width: 96%;
-    height: calc(100vh - 345px);
+    width: calc(100% - 60px);
+    height: calc(100% - 180px);
     margin: 10px auto 20px;
     color: #000;
     overflow: auto;
@@ -3108,7 +3134,6 @@ onUnmounted(() => {
 }
 // 钥匙管理
 :deep(.keyDialog) {
-  //   height: 420px;
   border-radius: 11px;
   .el-dialog__header {
     border-radius: 11px 11px 0 0;
@@ -3127,9 +3152,7 @@ onUnmounted(() => {
       width: 200px;
     }
     .title {
-      // margin: 20px 0;
-      // border: 1px solid rgba(229, 229, 229, 1);
-      // border-radius: 5px;
+      margin: 20px;
       box-sizing: border-box;
       .keyTitle {
         width: 828px;
@@ -3198,7 +3221,8 @@ onUnmounted(() => {
           width: 33px;
           height: 50px;
           transform: translateX(827px);
-          // border-radius: 0 5px 5px 0;
+          border-radius: 0;
+          outline: none;
         }
         .el-collapse-item__wrap {
           border: 1px solid rgba(229, 229, 229, 1);
@@ -3239,9 +3263,7 @@ onUnmounted(() => {
         }
       }
     }
-    .titles {
-      margin: -30px 0;
-    }
+    
   }
 }
 // 钥匙管理 密码管理

+ 212 - 137
src/views/meter/meter.vue

@@ -13,8 +13,8 @@
               :clearable="true"
               @clear="searchBtn"
               v-model="searchInput.keyWord"
-              class="w-50 m-2"
-              placeholder="请输入关键字"
+              style="width: 250px"
+              placeholder="请输入房间号,电、水表设备编码"
             />
           </div>
           <div class="condition">
@@ -77,10 +77,18 @@
             type="index"
             label="序号"
           />
-          <el-table-column align="center" prop="hName" label="房型" />
-          <el-table-column align="center" prop="price" label="房费(元)" />
-          <el-table-column align="center" prop="number" label="数量" />
-
+          <el-table-column
+            align="center"
+            prop="waterEquipmentMeterName"
+            label="水表编码"
+          />
+          <el-table-column
+            align="center"
+            prop="electricEquipmentMeterName"
+            label="电表编码"
+          />
+          <el-table-column align="center" prop="roomNumber" label="房间号" />
+          <el-table-column align="center" prop="createTime" label="创建时间" />
           <el-table-column align="center" label="操作" width="200">
             <template #default="scope">
               <div class="edit">
@@ -126,9 +134,9 @@
           label-position="left"
           status-icon
         >
-          <el-form-item label="水电编码 :" prop="SD_encoding">
+          <el-form-item label="水电编码 :" prop="SB_encoding">
             <el-input
-              v-model="editRuleForm.SD_encoding"
+              v-model="editRuleForm.SB_encoding"
               placeholder="请输入水电编码"
               clearable
               style="width: 500px"
@@ -157,11 +165,41 @@
               @node-click="roomNumClick"
               @check-change="handleCheckChange"
             /> -->
-            <el-cascader
+            <!-- <el-cascader
               v-model="editRuleForm.roomNum"
               :options="roomNumData"
               :show-all-levels="false"
-            />
+            /> -->
+            <el-select
+              v-model="editRuleForm.roomNum"
+              popper-class="more-tag-data"
+              filterable
+              clearable
+              remote
+              :remote-method="keyWordMethod"
+              :loading="conteactLoading"
+              placeholder="请选择房间号"
+              style="width: 200px"
+              @change="searchBtn"
+            >
+              <el-option
+                v-for="item in roomNumData"
+                :key="item.id"
+                :label="item.roomNumber"
+                :value="item.id"
+              >
+                <span style="float: left">{{ item.roomNumber }}</span>
+              </el-option>
+              <template #footer>
+                <div class="addStudentMore">
+                  <el-button
+                    v-if="editCurrentPage < editPageTotal && editPageTotal != 0"
+                    @click="addEditMore"
+                    >加载更多+</el-button
+                  >
+                </div>
+              </template>
+            </el-select>
           </el-form-item>
           <el-form-item class="options">
             <el-button
@@ -267,44 +305,18 @@ const total = ref(); // 当前总数
 const titleDialog = ref("");
 const editVisible = ref(false);
 const editRef = ref();
+const keyWord = ref(); // 房间号搜索
+const editCurrentPage = ref(1); // 当前页
+const editPageSize = ref(10);
+const editPageTotal = ref(); // 总页数
 const editRuleForm = reactive({
-  SD_encoding: "",
+  SB_encoding: "",
   DB_encoding: "",
   roomNum: "",
-  id: "",
 });
 // 树形结构配置
 const roomNumRef = ref();
-const roomNumData = [
-  {
-    value: 1,
-    label: "Level one 1",
-    children: [
-      {
-        value: 11,
-        label: "Level two 1-1",
-      },
-      {
-        value: 12,
-        label: "Level two 1-2",
-      },
-    ],
-  },
-  {
-    value: 2,
-    label: "Level one 2",
-    children: [
-      {
-        value: 21,
-        label: "Level two 2-1",
-      },
-      {
-        value: 22,
-        label: "Level two 2-2",
-      },
-    ],
-  },
-];
+const roomNumData = ref();
 // 表单验证
 const editRules = reactive({
   SD_encoding: [
@@ -331,23 +343,23 @@ const getList = async () => {
   loading.value = true;
   let data = {
     page: currentPage.value,
-    rows: pageSize.value,
-    hName: searchInput.keyWord, // 房型名称
-    managerId: sessionStorage.getItem("token"),
+    size: pageSize.value,
+    keyWord: searchInput.keyWord, // 房型名称
+    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
   };
   let res = await axios({
-    method: "post",
-    url: api.value + "/mhotel/housequeryPage.action",
+    method: "get",
+    url: api.value + "/house-number/list",
     headers: {
-      // token: sessionStorage.getItem("token"),
-      // user_head: sessionStorage.getItem("userhead"),
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
     },
     params: data,
   });
-  console.log(res, "房型管理");
+  console.log(res, "水电表管理");
   if (res.data.code == 200) {
     loading.value = false;
-    tableData.list = res.data.data.pageList;
+    tableData.list = res.data.data.records;
     total.value = res.data.data.total;
     // ElMessage({
     //   type: "success",
@@ -371,90 +383,161 @@ const searchBtn = lodash.debounce(async () => {
   getList();
 }, 300);
 // 添加按钮 (-------------------------------------------)
+// 房间号数据
+const roomNumClick = async () => {
+  let data = {
+    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+    page: editCurrentPage.value,
+    size: editPageSize.value,
+    keyWord: keyWord.value,
+  };
+  let res = await axios({
+    method: "get",
+    url: api.value + "/house-number/pullDownList",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
+    params: data,
+  });
+  console.log(res, "房间号查询");
+
+  if (res.data.code == 200) {
+    roomNumData.value = res.data.data.records;
+    editPageTotal.value = res.data.data.pages;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 房间号 下拉框搜索时加载
+const keyWordMethod = (query) => {
+  console.log(query);
+  keyWord.value = query;
+  editCurrentPage.value = 1;
+  roomNumClick();
+};
+const addEditMore = async () => {
+  if (editCurrentPage.value < editPageTotal.value) {
+    editCurrentPage.value++;
+    let data = {
+      permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+      page: editCurrentPage.value,
+      size: editPageSize.value,
+      keyWord: keyWord.value,
+    };
+    let res = await axios({
+      method: "get",
+      url: api.value + "/house-number/pullDownList",
+      headers: {
+        token: sessionStorage.getItem("token"),
+        user_head: sessionStorage.getItem("user_head"),
+      },
+      params: data,
+    });
+    console.log(res.data.data.records, "加载更多房间号下拉数据");
+    roomNumData.value = [...roomNumData.value, ...res.data.data.records];
+  } else {
+    console.log("数据全部加载完成");
+  }
+};
 const addClick = async () => {
   titleDialog.value = "新增";
   editVisible.value = true;
-  //   let data = {
-  //     linkId: row.id,
-  //   };
-  //   let res = await axios({
-  //     method: "post",
-  //     url: api.value + "/mhotel/uploadgetByLinkId.action",
-  //     headers: {},
-  //     params: data,
-  //   });
-  //   console.log(res, "编辑中查找图片");
-  //   if (res.data.code == 200) {
-  //     // res.data.data.fileInfoList.forEach((item) => {
-  //     //   item.uid = item.id;
-  //     // });
-  //     // fileList.list = res.data.data.fileInfoList;
-  //     // ruleForm.fileListJson = fileList.list;
-  //     res.data.data.forEach((item) => {
-  //       item.uid = item.id;
-  //     });
-  //     fileList.list = res.data.data;
-  //     ruleForm.fileListJson = fileList.list;
-  //     // ElMessage({
-  //     //   type: "success",
-  //     //   showClose: true,
-  //     //   message: res.data.message,
-  //     //   center: true,
-  //     // });
-  //   } else {
-  //     ElMessage({
-  //       type: "error",
-  //       showClose: true,
-  //       message: res.data.message,
-  //       center: true,
-  //     });
-  //   }
 };
 
 //编辑按钮  (-------------------------------------------)
-const editClick = async () => {
+const editClick = async (row) => {
   titleDialog.value = "编辑";
   editVisible.value = true;
-  //   let data = {
-  //     linkId: row.id,
-  //   };
-  //   let res = await axios({
-  //     method: "post",
-  //     url: api.value + "/mhotel/uploadgetByLinkId.action",
-  //     headers: {},
-  //     params: data,
-  //   });
-  //   console.log(res, "编辑中查找图片");
-  //   if (res.data.code == 200) {
-  //     // res.data.data.fileInfoList.forEach((item) => {
-  //     //   item.uid = item.id;
-  //     // });
-  //     // fileList.list = res.data.data.fileInfoList;
-  //     // ruleForm.fileListJson = fileList.list;
-  //     res.data.data.forEach((item) => {
-  //       item.uid = item.id;
-  //     });
-  //     fileList.list = res.data.data;
-  //     ruleForm.fileListJson = fileList.list;
-  //     // ElMessage({
-  //     //   type: "success",
-  //     //   showClose: true,
-  //     //   message: res.data.message,
-  //     //   center: true,
-  //     // });
-  //   } else {
-  //     ElMessage({
-  //       type: "error",
-  //       showClose: true,
-  //       message: res.data.message,
-  //       center: true,
-  //     });
-  //   }
+  editRuleForm.SB_encoding = row.waterEquipmentMeterName;
+  editRuleForm.DB_encoding = row.electricEquipmentMeterName;
+  editRuleForm.roomNum = row.id;
+};
+// 确定编辑
+const confirmEdit = (formEl) => {
+  if (!formEl) return;
+  formEl.validate(async (valid, fields) => {
+    if (valid) {
+      if (titleDialog.value == "新增") {
+        let data = {
+          houseNumberId: editRuleForm.roomNum,
+          meterNameElectric: editRuleForm.DB_encoding,
+          meterNameWater: editRuleForm.SB_encoding, // 房型名称
+          permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+        };
+        let res = await axios({
+          method: "post",
+          url: api.value + "/house-number/binding",
+          headers: {
+            token: sessionStorage.getItem("token"),
+            user_head: sessionStorage.getItem("user_head"),
+          },
+          data: data,
+        });
+        console.log(res, "新增确定");
+        if (res.data.code == 200) {
+          ElMessage({
+            type: "success",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        } else {
+          ElMessage({
+            type: "error",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        }
+      } else if (titleDialog.value == "编辑") {
+        let data = {
+          houseNumberId: editRuleForm.roomNum,
+          meterNameElectric: editRuleForm.DB_encoding,
+          meterNameWater: editRuleForm.SB_encoding, // 房型名称
+          permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+        };
+        let res = await axios({
+          method: "post",
+          url: api.value + "/house-number/update",
+          headers: {
+            token: sessionStorage.getItem("token"),
+            user_head: sessionStorage.getItem("user_head"),
+          },
+          data: data,
+        });
+        console.log(res, "编辑确定");
+        if (res.data.code == 200) {
+          ElMessage({
+            type: "success",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        } else {
+          ElMessage({
+            type: "error",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        }
+      }
+    }
+  });
 };
-
 const cancelEdit = () => {
   editVisible.value = false;
+  editRef.value.resetFields();
+  editRuleForm.SB_encoding = "";
+  editRuleForm.DB_encoding = "";
   editRuleForm.roomNum = "";
+  editCurrentPage.value = 1;
 };
 // // 树形结构 复选框被触发
 // const handleCheckChange = (data, checked, indeterminate) => {
@@ -480,28 +563,20 @@ const cancelEdit = () => {
 //   //   buildIdsRef.value.setCheckedKeys(item.build);
 // };
 
-// 确定编辑
-const confirmEdit = (formEl) => {
-  if (!formEl) return;
-  formEl.validate(async (valid, fields) => {
-    if (valid) {
-    }
-  });
-};
-
 //删除按钮
 const del = async (row) => {
   let data = {
-    id: row.id,
+    houseNumberId: row.id,
+    permissionSettingId:sessionStorage.getItem("permissionSettingId")
   };
   let res = await axios({
     method: "post",
-    url: api.value + "/mhotel/housedelHouser.action",
+    url: api.value + "/house-number/delete",
     headers: {
-      // token: sessionStorage.getItem("token"),
-      // user_head: sessionStorage.getItem("userhead"),
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
     },
-    params: data,
+    data: data,
   });
   if (res.data.code == 200) {
     if (tableData.list.length == 1 && currentPage.value != 1) {

+ 278 - 253
src/views/order/order.vue

@@ -4,27 +4,7 @@
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
       <span class="cameratxt">订单管理</span>
     </div>
-    <div>
-      <!-- <div class="top">
-        <ul>
-          <li>
-            <p>{{ pendingOrderSum }}</p>
-            <span>待接单订单总数(单)</span>
-          </li>
-          <li>
-            <p>{{ orderSum }}</p>
-            <span>本月订单总数(单)</span>
-          </li>
-          <li>
-            <p>{{ consumerOrderSum }}</p>
-            <span>本月已消费订单总数(单)</span>
-          </li>
-          <li>
-            <p>{{ sumAccount }}</p>
-            <span>本月已消费订单总额(元)</span>
-          </li>
-        </ul>
-      </div> -->
+    <div class="middles">
       <div class="middle">
         <div class="filter">
           <div class="condition">
@@ -41,8 +21,9 @@
             <span>房间类型 : </span>
             <el-select
               :clearable="false"
-              v-model="searchInput.status"
+              v-model="searchInput.houseType"
               class="m-2"
+              style="width: 180px"
               placeholder="请选择房间类型"
             >
               <el-option label="全部" :value="0" />
@@ -52,16 +33,16 @@
           </div>
           <div class="condition">
             <span>支付时间 : </span>
-            <el-date-picker
-              v-model="searchInput.createTime"
+            <!-- <el-date-picker
+              v-model="searchInput.payTime"
               type="date"
               format="YYYY-MM-DD"
               value-format="YYYY-MM-DD"
               :prefix-icon="Calendar"
               placeholder="请选择日期"
-            />
-            <!-- <el-date-picker
-              v-model="searchInput.createTime"
+            /> -->
+            <el-date-picker
+              v-model="searchInput.payTime"
               type="daterange"
               range-separator="-"
               start-placeholder="起始时间"
@@ -70,28 +51,48 @@
               value-format="YYYY-MM-DD"
               :prefix-icon="Calendar"
               placeholder="请选择日期"
-            /> -->
+              style="width: 280px"
+              @change="searchBtn"
+            />
           </div>
           <div class="condition">
             <span>退款时间 : </span>
-            <el-date-picker
+            <!-- <el-date-picker
               v-model="searchInput.createTime"
               type="date"
               format="YYYY-MM-DD"
               value-format="YYYY-MM-DD"
               :prefix-icon="Calendar"
               placeholder="请选择日期"
+            /> -->
+            <el-date-picker
+              v-model="searchInput.refundTime"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="起始时间"
+              end-placeholder="结束时间"
+              format="YYYY-MM-DD"
+              value-format="YYYY-MM-DD"
+              :prefix-icon="Calendar"
+              placeholder="请选择日期"
+              style="width: 280px"
+              @change="searchBtn"
             />
           </div>
           <div class="condition">
             <span>取消时间 : </span>
             <el-date-picker
-              v-model="searchInput.createTime"
-              type="date"
+              v-model="searchInput.cancelTime"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="起始时间"
+              end-placeholder="结束时间"
               format="YYYY-MM-DD"
               value-format="YYYY-MM-DD"
               :prefix-icon="Calendar"
               placeholder="请选择日期"
+              style="width: 280px"
+              @change="searchBtn"
             />
           </div>
           <div class="condition">
@@ -101,35 +102,53 @@
               v-model="searchInput.status"
               class="m-2"
               placeholder="请选择状态"
+              style="width: 180px"
             >
               <el-option label="全部" :value="0" />
-              <el-option label="全日房" :value="1" />
-              <el-option label="钟点房" :value="2" />
+              <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-option label="已退房" :value="8" />
+              <el-option label="已取消,超时" :value="9" />
             </el-select>
           </div>
           <div class="condition">
             <span>入住时间 : </span>
             <el-date-picker
-              v-model="searchInput.createTime"
-              type="date"
+              v-model="searchInput.liveTime"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="起始时间"
+              end-placeholder="结束时间"
               format="YYYY-MM-DD"
               value-format="YYYY-MM-DD"
               :prefix-icon="Calendar"
               placeholder="请选择日期"
+              style="width: 280px"
+              @change="searchBtn"
             />
           </div>
           <div class="condition">
             <span>离店时间 : </span>
             <el-date-picker
-              v-model="searchInput.createTime"
-              type="date"
+              v-model="searchInput.leaveTime"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="起始时间"
+              end-placeholder="结束时间"
               format="YYYY-MM-DD"
               value-format="YYYY-MM-DD"
               :prefix-icon="Calendar"
               placeholder="请选择日期"
+              style="width: 280px"
+              @change="searchBtn"
             />
           </div>
-          <div class="condition">
+          <!-- <div class="condition">
             <span>退房时间 : </span>
             <el-date-picker
               v-model="searchInput.createTime"
@@ -139,7 +158,7 @@
               :prefix-icon="Calendar"
               placeholder="请选择日期"
             />
-          </div>
+          </div> -->
 
           <el-button
             style="margin-left: 20px"
@@ -183,113 +202,147 @@
               /> -->
           <el-table-column
             align="center"
-            prop="orderNum"
+            prop="orderNumber"
+            show-overflow-tooltip
             width="180"
             label="订单编号"
           >
             <template #default="{ row }">
-              <div class="orderNum" @click="orderInfo(row)">
-                {{ row.orderNum }}
-              </div>
+              <span>
+                {{ row.orderNumber }}
+              </span>
             </template>
           </el-table-column>
           <el-table-column
             align="center"
-            prop="payTime"
+            prop="liveTime"
             label="入住时间"
             width="180"
           />
           <el-table-column
             align="center"
-            prop="payTime"
+            prop="leaveTime"
             label="离店时间"
             width="180"
           />
-          <el-table-column align="center" prop="userName" label="用户名称" />
-          <el-table-column align="center" prop="userPhone" label="手机号码" />
-          <el-table-column align="center" prop="houseName" label="房型" />
+          <el-table-column
+            align="center"
+            prop="reserveName"
+            width="100"
+            label="用户名称"
+          />
+          <el-table-column
+            align="center"
+            prop="phone"
+            width="180"
+            label="手机号码"
+          />
           <el-table-column
             align="center"
             prop="houseName"
-            label="房号"
             width="100"
+            label="房型"
           />
           <el-table-column
             align="center"
+            prop="houseNumber"
+            label="房号"
             width="100"
-            prop="houseTotalPrice"
+          />
+          <el-table-column
+            align="center"
+            width="130"
+            prop="orderPrice"
             label="订单金额(元)"
           />
           <el-table-column
             align="center"
             prop="orderStatusName"
             label="订单状态"
+            width="120"
           >
             <template #default="{ row }">
               <div
                 style="color: rgba(9, 101, 98, 1)"
-                v-if="row.orderNum == '待支付'"
+                v-if="row.orderStart == 1"
               >
-                {{ row.orderNum }}
+                待支付
               </div>
               <div
-                style="color: rgba(56, 56, 56, 1)"
-                v-if="row.orderNum == '已支付'"
+                style="color: rgba(13, 66, 56, 1)"
+                v-if="row.orderStart == 2"
               >
-                {{ row.orderNum }}
+                已支付
               </div>
               <div
                 style="color: rgba(42, 130, 228, 1)"
-                v-if="row.orderNum == '待入住'"
+                v-if="row.orderStart == 3"
               >
-                {{ row.orderNum }}
+                待入住
               </div>
               <div
-                style="color: rgba(56, 56, 56, 1)"
-                v-if="row.orderNum == '已入住'"
-              >
-                {{ row.orderNum }}
-              </div>
-              <div
-                style="color: rgba(0, 186, 173, 1)"
-                v-if="row.orderNum == '已退款'"
+                style="color: rgba(56, 24, 96, 1)"
+                v-if="row.orderStart == 4"
               >
-                {{ row.orderNum }}
+                已入住
               </div>
               <div
                 style="color: rgba(255, 87, 51, 1)"
-                v-if="row.orderNum == '退款中'"
+                v-if="row.orderStart == 5"
               >
-                {{ row.orderNum }}
+                待结账
               </div>
               <div
-                style="color: rgba(56, 56, 56, 1)"
-                v-if="row.orderNum == '已取消'"
+                style="color: rgba(25, 87, 51, 1)"
+                v-if="row.orderStart == 6"
               >
-                {{ row.orderNum }}
+                退款中
               </div>
               <div
-                style="color: rgba(212, 48, 48, 1)"
-                v-if="row.orderNum == '待结账'"
+                style="color: rgba(0, 186, 173, 1)"
+                v-if="row.orderStart == 7"
               >
-                {{ row.orderNum }}
+                已退款
               </div>
               <div
-                style="color: rgba(56, 56, 56, 1)"
-                v-if="row.orderNum == '已退房'"
+                style="color: rgba(56, 106, 35, 1)"
+                v-if="row.orderStart == 8"
               >
-                {{ row.orderNum }}
+                已退房
               </div>
               <div
-                style="color: rgba(9, 101, 98, 1)"
-                v-if="row.orderNum == '待支付'"
+                style="color: rgba(212, 48, 48, 1)"
+                v-if="row.orderStart == 9"
               >
-                {{ row.orderNum }}
+                已取消,超时
               </div>
             </template>
           </el-table-column>
-
-          <!-- <el-table-column
+          <el-table-column
+            align="center"
+            width="180"
+            prop="payTime"
+            label="支付时间"
+          />
+          <el-table-column
+            align="center"
+            width="180"
+            prop="refundTime"
+            label="退款时间"
+          />
+          <el-table-column
+            align="center"
+            width="180"
+            prop="houseName"
+            label="退房时间"
+          />
+          <el-table-column
+            align="center"
+            width="180"
+            prop="cancelTime"
+            label="取消时间"
+          />
+          <el-table-column
             align="center"
             fixed="right"
             label="操作"
@@ -297,7 +350,7 @@
           >
             <template #default="scope">
               <div>
-                <div class="edit" v-if="scope.row.orderStatus == 2">
+                <div class="edit">
                   <el-popconfirm
                     width="220"
                     confirm-button-text="确认"
@@ -327,9 +380,20 @@
                 </div>
               </div>
             </template>
-          </el-table-column> -->
+          </el-table-column>
         </el-table>
-
+        <!-- 分页组件 -->
+        <div class="pageSize">
+          <span></span>
+          <el-pagination
+            background
+            :current-page="currentPage"
+            :page-size="pageSize"
+            layout="total, prev, pager, next, jumper, slot"
+            :total="total"
+            @update:current-page="handleCurrentChange"
+          />
+        </div>
         <!-- 添加耗材弹窗 -->
         <!-- <el-dialog
             class="addStaff"
@@ -701,34 +765,6 @@
           </div>
         </el-dialog>
       </div>
-
-      <!-- 分页组件 -->
-      <div class="pageSize">
-        <span></span>
-        <el-pagination
-          background
-          :current-page="currentPage"
-          :page-size="pageSize"
-          layout="total, prev, pager, next, jumper, slot"
-          :total="total"
-          @update:current-page="handleCurrentChange"
-        />
-      </div>
-    </div>
-  </div>
-  <div class="firstLogin" v-if="flag == 1 ? true : false">
-    <div class="goInfo">
-      <h2>欢迎登陆靖安乡村民宿管理平台</h2>
-      <p>为了完善您的民宿信息,请前往信息维护页面进行完善</p>
-      <el-button
-        style="margin-left: 20px"
-        color="rgba(9, 101, 98, 1)"
-        type="primary"
-        class="search"
-        @click="goInfo"
-      >
-        立即前往</el-button
-      >
     </div>
   </div>
 </template>
@@ -759,48 +795,22 @@ const nowDay = ref(dayjs().format("YYYY-MM-DD HH:mm:ss"));
 // 表格数据
 const loading = ref(false);
 const tableData = reactive({
-  list: [
-    // {
-    //   userName: "124145523",
-    //   teamName: "",
-    //   schoolName: "李四",
-    //   userPhone: "1455532141",
-    //   userZzname: "三人房",
-    //   buildName: 21,
-    //   workTypeName: 2300,
-    //   acceptanceTime: "2023-08-03 21:09:12",
-    // },
-    // {
-    //   userName: "124145523",
-    //   teamName: "",
-    //   schoolName: "李四",
-    //   userPhone: "1455532141",
-    //   userZzname: "三人房",
-    //   buildName: 21,
-    //   workTypeName: 2300,
-    //   acceptanceTime: "2023-08-03 21:09:12",
-    // },
-    // {
-    //   userName: "124145523",
-    //   teamName: "",
-    //   schoolName: "李四",
-    //   userPhone: "1455532141",
-    //   userZzname: "三人房",
-    //   buildName: 21,
-    //   workTypeName: 2300,
-    //   acceptanceTime: "2023-08-03 21:09:12",
-    // },
-  ],
+  list: [],
 });
 
 const searchInput = reactive({
   keyWord: "",
+  houseType: 0,
   status: 0,
-  createTime: "",
+  payTime: "",
+  refundTime: "",
+  cancelTime: "",
+  liveTime: "",
+  leaveTime: "",
 }); // 搜索按钮数据
 
 const currentPage = ref(1); // 当前页
-const pageSize = ref(9);
+const pageSize = ref(10);
 const total = ref(); // 当前总数
 const selectData = reactive({ list: [] }); // 多选框选择的数据
 const pendingOrderSum = ref(); // 待接单数
@@ -865,61 +875,72 @@ const goInfo = () => {
 const getList = async () => {
   loading.value = true;
   let data = {
+    adminId: sessionStorage.getItem("permissionSettingId"),
     page: currentPage.value, // 当前页
-    rows: pageSize.value, // 一页数据条数
-    ledgerParam: searchInput.keyWord,
-    managerId: sessionStorage.getItem("token"),
+    size: pageSize.value, // 一页数据条数
+    keyWord: searchInput.keyWord,
+    houseType: searchInput.houseType,
+    orderStatus:searchInput.status,
+    payPriceStartTime: "",
+    payPriceEndTime: "",
+    refundStartTime: "",
+    refundEndTime: "",
+    liveStartTime: "",
+    liveEndTime: "",
+    leaveStartTime: "",
+    leaveEndTime: "",
   };
   if (searchInput.createTime) {
     data.payStartTime = searchInput.createTime[0];
     data.payEndTime = searchInput.createTime[1];
   }
 
+  if (searchInput.houseType) {
+    if (searchInput.houseType == 0) {
+      data.houseType = "";
+    }
+  }
   if (searchInput.status) {
-    if (searchInput.status != 0) {
-      data.orderStatus = searchInput.status;
+    if (searchInput.status == 0) {
+      data.orderStatus = "";
     }
   }
   let res = await axios({
-    method: "post",
-    url: api.value + "/mhotel/bookquearyBookPage.action",
+    method: "get",
+    url: api.value + "/house-order/pageList",
     headers: {
-      // token: sessionStorage.getItem("token"),
-      // user_head: sessionStorage.getItem("userhead"),
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
     },
     params: data,
   });
   console.log(res, "用户列表");
   if (res.data.code == 200) {
-    res.data.data.bookIPage.pageList.forEach((item) => {
-      if (item.orderStatus == 1) {
-        item.orderStatusName = "待支付";
-      } else if (item.orderStatus == 2) {
-        item.orderStatusName = "已支付";
-      } else if (item.orderStatus == 3) {
-        item.orderStatusName = "待入住";
-      } else if (item.orderStatus == 4) {
-        item.orderStatusName = "已入住";
-      } else if (item.orderStatus == 5) {
-        item.orderStatusName = "已消费";
-      } else if (item.orderStatus == 6) {
-        item.orderStatusName = "支付超时";
-      } else if (item.orderStatus == 7) {
-        item.orderStatusName = "已取消";
-      } else if (item.orderStatus == 8) {
-        item.orderStatusName = "已退单";
-      } else if (item.orderStatus == 9) {
-        item.orderStatusName = "已退款";
-      } else if (item.orderStatus == 10) {
-        item.orderStatusName = "退款中";
-      }
-    });
-    tableData.list = res.data.data.bookIPage.pageList;
-    total.value = res.data.data.bookIPage.total;
-    pendingOrderSum.value = res.data.data.pendingOrderSum;
-    orderSum.value = res.data.data.orderSum;
-    consumerOrderSum.value = res.data.data.consumerOrderSum;
-    sumAccount.value = res.data.data.sumAccount;
+    // res.data.data.bookIPage.pageList.forEach((item) => {
+    //   if (item.orderStatus == 1) {
+    //     item.orderStatusName = "待支付";
+    //   } else if (item.orderStatus == 2) {
+    //     item.orderStatusName = "已支付";
+    //   } else if (item.orderStatus == 3) {
+    //     item.orderStatusName = "待入住";
+    //   } else if (item.orderStatus == 4) {
+    //     item.orderStatusName = "已入住";
+    //   } else if (item.orderStatus == 5) {
+    //     item.orderStatusName = "已消费";
+    //   } else if (item.orderStatus == 6) {
+    //     item.orderStatusName = "支付超时";
+    //   } else if (item.orderStatus == 7) {
+    //     item.orderStatusName = "已取消";
+    //   } else if (item.orderStatus == 8) {
+    //     item.orderStatusName = "已退单";
+    //   } else if (item.orderStatus == 9) {
+    //     item.orderStatusName = "已退款";
+    //   } else if (item.orderStatus == 10) {
+    //     item.orderStatusName = "退款中";
+    //   }
+    // });
+    tableData.list = res.data.data.list;
+    total.value = res.data.data.totalCount;
     loading.value = false;
     // ElMessage({
     //   type: "success",
@@ -1329,8 +1350,8 @@ onUnmounted(() => {
 
 <style scoped lang="scss">
 .content-box {
-  width: 97.5%;
-  height: 89%;
+  width: calc(100% - 40px);
+  height: calc(100% - 105px);
   margin: 20px auto;
   background-color: #fff;
   color: #fff;
@@ -1404,10 +1425,15 @@ onUnmounted(() => {
     }
   }
 
+  .middles {
+    height: calc(100% - 61px);
+    display: flex;
+    flex-direction: column;
+  }
+
   .middle {
-    width: 96%;
+    width: calc(100% - 60px);
     margin: 0 auto;
-
     color: #000;
 
     // border-bottom: 1px solid rgb(231, 231, 231);
@@ -1479,13 +1505,14 @@ onUnmounted(() => {
   }
 
   .footer {
-    width: 96%;
-    height: 502px;
-    margin: 10px auto 30px;
+    flex: 1;
+    width: calc(100% - 60px);
+    margin: 10px auto 0;
+    overflow: auto;
 
     .el-table--fit {
-      height: 100%;
-
+      width: 100%;
+      height: calc(100% - 60px);
       :deep(.el-table__header-wrapper) {
         background-color: #000;
         font-size: 15px;
@@ -1550,7 +1577,64 @@ onUnmounted(() => {
       //   border: 1px solid rgba(111, 182, 184, 1);
       // }
     }
+    .pageSize {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin: 13px 0;
+
+      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(111, 182, 184, 1);
+          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;
+        }
+      }
+    }
     // 添加员工弹窗样式
     :deep(.addStaff) {
       // height: 600px;
@@ -1707,65 +1791,6 @@ onUnmounted(() => {
       }
     }
   }
-
-  .pageSize {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    margin: 0 30px;
-
-    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(111, 182, 184, 1);
-        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 {

File diff suppressed because it is too large
+ 477 - 660
src/views/process/process.vue


File diff suppressed because it is too large
+ 637 - 182
src/views/roles/roles.vue


+ 136 - 137
src/views/roomPrice/roomPrice.vue

@@ -4,23 +4,11 @@
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
       <span class="cameratxt">房价管理</span>
     </div>
-    <div>
+    <div class="tabData">
       <div class="middle">
         <div class="filter">
           <div class="filter_block">
             <div class="condition">
-              <!-- <el-date-picker
-                  v-model="searchInput.createTime"
-                  type="daterange"
-                  range-separator="-"
-                  start-placeholder="起始时间"
-                  end-placeholder="结束时间"
-                  format="YYYY-MM-DD"
-                  value-format="YYYY-MM-DD"
-                  :prefix-icon="Calendar"
-                  placeholder="请选择日期"
-                /> -->
-
               <el-date-picker
                 v-model="searchInput.createTime"
                 type="date"
@@ -41,14 +29,15 @@
                 @change="searchData"
                 @clear="searchData"
                 clearable
+                style="width: 200px"
               >
-                <!-- <el-option
-                  :label="i.hName"
+                <el-option
+                  :label="i.roomName"
                   :value="i.id"
-                  v-for="i in changePriceSelect"
+                  v-for="i in houseTypeData"
                   :key="i.id"
-                /> -->
-                <el-option label="标准房" value="标准房" />
+                />
+                <!-- <el-option label="标准房" value="标准房" /> -->
               </el-select>
             </div>
           </div>
@@ -81,7 +70,7 @@
             height: '50px',
           }"
         >
-          <el-table-column align="center" prop="houseName" label="本地房型" />
+          <el-table-column align="center" width="200" prop="houseName" label="本地房型" />
           <el-table-column
             v-for="(item, index) in tableHead"
             align="center"
@@ -244,6 +233,7 @@
                 placeholder="请选择房型"
                 @clear="recordPriceSearch"
                 clearable
+                style="width: 200px"
               >
                 <el-option
                   :label="i.hName"
@@ -494,8 +484,9 @@ const changePriceSelect = ref();
 // 搜索按钮数据
 const searchInput = reactive({
   changePriceSelId: "",
-  createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
+  createTime: '',
 });
+const houseTypeData=ref()// 房型数据
 
 const addDialogVisible = ref(false); // 控制添加员工弹窗
 
@@ -599,7 +590,7 @@ const getList = async () => {
       });
     });
     tableHead.value = arr;
-    // total.value = res.data.data.total;
+    total.value = res.data.data.page.total;
     loading.value = false;
   } else {
     loading.value = false;
@@ -933,19 +924,20 @@ const handleCurrentChange2 = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
-  // const data = {
-  //   managerId: sessionStorage.getItem("token"),
-  // };
-  // let res = await axios({
-  //   method: "get",
-  //   url: api.value + "/mhotel/house/price/queryHouseListByManagerId.action",
-  //   headers: {
-  //     token: sessionStorage.getItem("token"),
-  //     user_head: sessionStorage.getItem("userhead"),
-  //   },
-  //   params: data,
-  // });
-  // console.log(res, "改价下拉框数据");
+  const data = {
+    managerId: sessionStorage.getItem("token"),
+  };
+  let res = await axios({
+    method: "get",
+    url: api.value + "house-price/roomType",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: data,
+  });
+  console.log(res, "房型下拉框数据");
+  houseTypeData.value=res.data.data.day
   // changePriceSelect.value = res.data.data;
   // recordRoomType.value = res.data.data;
   // changePirceRoomType.value = res.data.data;
@@ -956,15 +948,14 @@ onBeforeMount(async () => {
 
 <style scoped lang="scss">
 .content-box {
-  width: 97.5%;
-  height: 89%;
+  width: calc(100% - 40px);
+  height: calc(100% - 105px);
   margin: 20px auto;
   background-color: #fff;
   color: #fff;
   display: flex;
   flex-direction: column;
   box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
-
   .left {
     // width: calc(100wh - 40px);
     display: flex;
@@ -986,142 +977,150 @@ onBeforeMount(async () => {
     }
   }
 
-  .middle {
-    width: 96%;
+  .tabData {
+    width: calc(100% - 60px);
+    height: calc(100% - 61px);
     margin: 0 auto;
+    display: flex;
+    flex-direction: column;
+    .middle {
+      width: 100%;
+      margin: 0 auto;
 
-    color: #000;
-
-    // border-bottom: 1px solid rgb(231, 231, 231);
-    .filter {
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      margin-top: 10px;
+      color: #000;
 
-      .filter_block {
+      // border-bottom: 1px solid rgb(231, 231, 231);
+      .filter {
         display: flex;
-      }
+        align-items: center;
+        justify-content: space-between;
+        margin-top: 10px;
 
-      .search {
-        color: #fff;
-      }
+        .filter_block {
+          display: flex;
+        }
 
-      .condition {
-        display: flex;
-        align-items: center;
-        margin: 10px 30px 10px 0;
+        .search {
+          color: #fff;
+        }
 
-        :deep(.el-input .el-input__inner) {
-          font-size: 14px;
+        .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 20px 0;
 
         span {
-          margin: 0 10px 0 0;
+          color: #fff;
         }
       }
-    }
-
-    .gongneng {
-      margin: 10px 0 20px 0;
 
-      span {
-        color: #fff;
+      :deep(.cont) {
+        width: 60%;
+        margin: 20px auto;
       }
     }
 
-    :deep(.cont) {
-      width: 60%;
-      margin: 20px auto;
-    }
-  }
+    .footer {
+      width: 100%;
+     flex:1;
+      margin: 10px auto 0;
 
-  .footer {
-    width: 96%;
-    height: 550px;
-    margin: 10px auto 30px;
+      .el-table--fit {
+        height: 100%;
 
-    .el-table--fit {
-      height: 100%;
+        :deep(.el-table__header-wrapper) {
+          background-color: #000;
+          font-size: 15px;
 
-      :deep(.el-table__header-wrapper) {
-        background-color: #000;
-        font-size: 15px;
+          tr {
+            color: #000;
+          }
+        }
 
-        tr {
+        :deep(.el-table__row) {
+          height: 50px;
+          font-size: 15px;
           color: #000;
         }
-      }
 
-      :deep(.el-table__row) {
-        height: 50px;
-        font-size: 15px;
-        color: #000;
-      }
-
-      :deep(.el-table__row td) {
-        padding: 0;
-        // border: 0;
-        // border: 1px solid #ccc;
+        :deep(.el-table__row td) {
+          padding: 0;
+          // border: 0;
+          // border: 1px solid #ccc;
+        }
       }
     }
-  }
 
-  .pageSize {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    margin: 0 30px;
-
-    span {
-      color: #000;
-    }
+    .pageSize {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin: 0 30px;
+      height: 60px;
 
-    .el-pagination {
-      // width: 1600px;
-      :deep(.el-pagination__total) {
+      span {
         color: #000;
       }
 
-      :deep(.el-pagination__goto) {
-        color: #000;
-      }
+      .el-pagination {
+        // width: 1600px;
+        :deep(.el-pagination__total) {
+          color: #000;
+        }
 
-      :deep(.el-pagination__classifier) {
-        color: #000;
-      }
+        :deep(.el-pagination__goto) {
+          color: #000;
+        }
 
-      :deep(.el-input__wrapper) {
-        border: 1px solid rgba(0, 0, 0, 1);
-        border-radius: 5px;
-        box-shadow: none;
-      }
+        :deep(.el-pagination__classifier) {
+          color: #000;
+        }
 
-      :deep(.el-pager li) {
-        margin: 0 5px;
-        border: 1px solid rgba(0, 0, 0, 1);
-        border-radius: 5px;
-        background-color: transparent;
-      }
+        :deep(.el-input__wrapper) {
+          border: 1px solid rgba(0, 0, 0, 1);
+          border-radius: 5px;
+          box-shadow: none;
+        }
 
-      :deep(.el-pager li.is-active) {
-        // background-color: rgba(111, 182, 184, 1);
-        border: 1px solid rgba(0, 97, 255, 1);
-        color: rgba(0, 97, 255, 1);
-      }
+        :deep(.el-pager li) {
+          margin: 0 5px;
+          border: 1px solid rgba(0, 0, 0, 1);
+          border-radius: 5px;
+          background-color: transparent;
+        }
 
-      :deep(.btn-prev) {
-        margin-right: 5px;
-        border: 1px solid rgba(0, 0, 0, 1);
-        border-radius: 5px;
-        background-color: transparent;
-      }
+        :deep(.el-pager li.is-active) {
+          // background-color: rgba(111, 182, 184, 1);
+          border: 1px solid rgba(0, 97, 255, 1);
+          color: rgba(0, 97, 255, 1);
+        }
 
-      :deep(.btn-next) {
-        margin-left: 5px;
-        border: 1px solid rgba(0, 0, 0, 1);
-        border-radius: 5px;
-        background-color: transparent;
+        :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;
+        }
       }
     }
   }

File diff suppressed because it is too large
+ 1862 - 0
src/views/roomStatus/roomStatus.css


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


+ 51 - 23
src/views/roomType/roomType.vue

@@ -35,6 +35,7 @@
               @change="getList"
               class="m-2"
               placeholder="请选择房间类型"
+              style="width: 120px"
             >
               <el-option label="全日房" :value="1" />
               <el-option label="钟点房" :value="2" />
@@ -301,6 +302,7 @@
                       v-model="ruleForm.visible"
                       multiple
                       placeholder="选择可见范围"
+                      style="width: 200px"
                     >
                       <el-option label="全部" value="0" />
                       <el-option label="学生" value="1" />
@@ -319,6 +321,7 @@
                       v-model="ruleForm.roomType"
                       class="m-2"
                       placeholder="请选择类型"
+                      style="width: 200px"
                     >
                       <el-option label="全日房" value="1" />
                       <el-option label="钟点房" value="2" />
@@ -333,6 +336,7 @@
                       v-model="ruleForm.roomLiveTime"
                       class="m-2"
                       placeholder="请选择类型"
+                      style="width: 200px"
                     >
                       <el-option label="1小时" value="1" />
                       <el-option label="2小时" value="2" />
@@ -351,6 +355,7 @@
                       value-format="HH:ss"
                       start-placeholder="开始时间"
                       end-placeholder="结束时间"
+                      style="width: 200px"
                     />
                   </el-form-item>
                 </div>
@@ -376,7 +381,7 @@
                     </el-checkbox-group> -->
                     <el-checkbox-group
                       @change="checkHouse"
-                      v-model="roomConfig"
+                      v-model="ruleForm.roomConfig"
                       :max="5"
                     >
                       <el-checkbox label="阳台">阳台</el-checkbox>
@@ -528,7 +533,7 @@ const ruleForm = reactive({
   roomPicture: "", // 房间图片
   id: "",
 });
-const roomConfig=ref() //房型配置
+// const roomConfig=ref([]) //房型配置
 
 // 房费验证
 const validatePrice = (rule, value, callback) => {
@@ -725,8 +730,8 @@ const addlist = async () => {
   ruleForm.number = ""; //数量
   ruleForm.roomType = ""; // 类型
   ruleForm.visible = ""; // 可见范围
-  roomConfig.value = ""; //房型配置
-  ruleForm.roomConfig = ""; //房型配置
+  // roomConfig.value = []; //房型配置
+  ruleForm.roomConfig = []; //房型配置
   ruleForm.id = ""; // id
   ruleForm.roomNumbers = []; // 房间号列表
   ruleForm.roomLiveTime = ""; // 钟点时长
@@ -736,15 +741,18 @@ const addlist = async () => {
 //编辑按钮  (-------------------------------------------)
 const edit = async (row) => {
   console.log(row);
-  dialongTitle.value = "编辑房型"
-  ruleForm.id=row.id
+  dialongTitle.value = "编辑房型";
+  ruleForm.id = row.id;
   let data = {
     houseId: row.id,
   };
   let res = await axios({
     method: "get",
     url: api.value + "/house/details",
-    headers: {},
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
+    },
     params: data,
   });
   console.log(res, "编辑详情");
@@ -759,8 +767,8 @@ const edit = async (row) => {
     ruleForm.roomLiveTime = res.data.data.roomLiveTime;
     ruleForm.receivingTime = res.data.data.receivingTime.split("-");
     ruleForm.roomConfig = res.data.data.roomConfiguration.split(",");
-    roomConfig.value = res.data.data.roomConfiguration.split(",");
-    
+    // roomConfig.value = res.data.data.roomConfiguration.split(",");
+
     let arr = [];
     res.data.data.roomIds.split(",").forEach((item, ind) => {
       arr.push({
@@ -805,12 +813,24 @@ const edit = async (row) => {
 const cancelAdd = () => {
   addDialogVisible.value = false;
   ruleFormRef.value.resetFields();
+  ruleForm.roomName = "";
+  ruleForm.roomArea = "";
+  ruleForm.roomPrice = "";
+  ruleForm.number = "";
+  ruleForm.visible = "";
+  ruleForm.roomType = "";
+  ruleForm.roomLiveTime = "";
+  ruleForm.receivingTime = "";
+  ruleForm.roomConfig = "";
+  // roomConfig.value = '';
+  ruleForm.roomNumbers = "";
+  ruleForm.roomPicture = "";
 };
 // 选择房型配置
 const checkHouse = (val) => {
   console.log(val);
-  ruleForm.roomConfig = val
-  roomConfig.value=val
+  // ruleForm.roomConfig = val
+  ruleForm.roomConfig = val;
   // console.log(ruleForm.roomConfig);
 };
 
@@ -903,17 +923,20 @@ const submitAdd = lodash.debounce(async (formEl) => {
             roomLiveTime: ruleForm.roomLiveTime,
             receivingTime: `${ruleForm.receivingTime[0]}-${ruleForm.receivingTime[1]}`,
             visible: ruleForm.visible.join(","), //可见类型(0:全部,1:学生,2:教职工,3:校友,4:访客,5:临时人员,6:其他,7:领导)
-            roomConfiguration: roomConfig.value.join(','),
+            roomConfiguration: ruleForm.roomConfig.join(","),
             roomPicture: ruleForm.roomPicture,
           },
-          adminId: sessionStorage.getItem("adminMenuId"),
+          adminId: sessionStorage.getItem("permissionSettingId"),
         };
         console.log(data, "添加房型参数");
 
         let res = await axios({
           method: "post",
           url: api.value + "/house/save",
-          headers: {},
+          headers: {
+            token: sessionStorage.getItem("token"),
+            user_head: sessionStorage.getItem("user_head"),
+          },
           data: data,
         });
         console.log(res, "添加房型");
@@ -945,7 +968,7 @@ const submitAdd = lodash.debounce(async (formEl) => {
         let data = {
           roomNumbers: arr, //房间号
           house: {
-            id:ruleForm.id,
+            id: ruleForm.id,
             roomName: ruleForm.roomName, //房间名字
             roomType: ruleForm.roomType, //1:全日房,2:钟点房
             roomPrice: ruleForm.roomPrice,
@@ -954,17 +977,20 @@ const submitAdd = lodash.debounce(async (formEl) => {
             roomLiveTime: ruleForm.roomLiveTime,
             receivingTime: `${ruleForm.receivingTime[0]}-${ruleForm.receivingTime[1]}`,
             visible: ruleForm.visible.join(","), //可见类型(0:全部,1:学生,2:教职工,3:校友,4:访客,5:临时人员,6:其他,7:领导)
-            roomConfiguration: ruleForm.roomConfig.join(','),
+            roomConfiguration: ruleForm.roomConfig.join(","),
             roomPicture: ruleForm.roomPicture,
           },
-          adminId: sessionStorage.getItem("adminMenuId"),
+          adminId: sessionStorage.getItem("permissionSettingId"),
         };
         console.log(data, "添加房型参数");
 
         let res = await axios({
           method: "post",
           url: api.value + "/house/update",
-          headers: {},
+          headers: {
+            token: sessionStorage.getItem("token"),
+            user_head: sessionStorage.getItem("user_head"),
+          },
           data: data,
         });
         console.log(res, "修改房型");
@@ -995,15 +1021,17 @@ const submitAdd = lodash.debounce(async (formEl) => {
 
 //删除按钮
 const del = async (row) => {
+  console.log(row);
   let data = {
-    id: row.id,
+    houseId: row.id,
+    adminId: sessionStorage.getItem("permissionSettingId"),
   };
   let res = await axios({
-    method: "post",
-    url: api.value + "/mhotel/housedelHouser.action",
+    method: "get",
+    url: api.value + "/house/delete",
     headers: {
-      // token: sessionStorage.getItem("token"),
-      // user_head: sessionStorage.getItem("userhead"),
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
     },
     params: data,
   });

+ 65 - 239
src/views/statement/statement.vue

@@ -20,7 +20,7 @@
         待结账
       </div>
     </div>
-    <div v-if="changeIndex == 1">
+    <div class="regulation">
       <div class="middle">
         <div class="filter">
           <div class="condition">
@@ -36,18 +36,10 @@
           </div>
           <div class="condition">
             <span>创建时间&nbsp;&nbsp;</span>
-            <!-- <el-date-picker
-              v-model="searchInput.submitTime"
-              type="date"
-              format="YYYY-MM-DD"
-              value-format="YYYY-MM-DD"
-              :prefix-icon="Calendar"
-              placeholder="请选择日期"
-              style="width: 150px"
-            /> -->
             <el-date-picker
               v-model="searchInput.createTime"
               type="daterange"
+              unlink-panels
               range-separator="-"
               start-placeholder="起始时间"
               end-placeholder="结束时间"
@@ -55,6 +47,7 @@
               value-format="YYYY-MM-DD"
               :prefix-icon="Calendar"
               placeholder="请选择日期"
+              @change="searchBtn"
             />
           </div>
           <div class="condition">
@@ -101,29 +94,42 @@
           />
           <el-table-column
             align="center"
-            prop="orderNum"
+            prop="orderNumber"
             width="180"
             label="订单编号"
           >
             <template #default="{ row }">
-              {{ row.orderNum }}
+              {{ row.orderNumber }}
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="userName" label="入住人" />
+          <el-table-column align="center" prop="liveName" label="入住人" />
           <el-table-column align="center" prop="houseName" label="房型" />
           <el-table-column align="center" prop="userName" label="房号" />
           <el-table-column
             align="center"
-            prop="userName"
+            prop="payPrice"
+            v-if="changeIndex==1"
             label="订单金额(元)"
           />
           <el-table-column
             align="center"
+            prop="payPrice"
+            v-if="changeIndex==2"
+            label="待结账(元)"
+          />
+          <el-table-column
+            align="center"
             prop="payTime"
+            v-if="changeIndex==1"
             label="支付时间"
             width="180"
           />
-
+          <el-table-column
+            align="center"
+            prop="createTime"
+            label="创建时间"
+            width="180"
+          />
           <el-table-column
             align="center"
             fixed="right"
@@ -149,124 +155,6 @@
         />
       </div>
     </div>
-    <div v-if="changeIndex == 2" class="regulation">
-      <div class="middle">
-        <div class="filter">
-          <div class="condition">
-            <span>关键字&nbsp;&nbsp;</span>
-            <el-input
-              :clearable="true"
-              @clear="searchBtn"
-              v-model="accounts.keyWord"
-              class="w-50 m-2"
-              placeholder="请输入关键字查询"
-              style="width: 180px"
-            />
-          </div>
-          <div class="condition">
-            <span>创建时间&nbsp;&nbsp;</span>
-            <!-- <el-date-picker
-              v-model="searchInput.submitTime"
-              type="date"
-              format="YYYY-MM-DD"
-              value-format="YYYY-MM-DD"
-              :prefix-icon="Calendar"
-              placeholder="请选择日期"
-              style="width: 150px"
-            /> -->
-            <el-date-picker
-              v-model="accounts.createTime"
-              type="daterange"
-              range-separator="-"
-              start-placeholder="起始时间"
-              end-placeholder="结束时间"
-              format="YYYY-MM-DD"
-              value-format="YYYY-MM-DD"
-              :prefix-icon="Calendar"
-              placeholder="请选择日期"
-            />
-          </div>
-          <div class="condition">
-            <el-button
-              style="margin-left: 20px"
-              color="rgba(41, 109, 227, 1)"
-              type="primary"
-              class="search"
-              @click="searchBtn"
-              ><el-icon>
-                <Search />
-              </el-icon>
-              <span>查询</span></el-button
-            >
-            <el-button
-              style="margin-left: 20px"
-              color="rgba(41, 109, 227, 1)"
-              type="primary"
-              plain
-              @click="searchBtn"
-            >
-              导出</el-button
-            >
-          </div>
-        </div>
-      </div>
-      <div class="footer" v-loading="loading">
-        <el-table
-          :row-class-name="tableRowClassName"
-          :data="tableData.list"
-          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="150"
-            align="center "
-            type="index"
-            label="序号"
-          />
-          <el-table-column
-            align="center"
-            prop="orderNum"
-            width="180"
-            label="订单编号"
-          >
-            <template #default="{ row }">
-              {{ row.orderNum }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" prop="userName" label="入住人" />
-          <el-table-column align="center" prop="houseName" label="房型" />
-          <el-table-column align="center" prop="userName" label="房号" />
-          <el-table-column align="center" prop="userName" label="待结账(元)" />
-          <el-table-column
-            align="center"
-            fixed="right"
-            label="操作"
-            width="150"
-          >
-            <template #default="scope">
-              <div class="look" @click="clickOrderInfo(scope.row)">详情</div>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <!-- 分页组件 -->
-      <div class="pageSize">
-        <span></span>
-        <el-pagination
-          background
-          :current-page="currentPage2"
-          :page-size="pageSize2"
-          layout="total, prev, pager, next, jumper, slot"
-          :total="total2"
-          @update:current-page="handleCurrentChange2"
-        />
-      </div>
-    </div>
 
     <!-- 详情弹窗区域 -->
     <el-dialog
@@ -302,7 +190,8 @@
           </el-tooltip>
         </div>
         <div class="user">
-          <div class="name">预付款金额(元)</div>
+          <div class="name" v-if="changeIndex==1">支付金额(元)</div>
+          <div class="name" v-if="changeIndex==2">待付金额(元)</div>
           <el-input v-model="order.allOfReceiveAmount"></el-input>
         </div>
       </div>
@@ -457,59 +346,29 @@ const store = useStore();
 const api = ref("");
 const router = useRouter();
 
-const changeIndex = ref(1); // 支付成功订单 待结账 切换
+const changeIndex = ref(1); // 1支付成功订单  2待结账 切换
 
 const searchInput = reactive({
   keyWord: "", // 关键字
-  submitTime: "", // 提交时间
-  approvalTime: "", // 审批时间
-  status: 0, // 审批状态
-  flowType: "", // 审批流程类型
-  department: "", // 部门
   createTime: "",
 }); // 搜索按钮数据
 
+// 待结账 (---------------------------------------------------------------------)
+const accounts = reactive({
+  keyWord: "", // 关键字
+  createTime: "", // 创建时间
+});
+
 const nowDay = ref(dayjs().format("YYYY-MM-DD HH:mm:ss"));
 // 表格数据
 const loading = ref(false);
 const tableData = reactive({
-  list: [
-    // {
-    //   userName: "124145523",
-    //   teamName: "",
-    //   schoolName: "李四",
-    //   userPhone: "1455532141",
-    //   userZzname: "三人房",
-    //   buildName: 21,
-    //   workTypeName: 2300,
-    //   acceptanceTime: "2023-08-03 21:09:12",
-    // },
-    // {
-    //   userName: "124145523",
-    //   teamName: "",
-    //   schoolName: "李四",
-    //   userPhone: "1455532141",
-    //   userZzname: "三人房",
-    //   buildName: 21,
-    //   workTypeName: 2300,
-    //   acceptanceTime: "2023-08-03 21:09:12",
-    // },
-    // {
-    //   userName: "124145523",
-    //   teamName: "",
-    //   schoolName: "李四",
-    //   userPhone: "1455532141",
-    //   userZzname: "三人房",
-    //   buildName: 21,
-    //   workTypeName: 2300,
-    //   acceptanceTime: "2023-08-03 21:09:12",
-    // },
-  ],
+  list: [],
 });
 
 const currentPage = ref(1); // 当前页
 const pageSize = ref(10);
-const total = ref(); // 当前总数
+const total = ref(10); // 当前总数
 
 const orderInfoVisible = ref(false); // 详情弹窗
 const order = reactive({
@@ -526,33 +385,10 @@ const order = reactive({
 const waterTable = ref(); // 水费明细
 const electricTable = ref(); // 电费明细
 
-// 待结账 (---------------------------------------------------------------------)
-const accounts = reactive({
-  keyWord: "", // 关键字
-  createTime: "", // 创建时间
-});
-const currentPage2 = ref(1); // 当前页
-const pageSize2 = ref(10);
-const total2 = ref(); // 当前总数
-
-watch(
-  () => searchInput.createTime,
-  (newVal, oldVal) => {
-    console.log("监听时间:", newVal);
-    if (newVal == null) {
-      getList();
-    }
-  }
-);
-
 // 切换 支付成功订单 待结账
 const changeItem = (ind) => {
   changeIndex.value = ind;
-  if (ind == 1) {
-    getList();
-  } else if (ind == 2) {
-    getList();
-  }
+  getList();
 };
 
 // 查看员工列表
@@ -560,40 +396,29 @@ const getList = async () => {
   loading.value = true;
   let data = {
     page: currentPage.value, // 当前页
-    rows: pageSize.value, // 一页数据条数
-    ledgerParam: searchInput.keyWord,
-    managerId: sessionStorage.getItem("token"),
+    size: pageSize.value, // 一页数据条数
+    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
+    keyWord: searchInput.keyWord,
+    state: changeIndex.value,
   };
   if (searchInput.createTime) {
-    data.payStartTime = searchInput.createTime[0];
-    data.payEndTime = searchInput.createTime[1];
-  }
-
-  if (searchInput.status) {
-    if (searchInput.status != 0) {
-      data.orderStatus = searchInput.status;
-    }
+    data.startTime = searchInput.createTime[0];
+    data.endTime = searchInput.createTime[1];
   }
   let res = await axios({
-    method: "post",
-    url: api.value + "/mhotel/bookquearyBookPage.action",
+    method: "get",
+    url: api.value + "/house-order/reportStatistics",
     headers: {
-      // token: sessionStorage.getItem("token"),
-      // user_head: sessionStorage.getItem("userhead"),
+      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.bookIPage.pageList;
-    total.value = res.data.data.bookIPage.total;
+    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({
@@ -614,6 +439,7 @@ const searchBtn = lodash.debounce(async () => {
 const clickOrderInfo = (row) => {
   orderInfoVisible.value = true;
   console.log(row);
+  order.userName=row.liveName
 };
 // 关闭详情弹窗
 const orderInfoClose = () => {
@@ -653,8 +479,8 @@ onUnmounted(() => {
 
 <style scoped lang="scss">
 .content-box {
-  width: 97.5%;
-  height: 89%;
+  width: calc(100% - 40px);
+  height: calc(100% - 105px);
   margin: 20px auto;
   background-color: #fff;
   color: #fff;
@@ -751,7 +577,7 @@ onUnmounted(() => {
     }
   }
   .middle {
-    width: 96%;
+    width: calc(100% - 60px);
     margin: 0 auto;
     color: #000;
 
@@ -818,11 +644,22 @@ onUnmounted(() => {
       margin: 0;
     }
   }
-
+  //   待结账页面样式
+  .regulation {
+    height: calc(100% - 106px);
+    .condition {
+      color: #000;
+      margin: 20px 30px;
+      font-size: 14px;
+    }
+    .hint {
+      color: rgba(212, 48, 48, 1);
+    }
+  }
   .footer {
-    width: 96%;
-    height: 551px;
-    margin: 10px auto 30px;
+    width: calc(100% - 60px);
+    height: calc(100% - 132px);
+    margin: 10px auto 0;
 
     .el-table--fit {
       height: 100%;
@@ -954,23 +791,12 @@ onUnmounted(() => {
     }
   }
 
-  //   待结账页面样式
-  .regulation {
-    .condition {
-      color: #000;
-      margin: 20px 30px;
-      font-size: 14px;
-    }
-    .hint {
-      color: rgba(212, 48, 48, 1);
-    }
-  }
-
   .pageSize {
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin: 0 30px;
+    height: 60px;
 
     span {
       color: #000;

File diff suppressed because it is too large
+ 787 - 451
src/views/system/system.vue


+ 216 - 151
src/views/user/user.vue

@@ -50,10 +50,10 @@
             @click="addClick"
             ><span>添加</span></el-button
           >
-          <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
+          <!-- <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
             ><span>导出</span></el-button
           >
-          <!-- <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
+          <el-button type="primary" color="rgba(0, 97, 255, 1)" @click="addlist"
             ><span>导入</span></el-button
           > -->
         </div>
@@ -72,16 +72,32 @@
         >
           <!-- <el-table-column align="center" type="selection" width="80" /> -->
           <el-table-column
-            width="150"
+            width="80"
             align="center "
             type="index"
             label="序号"
           />
           <el-table-column align="center" prop="userName" label="姓名" />
           <el-table-column align="center" prop="phone" label="手机号码" />
-          <el-table-column align="center" prop="number" label="角色" />
-          <el-table-column align="center" prop="department" label="部门" />
-          <el-table-column align="center" prop="createTime" width="180" label="创建时间" />
+          <el-table-column align="center" prop="userMenuId" label="角色">
+            <template #default="{ row }">
+              <span>{{ row.userMenuName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="department" label="身份" >
+            <template #default="{ row }">
+              <span v-if="row.department==0">其他</span>
+              <span v-if="row.department==1">学生</span>
+              <span v-if="row.department==4">教职工</span>
+              <span v-if="row.department==5">校友</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="createTime"
+            width="180"
+            label="创建时间"
+          />
           <el-table-column align="center" label="操作" width="200">
             <template #default="scope">
               <div class="edit">
@@ -140,41 +156,58 @@
           label-position="left"
           status-icon
         >
-          <el-form-item label="用户部门 :" prop="userDepartment">
-            <el-input
+          <el-form-item label="身份 :" prop="userDepartment">
+            <!-- 0为其他,1为学生,4为教职工,5为校友 -->
+            <el-select
+              style="width: 500; "
               v-model="editRuleForm.userDepartment"
-              placeholder="请输入用户部门"
+              class="m-2"
+              placeholder="请选择身份"
+            >
+            <el-option label="学生" value="1" />
+            <el-option label="教职工" value="4" />
+            <el-option label="校友" value="5" />
+              <el-option label="其他" value="0" />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="用户名 :" prop="userName">
+            <el-input
+              v-model="editRuleForm.userName"
+              placeholder="请输入用户名"
               clearable
               style="width: 500px"
             />
           </el-form-item>
-          <el-form-item label="用户名 :" prop="userName">
+          <el-form-item label="电话号码 :" prop="userPhone">
             <el-input
-              v-model="editRuleForm.userName"
+              v-model="editRuleForm.userPhone"
               placeholder="请输入用户名"
               clearable
               style="width: 500px"
             />
           </el-form-item>
           <el-form-item label="用户角色 :" prop="userRoles">
-            <!-- <el-select
-              v-model="editRuleForm.userRoles"
-              class="m-2"
-              placeholder="请选择用户角色"
-              style="width: 500px"
-            >
-              <el-option label="清洁工" value="1" />
-              <el-option label="洗碗工" value="2" />
-            </el-select> -->
-            <el-cascader
+            <el-tree
+              ref="userRolesRef"
+              style="max-width: 600px"
+              :data="rolesData.list"
+              show-checkbox
+              check-strictly
+              node-key="id"
+              :props="defaultProps"
+              default-expand-all
+              @check="(data, nodes) => editMemberCheckChange(data, nodes)"
+            />
+            <!-- <el-cascader
               v-model="editRuleForm.userRoles"
               :options="rolesData.list"
               clearable
+              :show-all-levels="false"
               :props="{ label: 'name', value: 'id', checkStrictly: true }"
-              @change="handleChange"
+              @change="userhandleChange"
               placeholder="请选择用户角色"
               style="width: 500px"
-            />
+            /> -->
           </el-form-item>
           <el-form-item label="微校卡号 :" prop="schoolCard">
             <el-input
@@ -343,28 +376,7 @@ const router = useRouter();
 // 表格数据
 const loading = ref(false);
 const tableData = reactive({
-  list: [
-    // {
-    //   userName: "双人房",
-    //   userPhone: 150,
-    //   teamName: 12,
-    // },
-    // {
-    //   userName: "双人房",
-    //   userPhone: 150,
-    //   teamName: 12,
-    // },
-    // {
-    //   userName: "双人房",
-    //   userPhone: 150,
-    //   teamName: 12,
-    // },
-    // {
-    //   userName: "双人房",
-    //   userPhone: 150,
-    //   teamName: 12,
-    // },
-  ],
+  list: [],
 });
 
 const searchInput = reactive({
@@ -381,8 +393,9 @@ const titleDialog = ref("");
 const editVisible = ref(false);
 const editRef = ref();
 const editRuleForm = reactive({
-  userDepartment: "", // 用户部门
+  userDepartment: "", // 身份
   userName: "", // 用户名
+  userPhone: "",
   userRoles: "", // 用户角色
   schoolCard: "", // 微校卡号
   idNumber: "", // 身份证号
@@ -390,11 +403,16 @@ const editRuleForm = reactive({
   id: "",
 });
 const rolesData = reactive({ list: [] });
+const userRolesRef = ref();
+const defaultProps = ref({
+  children: "children",
+  label: "name",
+});
 
 // 表单验证
 const editRules = reactive({
   userDepartment: [
-    { required: true, message: "用户部门不能为空", trigger: "blur" },
+    { required: true, message: "身份不能为空", trigger: "blur" },
   ],
   userName: [
     {
@@ -403,6 +421,13 @@ const editRules = reactive({
       trigger: "blur",
     },
   ],
+  userPhone: [
+    {
+      required: true,
+      message: "电话号码不能为空",
+      trigger: "blur",
+    },
+  ],
   userRoles: [
     {
       required: true,
@@ -432,6 +457,15 @@ const editRules = reactive({
     },
   ],
 });
+// 添加用户(---------------------------------------------------------)
+const editMemberCheckChange = (data, nodes) => {
+  console.log(data, nodes);
+  userRolesRef.value.setCheckedKeys([]);
+  nextTick(() => {
+    userRolesRef.value.setCheckedKeys([data.id]);
+    editRuleForm.userRoles = data.id;
+  });
+};
 
 // 添加指纹弹窗(-----------------------------------------------)
 const addFingerprintVisible = ref(false);
@@ -453,14 +487,14 @@ const identityCardTitle = ref("");
 // const identityCardNum = ref(""); // 身份证卡号
 const identityCardIndex = ref(0); // 读卡步骤
 
-// 查看房型列表
+// 用户管理
 const getList = async () => {
   loading.value = true;
   let data = {
     page: currentPage.value,
     size: pageSize.value,
     keyWord: searchInput.keyWord, // 用户名/电话号码(精确查询)
-    adminMenuId: sessionStorage.getItem("adminMenuId"),
+    adminMenuId: sessionStorage.getItem("permissionSettingId"),
   };
   if (searchInput.createTime) {
     data.startTime = searchInput.createTime[0];
@@ -470,22 +504,21 @@ const getList = async () => {
     method: "get",
     url: api.value + "/users/getUsersPage",
     headers: {
-      // token: sessionStorage.getItem("token"),
-      // user_head: sessionStorage.getItem("userhead"),
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
     },
     params: data,
   });
   console.log(res, "用户管理");
   if (res.data.code == 200) {
     loading.value = false;
+    res.data.data.records.forEach((item) => {
+      if (item.userMenu) {
+        item.userMenuName = item.userMenu.name;
+      }
+    });
     tableData.list = res.data.data.records;
     total.value = res.data.data.total;
-    // ElMessage({
-    //   type: "success",
-    //   showClose: true,
-    //   message: res.data.message,
-    //   center: true,
-    // });
   } else {
     loading.value = false;
     ElMessage({
@@ -499,27 +532,18 @@ const getList = async () => {
 
 // 获取角色列表
 const rolesList = async () => {
-  // let data = {
-  //   id: row.id,
-  // };
   let res = await axios({
     method: "get",
     url: api.value + "/users-menu/getUserRole",
     headers: {
-      // token: sessionStorage.getItem("token"),
-      // user_head: sessionStorage.getItem("userhead"),
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("user_head"),
     },
     // params: data,
   });
   console.log(res, "角色列表");
   if (res.data.code == 200) {
     rolesData.list = res.data.data;
-    // ElMessage({
-    //   type: "success",
-    //   showClose: true,
-    //   message: res.data.message,
-    //   center: true,
-    // });
   } else {
     ElMessage({
       type: "error",
@@ -534,92 +558,51 @@ const rolesList = async () => {
 const searchBtn = lodash.debounce(async () => {
   getList();
 }, 300);
+
+// 用户角色改变
+const userhandleChange = (value) => {
+  console.log(value);
+};
+
 // 添加按钮 (-------------------------------------------)
 const addClick = async () => {
-  titleDialog.value = "新增";
+  titleDialog.value = "新增用户";
   editVisible.value = true;
-  //   let data = {
-  //     linkId: row.id,
-  //   };
-  //   let res = await axios({
-  //     method: "post",
-  //     url: api.value + "/mhotel/uploadgetByLinkId.action",
-  //     headers: {},
-  //     params: data,
-  //   });
-  //   console.log(res, "编辑中查找图片");
-  //   if (res.data.code == 200) {
-  //     // res.data.data.fileInfoList.forEach((item) => {
-  //     //   item.uid = item.id;
-  //     // });
-  //     // fileList.list = res.data.data.fileInfoList;
-  //     // ruleForm.fileListJson = fileList.list;
-  //     res.data.data.forEach((item) => {
-  //       item.uid = item.id;
-  //     });
-  //     fileList.list = res.data.data;
-  //     ruleForm.fileListJson = fileList.list;
-  //     // ElMessage({
-  //     //   type: "success",
-  //     //   showClose: true,
-  //     //   message: res.data.message,
-  //     //   center: true,
-  //     // });
-  //   } else {
-  //     ElMessage({
-  //       type: "error",
-  //       showClose: true,
-  //       message: res.data.message,
-  //       center: true,
-  //     });
-  //   }
+  editRuleForm.id = "";
+  editRuleForm.userDepartment = "";
+  editRuleForm.userName = "";
+  editRuleForm.userPhone = "";
+  editRuleForm.userRoles = "";
+  editRuleForm.schoolCard = "";
+  editRuleForm.idNumber = "";
+  editRuleForm.fingerprint = "";
 };
 
 //编辑按钮  (-------------------------------------------)
 const editClick = async (row) => {
   titleDialog.value = "编辑";
+  console.log(row);
+
   editVisible.value = true;
+  editRuleForm.id = row.id;
   editRuleForm.userDepartment = row.department;
   editRuleForm.userName = row.userName;
-  editRuleForm.userRoles = row.userMenuId;
+  editRuleForm.userPhone = row.phone;
+  if (row.userMenu) {
+    editRuleForm.userRoles = row.userMenu.id;
+    nextTick(() => {
+      userRolesRef.value.setCheckedKeys([row.userMenu.id]);
+    });
+  } else {
+    editRuleForm.userRoles = "";
+    nextTick(() => {
+      userRolesRef.value.setCheckedKeys([]);
+    });
+  }
+
   editRuleForm.schoolCard = row.cardNumber;
   editRuleForm.idNumber = row.idCard;
   editRuleForm.fingerprint = row.fingerprint;
-  //   let data = {
-  //     linkId: row.id,
-  //   };
-  //   let res = await axios({
-  //     method: "post",
-  //     url: api.value + "/mhotel/uploadgetByLinkId.action",
-  //     headers: {},
-  //     params: data,
-  //   });
-  //   console.log(res, "编辑中查找图片");
-  //   if (res.data.code == 200) {
-  //     // res.data.data.fileInfoList.forEach((item) => {
-  //     //   item.uid = item.id;
-  //     // });
-  //     // fileList.list = res.data.data.fileInfoList;
-  //     // ruleForm.fileListJson = fileList.list;
-  //     res.data.data.forEach((item) => {
-  //       item.uid = item.id;
-  //     });
-  //     fileList.list = res.data.data;
-  //     ruleForm.fileListJson = fileList.list;
-  //     // ElMessage({
-  //     //   type: "success",
-  //     //   showClose: true,
-  //     //   message: res.data.message,
-  //     //   center: true,
-  //     // });
-  //   } else {
-  //     ElMessage({
-  //       type: "error",
-  //       showClose: true,
-  //       message: res.data.message,
-  //       center: true,
-  //     });
-  //   }
 };
 
 const cancelEdit = () => {
@@ -632,6 +615,87 @@ const confirmEdit = (formEl) => {
   if (!formEl) return;
   formEl.validate(async (valid, fields) => {
     if (valid) {
+      if (editRuleForm.id) {
+        let arr = editRuleForm.userRoles;
+        let data = {
+          adminMenuId: sessionStorage.getItem("permissionSettingId"),
+          users: {
+            id: editRuleForm.id,
+            department: editRuleForm.userDepartment,
+            userName: editRuleForm.userName,
+            phone: editRuleForm.userPhone,
+            userMenuId: editRuleForm.userRoles,
+            idCard: editRuleForm.schoolCard,
+            cardNumber: editRuleForm.idNumber,
+            fingerprint: editRuleForm.fingerprint,
+          },
+        };
+        let res = await axios({
+          method: "post",
+          url: api.value + "/users/updateDetails",
+          headers: {
+            token: sessionStorage.getItem("token"),
+            user_head: sessionStorage.getItem("user_head"),
+          },
+          data: data,
+        });
+        console.log(res, "添加用户管理");
+        if (res.data.code == 200) {
+          getList();
+          editVisible.value = false;
+          ElMessage({
+            type: "success",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        } else {
+          ElMessage({
+            type: "error",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        }
+      } else {
+        let data = {
+          adminMenuId: sessionStorage.getItem("permissionSettingId"),
+          userMenuId: editRuleForm.userRoles,
+          department: editRuleForm.userDepartment,
+          userName: editRuleForm.userName,
+          phone: editRuleForm.userPhone,
+          idCard: editRuleForm.schoolCard,
+          cardNumber: editRuleForm.idNumber,
+          fingerprint: editRuleForm.fingerprint,
+        };
+        let res = await axios({
+          method: "post",
+          url: api.value + "/users/saveUsers",
+          headers: {
+            token: sessionStorage.getItem("token"),
+            user_head: sessionStorage.getItem("user_head"),
+          },
+          data: data,
+        });
+        console.log(res, "添加用户管理");
+        if (res.data.code == 200) {
+          getList();
+          editVisible.value = false;
+          ElMessage({
+            type: "success",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        } else {
+          ElMessage({
+            type: "error",
+            showClose: true,
+            message: res.data.message,
+            center: true,
+          });
+        }
+      }
     }
   });
 };
@@ -639,11 +703,12 @@ const confirmEdit = (formEl) => {
 //删除按钮
 const del = async (row) => {
   let data = {
-    id: row.id,
+    adminMenuId: sessionStorage.getItem("permissionSettingId"),
+    userId: row.id,
   };
   let res = await axios({
-    method: "post",
-    url: api.value + "/mhotel/housedelHouser.action",
+    method: "get",
+    url: api.value + "/users/deleteUsers",
     headers: {
       // token: sessionStorage.getItem("token"),
       // user_head: sessionStorage.getItem("userhead"),
@@ -960,10 +1025,10 @@ onUnmounted(() => {
       color: rgba(111, 182, 184, 1);
     }
   }
-.btm{
-  width: 100%;
-  height: 100%;
-}
+  .btm {
+    width: 100%;
+    height: 100%;
+  }
   .middle {
     width: calc(100% - 60px);
     margin: 0 auto;
@@ -1041,9 +1106,9 @@ onUnmounted(() => {
   }
 
   .footer {
-    width:  calc(100% - 60px);
-    height: calc(100% - 210px);
-    margin: 10px auto 30px;
+    width: calc(100% - 60px);
+    height: calc(100% - 190px);
+    margin: 10px auto 10px;
 
     .el-table--fit {
       height: 100%;
@@ -1127,7 +1192,7 @@ onUnmounted(() => {
       }
     }
     .el-dialog__body {
-      padding: 30px 30px 10px 30px;
+      padding: 20px 30px 10px 30px;
       .el-form-item__content {
         width: 200px;
         .el-input-group__append {

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


+ 10 - 16
vite.config.js

@@ -22,26 +22,20 @@ export default defineConfig({
     port: 8877,
     // 是否开启 https
     // https: false,
-    // 线上地址 https://chtech.ncjti.edu.cn/hotelReservation/pc3/
-    // proxy: {
-    //   "/api": {
-    //     // target: "https://chtech.ncjti.edu.cn/hotelReservation",
-    //     target: "http://101.42.162.31:8088/",
-    //     changeOrigin: true,
-    //     rewrite: (path) => path.replace(/^\/api/, ""),
-    //   },
-    // }, // https://chtech.ncjti.edu.cn/hotelReservation/pc2
-
-    // // 测试地址
     proxy: {
-      "/ihotel/auto": {
-        // target: "https://chtech.ncjti.edu.cn/hotelReservation",
-        target: "http://192.168.161.224:8089/ihotel/auto", // 测试环境
-        // target: "https://www.jinganrenjiams.com/hotelReservation/", // 测试环境
+      "/hotel/ihotel/auto": {
+        target: "https://chtech.ncjti.edu.cn/hotel/ihotel/auto", // 测试环境
         changeOrigin: true,
-        rewrite: (path) => path.replace(/^\/ihotel\/auto/, ""),
+        rewrite: (path) => path.replace(/^\/hotel\/ihotel\/auto/, ""),
       },
     },
+    // proxy: {
+    //   "/ihotel/auto": {
+    //     target: "http://192.168.161.224:8090/ihotel/auto", // 测试环境
+    //     changeOrigin: true,
+    //     rewrite: (path) => path.replace(/^\/ihotel\/auto/, ""),
+    //   },
+    // },
   },
   publicDir: "public",
   base: "./",