wangjuncheng
2025-04-23 932658e96812e4c7c3a9864db52b4eb493d64e92
change
已修改2个文件
32 ■■■■■ 文件已修改
src/components/monifangzhen/schemeCard.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/left/KGSimOption/PredictiveSimulation.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/monifangzhen/schemeCard.vue
@@ -141,24 +141,35 @@
);
const deleteSim = () => {
  ElMessageBox.confirm("确定要删除该方案吗?", "删除方案", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
  })
  // 确保有选中的方案
  if (!selectedId.value) {
    ElMessage({
      type: "warning",
      message: "请先选择一个方案进行删除!",
    });
    return;
  }
  const selectedScheme = schemeList.value.find((item) => item.id === selectedId.value);
  const schemeName = selectedScheme ? selectedScheme.name : "未知方案";
  ElMessageBox.confirm(
    `确定要删除方案 "${schemeName}" 吗?`,
    "删除方案",
    {
      confirmButtonText: "确定",
      cancelButtonText: "取消",
      type: "warning",
    }
  )
    .then(() => {
      deleteSimData(selectedId.value).then((res) => {
        getScheme();
      });
      ElMessage({
        type: "success",
        message: "删除成功",
        message: `方案 "${schemeName}" 删除成功`,
      });
    })
    .catch(() => {
      ElMessage({
        type: "info",
        message: "已取消删除",
      });
    });
};
/////////////////////// 调用接口结束 ///////////////////////
src/views/left/KGSimOption/PredictiveSimulation.vue
@@ -165,7 +165,7 @@
];
// 1计算属性:获取当前选中的预测数据名称
// 计算属性:获取当前选中的预测数据名称
const selectedForecastDataName = computed(() => {
  const selected = ForecastData.find(
    (item) => item.id === selectedForecastData.value
@@ -191,6 +191,7 @@
const openSaveDialog = async () => {
  const forms = {
    name: schemeName.value,
    eares: props.selectedArea,
    type: 1,
    rainfall: totalRainfall.value,
    duration: rainfallDuration.value,