carDetailCarInout.vue
4.86 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
<template>
<div>
<div class="margin-top">
<el-table :data="carDetailCarInoutInfo.carIns" border style="width: 100%">
<el-table-column :label="$t('carDetailCarInout.entryImage')" align="center">
<template slot-scope="scope">
<el-image style="width: 60px; height: 60px;" :src="scope.row.photoJpg || '/img/noPhoto.jpg'"
:preview-src-list="[scope.row.photoJpg]" fit="cover" class="border-radius">
</el-image>
</template>
</el-table-column>
<el-table-column prop="inoutId" :label="$t('carDetailCarInout.inoutId')" align="center"></el-table-column>
<el-table-column :label="$t('carDetailCarInout.carStatus')" align="center">
<template slot-scope="scope">
{{ scope.row.carInout === '3306' ? $t('carDetailCarInout.entry') :
$t('carDetailCarInout.exit')}}({{ scope.row.stateName }})
</template>
</el-table-column>
<el-table-column prop="carNum" :label="$t('carDetailCarInout.carNum')" align="center"></el-table-column>
<el-table-column prop="paNum" :label="$t('carDetailCarInout.parkingLot')" align="center"></el-table-column>
<el-table-column :label="$t('carDetailCarInout.billingRule')" align="center">
<template slot-scope="scope">
<el-link type="primary" @click="_viewTempFeeConfigInOutCar(scope.row.configId)">
{{ scope.row.feeName }} <i class="el-icon-info"></i>
</el-link>
</template>
</el-table-column>
<el-table-column prop="carTypeName" :label="$t('carDetailCarInout.carType')" align="center"></el-table-column>
<el-table-column prop="inTime" :label="$t('carDetailCarInout.entryTime')" align="center"></el-table-column>
<el-table-column :label="$t('carDetailCarInout.exitTime')" align="center">
<template slot-scope="scope">
{{ scope.row.carInout !== '3307' ? '-' : scope.row.outTime }}
</template>
</el-table-column>
<el-table-column :label="$t('carDetailCarInout.parkingTime')" align="center">
<template slot-scope="scope">
{{ scope.row.hours }}{{ $t('carDetailCarInout.hour') }}{{ scope.row.min }}{{ $t('carDetailCarInout.minute') }}
</template>
</el-table-column>
<el-table-column :label="$t('carDetailCarInout.chargeAmount')" align="center">
<template slot-scope="scope">
{{ scope.row.carType !== 'T' ? '-' : scope.row.payCharge }}
</template>
</el-table-column>
<el-table-column prop="remark" :label="$t('carDetailCarInout.remark')" align="center"></el-table-column>
</el-table>
<el-row>
<el-col :span="16" :offset="8">
<el-pagination @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize"
layout="total, prev, pager, next, jumper" :total="total">
</el-pagination>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import { getCarInoutDetail } from '@/api/car/carDetailCarInoutApi'
import { getCommunityId } from '@/api/community/communityApi'
export default {
name: 'CarDetailCarInout',
data() {
return {
carDetailCarInoutInfo: {
carIns: [],
carId: '',
memberId: '',
carNum: '',
areaNum: ''
},
currentPage: 1,
pageSize: 10,
total: 0
}
},
methods: {
open(data) {
this.carDetailCarInoutInfo.carId = data.carId
this.carDetailCarInoutInfo.carNum = data.carNum
this.carDetailCarInoutInfo.areaNum = data.areaNum
this.carDetailCarInoutInfo.memberId = data.memberId
this._loadCarDetailCarInoutData(this.currentPage, this.pageSize)
},
switch(data) {
this.carDetailCarInoutInfo.carId = data.carId
this.carDetailCarInoutInfo.carNum = data.carNum
this.carDetailCarInoutInfo.areaNum = data.areaNum
this.carDetailCarInoutInfo.memberId = data.memberId
this._loadCarDetailCarInoutData(this.currentPage, this.pageSize)
},
_loadCarDetailCarInoutData(page, row) {
const params = {
communityId: getCommunityId(),
carNum: this.carDetailCarInoutInfo.carNum,
paNum: this.carDetailCarInoutInfo.areaNum,
iotApiCode: 'listCarInoutDetailBmoImpl',
page,
row
}
getCarInoutDetail(params).then(response => {
this.carDetailCarInoutInfo.carIns = response.data
this.total = response.total
}).catch(error => {
console.error('请求失败:', error)
})
},
handleCurrentChange(val) {
this.currentPage = val
this._loadCarDetailCarInoutData(val, this.pageSize)
},
_viewTempFeeConfigInOutCar(configId) {
// 查看计费规则详情
console.log(configId)
},
_carInoutOpenFile(fileUrl) {
// 打开文件预览
window.open(fileUrl)
}
}
}
</script>