【类 型】:fix
【主 题】:绘制航点 【描 述】: [原因]: [过程]:按照任务注册的索引 在地图上绘制 对应索引的航线 [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
86cecc9e34
commit
479103333e
@ -432,10 +432,6 @@ export default {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$message({
|
|
||||||
type: 'warning',
|
|
||||||
message: '存在风险,仍然提交订单'
|
|
||||||
})
|
|
||||||
this.runQuest()// 提交订单
|
this.runQuest()// 提交订单
|
||||||
})
|
})
|
||||||
.catch(action => {
|
.catch(action => {
|
||||||
@ -602,22 +598,22 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description: 在地图上绘制航线
|
* @description: 在地图上绘制航线
|
||||||
*/
|
*/
|
||||||
makeRouteForMap () {
|
makeRouteForMap () {
|
||||||
let bindRoute
|
let bindRoute
|
||||||
let routeData
|
let routeData
|
||||||
let found = false
|
let found = false
|
||||||
|
|
||||||
this.siteList.some(item => {
|
this.siteList.some(item => {
|
||||||
const runing = item.runing.split(',')
|
const runing = item.runing.split(',')
|
||||||
if (runing.includes(this.planesId.toString())) {
|
const index = runing.indexOf(this.planesId.toString())
|
||||||
|
if (index !== -1) {
|
||||||
found = true
|
found = true
|
||||||
// 获取航点信息
|
// 获取航点信息
|
||||||
if (item.bind_route !== null) { // 判断站点是否已经绑定站点
|
if (item.bind_route !== null) { // 判断站点是否已经绑定站点
|
||||||
bindRoute = item.bind_route.split(',')
|
bindRoute = item.bind_route.split(',')
|
||||||
this.$store.dispatch('fetchRouteList').then(res => { // 只能异步拿 虽然效率低一些
|
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))
|
this.$emit('makeRoute', JSON.parse(routeData))
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@ -627,7 +623,6 @@ export default {
|
|||||||
}
|
}
|
||||||
return false // 继续循环
|
return false // 继续循环
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
this.$message.error('未找到匹配的站点')
|
this.$message.error('未找到匹配的站点')
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user