change - 设备信息接口数据过滤

master
wenjy 2 years ago
parent 483104bba1
commit c4aa22ef42

@ -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

Loading…
Cancel
Save