SampleType切换的时候应该修改sample下拉框对对应的内容,默认选择第一个

This commit is contained in:
任珮宇 2023-11-02 10:17:52 +08:00
parent ffb78dc975
commit 2196ded56c

View File

@ -114,6 +114,7 @@ export default {
return { return {
queryParam: { queryParam: {
menuTypes: 'G,B', menuTypes: 'G,B',
sampleType: 'P',
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',
@ -323,7 +324,16 @@ export default {
value: 'G', value: 'G',
}, },
] ]
this.sampleTypeOption = event == 'B' ? arr_B : event == 'G' ? arr_G : arr_A if (event == 'B') {
this.sampleTypeOption = arr_B
this.queryParam.sampleType = 'B'
} else if (event == 'G') {
this.sampleTypeOption = arr_G
this.queryParam.sampleType = 'P'
} else {
this.sampleTypeOption = arr_A
this.queryParam.sampleType = 'P'
}
this.getStationAndDetectorList(event) this.getStationAndDetectorList(event)
}, },
}, },