From 1b8168786e589162856f64149c9da17fe7b78c4a Mon Sep 17 00:00:00 2001
From: XieYongHong <18010623010@163.com>
Date: Sat, 15 Jul 2023 19:04:26 +0800
Subject: [PATCH] fix: bug#16325
---
src/views/edge/Resource/index.vue | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/src/views/edge/Resource/index.vue b/src/views/edge/Resource/index.vue
index 5953f4b6..09ef1737 100644
--- a/src/views/edge/Resource/index.vue
+++ b/src/views/edge/Resource/index.vue
@@ -44,10 +44,7 @@
通讯协议
{{
- options.find(
- (i) =>
- i.value === slotProps.category,
- )?.label || slotProps.category
+ slotProps.category
}}
@@ -97,8 +94,7 @@
{{
- options.find((i) => i.value === slotProps.category)
- ?.label || slotProps.category
+ slotProps.category
}}
@@ -173,14 +169,6 @@ const statusMap = new Map();
statusMap.set('enabled', 'processing');
statusMap.set('disabled', 'error');
-const options = [
- { label: 'UA接入', value: 'OPC_UA' },
- { label: 'Modbus TCP接入', value: 'MODBUS_TCP' },
- { label: 'S7-200接入', value: 'snap7' },
- { label: 'BACnet接入', value: 'BACNetIp' },
- { label: 'MODBUS_RTU接入', value: 'MODBUS_RTU' },
-];
-
const params = ref>({});
const edgeResourceRef = ref>({});
const settingVisible = ref(false);
@@ -218,9 +206,8 @@ const columns = [
}).then((resp: any) => {
const arrMap = new Map()
resp.result.data.forEach((item: any) => {
- const labelItem = options.find(a => a.value === item.category)
arrMap.set(item.category, {
- label: labelItem?.label || item.category,
+ label: item.category,
value: item.category,
})
})