| | |
| | | if (selectedScheme.value.type === 2) { |
| | | try { |
| | | await ElMessageBox.confirm("方案未停止时结束模拟后,后台将停止计算", { |
| | | confirmButtonText: "返回列表", |
| | | cancelButtonText: "结束模拟", |
| | | confirmButtonText: "结束模拟", |
| | | cancelButtonText: "返回列表", |
| | | type: "warning", |
| | | }); |
| | | // 用户点击了确认,这里不执行任何操作,仅关闭对话框 |
| | | } catch (error) { |
| | | stopSim(selectedScheme.value.id).then((res) => { |
| | | |
| | | const res = await stopSim(selectedScheme.value.id); |
| | | if (res.code == 404) { |
| | | ElMessage.warning("该服务已停止"); |
| | | } else { |
| | | ElMessage.success("服务正在停止中"); |
| | | } |
| | | }); |
| | | // return; |
| | | } catch (error) { |
| | | // 用户点击了【返回列表】或者出现错误 |
| | | return; |
| | | } |
| | | } |
| | | // 不管type是不是2,最终都执行结束模拟的操作 |
| | | |
| | | // 不管 type 是不是 2,最终都执行结束模拟操作 |
| | | endSimulation(); |
| | | } |
| | | |
| | |
| | | return; // 阻止后续操作 |
| | | } else { |
| | | simStore.rePlayList = res.data; |
| | | console.log(simStore.rePlayList, "lisi"); |
| | | console.log(simStore.rePlayList, "实时模拟历史回放列表"); |
| | | } |
| | | // 使用 nextTick 确保 DOM 更新后再执行后续操作 |
| | | nextTick(() => { |
| | |
| | | |
| | | // 生命周期钩子 |
| | | onMounted(() => { |
| | | console.log(filteredData); |
| | | // console.log(filteredData); |
| | | updateThreatData(); |
| | | getRainfallData(); |
| | | }); |
| | |
| | | detailTitle.value = deviceDetail.value.deviceForShort; |
| | | } catch (err) { |
| | | console.error("获取 hdInfo 失败", err); |
| | | detailList.value = [ |
| | | { |
| | | name: "群测群防员", |
| | | value: "接口异常" |
| | | }, |
| | | { |
| | | name: "群测群防员电话", |
| | | value: "接口异常" |
| | | } |
| | | ]; |
| | | } |
| | | } |
| | | |