eventDetail.vue
11.2 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
<template>
<div class="pic-detail">
<el-dialog title="详情" :visible.sync="isShow" :before-close='beforeHideModal'>
<el-row>
<el-col :span="16">
<div @mousemove='picMove' class="pic-wrap">
<img v-if="curPicData.picsEmpty" :src="carImg" alt="暂无图片" title="暂无图片" slot="reference" class='pictures small' />
<!-- <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.pic+')',backgroundRepeat:'no-repeat'}" alt="" id="big" class='big'></div>
<img :src="curPicData.pic" alt="" slot="reference" class='pictures small' />
</el-popover>
</div>
</el-col>
<!-- 交通 -->
<el-col :span="8" v-if="curPicData.event_type === 'vehicle' || curPicData.event_type === 'xcycle'|| curPicData.event_type === 'pedestrian'">
<ul class="pic-info">
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.vehicle_body_type_text">
<span>车辆类型:</span>
<span>{{ curPicData.vehicle_body_type_text }}</span>
</li>
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.vehicle_plate_text">
<span>车牌号码:</span>
<span>{{ curPicData.vehicle_plate_text }}</span>
</li>
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.plate_type_text">
<span>车牌类型:</span>
<span>{{ curPicData.plate_type_text }}</span>
</li>
<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>
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.vehicle_body_logo_text">
<span>车辆品牌:</span>
<span>{{ curPicData.vehicle_body_logo_text }}</span>
</li>
<!-- <li :title="curPicData.vehicle_body_type_text">
<span>车辆类型:</span>
<span>{{ curPicData.vehicle_body_type_text }}</span>
</li> -->
<!-- 机动车 -->
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.plate_color_text">
<span>车牌颜色:</span>
<span>{{ curPicData.plate_color_text }}</span>
</li>
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.vehicle_body_color_text">
<span>车身颜色:</span>
<span>{{ curPicData.vehicle_body_color_text }}</span>
</li>
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.RefinedFeature_text">
<span>标志物:</span>
<span>{{ curPicData.RefinedFeature_text }}</span>
</li>
<!-- 非机动车 -->
<li v-if="curPicData.event_type === 'xcycle'" :title="curPicData.xcycle_type_text">
<span>骑车类型:</span>
<span>{{ curPicData.xcycle_type_text }}</span>
</li>
<li v-if="curPicData.event_type === 'xcycle'" :title="curPicData.xcycle_color_type">
<span>车辆颜色:</span>
<span>{{ curPicData.xcycle_color_type }}</span>
</li>
<li :title="curPicData.driver_face_sex" v-if="curPicData.event_type === 'xcycle'">
<span>性别:</span>
<span>{{ curPicData.driver_face_sex }}</span>
</li>
<li v-if="curPicData.event_type === 'xcycle'" :title="curPicData.company">
<span>运营公司:</span>
<span>{{ curPicData.company }}</span>
</li>
<li v-if="curPicData.event_type === 'xcycle'" :title="curPicData.driver_face_upbody_text">
<span>上身颜色:</span>
<span>{{ curPicData.driver_face_upbody_text }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'xcycle'">
<span>速度:</span>
<span>{{ curPicData.location_speed }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'xcycle'">
<span>戴帽子:</span>
<span>{{ curPicData.driver_face_with_hats }}</span>
</li>
<!-- 行人 -->
<li :title="curPicData.driver_face_sex" v-if="curPicData.event_type === 'pedestrian'">
<span>性别:</span>
<span>{{ curPicData.driver_face_sex }}</span>
</li>
<li :title="curPicData.driver_face_upbody_text" v-if="curPicData.event_type === 'pedestrian'">
<span>上身颜色:</span>
<span>{{ curPicData.driver_face_upbody_text }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'pedestrian'">
<span>下身颜色:</span>
<span>{{ curPicData.driver_face_lobody_text }}</span>
</li>
<li :title="curPicData.pedestrian_height" v-if="curPicData.event_type === 'pedestrian'">
<span>身高:</span>
<span>{{ curPicData.pedestrian_height }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'pedestrian'">
<span>速度:</span>
<span>{{ curPicData.location_speed }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'pedestrian'">
<span>戴帽子:</span>
<span>{{ curPicData.driver_face_with_hats }}</span>
</li>
<li v-if="curPicData.illegalType" :title="curPicData.illegalType">
<span>违法类型:</span>
<span>{{ curPicData.illegalType }}</span>
</li>
</ul>
</el-col>
<el-col :span="8" 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>{{ getCode('安防事件',String(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="closebtn" @click="beforeHideModal" style='width: 10%;'>关闭</button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
carImg: '',
isShow: false,
curPicData:{}
}
},
methods: {
detailInfo: function (data) {
this.curPicData = {};
this.curPicData = data;
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;
height: 500px;
}
.pic-info {
margin-bottom: 0;
}
.pic-info li {
text-align: left;
font-size: 18px;
height: 48px;
line-height: 48px;
width: 100%;
overflow: hidden;
min-width: 235px;
}
.pic-info li span {
float: left;
}
.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>