浏览代码

停车场修改

lchao 1 年之前
父节点
当前提交
37a6eb0c2e
共有 2 个文件被更改,包括 15 次插入11 次删除
  1. 1 1
      songhua-ui/src/assets/styles/shh_index.scss
  2. 14 10
      songhua-ui/src/views/index1/index.vue

+ 1 - 1
songhua-ui/src/assets/styles/shh_index.scss

@@ -453,7 +453,7 @@
   position: absolute;
   right: 10px;
   top: 80px;
-  width: 340px;
+  width: 360px;
   z-index: 9;
   background: #010e21;
   border: 1px solid #010f4b;

+ 14 - 10
songhua-ui/src/views/index1/index.vue

@@ -5,17 +5,17 @@
       <span class="time">{{ currentTime }}</span>
     </div>
     <div id="parkCar" class="shh_part">
-      <div class="shh_part_div"  v-for="(item,index) in parkingLots" :key="index">
+      <div class="shh_part_div" v-for="(item,index) in parkingLots" :key="index">
         <img :src="getImgUrl(item.parkId)"/>
         <div class="shh_txt">
-          <h1>{{getParkingLotName(item.parkId)}}</h1>
-          <p>总车位数:{{ item.allSpaceNumber }}</p >
-          <p>当日营收:{{ item.totalOutMoney }}</p >
-          <p>当月营收:{{ item.totalPreMoney }}</p >
-          <p>已用车位:{{ item.useSpaceNumber }}</p >
-          <p>剩余车位:{{ item.remainSpaceNumber }}</p >
-          <p>当前在场车辆:{{ item.inParkCount }}</p >
-          <p>当天出场车辆:{{ item.outParkCount }}</p >
+          <h1>{{ getParkingLotName(item.parkId) }}</h1>
+          <p>总车位数:{{ item.allSpaceNumber }}</p>
+          <p>已用车位:{{ item.useSpaceNumber }}</p>
+          <p>剩余车位:{{ item.remainSpaceNumber }}</p>
+          <p>当前在场车辆:{{ item.inParkCount }}</p>
+          <p>当天出场车辆:{{ item.outParkCount }}</p>
+          <p>当天线下支付金额:{{ item.totalOutMoney }}</p>
+          <p>当天网络支付金额:{{ item.totalPreMoney }}</p>
         </div>
       </div>
     </div>
@@ -53,6 +53,10 @@ export default {
     setInterval(() => {
       this.getCurrentTime();
     }, 1000);
+
+    setInterval(() => {
+      this.fetchParkingLots();
+    }, 1000 * 60 * 2);
   },
   created() {
     this.handler();
@@ -83,7 +87,7 @@ export default {
         this.parkingLots = response.data;
       })
     },
-    getImgUrl (parkId) {
+    getImgUrl(parkId) {
       switch (parkId) {
         case "15305":
           return require("@/assets/images/shh_part" + 1 + ".png");