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
114 lines
2.1 KiB
<template>
|
|
<view class="step3">
|
|
<view class="card">
|
|
<view class="list">
|
|
<view class="listItem" v-for="(item,index) in list" :key="index" :class="{active: carId==item.id}" @click="chooseCar(item)">
|
|
<view class="num">{{item.carNumber}}号车</view>
|
|
<view class="text">{{ item.licnum }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="btn_row" style="margin-top: 108rpx;">
|
|
<view class="border btn" @click="changeStep(1)">返回上一步</view>
|
|
<view class="btn" @click="changeStep(3)">下一步</view>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: ['list', 'carId'],
|
|
data() {
|
|
return {
|
|
// list: [{
|
|
// text: '00001',
|
|
// id: 1
|
|
// },
|
|
// {
|
|
// text: '00002',
|
|
// id: 1
|
|
// },
|
|
// {
|
|
// text: '00003',
|
|
// id: 1
|
|
// },
|
|
// ],
|
|
show: true
|
|
}
|
|
},
|
|
methods: {
|
|
changeStep(val) {
|
|
if(val==3&&!this.carId) return this.$u.toast('请选择车辆')
|
|
this.$emit('changeStep', val)
|
|
},
|
|
chooseCar(item) {
|
|
this.$emit('chooseCar', item)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.card {
|
|
padding: 28rpx 24rpx;
|
|
}
|
|
|
|
.list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
|
|
.listItem {
|
|
width: 32.4%;
|
|
height: 120rpx;
|
|
background: #F8F8F8;
|
|
border-radius: 12rpx;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
font-size: 24rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
.num {
|
|
font-size: 28rpx;
|
|
font-weight: 600;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
&.active {
|
|
width: 200rpx;
|
|
height: 120rpx;
|
|
background: rgba(25, 137, 250, 0.1);
|
|
border-radius: 12rpx;
|
|
border: 2rpx solid $themC;
|
|
color: $themC;
|
|
}
|
|
}
|
|
}
|
|
|
|
.btn_row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
|
|
.btn {
|
|
width: 47%;
|
|
height: 72rpx;
|
|
background: #1989FA;
|
|
border-radius: 8rpx;
|
|
font-size: 28rpx;
|
|
color: #fff;
|
|
text-align: center;
|
|
line-height: 72rpx;
|
|
|
|
&.border {
|
|
background: rgba(25, 137, 250, 0.1);
|
|
border: 2rpx solid $themC;
|
|
color: $themC;
|
|
}
|
|
}
|
|
}
|
|
|
|
</style>
|