装表的时候过滤已经选择的互感器

This commit is contained in:
2025-11-17 15:51:41 +08:00
parent 771bacdafa
commit db1adea70a
5 changed files with 81 additions and 30 deletions

View File

@@ -22,6 +22,8 @@ Component({
building: String,
isBack: Boolean,
filterBind: Boolean,
filterData: Array,
filterType: String
},
observers: {
"show,type,filterBind": function(newShow, newType) {
@@ -189,15 +191,21 @@ Component({
})
},
async onSearchCollection() {
const { searchText = "" } = this.data;
const { searchText = "", filterData, filterType } = this.data;
const { code, message, data: parks = [] } = await getCollectionList({keyword: searchText, page: 1, status: 1});
if (code !== OK) {
alertInfo(message)
return
}
let columns = parks;
if (filterType === 'collection') {
columns = columns.filter(item => {
return !filterData.includes(item.id)
})
}
this.setData({
columns: parks?.map(item => `${item.transformerId}-倍率:${item.ratio}-${item.manufacturer}`),
list: parks,
columns: columns?.map(item => `${item.transformerId}-倍率:${item.ratio}-${item.manufacturer}`),
list: columns,
})
},
async onSearchMeter() {