From 103c57accd1ed76ebc3b891b2221ebbe50031caa Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Tue, 23 Jul 2024 09:07:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=B9=A4=E5=A3=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/parameterSetDialog.vue | 67 +++++++++++++------ 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/src/views/photographicDevice/components/parameterSetDialog.vue b/src/views/photographicDevice/components/parameterSetDialog.vue index fcaab46..e6b7de0 100644 --- a/src/views/photographicDevice/components/parameterSetDialog.vue +++ b/src/views/photographicDevice/components/parameterSetDialog.vue @@ -2167,6 +2167,20 @@ export default { //ip地址解析结束 console.log(this.idParameter); } + if ( + JSON.parse(res.data.data).commandStatus == 255 && + Object.keys(JSON.parse(res.data.data)).length === 1 && + "commandStatus" in JSON.parse(res.data.data) + ) { + this.$message({ + duration: 2000, + showClose: true, + message: "装置收到复位回应包", + type: "success", + }); + return; + } + this.$message({ duration: 1500, showClose: true, @@ -2235,25 +2249,36 @@ export default { type: "warning", }) .then(() => { - resetTerminalApi({ cmId: this.rowData.cmdId || this.rowData.cmdid }) - .then((res) => { - if (res.code == 200) { - this.$message({ - duration: 1500, - showClose: true, - message: "装置已复位", - type: "success", - }); - } else { - this.$message({ - duration: 1500, - showClose: true, - message: res.msg, - type: "error", - }); - } - }) - .catch((err) => {}); + let params = [ + { + name: "act", + value: "reset", + }, + { + name: "mode", + value: 0, + }, + ]; + this.setTermFn(params); + // resetTerminalApi({ cmId: this.rowData.cmdId || this.rowData.cmdid }) + // .then((res) => { + // if (res.code == 200) { + // this.$message({ + // duration: 1500, + // showClose: true, + // message: "装置已复位", + // type: "success", + // }); + // } else { + // this.$message({ + // duration: 1500, + // showClose: true, + // message: res.msg, + // type: "error", + // }); + // } + // }) + // .catch((err) => {}); }) .catch(() => { // this.$message({ @@ -2330,7 +2355,7 @@ export default { this.lookTime = ""; this.showLookTime = false; this.isShow = false; - this.activeName = "1"; + this.activeName = "2"; this.tabsActive = "first"; this.samplingForm = {}; this.deviceTimeForm = {}; @@ -2456,7 +2481,7 @@ export default { } .el-select { .el-input { - width: 316px; + width: 316px !important; } } .el-input {