From 479103333e2c7a3c7469f23b764895e6381e0881 Mon Sep 17 00:00:00 2001 From: tk Date: Tue, 9 Jul 2024 22:04:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=09=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afix=20=E3=80=90=E4=B8=BB=09=E9=A2=98=E3=80=91=EF=BC=9A?= =?UTF-8?q?=E7=BB=98=E5=88=B6=E8=88=AA=E7=82=B9=20=E3=80=90=E6=8F=8F=09?= =?UTF-8?q?=E8=BF=B0=E3=80=91=EF=BC=9A=20=09[=E5=8E=9F=E5=9B=A0]=EF=BC=9A?= =?UTF-8?q?=20=09[=E8=BF=87=E7=A8=8B]=EF=BC=9A=E6=8C=89=E7=85=A7=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=B3=A8=E5=86=8C=E7=9A=84=E7=B4=A2=E5=BC=95=20?= =?UTF-8?q?=E5=9C=A8=E5=9C=B0=E5=9B=BE=E4=B8=8A=E7=BB=98=E5=88=B6=20?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=B4=A2=E5=BC=95=E7=9A=84=E8=88=AA=E7=BA=BF?= =?UTF-8?q?=20=09[=E5=BD=B1=E5=93=8D]=EF=BC=9A=20=E3=80=90=E7=BB=93=09?= =?UTF-8?q?=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 | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/components/ControllerTabs.vue b/src/components/ControllerTabs.vue index e840eee..02f60c2 100644 --- a/src/components/ControllerTabs.vue +++ b/src/components/ControllerTabs.vue @@ -432,10 +432,6 @@ export default { type: 'warning' }) .then(() => { - this.$message({ - type: 'warning', - message: '存在风险,仍然提交订单' - }) this.runQuest()// 提交订单 }) .catch(action => { @@ -602,22 +598,22 @@ export default { }) }, /** - * @description: 在地图上绘制航线 - */ + * @description: 在地图上绘制航线 + */ makeRouteForMap () { let bindRoute let routeData let found = false - this.siteList.some(item => { const runing = item.runing.split(',') - if (runing.includes(this.planesId.toString())) { + const index = runing.indexOf(this.planesId.toString()) + if (index !== -1) { found = true // 获取航点信息 if (item.bind_route !== null) { // 判断站点是否已经绑定站点 bindRoute = item.bind_route.split(',') this.$store.dispatch('fetchRouteList').then(res => { // 只能异步拿 虽然效率低一些 - routeData = res.find(element => element.id === bindRoute[0]).route_data + routeData = res.find(element => element.id === bindRoute[index]).route_data this.$emit('makeRoute', JSON.parse(routeData)) }) } else { @@ -627,7 +623,6 @@ export default { } return false // 继续循环 }) - if (!found) { this.$message.error('未找到匹配的站点') }