Browse Source

修改航线属性

wxp
ctw 2 months ago
parent
commit
0ff14b54ba
  1. 2
      ruoyi-ui/src/views/cesiumMap/ContextMenu.vue
  2. 9
      ruoyi-ui/src/views/cesiumMap/index.vue
  3. 28
      ruoyi-ui/src/views/childRoom/index.vue

2
ruoyi-ui/src/views/cesiumMap/ContextMenu.vue

@ -8,7 +8,7 @@
</div>
<!-- 线段特有选项 -->
<div class="menu-section" v-if="entityData.type === 'line'">
<div class="menu-section" v-if="entityData.type === 'line' && !entityData.routeId">
<div class="menu-title">线段属性</div>
<div class="menu-item" @click="toggleColorPicker('color')">
<span class="menu-icon">🎨</span>

9
ruoyi-ui/src/views/cesiumMap/index.vue

@ -447,7 +447,7 @@ export default {
properties: {isMissionRouteLine: true, routeId: routeId}
});
if (this.allEntities) {
this.allEntities.push({id: lineId, entity: routeEntity, type: 'line'});
this.allEntities.push({id: lineId, entity: routeEntity, type: 'route'});
}
}
},
@ -590,6 +590,11 @@ export default {
console.log(`>>> [地图触发] 点击了点 ${dbId}, 属于航线 ${routeId}`);
// 线 ID
this.$emit('open-waypoint-dialog', dbId, routeId);
} else if (props && props.isMissionRouteLine) {
const routeId = props.routeId;
console.log(`>>> [地图触发] 点击了航线 ${routeId}`);
// 线
this.$emit('open-route-dialog', routeId);
}
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
@ -629,7 +634,7 @@ export default {
}
}
}
if (entityData) {
if (entityData && entityData.type !== 'route') {
//
this.contextMenu = {
visible: true,

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

@ -7,7 +7,8 @@
<cesiumMap ref="cesiumMap" :drawDomClick="drawDom || airspaceDrawDom"
:tool-mode="drawDom ? 'ranging' : (airspaceDrawDom ? 'airspace' : 'airspace')"
@draw-complete="handleMapDrawComplete"
@open-waypoint-dialog="handleOpenWaypointEdit" />
@open-waypoint-dialog="handleOpenWaypointEdit"
@open-route-dialog="handleOpenRouteEdit" />
<div class="map-overlay-text">
<i class="el-icon-location-outline text-3xl mb-2 block"></i>
<p>二维GIS地图区域</p>
@ -555,6 +556,31 @@ export default {
console.error("查找失败!账本内IDs:", waypointsList.map(w => w.id));
}
},
// 线
async handleOpenRouteEdit(routeId) {
console.log(`>>> [父组件接收] 航线 ID: ${routeId}`);
try {
const response = await getRoutes(routeId);
if (response.code === 200 && response.data) {
const routeData = response.data;
// 线
const route = {
id: routeData.id,
name: routeData.callSign,
scenarioId: routeData.scenarioId,
points: routeData.waypoints ? routeData.waypoints.length : 0,
waypoints: routeData.waypoints || []
};
// 线
this.openRouteDialog(route);
}
} catch (error) {
this.$message.error('获取航线数据失败');
console.error('获取航线数据失败:', error);
}
},
// 线
showOnlineMembersDialog() {
this.showOnlineMembers = true;

Loading…
Cancel
Save