|
|
@ -383,6 +383,8 @@ export default { |
|
|
|
venueList: _venueList, |
|
|
|
selectedKey: '_isSelect', |
|
|
|
linkageKey: 'isLinkage', |
|
|
|
linkageIDArrKey: 'link_venue_ids', |
|
|
|
linkageIDKey: 'venue_id', |
|
|
|
}) |
|
|
|
this.venueList = _venueList; |
|
|
|
this.$nextTick(_=>{ |
|
|
@ -401,13 +403,15 @@ export default { |
|
|
|
venueList = [], // 所有场地 |
|
|
|
selectedKey = 'selectedKey', // 选中key |
|
|
|
linkageKey = 'linkageKey', // 联动禁用key |
|
|
|
linkageIDArrKey = 'link_venue_ids', |
|
|
|
linkageIDKey = 'venue_id', |
|
|
|
curTag |
|
|
|
}){ |
|
|
|
let _curGroupInfo = {...venueList[group]}; |
|
|
|
for(let i=0; i<venueList.length; i++){ |
|
|
|
let _link_venue_ids = _curGroupInfo.link_venue_ids || []; |
|
|
|
let _link_venue_ids = _curGroupInfo[linkageIDArrKey] || []; |
|
|
|
|
|
|
|
if(_link_venue_ids.includes(venueList[i].venue_id)){ |
|
|
|
if(_link_venue_ids.includes(venueList[i][linkageIDKey])){ |
|
|
|
_curGroupInfo.items.forEach(ele=>{ |
|
|
|
// 单列联动 |
|
|
|
if(venueList[i].link_venue_ids && venueList[i].link_venue_ids.length == 1){ |
|
|
@ -415,14 +419,13 @@ export default { |
|
|
|
} |
|
|
|
// 多列联动 |
|
|
|
if(venueList[i].link_venue_ids && venueList[i].link_venue_ids.length > 1){ |
|
|
|
let _link_venueLs = venueList.filter(item=> venueList[i].link_venue_ids.includes(item.venue_id)); |
|
|
|
let _link_venueLs = venueList.filter(item=> venueList[i].link_venue_ids.includes(item[linkageIDKey])); |
|
|
|
// 已联动列表选中情况 ex: [ true, false ]; |
|
|
|
let _link_venueLs_selectedLs = _link_venueLs.map(el=> el['items'][ele._defineIndex] && el['items'][ele._defineIndex][selectedKey]); |
|
|
|
venueList[i].items[ele._defineIndex][linkageKey] = _link_venueLs_selectedLs.includes(true); // 多场联动,只要有一个被选中就禁止 |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return venueList || []; |
|
|
|
}, |
|
|
|