From ddf24b26ea76a43e3852dde31b6faa813b2cf99a Mon Sep 17 00:00:00 2001
From: bsw215583320 <baoshiwei121@163.com>
Date: 星期三, 26 三月 2025 14:53:05 +0800
Subject: [PATCH] 1

---
 src/views/dry/bigScreen/BigWorkShop.vue |  405 ++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 336 insertions(+), 69 deletions(-)

diff --git a/src/views/dry/bigScreen/BigWorkShop.vue b/src/views/dry/bigScreen/BigWorkShop.vue
index af6143f..e823370 100644
--- a/src/views/dry/bigScreen/BigWorkShop.vue
+++ b/src/views/dry/bigScreen/BigWorkShop.vue
@@ -6,7 +6,7 @@
 					<div style="width: 600px; height: 50px"> <dv-decoration-8 style="width: 500px; height: 50px" /></div>
 
 					<div class="title">
-						<span>鍏版郸鏅鸿兘骞茬嚗杞﹂棿</span>
+						<span>{{ title }}</span>
 
 						<dv-decoration-5 :dur="20" style="margin-top: -40px; width: 700px; height: 80px" />
 					</div>
@@ -19,19 +19,128 @@
 						<div style="display: flex; width: 120px">
 							<Icon style="color: #ba9853" icon="mdi:home-temperature-outline" :size="28" />
 							&nbsp;
-							<div style="font-size: 20px; line-height: 26px"> 26 鈩� </div>
+							<div style="font-size: 20px; line-height: 26px"> {{ envTemp }} 鈩� </div>
 						</div>
 						<div style="display: flex">
 							<Icon style="color: #ba9853" icon="wi:humidity" :size="28" />
 							&nbsp;
-							<div style="font-size: 20px; line-height: 26px"> 53 %rh </div>
+							<div style="font-size: 20px; line-height: 26px"> {{ envHum }} %rh </div>
 						</div>
+					</div>
+					<div class="feed">
+						<div style="width: 700px; margin-left: 50px; display: flex; flex-direction: column; height: 950px; justify-content: space-between">
+							<div style="display: flex; flex-wrap: wrap; justify-content: space-between">
+								<dv-border-box7 style="width: 210px; height: 100px; padding: 10px">
+									<div class="statistics putincolor">
+										<div class="stat_label font16"> 鎬绘姇鏂欓噺 </div>
+										<div class="stat_value">
+											{{ originWeight?.toFixed(2) || 0 }}
+											<span class="font16"> Kg </span>
+										</div>
+										<div class="stat_avg">
+											<div> 棰勮浜ч噺 </div>
+											<div> {{ totalYield?.toFixed(2) || 0 }} kg </div>
+										</div>
+									</div>
+								</dv-border-box7>
+								<dv-border-box7 style="width: 210px; height: 100px; padding: 10px">
+									<div class="statistics putincolor">
+										<div class="stat_label font16"> 鐢甸噺娑堣�� </div>
+										<div class="stat_value">
+											{{ watt?.toFixed(2) || 0 }}
+											<span class="font16"> Kwh </span>
+										</div>
+										<div class="stat_avg">
+											<div> 骞冲潎鐢佃�� </div>
+											<div> {{wattAvg?.toFixed(2) || 0}} Kwh/kg </div>
+										</div>
+									</div>
+								</dv-border-box7>
+								<dv-border-box7 style="width: 210px; height: 100px; padding: 10px">
+									<div class="statistics putincolor">
+										<div class="stat_label font16"> 钂告苯娑堣�� </div>
+										<div class="stat_value">
+											{{ steam?.toFixed(2) || 0 }}
+											<span class="font16"> m鲁 </span>
+										</div>
+										<div class="stat_avg">
+											<div> 骞冲潎姹借�� </div>
+											<div> {{steamAvg?.toFixed(2) || 0}} m鲁/kg </div>
+										</div>
+									</div>
+								</dv-border-box7>
+								<!-- <div class="statistics putincolor">
+									<div class="stat_label font16">棰勮浜ч噺</div>
+									<div class="stat_value">3000</div>
+									
+									<div class="font16">
+										<br/>
+										Kg
+									</div>
+								</div> -->
+							</div>
+
+							<div>
+								<!-- <div class="statistics electroncolor">
+								<div class="stat_label font16">鐢甸噺娑堣��</div>
+								<div class="stat_value">500</div>
+								<div class="font16">
+									<br/>
+									 Kwh
+								</div>
+								 
+							</div>
+							<div class="statistics steamcolor">
+								<div class="stat_label font16">钂告苯娑堣��</div>
+								<div class="stat_value">300</div>
+								<div class="font16">
+									<br/>
+									m鲁
+								</div>
+								 
+							</div>
+						
+							<div class="statistics electroncolor">
+								<div class="stat_label font16">骞冲潎鐢佃��</div>
+								<div class="stat_value">12</div>
+								<div class="font16">
+									<br/>
+									Kwh/kg
+								</div>
+								 
+							</div>
+							<div class="statistics steamcolor">
+								<div class="stat_label font16">骞冲潎姹借��</div>
+								<div class="stat_value">300</div>
+								<div class="font16">
+									<br/>
+									m鲁/kg
+								</div>
+								
+							</div> -->
+							</div>
+						</div>
+						<!-- <div style="padding-right: 100px;">
+							<div class="statistics">
+								<div class="stat_label font16">骞叉枡浜ч噺</div>
+								<div class="stat_value">300</div>
+								<div class="font16">
+									<br/>
+									kg
+								</div>
+							
+							</div>
+						</div> -->
 					</div>
 					<div class="up">
 						<div v-for="num in eqpNum" :key="num" :class="{ one: num === 1, two: num === 2, three: num === 3, four: num === 4 }">
 							<div class="eqpInfoup" @click="gotoeqp(num - 1)">
 								<div class="eqp-title">
