feat:载荷位置响应
This commit is contained in:
parent
af07f8a27f
commit
d1730c8800
@ -12,6 +12,8 @@ window.config = {
|
|||||||
arcgisUrl: 'http://61.48.133.44:14001/map/arcgisMap',
|
arcgisUrl: 'http://61.48.133.44:14001/map/arcgisMap',
|
||||||
minMapLevel: 1,
|
minMapLevel: 1,
|
||||||
maxMapLevel: 16,
|
maxMapLevel: 16,
|
||||||
defaultLocation: [115.91531500114789, 40.35940233391189],
|
// defaultLocation: [115.91531500114789, 40.35940233391189],
|
||||||
|
|
||||||
|
defaultLocation: [116.40531500114789, 39.86340233391189],
|
||||||
tdtToken: '316ac2812387c2cbff7a6f2f4e7f5bdc'
|
tdtToken: '316ac2812387c2cbff7a6f2f4e7f5bdc'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,3 +39,5 @@ export const uavSave = params =>
|
|||||||
export const uavUpdate = params =>
|
export const uavUpdate = params =>
|
||||||
req('post', '/skyeye/uav/update', params)
|
req('post', '/skyeye/uav/update', params)
|
||||||
// #endregion
|
// #endregion
|
||||||
|
export const getLastStatus = params =>
|
||||||
|
req('get', '/skyeye/payload/getLastStatus', params)
|
||||||
|
|||||||
@ -2592,7 +2592,7 @@ export default {
|
|||||||
stompClientInstance = stompClient
|
stompClientInstance = stompClient
|
||||||
},
|
},
|
||||||
handleWebsocketStatus(info) {
|
handleWebsocketStatus(info) {
|
||||||
// console.log('SAR状态信息', info.body)
|
console.log('SAR状态信息', info.body)
|
||||||
let data = JSON.parse(info.body)
|
let data = JSON.parse(info.body)
|
||||||
// console.log('SAR状态信息',data)
|
// console.log('SAR状态信息',data)
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import {
|
|||||||
getTaskListData, getUavCurrentHeight, getUavEnabledListData, previewTaskFast,
|
getTaskListData, getUavCurrentHeight, getUavEnabledListData, previewTaskFast,
|
||||||
reRunTask, flyTaskUavCommand, stopTaskFly
|
reRunTask, flyTaskUavCommand, stopTaskFly
|
||||||
} from '@/api/task'
|
} from '@/api/task'
|
||||||
|
import { getLastStatus } from '@/api/device'
|
||||||
import LineTarget from './lineTarget'
|
import LineTarget from './lineTarget'
|
||||||
import UavTarget from '../twin-situation/uavTarget'
|
import UavTarget from '../twin-situation/uavTarget'
|
||||||
let theViewerTools = null
|
let theViewerTools = null
|
||||||
@ -886,7 +887,7 @@ export default {
|
|||||||
this.uavOptions = res.data.data
|
this.uavOptions = res.data.data
|
||||||
// TODO 临时
|
// TODO 临时
|
||||||
if (this.uavOptions.length > 0) {
|
if (this.uavOptions.length > 0) {
|
||||||
this.form.uav = this.uavOptions[0].id
|
// this.form.uav = this.uavOptions[0].id
|
||||||
this.uavReady = true
|
this.uavReady = true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -901,6 +902,18 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
loaderChange() {
|
||||||
|
getLastStatus({ payloadId: this.form.loader }).then(res => {
|
||||||
|
const data = res.data.data
|
||||||
|
console.log(data, '载荷状态信息');
|
||||||
|
|
||||||
|
let position = DT.Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, 2000)
|
||||||
|
viewer.cesiumViewer.scene.camera.flyTo({
|
||||||
|
destination: position,
|
||||||
|
duration: 1
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
getLoaderData(type) {
|
getLoaderData(type) {
|
||||||
// getLoaderList
|
// getLoaderList
|
||||||
this.loaderReady = false
|
this.loaderReady = false
|
||||||
@ -910,7 +923,16 @@ export default {
|
|||||||
this.loaderOptions = res.data.data
|
this.loaderOptions = res.data.data
|
||||||
// TODO 临时
|
// TODO 临时
|
||||||
if (this.loaderOptions.length > 0) {
|
if (this.loaderOptions.length > 0) {
|
||||||
this.form.loader = this.loaderOptions[0].id
|
// this.form.loader = this.loaderOptions[0].id
|
||||||
|
// getLastStatus({ payloadId: this.loaderOptions[0].id }).then(res => {
|
||||||
|
// console.log(res.data.data, 777777777777777);
|
||||||
|
// const data = res.data.data
|
||||||
|
// let position = DT.Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, 1000)
|
||||||
|
// viewer.cesiumViewer.scene.camera.flyTo({
|
||||||
|
// destination: position,
|
||||||
|
// duration: 1
|
||||||
|
// })
|
||||||
|
// })
|
||||||
this.loaderReady = true
|
this.loaderReady = true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -923,14 +945,19 @@ export default {
|
|||||||
if (this.form.loader) {
|
if (this.form.loader) {
|
||||||
getUavCurrentHeight({ payloadId: this.form.loader }).then(res => {
|
getUavCurrentHeight({ payloadId: this.form.loader }).then(res => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log('请求高度', res.data.data)
|
|
||||||
|
|
||||||
this.form.startAltitude = res.data.data.altitude
|
this.form.startAltitude = res.data.data.altitude
|
||||||
this.currentUavInfo = {
|
this.currentUavInfo = {
|
||||||
longitude: res.data.data.longitude,
|
longitude: res.data.data.longitude,
|
||||||
latitude: res.data.data.latitude,
|
latitude: res.data.data.latitude,
|
||||||
height: res.data.data.altitude,
|
height: res.data.data.altitude,
|
||||||
}
|
}
|
||||||
|
console.log(this.currentUavInfo, 889999999);
|
||||||
|
|
||||||
|
let position = DT.Cesium.Cartesian3.fromDegrees(res.data.data.longitude, res.data.data.latitude, 3000)
|
||||||
|
viewer.cesiumViewer.scene.camera.flyTo({
|
||||||
|
destination: position,
|
||||||
|
duration: 1
|
||||||
|
})
|
||||||
this.$message.success('获取当前高度成功!')
|
this.$message.success('获取当前高度成功!')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.data.message)
|
this.$message.error(res.data.message)
|
||||||
@ -1135,8 +1162,8 @@ export default {
|
|||||||
flyHeight: 300,
|
flyHeight: 300,
|
||||||
initSpeed: 10,
|
initSpeed: 10,
|
||||||
targetList: [],
|
targetList: [],
|
||||||
loader: undefined,
|
loader: this.loaderOptions[0].id,
|
||||||
uav: undefined,
|
uav: this.uavOptions[0].id,
|
||||||
routepoints: [],
|
routepoints: [],
|
||||||
waveAngle: 20,
|
waveAngle: 20,
|
||||||
waveRotation: 20,
|
waveRotation: 20,
|
||||||
@ -1216,6 +1243,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
|
console.log(this.form, 88888888);
|
||||||
|
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let params = JSON.parse(JSON.stringify(this.form))
|
let params = JSON.parse(JSON.stringify(this.form))
|
||||||
|
|||||||
@ -167,6 +167,7 @@
|
|||||||
.task-time {
|
.task-time {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: $--color-text-1;
|
color: $--color-text-1;
|
||||||
|
min-width: 140px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -323,6 +323,7 @@
|
|||||||
popper-class="form-light"
|
popper-class="form-light"
|
||||||
size="small"
|
size="small"
|
||||||
v-model="form.loader"
|
v-model="form.loader"
|
||||||
|
@change="loaderChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in loaderOptions"
|
v-for="item in loaderOptions"
|
||||||
|
|||||||
@ -189,6 +189,7 @@
|
|||||||
.task-time {
|
.task-time {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: $--color-text-1;
|
color: $--color-text-1;
|
||||||
|
min-width: 140px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1109,6 +1110,7 @@
|
|||||||
.task-time {
|
.task-time {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: $--color-text-1;
|
color: $--color-text-1;
|
||||||
|
min-width: 140px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1301,6 +1303,7 @@
|
|||||||
.task-time {
|
.task-time {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: $--color-text-1;
|
color: $--color-text-1;
|
||||||
|
min-width: 140px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user