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

master
wenjy 2 years ago
parent 483104bba1
commit c4aa22ef42

@ -748,15 +748,16 @@
$(() => { $(() => {
autoUpdate("/system/AbsorbDeviceMes/deviceState", INTERVAL, data => { autoUpdate("/system/AbsorbDeviceMes/deviceState", INTERVAL, data => {
if(data.deviceEnergy > 0){
setStatus(data.deviceStatus) setStatus(data.deviceStatus)
energyConsumptionElement.innerText = test(data.deviceEnergy,100) energyConsumptionElement.innerText = test(data.deviceEnergy,100)
powerElement.innerText = test(data.devicePower,1000) powerElement.innerText = data.devicePower
runDurationElement.innerText = data.runTime runDurationElement.innerText = data.runTime
stopDurationElement.innerText = (data.openTime - data.runTime).toFixed(2) stopDurationElement.innerText = (data.openTime - data.runTime).toFixed(2)
lossElement.innerText = data.lossTime lossElement.innerText = data.lossTime
deviceTaktElement.innerText = data.deviceTakt deviceTaktElement.innerText = data.deviceTakt
malfunctionElement.innerText = data.count malfunctionElement.innerText = data.count
}
}) })
autoUpdate("/system/AbsorbDeviceMes/DeviceOEE", INTERVAL, data => { autoUpdate("/system/AbsorbDeviceMes/DeviceOEE", INTERVAL, data => {
@ -1489,7 +1490,7 @@
const test = (number,flag) =>{ const test = (number,flag) =>{
var info = Math.floor(number / flag); var info = Math.floor(number / flag);
return info.toFixed(2); return info.toFixed(1);
} }
window.onresize = resize window.onresize = resize

Loading…
Cancel
Save