diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RoutesController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RoutesController.java index 6ca3f7c..5ce71d7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RoutesController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/RoutesController.java @@ -124,6 +124,45 @@ public class RoutesController extends BaseController } /** + * 保存六步法任务页数据到 Redis(背景、图标、文本框) + */ + @PreAuthorize("@ss.hasPermi('system:routes:edit')") + @PostMapping("/saveTaskPageData") + public AjaxResult saveTaskPageData(@RequestBody java.util.Map params) + { + Object roomId = params.get("roomId"); + Object data = params.get("data"); + if (roomId == null || data == null) { + return AjaxResult.error("参数不完整"); + } + String key = "room:" + String.valueOf(roomId) + ":task_page"; + fourTRedisTemplate.opsForValue().set(key, data.toString()); + return success(); + } + + /** + * 从 Redis 获取六步法任务页数据 + */ + @PreAuthorize("@ss.hasPermi('system:routes:query')") + @GetMapping("/getTaskPageData") + public AjaxResult getTaskPageData(Long roomId) + { + if (roomId == null) { + return AjaxResult.error("房间ID不能为空"); + } + String key = "room:" + String.valueOf(roomId) + ":task_page"; + String val = fourTRedisTemplate.opsForValue().get(key); + if (val != null && !val.isEmpty()) { + try { + return success(JSON.parseObject(val)); + } catch (Exception e) { + return success(val); + } + } + return success(); + } + + /** * 获取导弹发射参数列表(Redis,房间+航线+平台为 key,值为数组,每项含 angle/distance/launchTimeMinutesFromK/startLng/startLat/platformHeadingDeg) */ @PreAuthorize("@ss.hasPermi('system:routes:query')") diff --git a/ruoyi-ui/src/api/system/routes.js b/ruoyi-ui/src/api/system/routes.js index 6be88f1..4a1853b 100644 --- a/ruoyi-ui/src/api/system/routes.js +++ b/ruoyi-ui/src/api/system/routes.js @@ -81,6 +81,25 @@ export function get4TData(params) { }) } +// 保存六步法任务页数据到 Redis(背景、图标、文本框) +export function saveTaskPageData(data) { + return request({ + url: '/system/routes/saveTaskPageData', + method: 'post', + data, + headers: { repeatSubmit: false } + }) +} + +// 从 Redis 获取六步法任务页数据 +export function getTaskPageData(params) { + return request({ + url: '/system/routes/getTaskPageData', + method: 'get', + params + }) +} + // 获取导弹发射参数(Redis:房间+航线+平台为 key) export function getMissileParams(params) { return request({ diff --git a/ruoyi-ui/src/views/cesiumMap/index.vue b/ruoyi-ui/src/views/cesiumMap/index.vue index f4c4a1b..27c29c8 100644 --- a/ruoyi-ui/src/views/cesiumMap/index.vue +++ b/ruoyi-ui/src/views/cesiumMap/index.vue @@ -1031,7 +1031,7 @@ export default { this.tempEntity = this.viewer.entities.add({ polyline: { positions: solidPositions, - width: 3, + width: 2, material: Cesium.Color.fromCssColorString('#64748b'), arcType: Cesium.ArcType.NONE } @@ -1052,7 +1052,7 @@ export default { } return last ? [last, last] : []; }, false), - width: 3, + width: 2, material: new Cesium.PolylineDashMaterialProperty({ color: Cesium.Color.fromCssColorString('#64748b'), dashLength: 16 @@ -1194,7 +1194,7 @@ export default { if (last && this.activeCursorPosition) return [last, this.activeCursorPosition]; return last ? [last, last] : []; }, false), - width: 3, + width: 2, material: new Cesium.PolylineDashMaterialProperty({ color: Cesium.Color.fromCssColorString('#64748b'), dashLength: 16 @@ -1255,7 +1255,7 @@ export default { this.tempEntity = this.viewer.entities.add({ polyline: { positions: solidPositions, - width: 3, + width: 2, material: Cesium.Color.fromCssColorString('#64748b'), arcType: Cesium.ArcType.NONE } @@ -1268,7 +1268,7 @@ export default { if (last && this.activeCursorPosition) return [last, this.activeCursorPosition]; return last ? [last, last] : []; }, false), - width: 3, + width: 2, material: new Cesium.PolylineDashMaterialProperty({ color: Cesium.Color.fromCssColorString('#64748b'), dashLength: 16 @@ -1421,7 +1421,7 @@ export default { this.tempEntity = this.viewer.entities.add({ polyline: { positions: solidPositions, - width: 3, + width: 2, material: Cesium.Color.fromCssColorString('#64748b'), arcType: Cesium.ArcType.NONE } @@ -2013,8 +2013,8 @@ export default { const defaultWpColor = wpStyle.color || '#f1f5f9'; const defaultWpOutline = wpStyle.outlineColor || '#64748b'; const wpOutlineW = wpStyle.outlineWidth != null ? wpStyle.outlineWidth : 1.5; - // 航线默认简约灰蓝色、线宽 3;与主航线一致的线型用于主线和转弯半径弧 - const lineWidth = lineStyle.width != null ? lineStyle.width : 3; + // 航线默认简约灰蓝色、线宽 2(更细更清晰);与主航线一致的线型用于主线和转弯半径弧 + const lineWidth = lineStyle.width != null ? lineStyle.width : 2; const lineColor = lineStyle.color || '#64748b'; const gapColor = lineStyle.gapColor != null ? lineStyle.gapColor : '#cbd5e1'; const dashLen = lineStyle.dashLength != null ? lineStyle.dashLength : 20; @@ -2511,7 +2511,7 @@ export default { id: hitLineId, polyline: { positions: routePositionsCallback, - width: 48, + width: 12, material: Cesium.Color.TRANSPARENT, arcType: Cesium.ArcType.NONE, zIndex: 0 @@ -2521,7 +2521,7 @@ export default { if (this.allEntities) { this.allEntities.push({ id: hitLineId, entity: hitEntity, type: 'route', routeId }); } - const displayWidth = Math.max(lineWidth, 5); + const displayWidth = Math.max(lineWidth, 2); // 绘制主航线(视觉层,不参与拾取,点击由透明层响应) const routeEntity = this.viewer.entities.add({ id: lineId, @@ -6793,7 +6793,7 @@ export default { this.copyPreviewEntity = this.viewer.entities.add({ polyline: { positions: positions, - width: 4, + width: 2, material: Cesium.Color.fromCssColorString('rgba(0, 120, 255, 0.75)'), arcType: Cesium.ArcType.NONE } @@ -6875,7 +6875,7 @@ export default { this.addWaypointPreviewEntity = this.viewer.entities.add({ polyline: { positions: positions, - width: 3, + width: 2, material: new Cesium.PolylineDashMaterialProperty({ color: Cesium.Color.fromCssColorString('#64748b'), dashLength: 16 diff --git a/ruoyi-ui/src/views/childRoom/BottomLeftPanel.vue b/ruoyi-ui/src/views/childRoom/BottomLeftPanel.vue index e752bf6..78dcc61 100644 --- a/ruoyi-ui/src/views/childRoom/BottomLeftPanel.vue +++ b/ruoyi-ui/src/views/childRoom/BottomLeftPanel.vue @@ -29,6 +29,7 @@
+ +
+ + + + + + + +
{{ box.text }}
+ >