wangjuncheng
2025-04-21 fcac9ebfb3a0a1a4f6d857b422768d6cbef7944d
src/components/menu/TimeLine.vue
@@ -1,7 +1,6 @@
<template>
  <div class="timeline-container">
    <div class="controls">
      <!-- <div @click="endSimulate">结束模拟</div> -->
      <div class="control-btn" @click="skipBackward">
        <img
          src="@/assets/img/timeline/left.png"
@@ -63,6 +62,7 @@
        </div>
      </div>
    </div>
    <el-button @click="handleBack" style="margin-top: 26px;margin-left: 30px;margin-right: 10px;">结束模拟</el-button>
  </div>
</template>
@@ -80,6 +80,9 @@
import dayjs from "dayjs";
import { createWaterPrimitive, destoryWaterPrimitive } from "@/utils/water";
import { getRainfall } from "@/api/index";
import { EventBus } from "@/eventBus"; // 引入事件总线
import { ElMessage } from 'element-plus'
const props = defineProps({
  waterSimulateParams: {
@@ -301,6 +304,15 @@
  }, delay);
});
const { startSimulate, endSimulate } = inject("simulateActions");
// 返回按钮点击事件
function handleBack() {
  ElMessage({
    message: '模拟进程正在关闭中...',
    type: 'success',
  })
  endSimulate();
  EventBus.emit("hide-schemeInfo");
}
</script>
<style scoped>
@@ -313,7 +325,7 @@
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  width: 838px;
  width: 878px;
  height: 108px;
  /* background-color: #1a2634; */
  background: url("@/assets/img/menubar/bar.png");