record.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view class="container">
  3. <!-- 筛选区域 -->
  4. <Search @handLeConveyData="getConveyData" />
  5. <!-- 列表区域 -->
  6. <view class="list" v-for="(item,index) in listData" :key="index" @click="handleLookDetail(item)">
  7. <view class="list-title">
  8. <view class="title-number">
  9. 车牌:{{item.number?item.number:'无'}}
  10. </view>
  11. <view class="title-icon">
  12. <img src="../../static/right.png">
  13. </view>
  14. </view>
  15. <view class="list-item">
  16. 状态:
  17. <span class="list-item-type" v-if="item.type ===1">预约进行中</span>
  18. <span v-if="item.type ===2">预约已截止</span>
  19. <span class="list-item-type" v-if="item.type ===3">候补排队中</span>
  20. <span v-if="item.type ===4">候补已截止</span>
  21. </view>
  22. <view class="list-item">
  23. 日期:<span>{{item.date}}</span>
  24. </view>
  25. <view class="list-item" v-if="item.departureTime">
  26. 发车时间:<span>{{item.departureTime}}</span>
  27. </view>
  28. <view class="list-item" v-if="item.path">
  29. 线路:<span>{{item.path}}</span>
  30. </view>
  31. <view class="list-item">
  32. 人数:
  33. <view class="list-item-progress" v-if="item.type===1||item.type ===2">
  34. <progress activeColor="#3C50E8" stroke-width="9" :percent="15" />
  35. </view>
  36. <span>{{item.proportion}}</span>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script setup>
  42. import {
  43. ref
  44. } from "vue"
  45. import Search from '../../components/search'
  46. // 1代表预约进行中,2代表预约已截止,3代表候补排队中,4代表候补已截止
  47. const listData = ref([{
  48. number: '赣M06001',
  49. type: 1,
  50. date: "2023.03.01",
  51. departureTime: "15:30",
  52. path: "墨轩湖 - 综合楼",
  53. proportion: '25/52'
  54. },
  55. {
  56. number: '赣M06001',
  57. type: 2,
  58. date: "2023.03.01",
  59. departureTime: "15:30",
  60. path: "墨轩湖 - 综合楼",
  61. proportion: '25/52'
  62. },
  63. {
  64. type: 3,
  65. date: "2023.03.01",
  66. proportion: '25'
  67. },
  68. {
  69. type: 4,
  70. date: "2023.03.01",
  71. proportion: '25'
  72. }
  73. ])
  74. const handleLookDetail = (item) => {
  75. const info = JSON.stringify(item)
  76. uni.navigateTo({
  77. url: `/pages/detail/detail?info=${info}`
  78. })
  79. }
  80. const getConveyData = (Obj) => {
  81. console.log(Obj);
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .container {
  86. background-color: #F2F2F2;
  87. .list {
  88. margin-bottom: 20rpx;
  89. padding-bottom: 24rpx;
  90. background-color: #fff;
  91. .list-title {
  92. display: flex;
  93. justify-content: space-between;
  94. align-items: center;
  95. padding: 0 30rpx;
  96. margin-bottom: 20rpx;
  97. height: 94rpx;
  98. font-size: 32rpx;
  99. font-weight: bold;
  100. border-bottom: 1rpx solid #E6E6E6;
  101. .title-icon {
  102. margin-top: -20rpx;
  103. width: 15rpx;
  104. height: 25rpx;
  105. img {
  106. width: 100%;
  107. height: 100%;
  108. }
  109. }
  110. }
  111. .list-item {
  112. display: flex;
  113. align-items: center;
  114. padding: 0 30rpx;
  115. margin-bottom: 14rpx;
  116. color: #999999;
  117. font-size: 28rpx;
  118. span {
  119. color: #333333;
  120. }
  121. .list-item-type {
  122. color: #00BAAD;
  123. }
  124. .list-item-progress {
  125. margin-right: 36rpx;
  126. width: 437rpx;
  127. height: 22rpx;
  128. :deep(.uni-progress-bar),
  129. :deep(.uni-progress-inner-bar) {
  130. border-radius: 85rpx;
  131. }
  132. }
  133. }
  134. }
  135. }
  136. </style>