From 7c7d22f22b3f0170d97377a2114ec8e731691cb8 Mon Sep 17 00:00:00 2001 From: wxs <211789910@qq.com> Date: Thu, 29 Jan 2026 11:08:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/components/task-manage/index.js | 39 +++++--- .../home/components/task-manage/index.vue | 98 ++++++++----------- 2 files changed, 69 insertions(+), 68 deletions(-) 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 6d4b4fe..2b01ec3 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 @@ -497,6 +497,7 @@ export default { } ], emptyImg: require('@/assets/img/common/empty.svg'), + noAllowDraw: true } }, computed: { @@ -902,17 +903,25 @@ 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 + uavLoaderChange() { + if (this.form.uav && this.form.loader) { + getLastStatus({ payloadId: this.form.loader }).then(res => { + const data = res.data.data + this.form.targetList.forEach(el => { + theViewerTools.removeByName(el.targetName) + }) + this.noAllowDraw = false + this.removePreviewLine() + this.form.targetList = [] + // 清楚当前目标 + 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 @@ -1162,13 +1171,19 @@ export default { flyHeight: 300, initSpeed: 10, targetList: [], - loader: this.loaderOptions[0].id, - uav: this.uavOptions[0].id, + loader: undefined, + uav: undefined, routepoints: [], waveAngle: 20, waveRotation: 20, } + if (this.loaderOptions.length) { + this.form.loader = this.loaderOptions[0].id + } + if (this.uavOptions.length) { + this.form.uav = this.uavOptions[0].id + } this.calculateLimit() this.getUavList() this.getLoaderData() 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 6cb29dd..eb83ca6 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 @@ -75,17 +75,17 @@ @click.stop="makeTaskUavFly(item, index)" > - - - + + + + + + + + + + + + + --> - - - - - - - - - - - - - - - - - - - - - - - - -