diff --git a/ruoyi-ui/src/views/cesiumMap/ContextMenu.vue b/ruoyi-ui/src/views/cesiumMap/ContextMenu.vue index 7d67f55..65487ff 100644 --- a/ruoyi-ui/src/views/cesiumMap/ContextMenu.vue +++ b/ruoyi-ui/src/views/cesiumMap/ContextMenu.vue @@ -8,7 +8,7 @@ -
二维GIS地图区域
@@ -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;