From c4aa22ef420a8a3ee56b650604ae5d679b02f455 Mon Sep 17 00:00:00 2001 From: wenjy Date: Tue, 13 Dec 2022 10:10:05 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E8=AE=BE=E5=A4=87=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/scada/AbsorbDeviceKB.html | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/scada/AbsorbDeviceKB.html b/ruoyi-admin/src/main/resources/templates/scada/AbsorbDeviceKB.html index ea53840..9630816 100644 --- a/ruoyi-admin/src/main/resources/templates/scada/AbsorbDeviceKB.html +++ b/ruoyi-admin/src/main/resources/templates/scada/AbsorbDeviceKB.html @@ -748,15 +748,16 @@ $(() => { autoUpdate("/system/AbsorbDeviceMes/deviceState", INTERVAL, data => { - - setStatus(data.deviceStatus) - energyConsumptionElement.innerText = test(data.deviceEnergy,100) - powerElement.innerText = test(data.devicePower,1000) - runDurationElement.innerText = data.runTime - stopDurationElement.innerText = (data.openTime - data.runTime).toFixed(2) - lossElement.innerText = data.lossTime - deviceTaktElement.innerText = data.deviceTakt - malfunctionElement.innerText = data.count + if(data.deviceEnergy > 0){ + setStatus(data.deviceStatus) + energyConsumptionElement.innerText = test(data.deviceEnergy,100) + powerElement.innerText = data.devicePower + runDurationElement.innerText = data.runTime + stopDurationElement.innerText = (data.openTime - data.runTime).toFixed(2) + lossElement.innerText = data.lossTime + deviceTaktElement.innerText = data.deviceTakt + malfunctionElement.innerText = data.count + } }) autoUpdate("/system/AbsorbDeviceMes/DeviceOEE", INTERVAL, data => { @@ -1489,7 +1490,7 @@ const test = (number,flag) =>{ var info = Math.floor(number / flag); - return info.toFixed(2); + return info.toFixed(1); } window.onresize = resize