timeLine-row.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="steps-v">
  3. <view class="steps-box">
  4. <view class="steps-line" :style="isUpper? lowerStyle:upperStyle" v-for="(item,index) in list" :key="index"
  5. @click="jump(item)">
  6. <view class="steps-item">
  7. <view class="steps-content" :style="{'width':isCrad?'270rpx':'250rpx'}">
  8. <view class="u-font-24 steps-content-hd" v-if="isCrad">
  9. <text>{{item.title}}</text>
  10. </view>
  11. <view class="u-font-24" :class="isCrad?'steps-title':'steps-title2'">
  12. <text class="name u-line-2">{{item.content}}</text>
  13. <text class="time">{{item.timestamp}}</text>
  14. </view>
  15. </view>
  16. <view class="steps-node" :style="isUpper?lowerDotStyle:upperDotStyle">
  17. <view class="steps-node-dot" v-if="index==0" :style="{'background':'rgba(62, 213, 56, 0.39)'}">
  18. </view>
  19. <view class="steps-node-dot" v-else-if="index==list.length-1"
  20. :style="{'background':'rgba(228, 231, 237, 0.39)'}"></view>
  21. <view class="steps-node-dot" v-else :style="{'background':'rgba(25, 144, 250, 0.39)'}"></view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. props: {
  31. list: {
  32. type: Array,
  33. default () {
  34. return []
  35. }
  36. },
  37. isCrad: {
  38. type: Boolean,
  39. default () {
  40. return false
  41. }
  42. },
  43. isUpper: {
  44. type: Boolean,
  45. default () {
  46. return true
  47. }
  48. },
  49. },
  50. data() {
  51. return {
  52. upperStyle: {
  53. 'padding-top': '40rpx',
  54. 'border-top': '2rpx solid #DEDEDE'
  55. },
  56. upperDotStyle: {
  57. 'top': '-54rpx'
  58. },
  59. lowerStyle: {
  60. 'padding-bottom': '40rpx',
  61. 'border-bottom': '2rpx solid #DEDEDE'
  62. },
  63. lowerDotStyle: {
  64. 'bottom': '-52rpx'
  65. }
  66. }
  67. },
  68. methods: {
  69. jump(item) {
  70. this.jnpf.solveAddressParam(item, this.config)
  71. this.jnpf.jumpLink(item.urlAddress)
  72. },
  73. }
  74. }
  75. </script>
  76. <style lang="scss">
  77. .steps-v {
  78. height: 100%;
  79. overflow-x: scroll;
  80. .steps-box {
  81. padding: 20rpx;
  82. display: flex;
  83. .steps-line {
  84. .steps-item {
  85. width: 100%;
  86. position: relative;
  87. display: flex;
  88. flex-direction: column;
  89. .steps-node {
  90. position: absolute;
  91. left: 12rpx;
  92. transform-origin: 0;
  93. transform: translateX(-50%);
  94. display: flex;
  95. flex-direction: row;
  96. align-items: center;
  97. justify-content: center;
  98. z-index: 1;
  99. font-size: 24rpx;
  100. background-color: rgb(255, 255, 255);
  101. z-index: 9;
  102. .steps-node-dot {
  103. width: 28rpx;
  104. height: 28rpx;
  105. border: 4rpx solid #FFFFFF;
  106. box-shadow: 0 6rpx 12rpx rgba(2, 7, 28, 0.16);
  107. border-radius: 50%;
  108. display: flex;
  109. flex-direction: row;
  110. }
  111. }
  112. .steps-content {
  113. .steps-content-hd {
  114. width: 90%;
  115. height: 44rpx;
  116. color: #606266;
  117. margin-bottom: 4rpx;
  118. }
  119. .steps-title2 {
  120. line-height: 36rpx;
  121. display: flex;
  122. flex-direction: column;
  123. width: 90%;
  124. height: 120rpx;
  125. justify-content: space-between;
  126. border-radius: 8px;
  127. }
  128. .steps-title {
  129. line-height: 36rpx;
  130. display: flex;
  131. flex-direction: column;
  132. width: 90%;
  133. height: 170rpx;
  134. background: rgba(255, 255, 255, 0.39);
  135. box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.1);
  136. border-radius: 8px;
  137. padding: 22rpx;
  138. justify-content: space-between;
  139. .name {
  140. margin-bottom: 6rpx;
  141. letter-spacing: 2rpx;
  142. color: #303133;
  143. }
  144. .time {
  145. color: #606266;
  146. }
  147. }
  148. }
  149. }
  150. }
  151. }
  152. }
  153. </style>