|
|
@ -81,9 +81,6 @@ export default { |
|
|
|
coachInfo: { |
|
|
|
name: '' |
|
|
|
}, |
|
|
|
dateInfo: { |
|
|
|
_time: '' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -92,7 +89,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
submitBtn: util.debounce(function(){ |
|
|
|
let { courseInfo, classInfo, coachInfo, dateInfo } = this.selectInfo; |
|
|
|
let { courseInfo, classInfo, coachInfo } = this.selectInfo; |
|
|
|
let { selectTimeIDS } = this; |
|
|
|
if(!courseInfo.id || !classInfo.id || !coachInfo.id || selectTimeIDS.length<=0 )return util.showNone('请选择完整!'); |
|
|
|
util.showLoad(); |
|
|
@ -141,28 +138,16 @@ export default { |
|
|
|
this.selectTimeIDS = [...this.tempSelectTimeID]; |
|
|
|
this.isShowTimeModal = false; |
|
|
|
}, |
|
|
|
// 日期切换 |
|
|
|
timeChange(e){ |
|
|
|
console.warn(e) |
|
|
|
let { timeList, selectInfo } = this; |
|
|
|
if(!selectInfo.coachInfo.id)return util.showNone('请选择教练!'); |
|
|
|
let _timeInfo = timeList[e.detail.value] || {}; |
|
|
|
this.selectInfo = { |
|
|
|
...selectInfo, |
|
|
|
dateInfo: _timeInfo |
|
|
|
}; |
|
|
|
}, |
|
|
|
// 教练切换 |
|
|
|
coachChange(e){ |
|
|
|
let { coachList, selectInfo } = this; |
|
|
|
if(!selectInfo.classInfo.id)return util.showNone('请选择班级!'); |
|
|
|
let _coachInfo = coachList[e.detail.value] || {}; |
|
|
|
this.timeList = []; |
|
|
|
this.selectTimeIDS = []; |
|
|
|
this.selectInfo = { |
|
|
|
...selectInfo, |
|
|
|
coachInfo: _coachInfo, |
|
|
|
dateInfo: { |
|
|
|
_time: '' |
|
|
|
} |
|
|
|
coachInfo: _coachInfo |
|
|
|
}; |
|
|
|
|
|
|
|
this.getShiftWorkClassTimes(selectInfo.courseInfo.id); |
|
|
@ -172,14 +157,13 @@ export default { |
|
|
|
let { classList, selectInfo } = this; |
|
|
|
if(!selectInfo.courseInfo.id)return util.showNone('请选择课程!'); |
|
|
|
let _classInfo = classList[e.detail.value] || {}; |
|
|
|
this.timeList = []; |
|
|
|
this.selectTimeIDS = []; |
|
|
|
this.selectInfo = { |
|
|
|
...selectInfo, |
|
|
|
classInfo: _classInfo, |
|
|
|
coachInfo: { |
|
|
|
name: '' |
|
|
|
}, |
|
|
|
dateInfo: { |
|
|
|
_time: '' |
|
|
|
} |
|
|
|
}; |
|
|
|
this.getCoachList(); |
|
|
@ -188,6 +172,8 @@ export default { |
|
|
|
courseChange(e){ |
|
|
|
let { courseList } = this; |
|
|
|
let _courseInfo = courseList[e.detail.value] || {}; |
|
|
|
this.timeList = []; |
|
|
|
this.selectTimeIDS = []; |
|
|
|
this.selectInfo = { |
|
|
|
courseInfo: _courseInfo, |
|
|
|
classInfo: { |
|
|
@ -195,9 +181,6 @@ export default { |
|
|
|
}, |
|
|
|
coachInfo: { |
|
|
|
name: '' |
|
|
|
}, |
|
|
|
dateInfo: { |
|
|
|
_time: '' |
|
|
|
} |
|
|
|
}; |
|
|
|
this.getClassList( _courseInfo.id ); |
|
|
@ -219,7 +202,7 @@ export default { |
|
|
|
this.timeList = _list.map(e=>{ |
|
|
|
return { |
|
|
|
...e, |
|
|
|
_time: `${e.date} ${e.start_duration}` |
|
|
|
_time: `${e.date} ${e.start_duration}~${e.end_duration}` |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|