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)"
>
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-