fix: 实体列表吞吐量和展开吞吐量保持保持一致

This commit is contained in:
刘洪洪
2023-07-13 17:40:54 +08:00
parent 4b7a559af7
commit 3823ea3dc4
3 changed files with 13 additions and 4 deletions

View File

@@ -143,7 +143,7 @@
<el-collapse-transition>
<div class="cn-entity__detail-overview" v-if="!isCollapse">
<el-divider></el-divider>
<detail-overview :entity="entityData" :time-filter="timeFilter"/>
<detail-overview :entity="entityData" :time-filter="timeFilter" @reloadEntity="getEntity" />
</div>
</el-collapse-transition>
</div>
@@ -286,6 +286,9 @@ export default {
/* 设为折叠状态 */
collapse () {
this.isCollapse = true
},
getEntity (data) {
this.entityData = { ...data }
}
}
}

View File

@@ -1,13 +1,13 @@
<template>
<div class="entity-detail-overview">
<template v-if="entity.entityType === 'ip'">
<ip-overview :entity="entity" :time-filter="timeFilter"></ip-overview>
<ip-overview :entity="entity" :time-filter="timeFilter" @reloadEntity="getEntity"></ip-overview>
</template>
<template v-else-if="entity.entityType === 'domain'">
<domain-overview :entity="entity" :time-filter="timeFilter"></domain-overview>
<domain-overview :entity="entity" :time-filter="timeFilter" @reloadEntity="getEntity"></domain-overview>
</template>
<template v-else-if="entity.entityType === 'app'">
<app-overview :entity="entity" :time-filter="timeFilter"></app-overview>
<app-overview :entity="entity" :time-filter="timeFilter" @reloadEntity="getEntity"></app-overview>
</template>
</div>
</template>
@@ -28,6 +28,11 @@ export default {
'domain-overview': Domain,
'app-overview': App,
'ip-overview': Ip
},
methods: {
getEntity (data) {
this.$emit('reloadEntity', data)
}
}
}
</script>

View File

@@ -156,6 +156,7 @@ export default {
this.sentChart.setOption(this.chartOptionSent)
this.receivedChart.setOption(this.chartOptionReceived)
this.loadingTraffic = false
this.$emit('reloadEntity', this.entityData)
} else {
this.loadingTraffic = false
}