Compare commits

...

2 Commits

8 changed files with 70 additions and 46 deletions

View File

@ -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)

View File

@ -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) {

View File

@ -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 = [

View File

@ -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('雷达关机成功')
}

View File

@ -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"

View File

@ -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"

View File

@ -21,7 +21,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'
@ -259,7 +263,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 +401,9 @@ export default {
emptyImg: require('@/assets/img/common/empty.svg'),
lightPercent: 0,
contrastPercent: 10,
imageInfos: undefined
imageInfos: {
brightness: null
}
}
},
computed: {
@ -588,14 +594,13 @@ export default {
}
},
// 亮度设置变化
onLightChange: debounce(function (value) {
onLightChange() {
const imageInfos = { ...this.imageInfos }
imageInfos.brightness = value
execBrightnessexport(imageInfos).then(res => {
console.log('亮度调整成功');
// this.$message.success('亮度调整成功')
})
}, 500),
},
// startTest() {
// let testHeight = 1000
// window.detectType = {
@ -1128,7 +1133,8 @@ export default {
status: item.status,
statusName: item.statusName,
uav,
sar
sar,
stopTooltipVisible: false
})
// TODO
// item.pointList = [item.pointList]
@ -1141,10 +1147,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 +1345,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 +1555,8 @@ export default {
},
toggleTaskSceneShow(info, index) {
console.log(info, 12312123);
// console.log('切换的info', info)
// console.log('无人机详情面板', this.detailInfo)
if (info.check) {
@ -1613,7 +1615,6 @@ export default {
}
})
})
},
/**
* 重新执行
@ -2747,7 +2748,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 +2790,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 +2813,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,7 +2823,9 @@ 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)
console.log(this.imageInfos, 444444444);
console.log('SAR图像2', data)
this.addMarkPicture2(data)
// console.log('灭有匹配到吗taskUavCollection', taskUavCollection, taskUavCollection[data.jobId])
@ -2896,9 +2896,9 @@ 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 = []
@ -3038,10 +3038,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 +3107,11 @@ export default {
//#endregion
// 打开状态和波形信息展示
openSarStatusDetail(data) {
console.log(data, 444444444444);
// changeJobStatus(data.id).then(() => {
// this.$message.success('已切换到状态展示')
// })
let entitys = [...viewer.entities.values]
entitys.forEach(item => {
if (item.id.includes(this.detailUav.id)) {
@ -3126,14 +3128,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 +3160,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 => {

View File

@ -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,21 @@
</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"
:max="30"
input-size="mini"
:show-input-controls="false"
@input="onLightChange"
@change="onLightChange"
>
</el-slider>
</div>