diff --git a/src/components/common/TimeRange/TimeRefresh.vue b/src/components/common/TimeRange/TimeRefresh.vue index d8bb5e6b..3f9ce829 100644 --- a/src/components/common/TimeRange/TimeRefresh.vue +++ b/src/components/common/TimeRange/TimeRefresh.vue @@ -132,8 +132,6 @@ export default { this.$store.commit('setRefreshTime', null) this.$store.commit('setRefreshFlag', false) } - - console.log('查看此时的值=============================') }, showRefreshList () { this.dropdownShow = !this.dropdownShow diff --git a/src/views/charts2/charts/linkMonitor/LinkDirectionGrid.vue b/src/views/charts2/charts/linkMonitor/LinkDirectionGrid.vue index 3aad5f7b..d93fdf47 100644 --- a/src/views/charts2/charts/linkMonitor/LinkDirectionGrid.vue +++ b/src/views/charts2/charts/linkMonitor/LinkDirectionGrid.vue @@ -1,10 +1,10 @@ - + - + @@ -23,7 +23,8 @@ export default { data () { return { gridData: [], - gridData2: [] + gridData2: [], + isNoData: false } }, components: { @@ -37,7 +38,6 @@ export default { } }, mounted () { - this.toggleLoading(false) this.init() }, methods: { @@ -54,6 +54,7 @@ export default { const dataRequest = get(api.linkMonitor.bigramAnalysis, params) const nextHopRequest = get(api.linkMonitor.bigramNextHopAnalysis, params) + this.toggleLoading(true) Promise.all([dataRequest, nextHopRequest]).then(res => { if (res[0].code === 200 && res[1].code === 200) { @@ -62,6 +63,11 @@ export default { // 链路下一跳信息 const nextLinkData = res[1].data.result + this.isNoData = linkData.length === 0 && nextLinkData.length === 0 + if (this.isNoData) { + return + } + // 链路流量数据 const gridData = [] // 链路下一跳数据 @@ -181,7 +187,14 @@ export default { } }) this.gridData2 = gridData2 + } else { + this.isNoData = true } + }).catch(e => { + console.error('====', e) + this.isNoData = true + }).finally(() => { + this.toggleLoading(false) }) }, /** diff --git a/src/views/charts2/charts/linkMonitor/LinkDirectionGrid/PopoverContent.vue b/src/views/charts2/charts/linkMonitor/LinkDirectionGrid/PopoverContent.vue index a98243e1..13ea1d05 100644 --- a/src/views/charts2/charts/linkMonitor/LinkDirectionGrid/PopoverContent.vue +++ b/src/views/charts2/charts/linkMonitor/LinkDirectionGrid/PopoverContent.vue @@ -1,8 +1,11 @@ - + {{ $t('linkMonitor.egressLink') }} & {{ $t('linkMonitor.ingressLink') }} - + + + + @@ -142,10 +145,15 @@