From ee1cfa468df4479d36ee587f92457a52d7a085e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Fri, 17 Feb 2023 14:08:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9oee=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/scada/AbsorbDeviceKB.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/scada/AbsorbDeviceKB.html b/ruoyi-admin/src/main/resources/templates/scada/AbsorbDeviceKB.html index f19ee06..b1e4995 100644 --- a/ruoyi-admin/src/main/resources/templates/scada/AbsorbDeviceKB.html +++ b/ruoyi-admin/src/main/resources/templates/scada/AbsorbDeviceKB.html @@ -389,9 +389,9 @@ let seriesData1 = []; data.forEach((item) => { let name = '' - if(item.name.length >= 15){ + if (item.name.length >= 15) { name = item.name.split(',')[0] - }else{ + } else { name = item.name } xAxisData.push(name); @@ -598,7 +598,7 @@ $(() => { autoUpdate("/system/AbsorbDeviceMes/deviceState", INTERVAL, data => { - if(data.deviceEnergy > 0){ + if (data.deviceEnergy > 0) { setStatus(data.deviceStatus) energyConsumptionElement.innerText = data.deviceEnergy powerElement.innerText = data.devicePower @@ -611,8 +611,8 @@ }) autoUpdate("/system/AbsorbDeviceMes/DeviceOEE", INTERVAL, data => { - //console.log(data) - deviceOEEElement.innerText = (data * 100) +"%" + // console.log(data) + deviceOEEElement.innerText = (data * 100).toFixed(2) + "%" }) autoUpdate("/system/AbsorbDeviceMes/DeviceAlarmCount", INTERVAL, data => { //console.log(data) @@ -901,9 +901,9 @@ show: true, position: 'top', color: "#ffa405", - formatter:(params) => { + formatter: (params) => { - return (params.value)+"%"; + return (params.value) + "%"; } }, @@ -1213,7 +1213,7 @@ fontAdjust() } - const test = (number,flag) =>{ + const test = (number, flag) => { var info = Math.floor(number / flag); return info.toFixed(1); }