From fbc902aa146f4b4aaccda3ce042e99cffb359e24 Mon Sep 17 00:00:00 2001
From: XieYongHong <18010623010@163.com>
Date: Thu, 1 Jun 2023 11:58:02 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=BC=95=E5=85=A5=E6=96=B9=E5=BC=8F;?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9opc=5Fua=E5=86=99=E5=85=A5=E5=A4=B1=E8=B4=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: 14203、14491、9658、13663、14207、14226、14493
* fix: 修改bug(14733、14793、13672、11767)
* fix: 修改物模型映射样式
* fix: 修改opc_ua写入
* fix: 修改场景联动关系用户名称回显的问题
* fix: 修改查询组件引入方式
* fix: 修改opc_ua写入失败
---
package.json | 2 +-
src/api/data-collect/collector.ts | 3 +
src/components/Layout/FullPage.vue | 11 +-
.../Metadata/MetricsParam/index.vue | 4 +-
src/components/Search/Search.vue | 3 +-
src/views/DataCollect/Channel/Save/index.vue | 6 +-
src/views/DataCollect/Channel/data.ts | 6 +-
src/views/DataCollect/Channel/type.d.ts | 2 +-
.../Collector/Point/Save/SaveOPCUA.vue | 31 ++++-
.../DataCollect/Collector/Point/Scan/Tree.vue | 1 +
.../Collector/Point/Scan/index.vue | 1 +
.../Point/components/WritePoint/index.vue | 53 +++++++-
.../DataCollect/Collector/Tree/index.vue | 30 +++--
.../components/EditDialog.vue | 6 +-
.../Detail/Info/components/Tags/index.vue | 2 +-
.../Product/Detail/MetadataMap/index.vue | 18 ++-
src/views/device/Product/Detail/index.vue | 4 +-
.../Metadata/Base/Edit/BaseForm.vue | 6 +-
.../link/Type/Detail/LocalAddressSelect.vue | 73 +++++++++++
src/views/link/Type/Detail/index.vue | 120 ++++++++++++------
src/views/link/plugin/index.vue | 2 +-
src/views/media/Device/Channel/Save.vue | 2 +
src/views/notice/Template/Detail/index.vue | 1 +
.../action/Notify/VariableDefinitions.vue | 4 +-
.../components/EditPermissionDialog.vue | 5 +-
src/views/system/Department/device/index.vue | 84 +++++++++---
src/views/system/Department/product/index.vue | 82 +++++++++---
src/views/system/Menu/Setting/index.vue | 3 +-
src/views/system/Menu/Setting/utils.ts | 8 +-
.../Role/Detail/components/PermissTree.vue | 1 +
yarn.lock | 8 +-
31 files changed, 449 insertions(+), 133 deletions(-)
create mode 100644 src/views/link/Type/Detail/LocalAddressSelect.vue
diff --git a/package.json b/package.json
index 581ec969..7670fcf5 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
"event-source-polyfill": "^1.0.31",
"global": "^4.4.0",
"jetlinks-store": "^0.0.3",
- "jetlinks-ui-components": "^1.0.18",
+ "jetlinks-ui-components": "^1.0.21",
"js-cookie": "^3.0.1",
"less": "^4.1.3",
"less-loader": "^11.1.0",
diff --git a/src/api/data-collect/collector.ts b/src/api/data-collect/collector.ts
index 8dadd463..191913ce 100644
--- a/src/api/data-collect/collector.ts
+++ b/src/api/data-collect/collector.ts
@@ -55,3 +55,6 @@ export const scanOpcUAList = (data: any) =>
data?.nodeId || ''
}`,
);
+
+export const queryTypeList = () => server.get(`/data-collect/opc/data-types`);
+
diff --git a/src/components/Layout/FullPage.vue b/src/components/Layout/FullPage.vue
index d4f61d7c..39ab0c7a 100644
--- a/src/components/Layout/FullPage.vue
+++ b/src/components/Layout/FullPage.vue
@@ -1,6 +1,8 @@
@@ -12,8 +14,13 @@ const { y } = useElementBounding(fullPage)
-
\ No newline at end of file
diff --git a/src/components/Metadata/MetricsParam/index.vue b/src/components/Metadata/MetricsParam/index.vue
index a830add2..5391cd3f 100644
--- a/src/components/Metadata/MetricsParam/index.vue
+++ b/src/components/Metadata/MetricsParam/index.vue
@@ -114,11 +114,11 @@ const handleAdd = () => {
const validateIndicator = (value: any) => {
if (value?.range) {
- if (!value?.value || !value?.value[0] || !value?.value[1]) {
+ if (!value?.value || (!value?.value[0] && value?.value[0] !== 0) || (!value?.value[1] && value?.value[1] !== 0)) {
return Promise.reject(new Error('请输入指标值'));
}
} else {
- if (!value?.value) {
+ if (!value?.value && value?.value !== 0) {
return Promise.reject(new Error('请输入指标值'));
}
}
diff --git a/src/components/Search/Search.vue b/src/components/Search/Search.vue
index 005db593..021a0d7d 100644
--- a/src/components/Search/Search.vue
+++ b/src/components/Search/Search.vue
@@ -1,5 +1,5 @@
-
();
const id = props.data.id;
const collectorId = props.data.collectorId;
const provider = props.data.provider;
+const options = ref([]);
const formData = ref({
name: '',
@@ -157,6 +161,19 @@ const filterOption = (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};
+onMounted(() => {
+ queryTypeList().then((resp: any) => {
+ if(resp.status === 200){
+ options.value = (resp?.result || []).map((item: any) => {
+ return {
+ label: item,
+ value: item
+ }
+ })
+ }
+ })
+})
+
watch(
() => props.data,
(value) => {
diff --git a/src/views/DataCollect/Collector/Point/Scan/Tree.vue b/src/views/DataCollect/Collector/Point/Scan/Tree.vue
index f506b4a5..f036dfe3 100644
--- a/src/views/DataCollect/Collector/Point/Scan/Tree.vue
+++ b/src/views/DataCollect/Collector/Point/Scan/Tree.vue
@@ -130,6 +130,7 @@ const onCheck = (checkedKeys: any, info: any) => {
value: last ? last?.accessModes?.value : one?.accessModes || [],
check: true,
},
+ type: one?.type,
configuration: {
...one?.configuration,
interval: {
diff --git a/src/views/DataCollect/Collector/Point/Scan/index.vue b/src/views/DataCollect/Collector/Point/Scan/index.vue
index 0509830f..b92cf84e 100644
--- a/src/views/DataCollect/Collector/Point/Scan/index.vue
+++ b/src/views/DataCollect/Collector/Point/Scan/index.vue
@@ -65,6 +65,7 @@ const handleOk = async () => {
pointKey: item.id,
configuration: {
interval: item.configuration?.interval?.value,
+ type: item.type,
},
features: !item.features?.value ? [] : ['changedOnly'],
accessModes: item.accessModes?.value || [],
diff --git a/src/views/DataCollect/Collector/Point/components/WritePoint/index.vue b/src/views/DataCollect/Collector/Point/components/WritePoint/index.vue
index ac56f2bd..e9ec5764 100644
--- a/src/views/DataCollect/Collector/Point/components/WritePoint/index.vue
+++ b/src/views/DataCollect/Collector/Point/components/WritePoint/index.vue
@@ -30,6 +30,57 @@
showCount
/>
+
+
+
+
+
+
+
{
} else if (!!searchValue.value) {
clickSearch = true;
params.value = { ..._.cloneDeep(defualtParams) };
- params.value.terms[1] = {
- terms: [
- {
- column: 'name',
- value: `%${searchValue.value}%`,
- termType: 'like',
- },
- ],
- };
+ // params.value.terms[1] = {
+ // terms: [
+ // {
+ // column: 'name',
+ // value: `%${searchValue.value}%`,
+ // termType: 'like',
+ // },
+ // ],
+ // };
+ params.value.terms = [
+ ...(params.value?.terms || []),
+ {
+ terms: [
+ {
+ column: 'name',
+ value: `%${searchValue.value}%`,
+ termType: 'like',
+ },
+ ],
+ }
+ ];
} else {
!!value && (params.value = value);
}
diff --git a/src/views/account/NotificationSubscription/components/EditDialog.vue b/src/views/account/NotificationSubscription/components/EditDialog.vue
index f164c35f..ae2b02dd 100644
--- a/src/views/account/NotificationSubscription/components/EditDialog.vue
+++ b/src/views/account/NotificationSubscription/components/EditDialog.vue
@@ -46,7 +46,7 @@
:rules="[{ required: true, message: '请选择告警规则' }]"
>
item.label).join(','),
+ alarmConfigId: keys.length ? keys.join(',') : undefined,
+ alarmConfigName: items.length ? items.map((item) => item.label).join(',') : undefined,
};
}
diff --git a/src/views/device/Instance/Detail/Info/components/Tags/index.vue b/src/views/device/Instance/Detail/Info/components/Tags/index.vue
index 4316a707..8fc6b195 100644
--- a/src/views/device/Instance/Detail/Info/components/Tags/index.vue
+++ b/src/views/device/Instance/Detail/Info/components/Tags/index.vue
@@ -53,6 +53,6 @@ const findName = (item: any) => {
const _element = item.dataType.elements?.find((a: any) => a.value === item.value)
name = _element?.text
}
- return name
+ return name || item.value
}
diff --git a/src/views/device/Product/Detail/MetadataMap/index.vue b/src/views/device/Product/Detail/MetadataMap/index.vue
index e6d6bf4a..9b0eb9ee 100644
--- a/src/views/device/Product/Detail/MetadataMap/index.vue
+++ b/src/views/device/Product/Detail/MetadataMap/index.vue
@@ -198,20 +198,24 @@ getDefaultMetadata()