vehicleInfo.vue
3.62 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
<template>
<div v-loading="loading" style="border: 1px solid black;">
<el-row >
<el-col :span="6" class="bd">公司名称</el-col>
<el-col :span="6" class="bd">{{infoData.companyName}}</el-col>
<el-col :span="6" class="bd bd_left">所属区域</el-col>
<el-col :span="6" class="bd">{{infoData.areaName}}</el-col>
</el-row>
<el-row >
<el-col :span="6" class="bd">车辆类型</el-col>
<el-col :span="6" class="bd">{{infoData.energyTypeName}}</el-col>
<el-col :span="6" class="bd bd_left">车牌号码</el-col>
<el-col :span="6" class="bd">{{infoData.licenseplateNo}}</el-col>
</el-row>
<el-row >
<el-col :span="6" class="bd">车辆品牌</el-col>
<el-col :span="6" class="bd">{{infoData.brandName}}</el-col>
<el-col :span="6" class="bd bd_left">注册日期</el-col>
<el-col :span="6" class="bd">{{infoData.registerAt}}</el-col>
</el-row>
<el-row >
<el-col :span="6" class="bd">道路运输证有效期</el-col>
<el-col :span="6" class="bd">{{infoData.transportCertValid}}</el-col>
<el-col :span="6" class="bd bd_left">行驶证有效期</el-col>
<el-col :span="6" class="bd">{{infoData.licenseValid}}</el-col>
</el-row>
<el-row >
<el-col :span="6" class="bd">货箱体积</el-col>
<el-col :span="6" class="bd">{{infoData.containerVolume}}</el-col>
<el-col :span="6" class="bd bd_left">车牌颜色</el-col>
<el-col :span="6" class="bd">{{infoData.licenseplateColorName}}</el-col>
</el-row>
<el-row >
<el-col :span="6" class="bd">车辆颜色</el-col>
<el-col :span="6" class="bd">{{infoData.vehicleColorName}}</el-col>
<el-col :span="6" class="bd bd_left">排放标准</el-col>
<el-col :span="6" class="bd">{{infoData.emissionStan}}</el-col>
</el-row>
<el-row >
<el-col :span="6" class="bd">车辆标识牌</el-col>
<el-col :span="6" class="bd">{{infoData.abbreviation}}</el-col>
<el-col :span="6" class="bd bd_left">车架号</el-col>
<el-col :span="6" class="bd">{{infoData.frmaeNo}}</el-col>
</el-row>
<el-row >
<el-col :span="6" class="bd">关联驾驶员</el-col>
<el-col :span="6" class="bd">{{infoData.driverName}}</el-col>
<el-col :span="6" class="bd bd_left">备注</el-col>
<el-col :span="6" class="bd">{{infoData.comment}}</el-col>
</el-row>
<a v-for="item in infoData.attachmentList" @click="downloadFile(item.attachmentPath);">{{item.name}}</a>
</div>
</template>
<script>
import store from "@/store";
import {
getToken
} from "@/utils/auth";
import {
getTruckInfo,
getArea
} from "@/api/dict";
export default {
name: "truckInfo",
props: {
businessKey: {
type: String
},
},
data() {
return {
areas: [],
loading: null,
infoData: {},
}
},
created() {
this.loading = true;
this.getInfo();
},
methods: {
getInfo() {
let id;
if (this.businessKey.split(":").length == 2) {
id = this.businessKey.split(":")[1];
} else {
id = this.businessKey;
}
getTruckInfo(id).then(response => {
this.infoData = response.result;
this.loading = false;
});
},
downloadFile(path){
window.location.href = "/remotedown/" + path;
}
}
}
</script>
<style>
.bd{
padding:5px;
}
</style>