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'){