ctw 2 months ago
parent
commit
1f058f433c
  1. 25
      ruoyi-ui/src/views/childRoom/RightPanel.vue
  2. 62
      ruoyi-ui/src/views/childRoom/index.vue

25
ruoyi-ui/src/views/childRoom/RightPanel.vue

@ -1,6 +1,5 @@
<template>
<div>
<!-- 右侧外部隐藏按钮 -->
<div
class="right-external-hide-btn"
:class="{ hidden: isHidden }"
@ -10,15 +9,23 @@
<i class="el-icon-arrow-right"></i>
</div>
<!-- 右侧实体列表浮动- 蓝色主题 -->
<div
class="floating-right-panel blue-theme"
:class="{ 'hidden': isHidden }"
>
<!-- 方案内容 -->
<div v-if="activeTab === 'plan'" class="tab-content plan-content">
<div class="section">
<div class="section-title">航线列表</div>
<div class="section-title" style="display: flex; justify-content: space-between; align-items: center;">
<span>航线列表</span>
<el-button
type="text"
icon="el-icon-circle-plus-outline"
style="padding: 0; color: #008aff; font-size: 14px;"
@click="handleCreateRoute"
>
新建航线
</el-button>
</div>
<div class="route-list">
<div
v-for="route in routes"
@ -76,7 +83,6 @@
</el-button>
</div>
</div>
<!-- 冲突内容 -->
<div v-if="activeTab === 'conflict'" class="tab-content conflict-content">
<div v-if="conflicts.length > 0" class="conflict-list">
<div
@ -121,7 +127,6 @@
</el-button>
</div>
</div>
<!-- 平台内容 -->
<div v-if="activeTab === 'platform'" class="tab-content platform-content">
<div class="platform-categories">
<el-tabs v-model="activePlatformTab" type="card" size="mini" class="blue-tabs">
@ -281,14 +286,18 @@ export default {
handleRunConflictCheck() {
this.$emit('run-conflict-check')
},
// ... existing code ...
handleOpenPlatformDialog(platform) {
this.$emit('open-platform-dialog', platform)
},
handleCreateRoute() {
this.$emit('create-route')
}
}
}
</script>
<style scoped>
/* 右侧外部隐藏按钮 */
.right-external-hide-btn {

62
ruoyi-ui/src/views/childRoom/index.vue

@ -10,7 +10,7 @@
:style="{ cursor: isDrawing ? 'crosshair' : 'default' }"
>
<!-- cesiummap组件 -->
<cesiumMap :drawDomClick="drawDom"/>
<cesiumMap :drawDomClick="drawDom" ref="cesiumMapRef"/>
<div class="map-overlay-text">
<i class="el-icon-location-outline text-3xl mb-2 block"></i>
<p>二维GIS地图区域</p>
@ -363,6 +363,7 @@
@resolve-conflict="resolveConflict"
@run-conflict-check="runConflictCheck"
@open-platform-dialog="openPlatformDialog"
@create-route="addRoute"
/>
<!-- 左下角工具面板 -->
@ -709,30 +710,22 @@ export default {
}
this.showCreateRouteDialog = false;
this.isDrawing = true;
//
this.drawDom = true;
// cesiumMap线
this.$nextTick(() => {
if (this.$refs.cesiumMapRef && this.$refs.cesiumMapRef.toggleDrawing) {
this.$refs.cesiumMapRef.toggleDrawing('line');
}
});
this.$message.info('进入绘制模式:左键点击地图添加航点,右键结束绘制');
},
// 3.
// @click cesiumMap
// cesiumMap
handleMapClick(event) {
if (!this.isDrawing) return;
// cesium
// const position = event.position || { lat: 30, lng: 120 };
//
// this.tempClickPosition = position;
//
const nextIndex = this.pendingRoute.points.length + 1;
this.waypointForm = {
name: `WP-${nextIndex}`,
altitude: 5000,
speed: 800,
time: '',
radius: 5
};
this.showWaypointDialog = true;
// cesiumMap
//
console.log("地图点击事件", event);
},
// 4.
confirmWaypoint() {
@ -749,7 +742,12 @@ export default {
// 5.
finishDrawing() {
if (!this.isDrawing) return;
//
if (this.$refs.cesiumMapRef && this.$refs.cesiumMapRef.stopDrawing) {
this.$refs.cesiumMapRef.stopDrawing();
}
if (this.pendingRoute.points.length < 2) {
this.$message.warning('航线至少需要2个航点');
return;
@ -766,6 +764,8 @@ export default {
this.routes.push(finalRoute);
this.isDrawing = false;
this.drawDom = false; //
this.selectRoute(finalRoute); // 线
this.$message.success('航线绘制完成!');
},
@ -853,6 +853,7 @@ export default {
//
newPlan() {
this.$message.success('新建计划');
this.addRoute();
//
},
@ -1068,7 +1069,22 @@ export default {
this.isRightPanelHidden = false;
}
} else if(item.id === 'modify'){
this.drawDom = !this.drawDom
//
this.drawDom = !this.drawDom;
if (this.drawDom) {
this.isDrawing = true;
// cesiumMap线
this.$nextTick(() => {
if (this.$refs.cesiumMapRef) {
// cesiumMaptoggleDrawing线
if (this.$refs.cesiumMapRef.toggleDrawing) {
this.$refs.cesiumMapRef.toggleDrawing('line');
}
}
});
} else {
this.isDrawing = false;
}
console.log(this.drawDom,999999)
}
if (item.id === 'deduction') {

Loading…
Cancel
Save