src/components/monifangzhen/schemeCard.vue
@@ -220,9 +220,11 @@ (item) => item.result == "创建仿真" || item.result == "完成" || item.result == "-1" item.result == "-1" || item.result == null ); simAPIStore.shouldPoll = !shouldStop; // 修改 Pinia 状态 console.log(shouldStop, "aaaaaaaaaaaaaaaa"); // 3. 如果需要停止 if (shouldStop) { if (intervalId) { @@ -241,7 +243,6 @@ watch( () => simAPIStore.shouldPoll, (isStarted) => { console.log(isStarted, "定时器"); if (isStarted) { getScheme(); // 首次立即获取一次 intervalId = setInterval(getScheme, 60 * 1000); // 每隔一分钟执行