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

136 lines
4.4 KiB

10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
8 months ago
10 months ago
8 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 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" @click="$goPage('/pages/indexEntry/theory/theory?type=2')">
  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=2&coachType=1')">去学习</view> -->
  13. </view>
  14. </view>
  15. <view class="studyStatus" v-if="info.studentClassHourVO&&info.studentClassHourVO.classHourReachStatus">
  16. <view class="h1"><text class="active">学习状态</text></view>
  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 }}
  28. </view>
  29. <!-- <view class="btn" @click="$goPage('/pages/carEntry/evaluate/evaluate?coachType=3&tit=模拟器老师&')">去评价</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. <view class="card" v-if="showAppointment">
  47. <view class="flex-b padTb">
  48. <view class="lab">科目一考试预约成功</view>
  49. <view class="date">{{ $u.timeFormat(info.examReservationVO.examReservationTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
  50. </view>
  51. <view class="bg">
  52. <view class="row">
  53. <view class="text">考试场地{{info.examReservationVO.examAddress}}</view>
  54. </view>
  55. <view class="row">
  56. <view class="text">考试时间{{ $u.timeFormat(info.examReservationVO.examTime, 'yyyy-mm-dd hh:MM:ss') }} </view>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="card" v-if="!showAppointment&&!showExam">
  61. <view class="flex-b padTb">
  62. <view class="lab">科目一学时已通过</view>
  63. <!-- <view class="date">{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }}</view> -->
  64. </view>
  65. <view class="bg">
  66. <view class="row bg">
  67. <view class="text">前往"12123"APP预约考试</view>
  68. <view class="btn" @click="$u.toast('请打开12123App预约')">去预约</view>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </template>
  76. <script>
  77. import {
  78. getStudentSubject1Status,
  79. } from '@/config/api.js'
  80. export default {
  81. data() {
  82. return {
  83. info: {},
  84. showExam: false,//考试状态
  85. showAppointment: false,//预约状态
  86. }
  87. },
  88. created() {
  89. this.showExam = false,//考试状态
  90. this.showAppointment = false,//预约状态
  91. this.getStudentSubject1StatusFn()
  92. },
  93. methods: {
  94. async getStudentSubject1StatusFn() {
  95. const {
  96. data: res
  97. } = await getStudentSubject1Status({
  98. studentId: this.studentId
  99. })
  100. this.info = res
  101. // 1如果返回了考试时间和预约时间
  102. if(res.studentExamVO&&res.examReservationVO) {
  103. // 如果考试的时间大于或等于预约的时间
  104. if(res.studentExamVO.examTime>res.examReservationVO.examTime||res.studentExamVO.examTime==res.examReservationVO.examTime) {
  105. this.showExam = true
  106. this.showAppointment = false
  107. }else {
  108. this.showAppointment = true
  109. this.showExam = false
  110. }
  111. }else if (res.studentExamVO&&!res.examReservationVO) {
  112. // 2如果只返回了考试时间
  113. this.showExam = true
  114. this.showAppointment = false
  115. }else if(res.studentExamVO&&!res.examReservationVO){
  116. // 3如果只返了预约时间
  117. this.showExam = false
  118. this.showAppointment = true
  119. }
  120. console.log(res)
  121. },
  122. }
  123. }
  124. </script>
  125. <style lang="scss" scoped>
  126. @import './comp.scss';
  127. </style>