x-steps.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="bg">
  3. <view class="steps">
  4. <view class="steps_item" v-for="(i, index) in infoList" :key="index">
  5. <view class="s_r">
  6. <view class="line" :style="{ backgroundColor: index != 0 ? '#EAEAEA' : 'rgba(0,0,0,0)' }"></view>
  7. <view class="index" :style="{ backgroundColor: i.backgroundColor, color: color }"></view>
  8. <view class="line"
  9. :style="{ backgroundColor: index != infoList.length - 1 ? '#EAEAEA' : 'rgba(0,0,0,0)' }"></view>
  10. </view>
  11. <view class="s_l">
  12. <view class="info_item">
  13. <!-- 真是节点名称、时间 -->
  14. <view class="top_info">
  15. <text class="title_scacm">{{ i.text }}
  16. <span v-if="i.phone">
  17. 联系电话:<span style="color: #f29100;margin-right: 15rpx;">{{i.phone}}</span>
  18. </span>
  19. {{ i.text1 }}
  20. </text>
  21. <text class="date">{{ i.createdAt || ''}}</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. name: 'XSteps',
  32. props: {
  33. infoList: {
  34. type: Array,
  35. default: [],
  36. },
  37. color: {
  38. type: String,
  39. default: '#fff',
  40. },
  41. backgroundColor: {
  42. type: String,
  43. default: '#2979ff',
  44. },
  45. lineNum: {
  46. type: Number,
  47. default: 0,
  48. },
  49. },
  50. methods: {
  51. // 审核状态
  52. auditStatus(i) {
  53. if (i == 2) {
  54. return {
  55. text: '通过',
  56. color: '#00D288',
  57. bgColor: '#EAFFF8',
  58. }
  59. } else if (i == 3) {
  60. return {
  61. text: '驳回',
  62. color: '#FF4141',
  63. bgColor: '#FFDCD5',
  64. }
  65. }
  66. },
  67. handlePreview(url) {
  68. uni.previewImage({
  69. urls: [url]
  70. })
  71. },
  72. },
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .steps {
  77. display: flex;
  78. flex-direction: column;
  79. .steps_item {
  80. display: flex;
  81. flex-direction: row;
  82. .s_r {
  83. padding: 0 20rpx;
  84. display: flex;
  85. flex-direction: column;
  86. align-items: center;
  87. .line {
  88. flex: 1;
  89. width: 5rpx;
  90. }
  91. .index {
  92. width: 24rpx;
  93. height: 24rpx;
  94. border-radius: 50rpx;
  95. border: 4rpx solid #e3eeff;
  96. box-sizing: border-box;
  97. }
  98. }
  99. .s_l {
  100. display: flex;
  101. flex-direction: column;
  102. padding: 20rpx 0;
  103. flex: 1;
  104. .info_item {
  105. background-color: #ffffff;
  106. margin-right: 10rpx;
  107. border-radius: 10rpx;
  108. display: flex;
  109. flex-direction: column;
  110. justify-content: center;
  111. .top_info {
  112. display: flex;
  113. flex-direction: column;
  114. }
  115. text {
  116. font-size: 28rpx;
  117. font-weight: 500;
  118. color: rgba(51, 51, 51, 1);
  119. }
  120. .date {
  121. font-size: 23rpx;
  122. color: #afb4be;
  123. }
  124. }
  125. .info_item:active {
  126. background-color: #f4f4f4;
  127. }
  128. }
  129. }
  130. }
  131. .title_scacm {
  132. display: -webkit-box !important;
  133. width: 100%;
  134. font-size: 32rpx;
  135. font-weight: 500;
  136. color: rgba(102, 102, 102, 1);
  137. word-break: break-all;
  138. }
  139. .ml5 {
  140. margin-left: 10rpx;
  141. }
  142. .mt10 {
  143. margin-top: 20rpx;
  144. }
  145. </style>