carEvent.vue
2.89 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
<template>
<div class="pic-content scrollbar">
<el-row v-if="carAlarmData.length > 0">
<!-- 交通事件类 -->
<!-- 机动车事件 -->
<el-col :span="22" :offset="1" class="pic-box" v-for="(item, index) in carAlarmData" :key="index" v-if="item.event_cate !== 'flow'">
<el-col :span="12" v-if='item.task_algo_type!="1"'>
<el-card :body-style="{ padding: 0 }">
<div class="img-wrap" @click="showInfo(index)">
<b class="img-border"></b>
<div class="picbackground">
<img :src="item.pic" class="photos"/>
</div>
</div>
</el-card>
</el-col>
<el-col :span="11" :offset="1" v-if="item.event_type === 'vehicle' || item.event_type === 'xcycle'">
<ul class="pic-info">
<!-- <li :title="item.shoot_date">
<span>抓拍日期:</span>
<span>{{ item.shoot_date }}</span>
</li>
<li :title="item.shoot_time">
<span>抓拍时间:</span>
<span>{{ item.shoot_time }}</span>
</li>
<li :title="item.location_name">
<span>地点名称:</span>
<span>{{ item.location_name }}</span>
</li> -->
<li v-if="item.event_type === 'vehicle'" :title="item.vehicle_plate_text">
<span>车牌号码:</span>
<span>{{ item.vehicle_plate_text }}</span>
</li>
<!-- <li v-if="item.event_type === 'vehicle'" :title="item.vehicle_body_type_text">
<span>车辆类型:</span>
<span>{{ item.vehicle_body_type_text }}</span>
</li> -->
<li v-if="item.event_type === 'vehicle'" :title="item.vehicle_body_color_text">
<span>车身颜色:</span>
<span>{{ item.vehicle_body_color_text }}</span>
</li>
<li v-if="item.event_type === 'vehicle'" :title="item.vehicle_body_logo_text">
<span>车辆品牌:</span>
<span>{{ item.vehicle_body_logo_text }}</span>
</li>
<li v-if="item.event_type === 'vehicle'" :title="item.vehicle_RefinedFeature_text">
<span>标志物:</span>
<span>{{ item.RefinedFeature_text }}</span>
</li>
<li v-if="item.illegalType" :title="item.illegalType">
<span>违法类型:</span>
<span>{{ item.illegalType }}</span>
</li>
</ul>
</el-col>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data(){
return{
carAlarmData:[]
}
},
props:["itemData"],
methods:{
showInfo: function(index) {
this.curPicData = this.carAlarmData[index];
if(this.curPicData) {
this.$emit("showDitail",this.curPicData)
}
}
},
created() {
},
mounted() {
},
watch:{
itemData(val){
if(val == '') {
this.carAlarmData = [];
}
if(val.event_cate == "traffic" && val.event_type=="vehicle") {
if(this.carAlarmData.length > 20) {
this.carAlarmData.pop();
}
this.carAlarmData.unshift(val);
}
}
}
}
</script>
<style lang="stylus" scoped>
</style>