fix: 下钻表格切换tab时loading不对的问题

This commit is contained in:
chenjinsong
2022-10-11 17:08:25 +08:00
parent f659cf60a3
commit 19206b8144

View File

@@ -303,30 +303,28 @@ export default {
methods: {
/* 参数 extraParams 额外请求参数 */
getChartData (extraParams = {}) {
try {
this.initState()
// const chartParams = this.chart.params
const queryParams = {
...this.handleQueryParams(extraParams),
startTime: getSecond(this.timeFilter.startTime),
endTime: getSecond(this.timeFilter.endTime)
this.initState()
// const chartParams = this.chart.params
const queryParams = {
...this.handleQueryParams(extraParams),
startTime: getSecond(this.timeFilter.startTime),
endTime: getSecond(this.timeFilter.endTime)
}
const requestUrl = this.getCurUrl()
get(requestUrl, queryParams).then(response => {
if (response.code === 200) {
this.chartData = response.data.result
this.initData()
} else {
this.isNoData = true
this.toggleLoading(false)
}
const requestUrl = this.getCurUrl()
get(requestUrl, queryParams).then(response => {
if (response.code === 200) {
this.chartData = response.data.result
this.initData()
} else {
this.isNoData = true
this.toggleLoading(false)
}
})
} catch (e) {
}).catch(e => {
console.error(e)
} finally {
}).finally(() => {
this.changeUrlTabState()
this.toggleLoading(false)
}
})
},
sortable (title) {
const excludeName = ['queriesFromIE']