This commit is contained in:
lll 2023-11-15 00:49:30 +08:00
parent 862e449704
commit cb6619b1a7
2 changed files with 48 additions and 24 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -36,7 +36,11 @@
<p> <p>
<span>产量数据监控</span> <span>产量数据监控</span>
</p> </p>
<div id="productChart" v-show="clgrade && resultObj.YXDBWG"></div> <div
id="productChart"
style="width: 410px; height: 256px"
v-show="clgrade && resultObj.YXDBWG"
></div>
</div> </div>
<div class="loadChart"> <div class="loadChart">
@ -108,16 +112,17 @@ export default {
zzgrade: "", zzgrade: "",
qxgrade: "", qxgrade: "",
yxgrade: "", yxgrade: "",
wxgrade: "", wxgrade: true,
}; };
}, },
created() { created() {
this.getClGrade(); // this.getClGrade();
this.getJtGrade(); // this.getJtGrade();
this.getZzGrade(); // this.getZzGrade();
this.getQxGrade(); // this.getQxGrade();
this.getYxGrade(); // this.getYxGrade();
this.getWxGrade(); // this.getWxGrade();
// DB线- // DB线-
// DB线- // DB线-
// 线- // 线-
@ -126,6 +131,7 @@ export default {
// 线 - ; // 线 - ;
// 线 - ; // 线 - ;
// 线; // 线;
this.user_id = decodeURIComponent(window.location.href) this.user_id = decodeURIComponent(window.location.href)
.split("?")[1] .split("?")[1]
.split("|")[0]; .split("|")[0];
@ -133,14 +139,6 @@ export default {
this.toObj( this.toObj(
decodeURIComponent(window.location.href).split("?")[1].split("|")[1] decodeURIComponent(window.location.href).split("?")[1].split("|")[1]
); );
this.time = this.$moment().format("HH:mm:ss");
this.productChartOption = productChart;
this.mainshaftChartOption = mainshaftChart;
this.loadChartChartOption = loadChartChart;
this.ratedChartOption = ratedChart;
this.CuttingSpeedChartOption = CuttingSpeedChart;
this.stopChartOption = stopChart;
}, },
methods: { methods: {
// //
@ -181,6 +179,7 @@ export default {
var myChart = echarts.init(document.getElementById(dom), null, { var myChart = echarts.init(document.getElementById(dom), null, {
devicePixelRatio: 10, // 2 devicePixelRatio: 10, // 2
}); });
console.log(option, "option");
option.xAxis.axisLabel.textStyle.fontSize = this.fontSize(10); option.xAxis.axisLabel.textStyle.fontSize = this.fontSize(10);
option.yAxis.axisLabel.textStyle.fontSize = this.fontSize(10); option.yAxis.axisLabel.textStyle.fontSize = this.fontSize(10);
myChart.setOption(option); myChart.setOption(option);
@ -236,23 +235,39 @@ export default {
mark: "CKFWQ_wx", mark: "CKFWQ_wx",
}); });
this.wxgrade = data.data; this.wxgrade = data.data;
this.wxgrade = true;
this.resultObj.SerialServerWX = true;
}, },
}, },
mounted() { mounted() {
this.getLoadEcharts("productChart", this.productChartOption); this.getClGrade();
this.getLoadEcharts("mainshaftChart", this.mainshaftChartOption); this.getJtGrade();
this.getLoadEcharts("loadChart", this.loadChartChartOption); this.getZzGrade();
this.getLoadEcharts("ratedChart", this.ratedChartOption); this.getQxGrade();
this.getLoadEcharts("one", this.CuttingSpeedChartOption); this.getYxGrade();
this.getLoadEcharts("two", this.stopChartOption); this.getWxGrade();
this.$nextTick(() => {
this.getLoadEcharts("productChart", this.productChartOption);
this.getLoadEcharts("mainshaftChart", this.mainshaftChartOption);
this.getLoadEcharts("loadChart", this.loadChartChartOption);
this.getLoadEcharts("ratedChart", this.ratedChartOption);
this.getLoadEcharts("one", this.CuttingSpeedChartOption);
this.getLoadEcharts("two", this.stopChartOption);
});
// //
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.time = this.$moment().format("HH:mm:ss"); this.time = this.$moment().format("HH:mm:ss");
this.data = this.$moment().format("YYYY.MM.DD"); this.data = this.$moment().format("YYYY.MM.DD");
}, 100); }, 100);
},
this.time = this.$moment().format("HH:mm:ss");
this.productChartOption = productChart;
this.mainshaftChartOption = mainshaftChart;
this.loadChartChartOption = loadChartChart;
this.ratedChartOption = ratedChart;
this.CuttingSpeedChartOption = CuttingSpeedChart;
this.stopChartOption = stopChart;
},
beforeDestory() { beforeDestory() {
// //
clearInterval(this.timer); clearInterval(this.timer);
@ -268,6 +283,15 @@ export default {
font-family: myFont; font-family: myFont;
src: url("../assets/fonts/YouSheBiaoTiHei-2.ttf"); src: url("../assets/fonts/YouSheBiaoTiHei-2.ttf");
} }
#one,
#two,
#mainshaftChart,
#loadChart,
#productChart,
#ratedChart {
width: 410px;
height: 256px;
}
.container { .container {
font-family: "SourceHanSansSC-regular"; font-family: "SourceHanSansSC-regular";