Browse Source

管理页面搜索的功能完善

hzj18279462576@163.com 3 years ago
parent
commit
fc95a31405

+ 13 - 0
admin/package-lock.json

@@ -311,6 +311,11 @@
         }
       }
     },
+    "@vue/devtools-api": {
+      "version": "6.2.1",
+      "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz",
+      "integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ=="
+    },
     "abab": {
       "version": "2.0.6",
       "resolved": "https://registry.npmmirror.com/abab/-/abab-2.0.6.tgz",
@@ -16708,6 +16713,14 @@
       "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
       "dev": true
     },
+    "vuex": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz",
+      "integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==",
+      "requires": {
+        "@vue/devtools-api": "^6.0.0-beta.11"
+      }
+    },
     "w3c-hr-time": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",

+ 1 - 1
admin/package.json

@@ -90,4 +90,4 @@
     "last 2 versions",
     "not ie <= 8"
   ]
-}
+}

+ 5 - 1
admin/src/layout/components/NavbarItem.vue

@@ -79,6 +79,7 @@
 </template>
 
 <script>
+import { mapMutations } from "vuex";
 export default {
   name: "NavbarItem",
   data() {
@@ -88,13 +89,16 @@ export default {
     };
   },
   mounted() {
-    console.log(this.$route.path);
+    // console.log(this.$route.path);
     this.ItemIndex = this.$route.path;
   },
   methods: {
     select(index, indexPath) {
       this.ItemIndex = index;
     },
+    set() {
+      this.setRouterPath(this.$route.path);
+    },
     handleOpen(key, keyPath) {
       console.log(key, keyPath);
     },

+ 2 - 0
admin/src/main.js

@@ -2,6 +2,7 @@
 // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
 import Vue from 'vue'
 import App from './App'
+
 import router from './router'
 import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
@@ -10,6 +11,7 @@ Vue.component('IconSvg', require('./components/SvgIcon').default)
 
 Vue.config.productionTip = false
 Vue.use(ElementUI);
+
 /* eslint-disable no-new */
 new Vue({
   el: '#app',

+ 16 - 3
admin/src/views/home/index.vue

@@ -147,7 +147,7 @@
                 >
                   <div class="title">
                     <span>17栋1单元2层01房</span>
-                    <div class="state">空闲</div>
+                    <div class="state">已锁定</div>
                   </div>
                   <div class="teacher">张老师</div>
                   <div class="num">
@@ -594,7 +594,7 @@ export default {
                   color: rgba(51, 51, 51, 1);
                 }
                 .state {
-                  width: 38px;
+                  width: 46px;
                   height: 17px;
                   opacity: 1;
                   /** 文本1 */
@@ -604,7 +604,7 @@ export default {
                   color: #fff;
                   text-align: center;
                   line-height: 17px;
-                  margin-left: 20px;
+                  margin-left: 15px;
                   background: rgba(41, 109, 227, 1);
                 }
               }
@@ -803,6 +803,19 @@ export default {
         }
         .room-filtrate {
           border-bottom: 1px solid rgba(225, 228, 232, 1);
+          .el-checkbox.is-checked {
+            .el-checkbox__inner {
+              background-color: rgba(41, 109, 227, 1);
+            }
+            .el-checkbox__label {
+              color: #000;
+            }
+          }
+          .is-indeterminate {
+            .el-checkbox__inner {
+              background-color: rgba(41, 109, 227, 1);
+            }
+          }
         }
         .all {
           float: right;

+ 42 - 10
admin/src/views/order/index.vue

@@ -3,12 +3,6 @@
     <el-card class="box-card" style="width: 1612px; height: 950px">
       <div slot="header" class="clearfix">
         <div class="inform-title">订单管理</div>
-        <div class="inform-header">
-          <el-input placeholder="请输入时间">
-            <i slot="prefix" class="el-input__icon el-icon-search"></i>
-          </el-input>
-          <el-button type="primary">查询</el-button>
-        </div>
       </div>
       <div class="inform-body">
         <div class="order-top">
@@ -23,8 +17,12 @@
           <div class="paydate">
             <span class="demonstration">支付时间</span>
             <el-date-picker
-              v-model="value1"
+              v-model="payTime"
+              format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd"
+              @change="timePay"
               type="daterange"
+              :clearable="false"
               range-separator="至"
               start-placeholder="开始日期"
               end-placeholder="结束日期"
@@ -34,7 +32,10 @@
           <div class="paydate">
             <span class="demonstration">创建时间</span>
             <el-date-picker
-              v-model="value2"
+              v-model="creationTime"
+              format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd"
+              @change="timeCreation"
               type="daterange"
               range-separator="至"
               start-placeholder="开始日期"
@@ -483,8 +484,8 @@ export default {
 
       state: "",
       value: "",
-      value1: "",
-      value2: "",
+      payTime: "",
+      creationTime: "",
       dialogVisible: false,
       waterTable: [
         {
@@ -553,6 +554,15 @@ export default {
     handleClose(done) {
       this.dialogVisible = false;
     },
+
+    // 支付时间
+    timePay() {
+      console.log(this.payTime);
+    },
+    // 创建时间
+    timeCreation() {
+      console.log(this.creationTime);
+    },
   },
 };
 </script>
@@ -638,11 +648,33 @@ export default {
         margin: 0 auto;
         .el-table__header-wrapper {
           border-radius: 5px;
+          .el-checkbox.is-checked {
+            .el-checkbox__inner {
+              background-color: rgba(41, 109, 227, 1);
+            }
+          }
+
+          .el-checkbox__input.is-checked,
+          .el-checkbox__input.is-indeterminate {
+            .el-checkbox__inner {
+              background-color: rgba(41, 109, 227, 1);
+            }
+          }
         }
         tr {
           height: 64px;
           td {
             .cell {
+              .el-checkbox.is-checked {
+                .el-checkbox__inner {
+                  background-color: rgba(41, 109, 227, 1);
+                }
+              }
+              .is-indeterminate {
+                .el-checkbox__inner {
+                  background-color: rgba(41, 109, 227, 1);
+                }
+              }
               .operate {
                 color: rgba(41, 109, 227, 1);
                 cursor: pointer;

+ 0 - 154
admin/src/views/staff/index.vue

@@ -94,160 +94,6 @@
                   width="30%"
                   :before-close="handleClose"
                 >
-                  <div class="userinfo">用户信息</div>
-                  <div class="info">
-                    <div class="user">
-                      <div class="name">姓名</div>
-                      <el-input value="刘老师"></el-input>
-                    </div>
-                    <div class="user">
-                      <div class="name">联系方式</div>
-                      <el-input value="13234564"></el-input>
-                    </div>
-                  </div>
-                  <div class="info">
-                    <div class="user">
-                      <div class="name">订单号</div>
-                      <el-input value="261691612"></el-input>
-                    </div>
-                    <div class="user">
-                      <div class="name">预付款金额(元)</div>
-                      <el-input value="20.00"></el-input>
-                    </div>
-                  </div>
-                  <div class="info">
-                    <div class="user">
-                      <div class="name">入住时间</div>
-                      <el-input value="2022-07-26"></el-input>
-                    </div>
-                    <div class="user">
-                      <div class="name">离住时间</div>
-                      <el-input value="2022-07-26"></el-input>
-                    </div>
-                  </div>
-                  <div class="info">
-                    <div class="user">
-                      <div class="name">入住天数</div>
-                      <el-input value="1"></el-input>
-                    </div>
-                    <div class="user">
-                      <div class="name">支付时间</div>
-                      <el-input value="2022-07-27   15:15:15"></el-input>
-                    </div>
-                  </div>
-                  <div class="rate">水费明细</div>
-                  <div class="water">
-                    表计:101 楼层:12栋1单元2层01 抄表时间:2022-07-27 15:15:15
-                  </div>
-                  <el-table
-                    :data="waterTable"
-                    max-height="93"
-                    style="width: 832px"
-                    stripe
-                    :cell-style="rowbg"
-                    :header-cell-style="{
-                      color: ' rgba(0, 0, 0, 1)',
-                      background: 'rgba(240, 243, 247, 1)',
-                    }"
-                  >
-                    <el-table-column
-                      prop="start"
-                      width="100"
-                      label="始码"
-                      align="center"
-                    >
-                    </el-table-column>
-
-                    <el-table-column
-                      prop="end"
-                      width="100"
-                      align="center"
-                      label="终码"
-                    >
-                    </el-table-column>
-
-                    <el-table-column
-                      prop="flow"
-                      align="center"
-                      label="水量(吨)"
-                    >
-                    </el-table-column>
-                    <el-table-column
-                      prop="pirce"
-                      align="center"
-                      label="水价(元)"
-                    >
-                    </el-table-column>
-                    <el-table-column
-                      prop="subsidy"
-                      align="center"
-                      label="补助量(吨)"
-                    >
-                    </el-table-column>
-                    <el-table-column
-                      prop="production"
-                      align="center"
-                      label="产生水费(元)"
-                    >
-                    </el-table-column>
-                  </el-table>
-
-                  <div class="rate">电费明细</div>
-                  <div class="water">
-                    表计:101 楼层:12栋1单元2层01 抄表时间:2022-07-27 15:15:15
-                  </div>
-                  <el-table
-                    :data="waterTable"
-                    max-height="93"
-                    style="width: 832px"
-                    stripe
-                    :cell-style="rowbg"
-                    :header-cell-style="{
-                      color: ' rgba(0, 0, 0, 1)',
-                      background: 'rgba(240, 243, 247, 1)',
-                    }"
-                  >
-                    <el-table-column
-                      prop="start"
-                      width="100"
-                      label="始码"
-                      align="center"
-                    >
-                    </el-table-column>
-
-                    <el-table-column
-                      prop="end"
-                      width="100"
-                      align="center"
-                      label="终码"
-                    >
-                    </el-table-column>
-
-                    <el-table-column
-                      prop="flow"
-                      align="center"
-                      label="电量(度)"
-                    >
-                    </el-table-column>
-                    <el-table-column
-                      prop="pirce"
-                      align="center"
-                      label="电价(元)"
-                    >
-                    </el-table-column>
-                    <el-table-column
-                      prop="subsidy"
-                      align="center"
-                      label="补助量(度)"
-                    >
-                    </el-table-column>
-                    <el-table-column
-                      prop="production"
-                      align="center"
-                      label="产生水费(元)"
-                    >
-                    </el-table-column>
-                  </el-table>
                 </el-dialog>
 
                 <span