courseInfo1.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class='courseInfo'>
  3. <div class="tableWrap tableMargin">
  4. <el-table :data='teamList'
  5. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  6. <el-table-column label="VIP编号"
  7. prop="id">
  8. </el-table-column>
  9. <el-table-column label="VIP课名称"
  10. prop="name">
  11. </el-table-column>
  12. <el-table-column label="VIP课状态">
  13. <template slot-scope="scope">
  14. {{ scope.row.status | formatterStatus}}
  15. </template>
  16. </el-table-column>
  17. <el-table-column label="班级人数"
  18. prop="studentNum">
  19. </el-table-column>
  20. <el-table-column label="课程单价">
  21. <template slot-scope="scope">
  22. 线上:{{ scope.row.onlineClassesUnitPrice }} <br />
  23. 线下:{{ scope.row.offlineClassesUnitPrice }}
  24. </template>
  25. </el-table-column>
  26. <el-table-column label="活动方案"
  27. prop="vipGroupActivityName">
  28. </el-table-column>
  29. <el-table-column label="当前课次">
  30. <template slot-scope="scope">
  31. <p>{{scope.row.currentClassTimes + '/' + scope.row.totalClassTimes}}</p>
  32. </template>
  33. </el-table-column>
  34. <el-table-column label="月均消耗">
  35. <template slot-scope="scope">
  36. {{ scope.row.monthConsumeRate }}%
  37. </template>
  38. </el-table-column>
  39. <el-table-column label="开课时间">
  40. <template slot-scope="scope">
  41. {{scope.row.courseStartDate | formatterTime}}
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="截止时间">
  45. <template slot-scope="scope">
  46. {{ scope.row.coursesExpireDate | formatTimer }}
  47. </template>
  48. </el-table-column>
  49. <el-table-column label="申请时间">
  50. <template slot-scope="scope">
  51. {{scope.row.createTime | formatterTime}}
  52. </template>
  53. </el-table-column>
  54. </el-table>
  55. <pagination :total="pageInfo.total"
  56. :page.sync="pageInfo.page"
  57. :limit.sync="pageInfo.limit"
  58. :page-sizes="pageInfo.page_size"
  59. @pagination="getList" />
  60. </div>
  61. </div>
  62. </template>
  63. <script>
  64. // import { getTeacherVipClass } from '@/api/teacherManager'
  65. import { getVipList } from '@/api/vipSeting'
  66. import pagination from '@/components/Pagination/index'
  67. import store from '@/store'
  68. export default {
  69. name: 'courseInfo1',
  70. components: {
  71. pagination
  72. },
  73. data () {
  74. return {
  75. teamList: [],
  76. organId: null,
  77. teacherId: this.$route.query.teacherId,
  78. pageInfo: {
  79. // 分页规则
  80. limit: 10, // 限制显示条数
  81. page: 1, // 当前页
  82. total: 1, // 总条数
  83. page_size: [10, 20, 40, 50] // 选择限制显示条数
  84. }
  85. }
  86. },
  87. mounted () {
  88. this.getList()
  89. },
  90. methods: {
  91. getList () {
  92. getVipList({
  93. rows: this.pageInfo.limit,
  94. page: this.pageInfo.page,
  95. teacherId: this.teacherId
  96. }).then(res => {
  97. if (res.code == 200) {
  98. this.teamList = res.data.rows
  99. this.pageInfo.total = res.data.total
  100. }
  101. })
  102. }
  103. },
  104. filters: {
  105. formatterTime (val) {
  106. let result
  107. if (val) {
  108. result = val.split(' ')[0];
  109. } else {
  110. result = ''
  111. }
  112. return result
  113. },
  114. formatterStatus (val) {
  115. let arr = ["未开始", "报名中", "进行中", '取消', '已结束', '报名结束']
  116. return arr[val];
  117. }
  118. }
  119. }
  120. </script>
  121. <style lang="scss" scope>
  122. .courseInfo {
  123. h4 {
  124. margin-bottom: 20px;
  125. }
  126. .tableMargin {
  127. margin-top: 20px;
  128. }
  129. }
  130. </style>