From d89a5ab777d3df6248e46bce0d5bfe93ba13345e Mon Sep 17 00:00:00 2001 From: Hermes CI Fix Date: Thu, 3 Sep 2026 18:08:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20M3=20AI=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E9=BB=98=E8=AE=A4=E6=9C=AA=E5=BA=94=E7=94=A8?= =?UTF-8?q?+=E7=B1=BB=E5=9E=8B=E8=BF=87=E6=BB=A4+Bot=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=20(P0-=E2=91=A1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 待批列表默认 status=unapplied(高危建议=人拍板入口) - 新增 suggestion_type 过滤(全部/kpi_target/budget_adjust/action_plan) - sourceLabel 补 bot: 'Bot建议' --- frontend/src/views/SuggestionCenter.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/SuggestionCenter.vue b/frontend/src/views/SuggestionCenter.vue index e9f111b8..7891c49b 100644 --- a/frontend/src/views/SuggestionCenter.vue +++ b/frontend/src/views/SuggestionCenter.vue @@ -3,6 +3,12 @@

🤖 AI决策建议中心

+ + 全部类型 + 改KPI目标 + 调预算 + 建行动方案 + 全部 未应用 @@ -112,7 +118,9 @@ import { ref, onMounted } from 'vue' import { ElMessage } from 'element-plus' import { aiSuggestionApi } from '../api/index' -const statusFilter = ref('') +// 待批列表默认"未应用"(高危建议=人拍板入口,应用过的历史不占首屏);类型过滤支持高危两类+行动方案 +const statusFilter = ref('unapplied') +const typeFilter = ref('') const items = ref([]) const loading = ref(false) const showApplyDialog = ref(false) @@ -126,7 +134,7 @@ const sugTypeLabel = (t: string) => ({ kpi_target: '改KPI目标', budget_adjust const sugTagType = (t: string) => ({ kpi_target: 'warning', budget_adjust: 'danger', action_plan: 'primary' }[t] || 'info') const statusLabel = (s: string) => ({ unapplied: '未应用', applied: '已应用', dismissed: '已忽略' }[s] || s) const statusTagType = (s: string) => ({ unapplied: 'info', applied: 'success', dismissed: 'info' }[s] || 'info') -const sourceLabel = (s: string) => ({ dashboard: '看板分析', kpi: 'KPI分析', budget: '预算分析', manual: '手动', rule: '规则' }[s] || s) +const sourceLabel = (s: string) => ({ dashboard: '看板分析', kpi: 'KPI分析', budget: '预算分析', manual: '手动', rule: '规则', bot: 'Bot建议' }[s] || s) const applyTargetLabel = (t: string) => ({ kpi: 'KPI', budget: '预算', action_plan: '行动方案', alert: '预警' }[t] || t) function fmtVal(v: any): string { @@ -139,6 +147,7 @@ async function loadList() { try { const params: any = {} if (statusFilter.value) params.status = statusFilter.value + if (typeFilter.value) params.suggestion_type = typeFilter.value const r: any = await aiSuggestionApi.list(params) items.value = ((r as any)?.data || []).map((s: any) => ({ ...s, showDetail: false })) } catch { items.value = [] }