classList.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <div class="c-container">
  3. <!-- 搜索标题 -->
  4. <!-- <el-form :inline="true"
  5. class="searchForm"
  6. v-model="searchForm">
  7. <el-form-item>
  8. <el-select v-model="searchForm.name"
  9. placeholder="课程类型">
  10. <el-option label="哈哈哈"
  11. value="1"></el-option>
  12. </el-select>
  13. </el-form-item>
  14. </el-form> -->
  15. <!-- 列表 -->
  16. <!-- <div class="newBand"
  17. @click="resetClass">班级调整</div> -->
  18. <div class="tableWrap">
  19. <el-table :data='tableList'
  20. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  21. <el-table-column align='center'
  22. prop="classGroupName"
  23. label="班级名称">
  24. </el-table-column>
  25. <el-table-column align='center'
  26. label="课程类型">
  27. <template slot-scope="scope">
  28. <div>
  29. {{ scope.row.classGroupType | coursesType}}
  30. </div>
  31. </template>
  32. </el-table-column>
  33. <el-table-column align='center'
  34. prop="masterTeacher"
  35. label="主教老师">
  36. </el-table-column>
  37. <el-table-column align='center'
  38. prop='subTeacher'
  39. label="助教老师">
  40. </el-table-column>
  41. <el-table-column align='center'
  42. prop="currentClassTimes"
  43. label="当前课次">
  44. <template slot-scope="scope">
  45. <div>
  46. {{ scope.row.currentClassTimes+'/'+scope.row.totalClassTimes}}
  47. </div>
  48. </template>
  49. </el-table-column>
  50. <el-table-column align='center'
  51. prop="studyNum"
  52. label="在读人数">
  53. </el-table-column>
  54. <el-table-column align='center'
  55. prop="quitNum"
  56. label="退团人数">
  57. </el-table-column>
  58. <!-- <el-table-column align='center'
  59. label="新增人数">
  60. </el-table-column> -->
  61. <!-- <el-table-column align='center'
  62. label="退团人数">
  63. <template slot-scope="scope">
  64. <div>
  65. <el-button type='text'>添加学员</el-button>
  66. <el-button type='text'>老师修改</el-button>
  67. </div>
  68. </template>
  69. </el-table-column> -->
  70. </el-table>
  71. <pagination :total="rules.total"
  72. :page.sync="rules.page"
  73. :limit.sync="rules.limit"
  74. :page-sizes="rules.page_size"
  75. @pagination="getList" />
  76. </div>
  77. </div>
  78. </template>
  79. <script>
  80. import pagination from '@/components/Pagination/index'
  81. import { getClassList } from '@/api/buildTeam'
  82. export default {
  83. props: {
  84. teamid: {
  85. type: String,
  86. required: true
  87. },
  88. },
  89. data () {
  90. return {
  91. searchLsit: [],
  92. searchForm: {
  93. name: '',
  94. status: ''
  95. },
  96. tableList: [],
  97. rules: {
  98. // 分页规则
  99. limit: 10, // 限制显示条数
  100. page: 1, // 当前页
  101. total: 0, // 总条数
  102. page_size: [10, 20, 40, 50] // 选择限制显示条数
  103. },
  104. }
  105. },
  106. components: {
  107. pagination
  108. },
  109. mounted () {
  110. this.getList();
  111. },
  112. methods: {
  113. getList () {
  114. // search: this.teamid
  115. getClassList({ search: this.teamid, page: this.rules.page, rows: this.rules.limit }).then(res => {
  116. if (res.code == 200) {
  117. this.tableList = res.data.rows;
  118. this.rules.total = res.data.total
  119. }
  120. })
  121. },
  122. resetClass () {
  123. // 跳转到班级详情页
  124. this.$router.push({ path: '/business/resetClass', query: { id: this.teamid } })
  125. }
  126. }
  127. }
  128. </script>
  129. <style lang="scss" scope>
  130. </style>