|
|
@ -4,9 +4,10 @@ |
|
|
|
<!-- 学习状态 --> |
|
|
|
<view class="learnStatus"> |
|
|
|
<view class="card mt20"> |
|
|
|
<view class="flex-b" > |
|
|
|
<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> |
|
|
@ -15,7 +16,7 @@ |
|
|
|
</view> |
|
|
|
<view class="h1"><text class="active">学习状态</text></view> |
|
|
|
<!-- 考试结果 --> |
|
|
|
<view class="exam" v-if="showExam"> |
|
|
|
<view class="exam" v-if="showExam"> |
|
|
|
<view class="card" v-if="info.studentExamVO.pass"> |
|
|
|
<view class="flex-b padTb"> |
|
|
|
<view class="lab">科目二考试成绩已通过</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"> |
|
|
@ -63,20 +66,22 @@ |
|
|
|
<view class="bg"> |
|
|
|
<view class="row bg"> |
|
|
|
<view class="text">前往"12123"APP预约考试</view> |
|
|
|
<view class="btn" @click="$u.toast('请打开12123App预约')">去预约</view> |
|
|
|
<view class="btn" @click="$u.toast('请打开12123App预约')">去预约</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</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> |
|
|
@ -86,9 +91,10 @@ |
|
|
|
</view> --> |
|
|
|
<!-- 预约实操训练 --> |
|
|
|
<view class="" v-if="info.operationReservationVO&&info.operationReservationVO.length"> |
|
|
|
<view class="card" v-for="(item,index) in info.operationReservationVO" :key="index"> |
|
|
|
<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,54 +117,70 @@ |
|
|
|
getStudentSubject2Status, |
|
|
|
} from '@/config/api.js' |
|
|
|
export default { |
|
|
|
props: ['subjectStatus'], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
info: {}, |
|
|
|
showAppointment: false,//预约状态 |
|
|
|
showAppointmentExam: false,//预约考试 |
|
|
|
showExam: false,//考试状态 |
|
|
|
showAppointment: false, //预约状态 |
|
|
|
showAppointmentExam: false, //预约考试 |
|
|
|
showExam: false, //考试状态 |
|
|
|
reservationStatus: ['未签到', '已签到', '已签退', '已过期'], |
|
|
|
examReservationStatus: ['预约失败', '预约通过', '-预约中'] |
|
|
|
} |
|
|
|
}, |
|
|
|
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,//预约状态 |
|
|
|
this.showAppointmentExam = false,//预约考试 |
|
|
|
this.showExam = false,//考试状态 |
|
|
|
this[type] = true |
|
|
|
this.showAppointment = false, //预约状态 |
|
|
|
this.showAppointmentExam = false, //预约考试 |
|
|
|
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] : {} //实操预约情况 |
|
|
|
if(studentExamVO.pass) { |
|
|
|
let operationReservationVO = res.operationReservationVO ? res.operationReservationVO[0] : {} //实操预约情况 |
|
|
|
if (studentExamVO.pass) { |
|
|
|
// 如果通过了考试 |
|
|
|
this.changeStep('showExam') |
|
|
|
}else if(res.studentClassHourVO.classHourReachStatus) { |
|
|
|
} else if (res.studentClassHourVO.classHourReachStatus) { |
|
|
|
// 如果学时达标, |
|
|
|
let ExamVOTime = studentExamVO.examTime |
|
|
|
let ExamReservationVOTime = examReservationVO.examTime |
|
|
|
// 如果没有预约考试时间也没有考试时间 去预约考试 |
|
|
|
if (!ExamVOTime&&!ExamReservationVOTime) this.changeStep('showAppointmentExam') |
|
|
|
if (!ExamVOTime && !ExamReservationVOTime) this.changeStep('showAppointmentExam') |
|
|
|
// 如果有预约时间没有考试时间, 显示预约考试详情 |
|
|
|
if(!ExamVOTime&&ExamReservationVOTime) { |
|
|
|
if (!ExamVOTime && ExamReservationVOTime) { |
|
|
|
this.changeStep('showAppointmentExam') |
|
|
|
} |
|
|
|
if(ExamVOTime&&!ExamReservationVOTime) { |
|
|
|
if (ExamVOTime && !ExamReservationVOTime) { |
|
|
|
this.changeStep('showExam') |
|
|
|
} |
|
|
|
// 如果都有比时间 |
|
|
|
if(ExamVOTime&&ExamReservationVOTime) { |
|
|
|
ExamVOTime>ExamReservationVOTime?this.changeStep('showExam'):this.changeStep('showAppointmentExam') |
|
|
|
if (ExamVOTime && ExamReservationVOTime) { |
|
|
|
ExamVOTime > ExamReservationVOTime ? this.changeStep('showExam') : this.changeStep( |
|
|
|
'showAppointmentExam') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|