histroy.vue 2.7 KB

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