CfStatus.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="cf-status">
  3. <pub-loading-view :loaded="loaded" height="100%">
  4. <view class="status-item" :class="item.isCur?'is-current':''" v-for="item in statusList" :key="item.id">
  5. <view class="status-item-left">
  6. <view class="icon">
  7. <text class="iconfont">&#xe602;</text>
  8. </view>
  9. <view class="line"></view>
  10. </view>
  11. <view class="status-item-right">
  12. <view class="status-item-title">{{item.title}}</view>
  13. <view>{{item.time}}</view>
  14. </view>
  15. </view>
  16. </pub-loading-view>
  17. </view>
  18. </template>
  19. <script lang="ts" setup>
  20. import { ref, PropType, onMounted } from 'vue'
  21. // defineProps({
  22. // info: {
  23. // type: Object as PropType<any>,
  24. // default: () => ({}),
  25. // },
  26. // })
  27. const loaded = ref(false)
  28. const statusList = ref([{
  29. icon: '',
  30. title: '已签收',
  31. time: '2024/04/22 12:24',
  32. isCur: true,
  33. }, {
  34. icon: '',
  35. title: '已快递',
  36. time: '2024/04/22 12:24',
  37. isCur: false,
  38. }, {
  39. icon: '',
  40. title: '已打包',
  41. time: '2024/04/22 12:24',
  42. isCur: false,
  43. }, {
  44. icon: '',
  45. title: '已煎煮',
  46. time: '2024/04/22 12:24',
  47. isCur: false,
  48. }, {
  49. icon: '',
  50. title: '已浸泡',
  51. time: '2024/04/22 12:24',
  52. isCur: false,
  53. }, {
  54. icon: '',
  55. title: '已调剂',
  56. time: '2024/04/22 12:24',
  57. isCur: false,
  58. }, {
  59. icon: '',
  60. title: '已确认',
  61. time: '2024/04/22 12:24',
  62. isCur: false,
  63. }, {
  64. icon: '',
  65. title: '已接收',
  66. time: '2024/04/22 12:24',
  67. isCur: false,
  68. }])
  69. const getInfo = async () => {
  70. loaded.value = true;
  71. // todo
  72. loaded.value = false;
  73. }
  74. onMounted(() => {
  75. getInfo()
  76. })
  77. </script>
  78. <style lang="scss" scoped>
  79. .cf-status {
  80. background: #fff;
  81. padding: $uni-spacing-col-s3 $page-row-spacing;
  82. height: 100%;
  83. box-sizing: border-box;
  84. overflow-y: auto;
  85. .status-item {
  86. color: $uni-text-color-grey;
  87. display: flex;
  88. height: 140rpx;
  89. .status-item-left {
  90. @include flex;
  91. flex-direction: column;
  92. margin-right: 24rpx;
  93. .icon {
  94. width: 64rpx;
  95. height: 64rpx;
  96. background: $uni-bg-icon;
  97. border-radius: 50%;
  98. @include flex-center;
  99. .iconfont {
  100. background: linear-gradient(180deg, #46ACFF 0%, #1E92F0 100%);
  101. background-clip: text;
  102. text-fill-color: transparent;
  103. -webkit-background-clip: text;
  104. -webkit-text-fill-color: transparent;
  105. }
  106. }
  107. .line {
  108. flex: 1;
  109. // width: 1px;
  110. border-left: 1px solid $uni-border-color;
  111. margin: 12rpx 0;
  112. }
  113. }
  114. .status-item-right {
  115. .status-item-title {
  116. font-size: $uni-font-size-lg;
  117. line-height: $uni-line-height-lg;
  118. margin-bottom: 8rpx;
  119. }
  120. }
  121. &.is-current {
  122. .status-item-left {
  123. .line {
  124. border-left: 1px dashed $uni-color-primary;
  125. }
  126. }
  127. .status-item-right {
  128. color: $uni-text-color;
  129. .status-item-title {
  130. font-size: 32rpx;
  131. font-weight: 800;
  132. }
  133. }
  134. }
  135. &:last-child {
  136. .status-item-left {
  137. .line {
  138. display: none;
  139. }
  140. }
  141. }
  142. }
  143. }
  144. </style>