You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.8 KiB
JavaScript

3 years ago
$(() => {
3 years ago
//设备OEE统计
OEEStatistics(null, document.getElementById("OEEStatistics"));
//设备故障排名
$.getJSON('/tankShell/getStatisticalOutputByModel', function (result) {
equipmentFailure(result, document.getElementById("equipmentFailure"));
});
//loss
$.getJSON('/tankShell/getInventoryStatistics', function (result) {
loss(result, document.getElementById("loss"));
});
//生产计划
$.ajax({
url: '/storage/getProductionPlan',
type: 'GET',
dataType: 'JSON',
success: function (res) {
let Res = res
Res.data.forEach(val => {
val[0] = 'sc-228NE'
val[1] = '431'
val[2] = '0'
val[3] = '431'
val[4] = '0%'
});
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%', '100%', '100%', '100%']
});
},
error: function (e) {
console.log(e)
}
});
3 years ago
/*数据信息*/
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 = `<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%;"><img src="../../img/foamBox/${statusArray[0] == 0 ? "deviceopen.png" : "deviceclose.png"}" width="20%" height="40%"/>${statusArray[0] == 0 ? `<span style="color:green;margin-left: 10px">运行正常</span>` : `<span style="color:red;margin-left: 10px">运行异常</span>`}</td>
<td style="border:0px solid red;text-align:center;width: 50%;color: #E6ECBE;">389kW</td>
</tr>
<tr style="width: 100%; height: 50%;">
<td style="border:0px solid red;text-align:center;width: 50%;color: white;">4563kW·h</td>
<td style="border:0px solid red;text-align:center;width: 50%;color: #D18DA2;">2</td>
</tr>
</table>`;
$("#dataInformation").append(info);
}
/*能耗产量统计*/
const energyProductionStatisticsFunction = (statusArray) => {
let info = `<table style="position: absolute;top: 8%;width: 100%;height:100%;">
<tr style="width: 100%; height: 100%;">
<td style="border:0px solid red;width: 25%;text-align:center;color: #76BBE8;">68</td>
<td style="border:0px solid red;width: 25%;text-align:center;color: #8AE9A0;">675</td>
<td style="border:0px solid red;width: 25%;text-align:center;color: #76BBE8;">68</td>
<td style="border:0px solid red;width: 25%;text-align:center;color: #8AE9A0;">675</td>
</tr>
</table>`;
$("#energyProductionStatistics").append(info);
}
const runParamStatisticsFunction = (statusArray) => {
let info = `
<div style="left: 9%;color:#76BBE8">68</div>
<div style="left: 35%;color:#C0818B">685</div>
<div style="left: 61%;color: #8AE9A0">685</div>
<div style="left: 87%;color:#D5D2AA">685</div>
`;
$("#runParamStatistics").append(info);
}