装表的时候过滤已经选择的互感器
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user