footerProcess.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="flow-chart">
  3. <view
  4. class="h-tip-txt"
  5. v-if="condList.length && infoDto.length === 0"
  6. >
  7. 必填条件信息填写后,流程自动显示
  8. </view>
  9. <!--数据为空 -->
  10. <status-view
  11. v-else-if="!infoDto || infoDto.length === 0"
  12. ></status-view>
  13. <template v-else>
  14. <view class="flow-title">流程图</view>
  15. <u-steps
  16. :current="-1"
  17. dot
  18. direction="column"
  19. v-if="infoDto && infoDto.length"
  20. >
  21. <u-steps-item :key="idx" v-for="(item, idx) in infoDto">
  22. <view
  23. v-if="item && item.list.length"
  24. class="desc-content"
  25. slot="desc"
  26. >
  27. <!--节点类型-->
  28. <view class="node-type">
  29. {{ item.nodeType }}
  30. </view>
  31. <view class="userinfo-box">
  32. <view
  33. class="u-card-item"
  34. :key="i"
  35. v-for="(task, i) in item.list"
  36. >
  37. <Avatar :info="task"></Avatar>
  38. <view class="u-name">{{ task.userName }}</view>
  39. </view>
  40. </view>
  41. </view>
  42. </u-steps-item>
  43. </u-steps>
  44. </template>
  45. </view>
  46. </template>
  47. <script>
  48. import Avatar from '@/pages/approval/com/Avatar.vue';
  49. import StatusView from '@/components/statusView/index.vue';
  50. export default {
  51. name: 'footerProcess',
  52. components: {
  53. StatusView,
  54. Avatar,
  55. },
  56. props: {
  57. condList: {
  58. default: () => [],
  59. type: Array,
  60. },
  61. infoDto: {
  62. default: () => [],
  63. type: Array,
  64. },
  65. },
  66. };
  67. </script>
  68. <style scoped lang="scss">
  69. .flow-chart {
  70. background-color: #fff;
  71. padding: 20rpx;
  72. margin-top: 20rpx;
  73. border-radius: 6px;
  74. .h-tip-txt {
  75. color: $u-tips-color;
  76. font-size: 13px;
  77. }
  78. .flow-title {
  79. margin-bottom: 30rpx;
  80. position: relative;
  81. font-size: 15px;
  82. color: #333333;
  83. &:before {
  84. content: '';
  85. position: absolute;
  86. bottom: -6px;
  87. left: 0;
  88. width: 14px;
  89. height: 3px;
  90. background-color: #436ff6;
  91. border-radius: 6px;
  92. }
  93. }
  94. .desc-content {
  95. background-color: #fff;
  96. .node-type {
  97. font-size: 14px;
  98. color: #152f62;
  99. margin-bottom: 20rpx;
  100. }
  101. .userinfo-box {
  102. display: flex;
  103. flex-wrap: wrap;
  104. background-color: #f8f9fc;
  105. padding: 24rpx;
  106. border-radius: $bd-radius;
  107. .u-card-item {
  108. display: flex;
  109. flex-direction: column;
  110. align-items: center;
  111. margin-left: 20rpx;
  112. &:first-child {
  113. margin-left: 0;
  114. }
  115. .u-name {
  116. font-size: 14px;
  117. color: #595c62;
  118. }
  119. }
  120. }
  121. }
  122. }
  123. </style>