index.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. <view slot="body">
  14. <template v-if="item.attachList.length>0">
  15. <image v-for="(attach,index) in item.attachList"
  16. class="attach"
  17. :key="index"
  18. :src="attach.fileUrl"
  19. @click="preview(item.attachList)"
  20. mode="widthFix" ></image>
  21. </template>
  22. <template v-else>
  23. <p style="font-size: 28rpx;color: #666;">没有附件</p>
  24. </template>
  25. </view>
  26. </uni-list-item>
  27. </uni-list>
  28. </uni-group>
  29. </uni-section>
  30. </template>
  31. <template v-else>
  32. <view class="empty">
  33. <image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
  34. <p>暂无历史信息</p>
  35. </view>
  36. </template>
  37. </view>
  38. </template>
  39. <script>
  40. export default{
  41. name:"reviewHistory",
  42. data(){
  43. return{
  44. items:[]
  45. }
  46. },
  47. methods:{
  48. loadData(items=[]){
  49. if(items.length>0){
  50. this.items=items
  51. }
  52. },
  53. preview(attachList=[]){
  54. let urls=attachList.map(item=>item.fileUrl)
  55. uni.previewImage({
  56. urls
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .reviewHistory{
  64. .empty{
  65. .icon-empty{
  66. display: block;
  67. width: 160rpx;
  68. margin: 364rpx auto 0;
  69. }
  70. p{
  71. font-size: 28rpx;
  72. line-height: 1.8;
  73. color: #666;
  74. text-align: center;
  75. }
  76. }
  77. ::v-deep.attach{
  78. display: block;
  79. width: 120rpx;
  80. border: 1rpx solid #eaeaea;
  81. padding: 10rpx;
  82. box-sizing: border-box;
  83. }
  84. }
  85. </style>