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('未找到匹配的站点') }