index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="reviewHistory">
  3. <template v-if="items.length>0">
  4. <uni-section title="历史记录" type="line" ></uni-section>
  5. <uni-group :title="item.activityInsTitle" mode="card" v-for="(item,index) in items" :key="index">
  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. </template>
  35. <template v-else>
  36. <view class="empty">
  37. <image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
  38. <p>暂无历史信息</p>
  39. </view>
  40. </template>
  41. </view>
  42. </template>
  43. <script>
  44. export default{
  45. name:"reviewHistory",
  46. data(){
  47. return{
  48. items:[]
  49. }
  50. },
  51. methods:{
  52. loadData(items=[]){
  53. if(items.length>0){
  54. this.items=items
  55. }
  56. },
  57. preview(attachList=[]){
  58. let urls=attachList.map(item=>item.fileUrl)
  59. uni.previewImage({
  60. urls
  61. })
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .reviewHistory{
  68. .empty{
  69. .icon-empty{
  70. display: block;
  71. width: 160rpx;
  72. margin: 364rpx auto 0;
  73. }
  74. p{
  75. font-size: 28rpx;
  76. line-height: 1.8;
  77. color: #666;
  78. text-align: center;
  79. }
  80. }
  81. ::v-deep.attachList-box{
  82. display: flex;
  83. flex-wrap: wrap;
  84. .attach{
  85. display: block;
  86. width: 120rpx;
  87. border: 1rpx solid #eaeaea;
  88. padding: 10rpx;
  89. box-sizing: border-box;
  90. margin: 8rpx;
  91. &:nth-child(4n){
  92. margin-left: 0;
  93. }
  94. }
  95. }
  96. }
  97. </style>