diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 521d0edb0..c2775694a 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -263,7 +263,7 @@ -
+
@@ -304,7 +304,7 @@ export default { obj: Object, panelLock: { type: Boolean, default: false }, hasGroup: { type: Boolean, default: true }, - panelDataList: Array, + panelDataList: Array }, components: { @@ -333,7 +333,7 @@ export default { start: '', end: '' }, - panelLoading: false, + chartListNoData: false, extraMarginBottom: 0, // dom额外的margin panelId: '', timer: null, @@ -548,13 +548,20 @@ export default { this.dataTotalListBak.forEach((item) => { item.isLoaded = false item.isHide = false + this.chartListNoData = false chartListTmp.push(item) }) } this.dataTotalList = [...chartListTmp] this.dataList = [...this.dataTotalList] - + let isAllHide = true + this.dataList.map(item => { + if (!item.isHide) { + isAllHide = false + } + }) + this.chartListNoData = isAllHide this.$nextTick(() => { if (this.dataList.length > 0) { this.dataList.forEach((item, index) => { @@ -719,10 +726,10 @@ export default { // chart数据存在dataTotalListBak中 if (response.data.list.length > 0) { this.dataTotalListBak = response.data.list - this.panelLoading = false + this.chartListNoData = false } else { this.dataTotalListBak = response.data - this.panelLoading = true + this.chartListNoData = true } let chartListTmp = [] // 查询条件带name diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/logBottomTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/logBottomTab.vue index abfe66f8e..cff18d55c 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/logBottomTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/logBottomTab.vue @@ -23,8 +23,8 @@ diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index 93655a5c9..8c8374cba 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -32,6 +32,7 @@ :height="mainTableHeight" :now-time="nowTime" :table-data="tableData" + :loading="tools.loading" @del="del" @edit="edit" @showText="showText" diff --git a/nezha-fronted/src/components/page/alert/alertRule.vue b/nezha-fronted/src/components/page/alert/alertRule.vue index 1afafe1dc..d0fcb7e03 100644 --- a/nezha-fronted/src/components/page/alert/alertRule.vue +++ b/nezha-fronted/src/components/page/alert/alertRule.vue @@ -111,6 +111,7 @@
- diff --git a/nezha-fronted/src/components/page/config/system/linkTable.vue b/nezha-fronted/src/components/page/config/system/linkTable.vue index abc351417..c959e9f4c 100644 --- a/nezha-fronted/src/components/page/config/system/linkTable.vue +++ b/nezha-fronted/src/components/page/config/system/linkTable.vue @@ -77,13 +77,14 @@
- diff --git a/nezha-fronted/src/components/page/config/system/notifyMethodTable.vue b/nezha-fronted/src/components/page/config/system/notifyMethodTable.vue index 4a7441d7a..20f128d05 100644 --- a/nezha-fronted/src/components/page/config/system/notifyMethodTable.vue +++ b/nezha-fronted/src/components/page/config/system/notifyMethodTable.vue @@ -87,13 +87,14 @@ - diff --git a/nezha-fronted/src/components/page/config/template/chartTemp.vue b/nezha-fronted/src/components/page/config/template/chartTemp.vue index 181ddef93..67705c48b 100644 --- a/nezha-fronted/src/components/page/config/template/chartTemp.vue +++ b/nezha-fronted/src/components/page/config/template/chartTemp.vue @@ -68,6 +68,7 @@ + -
No Data
+ @@ -98,7 +106,8 @@ export default { showSwitch: { type: Boolean, default: true - } + }, + loading: Boolean }, computed: { tableTimeFormat () { @@ -559,6 +568,14 @@ export default { .log-table{ position: relative; min-height: 200px; + .right-no-data { + position: absolute; + top: 50%; + left: 50%; + margin-top: -35px; + margin-left: -50px; + text-align: center; + } } .log-table .nz-table2 { padding: 10px 0 0 0;