OrderVehicleItem.vue
3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<template>
<view class="recharge-info" v-if="order">
<van-image class="car-image" use-error-slot width="120" fit="cover" radius="16rpx"
height="90" :src="vehicle.cover?.url">
</van-image>
<view class="recharge-details">
<view class="car-title">【{{ cityName }}】{{ vehicle.baseInfo.carSeriesName }} {{ vehicle.baseInfo.carTypeName }}</view>
<view class="car-specs">{{ productionYear }}年 | {{ mileage }}万公里 | 国{{ vehicle.coreSpecs.emissionStandard }}</view>
<view class="car-tags">
<text class="tag" v-for="(feature, featureIndex) in vehicle.baseInfo?.tags">{{ feature }}</text>
</view>
<view class="car-favorite">
<view class="location">
<uni-icons type="location" size="12" color="#185EFE"></uni-icons>
{{ vehicle.ownership.carProvinceName }} {{ vehicle.ownership.carCityName }}
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
import {Component, Prop, Vue} from 'vue-facing-decorator';
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder";
import dayjs from "dayjs";
import {Vehicle} from "lib/src/entity/vehicle/entity/Vehicle";
@Component({})
export default class OrderVehicleItem extends Vue {
@Prop({type: Object, required: true})
order: AuctionOrder;
get vehicle() {
return this.order.vehicle;
}
get licensePlate(): string {
return this.vehicle.baseInfo?.licensePlate.substring(0, 2);
}
get cityName(): string {
if (this.vehicle.ownership.carCityName) {
return this.vehicle.ownership.carCityName.replace("市", "");
}
return this.vehicle.ownership.carCityName;
}
get productionYear(): number {
return dayjs(this.vehicle.coreSpecs.productionDate as string).year();
}
get mileage(): string {
return (this.vehicle.baseInfo.mileage / 10000).toFixed(2);
}
}
</script>
<style scoped lang="scss">
/* 车辆信息 */
.recharge-info {
background-color: #fff;
padding: 12px;
margin: 12px;
display: flex;
border-radius: 12px;
}
.car-image {
margin-right: 12px;
}
.recharge-details {
flex: 1;
}
.car-title {
font-size: 15px;
font-weight: 400;
color: #333;
margin-bottom: 4px;
line-height: 20px;
}
.car-specs {
font-size: 13px;
color: #666;
margin-bottom: 4px;
}
.car-tags {
margin-bottom: 8px;
}
.tag {
font-size: 10px;
color: rgba(153, 153, 153, 1);
background-color: #ffffff;
border: 0.5px solid rgba(230, 235, 245, 1);
padding: 2px 6px;
border-radius: 4px;
margin-right: 6px;
}
.car-favorite {
display: flex;
align-items: center;
}
.favorite-text {
font-size: 12px;
color: #ff976a;
margin-left: 4px;
}
.price {
font-size: 14px;
font-weight: 500;
color: #ff4d4f;
}
/* 中拍时间 */
.auction-time {
padding: 1px;
margin-bottom: 10px;
}
.time-label {
color: rgba(51, 51, 51, 1);
font-size: 15px;
font-weight: 400;
}
.time-value {
font-size: 15px;
color: #333;
}
.location {
border-radius: 2px;
background: rgba(24, 94, 254, 0.1);
font-size: 10px;
font-weight: 400;
line-height: 18px;
color: #185EFE;
text-align: left;
padding: 2px 6px;
}
</style>