fix: 修复一开始没数据,更改条件后有数据也刷不出来的问题
This commit is contained in:
@@ -136,7 +136,6 @@ export default {
|
|||||||
mixins: [chartMixin],
|
mixins: [chartMixin],
|
||||||
watch: {
|
watch: {
|
||||||
timeFilter: {
|
timeFilter: {
|
||||||
deep: true,
|
|
||||||
handler (n) {
|
handler (n) {
|
||||||
this.init()
|
this.init()
|
||||||
}
|
}
|
||||||
@@ -206,6 +205,8 @@ export default {
|
|||||||
})
|
})
|
||||||
this.tableData = tableData
|
this.tableData = tableData
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.tableData = []
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.toggleLoading(false)
|
this.toggleLoading(false)
|
||||||
|
|||||||
@@ -99,12 +99,14 @@ export default {
|
|||||||
const packetPercent = get(api.npm.overview.packetRetransPercent, params)
|
const packetPercent = get(api.npm.overview.packetRetransPercent, params)
|
||||||
this.toggleLoading(true)
|
this.toggleLoading(true)
|
||||||
Promise.all([tcp, http, ssl, tcpPercent, packetPercent]).then(res => {
|
Promise.all([tcp, http, ssl, tcpPercent, packetPercent]).then(res => {
|
||||||
|
this.npmNetworkCycleData = []
|
||||||
res.forEach(t => {
|
res.forEach(t => {
|
||||||
if (t.code === 200) {
|
if (t.code === 200) {
|
||||||
this.npmNetworkCycleData.push(t.data.result)
|
this.npmNetworkCycleData.push(t.data.result)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).finally(() => {
|
this.npmNetworkLastCycleQuery()
|
||||||
|
}).catch(e => {
|
||||||
this.toggleLoading(false)
|
this.toggleLoading(false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -266,7 +268,6 @@ export default {
|
|||||||
this.chartData = _.cloneDeep(this.chart)
|
this.chartData = _.cloneDeep(this.chart)
|
||||||
}
|
}
|
||||||
this.npmNetworkCycleQuery()
|
this.npmNetworkCycleQuery()
|
||||||
this.npmNetworkLastCycleQuery()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user