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 | 51 ++++++++++++++++++++++++++++++++++----------------- 1 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/views/dry/bigScreen/BigWorkShop.vue b/src/views/dry/bigScreen/BigWorkShop.vue index c7cde21..e823370 100644 --- a/src/views/dry/bigScreen/BigWorkShop.vue +++ b/src/views/dry/bigScreen/BigWorkShop.vue @@ -34,12 +34,12 @@ <div class="statistics putincolor"> <div class="stat_label font16"> 鎬绘姇鏂欓噺 </div> <div class="stat_value"> - {{ originWeight.toFixed(2) }} + {{ originWeight?.toFixed(2) || 0 }} <span class="font16"> Kg </span> </div> <div class="stat_avg"> <div> 棰勮浜ч噺 </div> - <div> {{ totalYield.toFixed(2) }} kg </div> + <div> {{ totalYield?.toFixed(2) || 0 }} kg </div> </div> </div> </dv-border-box7> @@ -47,12 +47,12 @@ <div class="statistics putincolor"> <div class="stat_label font16"> 鐢甸噺娑堣�� </div> <div class="stat_value"> - {{ watt.toFixed(2) }} + {{ watt?.toFixed(2) || 0 }} <span class="font16"> Kwh </span> </div> <div class="stat_avg"> <div> 骞冲潎鐢佃�� </div> - <div> {{wattAvg.toFixed(2)}} Kwh/kg </div> + <div> {{wattAvg?.toFixed(2) || 0}} Kwh/kg </div> </div> </div> </dv-border-box7> @@ -60,12 +60,12 @@ <div class="statistics putincolor"> <div class="stat_label font16"> 钂告苯娑堣�� </div> <div class="stat_value"> - {{ steam.toFixed(2) }} + {{ steam?.toFixed(2) || 0 }} <span class="font16"> m鲁 </span> </div> <div class="stat_avg"> <div> 骞冲潎姹借�� </div> - <div> {{steamAvg.toFixed(2)}} m鲁/kg </div> + <div> {{steamAvg?.toFixed(2) || 0}} m鲁/kg </div> </div> </div> </dv-border-box7> @@ -155,11 +155,11 @@ <div class="eqp-timer"> <div ><Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="20" /> - {{ realTime.get(eqpCodes[num - 1])?.trendVo?.moisture.toFixed(1) || '0' }} % + {{ realTime.get(eqpCodes[num - 1])?.trendVo?.moisture?.toFixed(1) || '0' }} % </div> <div ><Icon style="color: #873853" icon="fluent:temperature-20-regular" :size="20" /> - {{ realTime.get(eqpCodes[num - 1])?.trendVo?.bellowsTemp.toFixed(0) || '0' }} 鈩� + {{ 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" /> @@ -247,11 +247,11 @@ <div class="eqp-timer"> <div ><Icon style="color: #1850b7" icon="ic:twotone-water-drop" :size="20" /> - {{ realTime.get(eqpCodes[num + 3])?.trendVo?.moisture.toFixed(1) || '0' }} % + {{ realTime.get(eqpCodes[num + 3])?.trendVo?.moisture?.toFixed(1) || '0' }} % </div> <div ><Icon style="color: #873853" icon="fluent:temperature-20-regular" :size="20" /> - {{ realTime.get(eqpCodes[num + 3])?.trendVo?.bellowsTemp.toFixed(0) || '0' }} 鈩� + {{ 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 @@ -289,7 +289,7 @@ 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 title = ref('鏅鸿兘骞茬嚗杞﹂棿') const userStore = useUserStore() const envHum = ref(0) const envTemp = ref(0) @@ -301,7 +301,7 @@ const steamAvg = ref(0) const wattAvg = ref(0) - console.log(userStore.dictItems.title) + // console.log(userStore.dictItems.title) userStore.dictItems.title?.forEach((element) => { if (element.value === 'bigscreentitle') { title.value = element.text @@ -316,7 +316,7 @@ function listAllEqp() { listAll({ enable: 'Y' }) .then((result) => { - console.log(`output->result`, result) + // (`output->result`, result) eqps.value = result result.forEach((item) => { @@ -325,7 +325,7 @@ updateRealTime() }) .catch((err) => { - console.log(`output->err`, err) + // console.log(`output->err`, err) }) } @@ -342,7 +342,7 @@ function queryWorkShopStatistics() { let tenantId = userStore.getTenant defHttp.get({ url: '/dry/real/workshopStatistics', params: { tenantid: tenantId } }).then((res) => { - console.log(`output->res`, res) + // console.log(`output->res`, res) steam.value = res.steam watt.value = res.watt envHum.value = res.envHum @@ -386,7 +386,7 @@ }) } function gotoeqp(num) { - console.log('璺宠浆鏈哄彴', num) + //console.log('璺宠浆鏈哄彴', num) if (num < eqpCodes.value.length) { router.push({ path: '/bigEqp', query: { num: num } }) } @@ -408,9 +408,26 @@ } function showInfo(data) { - return data ? (data.fault ? data.fault : data.warning ? data.warning : data.level ? data.level : '绌洪棽') : '绌洪棽' + 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(() => { -- Gitblit v1.9.3