From bd13b522f95d4f9429eb0e8bc7df2e1ce3d58554 Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期三, 16 四月 2025 16:41:55 +0800
Subject: [PATCH] change

---
 src/views/left/KGSimOption/HistorySimulation.vue |   56 +++++++++++++++++++-------------------------------------
 1 files changed, 19 insertions(+), 37 deletions(-)

diff --git a/src/views/left/KGSimOption/HistorySimulation.vue b/src/views/left/KGSimOption/HistorySimulation.vue
index c3431e0..3aa57d0 100644
--- a/src/views/left/KGSimOption/HistorySimulation.vue
+++ b/src/views/left/KGSimOption/HistorySimulation.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="history-simulation">
     <div class="left-top">
-      <span>鍘嗗彶妯℃嫙</span>
+      <span @click="getRainData">鍘嗗彶妯℃嫙</span>
       <span class="clickable-text" @click="toggleDetails">{{
         isCollapsed ? "灞曞紑" : "鏀惰捣"
       }}</span>
@@ -10,46 +10,26 @@
       <div class="input-group">
         <div class="input-item">
           <label>鍘嗗彶闆ㄦ儏:</label>
-          <el-select
-            v-model="rainfallHistory"
-            placeholder="璇烽�夋嫨"
-            popper-class="mySelectStyle"
-          >
-            <el-option
-              v-for="item in HistoricalRainData"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
+          <el-select v-model="rainfallHistory" placeholder="璇烽�夋嫨" popper-class="mySelectStyle">
+            <el-option v-for="item in HistoricalRainData" :key="item.id" :label="item.name"
+              :value="item.id"></el-option>
           </el-select>
         </div>
       </div>
       <div class="input-group">
         <div class="input-item">
           <label>闄嶉洦鎬婚噺:</label>
-          <el-input
-            v-model="totalRainfall"
-            type="number"
-            placeholder="璇疯緭鍏�"
-          ></el-input>
+          <el-input v-model="totalRainfall" type="number" placeholder="璇疯緭鍏�"></el-input>
           <span>mm</span>
         </div>
         <div class="input-item">
           <label>闄嶉洦寮哄害:</label>
-          <el-input
-            v-model="rainfallIntensity"
-            type="number"
-            placeholder="璇疯緭鍏�"
-          ></el-input>
+          <el-input v-model="rainfallIntensity" type="number" placeholder="璇疯緭鍏�"></el-input>
           <span>mm/h</span>
         </div>
         <div class="input-item">
           <label>闄嶉洦鏃堕暱:</label>
-          <el-input
-            v-model="rainfallDuration"
-            type="number"
-            placeholder="璇疯緭鍏�"
-          ></el-input>
+          <el-input v-model="rainfallDuration" type="number" placeholder="璇疯緭鍏�"></el-input>
           <span>h</span>
         </div>
       </div>
@@ -64,13 +44,8 @@
     </div>
 
     <!-- 淇濆瓨鏂规瀵硅瘽妗� -->
-    <el-dialog
-      v-model="saveDialogVisible"
-      title="淇濆瓨鏂规"
-      width="50%"
-      :before-close="handleClose"
-      custom-class="custom-dialog"
-    >
+    <el-dialog v-model="saveDialogVisible" title="淇濆瓨鏂规" width="50%" :before-close="handleClose"
+      custom-class="custom-dialog">
       <div class="dialog-content">
         <p><strong>鎵�閫夐噸鐐规矡锛�</strong>{{ props.selectedArea }}</p>
         <p><strong>妯℃嫙绫诲瀷锛�</strong>鍘嗗彶妯℃嫙</p>
@@ -94,9 +69,16 @@
 import { ElMessage } from "element-plus";
 import { initeWaterPrimitiveView } from "@/utils/water";
 import { useSimStore } from "@/store/simulation.js"; // 寮曞叆 Store
-
+import { getRainfallData  } from "@/api/hpApi.js"
 // 鑾峰彇 Store 瀹炰緥
 const simStore = useSimStore();
+// 娴嬭瘯鑾峰彇闆ㄩ噺鏁版嵁
+// const getRainData = () => {
+//   getRainfallData()
+//     .then((a) => {
+//       console.log(a, '瀹忓浘鑾峰彇闆ㄩ噺鏁版嵁');
+//     })
+// };
 
 // 娉ㄥ叆妯℃嫙鎿嶄綔鏂规硶
 const { startSimulate, endSimulate } = inject("simulateActions");
@@ -167,13 +149,13 @@
     area: props.selectedArea, // 鍖哄煙
     name: selectedRainfallName.value, // 鏂规鍚嶇О
     createTime: new Date().toISOString(), // 鍒涘缓鏃堕棿
-    taskStatus: 0, // 鍒濆鐘舵�佷负鏈紑濮�
+    taskStatus: 1, // 鍒濆鐘舵�佷负鏈紑濮�
     totalRainfall: totalRainfall.value, // 闄嶉洦鎬婚噺
     rainfallIntensity: rainfallIntensity.value, // 闄嶉洦寮哄害
     rainfallDuration: rainfallDuration.value, // 闄嶉洦鏃堕暱
   };
 
-  simStore.addSchemCardItem(newScheme);
+  simStore.addSchemCard(newScheme);
   ElMessage.success("鏂规宸蹭繚瀛�");
   // 鍏抽棴瀵硅瘽妗�
   saveDialogVisible.value = false;

--
Gitblit v1.9.3