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

185 lines
6.6 KiB

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