fix: 修复一开始没数据,更改条件后有数据也刷不出来的问题

This commit is contained in:
chenjinsong
2022-09-06 11:37:56 +08:00
parent 5be4044b51
commit 39fd6f3e7a
2 changed files with 5 additions and 3 deletions

View File

@@ -99,12 +99,14 @@ export default {
const packetPercent = get(api.npm.overview.packetRetransPercent, params)
this.toggleLoading(true)
Promise.all([tcp, http, ssl, tcpPercent, packetPercent]).then(res => {
this.npmNetworkCycleData = []
res.forEach(t => {
if (t.code === 200) {
this.npmNetworkCycleData.push(t.data.result)
}
})
}).finally(() => {
this.npmNetworkLastCycleQuery()
}).catch(e => {
this.toggleLoading(false)
})
}
@@ -266,7 +268,6 @@ export default {
this.chartData = _.cloneDeep(this.chart)
}
this.npmNetworkCycleQuery()
this.npmNetworkLastCycleQuery()
}
}
</script>