my.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="container">
  3. <!-- 筛选区域 -->
  4. <Search />
  5. <!-- 列表区域 -->
  6. <view class="list" v-for="(item,index) in listData" :key="index">
  7. <view class="list-title">
  8. <view v-if="item.title">
  9. {{item.title }}
  10. </view>
  11. <view v-else>
  12. 墨轩湖到黄家湖
  13. </view>
  14. <view class="list-img" :class="item.type ===1 ? 'mr-15':''">
  15. <img v-if="item.type===1" src="../../static/success.png">
  16. <img v-if="item.type===2" src="../../static/pass.png">
  17. <img v-if="item.type===3" src="../../static/cancel.png">
  18. <img v-if="item.type===4" src="../../static/waiting.png">
  19. </view>
  20. </view>
  21. <view class="list-info">
  22. <view class="list-info-item">
  23. <span>下单时间:</span>{{item.orderTime}}
  24. </view>
  25. <view class="list-info-item" v-if="item.departureTime">
  26. <span>发车时间:</span>{{item.departureTime}}
  27. </view>
  28. <view class="list-info-item" v-if="item.busNumber">
  29. <span>车辆尾号:</span>{{item.busNumber}}
  30. </view>
  31. <view class="list-info-item" v-if="item.capacity">
  32. <span>容 量:</span>{{item.capacity}}
  33. </view>
  34. <view class="list-info-item" v-if="item.message">
  35. <span>变更信息:</span>{{item.message}}
  36. </view>
  37. </view>
  38. <view class="list-button">
  39. <view class="list-button-change" v-if="item.type ===1">
  40. 更换车次
  41. </view>
  42. <view class="list-button-cancel">
  43. 取消预约
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script setup>
  50. import {
  51. ref
  52. } from "vue"
  53. import Search from '../../components/search'
  54. // 1代表成功,2代表通行,3代表取消,4代表候补中
  55. const listData = ref([{
  56. type: 1,
  57. title: '墨轩湖 - 综合楼',
  58. orderTime: '2023-03-31 15:15:15',
  59. departureTime: '2023-03-31 15:15:15',
  60. busNumber: '0269',
  61. capacity: '53人',
  62. message: '车辆0290变更为6001,容量53变更为63'
  63. },
  64. {
  65. type: 2,
  66. title: '墨轩湖 - 综合楼',
  67. orderTime: '2023-03-31 15:15:15',
  68. departureTime: '2023-03-31 15:15:15',
  69. busNumber: '0269',
  70. capacity: '53人',
  71. message: '车辆0290变更为6001,容量53变更为63'
  72. },
  73. {
  74. type: 3,
  75. title: '墨轩湖 - 综合楼',
  76. orderTime: '2023-03-31 15:15:15',
  77. departureTime: '2023-03-31 15:15:15',
  78. busNumber: '0269',
  79. capacity: '53人',
  80. message: '车辆0290变更为6001,容量53变更为63'
  81. },
  82. {
  83. type: 4,
  84. // title: '墨轩湖 - 综合楼',
  85. orderTime: '2023-03-31 15:15:15',
  86. // departureTime: '2023-03-31 15:15:15',
  87. // busNumber: '0269',
  88. // capacity: '53人',
  89. // message: '车辆0290变更为6001,容量53变更为63'
  90. }
  91. ])
  92. </script>
  93. <style lang="scss" scoped>
  94. .container {
  95. background-color: #F2F2F2;
  96. .list {
  97. margin-bottom: 20rpx;
  98. font-size: 32rpx;
  99. background-color: #fff;
  100. .list-title {
  101. display: flex;
  102. justify-content: space-between;
  103. align-items: center;
  104. padding: 0 30rpx;
  105. height: 94rpx;
  106. font-weight: bold;
  107. font-size: 32rpx;
  108. border-bottom: 1rpx solid #E6E6E6;
  109. .list-img {
  110. width: 121rpx;
  111. height: 34rpx;
  112. img {
  113. // width: 100%;
  114. height: 100%;
  115. }
  116. }
  117. .mr-15 {
  118. margin-right: 15rpx;
  119. }
  120. }
  121. .list-info {
  122. display: flex;
  123. flex-direction: column;
  124. justify-content: space-evenly;
  125. padding: 0 30rpx;
  126. margin-top: 15rpx;
  127. .list-info-item {
  128. height: 60rpx;
  129. line-height: 60rpx;
  130. font-size: 28rpx;
  131. color: #333333;
  132. span {
  133. display: inline-block;
  134. width: 140rpx;
  135. text-align-last: justify;
  136. color: #999999;
  137. }
  138. }
  139. }
  140. .list-button {
  141. display: flex;
  142. justify-content: flex-end;
  143. align-items: center;
  144. height: 114rpx;
  145. font-size: 28rpx;
  146. text-align: center;
  147. .list-button-change {
  148. width: 170rpx;
  149. height: 70rpx;
  150. line-height: 70rpx;
  151. color: #fff;
  152. border-radius: 15rpx;
  153. background: linear-gradient(#8684FF, #3C50E8);
  154. }
  155. .list-button-cancel {
  156. margin: 0 30rpx;
  157. width: 170rpx;
  158. height: 70rpx;
  159. line-height: 70rpx;
  160. color: #999999;
  161. border-radius: 15rpx;
  162. background-color: #E6E6E6;
  163. }
  164. }
  165. }
  166. }
  167. </style>