| | |
| | | <div class="engineering-buttons"> |
| | | <p>治理工程标绘</p> |
| | | <el-button type="primary" @click="toggleDitch"> |
| | | {{ ditchingActive ? "关闭开沟" : "开启开沟" }} |
| | | {{ ditchingActive ? "关闭土方开挖" : "开启土方开挖" }} |
| | | </el-button> |
| | | <el-button type="primary" @click="toggleDam"> |
| | | {{ damActive ? "关闭加坝" : "开启加坝" }} |
| | | {{ damActive ? "关闭增加拦挡坝" : "开启增加拦挡坝" }} |
| | | </el-button> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | <Ditching v-show="ditchingShow" class="ditchingPosition" @update-excavation-data="handleUpdateExcavationData"></Ditching> |
| | | <Dam v-show="damShow" class="ditchingPosition"></Dam> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import RealTimeSimulation from "./KGSimOption/RealTimeSimulation.vue"; |
| | | import { getRegionData } from "@/api/trApi"; |
| | | import { EventBus } from "@/eventBus"; // 引入事件总线 |
| | | |
| | | const selectedSimulation = ref("历史模拟"); |
| | | const selectedArea = ref(); // 选中的区域 |
| | | // 重点沟数据 |
| | |
| | | ditchingShow.value = ditchingActive.value; |
| | | |
| | | if (ditchingActive.value) { |
| | | console.log("开启按钮被点击"); |
| | | damActive.value = false; // 关闭加坝状态 |
| | | damShow.value = false; // 隐藏 Dam 组件 |
| | | } else { |
| | | console.log("关闭按钮被点击"); |
| | | cloesDitch(); |
| | | } |
| | | }; |
| | | |
| | | // 切换加坝状态 |
| | | const toggleDam = () => { |
| | | damActive.value = !damActive.value; |
| | | damShow.value = damActive.value; |
| | | // damActive.value = !damActive.value; |
| | | // damShow.value = damActive.value; |
| | | |
| | | if (damActive.value) { |
| | | console.log("开启按钮被点击"); |
| | | } else { |
| | | console.log("关闭按钮被点击"); |
| | | cloesDam(); |
| | | } |
| | | // if (damActive.value) { |
| | | // ditchingActive.value = false; // 关闭开沟状态 |
| | | // ditchingShow.value = false; // 隐藏 Ditching 组件 |
| | | // } else { |
| | | // cloesDam(); |
| | | // } |
| | | window.Viewer = earthCtrl.viewer; |
| | | earthCtrl.factory.createModelLibrary() |
| | | }; |
| | | const cloesDitch = () => { |
| | | ditchingShow.value = false; |
| | |
| | | |
| | | .engineering-buttons { |
| | | .el-button { |
| | | width: 100px; |
| | | width: 48%; |
| | | } |
| | | } |
| | | |