fix: 修改接口调用参数
This commit is contained in:
parent
94e1808ed3
commit
392a023504
|
@ -133,12 +133,12 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!startDate || !endDate) {
|
if (!startDate || !endDate) {
|
||||||
this.$message.warn(`'From' Date And 'To' Date Cannot Be Null`)
|
this.$message.warn(`'From' Date And 'To' Date Cannot Be Null`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(moment(startDate).isAfter(moment(endDate))) {
|
if (moment(startDate).isAfter(moment(endDate))) {
|
||||||
this.$message.warn(`'From' Date Cannot Be Late Than 'To' Date`)
|
this.$message.warn(`'From' Date Cannot Be Late Than 'To' Date`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -148,12 +148,8 @@ export default {
|
||||||
this.ipagination.current = 1
|
this.ipagination.current = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.checkboxGroup) {
|
params.AllUsers = this.allUsersValue
|
||||||
params.checkboxGroup.forEach(item => {
|
|
||||||
params[item] = true
|
|
||||||
})
|
|
||||||
delete params.checkboxGroup
|
delete params.checkboxGroup
|
||||||
}
|
|
||||||
|
|
||||||
this.onClearSelected()
|
this.onClearSelected()
|
||||||
|
|
||||||
|
@ -191,13 +187,11 @@ export default {
|
||||||
|
|
||||||
// 获取台站和探测器列表
|
// 获取台站和探测器列表
|
||||||
async getStationAndDetectorList(value) {
|
async getStationAndDetectorList(value) {
|
||||||
if (!value) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { success, result, message } = await getAction('/spectrumAnalysis/getDBSearchList', {
|
const { success, result, message } = await getAction('/spectrumAnalysis/getDBSearchList', {
|
||||||
menuTypes: value
|
menuTypes: value,
|
||||||
|
dbName: this.queryParam.dbName,
|
||||||
|
AllUsers: this.allUsersValue
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.stationList = result.stationCode.map(item => ({ label: item, value: item }))
|
this.stationList = result.stationCode.map(item => ({ label: item, value: item }))
|
||||||
|
@ -256,6 +250,11 @@ export default {
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
change: event => {
|
change: event => {
|
||||||
|
if (!event) {
|
||||||
|
this.stationList = []
|
||||||
|
this.detectorList = []
|
||||||
|
return
|
||||||
|
}
|
||||||
this.getStationAndDetectorList(event)
|
this.getStationAndDetectorList(event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -389,7 +388,7 @@ export default {
|
||||||
name: 'checkboxGroup',
|
name: 'checkboxGroup',
|
||||||
props: {
|
props: {
|
||||||
options: [
|
options: [
|
||||||
{ label: 'All User', value: 'allUser' },
|
{ label: 'All User', value: 'AllUsers' },
|
||||||
{ label: 'Collect Stop', value: 'CollectStop' },
|
{ label: 'Collect Stop', value: 'CollectStop' },
|
||||||
{ label: 'Acq.Start', value: 'AcqStart' }
|
{ label: 'Acq.Start', value: 'AcqStart' }
|
||||||
]
|
]
|
||||||
|
@ -432,6 +431,21 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
allUsersValue() {
|
||||||
|
const checkboxGroup = this.queryParam.checkboxGroup
|
||||||
|
return !!(checkboxGroup && checkboxGroup.includes('AllUsers'))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// All User 变化时重新获取station 和detector
|
||||||
|
allUsersValue() {
|
||||||
|
if (this.queryParam.menuTypes) {
|
||||||
|
this.stationList = []
|
||||||
|
this.detectorList = []
|
||||||
|
this.getStationAndDetectorList(this.queryParam.menuTypes)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user