NEZ-1144 fix: 修复endpoint - logs 有数据,显示 no data

This commit is contained in:
@changcode
2021-11-01 10:18:33 +08:00
parent 0b99acc067
commit 91605a24db
2 changed files with 9 additions and 3 deletions

View File

@@ -31,7 +31,7 @@
</pick-time> </pick-time>
</template> </template>
<template v-slot> <template v-slot>
<log-tab ref="logDetail" v-loading="loading" :loading-bottom="loading" :log-data="logData" :tab-index="9" @exportLog="exportLog" @limitChange="queryLogData"></log-tab> <log-tab ref="logDetail" v-loading="loading" :loading-bottom="endpointLoading" :log-data="logData" :tab-index="9" @exportLog="exportLog" @limitChange="queryLogData"></log-tab>
<!-- <div v-loading="loading" v-if="!logData" style="height: 300px; width: 100%; display: flex; justify-content: center; align-items: center; color: #999;">No Data</div>--> <!-- <div v-loading="loading" v-if="!logData" style="height: 300px; width: 100%; display: flex; justify-content: center; align-items: center; color: #999;">No Data</div>-->
</template> </template>
</nz-bottom-data-list> </nz-bottom-data-list>
@@ -63,7 +63,8 @@ export default {
expressions: [''], expressions: [''],
matchSymbol: '|=', matchSymbol: '|=',
matchContent: '', matchContent: '',
loading: true loading: true,
endpointLoading: false
} }
}, },
methods: { methods: {
@@ -118,6 +119,11 @@ export default {
}) })
axios.all(requestArr).then(res => { axios.all(requestArr).then(res => {
this.logData = res.map(r => r.data) this.logData = res.map(r => r.data)
if (this.logData[0].result.length > 0) {
this.endpointLoading = false
} else {
this.endpointLoading = true
}
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
}) })

View File

@@ -92,7 +92,7 @@
<div v-else>&nbsp;</div> <div v-else>&nbsp;</div>
</template> </template>
<template v-else> <template v-else>
<div v-if="!loadingBottom" class="table-no-data"> <div v-if="loadingBottom" class="table-no-data">
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use> <use xlink:href="#nz-icon-no-data-list"></use>
</svg> </svg>