|
|
@ -156,9 +156,15 @@ export default { |
|
|
|
computed: { |
|
|
|
// 场地时间间隔列表 |
|
|
|
venueTimeList(){ |
|
|
|
let { venueList } = this; |
|
|
|
if(!venueList.length || !venueList[0] || !venueList[0].items || !venueList[0].items.length)return []; |
|
|
|
// return []; |
|
|
|
let _venueList = this.venueList || [] |
|
|
|
if(!_venueList.length || !_venueList[0] || !_venueList[0].items || !_venueList[0].items.length)return []; |
|
|
|
let _obj = {}; |
|
|
|
let _items = _venueList[0].items, _tempArr; |
|
|
|
_tempArr = _items.reduce((_arr, val)=>_arr.concat(val.durations.split('-')), []); |
|
|
|
// 对除去最后一个进行去重, 然后尾部拼接最后一个 |
|
|
|
return [...new Set(_tempArr.splice(0, _tempArr.length-2)), _tempArr[_tempArr.length-1]]; |
|
|
|
|
|
|
|
return ([].concat(...venueList[0].items.map(e=>e.durations&&e.durations.split('-')))).filter(e=>{ |
|
|
|
let _bol = !!_obj[e]; |
|
|
|
!_bol?_obj[e] = true:''; |
|
|
|