|
@ -22,20 +22,24 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="si-btns"> |
|
|
<view class="si-btns"> |
|
|
|
|
|
<block v-if="getCourseType(e.course_order.course.kind) === 1"> |
|
|
|
|
|
<view hover-class="hover-active" v-if="e.is_show_call_name_button" @click="rollCallBtn(e)">点名</view> |
|
|
|
|
|
<view hover-class="hover-active" @click="toTaskList(e)">作业</view> |
|
|
|
|
|
</block> |
|
|
<view hover-class="hover-active" @click="toReview(e)">点评</view> |
|
|
<view hover-class="hover-active" @click="toReview(e)">点评</view> |
|
|
<view hover-class="hover-active" @click="toShift(e)">调班</view> |
|
|
|
|
|
|
|
|
<view hover-class="hover-active" @click="toShift(e)" v-if="getCourseType(e.course_order.course.kind) === 0">调班</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="l-mask" v-if="false"> |
|
|
|
|
|
|
|
|
<view class="l-mask" v-if="rollCallInfo!==null"> |
|
|
<view class="m-modal"> |
|
|
<view class="m-modal"> |
|
|
<view class="m-tit">确定点名吗? 学员信息如下</view> |
|
|
<view class="m-tit">确定点名吗? 学员信息如下</view> |
|
|
<view class="m-line"><text>学员: </text>张三</view> |
|
|
|
|
|
<view class="m-line"><text>上课时间: </text>2020-08-22 10:30~11:30</view> |
|
|
|
|
|
<view class="m-line"><text>当前次数/课程次数: </text>12/15</view> |
|
|
|
|
|
|
|
|
<view class="m-line"><text>学员: </text>{{rollCallInfo.course_order.name || '-'}} </view> |
|
|
|
|
|
<view class="m-line"><text>上课时间: </text>{{rollCallInfo.duration_data.date || '-'}} {{rollCallInfo.duration_data.start_duration || '-'}}~{{rollCallInfo.duration_data.end_duration || '-'}}</view> |
|
|
|
|
|
<view class="m-line"><text>当前次数/课程次数: </text>{{rollCallInfo.course_order.number || 0}}/{{rollCallInfo.course_order.course.number || 0}}</view> |
|
|
<view class="m-btns"> |
|
|
<view class="m-btns"> |
|
|
<view hover-class="hover-active">取消</view> |
|
|
|
|
|
<view hover-class="hover-active">确定</view> |
|
|
|
|
|
|
|
|
<view hover-class="hover-active" @click="cancelRollCall">取消</view> |
|
|
|
|
|
<view hover-class="hover-active" @click="confirmRollCall">确定</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -51,6 +55,7 @@ export default { |
|
|
return { |
|
|
return { |
|
|
optionsQuery: {}, |
|
|
optionsQuery: {}, |
|
|
studentList: [], |
|
|
studentList: [], |
|
|
|
|
|
rollCallInfo: null, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(options){ |
|
|
onLoad(options){ |
|
@ -62,6 +67,56 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
toTaskList(e){ |
|
|
|
|
|
let { optionsQuery } = this; |
|
|
|
|
|
let _query = { |
|
|
|
|
|
...optionsQuery, |
|
|
|
|
|
user_id: e.course_order.user_id |
|
|
|
|
|
// class_id: e.id, |
|
|
|
|
|
// class_name: e.class_name, |
|
|
|
|
|
} |
|
|
|
|
|
util.routeTo(`/pages/course/task/task?query=${util.jsonStr(_query)}`, 'nT'); |
|
|
|
|
|
}, |
|
|
|
|
|
confirmRollCall: util.debounce(function(){ |
|
|
|
|
|
let { rollCallInfo } = this; |
|
|
|
|
|
util.showLoad(); |
|
|
|
|
|
servers.post({ |
|
|
|
|
|
url: API.course.checkOrder, |
|
|
|
|
|
data: { |
|
|
|
|
|
order_nos: [rollCallInfo.course_order.order_no], |
|
|
|
|
|
duration_id: rollCallInfo.duration_data.id |
|
|
|
|
|
}, |
|
|
|
|
|
isDefaultGet: false, |
|
|
|
|
|
}) |
|
|
|
|
|
.then(res=>{ |
|
|
|
|
|
util.hideLoad(); |
|
|
|
|
|
if(res.data.code == 0){ |
|
|
|
|
|
util.showNone(res.data.message || '操作成功!'); |
|
|
|
|
|
this.rollCallInfo = null; |
|
|
|
|
|
setTimeout(_=>{ |
|
|
|
|
|
let { optionsQuery } = this; |
|
|
|
|
|
this.studentList = []; |
|
|
|
|
|
this.getStudentList({ |
|
|
|
|
|
course_id: optionsQuery.course_id, |
|
|
|
|
|
class_id: optionsQuery.class_id || 0, |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
util.showNone(res.data.message || '操作失败!'); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(util.hideLoad) |
|
|
|
|
|
}, 300, 300), |
|
|
|
|
|
cancelRollCall(){ |
|
|
|
|
|
this.rollCallInfo = null; |
|
|
|
|
|
}, |
|
|
|
|
|
rollCallBtn(e){ |
|
|
|
|
|
this.rollCallInfo = e; |
|
|
|
|
|
}, |
|
|
|
|
|
// 课程类型映射 成班课(0)/私教课(1); |
|
|
|
|
|
getCourseType(type = ''){ |
|
|
|
|
|
return ['成班课', '私教课'].findIndex(e=>e===type); |
|
|
|
|
|
}, |
|
|
phoneCall(num){ |
|
|
phoneCall(num){ |
|
|
uni.makePhoneCall({ |
|
|
uni.makePhoneCall({ |
|
|
phoneNumber: num || '-' |
|
|
phoneNumber: num || '-' |
|
@ -94,6 +149,7 @@ export default { |
|
|
course_id, |
|
|
course_id, |
|
|
class_id, |
|
|
class_id, |
|
|
}){ |
|
|
}){ |
|
|
|
|
|
util.showLoad(); |
|
|
servers.get({ |
|
|
servers.get({ |
|
|
url: API.course.getCourseStudentList, |
|
|
url: API.course.getCourseStudentList, |
|
|
data: { |
|
|
data: { |
|
@ -103,6 +159,7 @@ export default { |
|
|
failMsg: '加载失败!', |
|
|
failMsg: '加载失败!', |
|
|
}) |
|
|
}) |
|
|
.then(res=>{ |
|
|
.then(res=>{ |
|
|
|
|
|
util.hideLoad(); |
|
|
let _list = res.list || []; |
|
|
let _list = res.list || []; |
|
|
this.studentList = _list; |
|
|
this.studentList = _list; |
|
|
console.warn(res); |
|
|
console.warn(res); |
|
|