From fd372649252f5f22b7af7bdbcf5f6001b3b3cb3e Mon Sep 17 00:00:00 2001 From: XieYongHong <18010623010@163.com> Date: Fri, 2 Feb 2024 09:56:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9EIEC104=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE;=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=87=87=E9=9B=86=E9=A2=91=E7=8E=87=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?;=E4=BF=AE=E5=A4=8DMODBUS=5FTCP=E6=96=B0=E5=BB=BA=E9=80=9A?= =?UTF-8?q?=E9=81=93=E4=B8=BB=E6=9C=BAIP=E5=92=8C=E7=AB=AF=E5=8F=A3?= =?UTF-8?q?=E6=9C=AA=E4=BF=9D=E5=AD=98=E5=88=B0=E5=90=8E=E7=AB=AF=E7=9A=84?= =?UTF-8?q?bug=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 新增IEC104协议 * fix: 修复自定义采集频率不生效 * fix: bug#21712、21711 * fix: 修复MODBUS_TCP新建通道主机IP和端口未保存到后端的bug * fix: 修复产品“物模型映射”目标属性下拉框无选项的bug * fix: bug#21958 * fix: bug#21338 * fix: bug#21262 * fix: bug#22074 * fix: 场景联动条件修改 --- src/utils/encodeQuery.ts | 8 +- src/views/DataCollect/Channel/Save/index.vue | 2 +- .../Detail/Info/components/Config/index.vue | 33 +++- .../Product/Detail/MetadataMap/index.vue | 17 +- .../components/Metadata/Import/valideta.ts | 3 +- .../link/DashBoard/components/Network.vue | 172 ++++++++++-------- .../Save/components/Terms/ParamsItem.vue | 14 +- 7 files changed, 144 insertions(+), 105 deletions(-) diff --git a/src/utils/encodeQuery.ts b/src/utils/encodeQuery.ts index 464dba7a..67c242a2 100644 --- a/src/utils/encodeQuery.ts +++ b/src/utils/encodeQuery.ts @@ -32,7 +32,7 @@ const handleTermsArr = (queryTerms: any, data: any[], parentKey?: string) => { handleTermsArr(queryTerms, item, `${key}`) } else if (isObject(item)) { handleTermsObject(queryTerms, item, `${key}`) - } else { + } else{ queryTerms[key] = item } }) @@ -40,8 +40,10 @@ const handleTermsArr = (queryTerms: any, data: any[], parentKey?: string) => { const handleTermsObject = (queryTerms: any, data: any, parentKey?: string) => { Object.keys(data).forEach(k => { const key = `${parentKey}.${k}` - console.log(key, data[k], isObject(data[k]), isArray(data[k])) - if (isArray(data[k])) { + console.log(key, data[k], isObject(data[k]), isArray(data[k]),k) + if( k === 'value' && isArray(data[k])){ + queryTerms[key] = data[k].join(',') + }else if (isArray(data[k])) { handleTermsArr(queryTerms, data[k], `${key}`) } else if (isObject(data[k])) { handleTermsObject(queryTerms, data[k], `${key}`) diff --git a/src/views/DataCollect/Channel/Save/index.vue b/src/views/DataCollect/Channel/Save/index.vue index b9cfda66..69c827fd 100644 --- a/src/views/DataCollect/Channel/Save/index.vue +++ b/src/views/DataCollect/Channel/Save/index.vue @@ -249,7 +249,7 @@ const handleOk = async () => { params.configuration={ connect : false } - } else { + } else if (params?.provider === 'iec104') { params.configuration = {} } diff --git a/src/views/device/Instance/Detail/Info/components/Config/index.vue b/src/views/device/Instance/Detail/Info/components/Config/index.vue index 7fd6e1d2..f8951390 100644 --- a/src/views/device/Instance/Detail/Info/components/Config/index.vue +++ b/src/views/device/Instance/Detail/Info/components/Config/index.vue @@ -50,7 +50,7 @@ :key="item.property" >