|
|
|
@ -1,12 +1,9 @@
|
|
|
|
|
$(() => {
|
|
|
|
|
|
|
|
|
|
let fun = () => {
|
|
|
|
|
//设备OEE统计
|
|
|
|
|
$.getJSON('/tankShellDevice/getOeeStatistics', function (result) {
|
|
|
|
|
OEEStatistics(result, document.getElementById("OEEStatistics"));
|
|
|
|
|
});
|
|
|
|
|
setInterval(() => {
|
|
|
|
|
// OEEStatistics(result, document.getElementById("OEEStatistics"));
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
|
|
|
|
//设备故障排名
|
|
|
|
|
$.getJSON('/tankShellDevice/getStatisticalOutputByModel', function (result) {
|
|
|
|
@ -23,6 +20,22 @@ $(() => {
|
|
|
|
|
energyConsumption(result, document.getElementById("energyConsumption"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/*数据信息*/
|
|
|
|
|
$.getJSON('/tankShellDevice/getDataInformation', function (result) {
|
|
|
|
|
dataInformationFunction(result)
|
|
|
|
|
});
|
|
|
|
|
$.getJSON('/tankShellDevice/getRunParameters', function (result) {
|
|
|
|
|
console.log(result);
|
|
|
|
|
energyProductionStatisticsFunction(result)
|
|
|
|
|
runParamStatisticsFunction(result)
|
|
|
|
|
$("#lossParam").text(result[8]);
|
|
|
|
|
|
|
|
|
|
$("#meterParam").text(result[9]);
|
|
|
|
|
});
|
|
|
|
|
return setTimeout(fun,10000)
|
|
|
|
|
}
|
|
|
|
|
fun()
|
|
|
|
|
|
|
|
|
|
const tableRes = {}
|
|
|
|
|
//设备信息
|
|
|
|
|
const getTable = () => {
|
|
|
|
@ -61,21 +74,6 @@ $(() => {
|
|
|
|
|
getTable()
|
|
|
|
|
}, 10000);
|
|
|
|
|
tableAnimation('#productionPlan')
|
|
|
|
|
/*数据信息*/
|
|
|
|
|
$.getJSON('/tankShellDevice/getDataInformation', function (result) {
|
|
|
|
|
dataInformationFunction(result)
|
|
|
|
|
});
|
|
|
|
|
$.getJSON('/tankShellDevice/getRunParameters', function (result) {
|
|
|
|
|
console.log(result);
|
|
|
|
|
energyProductionStatisticsFunction(result)
|
|
|
|
|
runParamStatisticsFunction(result)
|
|
|
|
|
$("#lossParam").text(result[8]);
|
|
|
|
|
|
|
|
|
|
$("#meterParam").text(result[9]);
|
|
|
|
|
});
|
|
|
|
|
$.getJSON('/tankShellDevice/getRunParameters', function (result) {
|
|
|
|
|
runParamStatisticsFunction(result)
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/*数据信息*/
|
|
|
|
@ -85,16 +83,22 @@ const dataInformationFunction = (statusArray) => {
|
|
|
|
|
let info = `<table style="position: absolute;top: 8%;width: 100%;height:100%;">
|
|
|
|
|
<tr style="width: 100%; height: 50%;">
|
|
|
|
|
<td style="border:0px solid red;text-align:center;width: 50%;"><i ${res.deviceStatus == 1 ? 'style="color:rgb(107, 253, 110);"' : 'style="color: rgb(255, 105, 106);"'} class="fa-regular ${res.deviceStatus == 1 ? "fa-circle-check" : "fa-circle-xmark"}"></i>${res.deviceStatus == 1 ? `<span style="color:rgb(107, 253, 110);margin-left: 10px">正常</span>` : `<span style="color:rgb(255, 105, 106);margin-left: 10px">异常</span>`}</td>
|
|
|
|
|
<td style="border:0px solid red;text-align:center;width: 50%;color: #FFEF76;"> ${res.devicePower}kW</td>
|
|
|
|
|
<td style="border:0px solid red;text-align:center;width: 50%;color: #FFEF76;"> ${test(res.devicePower,1000)} kW</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr style="width: 100%; height: 50%;">
|
|
|
|
|
|
|
|
|
|
<td style="border:0px solid red;text-align:center;width: 50%;color: #59B2F6;"> ${res.deviceEnergy}kW·h</td>
|
|
|
|
|
<td style="border:0px solid red;text-align:center;width: 50%;color: red;">2</td>
|
|
|
|
|
<td style="border:0px solid red;text-align:center;width: 50%;color: #59B2F6;"> ${test(res.deviceEnergy,100)}kW·h</td>
|
|
|
|
|
<td style="border:0px solid red;text-align:center;width: 50%;color: red;">0</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>`;
|
|
|
|
|
|
|
|
|
|
$("#dataInformation").append(info);
|
|
|
|
|
$("#dataInformation").html(info);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const test = (number,flag) =>{
|
|
|
|
|
var info = Math.floor(number / flag);
|
|
|
|
|
return info.toFixed(2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*能耗产量统计*/
|
|
|
|
@ -108,10 +112,11 @@ const energyProductionStatisticsFunction = (statusArray) => {
|
|
|
|
|
</tr>
|
|
|
|
|
</table>`;
|
|
|
|
|
|
|
|
|
|
$("#energyProductionStatistics").append(info);
|
|
|
|
|
$("#energyProductionStatistics").html(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const runParamStatisticsFunction = (statusArray) => {
|
|
|
|
|
console.log(statusArray)
|
|
|
|
|
let info = `
|
|
|
|
|
<div style="font-size:175%;left: 9%;color:#59B2F6">${statusArray[4]}</div>
|
|
|
|
|
<div style="font-size:175%;left: 35%;color:#FF696A">${statusArray[5]}</div>
|
|
|
|
|