Merge branch 'refs/heads/main' into dev_20260130_RemoveRedis
This commit is contained in:
commit
90d8311840
@ -7,6 +7,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
/**
|
||||
* 雷达控制链路
|
||||
@ -18,6 +20,8 @@ public class SarControlController {
|
||||
@Autowired
|
||||
private ISarControlService controlInfoService;
|
||||
|
||||
@Autowired
|
||||
private ObjectMapper objectMapper;
|
||||
/**
|
||||
* 发送控制指令
|
||||
* @param param
|
||||
@ -37,7 +41,26 @@ public class SarControlController {
|
||||
*/
|
||||
@RequestMapping("/turnon")
|
||||
public Result turnOn(@RequestBody String ip) {
|
||||
controlInfoService.turnOn(ip);
|
||||
String ipVal = "";
|
||||
try {
|
||||
// 1. 使用 ObjectMapper 将 JSON 字符串解析成一个 JsonNode 树
|
||||
JsonNode rootNode = objectMapper.readTree(ip);
|
||||
|
||||
// 2. 从树中获取 "payloadId" 节点,并将其值转换为文本
|
||||
ipVal = rootNode.path("payloadId").asText();
|
||||
|
||||
// 检查是否成功获取
|
||||
if (ipVal == null || ipVal.isEmpty()) {
|
||||
// 根据你的业务逻辑返回错误,例如
|
||||
return Result.error("请求体中缺少 'payloadId' 或其值为空");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 处理JSON解析异常
|
||||
// 记录日志 e.g., log.error("Failed to parse turnOn payload", e);
|
||||
return Result.error("请求体JSON格式错误");
|
||||
}
|
||||
// 3. 调用服务层
|
||||
controlInfoService.turnOn(ipVal);
|
||||
return Result.successData("发送成功");
|
||||
}
|
||||
|
||||
@ -48,7 +71,27 @@ public class SarControlController {
|
||||
*/
|
||||
@RequestMapping("/endall")
|
||||
public Result endAll(@RequestBody String ip) {
|
||||
controlInfoService.endAll(ip);
|
||||
String ipVal = "";
|
||||
try {
|
||||
// 1. 使用 ObjectMapper 将 JSON 字符串解析成一个 JsonNode 树
|
||||
JsonNode rootNode = objectMapper.readTree(ip);
|
||||
|
||||
// 2. 从树中获取 "payloadId" 节点,并将其值转换为文本
|
||||
ipVal = rootNode.path("payloadId").asText();
|
||||
|
||||
// 检查是否成功获取
|
||||
if (ipVal == null || ipVal.isEmpty()) {
|
||||
// 根据你的业务逻辑返回错误,例如
|
||||
return Result.error("请求体中缺少 'payloadId' 或其值为空");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
// 处理JSON解析异常
|
||||
// 记录日志 e.g., log.error("Failed to parse turnOn payload", e);
|
||||
return Result.error("请求体JSON格式错误");
|
||||
}
|
||||
// 3. 调用服务层
|
||||
controlInfoService.endAll(ipVal);
|
||||
return Result.successData("发送成功");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
window.config = {
|
||||
env: 'offline', //online
|
||||
//api: 'http://127.0.0.1:9116/', // 外网服务器,
|
||||
api: 'http://127.0.0.1:9116',
|
||||
socket: 'http://127.0.0.1:9116', //外网服务器,
|
||||
imagePath: 'http://192.168.112.181:9000/files',
|
||||
// imagePath: 'http://127.0.0.1:8080/files',
|
||||
api: 'http://182.92.203.107:9116',
|
||||
socket: 'http://182.92.203.107:9116', //外网服务器,
|
||||
imagePath: 'http://182.92.203.107:8080/files',
|
||||
arithmeticPath: 'http://127.0.0.1:18090/ktkx/UavPlanning/SAR',
|
||||
tokenKey: 'accessToken',
|
||||
refreshTokenKey: 'refreshToken',
|
||||
|
||||
@ -86,7 +86,7 @@ export const changePayloadRadarOpenState = params =>
|
||||
|
||||
|
||||
export const changeJobStatus = params =>
|
||||
req('post', '/sar/job/status', params)
|
||||
req('post', '/sar/job/status/selectTask', params)
|
||||
|
||||
export const execBrightnessexport = params =>
|
||||
req('post', '/jm/job/exec/brightnessexport', params)
|
||||
req('post', '/jm/job/exec/brightness', params)
|
||||
|
||||
@ -353,7 +353,7 @@ export function decimalLastNonZeroDecimal(num) {
|
||||
/**
|
||||
* 数值(经度或纬度)转度分秒
|
||||
* @param {any} decimal
|
||||
* @param {any} type lon | lat 经度 or 维度
|
||||
* @param {any} type lon | lat 经度 or 纬度
|
||||
* @returns {any}
|
||||
*/
|
||||
export function decimalToDMS(decimal, type) {
|
||||
|
||||
@ -252,7 +252,7 @@ export default {
|
||||
{ name: '惯导状态', value: '位置+速度+航向', unit: '' },
|
||||
{ name: '年月日', value: moment().format('YYYY-MM-DD'), unit: '' },
|
||||
{ name: '经度', value: '120.34534', unit: '°' },
|
||||
{ name: '维度', value: '40.34534', unit: '°' },
|
||||
{ name: '纬度', value: '40.34534', unit: '°' },
|
||||
{ name: '高度', value: 45002, unit: 'm' },
|
||||
],
|
||||
imu: [
|
||||
@ -2674,7 +2674,7 @@ export default {
|
||||
{ name: '惯导状态', value: this.imuStatus[data.imuStatus], unit: '' },
|
||||
{ name: '年月日', value: data.date, unit: '' },
|
||||
{ name: '经度', value: data.longitude, unit: '°' },
|
||||
{ name: '维度', value: data.latitude, unit: '°' },
|
||||
{ name: '纬度', value: data.latitude, unit: '°' },
|
||||
{ name: '高度', value: data.altitude, unit: 'm' },
|
||||
]
|
||||
this.detailUav.statusInfo.imu = [
|
||||
|
||||
@ -128,7 +128,7 @@ export default {
|
||||
// 操作雷达
|
||||
async handleRadar(row, type) {
|
||||
if (type === 1) {
|
||||
deviceControlTurnon({ payloadId: row.id }).then(res => {
|
||||
deviceControlTurnon({ payloadId: row.ip }).then(res => {
|
||||
if (res.data.code === 200) {
|
||||
this.$message.success('雷达开机成功')
|
||||
}
|
||||
@ -141,7 +141,7 @@ export default {
|
||||
type: 'warning'
|
||||
})
|
||||
if (!bool) return;
|
||||
deviceControlEndall({ payloadId: row.id }).then(res => {
|
||||
deviceControlEndall({ payloadId: row.ip }).then(res => {
|
||||
if (res.data.code === 200) {
|
||||
this.$message.success('雷达关机成功')
|
||||
}
|
||||
|
||||
@ -101,6 +101,7 @@
|
||||
effect="light"
|
||||
content="修改"
|
||||
placement="top"
|
||||
:hide-after="1000"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -116,6 +117,7 @@
|
||||
effect="light"
|
||||
content="手动开机"
|
||||
placement="top"
|
||||
:hide-after="1000"
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-switch-button"
|
||||
@ -136,6 +138,7 @@
|
||||
icon="el-icon-close"
|
||||
size="mini"
|
||||
circle
|
||||
:hide-after="1000"
|
||||
@click="handleRadar(scope.row, 2)"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
@ -145,6 +148,7 @@
|
||||
effect="light"
|
||||
content="删除"
|
||||
placement="top"
|
||||
:hide-after="1000"
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
|
||||
@ -987,7 +987,6 @@ export default {
|
||||
let list = []
|
||||
data.forEach(item => {
|
||||
item.statusName = this.jobStatus[item.status + '']
|
||||
console.log(item, 33333333333);
|
||||
let uav = undefined
|
||||
let sar = undefined
|
||||
if (item.uavList.length) {
|
||||
|
||||
@ -20,7 +20,12 @@
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot:command>
|
||||
<el-tooltip effect="dark" content="新增任务" placement="top">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
content="新增任务"
|
||||
placement="top"
|
||||
:hide-after="1000"
|
||||
>
|
||||
<i class="ri-add-circle-line" @click="openAddForm"></i>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
@ -48,6 +53,7 @@
|
||||
effect="dark"
|
||||
:content="item.check ? '隐藏' : '显示'"
|
||||
placement="top"
|
||||
:hide-after="1000"
|
||||
>
|
||||
<i
|
||||
:class="item.check ? 'ri-eye-off-line' : 'ri-eye-line'"
|
||||
@ -59,6 +65,7 @@
|
||||
effect="dark"
|
||||
content="执行"
|
||||
placement="top"
|
||||
:hide-after="1000"
|
||||
>
|
||||
<i
|
||||
class="ri-arrow-up-circle-line"
|
||||
@ -70,6 +77,7 @@
|
||||
content="重新执行"
|
||||
placement="top"
|
||||
v-if="item.status === 2"
|
||||
:hide-after="1000"
|
||||
>
|
||||
<i
|
||||
class="ri-restart-line"
|
||||
|
||||
@ -0,0 +1,139 @@
|
||||
// /src/utils/OrthoImageryManager.js
|
||||
export default class OrthoImageryManager {
|
||||
|
||||
constructor(viewer, Cesium, options = {}) {
|
||||
this.viewer = viewer;
|
||||
this.Cesium = Cesium;
|
||||
|
||||
this.layerMap = new Map(); // key -> layer
|
||||
this.layerQueue = []; // 先进先出控制数量
|
||||
|
||||
this.maxLayers = options.maxLayers || 400;
|
||||
|
||||
// 全局亮度与透明度
|
||||
this.globalBrightness = options.brightness ?? 1.0;
|
||||
this.globalAlpha = options.alpha ?? 1.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加或更新新推送的图片
|
||||
*/
|
||||
add(data) {
|
||||
const key = `${data.jobId}-${data.uavId}~${data.fileId}`;
|
||||
|
||||
// 已存在则跳过
|
||||
if (this.layerMap.has(key)) return;
|
||||
|
||||
const rectangle = this.Cesium.Rectangle.fromDegrees(
|
||||
Math.min(data.left1Lon, data.right2Lon),
|
||||
Math.min(data.left1Lat, data.right2Lat),
|
||||
Math.max(data.left1Lon, data.right2Lon),
|
||||
Math.max(data.left1Lat, data.right2Lat)
|
||||
);
|
||||
|
||||
const provider = new this.Cesium.SingleTileImageryProvider({
|
||||
url: window.config.imagePath + data.relativePath,
|
||||
rectangle
|
||||
});
|
||||
|
||||
const layer = this.viewer.cesiumViewer.imageryLayers.addImageryProvider(provider);
|
||||
|
||||
// ✅ 使用全局亮度和透明度,保证新图生效
|
||||
layer.brightness = this.globalBrightness;
|
||||
layer.alpha = this.globalAlpha;
|
||||
|
||||
this.layerMap.set(key, layer);
|
||||
this.layerQueue.push(key);
|
||||
|
||||
this._checkLimit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置全局亮度,影响所有已有图片和未来新推送的图片
|
||||
*/
|
||||
setBrightness(value) {
|
||||
this.globalBrightness = value;
|
||||
this.layerMap.forEach(layer => {
|
||||
layer.brightness = value;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置全局透明度
|
||||
*/
|
||||
setAlphaAll(value) {
|
||||
this.globalAlpha = value;
|
||||
this.layerMap.forEach(layer => {
|
||||
layer.alpha = value;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 对单张图片单独设置亮度(不影响全局)
|
||||
*/
|
||||
setBrightnessForFile(fileId, value) {
|
||||
const key = [...this.layerMap.keys()].find(k => k.includes(fileId));
|
||||
if (!key) return;
|
||||
|
||||
const layer = this.layerMap.get(key);
|
||||
if (layer) {
|
||||
layer.brightness = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对单张图片单独设置透明度
|
||||
*/
|
||||
setAlphaForFile(fileId, value) {
|
||||
const key = [...this.layerMap.keys()].find(k => k.includes(fileId));
|
||||
if (!key) return;
|
||||
|
||||
const layer = this.layerMap.get(key);
|
||||
if (layer) {
|
||||
layer.alpha = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理超过最大图层数
|
||||
*/
|
||||
_checkLimit() {
|
||||
while (this.layerQueue.length > this.maxLayers) {
|
||||
const oldestKey = this.layerQueue.shift();
|
||||
const layer = this.layerMap.get(oldestKey);
|
||||
if (layer) {
|
||||
this.viewer.imageryLayers.remove(layer);
|
||||
this.layerMap.delete(oldestKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单张图片
|
||||
*/
|
||||
remove(fileId) {
|
||||
const key = [...this.layerMap.keys()].find(k => k.includes(fileId));
|
||||
if (!key) return;
|
||||
|
||||
const layer = this.layerMap.get(key);
|
||||
if (layer) {
|
||||
this.viewer.imageryLayers.remove(layer);
|
||||
this.layerMap.delete(key);
|
||||
|
||||
// 也从队列里移除
|
||||
const index = this.layerQueue.indexOf(key);
|
||||
if (index > -1) this.layerQueue.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空所有图片
|
||||
*/
|
||||
clearAll() {
|
||||
this.layerMap.forEach(layer => {
|
||||
this.viewer.cesiumViewer.imageryLayers.remove(layer);
|
||||
});
|
||||
this.layerMap.clear();
|
||||
this.layerQueue = [];
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
// src/cesium/layers/OrthoManager.js
|
||||
|
||||
export default class OrthoManager {
|
||||
constructor(viewer, Cesium) {
|
||||
this.viewer = viewer
|
||||
this.Cesium = Cesium
|
||||
this.entityMap = new Map()
|
||||
this.currentBrightness = 1.0
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加正射影像
|
||||
*/
|
||||
add(data) {
|
||||
const key = `${data.jobId}-${data.uavId}~${data.fileId}`
|
||||
if (this.entityMap.has(key)) return
|
||||
|
||||
const C = this.Cesium
|
||||
let cby_bg_data = [
|
||||
data.left1Lon, data.left1Lat,
|
||||
data.left2Lon, data.left2Lat,
|
||||
data.right2Lon, data.right2Lat,
|
||||
data.right1Lon, data.right1Lat,
|
||||
]
|
||||
const positions = C.Cartesian3.fromDegreesArray(cby_bg_data)
|
||||
const entity = this.viewer.entities.add({
|
||||
id: key,
|
||||
polygon: {
|
||||
hierarchy: positions,
|
||||
perPositionHeight: true,
|
||||
material: new C.ImageMaterialProperty({
|
||||
image: window.config.imagePath + data.relativePath,
|
||||
transparent: false,
|
||||
color: new C.Color(
|
||||
this.currentBrightness,
|
||||
this.currentBrightness,
|
||||
this.currentBrightness,
|
||||
1
|
||||
)
|
||||
})
|
||||
}
|
||||
})
|
||||
this.entityMap.set(key, entity)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置全局亮度
|
||||
*/
|
||||
setBrightness(value) {
|
||||
this.currentBrightness = value
|
||||
const C = this.Cesium
|
||||
|
||||
this.entityMap.forEach(entity => {
|
||||
entity.polygon.material.color =
|
||||
new C.Color(value, value, value, 1)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除全部影像
|
||||
*/
|
||||
clearAll() {
|
||||
this.entityMap.forEach(entity => {
|
||||
this.viewer.entities.remove(entity)
|
||||
})
|
||||
this.entityMap.clear()
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除某个任务(jobId-uavId)
|
||||
*/
|
||||
clearByTask(jobId, uavId) {
|
||||
const prefix = `${jobId}-${uavId}`
|
||||
|
||||
this.entityMap.forEach((entity, key) => {
|
||||
if (key.startsWith(prefix)) {
|
||||
this.viewer.entities.remove(entity)
|
||||
this.entityMap.delete(key)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除单张图片
|
||||
*/
|
||||
clearByFile(jobId, uavId, fileId) {
|
||||
const key = `${jobId}-${uavId}~${fileId}`
|
||||
|
||||
if (this.entityMap.has(key)) {
|
||||
this.viewer.entities.remove(this.entityMap.get(key))
|
||||
this.entityMap.delete(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
import { lodLayer, viewer } from '@/components/dt-scene/index.vue'
|
||||
|
||||
import OrthoImageryManager from './OrthoImageryManager'
|
||||
import OrthoManager from './OrthoManager'
|
||||
// 新增空间态势统计
|
||||
|
||||
// 台风列表
|
||||
@ -21,7 +22,11 @@ import {
|
||||
getTaskItemDetail,
|
||||
getTaskListData,
|
||||
getUavListData,
|
||||
reRunTask, stopTaskFly, getExecJobs, execBrightnessexport
|
||||
reRunTask,
|
||||
stopTaskFly,
|
||||
getExecJobs,
|
||||
execBrightnessexport,
|
||||
changeJobStatus
|
||||
} from '@/api/task'
|
||||
import UavTarget from './uavTarget'
|
||||
import PicturesUpload from '../pictures-upload/index.vue'
|
||||
@ -51,6 +56,7 @@ let taskPlanAreaCollection = {}
|
||||
let radarSceneEntity = {}
|
||||
let sceneEntity = {}
|
||||
let taskListResource = []
|
||||
let orthoManager = null
|
||||
export default {
|
||||
name: 'TwinSituation',
|
||||
props: {
|
||||
@ -259,7 +265,7 @@ export default {
|
||||
{ name: '惯导状态', value: '位置+速度+航向', unit: '' },
|
||||
{ name: '年月日', value: moment().format('YYYY-MM-DD'), unit: '' },
|
||||
{ name: '经度', value: '', unit: '°' },
|
||||
{ name: '维度', value: '', unit: '°' },
|
||||
{ name: '纬度', value: '', unit: '°' },
|
||||
{ name: '高度', value: '', unit: 'm' },
|
||||
],
|
||||
imu: [
|
||||
@ -397,7 +403,9 @@ export default {
|
||||
emptyImg: require('@/assets/img/common/empty.svg'),
|
||||
lightPercent: 0,
|
||||
contrastPercent: 10,
|
||||
imageInfos: undefined
|
||||
imageInfos: {
|
||||
brightness: 10
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -502,12 +510,24 @@ export default {
|
||||
// this.resourceClick(this.resourceList.data[0])
|
||||
this.handleSceneComplete()
|
||||
this.getTaskList()
|
||||
|
||||
// orthoManager = new OrthoManager(
|
||||
// viewer,
|
||||
// DT.Cesium
|
||||
// )
|
||||
orthoManager = new OrthoImageryManager(viewer, DT.Cesium, {
|
||||
maxLayers: 400,
|
||||
brightness: 1.2, // 默认亮度
|
||||
alpha: 1.0 // 默认透明度
|
||||
})
|
||||
// this.startTest()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.SET_SPLIT_VISIBLE(false)
|
||||
this.removePictureHandle()
|
||||
if (orthoManager) {
|
||||
orthoManager.clearAll()
|
||||
orthoManager = null
|
||||
}
|
||||
// 移除任务区域
|
||||
for (let key in taskPlanAreaCollection) {
|
||||
if (taskPlanAreaCollection[key]) {
|
||||
@ -515,7 +535,6 @@ export default {
|
||||
viewer.entities.remove(item)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
for (let key in taskUavCollection) {
|
||||
if (taskUavCollection[key]) {
|
||||
@ -588,9 +607,9 @@ export default {
|
||||
}
|
||||
},
|
||||
// 亮度设置变化
|
||||
onLightChange: debounce(function (value) {
|
||||
onLightChange: debounce(function (val) {
|
||||
const imageInfos = { ...this.imageInfos }
|
||||
imageInfos.brightness = value
|
||||
orthoManager.setBrightness(val / 10)
|
||||
execBrightnessexport(imageInfos).then(res => {
|
||||
console.log('亮度调整成功');
|
||||
// this.$message.success('亮度调整成功')
|
||||
@ -1128,7 +1147,8 @@ export default {
|
||||
status: item.status,
|
||||
statusName: item.statusName,
|
||||
uav,
|
||||
sar
|
||||
sar,
|
||||
stopTooltipVisible: false
|
||||
})
|
||||
// TODO
|
||||
// item.pointList = [item.pointList]
|
||||
@ -1141,10 +1161,7 @@ export default {
|
||||
// this.addUavToScene(item)
|
||||
})
|
||||
if (data.length) {
|
||||
this.detailUav.chart.data[0].data = []
|
||||
this.detailUav.chart.data[1].data = []
|
||||
this.detailUav.chart.data[2].data = []
|
||||
this.detailUav.chart.data[3].data = []
|
||||
this.resetChartData()
|
||||
this.detailUav.id = data.length ? data[0].id : 1
|
||||
this.detailUav.visible = data.length ? true : false
|
||||
}
|
||||
@ -1342,14 +1359,11 @@ export default {
|
||||
},
|
||||
addJobLine(info, isFinish) {
|
||||
// 参数和数据校验
|
||||
console.log(info, info.uavList, 777777777777);
|
||||
|
||||
if (!info || !Array.isArray(info.uavList) || info.uavList.length === 0) return;
|
||||
const uav = info.uavList[0];
|
||||
if (!Array.isArray(uav.airlineList) || uav.airlineList.length === 0) return;
|
||||
const key = `${info.id}-${uav.uavId}`;
|
||||
let load = renderTaskInfo[key];
|
||||
console.log(load, key, 3333333);
|
||||
|
||||
if (load) {
|
||||
return;
|
||||
@ -1555,6 +1569,8 @@ export default {
|
||||
|
||||
},
|
||||
toggleTaskSceneShow(info, index) {
|
||||
console.log(info, 12312123);
|
||||
|
||||
// console.log('切换的info', info)
|
||||
// console.log('无人机详情面板', this.detailInfo)
|
||||
if (info.check) {
|
||||
@ -1580,6 +1596,10 @@ export default {
|
||||
// currentPicture = null
|
||||
// }
|
||||
this.removeTaskTarget(info.id);
|
||||
if (orthoManager) {
|
||||
orthoManager.clearAll()
|
||||
orthoManager = null
|
||||
}
|
||||
} else {
|
||||
this.addUavToScene(taskListResource[index])
|
||||
this.addTaskPlanArea(taskListResource[index].pointList, info.id, info.name)
|
||||
@ -1608,12 +1628,15 @@ export default {
|
||||
viewer.entities.remove(item)
|
||||
}
|
||||
})
|
||||
if (orthoManager) {
|
||||
orthoManager.clearAll()
|
||||
orthoManager = null
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.data.message)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
/**
|
||||
* 重新执行
|
||||
@ -2747,7 +2770,7 @@ export default {
|
||||
{ name: '惯导状态', value: this.imuStatus[data.imuStatus], unit: '' },
|
||||
{ name: '年月日', value: data.date, unit: '' },
|
||||
{ name: '经度', value: data.longitude, unit: '°' },
|
||||
{ name: '维度', value: data.latitude, unit: '°' },
|
||||
{ name: '纬度', value: data.latitude, unit: '°' },
|
||||
{ name: '高度', value: data.altitude, unit: 'm' },
|
||||
]
|
||||
this.detailUav.statusInfo.imu = [
|
||||
@ -2789,9 +2812,8 @@ export default {
|
||||
}
|
||||
},
|
||||
handleWebsocketWave(info) {
|
||||
console.log('SAR波形', JSON.parse(info.body))
|
||||
// console.log('SAR波形', JSON.parse(info.body))
|
||||
let data = JSON.parse(info.body)
|
||||
console.log('id对比', this.detailUav.id, data.payloadId);
|
||||
if (this.detailUav.visible && this.detailUav.id === data.jobId) {
|
||||
let channel1False = []
|
||||
let channel1Real = []
|
||||
@ -2813,8 +2835,6 @@ export default {
|
||||
this.detailUav.chart.data[1].data = channel1Real
|
||||
this.detailUav.chart.data[2].data = channel2False
|
||||
this.detailUav.chart.data[3].data = channel2Real
|
||||
console.log(this.detailUav.chart.data, 'ssssssssssssssss');
|
||||
|
||||
if (this.detailUav.activeNames.includes('4')) {
|
||||
if (this.$refs.uavDetailChart) {
|
||||
this.$refs.uavDetailChart.updateData(this.detailUav.chart.data)
|
||||
@ -2825,17 +2845,19 @@ export default {
|
||||
handleWebsocketImage(info) {
|
||||
// console.log('SAR图像', info.body)
|
||||
let data = JSON.parse(info.body)
|
||||
this.imageInfos = data
|
||||
this.imageInfos = Object.assign({}, this.imageInfos, data)
|
||||
this.imageInfos.brightness = data.brightness
|
||||
console.log('SAR图像2', data)
|
||||
this.addMarkPicture2(data)
|
||||
orthoManager.add(data)
|
||||
// this.addMarkPicture2(data)
|
||||
// console.log('灭有匹配到吗taskUavCollection', taskUavCollection, taskUavCollection[data.jobId])
|
||||
if (taskUavCollection[data.jobId]) {
|
||||
let find = taskUavCollection[data.jobId].find(item => item.uavId + '' === data.uavId + '')
|
||||
// console.log('找到添加图片的对象', find)
|
||||
if (find) {
|
||||
find.appendLoaderPicture(data)
|
||||
}
|
||||
}
|
||||
// if (taskUavCollection[data.jobId]) {
|
||||
// let find = taskUavCollection[data.jobId].find(item => item.uavId + '' === data.uavId + '')
|
||||
// // console.log('找到添加图片的对象', find)
|
||||
// if (find) {
|
||||
// find.appendLoaderPicture(data)
|
||||
// }
|
||||
// }
|
||||
// 更新列表里的数据
|
||||
let find = taskListResource.find(item => item.id === data.jobId)
|
||||
if (find) {
|
||||
@ -2876,8 +2898,6 @@ export default {
|
||||
// }));
|
||||
// if (this.tempAdd) return
|
||||
// this.tempAdd = true
|
||||
console.log(data, renderTaskInfo, 'tupiantupian');
|
||||
|
||||
let id = `${data.jobId}-${data.uavId}`
|
||||
// let target = renderTaskInfo[id]
|
||||
// if (target) {
|
||||
@ -2896,49 +2916,49 @@ export default {
|
||||
material: new DT.Cesium.ImageMaterialProperty({
|
||||
image: window.config.imagePath + data.relativePath,
|
||||
}),
|
||||
outline: true,
|
||||
outlineColor: DT.Cesium.Color.WHITE,
|
||||
outlineWidth: 2, //很多电脑当宽度>1时,没用
|
||||
outline: false,
|
||||
outlineColor: DT.Cesium.Color.RED,
|
||||
outlineWidth: 0, //很多电脑当宽度>1时,没用
|
||||
}
|
||||
})
|
||||
let markLineArr = []
|
||||
if (data.itemList) {
|
||||
data.itemList.forEach((item) => {
|
||||
let markId = `${data.jobId}-${data.uavId}-${data.fileId}-${item.id}~mark`
|
||||
let markPosition = DT.Cesium.Cartesian3.fromDegrees(item.left1Lon, item.left1Lat, 1)
|
||||
let markArr = [
|
||||
item.left1Lon, item.left1Lat, 1,
|
||||
item.left2Lon, item.left2Lat, 1,
|
||||
item.right2Lon, item.right2Lat, 1,
|
||||
item.right1Lon, item.right1Lat, 1,
|
||||
item.left1Lon, item.left1Lat, 1,
|
||||
]
|
||||
let markLine = viewer.entities.add({
|
||||
id: markId,
|
||||
show: false,
|
||||
position: markPosition,
|
||||
label: {
|
||||
text: this.detectType[item.type],
|
||||
font: '12px sans-serif',
|
||||
fillColor: DT.Cesium.Color.RED,
|
||||
horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT,
|
||||
verticalOrigin: DT.Cesium.VerticalOrigin.TOP,
|
||||
disableDepthTestDistance: 10000,
|
||||
showBackground: false,
|
||||
backgroundColor: DT.Cesium.Color.BLACK,
|
||||
style: DT.Cesium.LabelStyle.FILL_AND_OUTLINE,
|
||||
},
|
||||
polyline: {
|
||||
positions: DT.Cesium.Cartesian3.fromDegreesArrayHeights(markArr),
|
||||
// positions: DT.Cesium.Cartesian3.fromDegreesArray(markArr),
|
||||
width: 1,
|
||||
material: DT.Cesium.Color.RED,
|
||||
depthFailMaterial: DT.Cesium.Color.RED,
|
||||
zIndex: 3,
|
||||
}
|
||||
})
|
||||
markLineArr.push(markLine)
|
||||
})
|
||||
// data.itemList.forEach((item) => {
|
||||
// let markId = `${data.jobId}-${data.uavId}-${data.fileId}-${item.id}~mark`
|
||||
// let markPosition = DT.Cesium.Cartesian3.fromDegrees(item.left1Lon, item.left1Lat, 1)
|
||||
// let markArr = [
|
||||
// item.left1Lon, item.left1Lat, 1,
|
||||
// item.left2Lon, item.left2Lat, 1,
|
||||
// item.right2Lon, item.right2Lat, 1,
|
||||
// item.right1Lon, item.right1Lat, 1,
|
||||
// item.left1Lon, item.left1Lat, 1,
|
||||
// ]
|
||||
// let markLine = viewer.entities.add({
|
||||
// id: markId,
|
||||
// show: false,
|
||||
// position: markPosition,
|
||||
// label: {
|
||||
// text: this.detectType[item.type],
|
||||
// font: '12px sans-serif',
|
||||
// fillColor: DT.Cesium.Color.RED,
|
||||
// horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT,
|
||||
// verticalOrigin: DT.Cesium.VerticalOrigin.TOP,
|
||||
// disableDepthTestDistance: 10000,
|
||||
// showBackground: false,
|
||||
// backgroundColor: DT.Cesium.Color.BLACK,
|
||||
// style: DT.Cesium.LabelStyle.FILL_AND_OUTLINE,
|
||||
// },
|
||||
// polyline: {
|
||||
// positions: DT.Cesium.Cartesian3.fromDegreesArrayHeights(markArr),
|
||||
// // positions: DT.Cesium.Cartesian3.fromDegreesArray(markArr),
|
||||
// width: 1,
|
||||
// material: DT.Cesium.Color.RED,
|
||||
// depthFailMaterial: DT.Cesium.Color.RED,
|
||||
// zIndex: 3,
|
||||
// }
|
||||
// })
|
||||
// markLineArr.push(markLine)
|
||||
// })
|
||||
}
|
||||
// target.picture[`${data.fileId}-picture`] = {
|
||||
// pictureEntity: entity,
|
||||
@ -3038,10 +3058,7 @@ export default {
|
||||
taskListResource.splice(findIndex, 1)
|
||||
this.getTaskList()
|
||||
this.removeTaskTarget(data.jobId)
|
||||
this.detailUav.chart.data[0].data = []
|
||||
this.detailUav.chart.data[1].data = []
|
||||
this.detailUav.chart.data[2].data = []
|
||||
this.detailUav.chart.data[3].data = []
|
||||
this.resetChartData()
|
||||
this.detailUav.id = ''
|
||||
this.detailUav.visible = false
|
||||
let entitys = [...viewer.entities.values]
|
||||
@ -3110,6 +3127,9 @@ export default {
|
||||
//#endregion
|
||||
// 打开状态和波形信息展示
|
||||
openSarStatusDetail(data) {
|
||||
// changeJobStatus(data.id).then(() => {
|
||||
// this.$message.success('已切换到状态展示')
|
||||
// })
|
||||
let entitys = [...viewer.entities.values]
|
||||
entitys.forEach(item => {
|
||||
if (item.id.includes(this.detailUav.id)) {
|
||||
@ -3126,14 +3146,21 @@ export default {
|
||||
this.toggleTaskSceneShow(item, index)
|
||||
}
|
||||
})
|
||||
this.resetChartData()
|
||||
this.detailUav.id = data.id
|
||||
this.detailUav.visible = true
|
||||
},
|
||||
resetChartData() {
|
||||
this.detailUav.chart.data[0].data = []
|
||||
this.detailUav.chart.data[1].data = []
|
||||
this.detailUav.chart.data[2].data = []
|
||||
this.detailUav.chart.data[3].data = []
|
||||
this.detailUav.id = data.id
|
||||
this.detailUav.visible = true
|
||||
if (this.detailUav.activeNames.includes('4')) {
|
||||
if (this.$refs.uavDetailChart) {
|
||||
this.$refs.uavDetailChart.updateData(this.detailUav.chart.data)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//#region
|
||||
handleUavDetailCollapse(actives) {
|
||||
console.log('展开的', actives)
|
||||
@ -3151,11 +3178,8 @@ export default {
|
||||
//#region 航线详情
|
||||
openTaskLineDetail(info) {
|
||||
this.taskLineDetail.visible = false
|
||||
console.log(taskListResource, 555);
|
||||
|
||||
let find = taskListResource.find(item => item.id === info.id)
|
||||
|
||||
console.log('信息', find)
|
||||
if (find && find.uavList) {
|
||||
let line = []
|
||||
find.uavList.forEach(item => {
|
||||
|
||||
@ -95,6 +95,7 @@
|
||||
effect="dark"
|
||||
:content="item.check ? '隐藏' : '显示'"
|
||||
placement="top"
|
||||
:hide-after="1000"
|
||||
>
|
||||
<i
|
||||
:class="item.check ? 'ri-eye-line' : 'ri-eye-off-line'"
|
||||
@ -105,6 +106,7 @@
|
||||
effect="dark"
|
||||
content="结束任务"
|
||||
placement="top"
|
||||
:hide-after="1000"
|
||||
v-if="item.status === 1"
|
||||
>
|
||||
<i
|
||||
@ -134,17 +136,23 @@
|
||||
</left-slide>
|
||||
<div
|
||||
class="image-set"
|
||||
v-if="taskList.visible && taskList.data.length && imageInfos"
|
||||
v-if="
|
||||
taskList.visible &&
|
||||
taskList.data.length &&
|
||||
imageInfos.brightness !== null
|
||||
"
|
||||
>
|
||||
<div class="image-set__item">
|
||||
<div class="is-label">亮度:</div>
|
||||
<el-slider
|
||||
v-model="lightPercent"
|
||||
v-model="imageInfos.brightness"
|
||||
show-input
|
||||
max="30"
|
||||
:min="1"
|
||||
:max="30"
|
||||
:step="1"
|
||||
input-size="mini"
|
||||
:show-input-controls="false"
|
||||
@input="onLightChange"
|
||||
@change="onLightChange"
|
||||
>
|
||||
</el-slider>
|
||||
</div>
|
||||
|
||||
@ -76,6 +76,7 @@ export default class UavTarget {
|
||||
this.positions.push(position.clone())
|
||||
}
|
||||
addUavLoader(data) {
|
||||
return;
|
||||
let loaderPicture = {}
|
||||
data.forEach(loader => {
|
||||
loaderPicture[loader.payloadId] = []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user