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({})