index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <view class="reviewHistory">
  3. <template v-if="items.length>0">
  4. <uni-section title="历史记录" type="line" v-for="(item,index) in items" :key="index">
  5. <uni-group :title="item.activityInsTitle" mode="card">
  6. <uni-list >
  7. <uni-list-item title="处理时间" :right-text="item.actionTime"></uni-list-item>
  8. <uni-list-item title="人员" :right-text="item.accountName"></uni-list-item>
  9. <uni-list-item title="处理关卡" :right-text="item.activityInsTitle"></uni-list-item>
  10. <uni-list-item title="处理动作" :right-text="item.actionTitle"></uni-list-item>
  11. <uni-list-item title="处理说明" :note="item.actionRemark"></uni-list-item>
  12. <uni-list-item title="附件">
  13. <template v-slot:header>
  14. <view style="padding-right: 16rpx;">附件</view>
  15. </template>
  16. <view slot="body">
  17. <template v-if="item.attachList.length>0">
  18. <view class="attachList-box">
  19. <image v-for="(attach,index) in item.attachList"
  20. class="attach"
  21. :key="index"
  22. :src="attach.fileUrl"
  23. @click="preview(item.attachList)"
  24. mode="widthFix" ></image>
  25. </view>
  26. </template>
  27. <template v-else>
  28. <view style="font-size: 28rpx;color: #666;">没有附件</view>
  29. </template>
  30. </view>
  31. </uni-list-item>
  32. </uni-list>
  33. </uni-group>
  34. </uni-section>
  35. </template>
  36. <template v-else>
  37. <view class="empty">
  38. <image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
  39. <p>暂无历史信息</p>
  40. </view>
  41. </template>
  42. </view>
  43. </template>
  44. <script>
  45. export default{
  46. name:"reviewHistory",
  47. data(){
  48. return{
  49. items:[]
  50. }
  51. },
  52. methods:{
  53. loadData(items=[]){
  54. if(items.length>0){
  55. this.items=items
  56. }
  57. },
  58. preview(attachList=[]){
  59. let urls=attachList.map(item=>item.fileUrl)
  60. uni.previewImage({
  61. urls
  62. })
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .reviewHistory{
  69. .empty{
  70. .icon-empty{
  71. display: block;
  72. width: 160rpx;
  73. margin: 364rpx auto 0;
  74. }
  75. p{
  76. font-size: 28rpx;
  77. line-height: 1.8;
  78. color: #666;
  79. text-align: center;
  80. }
  81. }
  82. ::v-deep.attachList-box{
  83. display: flex;
  84. flex-wrap: wrap;
  85. .attach{
  86. display: block;
  87. width: 120rpx;
  88. border: 1rpx solid #eaeaea;
  89. padding: 10rpx;
  90. box-sizing: border-box;
  91. margin: 8rpx;
  92. &:nth-child(4n){
  93. margin-left: 0;
  94. }
  95. }
  96. }
  97. }
  98. </style>