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 | 100 +++++++++++++++++++++++++++++++++++-------------- 1 files changed, 71 insertions(+), 29 deletions(-) diff --git a/src/views/dry/bigScreen/BigEqp.vue b/src/views/dry/bigScreen/BigEqp.vue index aa27b60..19a10ef 100644 --- a/src/views/dry/bigScreen/BigEqp.vue +++ b/src/views/dry/bigScreen/BigEqp.vue @@ -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"> @@ -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 @@ -1575,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 + '%' @@ -1595,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 + '%' @@ -1624,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 = '鏆傚仠' @@ -1678,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: [], @@ -1870,9 +1914,7 @@ .eqpStatus { width: 848px; - height: 300px; - - padding: 100px; + } .rightInfo { display: flex; -- Gitblit v1.9.3