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