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.

80 lines
2.6 KiB
JavaScript

2 years ago
$(() => {
2 years ago
let fun = () => {
2 years ago
2 years ago
//数据信息
$.getJSON('/aluminumLiner/getDataInformation', function (result) {
const statusArray = [1, 0, 0, 0, 0];
if (result.length > 0) {
statusArray[0] = result[0].deviceStatus;
statusArray[1] = result[0].devicePower;
statusArray[2] = result[0].deviceEnergy;
}
dataInformationFunction(statusArray);
});
$.getJSON('/aluminumLiner/getRunParameters', function (result) {
synthetic(result, {a: 1, b: 1})
});
2 years ago
2 years ago
//loss/aluminumLiner/getLossStatistics
$.getJSON('/aluminumLiner/getLossStatistics', function (result) {
loss(result, document.getElementById("loss"));
});
2 years ago
2 years ago
//设备OEE统计
$.getJSON('/aluminumLiner/getOeeStatistics', function (result) {
OEEStatistics(result, document.getElementById("OEEStatistics"));
});
2 years ago
2 years ago
//库存情况
$.getJSON('/aluminumLiner/getInventoryStatistics', function (result) {
inventory(result, document.getElementById("inventory"));
});
2 years ago
2 years ago
//设备故障排名
$.getJSON('/aluminumLiner/getStatisticalOutputByModel', function (result) {
2 years ago
2 years ago
equipmentFailure(result, document.getElementById("equipmentFailure"));
});
setTimeout(fun, 10000)
}
fun()
let fun2 = () => {
//生产计划
$.ajax({
url: '/aluminumLiner/getProductionPlan',
type: 'get',
dataType: 'JSON',
success: function (res) {
$('#productionPlan').empty()
let Res = {}
2 years ago
2 years ago
Res.data = res.map(val => {
return [val["spe"], val["oq"], val["aq"], val["cha"], val.round,]
})
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: ['20%', '20%', '20%', '20%', '20%']
});
},
error: function (e) {
}
});
return setTimeout(fun2, 100000)
}
fun2()
tableAnimation('#productionPlan')
2 years ago
})