fix: 预测模拟企业同步—从localStorage读取entity_id
This commit is contained in:
@@ -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<any>({})
|
||||
|
||||
Reference in New Issue
Block a user