CfLogistics.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view class="cf-logistics">
  3. <pub-loading-view :loaded="loaded" height="100%">
  4. <view class="no-data" v-if="!dataList.no || dataList.statusList.length == 0">
  5. <image mode="heightFix" src="/static/image/no-data.png" />
  6. 暂无数据
  7. </view>
  8. <view v-else>
  9. <view class="cf-logistics-top">
  10. <view class="icon"><text class="iconfont">&#xe674;</text></view>
  11. {{dataList.no}}
  12. <view class="copy-icon"> <text class="iconfont">&#xe620;</text></view>
  13. </view>
  14. <view class="logistics-list">
  15. <view class="logistics-item" :class="item.className" v-for="item in dataList.statusList" :key="item.id">
  16. <view class="logistics-item-left">
  17. <view class="icon" v-if='item.icon'>
  18. <text class="iconfont">&#xe602;</text>
  19. </view>
  20. <view class="icon" :class="item.className" v-else-if="item.className=='is-finish'">
  21. </view>
  22. <view class="dot" v-else></view>
  23. <view class="line"></view>
  24. </view>
  25. <view class="logistics-item-right">
  26. <view class="logistics-item-title" v-if="item.title">{{item.title}}</view>
  27. <view class="logistics-item-time">{{item.time}}</view>
  28. <view>{{item.text}}</view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </pub-loading-view>
  34. </view>
  35. </template>
  36. <script lang="ts" setup>
  37. import { ref, onMounted,PropType } from 'vue'
  38. const props = defineProps({
  39. dataList: {
  40. type: Object as PropType<any>,
  41. default: () => ({})
  42. },
  43. })
  44. const loaded = ref(false)
  45. onMounted(() => {
  46. })
  47. </script>
  48. <style lang="scss" scoped>
  49. .cf-logistics {
  50. background: #fff;
  51. padding: $uni-spacing-col-s3 $page-row-spacing;
  52. height: 100%;
  53. box-sizing: border-box;
  54. .icon {
  55. width: 64rpx;
  56. height: 64rpx;
  57. background: $uni-bg-icon;
  58. border-radius: 50%;
  59. @include flex-center;
  60. .iconfont {
  61. background: linear-gradient(180deg, #46ACFF 0%, $uni-color-primary 100%);
  62. background-clip: text;
  63. text-fill-color: transparent;
  64. -webkit-background-clip: text;
  65. -webkit-text-fill-color: transparent;
  66. }
  67. }
  68. .cf-logistics-top {
  69. @include flex;
  70. margin-bottom: 32rpx;
  71. .icon {
  72. background: $uni-color-primary-light;
  73. margin-right: 24rpx;
  74. }
  75. .copy-icon {
  76. margin-left: 16rpx;
  77. }
  78. }
  79. .logistics-list {
  80. overflow-y: auto;
  81. flex: 1;
  82. height: calc(100% - 96rpx);
  83. .logistics-item {
  84. color: $uni-text-color-grey;
  85. display: flex;
  86. min-height: 140rpx;
  87. .logistics-item-left {
  88. @include flex;
  89. flex-direction: column;
  90. margin-right: 24rpx;
  91. .icon {
  92. .iconfont {
  93. background: linear-gradient(180deg, #C2CFE7 0%, #899AB9 100%);
  94. background-clip: text;
  95. text-fill-color: transparent;
  96. -webkit-background-clip: text;
  97. -webkit-text-fill-color: transparent;
  98. }
  99. &.is-finish {
  100. background: $uni-color-primary;
  101. color: #fff;
  102. }
  103. }
  104. .dot {
  105. width: 24rpx;
  106. height: 24rpx;
  107. background: $uni-border-color;
  108. border-radius: 50%;
  109. margin: 0 20rpx;
  110. }
  111. .line {
  112. flex: 1;
  113. // width: 1px;
  114. border-left: 1px dashed $uni-border-color;
  115. margin: 12rpx 0;
  116. }
  117. }
  118. .logistics-item-right {
  119. margin-bottom: 32rpx;
  120. font-size: 24rpx;
  121. line-height: $uni-line-height-sm;
  122. .logistics-item-title {
  123. font-size: 28rpx;
  124. line-height: $uni-line-height-base;
  125. margin-bottom: 8rpx;
  126. }
  127. .logistics-item-time {
  128. margin-bottom: 8rpx;
  129. }
  130. }
  131. &.is-finish {
  132. .logistics-item-left {
  133. .line {
  134. border-left: 1px dashed $uni-color-primary;
  135. }
  136. }
  137. .logistics-item-right {
  138. color: $uni-text-color;
  139. .logistics-item-title {
  140. font-weight: 800;
  141. }
  142. }
  143. }
  144. &:last-child {
  145. .logistics-item-left {
  146. .line {
  147. display: none;
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. </style>