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 = [] }