From a2eaa35dea6e4fdcd9337dd7513ddfbb388055fc Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Thu, 28 Oct 2021 09:53:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DlogTab=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2no=20data=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/page/dashboard/explore/exploreItem.vue | 8 +++++++- .../src/components/page/dashboard/explore/logTab.vue | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index c6c3060ea..196ede057 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -133,7 +133,7 @@ - + @@ -325,6 +325,7 @@ export default { data () { return { chartLoading: false, + logTabNoData: false, rightBox: { // 面板弹出框相关 show: false }, @@ -492,6 +493,11 @@ export default { } if (res.length > 0) { const logData = res.map(r => r.data) + if (logData[0].result.length > 0) { + this.logTabNoData = false + } else { + this.logTabNoData = true + } const hasGraph = logData.some(d => d.resultType === 'matrix') const hasLog = logData.some(d => d.resultType === 'streamsFormat') const graphTabIndex = this.showTab.indexOf('1') diff --git a/nezha-fronted/src/components/page/dashboard/explore/logTab.vue b/nezha-fronted/src/components/page/dashboard/explore/logTab.vue index 859273158..0ae4d23cb 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/logTab.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/logTab.vue @@ -83,11 +83,11 @@ @@ -96,7 +96,7 @@ -
No results found2
+
No results found
 
@@ -116,8 +116,8 @@ export default { type: Boolean, default: true }, - loadingExplore: Boolean, loadingBottom: Boolean, + exploreLogTable: Boolean, exploreItem: Boolean }, computed: {