my.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <view class="container">
  3. <!-- 筛选区域 -->
  4. <Search @handLeConveyData="getConveyData" />
  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-30':''">
  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-item2" 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" v-if="item.type ===1">
  43. 取消预约
  44. </view>
  45. <view class="list-button-cancel" v-if="item.type ===4">
  46. 取消候补
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script setup>
  53. import {
  54. ref
  55. } from "vue"
  56. import Search from '../../components/search'
  57. // 1代表成功,2代表通行,3代表取消,4代表候补中
  58. const listData = ref([{
  59. type: 1,
  60. title: '墨轩湖 - 综合楼',
  61. orderTime: '2023-03-31 15:15:15',
  62. departureTime: '2023-03-31 15:15:15',
  63. busNumber: '0269',
  64. capacity: '53人',
  65. message: '车辆0290变更为6001,容量53变更为63车辆0290变更为6001,容量53变更为63车辆0290变更为6001,容量53变更为63'
  66. },
  67. {
  68. type: 2,
  69. title: '墨轩湖 - 综合楼',
  70. orderTime: '2023-03-31 15:15:15',
  71. departureTime: '2023-03-31 15:15:15',
  72. busNumber: '0269',
  73. capacity: '53人',
  74. message: '车辆0290变更为6001,容量53变更为63'
  75. },
  76. {
  77. type: 3,
  78. title: '墨轩湖 - 综合楼',
  79. orderTime: '2023-03-31 15:15:15',
  80. departureTime: '2023-03-31 15:15:15',
  81. busNumber: '0269',
  82. capacity: '53人',
  83. message: '车辆0290变更为6001,容量53变更为63'
  84. },
  85. {
  86. type: 4,
  87. // title: '墨轩湖 - 综合楼',
  88. orderTime: '2023-03-31 15:15:15',
  89. // departureTime: '2023-03-31 15:15:15',
  90. // busNumber: '0269',
  91. // capacity: '53人',
  92. // message: '车辆0290变更为6001,容量53变更为63'
  93. }
  94. ])
  95. const getConveyData = (Obj) => {
  96. console.log(Obj);
  97. }
  98. </script>
  99. <style lang="scss" scoped>
  100. .container {
  101. display: flex;
  102. flex-direction: column;
  103. background-color: #F2F2F2;
  104. .list {
  105. margin-bottom: 20rpx;
  106. font-size: 32rpx;
  107. background-color: #fff;
  108. .list-title {
  109. display: flex;
  110. justify-content: space-between;
  111. align-items: center;
  112. padding: 0 30rpx;
  113. height: 94rpx;
  114. font-weight: bold;
  115. font-size: 32rpx;
  116. border-bottom: 1rpx solid #E6E6E6;
  117. .list-img {
  118. width: 121rpx;
  119. height: 34rpx;
  120. img {
  121. // width: 100%;
  122. height: 100%;
  123. }
  124. }
  125. .mr-30 {
  126. margin-right: 30rpx;
  127. }
  128. }
  129. .list-info {
  130. display: flex;
  131. flex-direction: column;
  132. justify-content: space-evenly;
  133. padding: 0 30rpx;
  134. margin-top: 15rpx;
  135. .list-info-item,
  136. .list-info-item2 {
  137. line-height: 60rpx;
  138. font-size: 28rpx;
  139. color: #333333;
  140. span {
  141. display: inline-block;
  142. width: 140rpx;
  143. text-align-last: justify;
  144. color: #999999;
  145. }
  146. }
  147. .list-info-item {
  148. height: 60rpx;
  149. }
  150. }
  151. .list-button {
  152. display: flex;
  153. justify-content: flex-end;
  154. align-items: center;
  155. font-size: 28rpx;
  156. text-align: center;
  157. .list-button-change {
  158. margin: 17rpx 0 40rpx 0;
  159. width: 170rpx;
  160. height: 70rpx;
  161. line-height: 70rpx;
  162. color: #fff;
  163. border-radius: 15rpx;
  164. background: linear-gradient(#8684FF, #3C50E8);
  165. }
  166. .list-button-cancel {
  167. margin: 17rpx 30rpx 40rpx;
  168. width: 170rpx;
  169. height: 70rpx;
  170. line-height: 70rpx;
  171. color: #999999;
  172. border-radius: 15rpx;
  173. background-color: #E6E6E6;
  174. }
  175. }
  176. }
  177. }
  178. </style>