fix: 预测模拟企业同步—从localStorage读取entity_id

This commit is contained in:
Hermes CI Fix
2026-07-27 17:23:29 +08:00
parent 6d5c374c60
commit 8a7cf25025
+6 -1
View File
@@ -467,7 +467,12 @@ async function doScenario() {
// ── 现金流预测(AI事前预警) ── // ── 现金流预测(AI事前预警) ──
const cfLoading = ref(false) 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 cfCurrentCash = ref(30)
const cfDays = ref(30) const cfDays = ref(30)
const cfResult = ref<any>({}) const cfResult = ref<any>({})