mark-score-list.vue 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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="item.stuSchool.student_photo"
  11. style="width: 40px;height: 40px;border-radius: 20px;">
  12. </image>
  13. </view>
  14. <text slot="label" class="txt-muted">{{item.created_at}} </text>
  15. <el-tag slot="value" plain
  16. :type="item.studentTab && item.studentTab.type_text == '好评' ? '' : 'danger'">{{item.studentTab && item.studentTab.tab_name}}
  17. {{item.score}}</el-tag>
  18. </u-cell>
  19. </u-swipe-action-item>
  20. </u-swipe-action>
  21. <ui-page-list ref="reflist" url="/mobile/studentTab/getstudentTabLog" v-model="list" :start="false"></ui-page-list>
  22. </scroll-view>
  23. </el-drawer>
  24. </template>
  25. <script>
  26. export default {
  27. props: {
  28. chooseClassId: {
  29. type: Number | String,
  30. default: ""
  31. },
  32. stuList: {
  33. type: Array,
  34. default: () => []
  35. },
  36. },
  37. data() {
  38. return {
  39. show: false,
  40. list: [],
  41. options1: [{
  42. text: '撤销',
  43. style: {
  44. backgroundColor: '#FF0C0C',
  45. }
  46. }]
  47. }
  48. },
  49. methods: {
  50. open() {
  51. this.show = true;
  52. this.list = []
  53. this.$nextTick(() => {
  54. this.getList()
  55. })
  56. },
  57. getList() {
  58. this.$refs.reflist.fresh({
  59. class_id: this.chooseClassId,
  60. stu_school_id: this.stuList[0]
  61. })
  62. },
  63. getNext(e){
  64. this.$refs.reflist.next();
  65. },
  66. itemRemove(item) {
  67. this.$api.sendRequest({
  68. confirm : {
  69. title : '确认撤销',
  70. message : '确定要撤销此记录吗?'
  71. },
  72. url: `/mobile/studentTab/delstudentTabLog`,
  73. method: "post",
  74. data: {
  75. tab_log_id: item.id
  76. },
  77. success: res => {
  78. console.log("aaaaaaaaaaa");
  79. this.show = false
  80. this.$emit('delSuccess')
  81. },
  82. complete: res => {
  83. console.log(res, "resss");
  84. }
  85. })
  86. }
  87. },
  88. }
  89. </script>
  90. <style>
  91. </style>