From b026d8f8cf0edfdf45e953222675c6d3f3185ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=93=B6=E4=B8=AD=E6=B2=99?= <464652163@qq.com> Date: Mon, 24 Jun 2024 15:53:10 +0800 Subject: [PATCH] 123 --- src/api/infoApi.js | 8 ++++++-- src/components/AddData.vue | 22 +++++++++++----------- src/components/PzSet.vue | 18 +++++++++--------- src/utils/axios.js | 2 +- src/views/Page.vue | 36 ++++++++++++++++++++++++++++++------ 5 files changed, 57 insertions(+), 29 deletions(-) diff --git a/src/api/infoApi.js b/src/api/infoApi.js index d468f7a..634eef5 100644 --- a/src/api/infoApi.js +++ b/src/api/infoApi.js @@ -109,6 +109,10 @@ const infoApi = { delTx(params) { return postPBRequest(`/driver`, params, 54300); }, + // 获取通讯状态 + getTxStatus(params) { + return postPBRequest(`/driver`, params, 54004); + }, // 获取支持的通讯驱动 getTxSupport() { @@ -139,11 +143,11 @@ const infoApi = { // 通讯服务启用,停用 startStatus(params) { - return postPBRequest("/driver", params, 53201); + return postPBRequest("/driver", params, 54202,params.name); }, // 通讯服务停止 stopStatus(params) { - return postPBRequest("/driver", params, 53202); + return postPBRequest("/driver", params, 54203,params.name); }, //保存配置 addPz(params, header) { diff --git a/src/components/AddData.vue b/src/components/AddData.vue index 5272aaf..1fc51b2 100644 --- a/src/components/AddData.vue +++ b/src/components/AddData.vue @@ -270,18 +270,18 @@ export default { }; const driveChange = () => { // 如果是串口协议 - if (props.formData.drive.serial) { - state.serialConfig = true; - state.modbusTCPConfig = false; - // 获取com - getCom(); + // if (props.formData.drive.serial) { + // state.serialConfig = true; + // state.modbusTCPConfig = false; + // // 获取com + // getCom(); - } else { - state.serialConfig = false; - if (props.formData.drive.name == "modbusTCP") { - state.modbusTCPConfig = true; - } - } + // } else { + // state.serialConfig = false; + // if (props.formData.drive.name == "modbusTCP") { + // state.modbusTCPConfig = true; + // } + // } } // 获取com const getCom = async () => { diff --git a/src/components/PzSet.vue b/src/components/PzSet.vue index 2a300e3..50eb78f 100644 --- a/src/components/PzSet.vue +++ b/src/components/PzSet.vue @@ -1,6 +1,6 @@