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

218 lines
7.5 KiB

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