洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
6.3 KiB

10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
  1. <template>
  2. <view class="comp">
  3. <!-- 学习状态 -->
  4. <view class="learnStatus">
  5. <view class="card mt20" v-if="vuex_userInfo.trainProcess">
  6. <view class="flex-b" >
  7. <view class="lab">实操预约</view>
  8. <view class="link-arrow" @click="$goPage('/pages/carEntry/operaAppointment/operaAppointment?subject=3')">
  9. <view class="txt">去预约</view>
  10. <u-icon name="arrow-right" color="#3776FF" :size="16"></u-icon>
  11. </view>
  12. <!-- <view class="btn" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate?subject=3&coachType=1')">去学习</view> -->
  13. </view>
  14. </view>
  15. <view class="h1"><text class="active">学习状态</text></view>
  16. <!-- 考试结果 -->
  17. <view class="exam" v-if="showExam">
  18. <view class="card" v-if="info.studentExamVO.pass">
  19. <view class="flex-b padTb">
  20. <view class="lab">科目三考试成绩已通过</view>
  21. <view class="date">
  22. {{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }}
  23. </view>
  24. </view>
  25. <view class="flex-b bg" >
  26. <view class="row">
  27. <view class="text">考试成绩{{ info.studentExamVO.examResult }}</view>
  28. <view class="btn" @click="$goPage('/pages/carEntry/evaluate/evaluate?subject=3&coachType=1')" v-if="!info.studentExamVO.canComment">去评价</view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="card" v-else>
  33. <view class="flex-b padTb">
  34. <view class="lab">科目三考试成绩未通过</view>
  35. <view class="date">{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
  36. </view>
  37. <view class="bg">
  38. <view class="row bg">
  39. <view class="text">前往"12123"APP预约考试</view>
  40. <view class="btn" @click="$u.toast('请打开12123App预约')">去预约</view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 预约考试 -->
  46. <view class="" v-if="showAppointmentExam">
  47. <view class="card" v-if="!info.examReservationVO">
  48. <view class="flex-b padTb">
  49. <view class="lab">科目三学习进度已通过</view>
  50. </view>
  51. <view class="bg">
  52. <view class="row bg">
  53. <view class="text">前往"12123"APP预约考试</view>
  54. <view class="btn" @click="$u.toast('请打开12123App预约')">去预约</view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="card" v-else>
  59. <view class="flex-b padTb">
  60. <view class="lab">科目三考试预约{{ examReservationStatus[info.examReservationVO.examReservationStatus]}}</view>
  61. </view>
  62. <view class="bg">
  63. <view class="row">
  64. <view class="text">考试场地{{info.examReservationVO.examAddress}}</view>
  65. </view>
  66. <view class="row">
  67. <view class="text">考试时间{{ $u.timeFormat(info.examReservationVO.examTime, 'yyyy-mm-dd hh:MM:ss') }} </view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 预约实操训练 -->
  73. <view class="" v-if="info.operationReservationVO&&info.operationReservationVO.length">
  74. <view class="card" v-for="(item,index) in info.operationReservationVO" :key="index" @click.stop="$goPage('/pages/mineEntry/myAppointment/detail/detail?id='+item.reservationId)">
  75. <view class="flex-b padTb">
  76. <view class="lab">科目三实操训练</view>
  77. <!-- <view class="lab">科目三实操训练 {{ item.reservationStatus==9?'已取消': reservationStatus[item.reservationStatus]}}</view> -->
  78. <view class="date">{{ item.reservationTime }}</view>
  79. </view>
  80. <view class="bg">
  81. <view class="row oneRowText">预约场地{{item.reservationAddress}}</view>
  82. <view class="row">预约教练{{item.reservationCoach}}</view>
  83. <view class="row">预约车辆{{item.reservationCar}}</view>
  84. <view class="row">预约时间{{ item.createTime }}</view>
  85. <!-- <view class="row" v-if="item.joe">核销时间{{ $u.timeFormat(item.joe, 'yyyy-mm-dd hh:MM:ss') }}</view> -->
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. import {
  94. getStudentSubject3Status,
  95. } from '@/config/api.js'
  96. export default {
  97. props: ['subjectStatus'],
  98. data() {
  99. return {
  100. info: {},
  101. showAppointment: false,//预约状态
  102. showAppointmentExam: false,//预约考试
  103. showExam: false,//考试状态
  104. reservationStatus: ['未签到', '已签到', '已签退', '已过期'],
  105. examReservationStatus: ['预约失败', '预约通过', '-预约中']
  106. }
  107. },
  108. created() {
  109. // 状态
  110. // 1,已预约训练,
  111. // 2,学时达标,去预约考试,
  112. // 3,考试结果
  113. },
  114. watch: {
  115. subjectStatus: {
  116. handler: function(res) {
  117. console.log('obj3改变了')
  118. this.getStudentSubject3StatusFn(res)
  119. },
  120. // immediate: true,
  121. deep: true
  122. }
  123. },
  124. methods: {
  125. changeStep(type) {
  126. this.showAppointment = false,//预约状态
  127. this.showAppointmentExam = false,//预约考试
  128. this.showExam = false,//考试状态
  129. this[type] = true
  130. },
  131. async getStudentSubject3StatusFn(res) {
  132. // const {data: res} = await getStudentSubject3Status({studentId: this.studentId})
  133. let studentExamVO = res.studentExamVO || {} //考试结果
  134. let examReservationVO = res.examReservationVO || {} //考试预约情况
  135. let operationReservationVO = res.operationReservationVO?res.operationReservationVO[0] : {} //实操预约情况
  136. if(studentExamVO.pass) {
  137. // 如果通过了考试
  138. this.changeStep('showExam')
  139. }else if(res.studentClassHourVO.classHourReachStatus) {
  140. // 如果学时达标,
  141. let ExamVOTime = studentExamVO.examTime
  142. let ExamReservationVOTime = examReservationVO.examTime
  143. // 如果没有预约考试时间也没有考试时间 去预约考试
  144. if (!ExamVOTime&&!ExamReservationVOTime) this.changeStep('showAppointmentExam')
  145. // 如果有预约时间没有考试时间, 显示预约考试详情
  146. if(!ExamVOTime&&ExamReservationVOTime) {
  147. this.changeStep('showAppointmentExam')
  148. }
  149. if(ExamVOTime&&!ExamReservationVOTime) {
  150. this.changeStep('showExam')
  151. }
  152. // 如果都有比时间
  153. if(ExamVOTime&&ExamReservationVOTime) {
  154. ExamVOTime>ExamReservationVOTime?this.changeStep('showExam'):this.changeStep('showAppointmentExam')
  155. }
  156. }
  157. console.log('时间')
  158. console.log(res)
  159. this.info = res
  160. }
  161. }
  162. }
  163. </script>
  164. <style lang="scss" scoped>
  165. @import './comp.scss';
  166. </style>