| | |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <ratelevel ref="ratelevelRef" :playing-time="sendCurrentPlayingTime" @finish-calculation="handleFinishCalculation" |
| | | style="margin-top: 12px; margin-left: 28px; margin-right: 10px;justify-content: flex-end;"></ratelevel> |
| | | <el-button @click="handleBack" style="margin-top: 3px; margin-left: 30px; margin-right: 10px">结束模拟</el-button> |
| | | <div style="display: flex;"> |
| | | <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;" /> |
| | | |
| | | </div> |
| | | <el-button @click="handleBack" style="margin-top: 3px; margin-left: 28px; margin-right: 10px;width: 75%;height: 30%;">结束模拟</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | reactive |
| | | } from "vue"; |
| | | import ratelevel from "@/components/menu/flowRate_waterLevel.vue"; |
| | | import crossanalysis from "@/components/menu/CrossSectionalAnalysis.vue"; |
| | | |
| | | import dayjs from "dayjs"; |
| | | import { |
| | |
| | | // 响应式状态 |
| | | let serviceInfo = ref(null); // 当前方案的服务地址 |
| | | const ratelevelRef = ref(null); // 获取子组件实例的引用 |
| | | const crossRef = ref(null); // 获取子组件实例的引用 |
| | | const currentPlayingTime = ref(""); // 当前播放时间 |
| | | const sendCurrentPlayingTime = ref(""); // 当前播放时间 |
| | | const isPlaying = ref(false); |
| | |
| | | let lastRainValue = null; |
| | | function updateWeatherByProgress() { |
| | | if (rainFallValues.value.length === 0) return; |
| | | console.log(`时间轴总时长: ${duration.value}, 当前时间: ${currentTime.value}`); // 打印时间轴信息 |
| | | // console.log(`时间轴总时长: ${duration.value}, 当前时间: ${currentTime.value}`); // 打印时间轴信息 |
| | | const progress = currentTime.value / duration.value; |
| | | const floatIndex = progress * (rainFallValues.value.length - 1); |
| | | const index = Math.floor(floatIndex); // 当前索引 |
| | |
| | | // console.log(`正在处理的雨量数据点: 当前=${currentRain}, 下一个=${nextRain}, 插值后=${rainValue.toFixed(2)}, 索引=${index}`); |
| | | // 如果当前索引未变化且插值差异不大,跳过重复更新 |
| | | if (index === lastUsedIndex && Math.abs(rainValue - lastRainValue) < 0.1) { |
| | | console.log('由于数据无显著变化,跳过本次更新'); |
| | | // console.log('由于数据无显著变化,跳过本次更新'); |
| | | return; |
| | | } |
| | | |
| | |
| | | rainDensity: rainLevel.density, |
| | | rainColor: rainLevel.color |
| | | }; |
| | | console.log('当前雨量数据:', rainValue, '当前雨形:', rainLevel); |
| | | // console.log('当前雨量数据:', rainValue, '当前雨形:', rainLevel); |
| | | // 调用工具方法更新雨效 |
| | | mapUtils.toggleRain(rainParams, true); |
| | | } |
| | |
| | | isWaterPrimitiveCreated.value = false; |
| | | if (ratelevelRef.value) { |
| | | ratelevelRef.value.endCalculation(); |
| | | ratelevelRef.value.stopPicking(); |
| | | } |
| | | if (crossRef.value) { |
| | | crossRef.value.clearPoints(); |
| | | } |
| | | emit("isColorRender", false); |
| | | setTimeout(() => { |
| | |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | z-index: 99; |
| | | width: 38%; |
| | | width: 44%; |
| | | height: 10%; |
| | | /* background-color: #1a2634; */ |
| | | background: url("@/assets/img/menubar/bar.png"); |
| | |
| | | .timeline { |
| | | margin-top: 10px; |
| | | position: relative; |
| | | flex: 1; |
| | | flex: 0.9; |
| | | } |
| | | |
| | | .dates { |