学员端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
2.1 KiB

1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="step3">
  3. <view class="card">
  4. <view class="list">
  5. <view class="listItem" v-for="(item,index) in list" :key="index" :class="{active: carId==item.id}" @click="chooseCar(item)">
  6. <view class="num">{{item.carNumber}}号车</view>
  7. <view class="text">{{ item.licnum }}</view>
  8. </view>
  9. </view>
  10. </view>
  11. <view class="btn_row" style="margin-top: 108rpx;">
  12. <view class="border btn" @click="changeStep(1)">返回上一步</view>
  13. <view class="btn" @click="changeStep(3)">下一步</view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. props: ['list', 'carId'],
  20. data() {
  21. return {
  22. // list: [{
  23. // text: '00001',
  24. // id: 1
  25. // },
  26. // {
  27. // text: '00002',
  28. // id: 1
  29. // },
  30. // {
  31. // text: '00003',
  32. // id: 1
  33. // },
  34. // ],
  35. show: true
  36. }
  37. },
  38. methods: {
  39. changeStep(val) {
  40. if(val==3&&!this.carId) return this.$u.toast('请选择车辆')
  41. this.$emit('changeStep', val)
  42. },
  43. chooseCar(item) {
  44. this.$emit('chooseCar', item)
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. .card {
  51. padding: 28rpx 24rpx;
  52. }
  53. .list {
  54. display: flex;
  55. flex-wrap: wrap;
  56. display: flex;
  57. justify-content: space-between;
  58. .listItem {
  59. width: 32.4%;
  60. height: 120rpx;
  61. background: #F8F8F8;
  62. border-radius: 12rpx;
  63. font-weight: 500;
  64. text-align: center;
  65. font-size: 24rpx;
  66. display: flex;
  67. flex-direction: column;
  68. align-items: center;
  69. justify-content: center;
  70. .num {
  71. font-size: 28rpx;
  72. font-weight: 600;
  73. margin-bottom: 10rpx;
  74. }
  75. &.active {
  76. width: 200rpx;
  77. height: 120rpx;
  78. background: rgba(25, 137, 250, 0.1);
  79. border-radius: 12rpx;
  80. border: 2rpx solid $themC;
  81. color: $themC;
  82. }
  83. }
  84. }
  85. .btn_row {
  86. display: flex;
  87. justify-content: space-between;
  88. .btn {
  89. width: 47%;
  90. height: 72rpx;
  91. background: #1989FA;
  92. border-radius: 8rpx;
  93. font-size: 28rpx;
  94. color: #fff;
  95. text-align: center;
  96. line-height: 72rpx;
  97. &.border {
  98. background: rgba(25, 137, 250, 0.1);
  99. border: 2rpx solid $themC;
  100. color: $themC;
  101. }
  102. }
  103. }
  104. </style>