mark-score-list.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <el-drawer append-to-body title="点评记录" :visible.sync="show" size="400px" direction="ltr"
  3. style="backdrop-filter: blur(4px);">
  4. <u-cell-group v-for="(item,index) in list" :key="index">
  5. <u-cell class="ui-hover" clickable :title="item.student.student_name">
  6. <view slot="icon" class="ui-mr10">
  7. <image :src="item.stuSchool.student_photo" style="width: 40px;height: 40px;border-radius: 20px;">
  8. </image>
  9. </view>
  10. <text slot="label" class="txt-muted">{{item.created_at}} </text>
  11. <el-tag v-if="item.studentTab.type_text == '好评'" slot="value"
  12. plain>{{item.studentTab.tab_name}}{{item.score}}</el-tag>
  13. <el-tag slot="value" v-else plain type="danger">{{item.studentTab.tab_name}}{{item.score}}</el-tag>
  14. <!-- <u-badge slot="value" value="+1" plain size="mini" type="success"></u-badge> -->
  15. </u-cell>
  16. </u-cell-group>
  17. <view @click="addTab" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
  18. {{ showTitle }}
  19. </view>
  20. </el-drawer>
  21. </template>
  22. <script>
  23. export default {
  24. props: {
  25. chooseClassId :{
  26. type : Number|String,
  27. default : ""
  28. },
  29. },
  30. data() {
  31. return {
  32. show: false,
  33. current_page : 1,
  34. list : [],
  35. last_page : 10,
  36. showTitle : '加载更多',
  37. }
  38. },
  39. mounted() {
  40. },
  41. methods: {
  42. open() {
  43. this.show = true
  44. },
  45. addTab() {
  46. if(this.showTitle=="没有更多数据了。。。"){
  47. return
  48. }
  49. this.$api.sendRequest({
  50. url: `/mobile/studentTab/getstudentTabLog`,
  51. method: "post",
  52. data: {
  53. page: this.current_page,
  54. class_id: this.chooseClassId
  55. },
  56. success: res => {
  57. let arr = [...this.list, ...res.data.data]
  58. this.current_page++
  59. this.list =[...this.list,...res.data.data]
  60. if (this.current_page >= res.data.last_page) {
  61. this.showTitle='没有更多数据了。。。'
  62. }
  63. }
  64. })
  65. }
  66. },
  67. }
  68. </script>
  69. <style>
  70. </style>