From d5eef829f2daf8bf021c9524e2c93312091ba58f Mon Sep 17 00:00:00 2001
From: zhugf <312353457@qq.com>
Date: 星期四, 23 三月 2023 11:58:21 +0800
Subject: [PATCH] 细节优化

---
 pages/tabBar/monitor.vue |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/pages/tabBar/monitor.vue b/pages/tabBar/monitor.vue
index 2326c22..900231a 100644
--- a/pages/tabBar/monitor.vue
+++ b/pages/tabBar/monitor.vue
@@ -66,10 +66,9 @@
 
 
 				<view class="scoreBox">
-					<text class="text-green text-xl text-bold">{{$lget(model,'target')}}%<text
-							class="text-gray text-sm">/鐩爣</text> </text>
-					<text class="text-gray text-xl text-bold">{{$lget(model,'initial')}}%<text
-							class="text-gray text-sm">/鍒濆</text> </text>
+					<text class="text-gray text-sm">鐩爣: <text class="text-green text-xl text-bold">{{$lget(model,'target')}}% </text> </text>
+					<text class="text-gray text-sm">鍒濆: <text class="text-gray text-xl text-bold">{{$lget(model,'initial')}}% </text></text>
+					
 					<!-- <view class="text-yellow text-xs flex justify-around">
 						<uni-text class="text-yellow cuIcon-favorfill"></uni-text>
 						<uni-text class="text-yellow cuIcon-favorfill"></uni-text>
@@ -200,8 +199,8 @@
 					<view class="h-td">骞茬嚗鏃堕棿</view>
 				</view>
 				<view class="h-tr h-tr-2">
-					<view class="h-td">{{$lget(model,'envTemp')}}鈩�</view>
-					<view class="h-td">{{$lget(model,'envHum')}}%</view>
+					<view class="h-td">{{$lget(model,'envTemp')  == "" ? "--" :  $lget(model,'envTemp')}}鈩�</view>
+					<view class="h-td">{{$lget(model,'envHum') == "" ? "--" :$lget(model,'envHum') }}%</view>
 					<view class="h-td">{{$lget(model,'windTemp')}}鈩�</view>
 					<view class="h-td">{{$lget(model,'delay')}}ms</view>
 					<view class="h-td">{{$lget(model,'et')}}min</view>
@@ -330,7 +329,7 @@
 			</view>
 		</view>
 		<view class="chartsMain">
-			<qiun-data-charts type="area" :opts="opts" :canvas2d="true" :ontouch="true" :chartData="chartData" />
+			<qiun-data-charts type="area" :opts="opts" :animation="false" :canvas2d="true" :ontouch="true" :chartData="chartData" />
 		</view>
 
 
@@ -378,7 +377,6 @@
 					}
 				},
 				notice: "2023-03-1812:00:001鍙锋満鍙颁綆娓╂姤璀�",
-				timer: null,
 				model: {},
 				queryParam: {
 					machineid: "GM001",
@@ -398,10 +396,10 @@
 		onShow() {
 			console.info("鐩戞帶椤甸潰鏄剧ず")
 			this.getRealData()
-			if (!this.timer) {
-				this.timer = setInterval(() => {
+			if (!this.$monitorTimer) {
+				this.$monitorTimer = setInterval(() => {
 					console.info("瀹氭椂鍣ㄥ伐浣�")
-					console.info(this.timer)
+					console.info(this.$monitorTimer)
 					this.getRealData()
 
 				}, 1000 * 12)
@@ -413,13 +411,14 @@
 
 		},
 		onHide() {
-			clearInterval(this.timer)
+			clearInterval(this.$monitorTimer)
+			this.$monitorTimer = null
 			console.info("鐩戞帶椤甸潰闅愯棌")
 			console.info("瀹氭椂鍣ㄥ仠姝�")
-			console.info(this.timer)
+			console.info(this.$monitorTimer)
 		},
 		onUnload() {
-			clearInterval(this.timer)
+		 
 		},
 		mounted() {
 

--
Gitblit v1.9.3