From f373e0c0797e1800bf066fdfbb748bb9242230f6 Mon Sep 17 00:00:00 2001 From: wangjuncheng <1> Date: 星期二, 08 七月 2025 17:46:02 +0800 Subject: [PATCH] 泥位计 --- src/components/tools/DebuffDetail.vue | 41 ++++++++++++++++++++++------------------- 1 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/components/tools/DebuffDetail.vue b/src/components/tools/DebuffDetail.vue index 1c4b688..7660ab3 100644 --- a/src/components/tools/DebuffDetail.vue +++ b/src/components/tools/DebuffDetail.vue @@ -18,8 +18,8 @@ import { storeToRefs } from "pinia"; const simStore = useSimStore(); -const { selectedScheme } = storeToRefs(simStore); - +const { selectedScheme, schemWaterInfo } = storeToRefs(simStore); +// schemWaterInfo // 闅愭偅鐐� const filteredData = simStore.DangerPoint.filter((item) => item.position?.includes("瀛欒儭娌�") @@ -39,10 +39,10 @@ name: "鏈�澶ф按娣憋細", value: "1.86 m", }, - { - name: "鏈�澶ф祦閫燂細", - value: "7 m/s", - }, + // { + // name: "鏈�澶ф祦閫燂細", + // value: "7 m/s", + // }, { name: "濞佽儊鎴挎暟锛�", value: "406 闂�", @@ -113,24 +113,27 @@ } if (selectedScheme.value.type !== 2) { - const rainfallList = data.rainfalls; - + // console.log(schemWaterInfo.value,'杩欓噷鏄墍鏈夌殑鏂规鏁版嵁'); + + + // const rainfallList = data.rainfalls; // 鎻愬彇 intensity 鍊� - const rainValues = rainfallList.map((r) => r.intensity); - const minRain = Math.min(...rainValues); - const maxRain = Math.max(...rainValues); - const avgRain = - rainValues.reduce((sum, val) => sum + val, 0) / rainValues.length; + // const rainValues = rainfallList.map((r) => r.intensity); + // const minRain = Math.min(...rainValues); + // const maxRain = Math.max(...rainValues); + // const avgRain = + // rainValues.reduce((sum, val) => sum + val, 0) / rainValues.length; // 鏇存柊 detailList 涓殑鈥滄渶澶ч洦寮衡�濆拰鈥滃钩鍧囬洦寮衡�� - detailList.value[0].value = maxRain.toFixed(2) + " mm/h"; // 鏈�澶ч洦寮� - detailList.value[1].value = avgRain.toFixed(2) + " mm/h"; // 骞冲潎闆ㄥ己 + detailList.value[0].value = schemWaterInfo.value[1].toFixed(2) + " mm/h"; // 鏈�澶ч洦寮� + detailList.value[1].value = schemWaterInfo.value[2].toFixed(2) + " mm/h"; // 骞冲潎闆ㄥ己 + detailList.value[2].value = schemWaterInfo.value[0].toFixed(2) + " m"; // 鏈�澶ф按娣� console.log( - "褰撳墠鏂规涓嬫渶灏忛洦閲忋�佹渶澶ч洦閲忋�佸钩鍧囬洦閲忥細", - minRain.toFixed(2), - maxRain.toFixed(2), - avgRain.toFixed(2) + "褰撳墠鏂规涓嬫渶澶ф按娣便�佹渶澶ч洦閲忋�佸钩鍧囬洦閲忥細", + schemWaterInfo.value[0].toFixed(2), + schemWaterInfo.value[1].toFixed(2), + schemWaterInfo.value[2].toFixed(2) ); } }; -- Gitblit v1.9.3