detail.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div class="hui-flex">
  3. <div class="hui-flex-box">
  4. <div class="hui-detail">
  5. <div class="hui-detail-title">基础信息</div>
  6. <div class="hui-detail-content">
  7. <div class="hui-detail-item">
  8. <div class="hui-detail-label">提醒名称</div>
  9. <div class="hui-detail-value">{{detail.name}}</div>
  10. </div>
  11. <div class="hui-detail-item">
  12. <div class="hui-detail-label">提醒类型</div>
  13. <div class="hui-detail-value">{{$field.findTypeName('remindType',detail.type)}}</div>
  14. </div>
  15. <div class="hui-detail-item">
  16. <div class="hui-detail-label">提醒时间</div>
  17. <div class="hui-detail-value">{{$dayjs(detail.date).format('YYYY-MM-DD HH:mm:ss')}}</div>
  18. </div>
  19. <div class="hui-detail-item hui-detail-item-top">
  20. <div class="hui-detail-label">提醒内容</div>
  21. <div class="hui-detail-value">{{detail.content}}</div>
  22. </div>
  23. </div>
  24. <div class="hui-detail-title">图片</div>
  25. <div class="hui-detail-content hui-detail-image">
  26. <upload ref="upload" :list="detail.attachment ? JSON.parse(detail.attachment) : []" type="preview">
  27. </upload>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. </template>
  33. <script>
  34. import {
  35. getReminderDetailById
  36. } from '@/httpApi/operation'
  37. import upload from '@/components/common/upload'
  38. export default {
  39. props: ['detailId'],
  40. data() {
  41. return {
  42. detail: {}
  43. }
  44. },
  45. created() {
  46. if (this.detailId) this.init();
  47. },
  48. methods: {
  49. init() {
  50. getReminderDetailById(this.detailId).then(res => {
  51. if (res.state) {
  52. this.detail = res.data;
  53. }
  54. })
  55. }
  56. },
  57. components: {
  58. upload
  59. },
  60. }
  61. </script>
  62. <style lang="scss">
  63. </style>