feat: loading和部分nodata处理;地图功能
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user