fix: 修复detection详情时间轴点击时,红点一直显示最后一个的问题

This commit is contained in:
刘洪洪
2024-08-30 14:06:46 +08:00
parent 611ac4638b
commit 78b6fb4ecd
3 changed files with 3 additions and 3 deletions

View File

@@ -97,7 +97,7 @@
<div class="overview__title overview__title__margin">{{ $t('detection.timeOfOccurrences') }}</div>
<div class="overview__row">
<div class="row__content1">
<events-timeline :timeFilter="timeFilter" :timeData="timeData" @change="changeTimeline"></events-timeline>
<events-timeline :timeFilter="timeFilter" :timeData="timeData" :activeIndex="activeIndex" @change="changeTimeline"></events-timeline>
</div>
</div>
</div>

View File

@@ -78,7 +78,7 @@
<div class="overview__title overview__title__margin">{{ $t('detection.timeOfOccurrences') }}</div>
<div class="overview__row">
<div class="row__content1">
<events-timeline :timeFilter="timeFilter" :timeData="timeData" @change="changeTimeline"></events-timeline>
<events-timeline :timeFilter="timeFilter" :timeData="timeData" :activeIndex="activeIndex" @change="changeTimeline"></events-timeline>
</div>
</div>
</div>

View File

@@ -161,10 +161,10 @@ export default {
if (res.status === 200) {
const data = res.data.data.result
if (data && data.length > 0) {
this.activeIndex = e.index
if (this.detection.ruleType === detectionRuleType.threshold.key) {
this.handleMapColor(data)
this.$nextTick(() => {
this.activeIndex = e.index
this.handleLineChart(data)
})
}