-									<div class="eqp-name">{{ eqpMap.get(eqpCodes[num - 1])?.name || '棰勭暀' }}</div>
+									<div class="herb_weight">
+										<div>{{ realTime.get(eqpCodes[num - 1])?.herbName || '鏆傛棤' }}</div>
+										<div>{{ realTime.get(eqpCodes[num - 1])?.originWeight || 0 }} Kg</div>
+									</div>
+									<!-- <div class="eqp-name">{{ eqpMap.get(eqpCodes[num - 1])?.name || '棰勭暀' }}</div> -->
 									<!-- <div class="process"> </div> -->
 									<Progress
 										:stroke-color="{
@@ -44,24 +153,36 @@
 										:show-info="false"
 									/>
 									<div class="eqp-timer">
-										<div><Icon style="color: rgb(42 154 234)" icon="mdi:clock-outline" :size="20" />
-											 {{realTime.get(eqpCodes[num - 1])?.dryTime || 0}} min
+										<div
+											><Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="20" />
+											{{ realTime.get(eqpCodes[num - 1])?.trendVo?.moisture?.toFixed(1) || '0' }} %
 										</div>
-										<div><Icon style="color: rgb(134 207 106)" icon="gg:sand-clock" :size="20" /> 
-											{{ realTime.get(eqpCodes[num - 1])?.totalRemain||0}} min
+										<div
+											><Icon style="color: #873853" icon="fluent:temperature-20-regular" :size="20" />
+											{{ realTime.get(eqpCodes[num - 1])?.trendVo?.bellowsTemp?.toFixed(0) || '0' }} 鈩�
+										</div>
+										<div
+											><Icon style="color: rgb(134 207 106)" icon="gg:sand-clock" :size="20" />
+											{{ realTime.get(eqpCodes[num - 1])?.totalRemain || 0 }} min
 										</div>
 									</div>
 								</div>
 								<div class="eqp-info-up">
-									<div class="herb">
+									<!-- <div class="herb">
 										<div>{{ realTime.get(eqpCodes[num - 1])?.herbName || '鏆傛棤' }}</div>
-										<!-- <div>33 Kg</div> -->
-									</div>
-									
+										
+									</div> -->
 								</div>
