courseInfo1.vue 3.6 KB

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