洛阳学员端
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.

195 lines
6.6 KiB

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