studentSignin.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <el-page-header @back="onCancel"
  5. content="学生点名总览"></el-page-header>
  6. <!-- <div class="term">第一学期</div>
  7. <div class="term active">第二学期</div> -->
  8. </h2>
  9. <div class='m-core'>
  10. <!-- <div class="searchBtn">导出</div> -->
  11. <!-- table -->
  12. <div class="tableList">
  13. <el-table :data='tableList'>
  14. <el-table-column align='center'
  15. prop="signTime"
  16. label="时间">
  17. </el-table-column>
  18. <el-table-column align='center'
  19. prop="courseScheduleName"
  20. label="课程名称">
  21. </el-table-column>
  22. <el-table-column align='center'
  23. prop="name"
  24. label="学生名称">
  25. </el-table-column>
  26. <el-table-column align='center'
  27. prop="signStatus"
  28. label="签到">
  29. <template slot-scope="scope">
  30. <div>
  31. {{ scope.row.signStatus|studentSign}}
  32. </div>
  33. </template>
  34. </el-table-column>
  35. </el-table>
  36. <pagination :total="rules.total"
  37. :page.sync="rules.page"
  38. :limit.sync="rules.limit"
  39. :page-sizes="rules.page_size"
  40. @pagination="getList" />
  41. </div>
  42. </div>
  43. </div>
  44. </template>
  45. <script>
  46. import pagination from '@/components/Pagination/index'
  47. import { getStudentRecord } from '@/api/studentManager'
  48. export default {
  49. name: 'studentSignin',
  50. components: {
  51. pagination
  52. },
  53. data () {
  54. return {
  55. tableList: [], // table列表
  56. rules: {
  57. // 分页规则
  58. limit: 10, // 限制显示条数
  59. page: 1, // 当前页
  60. total: 0, // 总条数
  61. page_size: [10, 20, 40, 50] // 选择限制显示条数
  62. },
  63. teamid: ''
  64. }
  65. },
  66. created () {
  67. this.teamid = this.$route.query.id;
  68. },
  69. mounted () {
  70. this.getList()
  71. },
  72. methods: {
  73. onCancel () {
  74. // history.go(-1)
  75. let params = this.$route.query
  76. this.$router.push({
  77. path: '/business/teamDetails',
  78. query: {
  79. id: params.id,
  80. status: params.status,
  81. name: params.name,
  82. checkIndex: "3"
  83. }
  84. })
  85. },
  86. getList () {
  87. // console.log(111);
  88. getStudentRecord({ search: this.teamid }).then(res => {
  89. if (res.code == 200) {
  90. this.tableList = res.data.rows;
  91. this.rules.total = res.data.total;
  92. }
  93. })
  94. }
  95. },
  96. }
  97. </script>
  98. <style lang="scss" scope>
  99. // .m-container {
  100. // h2 {
  101. // height: 48px;
  102. // line-height: 48px;
  103. // position: relative;
  104. // // padding-left: 30px;
  105. // margin-bottom: 30px;
  106. // display: flex;
  107. // flex-direction: row;
  108. // justify-content: flex-start;
  109. // align-items: center;
  110. // .term {
  111. // height: 32px;
  112. // line-height: 32px;
  113. // border-radius: 24px;
  114. // width: 100px;
  115. // color: #14928a;
  116. // border: 1px solid rgba(20, 146, 138, 1);
  117. // font-size: 14px;
  118. // text-align: center;
  119. // margin-right: 12px;
  120. // &:nth-child(1) {
  121. // margin-left: 47px;
  122. // }
  123. // }
  124. // .term.active {
  125. // color: #fff;
  126. // background-color: #14928a;
  127. // }
  128. // }
  129. // }
  130. </style>