$(() => { //设备OEE统计 $.getJSON('/aluminumLiner/getOeeStatistics', function (result) { OEEStatistics(result, document.getElementById("OEEStatistics")); }); //设备故障排名 $.getJSON('/tankShell/getStatisticalOutputByModel', function (result) { equipmentFailure(result, document.getElementById("equipmentFailure")); }); //loss $.getJSON('/tankShell/getInventoryStatistics', function (result) { loss(result, document.getElementById("loss")); }); //设备产量能耗对比 $.getJSON('/tankShellDevice/getEnergyConsumption', function (result) { energyConsumption(result, document.getElementById("energyConsumption")); }); //生产计划 $.ajax({ url: '/storage/getProductionPlan', type: 'GET', dataType: 'JSON', success: function (res) { let Res = res Res.data.forEach(val => { val[0] = 'SHEBEI452736' val[1] = 'AGYM45HH23' val[2] = '32' val[3] = '2021.01.01 10:00:00' delete val[4] }); Res.header = ['设备名称', '参数名称', '当前值', '时间',] dynamicTable({ el: '#productionPlan', rowNum: 5, timeout: 0, header: Res.header, data: Res.data, index: false, fontColor: '#B4B7BF ', indexBGC: '#86F3FF', headerBGC: 'rgba(8,36,75,0.2)', oddRowBGC: 'rgba(8,36,75,0.2)', evenRowBGC: 'rgba(6,25,57,0.2)', colWidth: ['100%', '100%', '40%', '160%',] }); }, error: function (e) { console.log(e) } }); /*数据信息*/ const statusArray = [0, 0, 0, 0, 0]; dataInformationFunction(statusArray); energyProductionStatisticsFunction(statusArray); runParamStatisticsFunction(statusArray); $("#lossParam").text(123.87); $("#meterParam").text(123.65); }) /*数据信息*/ const dataInformationFunction = (statusArray) => { let info = `
${statusArray[0] == 1 ? `运行正常` : `运行异常`} 389kW
4563kW·h 2
`; $("#dataInformation").append(info); } /*能耗产量统计*/ const energyProductionStatisticsFunction = (statusArray) => { let info = `
68 675 68 675
`; $("#energyProductionStatistics").append(info); } const runParamStatisticsFunction = (statusArray) => { let info = `
68
685
685
685
`; $("#runParamStatistics").append(info); }