eventDetail.vue
9.49 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<template>
<div class="pic-detail">
<el-dialog
title="详情"
:visible.sync="isShow"
:before-close="beforeHideModal"
>
<el-row>
<el-col :span="24">
<div class="pic-wrap">
<el-image
style="width: 100%"
:src="curPicData.bigpic"
:preview-src-list="srcList"
>
<div slot="error" class="image-slot">
<img
:src="curPicData.bigpic"
alt=""
style="width: 30%; display: block; margin: 0 auto"
/>
</div>
</el-image>
<!-- <img v-if="curPicData.pics" :src="carImg" alt="暂无图片" slot="reference" class='pictures small' /> -->
<!-- <el-popover
placement="left-end"
width="305"
trigger="hover"
v-if="!curPicData.picsEmpty"
>
<div
:style="{
backgroundImage: 'url(' + curPicData.bigpic + ')',
backgroundRepeat: 'no-repeat'
}"
alt=""
id="big"
class="big"
></div>
<img
:src="curPicData.bigpic"
alt=""
slot="reference"
class="pictures small"
/>
</el-popover> -->
</div>
</el-col>
<!-- 交通 -->
<el-col
:span="24"
v-if="
curPicData.event_type === 'vehicle' ||
curPicData.event_type === 'xcycle' ||
curPicData.event_type === 'pedestrian'
"
>
<ul class="pic-info">
<div v-if="curPicData.event_type === 'vehicle'">
<li :title="curPicData.vehicle_body_type_text">
<span>车辆类型:</span>
<span>{{ curPicData.vehicle_body_type_text }}</span>
</li>
<li :title="curPicData.vehicle_plate_text">
<span>车牌号码:</span>
<span>{{ curPicData.vehicle_plate_text }}</span>
</li>
<li :title="curPicData.plate_type_text">
<span>车牌类型:</span>
<span>{{ curPicData.plate_type_text }}</span>
</li>
</div>
<li :title="curPicData.shoot_date">
<span>经过日期:</span>
<span>{{ curPicData.shoot_date }}</span>
</li>
<li :title="curPicData.shoot_time">
<span>经过时间:</span>
<span>{{ curPicData.shoot_time }}</span>
</li>
<li :title="curPicData.location_name">
<span>经过地点:</span>
<span>{{ curPicData.location_name }}</span>
</li>
<div v-if="curPicData.event_type === 'vehicle'">
<li :title="curPicData.vehicle_body_logo_text">
<span>车辆品牌:</span>
<span>{{ curPicData.vehicle_body_logo_text }}</span>
</li>
<!-- 机动车 -->
<li :title="curPicData.plate_color_text">
<span>车牌颜色:</span>
<span>{{ curPicData.plate_color_text }}</span>
</li>
<li :title="curPicData.vehicle_body_color_text">
<span>车身颜色:</span>
<span>{{ curPicData.vehicle_body_color_text }}</span>
</li>
<li hidden :title="curPicData.RefinedFeature_text">
<span>标志物:</span>
<span>{{ curPicData.RefinedFeature_text }}</span>
</li>
</div>
<!-- 非机动车 -->
<div v-if="curPicData.event_type === 'xcycle'">
<li :title="curPicData.xcycle_type_text">
<span>骑车类型:</span>
<span>{{ curPicData.xcycle_type_text }}</span>
</li>
<li :title="curPicData.xcycle_color_type">
<span>车辆颜色:</span>
<span>{{ curPicData.xcycle_color_type }}</span>
</li>
<li :title="curPicData.driver_face_sex">
<span>性别:</span>
<span>{{ curPicData.driver_face_sex }}</span>
</li>
<li :title="curPicData.company">
<span>运营公司:</span>
<span>{{ curPicData.company }}</span>
</li>
<li :title="curPicData.driver_face_upbody_text">
<span>上身颜色:</span>
<span>{{ curPicData.driver_face_upbody_text }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>速度:</span>
<span>{{ curPicData.location_speed }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>戴帽子:</span>
<span>{{ curPicData.driver_face_with_hats }}</span>
</li>
</div>
<!-- 行人 -->
<div v-if="curPicData.event_type === 'pedestrian'">
<li :title="curPicData.driver_face_sex">
<span>性别:</span>
<span>{{ curPicData.driver_face_sex }}</span>
</li>
<li :title="curPicData.driver_face_upbody_text">
<span>上身颜色:</span>
<span>{{ curPicData.driver_face_upbody_text }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>下身颜色:</span>
<span>{{ curPicData.driver_face_lobody_text }}</span>
</li>
<li :title="curPicData.pedestrian_height">
<span>身高:</span>
<span>{{ curPicData.pedestrian_height }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>速度:</span>
<span>{{ curPicData.location_speed }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>戴帽子:</span>
<span>{{ curPicData.driver_face_with_hats }}</span>
</li>
</div>
<li v-if="curPicData.illegalType" :title="curPicData.illegalType">
<span>违法类型:</span>
<span>{{ curPicData.illegalType }}</span>
</li>
<li v-if="curPicData.illegalType" :title="curPicData.illegalType">
<span>特殊车辆:</span>
<span>{{ curPicData.special_text }}</span>
</li>
</ul>
</el-col>
<el-col :span="24" v-if="curPicData.event_cate === 'behavior'">
<ul class="pic-info">
<li :title="curPicData.shoot_date">
<span>抓拍日期:</span>
<span>{{ curPicData.shoot_date }}</span>
</li>
<li :title="curPicData.shoot_time">
<span>抓拍时间:</span>
<span>{{ curPicData.shoot_time }}</span>
</li>
<li :title="getCode('安防事件', curPicData.event_type)">
<span>事件类型:</span>
<span>{{ curPicData.event_type }}</span>
</li>
<li
:title="curPicData.shoot_time"
v-if="curPicData.event_type == '21'"
>
<span>区域人数:</span>
<span>{{ curPicData.event_data.density.persons }}人</span>
</li>
</ul>
</el-col>
</el-row>
<span slot="footer">
<button
class="el-button el-button--default el-button--small"
@click="beforeHideModal"
>
关闭
</button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
carImg: "",
isShow: false,
curPicData: {},
srcList: [],
};
},
methods: {
detailInfo: function (data) {
this.curPicData = {};
this.curPicData = data;
this.srcList = [];
console.log('curPicData', this.curPicData);
setTimeout(() => {
if (data.bigpic) {
this.srcList.push(data.bigpic);
}
}, 0);
this.isShow = true;
this.$store.commit("setocxstate", 0);
},
beforeHideModal: function () {
this.isShow = false;
this.$emit("closeDetailModal");
},
picMove: function (e) {
var e = e || window.event;
if (e.target.getAttribute("class").indexOf("small") > -1) {
let imgWidth = e.target.width;
let imgHeight = e.target.height;
let x = 150 - (e.offsetX / imgWidth) * 1800;
let y = 100 - (e.offsetY / imgHeight) * 1200;
let bigimg = document.getElementById("big");
bigimg.style.backgroundPosition = x + "px " + y + "px";
} else {
return;
}
},
},
};
</script>
<style scoped>
.pictures {
width: 100%;
max-height: 528px;
cursor: zoom-in;
}
.pic-info {
margin-bottom: 0;
}
.pic-info li {
height: 30px;
line-height: 30px;
width: 33%;
float: left;
}
.pic-info li span {
float: left;
font-size: 14px;
color: #606266;
}
.pic-info li span:first-child {
padding-left: 3%;
margin-right: 10px;
width: 91px;
}
.pic-info li span:last-child {
width: 100px; /*40%*/
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.big {
width: 300px;
height: 200px;
background-size: 1800px 1200px;
}
.closebtn {
height: 30px;
line-height: 30px;
}
</style>