From 91f024105d5fa6c16d038a2ad152e57d274a2761 Mon Sep 17 00:00:00 2001 From: tk Date: Wed, 10 Jul 2024 22:24:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=09=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afeat=20=E3=80=90=E4=B8=BB=09=E9=A2=98=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E8=88=AA=E7=BA=BF=E5=AF=B9=E8=B1=A1=20=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E5=A4=96=E5=B1=82=E5=8A=A0questAss=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=20=E3=80=90=E6=8F=8F=09=E8=BF=B0=E3=80=91=EF=BC=9A=20=09[?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0]=EF=BC=9Amqtt=E5=8F=91=E9=80=81=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E4=B8=BB=E9=A2=98=E6=94=B9=E4=B8=BA=20cmd/+=20?= =?UTF-8?q?=E5=8D=95=E4=B8=BB=E9=A2=98=20=E8=88=AA=E7=BA=BF=E5=A4=96?= =?UTF-8?q?=E5=B1=82=E5=8C=85=E4=B8=80=E4=B8=AAquestAss=E9=94=AE=20=09[?= =?UTF-8?q?=E8=BF=87=E7=A8=8B]=EF=BC=9A=20=09[=E5=BD=B1=E5=93=8D]=EF=BC=9A?= =?UTF-8?q?=20=E3=80=90=E7=BB=93=09=E6=9D=9F=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- src/components/ControllerTabs.vue | 21 +++++++++---------- src/components/MapBox.vue | 16 +++++++------- .../layout/components/main/route/add.vue | 2 +- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/components/ControllerTabs.vue b/src/components/ControllerTabs.vue index 01844bf..84e4bc4 100644 --- a/src/components/ControllerTabs.vue +++ b/src/components/ControllerTabs.vue @@ -68,25 +68,26 @@ - 注册航线 - 提交任务 - + 航点写入中··· - 解锁飞机 - 执行任务 @@ -675,9 +676,7 @@ export default { }, plane: { handler (val) { - this.publishFun('{getPlaneState:1}') - this.planeState = val.planeState - console.log(this.planeState) + this.planeState = val.planeState// 实时更新飞机数据 }, deep: true } diff --git a/src/components/MapBox.vue b/src/components/MapBox.vue index bc17850..9f7e401 100644 --- a/src/components/MapBox.vue +++ b/src/components/MapBox.vue @@ -189,21 +189,21 @@ export default { // 初始化清空航线 this.clearRoute() // 获取所有航点 及 非起点所有航点 - routeObj.tasks.forEach((element, index) => { + routeObj.questAss.tasks.forEach((element, index) => { const lngLat = [element.y, element.x, 100] this.lngLats.push(lngLat) - if (index > 1 && index < routeObj.taskcount - 1) { + if (index > 1 && index < routeObj.questAss.taskcount - 1) { this.wayLngLats.push(lngLat) } }) // 跳转home点位置 this.goto(this.lngLats[0]) // 起飞 降落虚线 - if (routeObj.tasks[this.lngLats.length - 1].command === 20) { + if (routeObj.questAss.tasks[this.lngLats.length - 1].command === 20) { this.takeoffLngLats.push(this.lngLats[2]) this.takeoffLngLats.push(this.lngLats[1]) this.takeoffLngLats.push(this.lngLats[this.lngLats.length - 2]) - } else if (routeObj.tasks[this.lngLats.length - 1].command === 21) { + } else if (routeObj.questAss.tasks[this.lngLats.length - 1].command === 21) { this.takeoffLngLats.push(this.lngLats[2]) this.takeoffLngLats.push(this.lngLats[1]) } @@ -308,9 +308,9 @@ export default { } else if (index === 1) { // 起飞点 let takeoffPoint // 起点图标设定 根据最后一个航点为RETURN_TO_LAUNCH 20 返回起点降落 或者 最后一个航点为LAND 21 指定点降落 - if (routeObj.tasks[this.lngLats.length - 1].command === 20) { + if (routeObj.questAss.tasks[this.lngLats.length - 1].command === 20) { takeoffPoint = 'takeoffLandPoint' - } else if (routeObj.tasks[this.lngLats.length - 1].command === 21) { + } else if (routeObj.questAss.tasks[this.lngLats.length - 1].command === 21) { takeoffPoint = 'takeoffPoint' } this.map.addSource('takeoff_point', { @@ -343,11 +343,11 @@ export default { if (index !== this.lngLats.length - 1) { // 最后一个点不显示 要不和最后一个点结合 要不和起点结合 let wayPoint = 'wayPoint' if (index === this.lngLats.length - 2) { // 降落点 如果是LAND 21 和最后一个waypoint点结合 - if (routeObj.tasks[this.lngLats.length - 1].command === 21) { + if (routeObj.questAss.tasks[this.lngLats.length - 1].command === 21) { wayPoint = 'wayLandPoint' } } - if (routeObj.tasks[index].command === 94) { // command字段为94既然 投放放勾航点 放勾图标 + if (routeObj.questAss.tasks[index].command === 94) { // command字段为94既然 投放放勾航点 放勾图标 wayPoint = 'hookPoint' } this.map.addSource('way_point' + index, { diff --git a/src/views/layout/components/main/route/add.vue b/src/views/layout/components/main/route/add.vue index 6469604..5c0401d 100644 --- a/src/views/layout/components/main/route/add.vue +++ b/src/views/layout/components/main/route/add.vue @@ -91,7 +91,7 @@ export default { this.form.upFile = '' }, handleUpSuccess (res) { - this.$refs.mapbox.makeRoute(res.content.questAss)// 绘出航线 + this.$refs.mapbox.makeRoute(res.content)// 绘出航线 if (res.status === 0) { this.fileList = [] this.$message.error(res.msg)