| | |
| | | }; |
| | | const params = { |
| | | name: schemeName.value, |
| | | |
| | | type: "历史模拟", |
| | | data: { |
| | | |
| | | rainFall: totalRainfall.value, |
| | | rainfallIntensity: rainfallIntensity.value, |
| | | rainfallDuration: rainfallDuration.value, |
| | |
| | | return; // 防止重复提交 |
| | | } |
| | | isLoading.value = true; // 开始加载状态 |
| | | console.log("当前选中的区域 (selectedArea):", props.selectedArea); |
| | | |
| | | const params = { |
| | | name: schemeName.value, |
| | | type: "历史模拟", |
| | | eares: props.selectedArea, |
| | | data: { |
| | | rainFall: totalRainfall.value, |
| | | rainfallIntensity: rainfallIntensity.value, |
| | | rainfallDuration: rainfallDuration.value, |
| | | rainfallHistory: rainfallHistory.value, |
| | | }, |
| | | }; |
| | | |
| | | try { |
| | | await simStore.createSimulation(params); // 调用 Store 中的保存方法 |
| | | ElMessage.success("保存成功"); |
| | | saveDialogVisible.value = true; // 显示保存对话框(如果需要) |
| | | saveDialogVisible.value = false; // 关闭保存对话框 |
| | | } catch (error) { |
| | | console.error("保存失败:", error); |
| | | ElMessage.error("保存失败,请稍后重试"); |