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); }