diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue b/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue index c71f23d..19db76c 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue @@ -197,14 +197,14 @@ export default { activeName: "1", //选项卡 accesslist: [], //通道选择器 colorlist: [ - { - name: "黑白", - id: 0, - }, { name: "彩色", id: 1, }, + { + name: "黑白", + id: 0, + }, ], //色彩选择器 ratiolist: [], //图像分辨率 selaccess: "", //选中的通道 diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue b/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue index ea8de9d..f581dc6 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue @@ -33,7 +33,11 @@ -->
- +
- +
- 查询 + 查询
@@ -146,21 +152,21 @@
- + - + - + - 设置 + 设置
@@ -170,34 +176,34 @@
- +
- 查询 + 查询
@@ -205,24 +211,24 @@
- + - + - 设置 + 设置
@@ -232,13 +238,13 @@
- +
- +
@@ -377,7 +383,18 @@ export default { { required: true, message: "请输入心跳周期", trigger: "blur" }, ], }, - + //上位机信息 + upperComputer: { + ip: "", + port: "", + domain: "", + }, + //id参数 + idParameter: { + newcmdid: "", + compid: "", + orgid: "", + }, runStatusForm: {}, gpsForm: {}, //gps位置 tabsActive: "first", @@ -410,97 +427,270 @@ export default { searchTime() {}, //装置时间设置 setTime() {}, - //重置数据 - handleClick() { + //采样参数重置数据 + samphandleClick() { this.samplingForm = {}; }, + //上位机重置数据 + uphandleClick() { + this.upperComputer = {}; + }, + //id重置数据 + idhandleClick() { + this.idParameter = {}; + }, //采样参数查询 // -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] samplingSearch() { - let params = [ - { - name: "act", - value: "sampling", - }, - { - name: "flag", - value: 0, - }, - { - name: "rf", - value: 15, - }, - { - name: "reqtype", - value: "0xA4", - }, - { - name: "maintime", - value: "", - }, - { - name: "samplecount", - value: "", - }, - { - name: "samplingfreq", - value: "", - }, - { - name: "heartbeat", - value: "", - }, - ]; - this.setTermFn(params); + if (this.rowData.isonline) { + let params = [ + { + name: "act", + value: "sampling", + }, + { + name: "flag", + value: 0, + }, + { + name: "rf", + value: 15, + }, + { + name: "reqtype", + value: "0xA4", + }, + { + name: "maintime", + value: "", + }, + { + name: "samplecount", + value: "", + }, + { + name: "samplingfreq", + value: "", + }, + { + name: "heartbeat", + value: "", + }, + ]; + this.setTermFn(params); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } }, + //设置采样查询 samplingSet() { - this.$refs.samplingFormref.validate((valid) => { - if (valid) { - console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); - console.log(this.samplingForm); - console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); - let params = [ - { - name: "act", - value: "sampling", - }, - { - name: "flag", - value: 1, - }, - { - name: "rf", - value: 15, - }, - { - name: "reqtype", - value: "0xA4", - }, - { - name: "maintime", - value: this.samplingForm.mainTime, - }, - { - name: "samplecount", - value: this.samplingForm.sampleCount, - }, - { - name: "samplingfreq", - value: this.samplingForm.sampleFrequency, - }, - { - name: "heartbeat", - value: this.samplingForm.heartbeatTime, - }, - ]; - this.setTermFn(params); - } else { - console.log("error submit!!"); - return false; - } - }); + if (this.rowData.isonline) { + this.$refs.samplingFormref.validate((valid) => { + if (valid) { + console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); + console.log(this.samplingForm); + console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); + let params = [ + { + name: "act", + value: "sampling", + }, + { + name: "flag", + value: 1, + }, + { + name: "rf", + value: 15, + }, + { + name: "reqtype", + value: "0xA4", + }, + { + name: "maintime", + value: this.samplingForm.mainTime, + }, + { + name: "samplecount", + value: this.samplingForm.sampleCount, + }, + { + name: "samplingfreq", + value: this.samplingForm.sampleFrequency, + }, + { + name: "heartbeat", + value: this.samplingForm.heartbeatTime, + }, + ]; + this.setTermFn(params); + } else { + console.log("error submit!!"); + return false; + } + }); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } + }, + //上位机查询 + //--act=cma [0xA7] --flag=[Request Set Flag, default is set=1, 0: request] --ip=[IP Address] --cmaport=[CMA Port] --domain=[Domain] + upperSearch() { + if (this.rowData.isonline) { + let params = [ + { + name: "act", + value: "cma", + }, + { + name: "flag", + value: 0, + }, + + { + name: "ip", + value: "", + }, + { + name: "cmaport", + value: "", + }, + { + name: "domain", + value: "", + }, + ]; + this.setTermFn(params); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } + }, + //上位机设置 + upperSet() { + if (this.rowData.isonline) { + let params = [ + { + name: "act", + value: "cma", + }, + { + name: "flag", + value: 1, + }, + + { + name: "ip", + value: this.upperComputer.ip, + }, + { + name: "cmaport", + value: this.upperComputer.port, + }, + { + name: "domain", + value: this.upperComputer.domain, + }, + ]; + this.setTermFn(params); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } + }, + //id参数查询 + // --act=termid [0xAC] --flag=[Request Set Flag, default is set=1, 0: request] --newcmdid=[New CMD ID] --compid=[Component Id] --orgid=[Original Id] + idSearch() { + if (this.rowData.isonline) { + let params = [ + { + name: "act", + value: "termid", + }, + { + name: "flag", + value: 0, + }, + + { + name: "newcmdid", + value: "", + }, + { + name: "compid", + value: "", + }, + { + name: "orgid", + value: "", + }, + ]; + this.setTermFn(params); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } + }, + //id参数设置 + idSet() { + if (this.rowData.isonline) { + let params = [ + { + name: "act", + value: "termid", + }, + { + name: "flag", + value: 1, + }, + { + name: "newcmdid", + value: this.idParameter.newcmdid, + }, + { + name: "compid", + value: this.idParameter.compid, + }, + { + name: "orgid", + value: this.idParameter.orgid, + }, + ]; + this.setTermFn(params); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } }, //装置状态报 + //--act=runningstatus [0xEA] --cmdid=[CMD_ID] runstatusSearch() { let params = [ { @@ -534,6 +724,8 @@ export default { // && res.data.result == 255 console.log(JSON.parse(res.data.data)); this.samplingForm = JSON.parse(res.data.data); + this.upperComputer = JSON.parse(res.data.data); + this.idParameter = JSON.parse(res.data.data); this.i = 0; this.$message({ duration: 1500,