fix:实现没后端数据时候展示NO Data

This commit is contained in:
zhangxiaolong
2022-03-11 16:08:52 +08:00
parent 5924b5d050
commit ba02debc3e
2 changed files with 95 additions and 83 deletions

View File

@@ -437,6 +437,7 @@ export default {
),
isTwoSupportStatistics: isTwoSupportStatistics(props.chartInfo.type),
isAlarmInfo: isAlarmInfo(props.chartInfo.type),
}
},
}

View File

@@ -1,5 +1,7 @@
<template>
<div class="cn-chart-alarm-info">
<div class="no-data" v-if="isNoData">No data</div>
<template v-else>
<div class="cn-chart-alarm-info-mainContent">
<div
class="cn-chart-alarm-content"
@@ -24,17 +26,15 @@
></i>
</div>
<div class="cn-alarm-info-textContent">
<div class="cn-alarm-info-main-title" >
<div v-if="value.entityType === 'domain'" :title="value.domain" >
<span >{{
value.domain
}}</span>
<div class="cn-alarm-info-main-title">
<div v-if="value.entityType === 'domain'" :title="value.domain">
<span>{{ value.domain }}</span>
</div>
<div v-if="value.entityType === 'app'" :title="value.appName" >
<span >{{ value.appName }}</span>
<div v-if="value.entityType === 'app'" :title="value.appName">
<span>{{ value.appName }}</span>
</div>
<div v-if="value.entityType === 'ip'" :title="value.serverIp" >
<span >{{ value.serverIp }}</span>
<div v-if="value.entityType === 'ip'" :title="value.serverIp">
<span>{{ value.serverIp }}</span>
</div>
</div>
@@ -101,6 +101,7 @@
v-model:currentPage="pageNo"
@pageJump="pageJump"
></chart-table-pagination>
</template>
</div>
</template>
@@ -127,6 +128,7 @@ export default {
pageNo: 1,
alarmInfoCount: {},
fromChartData: '',
isNoData:false
// result: [
// {
// entityType: 'ip',
@@ -142,6 +144,15 @@ export default {
// ],
}
},
computed: {
isNoData() {
let isNoData = true
if (!this.$_.isEmpty(this.chartData)) {
isNoData = false
}
return isNoData
},
},
watch: {
tabHandleClickType: {
deep: true,