From a33d7550344dda613fbc53add705182a0092b0a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A3=8E=E8=8A=B1=E4=B8=80=E4=B8=96=E6=9C=88?=
<1149505133@qq.com>
Date: Wed, 3 Jul 2024 22:06:06 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20feat(=E8=AE=BE=E5=A4=87=E8=AF=A6?=
=?UTF-8?q?=E6=83=85):=20=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87=E5=88=86?=
=?UTF-8?q?=E7=BB=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/iots/device/device-detail.vue | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/pages/iots/device/device-detail.vue b/pages/iots/device/device-detail.vue
index 7c4c6a5..38ad871 100644
--- a/pages/iots/device/device-detail.vue
+++ b/pages/iots/device/device-detail.vue
@@ -34,7 +34,7 @@
{{wsStatus?'刷新':'已断连'}}
-->
-
+
@@ -367,7 +367,7 @@
label:'全部',
groupKey:'all',
groupName:'全部',
- ioRelKey:[]
+ groupRel:[]
}],
// 全部设备属性用于属性分组(不变)
dataAllData:[],
@@ -480,7 +480,16 @@
},
// 选择分组
changeGroup(e){
- console.log("选择分组",e)
+ if(e != 0){
+ const identifierMap = new Map();
+ this.dataAllData.forEach(val => {
+ identifierMap.set(val.identifier, val);
+ });
+ const attrArr = this.groupList[e].groupRel.map(item => identifierMap.get(item.ioRelKey));
+ this.dataList = attrArr;
+ }else{
+ this.dataList = this.dataAllData;
+ }
},
getChartData(type,data){
if(type == 'charts_dashboard'){