修改oee显示

master
夜笙歌 2 years ago
parent b981533bf3
commit ee1cfa468d

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

Loading…
Cancel
Save