From b9ffd276b4fa8ca1918f486e70d7e4d0d04d9d9f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 10 Aug 2022 08:47:46 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhny-dsjdp

---
 src/views/equipment/index.vue |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/src/views/equipment/index.vue b/src/views/equipment/index.vue
index d4934d9..3fb109e 100644
--- a/src/views/equipment/index.vue
+++ b/src/views/equipment/index.vue
@@ -69,6 +69,7 @@
                             </ul>
                         </div>
                         <div class="nape-boxs">
+                            <!-- 气象监测 -->
                             <div v-for="(item, index) in stationData.weatherList" :key="index">
                                 <div class="top">
                                     <div class="l">
@@ -94,6 +95,7 @@
                                     >{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div>
                                 </div>
                             </div>
+                            <!-- 土壤监测 -->
                             <div v-for="(item, index) in stationData.soliList" :key="index">
                                 <div class="top">
                                     <div class="l">
@@ -114,9 +116,12 @@
                                         <span class="old-btn" @click="historyData(item)">历史数据</span>
                                     </div>
 
-                                    <div class="r">{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div>
+                                    <div
+                                        class="r"
+                                    >{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div>
                                 </div>
                             </div>
+                            <!-- 空气监测 -->
                             <div v-for="(item, index) in stationData.airList" :key="index">
                                 <div class="top">
                                     <div class="l">
@@ -137,9 +142,12 @@
                                         <span class="old-btn" @click="historyData(item)">历史数据</span>
                                     </div>
 
-                                    <div class="r">{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div>
+                                    <div
+                                        class="r"
+                                    >{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div>
                                 </div>
                             </div>
+                            <!-- 水质监测 -->
                             <div v-for="(item, index) in stationData.waterList" :key="index">
                                 <div class="top">
                                     <div class="l">
@@ -196,10 +204,12 @@
 <script>
 
 import {
-    getLandList,
-    getStationAndVideoByLandId,
-    getStationDateByStcd
+    getLandList
 } from '@/api/land/land'
+import {
+ getStationAndVideoByLandId,
+    getStationDateByStcd
+} from '@/api/equipment/equipment'
 import { nextTick } from 'vue'
 import flvjs from 'flv.js'
 import dateUtils from '@/utils/dateUtils' // 1.先引入
@@ -359,12 +369,12 @@
         },
 
         historyData (item) {
-            var valueDataList = item.valueDataList
-            var values = []
-            var names = []
+            const valueDataList = item.valueDataList
+            const values = []
+            const names = []
             valueDataList.forEach(item => {
                 values.push(item.value)
-                names.push(item.startTime.substring(5,10) + ' ' + item.startTime.substring(11) + ':00')
+                names.push(item.startTime.substring(5, 10) + ' ' + item.startTime.substring(11) + ':00')
             })
             this.initLine('EchartsBox', '单位' + item.unit, names, values)
 
@@ -464,7 +474,7 @@
 
                 this.stationData = res.data.data
                 if (this.stationData.soilList.length == 0 && this.stationData.weatherList.length == 0 &&
-                        this.stationData.airList.length == 0 && this.stationData.waterList.length == 0) {
+                    this.stationData.airList.length == 0 && this.stationData.waterList.length == 0) {
                     this.isNostaList = false
                 } else {
                     this.isNostaList = true

--
Gitblit v1.9.3