diff --git a/frontend/Skyeye-sys-ui/public/config.js b/frontend/Skyeye-sys-ui/public/config.js index 87c28da..2693046 100644 --- a/frontend/Skyeye-sys-ui/public/config.js +++ b/frontend/Skyeye-sys-ui/public/config.js @@ -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' } diff --git a/frontend/Skyeye-sys-ui/src/api/device.js b/frontend/Skyeye-sys-ui/src/api/device.js index 7b7d1b6..fb9541c 100644 --- a/frontend/Skyeye-sys-ui/src/api/device.js +++ b/frontend/Skyeye-sys-ui/src/api/device.js @@ -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) diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/device-manage/index.js b/frontend/Skyeye-sys-ui/src/views/home/components/device-manage/index.js index 098a907..d480df5 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/device-manage/index.js +++ b/frontend/Skyeye-sys-ui/src/views/home/components/device-manage/index.js @@ -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 => { diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.js b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.js index 4c6b2bb..6d4b4fe 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.js +++ b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.js @@ -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)) diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.scss b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.scss index 4820183..6fbbffd 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.scss +++ b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.scss @@ -167,6 +167,7 @@ .task-time { z-index: 1; color: $--color-text-1; + min-width: 140px; } } diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.vue b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.vue index 29c5dc9..6cb29dd 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.vue +++ b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.vue @@ -323,6 +323,7 @@ popper-class="form-light" size="small" v-model="form.loader" + @change="loaderChange" >