From 8a7cf2502572bf8e5966e68494d37409dadccfa8 Mon Sep 17 00:00:00 2001 From: Hermes CI Fix Date: Mon, 27 Jul 2026 17:23:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A2=84=E6=B5=8B=E6=A8=A1=E6=8B=9F?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=90=8C=E6=AD=A5=E2=80=94=E4=BB=8ElocalStor?= =?UTF-8?q?age=E8=AF=BB=E5=8F=96entity=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/PredictDashboard.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/PredictDashboard.vue b/frontend/src/views/PredictDashboard.vue index 15149df4..1f2067d4 100644 --- a/frontend/src/views/PredictDashboard.vue +++ b/frontend/src/views/PredictDashboard.vue @@ -467,7 +467,12 @@ async function doScenario() { // ── 现金流预测(AI事前预警) ── const cfLoading = ref(false) -const cfEntityId = ref(1) +const cfEntityId = ref(Number(localStorage.getItem('cma_entity_id') || 1)) + +// 监听企业切换 +window.addEventListener('storage', (e) => { + if (e.key === 'cma_entity_id') cfEntityId.value = Number(e.newValue || 1) +}) const cfCurrentCash = ref(30) const cfDays = ref(30) const cfResult = ref({})