💥 feat(设备详情): 添加设备分组功能
This commit is contained in:
parent
21e898e98d
commit
a33d755034
|
@ -34,7 +34,7 @@
|
|||
<view class="iconfont icon-reload"></view>{{wsStatus?'刷新':'已断连'}}
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="group-list">
|
||||
<view class="group-list">
|
||||
<view class="group-list-label">
|
||||
属性分组:
|
||||
</view>
|
||||
|
@ -45,7 +45,7 @@
|
|||
:clear="false"
|
||||
@change="changeGroup"
|
||||
></uni-data-select>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="attr-list">
|
||||
<view class="attr-list-item" v-for="(item,index) in dataList" :key="index">
|
||||
<!-- 选择器 -->
|
||||
|
@ -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'){
|
||||
|
|
Loading…
Reference in New Issue