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

146 lines
4.6 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
8 months ago
8 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. props: ['subjectStatus'],
  82. data() {
  83. return {
  84. info: {},
  85. showExam: false,//考试状态
  86. showAppointment: false,//预约状态
  87. }
  88. },
  89. created() {
  90. this.showExam = false//考试状态
  91. this.showAppointment = false//预约状态
  92. // this.getStudentSubject1StatusFn()
  93. },
  94. watch: {
  95. subjectStatus: {
  96. handler: function(res) {
  97. console.log('obj1改变了')
  98. this.getStudentSubject1StatusFn(res)
  99. },
  100. // immediate: true,
  101. deep: true
  102. }
  103. },
  104. methods: {
  105. async getStudentSubject1StatusFn(res) {
  106. // const {
  107. // data: res
  108. // } = await getStudentSubject1Status({
  109. // studentId: this.studentId
  110. // })
  111. this.info = res
  112. // 1如果返回了考试时间和预约时间
  113. if(res.studentExamVO&&res.examReservationVO) {
  114. // 如果考试的时间大于或等于预约的时间
  115. if(res.studentExamVO.examTime>res.examReservationVO.examTime||res.studentExamVO.examTime==res.examReservationVO.examTime) {
  116. this.showExam = true
  117. this.showAppointment = false
  118. }else {
  119. this.showAppointment = true
  120. this.showExam = false
  121. }
  122. }else if (res.studentExamVO&&!res.examReservationVO) {
  123. // 2如果只返回了考试时间
  124. this.showExam = true
  125. this.showAppointment = false
  126. }else if(res.studentExamVO&&!res.examReservationVO){
  127. // 3如果只返了预约时间
  128. this.showExam = false
  129. this.showAppointment = true
  130. }
  131. console.log(res)
  132. },
  133. }
  134. }
  135. </script>
  136. <style lang="scss" scoped>
  137. @import './comp.scss';
  138. </style>