mark-score-list.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <el-drawer append-to-body title="点评记录" :visible.sync="show" size="400px" direction="ltr"
  3. style="backdrop-filter: blur(4px);">
  4. <scroll-view scroll-y style="height: 100%;" @scrolltolower="getNext">
  5. <u-swipe-action>
  6. <u-swipe-action-item v-for="(item,index) in list" :key="item.id" class="ui-hover ui-flex-1"
  7. :options="options1" @click="itemRemove(item,index)" :show="!!item.show">
  8. <u-cell :title="item.student.student_name" @click="itemRemove(item, index)">
  9. <view slot="icon" class="ui-mr10">
  10. <image :src="
  11. cartoonHeadImg ? item.student.student_cartoon_photo :
  12. item.stuSchool.student_photo + '?x-image-process=style/square400'"
  13. style="width: 40px;height: 40px;border-radius: 20px;">
  14. </image>
  15. </view>
  16. <text slot="label" class="txt-muted">{{item.created_at}} </text>
  17. <el-tag slot="value" plain :type="item.type == 1 ? '' : 'danger'">{{item.studentTab && item.studentTab.tab_name}}
  18. {{item.score}}
  19. </el-tag>
  20. </u-cell>
  21. </u-swipe-action-item>
  22. </u-swipe-action>
  23. <ui-page-list ref="reflist" url="/mobile/studentTab/getstudentTabLog" v-model="list" :start="false"></ui-page-list>
  24. </scroll-view>
  25. </el-drawer>
  26. </template>
  27. <script>
  28. export default {
  29. props: {
  30. chooseClassId: {
  31. type: Number | String,
  32. default: ""
  33. },
  34. cartoonHeadImg : {
  35. default : true,
  36. },
  37. stuList: {
  38. type: Array,
  39. default: () => []
  40. },
  41. },
  42. data() {
  43. return {
  44. show: false,
  45. list: [],
  46. options1: [{
  47. text: '撤销',
  48. style: {
  49. backgroundColor: '#FF0C0C',
  50. }
  51. }]
  52. }
  53. },
  54. methods: {
  55. open() {
  56. this.show = true;
  57. this.list = []
  58. this.$nextTick(() => {
  59. this.getList()
  60. })
  61. },
  62. getList() {
  63. this.$refs.reflist.fresh({
  64. class_id: this.chooseClassId,
  65. stu_school_id: this.stuList[0]
  66. })
  67. },
  68. getNext(e){
  69. this.$refs.reflist.next();
  70. },
  71. itemRemove(item) {
  72. this.$api.sendRequest({
  73. confirm : {
  74. title : '确认撤销',
  75. message : '确定要撤销此记录吗?'
  76. },
  77. url: `/mobile/studentTab/delstudentTabLog`,
  78. method: "post",
  79. data: {
  80. tab_log_id: item.id
  81. },
  82. success: res => {
  83. console.log("aaaaaaaaaaa");
  84. this.show = false
  85. this.$emit('delSuccess')
  86. },
  87. complete: res => {
  88. console.log(res, "resss");
  89. }
  90. })
  91. }
  92. },
  93. }
  94. </script>
  95. <style>
  96. </style>