-								<div class="weight"><div class="herb">{{ realTime.get(eqpCodes[num - 1])?.originWeight || 0 }} Kg</div></div>
+								<!-- <div class="weight"><div class="herb">{{ realTime.get(eqpCodes[num - 1])?.originWeight || 0 }} Kg</div></div> -->
+
+								<div class="weight"
+									><div class="herb">
+										{{ showInfo(realTime.get(eqpCodes[num - 1])) }}
+									</div></div
+								>
 								<div class="water">
-									<div class="temp">
+									<div class="eqp_num">{{ num }}</div>
+									<!-- <div class="temp">
 										<div style="line-height: 28px"><Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="28" /> </div>
 										<div class="font">
 											<span class="value"> {{ realTime.get(eqpCodes[num - 1])?.trendVo?.moisture || '0' }}</span> %
@@ -72,7 +193,7 @@
 										<div class="font">
 											<span class="value">{{ realTime.get(eqpCodes[num - 1])?.trendVo?.bellowsTemp || '0' }} </span> 鈩�
 										</div>
-									</div>
+									</div> -->
 								</div>
 							</div>
 						</div>
@@ -80,12 +201,16 @@
 					<div class="down">
 						<div v-for="num in eqpNum" :key="num" :class="{ one: num === 1, two: num === 2, three: num === 3, four: num === 4 }">
 							<div class="eqpInfodown" @click="gotoeqp(num + 3)">
-								<div class="eqp-info-down">
+								<!-- <div class="eqp-info-down">
 									<div class="herb">{{ realTime.get(eqpCodes[num + 3])?.herbName || '鏆傛棤' }}</div>
 								</div>
-								<div class="weight"><div class="herb">{{ realTime.get(eqpCodes[num + 3])?.originWeight || 0 }} Kg </div></div>
+								<div class="weight"><div class="herb">{{ realTime.get(eqpCodes[num + 3])?.originWeight || 0 }} Kg </div></div> -->
+								<div class="weight"
+									><div class="herb">{{ showInfo(realTime.get(eqpCodes[num + 3])) }}</div></div
+								>
 								<div class="water">
-									<div class="temp">
+									<div class="eqp_num">{{ num + 4 }}</div>
+									<!-- <div class="temp">
 										<div style="line-height: 28px">
 											<Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="28" />
 										</div>
@@ -98,13 +223,16 @@
 										<div class="font">
 											<span class="value">{{ realTime.get(eqpCodes[num + 3])?.trendVo?.bellowsTemp || '0' }}</span> 鈩�
 										</div>
-									</div>
+									</div> -->
 								</div>
 
-								<div style="height: 50px"></div>
+								<div style="height: 40px"></div>
 								<div class="eqp-title">
-									<div class="eqp-name-down">{{ eqpMap.get(eqpCodes[num + 3])?.name || '棰勭暀' }}</div>
-									
+									<div class="herb_weight">
+										<div>{{ realTime.get(eqpCodes[num + 3])?.herbName || '鏆傛棤' }}</div>
+										<div>{{ realTime.get(eqpCodes[num + 3])?.originWeight || 0 }} Kg</div>
+									</div>
+
 									<Progress
 										:stroke-color="{
 											from: '#108ee9',
@@ -117,21 +245,30 @@
 									/>
 									<!-- <div class="eqp-name">50%</div> -->
 									<div class="eqp-timer">
-										<div><Icon style="color: rgb(42 154 234)" icon="mdi:clock-outline" :size="20" />
-											 {{realTime.get(eqpCodes[num + 3])?.dryTime || 0}} min
+										<div
+											><Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="20" />
+											{{ realTime.get(eqpCodes[num + 3])?.trendVo?.moisture?.toFixed(1) || '0' }} %
 										</div>
