courseEvaluate.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!-- -->
  2. <template>
  3. <div class>
  4. <div class="tableWrap">
  5. <el-table :data="tableList"
  6. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  7. <el-table-column align="center"
  8. width="100"
  9. prop="username"
  10. label="学生姓名"></el-table-column>
  11. <el-table-column align="center"
  12. width="100"
  13. prop="score"
  14. label="星级">
  15. <template slot-scope="scope">
  16. <div>
  17. {{ scope.row.score?scope.row.score+'星':'' }}
  18. </div>
  19. </template>
  20. </el-table-column>
  21. <el-table-column prop="reason"
  22. label="评价内容"></el-table-column>
  23. </el-table>
  24. <!-- <pagination
  25. :total="rules.total"
  26. :page.sync="rules.page"
  27. :limit.sync="rules.limit"
  28. @pagination="getList"
  29. /> -->
  30. </div>
  31. </div>
  32. </template>
  33. <script>
  34. // import pagination from '@/components/Pagination/index'
  35. import { getStuAndTeaReview } from '@/api/buildTeam'
  36. export default {
  37. props: ['courseScheduleId'],
  38. data () {
  39. return {
  40. tableList: [],
  41. rules: {
  42. // 分页规则
  43. limit: 10, // 限制显示条数
  44. page: 1, // 当前页
  45. total: 0, // 总条数
  46. page_size: [10, 20, 40, 50] // 选择限制显示条数
  47. }
  48. };
  49. },
  50. //生命周期 - 创建完成(可以访问当前this实例)
  51. created () { },
  52. //生命周期 - 挂载完成(可以访问DOM元素)
  53. mounted () {
  54. // this.getList()
  55. },
  56. activated () {
  57. this.getList()
  58. },
  59. methods: {
  60. getList () {
  61. getStuAndTeaReview({ courseId: this.courseScheduleId }).then(res => {
  62. if (res.code == 200) {
  63. this.tableList = res.data.courseScheduleComplaints
  64. }
  65. })
  66. }
  67. }
  68. };
  69. </script>
  70. <style lang='scss' scoped>
  71. </style>