|
|
@ -6,7 +6,8 @@ |
|
|
|
<view class="card mt20"> |
|
|
|
<view class="flex-b"> |
|
|
|
<view class="lab">实操预约</view> |
|
|
|
<view class="link-arrow" @click="$goPage('/pages/carEntry/operaAppointment/operaAppointment?subject=2')"> |
|
|
|
<view class="link-arrow" |
|
|
|
@click="$goPage('/pages/carEntry/operaAppointment/operaAppointment?subject=2')"> |
|
|
|
<view class="txt">去预约</view> |
|
|
|
<u-icon name="arrow-right" color="#3776FF" :size="16"></u-icon> |
|
|
|
</view> |
|
|
@ -23,10 +24,11 @@ |
|
|
|
{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex-b bg" v-if="!info.studentExamVO.canComment"> |
|
|
|
<view class="flex-b bg"> |
|
|
|
<view class="row"> |
|
|
|
<view class="text">考试成绩:{{ info.studentExamVO.examResult }}分</view> |
|
|
|
<view class="btn" @click="$goPage('/pages/carEntry/evaluate/evaluate?subject=2&coachType=1')">去评价</view> |
|
|
|
<view class="btn" |
|
|
|
@click="$goPage('/pages/carEntry/evaluate/evaluate?subject=2&coachType=1')" v-if="!info.studentExamVO.canComment">去评价</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -34,7 +36,8 @@ |
|
|
|
<view class="card" v-else> |
|
|
|
<view class="flex-b padTb"> |
|
|
|
<view class="lab">科目二考试成绩未通过</view> |
|
|
|
<view class="date">{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }}</view> |
|
|
|
<view class="date">{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="bg"> |
|
|
@ -69,14 +72,16 @@ |
|
|
|
</view> |
|
|
|
<view class="card" v-else> |
|
|
|
<view class="flex-b padTb"> |
|
|
|
<view class="lab">科目二考试预约{{ examReservationStatus[info.examReservationVO.examReservationStatus]}}</view> |
|
|
|
<view class="lab"> |
|
|
|
科目二考试预约{{ examReservationStatus[info.examReservationVO.examReservationStatus]}}</view> |
|
|
|
</view> |
|
|
|
<view class="bg"> |
|
|
|
<view class="row"> |
|
|
|
<view class="text">考试场地:{{info.examReservationVO.examAddress}}</view> |
|
|
|
</view> |
|
|
|
<view class="row"> |
|
|
|
<view class="text">考试时间:{{ $u.timeFormat(info.examReservationVO.examTime, 'yyyy-mm-dd hh:MM:ss') }} </view> |
|
|
|
<view class="text"> |
|
|
|
考试时间:{{ $u.timeFormat(info.examReservationVO.examTime, 'yyyy-mm-dd hh:MM:ss') }} </view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -88,7 +93,8 @@ |
|
|
|
<view class="" v-if="info.operationReservationVO&&info.operationReservationVO.length"> |
|
|
|
<view class="card" v-for="(item,index) in info.operationReservationVO" :key="index"> |
|
|
|
<view class="flex-b padTb"> |
|
|
|
<view class="lab">科目二实操训练 {{ item.reservationStatus==9?'已取消': reservationStatus[item.reservationStatus]}}</view> |
|
|
|
<view class="lab">科目二实操训练 |
|
|
|
{{ item.reservationStatus==9?'已取消': reservationStatus[item.reservationStatus]}}</view> |
|
|
|
<view class="date">{{ $u.timeFormat(item.joe, 'yyyy-mm-dd hh:MM:ss') }}</view> |
|
|
|
</view> |
|
|
|
<view class="bg"> |
|
|
@ -96,7 +102,8 @@ |
|
|
|
<view class="row">预约教练:{{item.reservationCoach}}</view> |
|
|
|
<view class="row">预约车辆:{{item.reservationCar}}</view> |
|
|
|
<view class="row">预约时间:{{ $u.timeFormat(item.reservationTime, 'yyyy-mm-dd hh:MM:ss') }}</view> |
|
|
|
<view class="row" v-if="item.joe">核销时间:{{ $u.timeFormat(item.joe, 'yyyy-mm-dd hh:MM:ss') }}</view> |
|
|
|
<view class="row" v-if="item.joe">核销时间:{{ $u.timeFormat(item.joe, 'yyyy-mm-dd hh:MM:ss') }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -110,6 +117,7 @@ |
|
|
|
getStudentSubject2Status, |
|
|
|
} from '@/config/api.js' |
|
|
|
export default { |
|
|
|
props: ['subjectStatus'], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
info: {}, |
|
|
@ -121,12 +129,22 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getStudentSubject2StatusFn() |
|
|
|
// this.getStudentSubject2StatusFn() |
|
|
|
// 状态 |
|
|
|
// 1,已预约训练, |
|
|
|
// 2,学时达标,去预约考试, |
|
|
|
// 3,考试结果 |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
subjectStatus: { |
|
|
|
handler: function(res) { |
|
|
|
console.log('obj2改变了') |
|
|
|
this.getStudentSubject2StatusFn(res) |
|
|
|
}, |
|
|
|
// immediate: true, |
|
|
|
deep: true |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
changeStep(type) { |
|
|
|
this.showAppointment = false, //预约状态 |
|
|
@ -134,8 +152,12 @@ |
|
|
|
this.showExam = false, //考试状态 |
|
|
|
this[type] = true |
|
|
|
}, |
|
|
|
async getStudentSubject2StatusFn() { |
|
|
|
const {data: res} = await getStudentSubject2Status({studentId: this.studentId}) |
|
|
|
async getStudentSubject2StatusFn(res) { |
|
|
|
// const { |
|
|
|
// data: res |
|
|
|
// } = await getStudentSubject2Status({ |
|
|
|
// studentId: this.studentId |
|
|
|
// }) |
|
|
|
let studentExamVO = res.studentExamVO || {} //考试结果 |
|
|
|
let examReservationVO = res.examReservationVO || {} //考试预约情况 |
|
|
|
let operationReservationVO = res.operationReservationVO ? res.operationReservationVO[0] : {} //实操预约情况 |
|
|
@ -157,7 +179,8 @@ |
|
|
|
} |
|
|
|
// 如果都有比时间 |
|
|
|
if (ExamVOTime && ExamReservationVOTime) { |
|
|
|
ExamVOTime>ExamReservationVOTime?this.changeStep('showExam'):this.changeStep('showAppointmentExam') |
|
|
|
ExamVOTime > ExamReservationVOTime ? this.changeStep('showExam') : this.changeStep( |
|
|
|
'showAppointmentExam') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|