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

168 lines
3.7 KiB

10 months ago
10 months ago
7 months ago
7 months ago
10 months ago
10 months ago
10 months ago
7 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="pageBg">
  3. <view class="tabs">
  4. <view class="tab" v-for="(item,index) in tabData" :key="index" @click="changeTab(item)" :class="{active: currentTab==item.id}" :id="'tab'+item.id">{{ item.text }}</view>
  5. <view class="rightPad"></view>
  6. </view>
  7. <view class="pad learnStatus">
  8. <!-- <view class="card">
  9. <view class="flex-b top_row">
  10. <view class="lab">科目一阶段</view>
  11. <view class="btn status">已完成</view>
  12. </view>
  13. <view class="date-row">2023-08-09 22:52:12</view>
  14. </view> -->
  15. <!-- <view class="card">
  16. <view class="flex-b top_row">
  17. <view class="lab">科目一考试</view>
  18. <view class="btn status">已预约</view>
  19. </view>
  20. <view class="date-row">2023-08-09 22:52:12</view>
  21. <view class="flex-b bg">
  22. <view class="row">
  23. <view class="text">科目二</view>
  24. <view class="btn" @click="$goPage('/pages/carEntry/evaluate/evaluate')">去评价</view>
  25. </view>
  26. </view>
  27. </view> -->
  28. <view class="card" v-for="(item,index) in list" :key="index">
  29. <view class="flex-b top_row">
  30. <view class="lab">{{item.dynamicsName}}</view>
  31. <!-- <view class="btn">已预约</view> -->
  32. </view>
  33. <view class="date-row">{{item.dynamicsTime}}</view>
  34. <view class="bg" v-if="item.examSite||item.examTime">
  35. <view class="row" v-if="item.examSite">
  36. <view class="text">地点{{item.examSite}}</view>
  37. </view>
  38. <view class="row" v-if="item.examTime">
  39. <view class="text">时间{{item.examTime}}</view>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- <view class="card">
  44. <view class="flex-b top_row">
  45. <view class="lab">科目一考试</view>
  46. <view class="btn red status">未通过</view>
  47. </view>
  48. <view class="date-row">2023-08-09 22:52:12</view>
  49. </view> -->
  50. <nodata v-if="!list.length"></nodata>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import { getStudentDynamics } from '@/config/api.js'
  56. export default {
  57. data() {
  58. return {
  59. tabData: [{
  60. text: '全部',
  61. id: 0
  62. },
  63. {
  64. text: '科目一',
  65. id: 1
  66. },
  67. {
  68. text: '科目二',
  69. id: 2
  70. },
  71. {
  72. text: '科目三',
  73. id: 3
  74. },
  75. {
  76. text: '科目四',
  77. id: 4
  78. },
  79. ],
  80. currentTab: 1,
  81. list: []
  82. }
  83. },
  84. onShow() {
  85. this.getStudentDynamicsFn()
  86. },
  87. onPullDownRefresh() {
  88. this.getStudentDynamicsFn()
  89. },
  90. methods: {
  91. scroll(e) {
  92. console.log(e)
  93. },
  94. changeTab(val) {
  95. if(this.currentTab == val.id) return
  96. this.currentTab = val.id
  97. this.getStudentDynamicsFn()
  98. },
  99. async getStudentDynamicsFn() {
  100. let obj = {
  101. "studentId": this.studentId,
  102. "subject": this.currentTab,
  103. }
  104. if(obj.subject==0) delete obj.subject
  105. const {data: res} = await getStudentDynamics(obj)
  106. this.list = res
  107. }
  108. }
  109. }
  110. </script>
  111. <style lang="scss" scoped>
  112. .pageBg {
  113. padding-bottom: 40rpx;
  114. }
  115. @import '../../tabbar/learnCar/comp/comp.scss';
  116. .date-row {
  117. line-height: 88rpx;
  118. color: #999;
  119. border-top: 1px solid #F6F7FA;
  120. }
  121. .top_row {
  122. height: 88rpx;
  123. }
  124. .red {
  125. background-color: #FF7D7D !important;
  126. }
  127. .tabs {
  128. display: flex;
  129. justify-content: space-between;
  130. .tab {
  131. min-width: 108rpx;
  132. height: 88rpx;
  133. font-size: 28rpx;
  134. color: #333;
  135. text-align: center;
  136. line-height: 88rpx;
  137. margin-right: 28rpx;
  138. &.active {
  139. color: $themC;
  140. position: relative;
  141. &::before {
  142. position: absolute;
  143. content: '';
  144. width: 34rpx;
  145. height: 4rpx;
  146. background: #3776FF;
  147. border-radius: 2rpx;
  148. bottom: 10rpx;
  149. left: 50%;
  150. transform: translateX(-50%);
  151. }
  152. }
  153. }
  154. .rightPad {
  155. min-width: 10rpx;
  156. height: 60rpx;
  157. }
  158. }
  159. .learnStatus {
  160. margin-top: 24rpx;
  161. }
  162. </style>