| | |
| | | import { useSimStore } from "@/store/simulation"; |
| | | import { storeToRefs } from "pinia"; |
| | | const simStore = useSimStore(); |
| | | const { selectedScheme, frameNum, layerDate } = storeToRefs(simStore); |
| | | const { selectedScheme, frameNum, layerDate,schemWaterInfo } = storeToRefs(simStore); |
| | | |
| | | const emit = defineEmits([ |
| | | "timeUpdate", |
| | |
| | | } |
| | | |
| | | const progress = currentTime.value / duration.value; |
| | | // if ( |
| | | // currentReplayIndex.value == simStore.rePlayList.length - 1 && |
| | | // selectedScheme.value.type === 2 && |
| | | // simStore.rePlayList.length > 0 |
| | | // ) { |
| | | // // 历史回放直接给100 |
| | | // emit("timeUpdate", 100); |
| | | // } |
| | | if (selectedScheme.value.type !== 2) { |
| | | emit("timeUpdate", progress * 100); |
| | | } |
| | |
| | | watersMaxHeight, |
| | | watersMinHeight |
| | | ); |
| | | |
| | | const waterInfoArr = [watersMaxHeight] |
| | | schemWaterInfo.value = waterInfoArr |
| | | // 更新时间轴相关数据 |
| | | if (timestamps) { |
| | | frameNum.value = timestamps.length; |
| | |
| | | // 所有项目播放完成 |
| | | currentReplayIndex.value = 0; // 重置索引 |
| | | isPlaying.value = false; // 停止播放 |
| | | emit("timeUpdate", 100); // 在所有项目播放完毕后触发 |
| | | } |
| | | } |
| | | |