From 82f60a0fa9a1dbb644de6abfa13aef23605fc0c8 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Mon, 25 Sep 2023 10:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0osd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/parameterSetDialog.vue | 193 +++++++++++++----- 1 file changed, 141 insertions(+), 52 deletions(-) diff --git a/src/views/photographicDevice/components/parameterSetDialog.vue b/src/views/photographicDevice/components/parameterSetDialog.vue index 082490c..1059a55 100644 --- a/src/views/photographicDevice/components/parameterSetDialog.vue +++ b/src/views/photographicDevice/components/parameterSetDialog.vue @@ -401,7 +401,7 @@
- +
@@ -434,48 +434,39 @@ label-position="right" label-width="124px" > - - - - + - + - + @@ -523,46 +514,32 @@ label-position="right" label-width="124px" > - - - - - + + - - + + - + @@ -786,8 +763,26 @@ export default { waterForm: {}, //osd参数 osdParams: {}, - textlist: [], - timelist: [], + textlist: [ + { + name: "显示", + id: 1, + }, + { + name: "不显示", + id: 0, + }, + ], + timelist: [ + { + name: "显示", + id: 1, + }, + { + name: "不显示", + id: 0, + }, + ], osdLoading: false, osdSetLoading: false, accesslist: [], //通道选择器 @@ -851,23 +846,30 @@ export default { //采样参数重置数据 samphandleClick() { this.samplingForm = {}; + clearInterval(this.timer); this.i = 0; this.timer = null; - clearInterval(this.timer); }, //上位机重置数据 uphandleClick() { this.upperComputer = {}; + clearInterval(this.timer); this.i = 0; this.timer = null; - clearInterval(this.timer); }, //id重置数据 idhandleClick() { this.idParameter = {}; + clearInterval(this.timer); this.i = 0; this.timer = null; + }, + //osd重置 + osdhandleClick() { + this.osdParams = {}; clearInterval(this.timer); + this.i = 0; + this.timer = null; }, //采样参数查询 // -act=sampling [0xA4 ] --flag=[Request Set Flag, default is set=1, 0: request] --rf=[Request Flag] --reqtype=[Request Type] --maintime=[Main Time] --samplecount=[Sample Count] --samplingfreq=[Sample Frequency] --heartbeat=[Heartbeat Time] @@ -1184,7 +1186,7 @@ export default { }, { name: "flag", - value: 1, + value: 0, }, { @@ -1213,10 +1215,9 @@ export default { waterhandleClick() { this.waterForm = {}; this.channelId = 1; - + clearInterval(this.timer); this.i = 0; this.timer = null; - clearInterval(this.timer); }, clearform() { console.log("清除其他数据"); @@ -1225,8 +1226,86 @@ export default { this.waterSetLoading = false; }, //查询设置osd - osdSearch() {}, - osdSet() {}, + osdSearch() { + if (this.rowData.isonline || this.rowData.onlinestatus === 1) { + this.osdLoading = true; + let params = [ + { + name: "act", + value: "osd", + }, + { + name: "flag", + value: 0, + }, + + { + name: "channel", + value: this.channelId, + }, + { + name: "showTime", + value: "", + }, + { + name: "showText", + value: "", + }, + { + name: "text", + value: "", + }, + ]; + this.setTermFn(params); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } + }, + osdSet() { + if (this.rowData.isonline || this.rowData.onlinestatus === 1) { + this.osdSetLoading = true; + let params = [ + { + name: "act", + value: "osd", + }, + { + name: "flag", + value: 1, + }, + + { + name: "channel", + value: this.channelId, + }, + { + name: "showTime", + value: this.osdParams.showTime, + }, + { + name: "showText", + value: this.osdParams.showText, + }, + { + name: "text", + value: this.osdParams.textContent, + }, + ]; + this.setTermFn(params); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } + }, //装置状态报 //--act=runningstatus [0xEA] --cmdid=[CMD_ID] runstatusSearch() { @@ -1288,6 +1367,8 @@ export default { this.statusLoading = false; this.waterLoading = false; this.waterSetLoading = false; + this.osdLoading = false; + this.osdSetLoading = false; console.log("终止轮询"); // && res.data.result == 255 console.log(JSON.parse(res.data.data)); @@ -1297,6 +1378,7 @@ export default { //修改cmdid this.idParameter = JSON.parse(res.data.data); this.waterForm = JSON.parse(res.data.data); + this.osdParams = JSON.parse(res.data.data); console.log(this.tabName); if (this.tabName == "上位机信息") { let hexArray = this.upperComputer.ip @@ -1339,6 +1421,8 @@ export default { this.statusLoading = false; this.waterLoading = false; this.waterSetLoading = false; + this.osdLoading = false; + this.osdSetLoading = false; } }) .catch((err) => {}); @@ -1418,11 +1502,13 @@ export default { this.idParameter = {}; this.gpsForm = {}; this.waterForm = {}; + this.osdParams = {}; this.channelId = 1; this.i = 0; clearInterval(this.timer); this.timer = null; - + this.osdLoading = false; + this.osdSetLoading = false; this.sampLoading = false; this.sampSetLoading = false; this.upperLoading = false; @@ -1521,6 +1607,9 @@ export default { padding: 0 12px 0 0; } } + .el-textarea .el-textarea__inner { + font-family: none; + } } } }