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

196 lines
6.6 KiB

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