From 92873456abefbf24d63e49f488eb184c9fd1ad98 Mon Sep 17 00:00:00 2001 From: Hermes CI Fix Date: Thu, 3 Sep 2026 17:52:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(zone):=20=E4=B8=89=E5=8C=BA=E6=A0=87?= =?UTF-8?q?=E8=AE=B0M3=E2=80=94=E2=80=94=E6=96=B0=E5=A2=9EBotSourceTag?= =?UTF-8?q?=E7=BB=84=E4=BB=B6(=E6=9C=80=E8=BF=91Bot=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=E9=97=B4/=E6=9D=A5=E6=BA=90/=E6=89=B9=E6=AC=A1,?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E9=9A=90=E8=97=8F)=EF=BC=8C=E6=8E=A5?= =?UTF-8?q?=E5=85=A5/kpis/:id=E3=80=81/bot-kpis=E3=80=81/alerts=E4=B8=89?= =?UTF-8?q?=E9=A1=B5=20(three-zone=20P0-=E2=91=A0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/BotSourceTag.vue | 45 ++++++++++++++++++++++++ frontend/src/views/AlertList.vue | 12 +++++++ frontend/src/views/BotKpiDashboard.vue | 14 ++++++++ frontend/src/views/KPIDetail.vue | 13 ++++++- 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/BotSourceTag.vue diff --git a/frontend/src/components/BotSourceTag.vue b/frontend/src/components/BotSourceTag.vue new file mode 100644 index 00000000..6b7bb599 --- /dev/null +++ b/frontend/src/components/BotSourceTag.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/frontend/src/views/AlertList.vue b/frontend/src/views/AlertList.vue index 77f4fb37..02d91163 100644 --- a/frontend/src/views/AlertList.vue +++ b/frontend/src/views/AlertList.vue @@ -9,6 +9,10 @@ +
+ +
+
@@ -342,6 +346,7 @@ import { ref, computed, onMounted } from 'vue' import { useRoute } from 'vue-router' import { ElMessage, ElMessageBox } from 'element-plus' import { alertApi, userApi, actionPlanApi, kpiApi, alertRulesApi } from '../api/index' +import BotSourceTag from '../components/BotSourceTag.vue' import RiskCell from '../components/charts/RiskCell.vue' const route = useRoute() @@ -398,6 +403,13 @@ function isTrendAlert(msg: string): boolean { return msg?.startsWith('[趋势') || msg?.startsWith('[动态') } +// ── C区标注:预警数据由预警引擎(定时规则)自动生成,展示最近生成时间(无预警行则不显示) ── +const latestAlertTime = computed(() => { + const times = alerts.value.map((a: any) => a.created_at || '').filter(Boolean) + if (!times.length) return '' + return formatTime(times.sort((x: string, y: string) => y.localeCompare(x))[0]) +}) + function formatTime(t: string): string { if (!t) return '-' try { return new Date(t).toLocaleString('zh-CN', { hour12: false }) } catch { return t } diff --git a/frontend/src/views/BotKpiDashboard.vue b/frontend/src/views/BotKpiDashboard.vue index 815d046b..ce2ea49e 100644 --- a/frontend/src/views/BotKpiDashboard.vue +++ b/frontend/src/views/BotKpiDashboard.vue @@ -7,6 +7,7 @@ 2026年7月
+ 刷新
@@ -163,6 +164,7 @@