histroy.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. import { getWorkflowById } from '@/api/system/wfApi'
  45. export default{
  46. name:"RiskHistory",
  47. data(){
  48. return{
  49. items:[]
  50. }
  51. },
  52. onLoad({hdangerId}) {
  53. if(hdangerId){
  54. this.getWorkflow(hdangerId)
  55. }
  56. },
  57. methods:{
  58. preview(attachList=[]){
  59. let urls=attachList.map(item=>item.fileUrl)
  60. uni.previewImage({
  61. urls
  62. })
  63. },
  64. getWorkflow(hdangerId){
  65. getWorkflowById(hdangerId).then((resp) => {
  66. const { code, data, msg } = resp
  67. this.items=data.activityInsRecordList
  68. })
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. .reviewHistory{
  75. .empty{
  76. .icon-empty{
  77. display: block;
  78. width: 160rpx;
  79. margin: 364rpx auto 0;
  80. }
  81. p{
  82. font-size: 28rpx;
  83. line-height: 1.8;
  84. color: #666;
  85. text-align: center;
  86. }
  87. }
  88. ::v-deep.attachList-box{
  89. display: flex;
  90. flex-wrap: wrap;
  91. .attach{
  92. display: block;
  93. width: 120rpx;
  94. border: 1rpx solid #eaeaea;
  95. padding: 10rpx;
  96. box-sizing: border-box;
  97. margin: 8rpx;
  98. &:nth-child(4n){
  99. margin-left: 0;
  100. }
  101. }
  102. }
  103. }
  104. </style>