From a57caa72a54efe9de3fe26a6c36d3e8038267377 Mon Sep 17 00:00:00 2001 From: guonan <guonan201020@163.com> Date: 星期四, 17 七月 2025 09:09:49 +0800 Subject: [PATCH] 修改x按钮 --- src/components/tools/DebuffDetail.vue | 43 +++++++++++++++++++++++-------------------- 1 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/components/tools/DebuffDetail.vue b/src/components/tools/DebuffDetail.vue index 1c4b688..5a4ca4f 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) ); } }; @@ -149,7 +152,7 @@ // 鐢熷懡鍛ㄦ湡閽╁瓙 onMounted(() => { - console.log(filteredData); + // console.log(filteredData); updateThreatData(); getRainfallData(); }); -- Gitblit v1.9.3