from db 中 sampleType = all 的时候 默认不勾选 sample

This commit is contained in:
任珮宇 2023-11-03 10:03:22 +08:00
parent b81d5a9797
commit dc9664de47

View File

@ -114,7 +114,7 @@ export default {
return { return {
queryParam: { queryParam: {
menuTypes: 'G,B', menuTypes: 'G,B',
sampleType: 'P', sampleType: '',
startDate: moment().add(-7, 'd').format('YYYY-MM-DD'), startDate: moment().add(-7, 'd').format('YYYY-MM-DD'),
endDate: moment().format('YYYY-MM-DD'), endDate: moment().format('YYYY-MM-DD'),
dbName: 'auto', dbName: 'auto',
@ -326,13 +326,19 @@ export default {
] ]
if (event == 'B') { if (event == 'B') {
this.sampleTypeOption = arr_B this.sampleTypeOption = arr_B
this.$nextTick(() => {
this.queryParam.sampleType = 'B' this.queryParam.sampleType = 'B'
})
} else if (event == 'G') { } else if (event == 'G') {
this.sampleTypeOption = arr_G this.sampleTypeOption = arr_G
this.$nextTick(() => {
this.queryParam.sampleType = 'P' this.queryParam.sampleType = 'P'
})
} else { } else {
this.sampleTypeOption = arr_A this.sampleTypeOption = arr_A
this.queryParam.sampleType = 'P' this.$nextTick(() => {
this.queryParam.sampleType = ''
})
} }
this.getStationAndDetectorList(event) this.getStationAndDetectorList(event)
}, },