statistics 页面搜索条件添加校验提示
This commit is contained in:
parent
5c73a26d21
commit
e1cdea9222
|
@ -274,7 +274,7 @@ export default {
|
|||
stationIds: [],
|
||||
queryParams: {
|
||||
systemType: undefined,
|
||||
nuclideNames: undefined,
|
||||
nuclideNames: [],
|
||||
dbName: undefined,
|
||||
startDate: moment().subtract(6, 'days').format('YYYY-MM-DD'),
|
||||
endDate: moment().format('YYYY-MM-DD'),
|
||||
|
@ -373,26 +373,51 @@ export default {
|
|||
this.queryParams.endDate = dateString
|
||||
},
|
||||
handleSearch() {
|
||||
this.isDefault = false
|
||||
this.chartInitList = []
|
||||
this.chartLayout = []
|
||||
this.stationIds.forEach((id, index) => {
|
||||
this.chartLayout.push(id)
|
||||
this.$nextTick(() => {
|
||||
let currChartInit = echarts.init(document.getElementById(`chart_${id}`))
|
||||
this.chartInitList.push(currChartInit)
|
||||
let params = {
|
||||
...this.queryParams,
|
||||
stationId: id,
|
||||
}
|
||||
let options = cloneDeep(commonOptions)
|
||||
if (this.queryParams.nuclideNames.length > 0) {
|
||||
this.getChartDate(params, currChartInit, options, id)
|
||||
} else {
|
||||
this.$message.warning(`Please select nuclide!`)
|
||||
}
|
||||
})
|
||||
})
|
||||
if (this.queryParams.systemType) {
|
||||
if (this.stationIds.length > 0) {
|
||||
this.isDefault = false
|
||||
this.stationIds.forEach((id, index) => {
|
||||
this.chartLayout.push(id)
|
||||
this.$nextTick(() => {
|
||||
let currChartInit = echarts.init(document.getElementById(`chart_${id}`))
|
||||
this.chartInitList.push(currChartInit)
|
||||
let params = {
|
||||
...this.queryParams,
|
||||
stationId: id,
|
||||
}
|
||||
let options = cloneDeep(commonOptions)
|
||||
|
||||
if (this.queryParams.nuclideNames.length < 1) {
|
||||
this.$message.warning(`Please select nuclide!`)
|
||||
// this.getChartDate(params, currChartInit, options, id)
|
||||
}
|
||||
if (!this.queryParams.dbName) {
|
||||
this.$message.warning(`Please select Data Source!`)
|
||||
}
|
||||
if (!this.queryParams.startDate) {
|
||||
this.$message.warning(`Please select start Date!`)
|
||||
}
|
||||
if (!this.queryParams.endDate) {
|
||||
this.$message.warning(`Please select end Date!`)
|
||||
}
|
||||
if (
|
||||
this.queryParams.nuclideNames.length > 0 &&
|
||||
this.queryParams.dbName &&
|
||||
this.queryParams.startDate &&
|
||||
this.queryParams.endDate
|
||||
) {
|
||||
this.getChartDate(params, currChartInit, options, id)
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(`Please select stations!`)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(`Please select type!`)
|
||||
}
|
||||
},
|
||||
async getChartDate(params, chart, option, id) {
|
||||
this.spinning = true
|
||||
|
|
Loading…
Reference in New Issue
Block a user