wangjuncheng
7 天以前 bf0eb543e2deab8a1629dd2a46f8e1cd191531e1
src/components/menu/TimeLine.vue
@@ -1135,32 +1135,33 @@
  if (selectedScheme.value.type === 2) {
    try {
      await ElMessageBox.confirm("方案未停止时结束模拟后,后台将停止计算", {
        confirmButtonText: "返回列表",
        cancelButtonText: "结束模拟",
        confirmButtonText: "结束模拟",
        cancelButtonText: "返回列表",
        type: "warning",
      });
      // 用户点击了确认,这里不执行任何操作,仅关闭对话框
      const res = await stopSim(selectedScheme.value.id);
      if (res.code == 404) {
        ElMessage.warning("该服务已停止");
      } else {
        ElMessage.success("服务正在停止中");
      }
    } catch (error) {
      stopSim(selectedScheme.value.id).then((res) => {
        if (res.code == 404) {
          ElMessage.warning("该服务已停止");
        } else {
          ElMessage.success("服务正在停止中");
        }
      });
      // return;
      // 用户点击了【返回列表】或者出现错误
      return;
    }
  }
  // 不管type是不是2,最终都执行结束模拟的操作
  // 不管 type 是不是 2,最终都执行结束模拟操作
  endSimulation();
}
async function endSimulation() {
  clearAllPoints();
  simStore.openDia = true;
  simStore.crossSection = [];
  // 结束模拟之后清除layer列表
  simStore.rePlayList = [];
  console.log(simStore.rePlayList, "结束模拟清除rePlayListrePlayList列表");
  EventBus.emit("close-time");
  endSimulate();
  isWaterPrimitiveCreated.value = false;