mark-score-list.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 @click="itemClick(item,index)" 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. <!-- <view slot="title" class="ui-flex-row ui-flex-align-center">
  11. <u-tag plain size="mini" text="优秀发言"></u-tag>
  12. <text>李杰</text>
  13. </view> -->
  14. <text slot="label" class="txt-muted">{{item.created_at}} </text>
  15. <el-tag v-if="item.studentTab.type_text == '好评'" slot="value"
  16. plain>{{item.studentTab.tab_name}}{{item.score}}</el-tag>
  17. <el-tag slot="value" v-else plain type="danger">{{item.studentTab.tab_name}}{{item.score}}</el-tag>
  18. <!-- <u-badge slot="value" value="+1" plain size="mini" type="success"></u-badge> -->
  19. </u-cell>
  20. </u-cell-group>
  21. <view @click="addTab" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
  22. 加载更多
  23. </view>
  24. <uni-popup ref="alertDialog" type="dialog">
  25. <uni-popup-dialog type="center" cancelText="关闭" confirmText="确认" title="确认撤销?" content="您确认撤销该条点评记录?"
  26. @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
  27. </uni-popup>
  28. </el-drawer>
  29. </template>
  30. <script>
  31. export default {
  32. props: {
  33. list: {
  34. type: Array,
  35. default: () => []
  36. }
  37. },
  38. data() {
  39. return {
  40. show: false,
  41. msgType: 'center',
  42. itemInfo: {},
  43. index:0
  44. }
  45. },
  46. mounted() {
  47. },
  48. methods: {
  49. open() {
  50. this.show = true
  51. },
  52. addTab() {
  53. this.$emit('add')
  54. },
  55. itemClick(item,index) {
  56. this.index = index
  57. this.itemInfo = item
  58. this.$refs.alertDialog.open('center')
  59. },
  60. dialogConfirm() {
  61. this.$api.sendRequest({
  62. url: `/mobile/studentTab/delstudentTabLog`,
  63. method: "post",
  64. data: {
  65. tab_log_id: this.itemInfo.tab_id
  66. },
  67. success: res => {
  68. uni.showToast({
  69. title: res.msg,
  70. })
  71. this.$emit('success',this.index)
  72. }
  73. })
  74. },
  75. dialogClose() {}
  76. },
  77. }
  78. </script>
  79. <style>
  80. </style>