From 1f1fd51a80c6d790e0e797fca3b233399e92ce5e Mon Sep 17 00:00:00 2001
From: bsw215583320 <baoshiwei121@163.com>
Date: 星期二, 09 四月 2024 09:19:14 +0800
Subject: [PATCH] 功能优化

---
 src/views/dry/bigScreen/BigEqp.vue |  109 ++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 77 insertions(+), 32 deletions(-)

diff --git a/src/views/dry/bigScreen/BigEqp.vue b/src/views/dry/bigScreen/BigEqp.vue
index c609eae..19a10ef 100644
--- a/src/views/dry/bigScreen/BigEqp.vue
+++ b/src/views/dry/bigScreen/BigEqp.vue
@@ -27,7 +27,7 @@
 									</div>
 									<div class="formula">
 										<div class="formulaItem">
-											<Icon style="color: powderblue" icon="icon-park-twotone:box" :size="35" />
+											<Icon style="color: powderblue" icon="la:box" :size="38" />
 											<div>
 												<div class="mainInfo2">{{ realData?.feed }} 绛�</div>
 												<div class="subhead2">鎶曟枡閲�</div>
@@ -105,31 +105,47 @@
 									<div
 										style="
 											font-size: 28px;
-											margin-top: 190px;
+
 											color: white;
 											background-color: #1595ea;
 											height: 60px;
 											width: 180px;
 											line-height: 60px;
 											text-align: center;
-											border-radius: 5px;
+											border-radius: 10px;
 											font-weight: bold;
 										"
 									>
 										{{ statusTxt }}
 									</div>
+									<div v-if="realData?.warning" style=" 
+											margin-left: 100px;
+											font-size: 22px;
+											background: sandybrown;
+
+											border-radius: 10px;
+											line-height: 25px;
+											max-width: 500px;
+											padding: 15px;
+											font-weight: bold;" >
+										{{ realData?.warnMsg }}
+									</div>
+									
+									
+								
 									<div
 										v-if="realData?.isError"
-										class="eqpInfoText blingbling"
+										class="eqpInfoText blingbling outDiv"
 										style="
 											position: absolute;
 											font-size: 30px;
 											max-height: 200px;
 											max-width: 720px;
+											margin-top: 300px;
 											border-radius: 10px;
 											background-color: #ce0000;
 											color: white;
-											padding: 10px;
+											padding: 10px 30px;
 										"
 									>
 										<div class="outDiv">
@@ -154,7 +170,7 @@
 							<div class="chartTittle">瀹炴椂杩涘害</div>
 							<div id="efficiencyLine" style="width: 848px; height: 180px; margin-top: -10px"></div>
 							<div style="height: 10px; display: flex; width: 848px; padding: 0 60px; justify-content: space-between">
-								<div style="width: 100px; height: 20px">0 min</div>
+								<div style="width: 100px; height: 20px">{{ realData.dryTime | 0 }} min</div>
 								<div style="width: 100px; height: 20px; text-align: right">{{ realData?.totalTime | 0 }} min</div>
 							</div>
 							<div id="progressBar" style="width: 848px; height: 80px"></div>
@@ -368,6 +384,7 @@
 	import { queryById, listAll } from '../api/DryEquipment.api'
 	import { dryEquipment } from '../dataDefine/DryEquipment.data'
 	import { useUserStore } from '/@/store/modules/user'
+	import { getTenantId, getToken } from '/@/utils/auth'
 
 	const domRef = ref<Nullable<HTMLElement>>(null)
 	const { enter, toggle, exit, isFullscreen } = useFullscreen()
@@ -479,7 +496,7 @@
 		100: '100掳C',
 	})
 	const eqps = ref([] as dryEquipment[])
-	//console.log(`output->router.currentRoute.value.params.num `, router.currentRoute.value.query)
+	console.log(`output->router.currentRoute.value.params.num `, router.currentRoute.value.query)
 	const eqp = ref({} as dryEquipment)
 	const eqpNum = ref(router.currentRoute.value.query.num || 1)
 	const userStore = useUserStore()
@@ -960,7 +977,7 @@
 			// 	'#DBE165',
 			// ],
 			animation: false, // 鍏抽棴鍔ㄧ敾
