diff --git a/ruoyi-ui/src/views/cesiumMap/index.vue b/ruoyi-ui/src/views/cesiumMap/index.vue
index cf4a945..37896eb 100644
--- a/ruoyi-ui/src/views/cesiumMap/index.vue
+++ b/ruoyi-ui/src/views/cesiumMap/index.vue
@@ -562,6 +562,22 @@ export default {
}
this.allEntities = this.allEntities.filter(item => item.id !== routeId && item.id !== `route-platform-${routeId}`);
},
+ /** 动态推演:更新某条航线的平台图标位置(position: { lng, lat, alt } 或 Cesium.Cartesian3) */
+ updatePlatformPosition(routeId, position) {
+ if (!this.viewer) return;
+ const entity = this.viewer.entities.getById(`route-platform-${routeId}`);
+ if (!entity || !entity.position) return;
+ let cartesian;
+ if (position && position.x !== undefined && position.y !== undefined && position.z !== undefined) {
+ cartesian = position;
+ } else if (position && position.lng != null && position.lat != null) {
+ const alt = position.alt != null ? Number(position.alt) : 0;
+ cartesian = Cesium.Cartesian3.fromDegrees(Number(position.lng), Number(position.lat), alt);
+ } else {
+ return;
+ }
+ entity.position = cartesian;
+ },
checkCesiumLoaded() {
if (typeof Cesium === 'undefined') {
console.error('Cesium未加载,请检查CDN链接');
diff --git a/ruoyi-ui/src/views/childRoom/RightPanel.vue b/ruoyi-ui/src/views/childRoom/RightPanel.vue
index d972568..3187dc1 100644
--- a/ruoyi-ui/src/views/childRoom/RightPanel.vue
+++ b/ruoyi-ui/src/views/childRoom/RightPanel.vue
@@ -85,7 +85,7 @@
{{ point.name }}
-
高度: {{ point.alt }}m | 速度: {{ point.speed }}
+
高度: {{ point.alt }}m | 速度: {{ point.speed }} | 相对K: {{ formatWaypointKTime(point.startTime) }}
@@ -334,6 +334,17 @@ export default {
}
},
methods: {
+ /** 航点 startTime(如 K+00:40:00)格式化为简短显示:K+40 或 K-15 */
+ formatWaypointKTime(startTime) {
+ if (!startTime || typeof startTime !== 'string') return '—';
+ const m = startTime.match(/K([+-])(\d{2}):(\d{2})/);
+ if (!m) return startTime;
+ const sign = m[1];
+ const h = parseInt(m[2], 10);
+ const min = parseInt(m[3], 10);
+ const totalMin = h * 60 + min;
+ return totalMin === 0 ? 'K+0' : `K${sign}${totalMin}`;
+ },
// 切换方案展开/折叠
togglePlan(planId) {
const index = this.expandedPlans.indexOf(planId)
diff --git a/ruoyi-ui/src/views/childRoom/TopHeader.vue b/ruoyi-ui/src/views/childRoom/TopHeader.vue
index b3e3b34..b04d5d2 100644
--- a/ruoyi-ui/src/views/childRoom/TopHeader.vue
+++ b/ruoyi-ui/src/views/childRoom/TopHeader.vue
@@ -233,11 +233,18 @@
-
+
{{ $t('topHeader.info.combatTime') }}
-
{{ combatTime }}
+
+ {{ combatTime }}
+
+
@@ -312,6 +319,14 @@ export default {
type: String,
default: ''
},
+ roomDetail: {
+ type: Object,
+ default: null
+ },
+ canSetKTime: {
+ type: Boolean,
+ default: false
+ },
userAvatar: {
type: String,
default: 'https://cube.elemecdn.com/0/88dd03f9bf287d08f58fbcf58fddbf4a8c6/avatar.png'
@@ -389,9 +404,7 @@ export default {
this.$emit('import-layer')
},
- importRoute() {
- this.$emit('import-route')
- },
+
exportPlan() {
this.$emit('export-plan')
@@ -856,6 +869,17 @@ export default {
font-weight: 600;
}
+.info-box.clickable {
+ cursor: pointer;
+}
+
+.info-box .set-k-hint {
+ margin-left: 4px;
+ font-size: 12px;
+ color: #008aff;
+ vertical-align: middle;
+}
+
.info-icon {
font-size: 20px;
color: #008aff;
diff --git a/ruoyi-ui/src/views/childRoom/index.vue b/ruoyi-ui/src/views/childRoom/index.vue
index 041697d..d50aaea 100644
--- a/ruoyi-ui/src/views/childRoom/index.vue
+++ b/ruoyi-ui/src/views/childRoom/index.vue
@@ -36,6 +36,26 @@
确 定
+
+
+
+
+
+
+
+ 航线的任务时间将以此 K 时为基准进行加减;航点表时间为相对 K 的分钟数。房主/管理员可随时再次点击「作战时间」修改 K 时。
+
+
+