| | |
| | | try { |
| | | // 当前方案的所有信息 |
| | | const schemeInfo = selectedScheme.value; |
| | | // console.log(selectedScheme.value,'selectselect') |
| | | // type为2的话为实时模拟 |
| | | // const type = schemeInfo.value.type |
| | | 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) { |
| | | frameNum.value = timestamps.length; |
| | | console.log(frameNum.value, "frameNum.valueframeNum.value"); |
| | | waterTimestamps.value = timestamps; |
| | | updateTimelineRange(); |
| | | timeMarkers.value = generateTimeMarkers(timestamps); |
| | |
| | | "YYYY-MM-DD HH:mm:ss" |
| | | ); |
| | | } |
| | | minFlowRate = watersMinHeight; |
| | | maxFlowRate = watersMaxHeight; |
| | | } catch (error) { |
| | | console.error("Error loading water simulation data:", error); |
| | | ElMessage({ |