|
@ -1,12 +1,13 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="comp"> |
|
|
<view class="comp"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 学习状态 --> |
|
|
<!-- 学习状态 --> |
|
|
<view class="learnStatus"> |
|
|
<view class="learnStatus"> |
|
|
<view class="card mt20"> |
|
|
<view class="card mt20"> |
|
|
<view class="flex-b" > |
|
|
|
|
|
|
|
|
<view class="flex-b"> |
|
|
<view class="lab">实操预约</view> |
|
|
<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> |
|
|
<view class="txt">去预约</view> |
|
|
<u-icon name="arrow-right" color="#3776FF" :size="16"></u-icon> |
|
|
<u-icon name="arrow-right" color="#3776FF" :size="16"></u-icon> |
|
|
</view> |
|
|
</view> |
|
@ -15,7 +16,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="h1"><text class="active">学习状态</text></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="card" v-if="info.studentExamVO.pass"> |
|
|
<view class="flex-b padTb"> |
|
|
<view class="flex-b padTb"> |
|
|
<view class="lab">科目二考试成绩已通过</view> |
|
|
<view class="lab">科目二考试成绩已通过</view> |
|
@ -23,20 +24,22 @@ |
|
|
{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }} |
|
|
{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex-b bg" v-if="!info.studentExamVO.canComment"> |
|
|
|
|
|
|
|
|
<view class="flex-b bg"> |
|
|
<view class="row"> |
|
|
<view class="row"> |
|
|
<view class="text">考试成绩:{{ info.studentExamVO.examResult }}分</view> |
|
|
<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> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="card" v-else> |
|
|
<view class="card" v-else> |
|
|
<view class="flex-b padTb"> |
|
|
<view class="flex-b padTb"> |
|
|
<view class="lab">科目二考试成绩未通过</view> |
|
|
<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> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="bg"> |
|
|
<view class="bg"> |
|
|
<view class="row bg"> |
|
|
<view class="row bg"> |
|
|
<view class="text">前往"12123"APP预约考试</view> |
|
|
<view class="text">前往"12123"APP预约考试</view> |
|
@ -45,9 +48,9 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 预约考试 --> |
|
|
<!-- 预约考试 --> |
|
|
<view class="" v-if="showAppointmentExam"> |
|
|
<view class="" v-if="showAppointmentExam"> |
|
|
<view class="card" v-if="!info.examReservationVO"> |
|
|
<view class="card" v-if="!info.examReservationVO"> |
|
@ -63,20 +66,22 @@ |
|
|
<view class="bg"> |
|
|
<view class="bg"> |
|
|
<view class="row bg"> |
|
|
<view class="row bg"> |
|
|
<view class="text">前往"12123"APP预约考试</view> |
|
|
<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> |
|
|
</view> |
|
|
</view> |
|
|
<view class="card" v-else> |
|
|
<view class="card" v-else> |
|
|
<view class="flex-b padTb"> |
|
|
<view class="flex-b padTb"> |
|
|
<view class="lab">科目二考试预约{{ examReservationStatus[info.examReservationVO.examReservationStatus]}}</view> |
|
|
|
|
|
|
|
|
<view class="lab"> |
|
|
|
|
|
科目二考试预约{{ examReservationStatus[info.examReservationVO.examReservationStatus]}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="bg"> |
|
|
<view class="bg"> |
|
|
<view class="row"> |
|
|
<view class="row"> |
|
|
<view class="text">考试场地:{{info.examReservationVO.examAddress}}</view> |
|
|
<view class="text">考试场地:{{info.examReservationVO.examAddress}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="row"> |
|
|
<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> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -86,9 +91,10 @@ |
|
|
</view> --> |
|
|
</view> --> |
|
|
<!-- 预约实操训练 --> |
|
|
<!-- 预约实操训练 --> |
|
|
<view class="" v-if="info.operationReservationVO&&info.operationReservationVO.length"> |
|
|
<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="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 class="date">{{ $u.timeFormat(item.joe, 'yyyy-mm-dd hh:MM:ss') }}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="bg"> |
|
|
<view class="bg"> |
|
@ -96,11 +102,12 @@ |
|
|
<view class="row">预约教练:{{item.reservationCoach}}</view> |
|
|
<view class="row">预约教练:{{item.reservationCoach}}</view> |
|
|
<view class="row">预约车辆:{{item.reservationCar}}</view> |
|
|
<view class="row">预约车辆:{{item.reservationCar}}</view> |
|
|
<view class="row">预约时间:{{ $u.timeFormat(item.reservationTime, 'yyyy-mm-dd hh:MM:ss') }}</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> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -110,57 +117,73 @@ |
|
|
getStudentSubject2Status, |
|
|
getStudentSubject2Status, |
|
|
} from '@/config/api.js' |
|
|
} from '@/config/api.js' |
|
|
export default { |
|
|
export default { |
|
|
|
|
|
props: ['subjectStatus'], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
info: {}, |
|
|
info: {}, |
|
|
showAppointment: false,//预约状态 |
|
|
|
|
|
showAppointmentExam: false,//预约考试 |
|
|
|
|
|
showExam: false,//考试状态 |
|
|
|
|
|
|
|
|
showAppointment: false, //预约状态 |
|
|
|
|
|
showAppointmentExam: false, //预约考试 |
|
|
|
|
|
showExam: false, //考试状态 |
|
|
reservationStatus: ['未签到', '已签到', '已签退', '已过期'], |
|
|
reservationStatus: ['未签到', '已签到', '已签退', '已过期'], |
|
|
examReservationStatus: ['预约失败', '预约通过', '-预约中'] |
|
|
examReservationStatus: ['预约失败', '预约通过', '-预约中'] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getStudentSubject2StatusFn() |
|
|
|
|
|
|
|
|
// this.getStudentSubject2StatusFn() |
|
|
// 状态 |
|
|
// 状态 |
|
|
// 1,已预约训练, |
|
|
// 1,已预约训练, |
|
|
// 2,学时达标,去预约考试, |
|
|
// 2,学时达标,去预约考试, |
|
|
// 3,考试结果 |
|
|
// 3,考试结果 |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
subjectStatus: { |
|
|
|
|
|
handler: function(res) { |
|
|
|
|
|
console.log('obj2改变了') |
|
|
|
|
|
this.getStudentSubject2StatusFn(res) |
|
|
|
|
|
}, |
|
|
|
|
|
// immediate: true, |
|
|
|
|
|
deep: true |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
changeStep(type) { |
|
|
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 studentExamVO = res.studentExamVO || {} //考试结果 |
|
|
let examReservationVO = res.examReservationVO || {} //考试预约情况 |
|
|
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') |
|
|
this.changeStep('showExam') |
|
|
}else if(res.studentClassHourVO.classHourReachStatus) { |
|
|
|
|
|
|
|
|
} else if (res.studentClassHourVO.classHourReachStatus) { |
|
|
// 如果学时达标, |
|
|
// 如果学时达标, |
|
|
let ExamVOTime = studentExamVO.examTime |
|
|
let ExamVOTime = studentExamVO.examTime |
|
|
let ExamReservationVOTime = examReservationVO.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') |
|
|
this.changeStep('showAppointmentExam') |
|
|
} |
|
|
} |
|
|
if(ExamVOTime&&!ExamReservationVOTime) { |
|
|
|
|
|
|
|
|
if (ExamVOTime && !ExamReservationVOTime) { |
|
|
this.changeStep('showExam') |
|
|
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') |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('时间') |
|
|
console.log('时间') |
|
|
console.log(res) |
|
|
console.log(res) |
|
|
this.info = res |
|
|
this.info = res |
|
|