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.

106 lines
1.9 KiB

9 months ago
6 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
6 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
6 months ago
9 months ago
  1. <template>
  2. <view class="pageBg">
  3. <view class="bgImg">
  4. <topNavbar title="学员详情"></topNavbar>
  5. <view class="pad" >
  6. <cardNav :navData="navData" :currentNav="currentNav" @changeNav="changeNav"></cardNav>
  7. </view>
  8. <scrollNav @changeTab="changeTab" :currentTab="currentTab" :tabData="tabData" v-if="currentNav==1"/>
  9. </view>
  10. <view class="pad">
  11. <view class="con" v-if="currentNav==1">
  12. <list :list="list"></list>
  13. </view>
  14. <view class="con" v-else>
  15. <info :id="studentId" />
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import list from './comp/list'
  22. import info from './comp/info'
  23. import {
  24. getStudentDynamics
  25. } from '@/config/api.js'
  26. export default {
  27. components: {
  28. list,
  29. info
  30. },
  31. data() {
  32. return {
  33. currentTab: 0,
  34. currentNav: 1,
  35. tabData: [{
  36. text: '全部',
  37. id: 0
  38. },
  39. {
  40. text: '科目一',
  41. id: 1
  42. },
  43. {
  44. text: '科目二',
  45. id: 2
  46. },
  47. {
  48. text: '科目三',
  49. id: 3
  50. },
  51. {
  52. text: '科目四',
  53. id: 4
  54. },
  55. ],
  56. navData: [{
  57. text: '学车进展',
  58. id: 1
  59. },
  60. {
  61. text: '个人及报名信息',
  62. id: 2
  63. },
  64. ],
  65. studentId: '',
  66. list: []
  67. }
  68. },
  69. onLoad(options) {
  70. this.studentId = options.id
  71. this.getStudentDynamicsFn()
  72. },
  73. methods: {
  74. async getStudentDynamicsFn() {
  75. let obj = {
  76. "studentId": this.studentId,
  77. "subject": this.currentTab,
  78. "coachId": this.vuex_coachId
  79. }
  80. if(obj.subject==0) delete obj.subject
  81. const {
  82. data: res
  83. } = await getStudentDynamics(obj)
  84. console.log(res)
  85. this.list = res
  86. },
  87. changeTab(id) {
  88. this.currentTab = id
  89. this.getStudentDynamicsFn()
  90. },
  91. changeNav(id) {
  92. this.currentNav = id
  93. }
  94. }
  95. }
  96. </script>
  97. <style lang="scss" scoped>
  98. .bgImg {
  99. padding-bottom: 1rpx;
  100. }
  101. .con {
  102. margin-top: 20rpx;
  103. }
  104. </style>