Commit d8ed98c0 authored by dragondean@qq.com's avatar dragondean@qq.com

路线选择组件根据线路国家过滤渠道

parent fbcf16f1
...@@ -153,14 +153,15 @@ export default { ...@@ -153,14 +153,15 @@ export default {
let routerList = [] let routerList = []
this.openedRouterList.forEach(router => { this.openedRouterList.forEach(router => {
if(router.transportType == item.value){ if(router.transportType == item.value){
const availChannels = this.availChannelList.filter(channel => channel.countryId == router.destCountryId)
routerList.push(Object.assign({ routerList.push(Object.assign({
_merge: item.cssClass == 'channel' ? this.availChannelList.length || 1 : 1, _merge: item.cssClass == 'channel' ? availChannels.length || 1 : 1,
channel: item.cssClass == 'channel' ? this.availChannelList[0] || { channelId: 0} : {channelId: 0}, channel: item.cssClass == 'channel' ? availChannels[0] || { channelId: 0} : {channelId: 0},
}, router) }, router)
) )
// 字典的cssClass =channel则表示渠道相关(空运,海空联运) // 字典的cssClass =channel则表示渠道相关(空运,海空联运)
if(item.cssClass == 'channel'){ if(item.cssClass == 'channel'){
this.availChannelList.slice(1).forEach(channel => { availChannels.slice(1).forEach(channel => {
routerList.push(Object.assign({channel, _merge: 0}, router)) routerList.push(Object.assign({channel, _merge: 0}, router))
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment