feat: loading和部分nodata处理;地图功能

This commit is contained in:
chenjinsong
2022-08-21 22:11:53 +08:00
parent c4cf810011
commit ab19220e0d
17 changed files with 257 additions and 162 deletions

View File

@@ -13,14 +13,11 @@ import SingleValue from '@/views/charts2/charts/SingleValue'
import { get } from '@/utils/http'
import { getSecond } from '@/utils/date-util'
import { api } from '@/utils/api'
import chartMixin from '@/views/charts2/chart-mixin'
export default {
name: 'NpmNetworkQuantity',
components: { SingleValue },
props: {
chart: Object,
timeFilter: Object
},
mixins: [chartMixin],
data () {
return {
npmNetworkName: [
@@ -45,12 +42,15 @@ export default {
const ssl = get(api.npm.overview.sslConDelay, params)
const tcpPercent = get(api.npm.overview.tcpLostlenPercent, params)
const packetPercent = get(api.npm.overview.packetRetransPercent, params)
this.toggleLoading(true)
Promise.all([tcp, http, ssl, tcpPercent, packetPercent]).then(res => {
res.forEach(t => {
if (t.code === 200) {
this.npmNetworkCycleData.push(t.data.result)
}
})
}).finally(() => {
this.toggleLoading(false)
})
}