Browse Source

feat:需求修改

LAPTOP-U5GOA5HA\zz 1 year ago
parent
commit
2171ce95a8

+ 14 - 8
app/src/views/Basic/components/BuildingStatistics.vue

@@ -41,7 +41,7 @@
         <li class="row" v-for="(item, index) in dataList" :key="index" @click="TounitInfo(item)">
           <span class="type">{{ index + 1 }}</span>
           <span class="count">{{ item.gcjzmc }}</span>
-          <span class="time">{{ item.gd }}</span>
+          <span class="time">{{ Number(item.gd).toFixed(0) }}</span>
           <span class="unit">{{ item.jzmj }}</span>
         </li>
       </ul>
@@ -60,7 +60,7 @@ export default {
   props: {
     list: {
       type: Array,
-      default: [],
+      default: () => [],
     },
   },
 
@@ -74,9 +74,13 @@ export default {
   watch: {
     list: {
       handler(val) {
-        this.dataList = val;
+        const temp = JSON.stringify(val)
+        this.dataList = JSON.parse(temp).sort((a,b)=>{
+          return Number(b.gd)-Number(a.gd)
+        });
+
       },
-      immediate: true,
+      // immediate: true,
       deep: true,
     },
   },
@@ -87,9 +91,11 @@ export default {
       };
     },
   },
-  // created() {
-  //   this.dataList = this.list;
-  // },
+  created() {
+    this.dataList = this.list.sort((a,b)=>{
+          return Number(b.gd)-Number(a.gd)
+        });
+  },
   methods: {
     sort(type) {
       if (type === "gd") {
@@ -212,7 +218,7 @@ a {
 
   .time {
     cursor: pointer;
-    flex: 0.15;
+    flex: 0.25;
   }
   .count {
     flex:1;

+ 31 - 18
app/src/views/Home/components/WisdomFire.vue

@@ -3,7 +3,7 @@
     <div class="num-box">
       <!-- 物联网建筑数量 -->
       <div class="build-num">
-        <div class="build">
+        <div class="build-all">
           <span
             ><img src="@/assets/images/Vector (3).png" alt="" />
             <span>已接入物联网建筑数</span>
@@ -20,10 +20,10 @@
             <span
               >点位总数 <span class="num">{{ iotList?.jrsbzs }}</span> 个
             </span>
-            <span
+            <!-- <span
               >在线 <span class="online">{{ iotList?.jrsbzxs }}</span
               >个
-            </span>
+            </span> -->
             <span
               >告警
               <span class="warning">{{
@@ -34,8 +34,8 @@
           </div>
         </div>
         <div>
-          <span class="onlines on-line" style="margin: 0px 20px"> 在线</span>
-          <span class="offlines on-line">告警</span>
+          <!-- <span class="onlines on-line" style="margin: 0px 20px"> 在线</span> -->
+          <span class="offlines on-line gj-bnt">告警</span>
         </div>
         <div class="pressure">
           <!-- 水压 -->
@@ -75,18 +75,18 @@
                 "
               >
                 <!-- 在线 -->
-                <span class="onlines on-line"></span>
+                <!-- <span class="onlines on-line"></span> -->
                 <!-- <img
                   class="pressure-img"
                   src="../../assets/images/Ellipse 275.png"
                   alt=""
                 /> -->
-                <span class="bumer" style="font-size: 16px; margin-left: 2px">
+                <!-- <span class="bumer" style="font-size: 16px; margin-left: 2px">
                   {{ frieList.syzxs ? frieList.syzxs : 0
                   }}<span style="margin-right: 1px">/</span>
                   <span>{{ frieList.syzxlds ? frieList.syzxlds : 0 }}</span>
                   <span class="unit" style="font-size: 12px">(个/栋)</span>
-                </span>
+                </span> -->
               </li>
               <li
                 class="pressure-line"
@@ -151,18 +151,18 @@
                 "
               >
                 <!-- 在线 -->
-                <span class="onlines on-line"></span>
+                <!-- <span class="onlines on-line"></span> -->
                 <!-- <img
                   class="pressure-img"
                   src="../../assets/images/Ellipse 275.png"
                   alt=""
                 /> -->
-                <span class="bumer" style="font-size: 16px; margin-left: 2px"
+                <!-- <span class="bumer" style="font-size: 16px; margin-left: 2px"
                   >{{ frieList.dqhzzxs ? frieList.dqhzzxs : 0
                   }}<span style="margin-right: 1px">/</span>
                   <span>{{ frieList.dqhzzxlds ? frieList.dqhzzxlds : 0 }}</span>
                   <span class="unit" style="font-size: 12px">(个/栋)</span>
-                </span>
+                </span> -->
               </li>
               <li
                 class="pressure-line"
@@ -227,18 +227,18 @@
                 "
               >
                 <!-- 在线 -->
-                <span class="onlines on-line"></span>
+                <!-- <span class="onlines on-line"></span> -->
                 <!-- <img
                   class="pressure-img"
                   src="../../assets/images/Ellipse 275.png"
                   alt=""
                 /> -->
-                <span class="bumer" style="font-size: 16px; margin-left: 2px"
-                  >{{ frieList.smtdzxs ? frieList.smtdzxs : 0 }}
+                <!-- <span class="bumer" style="font-size: 16px; margin-left: 2px"
+                  >{{ frieList.smtdzxs ? frieList.smtdzxs : 0 }} -->
                   <!-- <span style="margin-right: 1px">/</span> -->
                   <!-- <span>{{ frieList.smtdzxlds ? frieList.smtdzxlds : 0 }}</span> -->
-                  <span class="unit" style="font-size: 12px">(个)</span>
-                </span>
+                  <!-- <span class="unit" style="font-size: 12px">(个)</span> -->
+                <!-- </span> -->
               </li>
               <li
                 class="pressure-line"
@@ -326,10 +326,18 @@ export default {
 .build {
   height: 100%;
   display: flex;
-  justify-content: space-around;
+  justify-content: space-between;
   align-items: center;
   font-size: 12px;
   color: #fff;
+  margin-left: 12px;
+}
+.build-all{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin: 0 12px;
+  margin-top: 3px;
 }
 .point-num {
   flex: 1;
@@ -359,6 +367,9 @@ img {
   display: flex;
   justify-content: space-between;
 }
+.gj-bnt{
+  margin-left: 12px;
+}
 .pressure-num {
   /* width: 30%; */
   height: 150px;
@@ -390,10 +401,12 @@ img {
   width: 8px;
   height: 8px;
   border-radius: 50%;
-  margin-left: 5px;
+  margin-left: 10px;
+  
 }
 .on-line {
   letter-spacing: 2px;
+  
 }
 .pressure-bg {
   width: 66px;

+ 1 - 1
app/src/views/Home/index.vue

@@ -56,7 +56,7 @@
       <border-panel
         height="331px"
         style="margin-bottom: 6px; cursor: pointer"
-        title="智慧消防"
+        title="物联感知"
       >
         <WisdomFire :frieList="frieList" :iotList="iotList" :qy="qy" />
       <ZhxfModalHeader slot="title" />

+ 3 - 0
app/src/views/PoliceSituation/components/UnitInformation.vue

@@ -347,6 +347,9 @@
 				this.activeTab = tab;
 			},
 		},
+		mounted(){
+			console.log('----dianh',this.jzxxList);
+		}
 	};
 </script>