From 0c26022095437c5ce3d1f790b70afb7ddabf0395 Mon Sep 17 00:00:00 2001
From: 朱桂飞 <18597012158>
Date: 星期三, 29 三月 2023 11:19:50 +0800
Subject: [PATCH] 优化部分显示

---
 pages/tabBar/monitor.vue |   54 +++++++++++++++++++++++++++++++++---------------------
 1 files changed, 33 insertions(+), 21 deletions(-)

diff --git a/pages/tabBar/monitor.vue b/pages/tabBar/monitor.vue
index 2326c22..b7156de 100644
--- a/pages/tabBar/monitor.vue
+++ b/pages/tabBar/monitor.vue
@@ -16,7 +16,7 @@
 						interval="3500" duration="600">
 						<swiper-item class="swiper-list" v-for="(item, index) in bannerList" :key="index">
 							<view class="swiper-item uni-bg-red">
-								<image class="swiper-img" :src="item.imageUrl" mode="aspectFill"></image>
+								<image class="swiper-img" :src="item.imageUrl" mode="aspectFit"></image>
 							</view>
 						</swiper-item>
 					</swiper>
@@ -31,9 +31,9 @@
 				<view class='bg-orange cu-tag radius light sm margin-right-xs' v-else>鍋滄</view>
 				<!-- <view class='bg-cyan cu-tag radius light sm'>姝e父</view> -->
 			</view>
-			<view class="text-black text-df flex">
-				<text class="margin-right-xs">閰嶆柟鍚嶇О:</text>
-				<text>{{ formulaName   }} </text>
+			<view class="text-black text-df flex align-center">
+				<text class="margin-right-xs">鎵规:</text>
+				<text>{{ this.$lget(this.model,'code') }} </text>
 			</view>
 
 			<view class="text-gray  margin-top-xs">
@@ -43,7 +43,20 @@
 
 			<view class="text-gray  margin-top-xs">
 				<text class="margin-right-xs">鎶曟枡:</text>
-				<text>{{$lget(model,'feed')}}绛�</text>
+				<text class="text-cyan">{{$lget(model,'feed')}} <text class="text-gray margin-left-xs">绛�</text></text>
+			 
+			</view>
+			<view class="text-gray  margin-top-xs">
+				<text class="margin-right-xs">閲嶉噺:</text>
+				<text class="text-cyan margin-right-xs">{{$lget(model,'trendVo.weight')}}<text class="text-gray margin-left-xs">/</text></text>
+				<text>  <text class="text-line-through">{{$lget(model,'originWeight')}}</text>  <text class="text-gray margin-left-xs">kg</text></text>
+			 
+			</view>
+			
+			<view class="text-gray  margin-top-xs">
+				<text class="margin-right-xs">鐢ㄦ椂:</text>
+				<text class="text-cyan">{{$lget(model,'trendVo.totalTime')}}<text class="text-gray margin-left-xs">min</text></text>
+			 
 			</view>
 
 			<!-- <view class="margin-tb-sm" style="position: relative;">
@@ -66,10 +79,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 +212,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 +342,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,17 +390,16 @@
 					}
 				},
 				notice: "2023-03-1812:00:001鍙锋満鍙颁綆娓╂姤璀�",
-				timer: null,
 				model: {},
 				queryParam: {
 					machineid: "GM001",
 					tenantid: 1000
 				},
 				bannerList: [{
-						imageUrl: '/static/image/equ1.png'
+						imageUrl: 'https://dev.shlanbao.cn:9999/fileTransfer/preview?userFileId=1640616151832784896&isMin=false&shareBatchNum=&extractionCode='
 					},
 					{
-						imageUrl: '/static/image/equ1.png'
+						imageUrl: 'https://dev.shlanbao.cn:9999/fileTransfer/preview?userFileId=1640617395255177216&isMin=false&shareBatchNum=&extractionCode='
 					}
 				]
 
@@ -398,10 +409,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 +424,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