From 4b7b8185bdce4272cd5f256fcc777056f54add6d Mon Sep 17 00:00:00 2001 From: wangjuncheng <1> Date: 星期一, 16 六月 2025 17:03:09 +0800 Subject: [PATCH] 123 --- src/components/menu/TimeLine.vue | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/components/menu/TimeLine.vue b/src/components/menu/TimeLine.vue index f799f1e..c2cd6ea 100644 --- a/src/components/menu/TimeLine.vue +++ b/src/components/menu/TimeLine.vue @@ -58,10 +58,12 @@ <ratelevel ref="ratelevelRef" :playing-time="sendCurrentPlayingTime" @finish-calculation="handleFinishCalculation" style="margin-top: 12px; margin-left: 28px; margin-right: 10px;justify-content: flex-end;" /> - <crossanalysis ref="crossRef" style="margin-top: 12px; margin-left: 16px; margin-right: 20px;justify-content: flex-end;" /> + <crossanalysis ref="crossRef" + style="margin-top: 12px; margin-left: 16px; margin-right: 20px;justify-content: flex-end;" /> </div> - <el-button @click="handleBack" style="margin-top: 3px; margin-left: 28px; margin-right: 10px;width: 75%;height: 30%;">缁撴潫妯℃嫙</el-button> + <el-button @click="handleBack" + style="margin-top: 3px; margin-left: 28px; margin-right: 10px;width: 75%;height: 30%;">缁撴潫妯℃嫙</el-button> </div> </div> @@ -136,8 +138,8 @@ rainColor: "#99B3CC", rainDensity: 30 // 闆ㄧ殑瀵嗗害 }); -let minFlowRate =ref() -let maxFlowRate =ref() +let minFlowRate = ref() +let maxFlowRate = ref() // 璁$畻灞炴�� const progressPercentage = computed( () => (currentTime.value / duration.value) * 100 @@ -167,8 +169,8 @@ // baseUrl: `/simu/c2h1dc`, interval: intervalMap[playbackRate.value], colorRender: isColorRenderEnabled.value, - minFlowRate:0.1, - maxFlowRate:10, + minFlowRate, + maxFlowRate, }); isWaterPrimitiveCreated.value = true; } else { @@ -545,12 +547,13 @@ // 褰撳墠鏂规鐨勬墍鏈変俊鎭� const schemeInfo = selectedScheme.value; serviceInfo = schemeInfo.serviceName; - // minFlowRate = schemeInfo.鏈�灏忔按娣� - // maxFlowRate = schemeInfo.鏈�澶ф按娣� + // console.log('鑾峰彇鍒扮殑 serviceName:', serviceInfo); getRainfallData() // 鏍规嵁layer.json鍘昏幏鍙栨椂闂磋酱淇℃伅 - const { waterTimestamps: timestamps } = await fetchWaterSimulationData(serviceInfo); + const { waterTimestamps: timestamps, watersMaxHeight, watersMinHeight } = await fetchWaterSimulationData(serviceInfo); + console.log('褰撳墠鏂规涓嬬殑鏈�澶ф按浣嶆繁搴﹀拰鏈�灏忔按浣嶆繁搴�',watersMaxHeight,watersMinHeight); + // 鐜板湪鏄寜鐓ф�诲叡鏈夊灏戜釜鐐规潵娓叉煋鏃堕棿杞� if (timestamps) { waterTimestamps.value = timestamps; @@ -561,6 +564,8 @@ "YYYY-MM-DD HH:mm:ss" ); } + minFlowRate = watersMinHeight + maxFlowRate = watersMaxHeight } catch (error) { console.error("Error loading water simulation data:", error); ElMessage({ @@ -596,7 +601,7 @@ if (crossRef.value) { crossRef.value.clearPoints(); console.log('鎵ц鍒犻櫎鐐瑰姛鑳�'); - + } emit("isColorRender", false); setTimeout(() => { @@ -604,6 +609,8 @@ }, 3000); destoryWaterPrimitive(); EventBus.emit("hide-schemeInfo"); + EventBus.emit("clear-water-depth"); + EventBus.emit("clear-water-velocity"); ElMessage({ message: "妯℃嫙杩涚▼姝e湪鍏抽棴涓�...", type: "success" }); } </script> -- Gitblit v1.9.3