index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!-- -->
  2. <template>
  3. <div class="m-container">
  4. <h2>
  5. <div class="squrt"></div>
  6. 直播课管理
  7. </h2>
  8. <div class="m-core">
  9. <save-form :inline="true" :model="searchForm" @submit="search" @reset='onReSet'>
  10. <el-form-item>
  11. <el-input
  12. v-model.trim="searchForm.search"
  13. clearable
  14. @keyup.enter.native="search"
  15. placeholder='直播间编号/标题'
  16. ></el-input>
  17. </el-form-item>
  18. <el-form-item>
  19. <el-button native-type="submit" type="primary">搜索</el-button>
  20. <el-button native-type="reset" type="danger">重置</el-button>
  21. </el-form-item>
  22. </save-form>
  23. <div class="tableWrap">
  24. <el-table
  25. style="width: 100%"
  26. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  27. :data="tableList"
  28. >
  29. <el-table-column
  30. align="center"
  31. prop="studentId"
  32. label="分部"
  33. ></el-table-column>
  34. </el-table>
  35. <pagination
  36. sync
  37. :total.sync="rules.total"
  38. :page.sync="rules.page"
  39. :limit.sync="rules.limit"
  40. :page-sizes="rules.page_size"
  41. @pagination="getList"
  42. />
  43. </div>
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. import axios from "axios";
  49. import { getToken } from "@/utils/auth";
  50. import pagination from "@/components/Pagination/index";
  51. import load from "@/utils/loading";
  52. export default {
  53. components: { pagination },
  54. data() {
  55. return {
  56. searchForm: {
  57. search: null,
  58. },
  59. tableList: [],
  60. organList: [],
  61. rules: {
  62. // 分页规则
  63. limit: 10, // 限制显示条数
  64. page: 1, // 当前页
  65. total: 0, // 总条数
  66. page_size: [10, 20, 40, 50], // 选择限制显示条数
  67. },
  68. };
  69. },
  70. //生命周期 - 创建完成(可以访问当前this实例)
  71. created() {},
  72. //生命周期 - 挂载完成(可以访问DOM元素)
  73. mounted() {
  74. // 获取分部
  75. this.init();
  76. },
  77. methods: {
  78. init() {},
  79. getList() {},
  80. search(){
  81. this.rules.page = 1;
  82. this.getList()
  83. },
  84. onReSet(){},
  85. },
  86. };
  87. </script>
  88. <style lang='scss' scoped>
  89. </style>