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 @@