feat:无人机显示,亮度log,开关机等功能提交

This commit is contained in:
wxs 2026-03-10 10:30:32 +08:00
parent d28308f181
commit 6fcf791891
9 changed files with 241 additions and 144 deletions

View File

@ -41,9 +41,3 @@ export const uavUpdate = params =>
// #endregion // #endregion
export const getLastStatus = params => export const getLastStatus = params =>
req('get', '/skyeye/payload/getLastStatus', params) req('get', '/skyeye/payload/getLastStatus', params)
// 雷达开启
export const deviceControlTurnon = params =>
req('post', '/sar/control/turnon', params)
// 雷达关闭
export const deviceControlEndall = params =>
req('post', '/sar/control/endall', params)

View File

@ -90,3 +90,9 @@ export const changeJobStatus = params =>
export const execBrightnessexport = params => export const execBrightnessexport = params =>
req('post', '/jm/job/exec/brightness', params) req('post', '/jm/job/exec/brightness', params)
// 雷达开启
export const deviceControlTurnon = params =>
req('post', '/sar/control/turnon', params)
// 雷达关闭
export const deviceControlEndall = params =>
req('post', '/sar/control/endall', params)

View File

@ -88,6 +88,7 @@ export default {
noExecutingTasks: 'No executing tasks', noExecutingTasks: 'No executing tasks',
endTask: 'Ended Task', endTask: 'Ended Task',
fly: { fly: {
isPowerOn: 'Is Power On',
statusInfo: 'Flight Status Information', statusInfo: 'Flight Status Information',
height: 'Height', height: 'Height',
speed: 'Speed', speed: 'Speed',
@ -171,6 +172,8 @@ export default {
stopTaskConfirm: 'Are you sure you want to stop this task?', stopTaskConfirm: 'Are you sure you want to stop this task?',
stopTaskSuccess: 'Task stopped successfully!', stopTaskSuccess: 'Task stopped successfully!',
planArea: 'Planning Area', planArea: 'Planning Area',
startScan: 'Start Scan',
endScan: 'End Scan',
direction: { direction: {
left: 'Left', left: 'Left',
right: 'Right', right: 'Right',
@ -189,6 +192,8 @@ export default {
loaderType: 'Please select loader type', loaderType: 'Please select loader type',
ratio: 'Please enter ratio', ratio: 'Please enter ratio',
}, },
radarTurnOnSuccess: 'Radar turned on successfully',
radarEndConfirm: 'Are you sure you want to end scan?',
}, },
device1Manage: { device1Manage: {
uav: 'UAV', uav: 'UAV',

View File

@ -87,6 +87,7 @@ export default {
noExecutingTasks: '暂无执行中的任务', noExecutingTasks: '暂无执行中的任务',
endTask: '结束任务', endTask: '结束任务',
fly: { fly: {
isPowerOn: '是否开机',
statusInfo: '飞行状态信息', statusInfo: '飞行状态信息',
height: '高度', height: '高度',
speed: '速度', speed: '速度',
@ -176,6 +177,8 @@ export default {
}, },
uavline: "航线", uavline: "航线",
createAirline: '创建航线', createAirline: '创建航线',
startScan: '开始扫描',
endScan: '结束扫描',
rules: { rules: {
inputTaskName: '请输入任务名称', inputTaskName: '请输入任务名称',
startAltitude: '请输入起飞点高度', startAltitude: '请输入起飞点高度',
@ -188,6 +191,8 @@ export default {
loaderType: '请选择载荷类型', loaderType: '请选择载荷类型',
ratio: '请输入比例', ratio: '请输入比例',
}, },
radarTurnOnSuccess: '已开始扫描',
radarEndConfirm: '确定要结束结束扫描?',
}, },
device1Manage: { device1Manage: {
uav: '无人机', uav: '无人机',

View File

@ -83,15 +83,25 @@
height="100%" height="100%"
> >
<template v-if="queryForm.type === 'payload'"> <template v-if="queryForm.type === 'payload'">
<el-table-column prop="name" :label="$t('device1Manage.radarName')"> </el-table-column> <el-table-column prop="name" :label="$t('device1Manage.radarName')">
<el-table-column prop="type" :label="$t('device1Manage.radarType')"> </el-table-column> </el-table-column>
<el-table-column prop="ip" :label="$t('device1Manage.ip')"> </el-table-column> <el-table-column prop="type" :label="$t('device1Manage.radarType')">
</el-table-column>
<el-table-column prop="ip" :label="$t('device1Manage.ip')">
</el-table-column>
</template> </template>
<template v-else> <template v-else>
<el-table-column prop="name" :label="$t('device1Manage.uavName')"> </el-table-column> <el-table-column prop="name" :label="$t('device1Manage.uavName')">
<el-table-column prop="code" :label="$t('device1Manage.uavCode')"> </el-table-column> </el-table-column>
<el-table-column prop="ip" :label="$t('device1Manage.ip')"> </el-table-column> <el-table-column prop="code" :label="$t('device1Manage.uavCode')">
<el-table-column prop="createTime" :label="$t('device1Manage.createTime')"> </el-table-column> </el-table-column>
<el-table-column prop="ip" :label="$t('device1Manage.ip')">
</el-table-column>
<el-table-column
prop="createTime"
:label="$t('device1Manage.createTime')"
>
</el-table-column>
</template> </template>
<el-table-column :label="$t('device1Manage.operation')" width="200"> <el-table-column :label="$t('device1Manage.operation')" width="200">
@ -111,7 +121,7 @@
@click="editDevice(scope.row)" @click="editDevice(scope.row)"
></el-button> ></el-button>
</el-tooltip> </el-tooltip>
<template v-if="queryForm.type === 'payload'"> <!-- <template v-if="queryForm.type === 'payload'">
<el-tooltip <el-tooltip
class="item" class="item"
effect="light" effect="light"
@ -142,7 +152,7 @@
@click="handleRadar(scope.row, 2)" @click="handleRadar(scope.row, 2)"
></el-button> ></el-button>
</el-tooltip> </el-tooltip>
</template> </template> -->
<el-tooltip <el-tooltip
class="item" class="item"
effect="light" effect="light"
@ -236,10 +246,12 @@
</el-form> </el-form>
</div> </div>
<div class="btns" slot="footer"> <div class="btns" slot="footer">
<el-button @click="close" size="mini">{{ $t('common.cancel') }}</el-button> <el-button @click="close" size="mini">{{
<el-button type="primary" size="mini" @click="submitDevice" $t('common.cancel')
>{{ $t('common.confirm') }}</el-button }}</el-button>
> <el-button type="primary" size="mini" @click="submitDevice">{{
$t('common.confirm')
}}</el-button>
</div> </div>
</dt-dialog> </dt-dialog>
</dt-card> </dt-card>

View File

@ -12,21 +12,16 @@ import * as DT from 'dt-sdk'
import moment from 'moment' import moment from 'moment'
import { connectWebSocket, disconnectWebSocket } from '@/utils/web-socket' import { connectWebSocket, disconnectWebSocket } from '@/utils/web-socket'
import { ICON_MODE } from '@/enum' import { ICON_MODE } from '@/enum'
import { AmapImageryProvider, TencentImageryProvider } from '@/utils/map-provider'
import { getResourceList } from '@/api/home'
import { removeRefreshToken, removeToken } from '@/utils/auth'
import { getWeatherInfo } from '@/api/user' import { getWeatherInfo } from '@/api/user'
import { import {
flyTaskUavCommand, flyTaskUavCommand,
getRadarListData, getRadarListData,
getTaskItemDetail,
getTaskListData, getTaskListData,
getUavListData,
reRunTask, reRunTask,
stopTaskFly, stopTaskFly,
getExecJobs, getExecJobs,
execBrightnessexport, deviceControlTurnon,
changeJobStatus deviceControlEndall,
} from '@/api/task' } from '@/api/task'
import UavTarget from './uavTarget' import UavTarget from './uavTarget'
import PicturesUpload from '../pictures-upload/index.vue' import PicturesUpload from '../pictures-upload/index.vue'
@ -58,6 +53,7 @@ let radarSceneEntity = {}
let sceneEntity = {} let sceneEntity = {}
let taskListResource = [] let taskListResource = []
let orthoManager = null let orthoManager = null
let socketPositionIndex = 0
const lang = window.localStorage.getItem('locale') || 'zh_CN' const lang = window.localStorage.getItem('locale') || 'zh_CN'
export default { export default {
name: 'TwinSituation', name: 'TwinSituation',
@ -214,7 +210,7 @@ export default {
longitude: 123.232312, longitude: 123.232312,
latitude: 23.232312, latitude: 23.232312,
}, },
activeNames: ['3', '4'], activeNames: [1, 4],
activeTab: 'DEV', activeTab: 'DEV',
basicsInfo: { basicsInfo: {
name: '无人机1', name: '无人机1',
@ -246,22 +242,7 @@ export default {
taskTime: '2024-12-27 15:00:00' taskTime: '2024-12-27 15:00:00'
}, },
], ],
statusInfo: { statusInfo: [],
dev: [],
gps: [],
imu: [],
dev2: {
isWork: true,
isLock: true,
cpuTemperature: 40,
spTemperature: 40,
txTemperature: 40,
ypTemperature: 40,
fpgaTemperature: 40,
storage: 80,
memory: 80,
}
},
chart: { chart: {
data: [ data: [
{ {
@ -422,6 +403,10 @@ export default {
}, },
immediate: true, immediate: true,
}, },
'imageInfos.brightness'(nv) {
// console.log(nv, 8899999);
},
visibleLocale(nv) { visibleLocale(nv) {
if (!nv) { if (!nv) {
this.$emit('update:visible', false) this.$emit('update:visible', false)
@ -495,6 +480,7 @@ export default {
beforeDestroy() { beforeDestroy() {
this.SET_SPLIT_VISIBLE(false) this.SET_SPLIT_VISIBLE(false)
this.removePictureHandle() this.removePictureHandle()
socketPositionIndex = 0
if (orthoManager) { if (orthoManager) {
orthoManager.clearAll() orthoManager.clearAll()
orthoManager = null orthoManager = null
@ -577,9 +563,34 @@ export default {
return '#336dff' return '#336dff'
} }
}, },
// 操作雷达
async handleRadar(row, type) {
console.log(row, 8888);
if (type === 1) {
deviceControlTurnon({ payloadId: row.ip }).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.message)
}
})
} else if (type === 2) {
const bool = await this.$confirm(this.$t('task.radarEndConfirm'), this.$t('task.tip'), {
customClass: 'confirm-light',
confirmButtonText: this.$t('common.confirm'),
cancelButtonText: this.$t('common.cancel'),
type: 'warning'
})
if (!bool) return;
deviceControlEndall({ payloadId: row.ip }).then(res => {
if (res.data.code === 200) {
this.$message.success(this.$t('task.radarEndSuccess'))
}
})
}
},
// 亮度设置变化 // 亮度设置变化
onLightChange: debounce(function (val) { onLightChange: debounce(function (val) {
const imageInfos = { ...this.imageInfos } // const imageInfos = { ...this.imageInfos }
orthoManager.setBrightness(val) orthoManager.setBrightness(val)
// execBrightnessexport(imageInfos).then(res => { // execBrightnessexport(imageInfos).then(res => {
// console.log('亮度调整成功'); // console.log('亮度调整成功');
@ -1087,7 +1098,7 @@ export default {
console.log('任务列表', res.data.data) console.log('任务列表', res.data.data)
let data = res.data.data let data = res.data.data
let list = [] let list = []
socketPositionIndex = 0
data.forEach(item => { data.forEach(item => {
// item.check = item.status === 1 || item.status === 3 // item.check = item.status === 1 || item.status === 3
item.check = false item.check = false
@ -1102,10 +1113,12 @@ export default {
let uav = undefined let uav = undefined
let sar = undefined let sar = undefined
let ip = undefined
if (item.uavList.length) { if (item.uavList.length) {
uav = item.uavList[0].uavName uav = item.uavList[0].uavName
if (item.uavList[0].payloadList.length) { if (item.uavList[0].payloadList.length) {
sar = item.uavList[0].payloadList[0].payloadName sar = item.uavList[0].payloadList[0].payloadName
ip = item.uavList[0].ip
} }
} }
list.push({ list.push({
@ -1119,6 +1132,7 @@ export default {
statusName: item.statusName, statusName: item.statusName,
uav, uav,
sar, sar,
ip,
stopTooltipVisible: false stopTooltipVisible: false
}) })
// TODO // TODO
@ -1141,7 +1155,7 @@ export default {
this.taskList.data = list this.taskList.data = list
if (this.taskList.data.length) { if (this.taskList.data.length) {
this.taskList.data[0].check = true this.taskList.data[0].check = true
if (this.menusChose === '1') { if (this.menusChose === '1' && data[0].mode !== 2) {
this.addUavToScene(data[0]) this.addUavToScene(data[0])
this.addTaskPlanArea(data[0].pointList, data[0].id, data[0].name) this.addTaskPlanArea(data[0].pointList, data[0].id, data[0].name)
} }
@ -1569,6 +1583,7 @@ export default {
// currentPicture = null // currentPicture = null
// } // }
this.removeTaskTarget(info.id); this.removeTaskTarget(info.id);
socketPositionIndex = 0
if (orthoManager) { if (orthoManager) {
orthoManager.clearAll() orthoManager.clearAll()
orthoManager = null orthoManager = null
@ -1601,6 +1616,7 @@ export default {
viewer.entities.remove(item) viewer.entities.remove(item)
} }
}) })
socketPositionIndex = 0
if (orthoManager) { if (orthoManager) {
orthoManager.clearAll() orthoManager.clearAll()
orthoManager = null orthoManager = null
@ -2551,11 +2567,6 @@ export default {
radarViewer.cesiumViewer.resolutionScale = vtxf_dpr radarViewer.cesiumViewer.resolutionScale = vtxf_dpr
radarLayer = new DT.LODSceneLayer() radarLayer = new DT.LODSceneLayer()
radarViewer.addLayer(radarLayer) radarViewer.addLayer(radarLayer)
// radarViewer.cesiumViewer.scene.screenSpaceCameraController.enableTranslate = false
// radarViewer.cesiumViewer.scene.screenSpaceCameraController.enableRotate = false
// radarViewer.cesiumViewer.scene.screenSpaceCameraController.enableZoom = false
// radarViewer.cesiumViewer.scene.screenSpaceCameraController.enableTilt = false
// radarViewer.cesiumViewer.scene.screenSpaceCameraController.tiltEventTypes = []
// 去掉版权 // 去掉版权
radarViewer.cesiumViewer._innerCreditContainer.style.display = 'none' radarViewer.cesiumViewer._innerCreditContainer.style.display = 'none'
radarViewer.cesiumViewer.scene.camera.flyTo({ radarViewer.cesiumViewer.scene.camera.flyTo({
@ -2673,7 +2684,7 @@ export default {
let find = taskUavCollection[item.jobId].find(child => child.uavId + '' === item.uavId + '') let find = taskUavCollection[item.jobId].find(child => child.uavId + '' === item.uavId + '')
if (find) { if (find) {
let position = DT.Cesium.Cartesian3.fromDegrees(item.payloadList[0].longitude, item.payloadList[0].latitude, item.payloadList[0].altitude) let position = DT.Cesium.Cartesian3.fromDegrees(item.payloadList[0].longitude, item.payloadList[0].latitude, item.payloadList[0].altitude)
find.updateCurrentPosition(position) // find.updateCurrentPosition(position)
} }
} }
// 位置信息更新到列表 // 位置信息更新到列表
@ -2719,12 +2730,16 @@ export default {
}) })
}, },
updateUavInfo(data) { updateUavInfo(data) {
this.detailUav.statusInfo = []
this.detailUav.baseInfo.flyHeight = Math.round(data.altitude * 10) / 10 this.detailUav.baseInfo.flyHeight = Math.round(data.altitude * 10) / 10
this.detailUav.baseInfo.longitude = data.longitude.toFixed(3) this.detailUav.baseInfo.longitude = data.longitude.toFixed(3)
this.detailUav.baseInfo.latitude = data.latitude.toFixed(3) this.detailUav.baseInfo.latitude = data.latitude.toFixed(3)
this.detailUav.baseInfo.status = data.connected this.detailUav.baseInfo.status = data.connected
this.detailUav.statusInfo.dev = [ this.detailUav.statusInfo.push(
// { name: '是否开机', value: this.sarWorkStatus[data.dIsBoot], unit: '' }, {
label: 'dev',
children: [
{ name: '是否开机', value: this.sarWorkStatus[data.dIsBoot], unit: '' },
{ name: this.$t('task.fly.clockLock'), value: this.successStatus[data.clockLock], unit: '' }, { name: this.$t('task.fly.clockLock'), value: this.successStatus[data.clockLock], unit: '' },
// { name: 'GPU温度', value: '正常', unit: '' }, // { name: 'GPU温度', value: '正常', unit: '' },
{ name: this.$t('task.fly.cpuTemp'), value: data.cpuC, unit: '℃' }, { name: this.$t('task.fly.cpuTemp'), value: data.cpuC, unit: '℃' },
@ -2735,7 +2750,12 @@ export default {
{ name: this.$t('task.fly.diskCapacity'), value: data.diskUtilization, unit: '%' }, { name: this.$t('task.fly.diskCapacity'), value: data.diskUtilization, unit: '%' },
{ name: this.$t('task.fly.memoryCapacity'), value: data.memoryCapacity, unit: 'MB' }, { name: this.$t('task.fly.memoryCapacity'), value: data.memoryCapacity, unit: 'MB' },
] ]
this.detailUav.statusInfo.gps = [ }
)
this.detailUav.statusInfo.push(
{
label: 'gps',
children: [
// { name: '定位状态', value: '正常', unit: '' }, // { name: '定位状态', value: '正常', unit: '' },
// { name: '定向状态', value: '正常', unit: '' }, // { name: '定向状态', value: '正常', unit: '' },
{ name: this.$t('task.fly.rtkStatus'), value: data.rtkStatusLabel, unit: '' }, { name: this.$t('task.fly.rtkStatus'), value: data.rtkStatusLabel, unit: '' },
@ -2746,7 +2766,12 @@ export default {
{ name: this.$t('task.fly.latitude'), value: data.latitude, unit: '°' }, { name: this.$t('task.fly.latitude'), value: data.latitude, unit: '°' },
{ name: this.$t('task.fly.height'), value: data.altitude, unit: 'm' }, { name: this.$t('task.fly.height'), value: data.altitude, unit: 'm' },
] ]
this.detailUav.statusInfo.imu = [ }
)
this.detailUav.statusInfo.push(
{
label: 'imu',
children: [
{ name: this.$t('task.fly.configStatus'), value: '正常', unit: '' }, { name: this.$t('task.fly.configStatus'), value: '正常', unit: '' },
{ name: this.$t('task.fly.antennaAzimuth'), value: data.antennaAzimuth, unit: '°' }, { name: this.$t('task.fly.antennaAzimuth'), value: data.antennaAzimuth, unit: '°' },
{ name: this.$t('task.fly.antennaPitch'), value: data.antennaPitch, unit: '°' }, { name: this.$t('task.fly.antennaPitch'), value: data.antennaPitch, unit: '°' },
@ -2757,10 +2782,14 @@ export default {
{ name: this.$t('task.fly.rollAngle'), value: data.angleRoll, unit: '°' }, { name: this.$t('task.fly.rollAngle'), value: data.angleRoll, unit: '°' },
{ name: this.$t('task.fly.yawAngle'), value: data.angleYaw, unit: '°' }, { name: this.$t('task.fly.yawAngle'), value: data.angleYaw, unit: '°' },
] ]
}
)
// 更新场景中数据 // 更新场景中数据
// this.updateSceneUav(data) this.updateSceneUav(data)
}, },
updateSceneUav(data) { updateSceneUav(data) {
console.log(data, 44444);
let position = DT.Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, data.altitude) let position = DT.Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, data.altitude)
let entity = viewer.entities.getById('uav-' + data.id) let entity = viewer.entities.getById('uav-' + data.id)
if (entity) { if (entity) {
@ -2770,16 +2799,38 @@ export default {
id: 'uav-' + data.id, id: 'uav-' + data.id,
position: position, position: position,
label: { label: {
text: '无人机' + data.id, text: '无人机',
font: '14px sans-serif',
fillColor: DT.Cesium.Color.WHITE,
horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT, horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT,
outlineColor: DT.Cesium.Color.BLACK, verticalOrigin: DT.Cesium.VerticalOrigin.CENTER,
outlineWidth: 2, disableDepthTestDistance: 100000,
pixelOffset: new DT.Cesium.Cartesian2(5, -4), pixelOffset: new DT.Cesium.Cartesian2(10, 0),
disableDepthTestDistance: 10000 showBackground: true,
scaleByDistance: new DT.Cesium.NearFarScalar(0, 1, 1, 0.8),
distanceDisplayCondition: new DT.Cesium.DistanceDisplayCondition(0, 20000),
backgroundColor: DT.Cesium.Color.fromCssColorString('rgba(0,0,0,0.7)'),
style: DT.Cesium.LabelStyle.FILL_AND_OUTLINE,
}, },
billboard: { model: {
image: process.env.BASE_URL + 'static/img/icon_wrj.png', uri: process.env.BASE_URL + 'model/uav.gltf',
disableDepthTestDistance: 10000 minimumPixelSize: 64,
maximumScale: 128,
},
// point: {
// pixelSize: 40,
// color: DT.Cesium.Color.RED,
// disableDepthTestDistance: 10000
// },
polyline: {
positions: new DT.Cesium.CallbackProperty(function () {
return this.positions
}, false),
width: 8,
zIndex: 600,
material: DT.Cesium.Color.BLACK,
depthFailMaterial: DT.Cesium.Color.CYAN,
arcType: DT.Cesium.ArcType.NONE
} }
}) })
} }
@ -2808,7 +2859,7 @@ export default {
this.detailUav.chart.data[1].data = channel1Real this.detailUav.chart.data[1].data = channel1Real
this.detailUav.chart.data[2].data = channel2False this.detailUav.chart.data[2].data = channel2False
this.detailUav.chart.data[3].data = channel2Real this.detailUav.chart.data[3].data = channel2Real
if (this.detailUav.activeNames.includes('4')) { if (this.detailUav.activeNames.includes(4)) {
if (this.$refs.uavDetailChart) { if (this.$refs.uavDetailChart) {
this.$refs.uavDetailChart.updateData(this.detailUav.chart.data) this.$refs.uavDetailChart.updateData(this.detailUav.chart.data)
} }
@ -3040,12 +3091,19 @@ export default {
viewer.entities.remove(item) viewer.entities.remove(item)
} }
}) })
socketPositionIndex = 0
if (orthoManager) { if (orthoManager) {
orthoManager.clearAll() orthoManager.clearAll()
orthoManager = null orthoManager = null
} }
} }
if (data.jobStatus === 1 && this.detailUav.id === data.jobId) { if (data.jobStatus === 1 && this.detailUav.id === data.jobId) {
const job = this.taskList.data.find(el => el.id === data.jobId)
// 巡航模式没有指定的任务区域所以按照socket返回的第一个位置信息来调整相机位置
socketPositionIndex++
if (job && job.mode === 2 && socketPositionIndex === 1) {
this.flyToTarget(data.sarStatus.longitude, data.sarStatus.latitude)
}
this.updateUavInfo(data.sarStatus) this.updateUavInfo(data.sarStatus)
} }
this.taskList.data[findIndex].status = data.jobStatus this.taskList.data[findIndex].status = data.jobStatus

View File

@ -301,7 +301,7 @@
position: fixed; position: fixed;
top: 60px; top: 60px;
right: 10px; right: 10px;
height: calc(100vh - 220px); height: calc(100vh - 110px);
} }
.detail-info { .detail-info {
@ -1045,13 +1045,10 @@
.detail-uav { .detail-uav {
width: 410px; width: 410px;
height: calc(100vh - 220px); height: calc(100vh - 110px);
transition: 0.2s ease-in-out; transition: 0.2s ease-in-out;
z-index: 2; z-index: 2;
::v-deep .dt-card__header {
display: none;
}
.detail-uav__content { .detail-uav__content {
padding-right: 8px; padding-right: 8px;
@ -1300,7 +1297,7 @@
} }
&__right { &__right {
width: 40px; width: 78px;
height: 100%; height: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -1354,3 +1351,12 @@
} }
} }
} }
::v-deep .el-collapse-item__content {
padding-bottom: 10px !important;
}
::v-deep .el-collapse-item__header {
height: 40px !important;
line-height: 40px !important;
}

View File

@ -64,6 +64,30 @@
@click.stop="stopTask(item, index)" @click.stop="stopTask(item, index)"
></i> ></i>
</el-tooltip> </el-tooltip>
<el-tooltip
effect="dark"
:content="$t('task.startScan')"
placement="top"
:hide-after="1000"
v-if="item.status === 1"
>
<i
class="el-icon-switch-button"
@click.stop="handleRadar(item, 1)"
></i>
</el-tooltip>
<el-tooltip
effect="dark"
:content="$t('task.endScan')"
placement="top"
:hide-after="1000"
v-if="item.status === 1"
>
<i
class="el-icon-close"
@click.stop="handleRadar(item, 2)"
></i>
</el-tooltip>
</div> </div>
</div> </div>
<p>{{ $t('task.uavName') }}: {{ item.uav }}</p> <p>{{ $t('task.uavName') }}: {{ item.uav }}</p>
@ -236,8 +260,8 @@
v-if="detailUav.visible" v-if="detailUav.visible"
:visible.sync="detailUav.visible" :visible.sync="detailUav.visible"
:scroll="true" :scroll="true"
:showClose="true" :showClose="false"
:showDivider="false" :showDivider="true"
> >
<div class="detail-uav__content"> <div class="detail-uav__content">
<div class="other-info"> <div class="other-info">
@ -245,41 +269,25 @@
v-model="detailUav.activeNames" v-model="detailUav.activeNames"
@change="handleUavDetailCollapse" @change="handleUavDetailCollapse"
> >
<el-collapse-item :title="$t('task.statusInfo')" name="3"> <el-collapse-item
<el-tabs v-model="detailUav.activeTab"> v-for="(item, index) in detailUav.statusInfo"
<el-tab-pane :label="$t('task.dev')" name="DEV"> :key="item.label"
:title="item.label"
:name="index + 1"
>
<div <div
class="uav-span-wrap" class="uav-span-wrap"
v-for="item in detailUav.statusInfo.dev" v-for="state in item.children"
:key="item.name" :key="state.name"
> >
<span>{{ item.name }}</span> <span>{{ state.name }}</span>
<span>{{ item.value }}{{ item.unit }}</span> <span>{{ state.value }}{{ state.unit }}</span>
</div> </div>
</el-tab-pane>
<el-tab-pane label="GPS" name="GPS">
<div
class="uav-span-wrap"
v-for="item in detailUav.statusInfo.gps"
:key="item.name"
>
<span>{{ item.name }}</span>
<span>{{ item.value }}{{ item.unit }}</span>
</div>
</el-tab-pane>
<el-tab-pane label="IMU" name="IMU">
<div
class="uav-span-wrap"
v-for="item in detailUav.statusInfo.imu"
:key="item.name"
>
<span>{{ item.name }}</span>
<span>{{ item.value }}{{ item.unit }}</span>
</div>
</el-tab-pane>
</el-tabs>
</el-collapse-item> </el-collapse-item>
<el-collapse-item :title="$t('task.waveInfo')" name="4"> <el-collapse-item
:title="$t('task.waveInfo')"
:name="detailUav.statusInfo.length + 1"
>
<div class="wave-chart"> <div class="wave-chart">
<dt-multiple-analysis <dt-multiple-analysis
ref="uavDetailChart" ref="uavDetailChart"

View File

@ -19,7 +19,7 @@ export default class UavTarget {
this.addPlanLine(options.airlineList) this.addPlanLine(options.airlineList)
console.log(options, '飞机数据'); console.log(options, '飞机数据');
if (options.startLon) { if (options.startLon) {
this.addUav(options) // this.addUav(options)
} }
this.addUavLoader(options.payloadList) this.addUavLoader(options.payloadList)
} }
@ -36,7 +36,6 @@ export default class UavTarget {
} }
let currentPosition = this.positions[this.positions.length - 1].clone() let currentPosition = this.positions[this.positions.length - 1].clone()
let id = `${this.jobId}~${this.uavId}-uav` let id = `${this.jobId}~${this.uavId}-uav`
this.uavEntity = this.viewer.entities.add({ this.uavEntity = this.viewer.entities.add({
id, id,
position: currentPosition, position: currentPosition,
@ -46,7 +45,7 @@ export default class UavTarget {
fillColor: DT.Cesium.Color.WHITE, fillColor: DT.Cesium.Color.WHITE,
horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT, horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT,
verticalOrigin: DT.Cesium.VerticalOrigin.CENTER, verticalOrigin: DT.Cesium.VerticalOrigin.CENTER,
disableDepthTestDistance: 10000, disableDepthTestDistance: 100000,
pixelOffset: new DT.Cesium.Cartesian2(10, 0), pixelOffset: new DT.Cesium.Cartesian2(10, 0),
showBackground: true, showBackground: true,
scaleByDistance: new DT.Cesium.NearFarScalar(0, 1, 1, 0.8), scaleByDistance: new DT.Cesium.NearFarScalar(0, 1, 1, 0.8),
@ -56,10 +55,14 @@ export default class UavTarget {
}, },
model: { model: {
uri: process.env.BASE_URL + 'model/uav.gltf', uri: process.env.BASE_URL + 'model/uav.gltf',
// scale: 1, minimumPixelSize: 128,
minimumPixelSize: 32, maximumScale: 256,
maximumScale: 128,
}, },
// point: {
// pixelSize: 40,
// color: DT.Cesium.Color.RED,
// disableDepthTestDistance: 10000
// },
polyline: { polyline: {
positions: new DT.Cesium.CallbackProperty(function () { positions: new DT.Cesium.CallbackProperty(function () {
return that.positions return that.positions