-
航线列表
+
@@ -66,7 +66,6 @@
v-for="point in selectedRouteDetails.waypoints"
:key="point.name"
class="waypoint-item"
- @click="handleOpenWaypointDialog(point)"
>
@@ -272,6 +271,11 @@ export default {
this.$emit('select-route', route)
},
+ // 新增:新建航线事件
+ handleCreateRoute() {
+ this.$emit('create-route')
+ },
+
handleOpenRouteDialog(route) {
this.$emit('open-route-dialog', route)
},
@@ -377,13 +381,31 @@ export default {
margin-bottom: 20px;
}
+/* 新增:标题栏容器样式 */
+.section-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 2px solid rgba(0, 138, 255, 0.2);
+ margin-bottom: 10px;
+ padding-bottom: 8px;
+}
+
+/* 修改:移除了原有的 border-bottom,改在 section-header 中统一定义 */
.section-title {
font-size: 14px;
font-weight: 600;
color: #008aff;
- margin-bottom: 10px;
- padding-bottom: 8px;
- border-bottom: 2px solid rgba(0, 138, 255, 0.2);
+}
+
+/* 新增:头部按钮样式 */
+.header-action-btn {
+ padding: 0;
+ color: #008aff;
+}
+
+.header-action-btn:hover {
+ color: #0066cc;
}
.route-list {
@@ -464,7 +486,6 @@ export default {
padding: 10px;
background: rgba(255, 255, 255, 0.8);
border-radius: 6px;
- cursor: pointer;
transition: all 0.3s;
border: 1px solid rgba(0, 138, 255, 0.1);
}
diff --git a/ruoyi-ui/src/views/childRoom/index.vue b/ruoyi-ui/src/views/childRoom/index.vue
index cb86576..bfbf1b6 100644
--- a/ruoyi-ui/src/views/childRoom/index.vue
+++ b/ruoyi-ui/src/views/childRoom/index.vue
@@ -11,7 +11,6 @@
支持标绘/航线/空域/实时态势
-
r.id === updatedRoute.id);
+ if (index !== -1) {
+ // 使用 splice 触发响应式更新
+ const newRouteData = { ...this.routes[index], ...updatedRoute };
+ this.routes.splice(index, 1, newRouteData);
+
+ // 如果当前选中的是这条航线,同步更新详情中的名称
+ if (this.selectedRouteDetails && this.selectedRouteId === updatedRoute.id) {
+ this.selectedRouteDetails.name = updatedRoute.name;
+ }
+
+ this.$message.success('航线名称更新成功');
+ }
+ },
+ // 新建航线(占位)
+ createRoute() {
+ this.$message.info('新建航线功能开发中...');
},
// 航点编辑弹窗相关方法
openWaypointDialog(waypoint) {
@@ -375,8 +391,32 @@ export default {
this.showWaypointDialog = true;
},
updateWaypoint(updatedWaypoint) {
- // 这里可以添加实际的更新逻辑
- this.$message.success('航点更新成功');
+ // 1. 检查是否有正在编辑的航线详情
+ if (this.selectedRouteDetails && this.selectedRouteDetails.waypoints) {
+
+ // 2. 找到当前被编辑的这个航点在数组中的位置
+ const index = this.selectedRouteDetails.waypoints.indexOf(this.selectedWaypoint);
+
+ if (index !== -1) {
+ // 3. 使用 splice 方法替换数据
+ this.selectedRouteDetails.waypoints.splice(index, 1, updatedWaypoint);
+
+ // 4. 更新当前的选中引用,以便连续编辑
+ this.selectedWaypoint = updatedWaypoint;
+
+ this.$message.success('航点更新成功');
+ } else {
+ // 如果用 indexOf 没找到,尝试用名字匹配兜底
+ const nameIndex = this.selectedRouteDetails.waypoints.findIndex(p => p.name === this.selectedWaypoint.name);
+ if (nameIndex !== -1) {
+ this.selectedRouteDetails.waypoints.splice(nameIndex, 1, updatedWaypoint);
+ this.selectedWaypoint = updatedWaypoint;
+ this.$message.success('航点更新成功');
+ } else {
+ this.$message.error('更新失败:未找到对应航点');
+ }
+ }
+ }
},
updateTime() {
const now = new Date();
@@ -734,8 +774,7 @@ export default {
{ name: 'WP4', altitude: 5800, speed: '830km/h', eta: 'K+01:25:00' },
]
};
- // 打开航线编辑弹窗
- this.openRouteDialog(route);
+ // 移除原有的 this.openRouteDialog(route);
},
addWaypoint() {
diff --git a/ruoyi-ui/src/views/dialogs/RouteEditDialog.vue b/ruoyi-ui/src/views/dialogs/RouteEditDialog.vue
index ecee213..f62fd46 100644
--- a/ruoyi-ui/src/views/dialogs/RouteEditDialog.vue
+++ b/ruoyi-ui/src/views/dialogs/RouteEditDialog.vue
@@ -1,66 +1,30 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+
diff --git a/ruoyi-ui/src/views/dialogs/WaypointEditDialog.vue b/ruoyi-ui/src/views/dialogs/WaypointEditDialog.vue
index f32ec32..57e05d4 100644
--- a/ruoyi-ui/src/views/dialogs/WaypointEditDialog.vue
+++ b/ruoyi-ui/src/views/dialogs/WaypointEditDialog.vue
@@ -1,52 +1,61 @@
-
-
-
+
-
+
-
-
+
-
+
-
-
+
-
-
-
-
-
+
-
-
-
+
+
+
+
+
+
+
-
+
@@ -174,7 +174,7 @@
-
© 2026 多人联网演示系统 | 支持Windows/国产化系统互通
+
© 2026 网络化任务规划系统 | 支持Windows/国产化系统互通
diff --git a/ruoyi-ui/src/views/selectRoom/index.vue b/ruoyi-ui/src/views/selectRoom/index.vue
index e79005e..0f4daef 100644
--- a/ruoyi-ui/src/views/selectRoom/index.vue
+++ b/ruoyi-ui/src/views/selectRoom/index.vue
@@ -99,7 +99,7 @@
diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js
index 25854e2..e2698e5 100644
--- a/ruoyi-ui/vue.config.js
+++ b/ruoyi-ui/vue.config.js
@@ -10,7 +10,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
-const baseUrl = 'http://127.0.0.1:8080' // 后端接口
+const baseUrl = 'http://192.168.50.30:8080' // 后端接口
const port = process.env.port || process.env.npm_config_port || 80 // 端口
// 定义 Cesium 源码路径