wangjuncheng
2025-04-21 fcac9ebfb3a0a1a4f6d857b422768d6cbef7944d
src/components/menu/TimeLine.vue
@@ -62,7 +62,7 @@
        </div>
      </div>
    </div>
    <el-button @click="endSimulate" style="margin-top: 26px;margin-left: 30px;margin-right: 10px;">结束模拟</el-button>
    <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>