-										<div><Icon style="color: rgb(134 207 106)" icon="gg:sand-clock" :size="20" /> 
-											{{ realTime.get(eqpCodes[num + 3])?.totalRemain||0}} min
+										<div
+											><Icon style="color: #873853" icon="fluent:temperature-20-regular" :size="20" />
+											{{ realTime.get(eqpCodes[num + 3])?.trendVo?.bellowsTemp?.toFixed(0) || '0' }} 鈩�
+										</div>
+										<!-- <div><Icon style="color: rgb(42 154 234)" icon="mdi:clock-outline" :size="20" />
+											 {{realTime.get(eqpCodes[num + 3])?.dryTime || 0}} min
+										</div> -->
+										<div
+											><Icon style="color: rgb(134 207 106)" icon="gg:sand-clock" :size="20" />
+											{{ realTime.get(eqpCodes[num + 3])?.totalRemain || 0 }} min
 										</div>
 									</div>
 								</div>
 							</div>
 						</div>
 					</div>
+
 					<div class="footer">
-						
-						<div >{{ nowDate }}</div>
-						<div >{{ nowTime }}</div>
+						<div>{{ nowDate }}</div>
+						<div>{{ nowTime }}</div>
 					</div>
 				</div>
 			</div>
@@ -152,19 +289,34 @@
 	const eqpMap = ref(new Map())
 	const eqpCodes = ref(['GM001', 'GM002', 'GM003', 'GM004', 'GM005', 'GM006', 'GM007', 'GM008'])
 	const eqps = ref([] as dryEquipment[])
-
+	const title = ref('鏅鸿兘骞茬嚗杞﹂棿')
 	const userStore = useUserStore()
+	const envHum = ref(0)
+	const envTemp = ref(0)
+	const originWeight = ref(0)
+	const totalYield = ref(0)
+	const dryReduce = ref(0)
+	const steam = ref(0)
+	const watt = ref(0)
+
+	const steamAvg = ref(0)
+	const wattAvg = ref(0)
+	// console.log(userStore.dictItems.title)
+	userStore.dictItems.title?.forEach((element) => {
+		if (element.value === 'bigscreentitle') {
+			title.value = element.text
+		}
+	})
 	const Timer = ref()
 
 	const realTime = ref(new Map())
 	const nowTime = ref()
 	const nowDate = ref()
 
