@@ -369,14 +325,9 @@ const enabledChannels = ref(0)
const aiAnalysis = ref('')
const aiLoading = ref(false)
-// R1: AI决策建议(建议卡 + 应用到弹窗)
+// R1: AI决策建议(A区只读展示;应用/忽略/审批收敛至 B区 /ai-suggestions,P0-① 三区收口 2026-09-03)
const suggestions = ref
([])
const suggestionsLoading = ref(false)
-const showApplyDialog = ref(false)
-const applySug = ref(null)
-const applyForm = ref({})
-const applying = ref(false)
-const applyKpiName = ref('')
const sugTypeLabel = (t: string) => ({ kpi_target: '改KPI目标', budget_adjust: '调预算', action_plan: '建行动方案' }[t] || t)
const sugTagType = (t: string) => ({ kpi_target: 'warning', budget_adjust: 'danger', action_plan: 'primary' }[t] || 'info')
@@ -390,60 +341,6 @@ async function loadSuggestions() {
suggestionsLoading.value = false
}
-function openApplyDialog(s: any) {
- applySug.value = s
- const sd = s.suggestion_data || {}
- applyForm.value = {
- target_value: sd.target_value ?? null,
- period: sd.period || '',
- budget_value: sd.budget_value ?? null,
- title: sd.title || '',
- assignee: sd.assignee || '',
- priority: sd.priority || 'medium',
- due_date: sd.due_date || '',
- }
- applyKpiName.value = s.target_name || ''
- showApplyDialog.value = true
-}
-
-async function submitApply() {
- if (!applySug.value) return
- const action = applySug.value.suggestion_type
- const body: any = { action, kpi_id: applySug.value.target_id || applySug.value.suggestion_data?.kpi_id }
- if (action === 'kpi_target') {
- if (applyForm.value.target_value == null) { ElMessage.warning('请输入新目标值'); return }
- body.target_value = applyForm.value.target_value
- } else if (action === 'budget_adjust') {
- if (!applyForm.value.period || applyForm.value.budget_value == null) { ElMessage.warning('请填写期间和预算值'); return }
- body.period = applyForm.value.period
- body.budget_value = applyForm.value.budget_value
- } else {
- if (!applyForm.value.title) { ElMessage.warning('请输入计划标题'); return }
- body.title = applyForm.value.title
- body.assignee = applyForm.value.assignee
- body.priority = applyForm.value.priority
- body.due_date = applyForm.value.due_date
- }
- applying.value = true
- try {
- await aiSuggestionApi.apply(applySug.value.id, body)
- ElMessage.success('建议已应用并留痕')
- showApplyDialog.value = false
- await loadSuggestions()
- } catch (e: any) {
- ElMessage.error(e?.response?.data?.detail || '应用失败')
- }
- applying.value = false
-}
-
-async function dismissSuggestion(s: any) {
- try {
- await aiSuggestionApi.dismiss(s.id)
- ElMessage.success('建议已忽略')
- await loadSuggestions()
- } catch { ElMessage.error('忽略失败') }
-}
-
const aiApi = axios.create({ baseURL: '/api/cma', timeout: 30000 })
aiApi.interceptors.request.use((config: any) => {
const token = localStorage.getItem('cma_token')
@@ -715,6 +612,7 @@ onMounted(() => { loadData() })
.sug-content { font-size:12px; color:#666; line-height:1.5; margin-bottom:8px; }
.sug-foot { display:flex; gap:6px; align-items:center; }
.sug-applied-by { font-size:11px; color:#999; }
+.sug-pending-hint { font-size:11px; color:#b88230; }
.apply-tip { font-size:12px; color:#999; padding:0 0 10px 100px; }
/* KPI详情弹窗 */
diff --git a/frontend/src/views/LearningDashboard.vue b/frontend/src/views/LearningDashboard.vue
index 76319d84..272f2d76 100644
--- a/frontend/src/views/LearningDashboard.vue
+++ b/frontend/src/views/LearningDashboard.vue
@@ -7,6 +7,7 @@
:dimension="'learning'"
:title="'学习成长维度KPI看板'"
:icon="'📚'"
+ :read-only="true"
:stat-labels="{ total: '学习指标总数', green: '达标', yellow: '预警', red: '未达标', noData: '无数据' }"
:templates="LEARNING_TEMPLATES"
:has-categories="true"