fix: 修复logTab页面no data无法正常展示问题
This commit is contained in:
@@ -133,7 +133,7 @@
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item v-if="showTab.indexOf('2') > -1" name="2" title="Logs">
|
||||
<log-tab ref="logDetail" :log-data="logData" :loading-explore="chartLoading" :explore-item="true" :tab-index="tabIndex" @exportLog="exportLog" @limitChange="queryLogData" v-loading="chartLoading"></log-tab>
|
||||
<log-tab ref="logDetail" :log-data="logData" :explore-log-table="logTabNoData" :explore-item="true" :tab-index="tabIndex" @exportLog="exportLog" @limitChange="queryLogData" v-loading="chartLoading"></log-tab>
|
||||
</el-collapse-item>
|
||||
</template>
|
||||
</el-collapse>
|
||||
@@ -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')
|
||||
|
||||
@@ -83,11 +83,11 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template v-if="exploreItem">
|
||||
<div v-if="loadingExplore" class="table-no-data">
|
||||
<div v-if="exploreLogTable" class="table-no-data">
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#nz-icon-no-data-list"></use>
|
||||
</svg>
|
||||
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found1</div>
|
||||
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
||||
</div>
|
||||
<div v-else> </div>
|
||||
</template>
|
||||
@@ -96,7 +96,7 @@
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#nz-icon-no-data-list"></use>
|
||||
</svg>
|
||||
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found2</div>
|
||||
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
||||
</div>
|
||||
<div v-else> </div>
|
||||
</template>
|
||||
@@ -116,8 +116,8 @@ export default {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
loadingExplore: Boolean,
|
||||
loadingBottom: Boolean,
|
||||
exploreLogTable: Boolean,
|
||||
exploreItem: Boolean
|
||||
},
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user