clusterdetail.vue
3.72 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
<!--伴随人员-->
<template>
<div>
<el-dialog title="聚类详情" :visible.sync="dialogVisible" size="small" :before-close="handleClose" class="tabledialong">
<div class="detail-aline mt20"></div>
<el-row >
<div class="dialongtable">
<el-table v-loading.body="loading" :data="tableData" boder style="width: 100%" >
<el-table-column type="index" label="编号" width="100">
</el-table-column>
<el-table-column prop="camera.name" label="相机名称" width="220">
</el-table-column>
<el-table-column label="抓拍时间">
<template slots-scope="scope">
{{showLocalTime(scope.row.event_dt)}}
</template>
</el-table-column>
<el-table-column label="图片" style="height:60px">
<template slots-scope="scope" class="accomimg-box">
<img :src="scope.row.pic_url" class="accomimg"/>
</template>
</el-table-column>
<el-table-column label="操作">
<template slots-scope="scope">
<el-button class="" type="danger" icon="delete" size="small" @click="clusDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-row>
<el-row>
<div class="block">
<el-pagination class="flr mt10" @current-change="handleCurrentChange" :current-page.sync="page.currentPage" :page-size="page.limit" layout="total,prev, pager, next, jumper" :total="page.total">
</el-pagination>
</div>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="handleClose">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
loading: true,
page: {
offset: 0,
currentPage: 1,
limit: 5,
total: 0
},
tableData: []
};
},
computed: {},
methods: {
handleClose() {
this.$emit("closedialog", false);
},
clusDelete(index, row) {
var Vthis = this;
this.axios
.delete(FACEWEB + "/face_events/" + row.unid)
.then(function(response) {
Vthis.$message({
type: "success",
message: "删除成功!"
});
Vthis.showAccompany();
});
},
handleCurrentChange(val) {
this.page.currentPage = val;
this.page.offset = (val - 1) * this.page.limit;
this.showAccompany();
},
showAccompany(accunid) {
var Vthis = this;
Vthis.loading = true;
this.axios
.get(FACEWEB + "/faces/" + this.eventdata.face.unid + "/face_events", {
params: {
limit: Vthis.page.limit,
offset: Vthis.page.offset
}
})
.then(function(response) {
Vthis.tableData = response.data.list_data;
Vthis.page.total = response.data.total_num;
Vthis.loading = false;
});
}
},
props: {
eventdata: {},
dialogVisible: {},
faceunid: {}
},
created() {},
watch: {
faceunid() {
this.page.offset = 0;
this.page.currentPage = 1;
this.showAccompany();
}
}
};
</script>
<style lang="stylus" scoped>
.accomimg {
height: 60px;
border-radius:5px;
}
</style>