zyhh
This commit is contained in:
commit
37df583668
|
|
@ -681,7 +681,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
alert(this.$route.query.id, this.$store.state.type);
|
alert(this.$route.query.id, this.$store.state.type);
|
||||||
console.log(this.user_id, this.$store.state.type);
|
console.log(this.user_id, this.$store.state.type);
|
||||||
// this.GetUserAnswer();
|
this.GetUserAnswer();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -831,46 +831,48 @@ export default {
|
||||||
this.$message.error("操作失败");
|
this.$message.error("操作失败");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// //获取缓存数据
|
//获取缓存数据
|
||||||
// async GetUserAnswer() {
|
async GetUserAnswer() {
|
||||||
// let { data } = await GetUserAnswer({
|
let { data } = await GetUserAnswer({
|
||||||
// // mark: this.$store.state.type,
|
mark: this.$store.state.type,
|
||||||
// // user_id: this.$route.query.id,
|
user_id: this.$route.query.id,
|
||||||
// mark: "GYWZ_wx",
|
// mark: "GYWZ_wx",
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
// });
|
});
|
||||||
// if (data.data && data.state) {
|
if (data.data && data.state) {
|
||||||
// let res = JSON.parse(data.data.mark_value);
|
let res = JSON.parse(data.data.mark_value);
|
||||||
// console.log(res);
|
console.log(res);
|
||||||
// this.clgl_name = res.clgl_name;
|
this.clgl_name = res.clgl_name;
|
||||||
// this.clgl_xy = res.clgl_xy;
|
this.clgl_xy = res.clgl_xy;
|
||||||
// this.clgl_gzms = res.clgl_gzms;
|
this.clgl_gzms = res.clgl_gzms;
|
||||||
// this.clgl_mddk = res.clgl_mddk;
|
this.clgl_mddk = res.clgl_mddk;
|
||||||
// this.clgl_ydx = res.clgl_ydx;
|
this.clgl_ydx = res.clgl_ydx;
|
||||||
// this.clgl_ydk = res.clgl_ydk;
|
this.clgl_ydk = res.clgl_ydk;
|
||||||
// this.clgl_mddk = res.clgl_mddk;
|
this.clgl_mddk = res.clgl_mddk;
|
||||||
// this.clgl_rkwk = res.clgl_rkwk;
|
this.clgl_rkwk = res.clgl_rkwk;
|
||||||
// this.clgl_wdyml = res.clgl_wdyml;
|
this.clgl_wdyml = res.clgl_wdyml;
|
||||||
// this.clgl_ckwk = res.clgl_ckwk;
|
this.clgl_ckwk = res.clgl_ckwk;
|
||||||
// this.wlgl_nw_name = res.wlgl_nw_name;
|
this.wlgl_nw_name = res.wlgl_nw_name;
|
||||||
// this.wlgl_nw_ip = res.wlgl_nw_ip;
|
this.wlgl_nw_ip = res.wlgl_nw_ip;
|
||||||
// this.wlgl_nw_zwym = res.wlgl_nw_zwym;
|
this.wlgl_nw_zwym = res.wlgl_nw_zwym;
|
||||||
// this.wlgl_ww_name = res.wlgl_ww_name;
|
this.wlgl_ww_name = res.wlgl_ww_name;
|
||||||
// this.wlgl_ww_ip = res.wlgl_ww_ip;
|
this.wlgl_ww_ip = res.wlgl_ww_ip;
|
||||||
// this.wlgl_ww_zwym = res.wlgl_ww_zwym;
|
this.wlgl_ww_zwym = res.wlgl_ww_zwym;
|
||||||
// this.dxgl = [].concat(res.dxgl);
|
this.dxgl = [].concat(res.dxgl);
|
||||||
// this.cmdlist_ml = res.cmdlist_ml;
|
this.cmdlist_ml = res.cmdlist_ml;
|
||||||
// this.cmdlist_sbid = res.cmdlist_sbid;
|
this.cmdlist_sbid = res.cmdlist_sbid;
|
||||||
// this.cmdlist_qsdz = res.cmdlist_qsdz;
|
this.cmdlist_qsdz = res.cmdlist_qsdz;
|
||||||
// this.cmdlist_dzcd = res.cmdlist_dzcd;
|
this.cmdlist_dzcd = res.cmdlist_dzcd;
|
||||||
// this.cmdlist_ms = res.cmdlist_ms;
|
this.cmdlist_ms = res.cmdlist_ms;
|
||||||
// this.cmdlist_dz = res.cmdlist_dz;
|
this.cmdlist_dz = res.cmdlist_dz;
|
||||||
// }
|
console.log(res);
|
||||||
// // console.log(this.dxgl);
|
}
|
||||||
// this.dxgl.forEach((item) => {
|
// console.log(this.dxgl);
|
||||||
// this.arr.push(item.dx_name);
|
this.dxgl.forEach((item) => {
|
||||||
// });
|
this.arr.push(item.dx_name);
|
||||||
// },
|
});
|
||||||
|
console.log(this.dxgl);
|
||||||
|
},
|
||||||
//新增命令-保存
|
//新增命令-保存
|
||||||
saveMl() {
|
saveMl() {
|
||||||
this.$refs["ruleForm2"].validate((valid) => {
|
this.$refs["ruleForm2"].validate((valid) => {
|
||||||
|
|
|
||||||
|
|
@ -286,9 +286,9 @@ export default {
|
||||||
clgl_mddk: this.clgl_mddk,
|
clgl_mddk: this.clgl_mddk,
|
||||||
clgl_rkwg: this.clgl_rkwg,
|
clgl_rkwg: this.clgl_rkwg,
|
||||||
clgl_rkwk: this.clgl_rkwk,
|
clgl_rkwk: this.clgl_rkwk,
|
||||||
clgl_rkip: this.clgl_ckip,
|
clgl_rkip: this.clgl_rkip,
|
||||||
clgl_ckwg: this.clgl_ckwg,
|
clgl_ckwg: this.clgl_ckwg,
|
||||||
clgl_ckwk: this.clgl_rkwk,
|
clgl_ckwk: this.clgl_ckwk,
|
||||||
clgl_ckip: this.clgl_ckip,
|
clgl_ckip: this.clgl_ckip,
|
||||||
clgl_wdyml: this.clgl_wdyml,
|
clgl_wdyml: this.clgl_wdyml,
|
||||||
cmdlist_ml: this.cmdlist_ml,
|
cmdlist_ml: this.cmdlist_ml,
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ export default {
|
||||||
dkpz_dbcd: this.ruleForm.dkpz_dbcd,
|
dkpz_dbcd: this.ruleForm.dkpz_dbcd,
|
||||||
dkpz_dbsj: this.ruleForm.dkpz_dbsj,
|
dkpz_dbsj: this.ruleForm.dkpz_dbsj,
|
||||||
dkpz_tbbtl: this.ruleForm.dkpz_tbbtl,
|
dkpz_tbbtl: this.ruleForm.dkpz_tbbtl,
|
||||||
dkpz_snckxtb: this.ruleForm.dkpz_snckxtb,
|
dkpz_snckxtb: Number(this.ruleForm.dkpz_snckxtb),
|
||||||
};
|
};
|
||||||
console.log(obj);
|
console.log(obj);
|
||||||
alert(JSON.stringify(obj));
|
alert(JSON.stringify(obj));
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
|
|
@ -112,12 +116,13 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
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";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue