|
|
|
$(() => {
|
|
|
|
|
|
|
|
//班组计划统计
|
|
|
|
$.getJSON(`/foamBox/getTeamStatisticsJson?ids=${ids}`, function (result) {
|
|
|
|
onDutyPlan(result.planAmount, result.actualAmount, result.differenceAmount,)
|
|
|
|
});
|
|
|
|
|
|
|
|
//设备运行状态
|
|
|
|
$.getJSON(`/foamBox/getRunStatusJson?ids=${ids}`, function (result) {
|
|
|
|
deviceStatus(result);
|
|
|
|
});
|
|
|
|
// deviceStatus([1,1,1,1,1,1]);
|
|
|
|
|
|
|
|
|
|
|
|
//库存统计
|
|
|
|
$.getJSON(`/foamBox/getMaterialStoreJson`, function (result) {
|
|
|
|
threeDimensionalCylindrical(result, document.getElementById("inventoryStatistics"));
|
|
|
|
});
|
|
|
|
|
|
|
|
//按型号统计产量
|
|
|
|
$.getJSON(`/foamBox/getMaterialProdutionJson?ids=${ids}`, function (result) {
|
|
|
|
horizontalBarChart(result, document.getElementById("statisticalOutputByModel"));
|
|
|
|
});
|
|
|
|
|
|
|
|
//小时产量
|
|
|
|
$.getJSON(`/foamBox/getHourProdutionJson?ids=${ids}`, function (result) {
|
|
|
|
brokenLineAreaDiagram(result, document.getElementById("hourlyOutputStatistics"));
|
|
|
|
});
|
|
|
|
|
|
|
|
//发泡参数
|
|
|
|
$.getJSON(`/foamBox/getParamTemperature?ids=${ids}`, function (result) {
|
|
|
|
multipleBrokenLineAreaDiagram(result, document.getElementById("foamingParameters"));
|
|
|
|
});
|
|
|
|
|
|
|
|
// 模具温度1
|
|
|
|
|
|
|
|
const temperature = (res, ids) => {
|
|
|
|
let mycharts = echarts.init(ids);
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
|
|
|
|
let option = {
|
|
|
|
grid: {
|
|
|
|
top: '15%',
|
|
|
|
left: '6%',
|
|
|
|
right: '6%',
|
|
|
|
bottom: '3%',
|
|
|
|
containLabel: true
|
|
|
|
},
|
|
|
|
tooltip: {
|
|
|
|
// trigger: "axis",
|
|
|
|
},
|
|
|
|
xAxis: [
|
|
|
|
{
|
|
|
|
interval: 0,
|
|
|
|
type: 'category',
|
|
|
|
data: res.xValueList,
|
|
|
|
axisPointer: {
|
|
|
|
type: 'shadow'
|
|
|
|
},
|
|
|
|
axisLabel:{
|
|
|
|
show: true,
|
|
|
|
rotate:30,
|
|
|
|
interval:0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
yAxis: [
|
|
|
|
{
|
|
|
|
splitLine: {
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
type: 'value',
|
|
|
|
name: '温度',
|
|
|
|
min: 0,
|
|
|
|
// max: 50,
|
|
|
|
interval: 10,
|
|
|
|
axisLabel: {
|
|
|
|
formatter: '{value} °C '
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
name: '内膜温度',
|
|
|
|
type: 'bar',
|
|
|
|
tooltip: {
|
|
|
|
valueFormatter: function (value) {
|
|
|
|
return value + ' ml';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data: res.interiorList
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '外膜温度',
|
|
|
|
type: 'bar',
|
|
|
|
tooltip: {
|
|
|
|
valueFormatter: function (value) {
|
|
|
|
return value + ' ml';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data: res.lateralList
|
|
|
|
},
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
mycharts.setOption(option);
|
|
|
|
$(window).resize(mycharts.resize);
|
|
|
|
}
|
|
|
|
|
|
|
|
$.getJSON(`/foamBox/getMouldTemperature?ids=${ids}`, function (result) {
|
|
|
|
temperature(result, document.getElementById("temperatureOne"));
|
|
|
|
});
|
|
|
|
$.getJSON(`/foamBox/getMouldTemperature2?ids=${ids}`, function (result) {
|
|
|
|
temperature(result, document.getElementById("temperatureTwo"));
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
const deviceStatus = (statusArray) => {
|
|
|
|
let info = `<table style="width: 100%;height:100%;">
|
|
|
|
<tr style="width: 100%;">
|
|
|
|
<td style="position:absolute;top:-7%;left:8%;height:50%;width:10%;border:0px solid red;text-align:left;"><img src="../../img/foamBox/${statusArray[0] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 2vw;"/></td>
|
|
|
|
<td style="position:absolute;top:-7%;left:23%;height:50%;width:10%;border:0px solid red;text-align:left;"><img src="../../img/foamBox/${statusArray[1] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 2vw;"/></td>
|
|
|
|
<td style="position:absolute;top:-7%;left:38%;height:50%;width:10%;border:0px solid red;text-align:left;"><img src="../../img/foamBox/${statusArray[2] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 2vw;"/></td>
|
|
|
|
<td style="position:absolute;top:-7%;left:52%;height:50%;width:10%;border:0px solid red;text-align:left;"><img src="../../img/foamBox/${statusArray[3] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 2vw;"/></td>
|
|
|
|
<td style="position:absolute;top:-7%;left:75%;height:50%;width:10%;border:0px solid red;text-align:left;"><img src="../../img/foamBox/${statusArray[4] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 2vw;"/></td>
|
|
|
|
<td style="position:absolute;top:-7%;left:93%;height:50%;width:10%;border:0px solid red;text-align:left;"><img src="../../img/foamBox/${statusArray[5] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="width: 2vw;"/></td>
|
|
|
|
</tr>
|
|
|
|
</table>`;
|
|
|
|
|
|
|
|
$(".foamingLineRunStatus table tr").append(info);
|
|
|
|
|
|
|
|
}
|
|
|
|
|