学员端小程序
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.

114 lines
2.1 KiB

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