| | |
| | | <div class="buttons"> |
| | | <el-button type="primary" @click="openPlan">打开方案</el-button> |
| | | <el-button type="primary" @click="openSaveDialog">保存方案</el-button> |
| | | <el-button type="success" @click="startSimulation">开始模拟</el-button> |
| | | <el-button type="success" @click="startPlay">开始模拟</el-button> |
| | | </div> |
| | | |
| | | <!-- 保存方案对话框 --> |
| | |
| | | <script setup> |
| | | import { ref, computed } from 'vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { initeWaterPrimitiveView } from "@/utils/water"; |
| | | |
| | | const emit = defineEmits(["start", "end"]); |
| | | function endPlay() { |
| | | emit("end"); |
| | | } |
| | | |
| | | function startPlay() { |
| | | initeWaterPrimitiveView(); |
| | | emit("start"); |
| | | } |
| | | // 定义 Props |
| | | const props = defineProps({ |
| | | selectedArea: { |