fix:修复 实体详情 检测No data提示判断逻辑问题

This commit is contained in:
@changcode
2022-06-10 15:02:24 +08:00
parent 3ecfcd2752
commit e0e55ab9f3
7 changed files with 12 additions and 10 deletions

View File

@@ -30,7 +30,7 @@
/>
</div>
<div class="expand">
<chart-no-data v-if="downDataList.length === 0"></chart-no-data>
<chart-no-data v-if="downDataList.length === 0 && !loadingDown"></chart-no-data>
<div class="expand-cell" v-for="(item, index) in downDataList" :key="index">
<div class="expand-right">
<div class="demo-progress">

View File

@@ -255,6 +255,7 @@
:time-filter="timeFilter"
:chart-info="chartInfo"
:query-params="queryParams"
@chartDetection="chartDetection"
v-else-if="isDetectionSecurity"
@getDetectionData="getDetectionData"
></chart-detection-security>
@@ -264,6 +265,7 @@
:time-filter="timeFilter"
:chart-info="chartInfo"
:query-params="queryParams"
@chartDetection="chartDetection"
v-else-if="isDetectionService"
@getDetectionData="getDetectionData"
></chart-detection-service>
@@ -381,6 +383,7 @@ export default {
},
data () {
return {
activeTab: ''
}
},
props: {
@@ -397,8 +400,7 @@ export default {
table: Object,
timeFilter: Object,
orderPieTable: String,
tabHandleClickType: String,
activeTab: Number
tabHandleClickType: String
},
computed: {
isNoData () {
@@ -451,6 +453,9 @@ export default {
},
query (params) {
this.$emit('query', params)
},
chartDetection(type) {
this.activeTab = type
}
},
setup (props) {

View File

@@ -36,7 +36,6 @@
:loading="loading"
:entity="entity"
:table="table"
:active-tab="activeTab"
:is-fullscreen="isFullscreen"
:order-pie-table="orderPieTable"
:time-filter="timeFilter"
@@ -103,8 +102,7 @@ export default {
timeFilter: Object, // 时间范围
isFullscreen: Boolean,
panelLock: Boolean,
entity: Object,
activeTab: Number
entity: Object
},
data () {
return {

View File

@@ -32,7 +32,6 @@
:chart-info="item"
:time-filter="timeFilter"
:entity="entity"
:active-tab="activeTab"
@groupShow="groupShow"
@showFullscreen="showFullscreen"
></panel-chart>
@@ -57,7 +56,6 @@
:is-fullscreen="true"
:panelLock="panelLock"
:time-filter="timeFilter"
:active-tab="activeTab"
@showFullscreen="showFullscreen"
></panel-chart>
</el-dialog>
@@ -86,7 +84,6 @@ export default {
panelLock: { type: Boolean, default: true },
isGroup: Boolean,
entity: Object,
activeTab: Number,
dataList: Array // 看板中所有图表信息
},
data () {

View File

@@ -1,5 +1,5 @@
<template>
<div v-if="!activeTab && activeTab !== 706 && activeTab !== 707" class="panel-chart__no-data">No data</div>
<div v-if="activeTab !== 709 && activeTab !== 710" class="panel-chart__no-data">No data</div>
<div v-else class="panel-chart__no-data all-clear">
<div class="no-recent-alerts">
<i class="el-icon-circle-check"></i>

View File

@@ -79,6 +79,7 @@ export default {
}
},
mounted () {
this.$emit('chartDetection', this.chartInfo.type)
this.securityCount()
}
}

View File

@@ -77,6 +77,7 @@ export default {
}
},
mounted () {
this.$emit('chartDetection', this.chartInfo.type)
this.securityCount()
}
}