fix: 优化load from db搜索栏station和detector列表逻辑
This commit is contained in:
parent
9d1910e689
commit
2cd1cd9f7d
|
@ -234,7 +234,7 @@ export default {
|
|||
})
|
||||
if (success) {
|
||||
this.stationList = result.stationCode.map((item) => ({ label: item, value: item }))
|
||||
this.detectorList = this.allDetectorList = result.detectorCode.map((item) => ({ label: item, value: item }))
|
||||
this.allDetectorList = result.detectorCode.map((item) => ({ label: item, value: item }))
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
|
@ -360,9 +360,14 @@ export default {
|
|||
},
|
||||
on: {
|
||||
change: (val) => {
|
||||
this.detectorList = this.allDetectorList.filter((item) => {
|
||||
return item.label.includes(val)
|
||||
})
|
||||
if(val) {
|
||||
this.detectorList = this.allDetectorList.filter((item) => {
|
||||
return item.label.includes(val)
|
||||
})
|
||||
} else {
|
||||
this.detectorList = []
|
||||
}
|
||||
this.queryParam.detectorsName = []
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user