studentOutList.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <div class='studentOut'>
  3. <!-- 搜索类型 -->
  4. <el-form :inline="true"
  5. class="searchForm"
  6. v-model.trim="searchForm">
  7. <el-form-item>
  8. <el-input placeholder="课程名称"
  9. @keyup.enter.native='onSearch'
  10. v-model.trim="searchForm.search"></el-input>
  11. </el-form-item>
  12. <el-form-item label="课程状态">
  13. <el-select v-model.trim="searchForm.groupStatus" clearable>
  14. <el-option
  15. v-for="(item,index) in courseGroupStatus"
  16. :key="index"
  17. :value="item.value"
  18. :label="item.label"
  19. ></el-option>
  20. </el-select>
  21. </el-form-item>
  22. <el-form-item>
  23. <el-button @click="onSearch"
  24. type="danger">搜索</el-button>
  25. </el-form-item>
  26. </el-form>
  27. <div class="tableWrap">
  28. <el-table :header-cell-style="{background:'#EDEEF0',color:'#444'}"
  29. :data='tableList'>
  30. <el-table-column label="编号"
  31. align='center'
  32. prop='id'>
  33. </el-table-column>
  34. <el-table-column label="课程组名称"
  35. align='center'
  36. prop="name">
  37. </el-table-column>
  38. <el-table-column label="课程组状态"
  39. align='center'>
  40. <template slot-scope="scope">
  41. {{ scope.row.status | courseGroup }}
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="老师"
  45. align='center'
  46. prop="teacherName">
  47. </el-table-column>
  48. <el-table-column label="班级人数"
  49. align='center'
  50. prop="studentNum">
  51. </el-table-column>
  52. <el-table-column label="开课时间"
  53. align='center'
  54. prop="coursesStartDate">
  55. </el-table-column>
  56. <el-table-column label="当前课次"
  57. align='center'
  58. prop="currentClassTimes">
  59. <template slot-scope="scope">
  60. {{ scope.row.currentClassTimes }}/{{ scope.row.totalClassTimes }}
  61. </template>
  62. </el-table-column>
  63. </el-table>
  64. <pagination :total="pageInfo.total"
  65. :page.sync="pageInfo.page"
  66. :limit.sync="pageInfo.limit"
  67. :page-sizes="pageInfo.page_size"
  68. @pagination="getCourseList" />
  69. <!-- <el-dialog :title="dialogTitle"
  70. :visible.sync="dialogTableVisible">
  71. <el-table :data="gridData">
  72. <el-table-column prop="courseDate"
  73. label="时间"
  74. align='center'
  75. width="150"></el-table-column>
  76. <el-table-column prop="classGroupName"
  77. label="课程名称"
  78. align='center'
  79. width="200"></el-table-column>
  80. <el-table-column label="课程类型"
  81. align='center'>
  82. <template slot-scope="scope">
  83. {{ scope.row.teachMode == 'ONLINE' ? '线上' : '线下' }}
  84. </template>
  85. </el-table-column>
  86. <el-table-column prop="courseStatus"
  87. align='center'
  88. label="课程状态">
  89. <template slot-scope="scope">
  90. {{ scope.row.courseStatus |coursesStatus }}
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. </el-dialog> -->
  95. </div>
  96. </div>
  97. </template>
  98. <script>
  99. import pagination from '@/components/Pagination/index'
  100. import { courseGroupStatus } from "@/utils/searchArray";
  101. import { findStudentCourseGroupsWithWeb } from '@/api/studentManager'
  102. export default {
  103. name: 'studentvip',
  104. components: { pagination },
  105. data () {
  106. return {
  107. searchForm: {
  108. studentId: null,
  109. search: null,
  110. groupStatus:null
  111. },
  112. checkIndex: null, // 选中的课程
  113. dialogTableVisible: false,
  114. tableList: [],
  115. courseList: [],
  116. courseGroupStatus:courseGroupStatus,
  117. pageInfo: {
  118. // 分页规则
  119. limit: 10, // 限制显示条数
  120. page: 1, // 当前页
  121. total: 0, // 总条数
  122. page_size: [10, 20, 40, 50] // 选择限制显示条数
  123. },
  124. dialogTitle: '',
  125. gridData: [],
  126. userId: ''
  127. }
  128. },
  129. created () {
  130. this.userId = this.$route.query.userId || null;
  131. },
  132. mounted () {
  133. this.searchForm.studentId = this.$route.query.userId
  134. this.getCourseList()
  135. },
  136. activated() {
  137. this.userId = this.$route.query.userId || null
  138. this.searchForm.studentId = this.$route.query.userId
  139. this.getCourseList()
  140. },
  141. methods: {
  142. // onCheckCourse(item) {
  143. // this.checkIndex = item.id
  144. // this.getList()
  145. // },
  146. getCourseList () {
  147. let params = this.searchForm
  148. params.rows = this.pageInfo.limit
  149. params.page = this.pageInfo.page
  150. findStudentCourseGroupsWithWeb(params).then(res => {
  151. if (res.code == 200) {
  152. this.tableList = res.data.rows
  153. this.pageInfo.total = res.data.total
  154. }
  155. })
  156. },
  157. onSearch () {
  158. this.pageInfo.page = 1
  159. this.getCourseList()
  160. }
  161. // getList() {
  162. // findStudentCourses({
  163. // vipGroupId: this.checkIndex,
  164. // rows: this.pageInfo.limit,
  165. // page: this.pageInfo.page
  166. // }).then(res => {
  167. // if(res.code ==200) {
  168. // this.tableList = res.data.rows
  169. // this.pageInfo.total = res.data.total
  170. // }
  171. // })
  172. // }
  173. }
  174. }
  175. </script>
  176. <style lang="scss">
  177. .studentOut {
  178. .topCard {
  179. display: flex;
  180. flex-direction: row;
  181. justify-content: flex-start;
  182. margin-bottom: 30px;
  183. .cardItem {
  184. margin-right: 15px;
  185. width: 300px;
  186. height: 130px;
  187. padding: 20px 24px;
  188. box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.1);
  189. box-sizing: border-box;
  190. border-radius: 6px;
  191. .top {
  192. display: flex;
  193. flex-direction: row;
  194. justify-content: space-between;
  195. margin-bottom: 23px;
  196. .name {
  197. font-size: 14px;
  198. color: #323c47;
  199. font-weight: 500;
  200. }
  201. .type {
  202. font-size: 14px;
  203. color: #aaa;
  204. }
  205. }
  206. .bottom {
  207. display: flex;
  208. flex-direction: row;
  209. justify-content: space-between;
  210. text-align: center;
  211. p {
  212. font-size: 14px;
  213. color: #444;
  214. }
  215. .title {
  216. color: #aaa;
  217. margin-bottom: 8px;
  218. }
  219. }
  220. }
  221. .cardItem.active {
  222. background-color: #14928a;
  223. .name {
  224. font-size: 14px;
  225. color: #fff;
  226. font-weight: 500;
  227. }
  228. .type {
  229. font-size: 14px;
  230. color: #fff;
  231. }
  232. .bottom {
  233. p {
  234. color: #fff;
  235. }
  236. .title {
  237. color: #fff;
  238. }
  239. }
  240. }
  241. }
  242. }
  243. </style>