index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view>
  3. <view class="flow" style="display: flex;" v-for="(item, index) in logListData" :key="index">
  4. <view class="steps">
  5. <view class="steps_list">
  6. <view :class="index==0?'tails':'active-tails'"></view>
  7. <view class="node">
  8. <view class="active-node">
  9. </view>
  10. </view>
  11. <view v-if="(index+1)<logListData.length" class="tail"
  12. :class="{'active-tail':parseInt(item.id)-1 == item.index}" :hidden="item.index == 0">
  13. </view>
  14. </view>
  15. </view>
  16. <view class="wrapper">
  17. <view class="title">
  18. <text>{{item.name}}</text>
  19. </view>
  20. <view class="time">
  21. <span>{{item.timeMessage}}</span>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. /*
  29. item:没条记录详情
  30. activity: 当前进度条状态
  31. wrapperStatus:流程状态对应字段
  32. wrapperTitle:详情对应字段
  33. index:进度条排列序号 index == 0代表最后一个没有竖立进度条
  34. date:时间
  35. */
  36. import {
  37. logList
  38. } from "@/api/maintain.js"
  39. export default {
  40. data() {
  41. return {
  42. detail: [{
  43. activity: 0,
  44. logType: 1,
  45. createTime: "2021.07.01 20:00",
  46. },
  47. {
  48. activity: 1,
  49. logType: 2,
  50. createTime: "2021.07.01 20:00",
  51. },
  52. {
  53. activity: 2,
  54. logType: 3,
  55. createTime: "2021.07.01 20:00",
  56. },
  57. {
  58. activity: 3,
  59. logType: 4,
  60. createTime: "2021.07.01 20:00",
  61. },
  62. {
  63. activity: 4,
  64. logType: 5,
  65. createTime: "2021.07.01 20:00",
  66. },
  67. {
  68. activity: 5,
  69. logType: 6,
  70. createTime: "2021.07.01 20:00",
  71. }
  72. ],
  73. orderData: {},
  74. logListData: [],
  75. }
  76. },
  77. onLoad(options) {
  78. this.orderData = JSON.parse(decodeURIComponent(options.data));
  79. logList({
  80. orderId: this.orderData.id
  81. }).then((res) => {
  82. this.logListData = res.data
  83. })
  84. },
  85. methods: {
  86. }
  87. }
  88. </script>
  89. <style lang="scss">
  90. .flow {
  91. background: #F5F5F5;
  92. }
  93. page {
  94. height: 100%;
  95. background: #F5F5F5;
  96. }
  97. .wrapper {
  98. width: 605rpx;
  99. height: 138rpx;
  100. background: #FFFFFF;
  101. border-radius: 10rpx;
  102. margin: 46rpx 46rpx 46rpx 37rpx;
  103. padding: 33rpx;
  104. .title {
  105. font-weight: bold;
  106. font-size: 26rpx;
  107. }
  108. .time {
  109. padding-top: 20rpx;
  110. font-size: 26rpx;
  111. color: #333;
  112. }
  113. }
  114. .steps {
  115. display: flex;
  116. .steps_list {
  117. display: flex;
  118. flex-direction: column;
  119. align-items: center;
  120. // padding: 0 0 0 5px;
  121. // padding: 0 0 40rpx;
  122. margin-left: 54rpx;
  123. // height: 160rpx;
  124. }
  125. .active-tails {
  126. height: 118rpx;
  127. width: 2rpx;
  128. background: #E8E7E7;
  129. }
  130. .tails {
  131. height: 118rpx;
  132. width: 2rpx;
  133. }
  134. .tail {
  135. height: calc(100% - 15rpx);
  136. width: 2rpx;
  137. background: #E8E7E7;
  138. }
  139. .active-tail {
  140. width: 2rpx;
  141. background-color: #F87362 !important;
  142. }
  143. .node {
  144. width: 28rpx;
  145. height: 28rpx;
  146. background: rgba(0, 94, 255, 0.15);
  147. border-radius: 50%;
  148. display: flex;
  149. align-items: center;
  150. justify-content: center;
  151. .active-node {
  152. width: 14rpx;
  153. height: 14rpx;
  154. background: #005EFF;
  155. border-radius: 50%;
  156. }
  157. }
  158. }
  159. </style>