classList.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <div class="c-container">
  3. <!-- 搜索标题 -->
  4. <div class="tableWrap">
  5. <el-table :data='tableList'
  6. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  7. <el-table-column align='center'
  8. prop="classGroupName"
  9. label="班级名称">
  10. </el-table-column>
  11. <el-table-column align='center'
  12. label="班级类型">
  13. <template slot-scope="scope">
  14. <div>
  15. {{ scope.row.classGroupType | classType}}
  16. </div>
  17. </template>
  18. </el-table-column>
  19. <el-table-column align='center'
  20. prop="masterTeacher"
  21. label="主教老师">
  22. </el-table-column>
  23. <el-table-column align='center'
  24. prop='subTeacher'
  25. label="助教老师">
  26. </el-table-column>
  27. <el-table-column align='center'
  28. prop="currentClassTimes"
  29. label="是否有课">
  30. <template slot-scope="scope">
  31. {{ scope.row.totalClassTimes ? '是' : '否'}}
  32. </template>
  33. </el-table-column>
  34. <el-table-column align='center'
  35. prop="studyNum"
  36. label="在读人数">
  37. </el-table-column>
  38. </el-table>
  39. <pagination :total="rules.total"
  40. :page.sync="rules.page"
  41. :limit.sync="rules.limit"
  42. :page-sizes="rules.page_size"
  43. @pagination="getList" />
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. import pagination from '@/components/Pagination/index'
  49. import { getClassList, coursePostpone } from '@/api/buildTeam'
  50. import { permission } from '@/utils/directivePage'
  51. export default {
  52. props: {
  53. teamid: {
  54. type: String,
  55. required: true
  56. },
  57. },
  58. data () {
  59. return {
  60. searchLsit: [],
  61. searchForm: {
  62. name: '',
  63. status: ''
  64. },
  65. tableList: [],
  66. rules: {
  67. // 分页规则
  68. limit: 10, // 限制显示条数
  69. page: 1, // 当前页
  70. total: 0, // 总条数
  71. page_size: [10, 20, 40, 50] // 选择限制显示条数
  72. }
  73. }
  74. },
  75. components: {
  76. pagination
  77. },
  78. mounted () {
  79. this.getList();
  80. },
  81. methods: {
  82. permission (str) {
  83. return permission(str)
  84. },
  85. getList () {
  86. // search: this.teamid
  87. getClassList({ search: this.teamid, page: this.rules.page, rows: this.rules.limit }).then(res => {
  88. if (res.code == 200) {
  89. this.tableList = res.data.rows;
  90. this.rules.total = res.data.total
  91. }
  92. })
  93. },
  94. resetClass () {
  95. // 跳转到班级详情页
  96. this.$router.push({ path: '/business/resetClass', query: { id: this.teamid } })
  97. },
  98. }
  99. }
  100. </script>
  101. <style lang="scss" scope>
  102. </style>