fix: 修复explore页面和log二级bottomBox页面的使用同一组件的条件冲突

This commit is contained in:
@changcode
2021-10-27 10:17:09 +08:00
parent 8e2362a42a
commit 5fa7833656
5 changed files with 34 additions and 16 deletions

View File

@@ -402,7 +402,6 @@ li{
border-radius: 0px !important;
border: none;
border-right: 1px solid rgba(162,162,162,0.50) !important;
border-bottom: 1px solid rgba(162,162,162,0.50) !important;
}
.nz-btn-group .nz-input-group-left input {
border-radius: 4px 0px 0px 4px !important;

View File

@@ -23,7 +23,7 @@
</pick-time>
</template>
<template v-slot>
<log-tab ref="logDetail" v-loading="loading" :loading="loading" :log-data="logData" :tab-index="9" @exportLog="exportLog" @limitChange="queryLogData"></log-tab>
<log-tab ref="logDetail" v-loading="loading" :loading-bottom="loading" :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>-->
</template>
</nz-bottom-data-list>

View File

@@ -110,11 +110,11 @@
<!-- </div>-->
<!-- </el-tooltip>-->
<el-tooltip placement="left" effect="light" :popper-class="'endpointConfigsTips'" v-if="scope.row.configs[0].enable || scope.row.configs[1].enable">
<el-tooltip placement="left" effect="light" :popper-class="'endpointConfigsTips data-column__endpoint'" v-if="scope.row.configs[0].enable || scope.row.configs[1].enable">
<span class="configs-endpoint metrics">[{{scope.row.configs[0].enable ? 'Metrics':''}}{{scope.row.configs[0].enable&&scope.row.configs[1].enable?',':''}}{{scope.row.configs[1].enable ? 'logs' : ''}}]</span>
<div class="endpointConfigsTips" slot="content">
<span class="copy-value-content"> <i class="nz-icon nz-icon-override" @click="copyValue(clConfigs(scope.row))"></i></span>
<pre >{{JSON.stringify(clConfigs(scope.row),null,2)}}</pre>
<pre class="copy-value-content__pre">{{JSON.stringify(clConfigs(scope.row),null,2)}}</pre>
</div>
</el-tooltip>
</template>
@@ -403,14 +403,22 @@ export default {
}
</style>
<style>
.endpointConfigsTips{
height: 200px;
.copy-value-content{
position: absolute;
right: 18px;
top: 5px;
}
.data-column__endpoint {
background: #FFFFFF;
border: 1px solid #E7EAED;
box-shadow: 0 6px 16px 0 rgba(0,0,0,0.08);
border-radius: 3px 3px 3px 3px 0 0;
}
.copy-value-content__pre {
min-width: 150px;
height: 185px;
margin: 10px;
overflow-y: auto;
overflow-x: hidden;
}
.copy-value-content{
position: absolute;
right: 1px;
top: 4px;
}
</style>

View File

@@ -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" :tab-index="tabIndex" @exportLog="exportLog" @limitChange="queryLogData" v-loading="chartLoading"></log-tab>
<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>
</el-collapse-item>
</template>
</el-collapse>

View File

@@ -82,12 +82,21 @@
</template>
</el-table-column>
</el-table>
<template>
<div v-if="!loading" class="table-no-data">
<template v-if="exploreItem">
<div v-if="loadingExplore" 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 found</div>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found1</div>
</div>
<div v-else>&nbsp;</div>
</template>
<template v-else>
<div v-if="!loadingBottom" 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 found2</div>
</div>
<div v-else>&nbsp;</div>
</template>
@@ -107,7 +116,9 @@ export default {
type: Boolean,
default: true
},
loading: Boolean
loadingExplore: Boolean,
loadingBottom: Boolean,
exploreItem: Boolean
},
computed: {
tableTimeFormat () {