洛阳学员端
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.

119 lines
2.2 KiB

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