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