From 94a2a2c5ec0ba8d6c55dca96af1818ea6c5c2e83 Mon Sep 17 00:00:00 2001 From: XieYongHong <18010623010@163.com> Date: Thu, 27 Jul 2023 14:49:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug#16782;=E4=BF=AE=E6=94=B9=E6=95=B0?= =?UTF-8?q?=E9=87=87=E5=80=BC=E4=B8=BACOLLECTOR=5FGATEWAY;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/consts.ts | 2 +- src/views/DataCollect/Channel/Save/index.vue | 4 ++-- .../Collector/Point/Save/SaveModBus.vue | 8 ++++---- src/views/DataCollect/Collector/Point/index.vue | 2 +- .../DataCollect/Collector/Tree/Save/index.vue | 16 ++++++++-------- .../Detail/components/EditTable/PatchMapping.vue | 12 ++++++------ vite.config.ts | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/utils/consts.ts b/src/utils/consts.ts index d4404334..555c55ef 100644 --- a/src/utils/consts.ts +++ b/src/utils/consts.ts @@ -55,5 +55,5 @@ export const USER_CENTER_MENU_BUTTON_CODE = 'user-center-passwd-update' export const protocolList = [ { label: 'OPC-UA', value: 'OPC_UA', alias: 'opc-ua' }, { label: 'Modbus/TCP', value: 'MODBUS_TCP', alias: 'modbus-tcp' }, - { label: 'GATEWAY', value: 'GATEWAY', alias: 'collector-gateway' }, + { label: 'GATEWAY', value: 'COLLECTOR_GATEWAY', alias: 'collector-gateway' }, ] diff --git a/src/views/DataCollect/Channel/Save/index.vue b/src/views/DataCollect/Channel/Save/index.vue index 545281c8..cfccd740 100644 --- a/src/views/DataCollect/Channel/Save/index.vue +++ b/src/views/DataCollect/Channel/Save/index.vue @@ -93,7 +93,7 @@ /> (cloneDeep(FormState)); const handleOk = async () => { const params: any = await formRef.value?.validate(); - if (params?.provider === 'GATEWAY') { + if (params?.provider === 'COLLECTOR_GATEWAY') { params.configuration.deviceName = formData.value.configuration.deviceName } diff --git a/src/views/DataCollect/Collector/Point/Save/SaveModBus.vue b/src/views/DataCollect/Collector/Point/Save/SaveModBus.vue index 9d40ba15..20beddc7 100644 --- a/src/views/DataCollect/Collector/Point/Save/SaveModBus.vue +++ b/src/views/DataCollect/Collector/Point/Save/SaveModBus.vue @@ -347,7 +347,7 @@ const handleOk = async () => { address: data?.pointKey, }; - if (props.data.provider === 'GATEWAY') { + if (props.data.provider === 'COLLECTOR_GATEWAY') { const configuration = cloneDeep(params.configuration) params.configuration = { configuration: configuration, @@ -447,12 +447,12 @@ watch( watch( () => props.data, (value) => { - if (value.id && ['MODBUS_TCP', 'GATEWAY'].includes(value.provider)) { + if (value.id && ['MODBUS_TCP', 'COLLECTOR_GATEWAY'].includes(value.provider)) { const _value: any = cloneDeep(value); const { writeByteCount, byteCount } = - props.data.provider === 'GATEWAY' ? _value.configuration.configuration.parameter: _value.configuration.parameter; + props.data.provider === 'COLLECTOR_GATEWAY' ? _value.configuration.configuration.parameter: _value.configuration.parameter; - if (props.data.provider === 'GATEWAY') { + if (props.data.provider === 'COLLECTOR_GATEWAY') { formData.value = { ...omit(_value, ['configuration']), ..._value.configuration, diff --git a/src/views/DataCollect/Collector/Point/index.vue b/src/views/DataCollect/Collector/Point/index.vue index e05c3d0a..28a3b1c6 100644 --- a/src/views/DataCollect/Collector/Point/index.vue +++ b/src/views/DataCollect/Collector/Point/index.vue @@ -20,7 +20,7 @@