fix:凌源大屏模拟数据

This commit is contained in:
shijing 2024-07-02 09:57:31 +08:00
parent 9140c41a15
commit f91f0dbb49
1 changed files with 63 additions and 25 deletions

View File

@ -317,8 +317,49 @@ export default {
{ color: "#02f5f2", percentage: 80 },
{ color: "#5cb87a", percentage: 100 },
],
shengliaoData: [0, 0, 0, 0, 0, 0, 0, 0],
shuliaoData: [0, 0, 0, 0, 0, 0, 0, 0],
shengliaoData: {
KH: [
1.081, 0.922, 1.034, 1.079, 1.088, 0.983, 0.917, 1.125,
1.03, 0.995, 1.019, 1.074, 0.925, 0.943, 1.067, 1.048,
0.964, 0.884, 0.947, 1.017, 1.011, 1.022, 0.994, 1.025,
1.031, 1.003, 0.941, 0.982, 1.067, 0.982, 0.987,
],
SM: [
2.18, 2.46, 2.63, 2.34, 2.14, 2.52, 2.41, 2.65, 2.45, 2.5,
2.52, 2.49, 2.49, 2.45, 2.44, 2.38, 2.38, 2.3, 2.65, 2.53,
2.49, 2.41, 2.57, 2.69, 2.64, 2.74, 2.81, 2.38, 2.54, 2.54,
2.38,
],
IM: [
1.67, 1.6, 1.4, 1.41, 1.61, 1.41, 1.53, 1.35, 1.33, 1.35,
1.29, 1.27, 0.61, 0.72, 0.66, 1.14, 1.18, 1.21, 1.48, 1.48,
1.49, 1.45, 1.41, 1.48, 1.35, 1.22, 1.33, 1.68, 1.45, 1.36,
1.49,
],
},
shuliaoData: {
KH: [
0.873, 0.861, 0.873, 0.876, 0.883, 0.882, 0.83, 0.882,
0.913, 0.92, 0.893, 0.93, 0.94, 0.851, 0.87, 0.958, 0.935,
0.886, 0.873, 0.886, 0.939, 0.919, 0.941, 0.948, 0.899,
0.906, 0.914, 0.852, 0.852, 0.923, 0.884,
],
SM: [
2.37, 2.51, 2.66, 2.44, 2.58, 2.54, 2.41, 2.52, 2.41, 2.51,
2.56, 2.49, 2.54, 2.44, 2.6, 2.44, 2.42, 2.46, 2.53, 2.54,
2.53, 2.45, 2.64, 2.64, 2.73, 2.59, 2.79, 2.39, 2.4, 2.6,
2.52,
],
IM: [
1.65, 1.48, 1.43, 1.53, 1.39, 1.41, 1.52, 1.43, 1.4, 1.39,
1.28, 1.31, 0.75, 0.92, 0.83, 1.1, 1.21, 1.18, 1.28, 1.45,
1.51, 1.45, 1.37, 1.35, 1.35, 1.34, 1.31, 1.6, 1.54, 1.37,
1.41,
],
},
KHData: [],
SMData: [],
IMData: [],
factoryName: "",
initialAlpha: -Math.PI / 4.5,
initialBeta: Math.PI / 2,
@ -609,7 +650,9 @@ export default {
}
for (let i = 0; i < days; i++) {
datelist.push(i + 1);
let randomNumber = getRandomNumber(50, 100);
}
for (let i = 0; i < day; i++) {
let randomNumber = getRandomNumber(50, 5000);
tezhongData.push(randomNumber);
}
that.tezhongData = tezhongData;
@ -637,17 +680,25 @@ export default {
that.qualityTimer = setInterval(() => {
let lineDom = document.getElementById("line3");
if (lineDom) {
that.KHData = [];
that.SMData = [];
that.IMData = [];
if (that.deptName == "出磨熟料") {
that.deptName = "入窑生料";
for (let i = 0; i < day; i++) {
that.KHData.push(that.shengliaoData.KH[i]);
that.SMData.push(that.shengliaoData.SM[i]);
that.IMData.push(that.shengliaoData.IM[i]);
}
} else {
that.deptName = "出磨熟料";
for (let i = 0; i < day; i++) {
that.KHData.push(that.shuliaoData.KH[i]);
that.SMData.push(that.shuliaoData.SM[i]);
that.IMData.push(that.shuliaoData.IM[i]);
}
}
let deptData = [];
if (that.deptName == "入窑生料") {
deptData = that.shengliaoData;
} else {
deptData = that.shuliaoData;
}
that.initChart();
}
}, 5000);
// that.timerTime = setInterval(() => {
@ -657,7 +708,6 @@ export default {
// that.proceElec();
// that.dataCollect();
// }, 3600000);
that.initChart();
});
},
methods: {
@ -1622,11 +1672,7 @@ export default {
emphasis: {
focus: "series",
},
data: [
0.5, 0.31, 0.6, 0.1, 0.6, 0.5, 0.4, 0.2, 0.2, 0.64, 0.9,
0.4, 0.32, 0.51, 0.64, 0.91, 0.3, 0.5, 0.32, 0.4, 0.7,
0.8, 0.4, 0.9, 0.56, 0.5, 0.4, 0.32, 0.2, 0.25,
],
data: that.KHData,
},
{
name: "SM",
@ -1644,11 +1690,7 @@ export default {
emphasis: {
focus: "series",
},
data: [
0.9, 0.0, 0.45, 0.65, 0.6, 0.55, 0.4, 1.22, 0.2, 0.4,
0.0, 0.4, 0.32, 0.51, 0.64, 0.92, 0.1, 0.5, 0.32, 0.4,
0.7, 0.8, 1.4, 0.8, 0.0, 1.0, 0.4, 0.32, 0.01, 0.5,
],
data: that.SMData,
},
{
name: "IM",
@ -1666,11 +1708,7 @@ export default {
emphasis: {
focus: "series",
},
data: [
0.5, 1, 0.6, 1.1, 0.6, 0.5, 0.4, 0.2, 0.2, 0.64, 0.9,
0.4, 0.32, 0.51, 0.64, 0.91, 0.83, 0.5, 0.32, 0.4, 0.7,
0.8, 0.4, 0.9, 1.56, 0.5, 0.4, 0.32, 0.2, 0.25,
],
data: that.IMData,
},
];
myChart5.setOption(option5);