diff --git a/src/views/charts2/charts/npm/NpmAppCategoryScore.vue b/src/views/charts2/charts/npm/NpmAppCategoryScore.vue index 2fa139b1..049e2349 100644 --- a/src/views/charts2/charts/npm/NpmAppCategoryScore.vue +++ b/src/views/charts2/charts/npm/NpmAppCategoryScore.vue @@ -136,7 +136,6 @@ export default { mixins: [chartMixin], watch: { timeFilter: { - deep: true, handler (n) { this.init() } @@ -206,6 +205,8 @@ export default { }) this.tableData = tableData }) + } else { + this.tableData = [] } }).finally(() => { this.toggleLoading(false) diff --git a/src/views/charts2/charts/npm/NpmNetworkQuantity.vue b/src/views/charts2/charts/npm/NpmNetworkQuantity.vue index 42220012..f4cad293 100644 --- a/src/views/charts2/charts/npm/NpmNetworkQuantity.vue +++ b/src/views/charts2/charts/npm/NpmNetworkQuantity.vue @@ -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() } }