StepBar.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view>
  3. <u-steps dot :current="stepList.length" direction="column">
  4. <template v-for="(item,index) in stepList">
  5. <view class="card_step">
  6. <view class="card_time">{{item.optTime}}</view>
  7. <u-steps-item :title="initDictvalue(optTypeList,item.optType)">
  8. <template slot="desc">
  9. <view>
  10. <view class="title" v-if="item.optUserObj.nickName">
  11. 操作人:{{item.optUserObj.nickName}}
  12. </view>
  13. <view class="title" v-if="item.objectCustomerObj.name">
  14. 交互客户:{{item.objectCustomerObj.name}}
  15. </view>
  16. <view class="title" v-if="item.optCustomerObj.name">
  17. 操作客户:{{item.optCustomerObj.name}}
  18. </view>
  19. <view class="title" v-if="item.currentEnterpriseObj.name">
  20. 当前企业:{{item.currentEnterpriseObj.name}}
  21. </view>
  22. <view class="title" v-if="item.currentAddressObj.name">
  23. 当前客户:{{item.currentAddressObj.name}}
  24. </view>
  25. <view class="title" v-if="item.currentTruckObj.name">
  26. 当前司机:{{item.currentTruckObj.name}}
  27. </view>
  28. <view class="title" v-if="item.currentMotor.name">
  29. 当前车辆:{{item.currentMotor.name}}
  30. </view>
  31. </view>
  32. </template>
  33. </u-steps-item>
  34. </view>
  35. </template>
  36. </u-steps>
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. process
  42. } from '@/static/js/blockSort.js'
  43. export default {
  44. props: {
  45. stepList: {
  46. type: Array,
  47. default: []
  48. },
  49. },
  50. data() {
  51. return {
  52. optTypeList: process(),
  53. }
  54. },
  55. computed: {},
  56. methods: {
  57. // 普通类型文字匹配
  58. initDictvalue(list, type) {
  59. let name = ''
  60. if (list) {
  61. list.forEach(item => {
  62. if (type === item.value) {
  63. name = item.label
  64. }
  65. })
  66. }
  67. return name
  68. },
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. ::v-deep .u-text__value {
  74. font-size: 32rpx !important;
  75. font-weight: bold !important;
  76. }
  77. ::v-deep .u-steps-item__wrapper {
  78. border-radius: 50%;
  79. box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
  80. background-color: #3c9cff !important;
  81. }
  82. ::v-deep .u-steps-item__wrapper__dot {
  83. background-color: #fff !important;
  84. }
  85. ::v-deep .u-steps-item__content {
  86. margin-left: 20rpx !important;
  87. }
  88. .title_name {
  89. font-size: 32rpx;
  90. font-weight: bold;
  91. }
  92. .title {
  93. font-size: 26rpx;
  94. color: #606266;
  95. }
  96. .card_step {
  97. width: 100%;
  98. display: flex;
  99. }
  100. .card_time {
  101. text-align: center;
  102. width: 25%;
  103. font-size: 25rpx;
  104. color: #000;
  105. }
  106. </style>