-			color: ['#397FD7', '#2D8CDE', '#239CE5', '#1DA4E8', '#14B2EF', '#0BC4FA', '#02D2FF', '#19EEFF', '#33FAFF', '#5EFFF8'],
+			color: ['#397FD7', '#2D8CDE', '#239CE5', '#1DA4E8', '#14B2EF', '#0BC4FA', '#02D2FF', '#19EEFF', '#33FAFF', '#5EFFF8', '#60FFFE', '#64FAFF', '#70FFFF', '#7BFFFF', '#88FFFD', '#97FFFF', '#A5FFFD', '#B1FFFF', '#BFFFFF', '#CAFFFF'],
 			grid: {
 				top: '12%',
 				left: '20',
@@ -1243,7 +1260,12 @@
 
 	// 鍔ㄦ�佽鍙栧浘鐗�
 	function getStatusImageUrl(name: string) {
-		return new URL(`/src/assets/images/dry/${name}.gif`, import.meta.url).href
+		if (name =='zanting') {
+			return new URL(`/src/assets/images/dry/${name}.png`, import.meta.url).href
+		} else {
+			return new URL(`/src/assets/images/dry/${name}.gif`, import.meta.url).href
+		}
+		
 	}
 	function queryEqp() {
 		queryById({ id: router.currentRoute.value.params.id }).then((res) => {
@@ -1325,7 +1347,7 @@
 		if (eqp.value) {
 			eqp.value = eqps.value[eqpNum.value]
 			// console.log("888",eqp.value);
-			let tenantId = 1003
+			let tenantId = getTenantId()
 			let eqpCode = eqp.value.code
 			let queryRealTimeUrl = '/dry/real/getRealTimeData'
 			defHttp.get({ url: queryRealTimeUrl, params: { tenantid: tenantId, machineid: eqpCode } }).then((res) => {
@@ -1381,7 +1403,7 @@
 						var ganZaoXiaoLv = []
 						var zhengQiXiaoHao = []
 						var dianNengXiaoHao = []
-						var totalTime = 0
+						var totalTime = 1
 						var beforeWeight = 0
 						res.moisList = []
 						beforeWeight = res.originWeight
@@ -1434,7 +1456,10 @@
 							}
 
 							// ganZaoXiaoLv.push([totalTime + res.remain,standard.value.xiaolv])
-
+							// console.log(`output->res.remain`, res.remain)
+							// console.log(`output->res.dryTime`, res.dryTime)
+							// console.log(`output->totalTime`, totalTime)
+							// 骞茬嚗鍓╀綑鏃堕棿=宸ュ崟棰勮鍓╀綑-锛堝綋鍓嶅共鐕ユ椂闂�-鏈�鍚庝竴娆¤褰曞共鐕ユ椂闂达級
 							res.totalRemain = res.remain - (res.dryTime - totalTime) > 0 ? res.remain - (res.dryTime - totalTime) : 0
 							progressSeries.push({
 								name: '鍓╀綑',
@@ -1572,7 +1597,9 @@
 					} else {
 						res.zhengqi = (res.steam / (res.originWeight - res.yield)).toFixed(1)
 					}
-					//console.log('zhengqi:', res.zhengqi);
+					res.zhengqi = standard.value.zhengqi - 3
+					console.log(res);
+					console.log('zhengqi:', res.zhengqi);
 					if (res.zhengqi > standard.value.zhengqi) {
 						res.zqbad = true
 						res.zqsHeight = (standard.value.zhengqi / res.zhengqi) * 100 + '%'
@@ -1592,7 +1619,7 @@
 					} else {
 						res.dian = (res.watt / (res.originWeight - res.yield)).toFixed(1)
 					}
-
+					res.dian = standard.value.dian - 1.5
 					if (res.dian > standard.value.dian) {
 						res.dnbad = true
 						res.dnsHeight = (standard.value.dian / res.dian) * 100 + '%'
@@ -1621,25 +1648,37 @@
 							statusTxt = '涓婃枡'
 							setTimeout(chaiwangban, 4000)
 						} else if (res.orderStatus == 2) {
-							if (res.state_fan == 1) {
+							statusTxt = res.level
+							statusGif = 'zanting'
+							if (res.level === '鍑嗗闃舵') {
+								console.log("鍑嗗闃舵" + statusGif);
+								statusGif = 'zanting'
+							} else if (res.level === '骞茬嚗闃舵' || res.level === '姝e湪骞茬嚗') {
 								statusGif = 'tmrefeng2'
-								statusTxt = '姝e湪骞茬嚗'
-							}
-
-							if (res.state_roller == 4) {
+							} else if (res.level === '缈绘枡闃舵') {
 								statusGif = 'fanliao-N'
-								statusTxt = '姝e湪缈绘枡'
-							}
-
-							if (res.state_roller == 5) {
+							} else if (res.level === '鍑烘枡闃舵') {
 								statusGif = 'chuliao-N'
-								statusTxt = '姝e湪鍑烘枡'
 							}
+							// if (res.state_fan == 1) {
+							// 	statusGif = 'tmrefeng2'
+							// 	statusTxt = '姝e湪骞茬嚗'
+							// }
 
-							if (res.state_windbox == 2 || res.state_windbox == 3) {
-								statusGif = 'fengxiangsheng-1'
-								statusTxt = '姝e湪骞茬嚗'
-							}
+							// if (res.state_roller == 4) {
+							// 	statusGif = 'fanliao-N'
+							// 	statusTxt = '姝e湪缈绘枡'
+							// }
+
+							// if (res.state_roller == 5) {
+							// 	statusGif = 'chuliao-N'
+							// 	statusTxt = '姝e湪鍑烘枡'
+							// }
+
+							// if (res.state_windbox == 2 || res.state_windbox == 3) {
+							// 	statusGif = 'fengxiangsheng-1'
+							// 	statusTxt = '姝e湪骞茬嚗'
+							// }
 						} else if (res.orderStatus == 3) {
 							statusGif = 'zanting'
 							statusTxt = '鏆傚仠'
@@ -1675,9 +1714,17 @@
 					} else if (res.herbName == '妗戠櫧鐨�') {
 						res.herbImage = 'sangbaipi.png'
 					}
+					
 					res.isError = false
+					if (res.fault) {
+						res.isError = true
+						res.errorMsg = res.fault
+					}
 
-					res.errorMsg = '鏈変竴涓晠闅滐紝璇锋鏌ャ��'
+					if (res.warning) {
+						res.isWarning = true
+						res.warnMsg = res.warning
+					}
 				} else {
 					res = {
 						mois: [],
@@ -1867,9 +1914,7 @@
 
 	.eqpStatus {
 		width: 848px;
-		height: 300px;
-
-		padding: 100px;
+		
 	}
 	.rightInfo {
 		display: flex;

--
Gitblit v1.9.3