fix: 修复NetWork OVerview Providers and Applications 时间范围变化后,之前时间范围数据为清除问题

This commit is contained in:
@changcode
2022-11-03 16:01:32 +08:00
parent e1bf796f0c
commit 1cb4c43b9e

View File

@@ -245,6 +245,14 @@ export default {
this.toggleLoading(true)
Promise.all([prevRequest, request]).then(res => {
this.isNoData = (res[0].data.result.length && res[1].data.result.length) === 0
if (this.isNoData) {
this.appData = this.appData.map(t => {
return {
name: t.name,
type: t.type
}
})
}
if (res[0].code === 200 && res[1].code === 200) {
const prevData = res[0].data.result
const data = res[1].data.result