From 14ab6d211ce3a890cfc04ff2755c776246a48434 Mon Sep 17 00:00:00 2001 From: Hermes CI Fix Date: Fri, 18 Sep 2026 18:32:22 +0800 Subject: [PATCH] feat(cma): alignment mode system-level hint + double confirm (project-20260918-alignment-config-hint) Frontend only: KPIAlignment.vue adds system-level notice and ElMessageBox confirm before save. No backend/storage change. --- frontend/src/views/KPIAlignment.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/KPIAlignment.vue b/frontend/src/views/KPIAlignment.vue index 6c094e9c..d4f9691b 100644 --- a/frontend/src/views/KPIAlignment.vue +++ b/frontend/src/views/KPIAlignment.vue @@ -15,6 +15,8 @@
+
import { ref, computed, onMounted } from 'vue' import { useRoute, useRouter } from 'vue-router' -import { ElMessage } from 'element-plus' +import { ElMessage, ElMessageBox } from 'element-plus' // 统一走 api/index.ts 的 axios 实例(拦截器自动带 Bearer / 401 跳登录) import { alignmentApi, mapApi } from '../api/index' @@ -286,6 +288,14 @@ async function loadConfig() { async function saveAlignConfig() { if (!selectedMode.value) return + // 系统级设置二次确认:对齐模式存于全局配置(role_permissions 无 entity_id),切换影响全部账套 + try { + await ElMessageBox.confirm( + `对齐模式为系统级设置,切换后将立即作用于全部账套。确认切换为「${selectedModeName.value}」?`, + '系统级设置二次确认', + { type: 'warning', confirmButtonText: '确认切换', cancelButtonText: '取消' } + ) + } catch { return } saving.value = true try { // 修复:原 `'Bearer ' + token` 模板字面量 bug(header 值被写死成字面量 → 必 401)