-
 	function listAllEqp() {
 		listAll({ enable: 'Y' })
 			.then((result) => {
-				//console.log(`output->result`, result)
+				// (`output->result`, result)
 				eqps.value = result
 
 				result.forEach((item) => {
@@ -173,14 +325,35 @@
 				updateRealTime()
 			})
 			.catch((err) => {
-				console.log(`output->err`, err)
+				// console.log(`output->err`, err)
 			})
 	}
 
 	function updateRealTime() {
 		//console.log(`output->瀹氭椂鍒锋柊鏁版嵁`)
+
+		queryWorkShopStatistics()
+
 		eqps.value.forEach((item) => {
-			queryRealTime(item)
+			 queryRealTime(item)
+		})
+	}
+
+	function queryWorkShopStatistics() {
+		let tenantId = userStore.getTenant
+		defHttp.get({ url: '/dry/real/workshopStatistics', params: { tenantid: tenantId } }).then((res) => {
+			// console.log(`output->res`, res)
+			steam.value = res.steam
+			watt.value = res.watt
+			envHum.value = res.envHum
+			envTemp.value = res.envTemp
+			originWeight.value = res.originWeight
+			totalYield.value = res.yield
+			dryReduce.value = res.reduce
+			if(res.reduce > 0) {
+				steamAvg.value = res.steam/res.reduce
+				wattAvg.value = res.watt/res.reduce
+			}
 		})
 	}
 
@@ -189,18 +362,17 @@
 		let eqpCode = eqp.code
 		let queryRealTimeUrl = '/dry/real/getRealTimeData'
 		defHttp.get({ url: queryRealTimeUrl, params: { tenantid: tenantId, machineid: eqpCode } }).then((res) => {
-			//console.log(`output->res`, res)
 			if (res && res.trendVo) {
 				res.tempValue = [res.windTemp, 100]
 				res.totalRemain = res.remain
 				if (res.detailList) {
-					// 骞茬嚗鍓╀綑鏃堕棿=宸ュ崟棰勮鍓╀綑-锛堝綋鍓嶅共鐕ユ椂闂�-鏈�鍚庝竴娆¤褰曞共鐕ユ椂闂达級 
-					res.totalRemain = res.remain-(res.dryTime-res.detailList[res.detailList.length - 1].totalTime)
+					// 骞茬嚗鍓╀綑鏃堕棿=宸ュ崟棰勮鍓╀綑-锛堝綋鍓嶅共鐕ユ椂闂�-鏈�鍚庝竴娆¤褰曞共鐕ユ椂闂达級
+					res.totalRemain = res.remain - (res.dryTime - res.detailList[res.detailList.length - 1].totalTime)
 				}
-				if(res.totalRemain < 0) {
+				if (res.totalRemain < 0) {
 					res.totalRemain = 0
 				}
-				
+
 				res.percent = ((res.dryTime / (res.dryTime + res.totalRemain)) * 100).toFixed(2)
 			} else {
 				res = {
@@ -214,6 +386,7 @@
 		})
 	}
 	function gotoeqp(num) {
+		//console.log('璺宠浆鏈哄彴', num)
 		if (num < eqpCodes.value.length) {
 			router.push({ path: '/bigEqp', query: { num: num } })
 		}
@@ -221,16 +394,45 @@
 
 	function getNowTime() {
 		var date = new Date()
-		nowDate.value = (date.getFullYear()) + "/" + (date.getMonth()< 9? "0" + (date.getMonth() + 1): date.getMonth() + 1) + "/" + (date.getDay() < 10? "0" + date.getDay() : date.getDay())
-		nowTime.value = "" + (date.getHours()<10? "0" + date.getHours() :  date.getHours())  + ":" + (date.getMinutes()< 10? "0" + date.getMinutes(): date.getMinutes())
-		//console.log("鑾峰彇褰撳墠鏃堕棿锛�");
+		nowDate.value =
+			date.getFullYear() +
+			'/' +
+			(date.getMonth() < 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) +
+			'/' +
+			(date.getDay() < 10 ? '0' + date.getDay() : date.getDay())
+		nowTime.value =
+			'' +
+			(date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) +
+			':' +
+			(date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes())
 	}
 
+	function showInfo(data) {
+		return data ? (data.fault ? data.fault : data.warning ? data.warning : data.orderStatus ? covertStatus(data.orderStatus+'') : '绌洪棽') : '绌洪棽'
+	}
+
+  function covertStatus(status){
+    //console.log('status',status)
+    switch (status) {
+      case '0':
+        return '鍑嗗闃舵'
+      case '1':
+        return '涓婃枡闃舵'
+      case '2':
+        return '骞茬嚗闃舵'
+      case '3':
+        return '鏆傚仠'
+      case '4':
+        return '骞茬嚗瀹屾垚'
+
+    }
+  }
+  console.log("router-param", router.currentRoute.value.params.tenant);
 	getNowTime()
 	listAllEqp()
 	onMounted(() => {
 		Timer.value = setInterval(updateRealTime, 3000)
-		setInterval(getNowTime,10000)
+		setInterval(getNowTime, 10000)
 	})
 
 	onUnmounted(() => {
@@ -252,7 +454,7 @@
 		background-image: url(/src/assets/images/dry/bg/wksp2.png);
 		background-repeat: no-repeat;
 		background-size: 100%;
-		background-position: 0% 50%;
+		background-position: 0px 50px;
 	}
 
 	.head {
@@ -283,8 +485,16 @@
 		display: flex;
 	}
 
+	.feed {
+		display: flex;
+		height: 0px;
+		color: gray;
+		padding-top: 20px;
+		justify-content: space-between;
+	}
+
 	.up {
-		padding-left: 100px;
+		padding-left: 110px;
 		padding-top: 00px;
 		display: flex;
 
@@ -292,36 +502,37 @@
 		justify-content: flex-start;
 	}
 	.down {
-		padding-left: 392px;
-		margin-top: -334px;
+		padding-left: 402px;
+		margin-top: -367px;
 		display: flex;
 
 		align-content: center;
 		justify-content: flex-start;
 	}
 	.eqpInfoup {
-		width: 280px;
-		height: 315px;
-		margin: -20px 41px;
+		width: 300px;
+		height: 400px;
+		margin: -50px 31px;
 		display: flex;
 		flex-direction: column;
 	}
 
 	.eqpInfodown {
-		width: 280px;
-		height: 315px;
-		margin: 0 41px;
+		width: 300px;
+		height: 430px;
+		margin: 0 31px;
+		padding-top: 132px;
 		display: flex;
 		flex-direction: column;
 		justify-content: flex-start;
 	}
 
 	.one {
-		margin-top: 280px;
+		margin-top: 278px;
 	}
 
 	.two {
-		margin-top: 220px;
+		margin-top: 219px;
 	}
 
 	.three {
@@ -329,15 +540,15 @@
 	}
 
 	.four {
-		margin-top: 100px;
+		margin-top: 101px;
 	}
 
 	.eqp-title {
-		height: 45px;
-		border-radius: 20px;
-		/* background: rgb(182, 182, 182);
-		border: 1px solid green; */
+		height: 125px;
+
 		width: 100%;
+
+		padding: 10px 20px;
 	}
 
 	.eqp-name {
@@ -352,8 +563,8 @@
 		text-align: center;
 		color: white;
 		margin-top: 6px;
-		justify-content: space-around;
-    display: flex;
+		justify-content: space-between;
+		display: flex;
 	}
 
 	.eqp-name-down {
@@ -372,14 +583,14 @@
 
 	.eqp-info-up {
 		flex: 1;
-		padding-top: 120px;
+		padding-top: 108px;
 		display: flex;
 	}
 
 	.weight {
 		flex: 1;
 		display: flex;
-		font-size: 16px;
+		font-size: 20px;
 	}
 
 	.eqp-info-down {
@@ -389,7 +600,7 @@
 	}
 
 	.herb {
-		height: 30px;
+		height: 32px;
 		background: #3f4c6b;
 		color: white;
 		line-height: 30px;
@@ -398,10 +609,9 @@
 	.water {
 		height: 120px;
 		width: 110px;
-		margin-left: 170px;
+		margin-left: 200px;
 		display: flex;
 		flex-wrap: wrap;
-		align-content: space-evenly;
 	}
 
 	.temp {
@@ -410,7 +620,6 @@
 	.font {
 		line-height: 26px;
 	}
-
 
 	.footer {
 		height: 160px;
@@ -421,7 +630,7 @@
 		align-items: flex-end;
 		color: white;
 		line-height: 40px;
-
+		margin-top: -150px;
 	}
 	:deep() .progress {
 		padding: 25px 25px;
@@ -435,4 +644,62 @@
 	:deep() .ant-progress-inner {
 		background-color: rgb(197 197 197 / 84%) !important;
 	}
+
+	.statistics {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		flex-wrap: wrap;
+	}
+	.stat_label {
+		width: 45px;
+	}
+
+	.stat_value {
+		font-size: 28px;
+	}
+
+	.herb_weight {
+		padding: 0 10px;
+		color: white;
+		display: flex;
+		justify-content: space-between;
+	}
+	.eqp_num {
+		font-weight: bold;
+		width: 40px;
+		height: 40px;
+		background: #a0782e;
+		border-radius: 50px;
+		/* text-align: center; */
+		font-size: 23px;
+		color: white;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.putincolor {
+		color: antiquewhite;
+	}
+
+	.electroncolor {
+		color: aquamarine;
+	}
+
+	.steamcolor {
+		color: sandybrown;
+	}
+	.font16 {
+		font-size: 16px;
+	}
+	.stat_avg {
+		width: 100%;
+		font-size: 16px;
+		display: flex;
+		color: rgb(176, 176, 176);
+		justify-content: space-between;
+		border-top: 1px solid;
+		margin-top: 6px;
+	}
 </style>

--
Gitblit v1.9.3