studentNetwork.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <!-- -->
  2. <template>
  3. <div class>
  4. <div class="m-core">
  5. <div class="tableWrap">
  6. <el-table
  7. style="width: 100%"
  8. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  9. :data="tableList"
  10. >
  11. <el-table-column align="center" prop="id" label="课程组编号">
  12. <template slot-scope="scope">
  13. <el-button type="text" @click="gotoNet(scope.row.id)">
  14. <copy-text>{{ scope.row.id }}</copy-text>
  15. </el-button>
  16. </template>
  17. </el-table-column>
  18. <el-table-column align="center" prop="name" label="课程组名称">
  19. <template slot-scope="scope">
  20. <el-button type="text" @click="gotoNet(scope.row.name)">
  21. <copy-text>{{ scope.row.name }}</copy-text>
  22. </el-button>
  23. </template>
  24. </el-table-column>
  25. <!-- <el-table-column align="center" prop="subjectName" label="声部"></el-table-column> -->
  26. <el-table-column
  27. align="center"
  28. prop="teacherName"
  29. label="指导老师"
  30. ></el-table-column>
  31. <el-table-column
  32. align="center"
  33. prop="educationalTeacherName"
  34. label="乐团主管"
  35. ></el-table-column>
  36. <el-table-column
  37. align="center"
  38. prop="type"
  39. label="课程组类型"
  40. width="100"
  41. >
  42. <template slot-scope="scope">
  43. <div>
  44. <p>{{ scope.row.type | comType }}</p>
  45. </div>
  46. </template>
  47. </el-table-column>
  48. <el-table-column align="center" prop="groupStatus" label="课程组状态">
  49. <template slot-scope="scope">
  50. <div>
  51. <p>{{ scope.row.groupStatus | comCourseGroup }}</p>
  52. </div>
  53. </template>
  54. </el-table-column>
  55. <el-table-column align="center" label="开始时间">
  56. <template slot-scope="scope">
  57. <div>
  58. <div>{{ scope.row.coursesStartDate | dateForMinFormat }}</div>
  59. </div>
  60. </template>
  61. </el-table-column>
  62. <el-table-column align="center" label="结束时间">
  63. <template slot-scope="scope">
  64. <div>
  65. <div>{{ scope.row.coursesExpireDate | dateForMinFormat }}</div>
  66. </div>
  67. </template>
  68. </el-table-column>
  69. </el-table>
  70. <pagination
  71. sync
  72. save-key="studentDetail-studentNetwork"
  73. :total.sync="rules.total"
  74. :page.sync="rules.page"
  75. :limit.sync="rules.limit"
  76. :page-sizes="rules.page_size"
  77. @pagination="getList"
  78. />
  79. </div>
  80. </div>
  81. </div>
  82. </template>
  83. <script>
  84. import pagination from "@/components/Pagination/index";
  85. import load from "@/utils/loading";
  86. import { practiceGroupManage } from "@/api/buildTeam";
  87. export default {
  88. components: { pagination },
  89. data() {
  90. return {
  91. searchForm: {
  92. search: null,
  93. },
  94. studentId: null,
  95. tableList: [],
  96. rules: {
  97. // 分页规则
  98. limit: 10, // 限制显示条数
  99. page: 1, // 当前页
  100. total: 0, // 总条数
  101. page_size: [10, 20, 40, 50], // 选择限制显示条数
  102. },
  103. };
  104. },
  105. //生命周期 - 创建完成(可以访问当前this实例)
  106. created() {},
  107. //生命周期 - 挂载完成(可以访问DOM元素)
  108. mounted() {
  109. // 获取分部
  110. const { query } = this.$route;
  111. if (query.search) {
  112. this.searchForm.search = query.search;
  113. }
  114. this.init();
  115. },
  116. activated() {
  117. this.init();
  118. },
  119. methods: {
  120. init() {
  121. this.studentId = this.$route.query.userId;
  122. this.getList();
  123. },
  124. getList() {
  125. practiceGroupManage({
  126. studentId: this.studentId,
  127. page: this.rules.page,
  128. rows: this.rules.limit,
  129. }).then((res) => {
  130. if (res.code == 200) {
  131. this.tableList = res.data.rows;
  132. this.rules.total = res.data.total;
  133. }
  134. });
  135. },
  136. gotoNet(str) {
  137. this.$router.push({
  138. path: "/accompanyManager/accompany",
  139. query: { search: str },
  140. });
  141. },
  142. },
  143. };
  144. </script>
  145. <style lang='scss' scoped>
  146. </style>