|
@@ -6,7 +6,7 @@
|
|
|
</el-breadcrumb>
|
|
</el-breadcrumb>
|
|
|
<div class="opt-box">
|
|
<div class="opt-box">
|
|
|
<div>
|
|
<div>
|
|
|
- <el-button type="primary" size="mini" @click="getImageList()">刷新</el-button>
|
|
|
|
|
|
|
+ <!-- <el-button type="primary" size="mini" @click="getImageList()">刷新</el-button> -->
|
|
|
<template v-if="userType == 1">
|
|
<template v-if="userType == 1">
|
|
|
<!-- <el-button type="primary" size="mini" @click="delPhoto()"
|
|
<!-- <el-button type="primary" size="mini" @click="delPhoto()"
|
|
|
>批量删除</el-button
|
|
>批量删除</el-button
|
|
@@ -26,7 +26,7 @@
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="photo-list-content">
|
|
<div class="photo-list-content">
|
|
|
- <viewer :images="images" class="images clearfix">
|
|
|
|
|
|
|
+ <viewer v-if="images.length > 0" :images="images" class="images clearfix">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-row :gutter="10" class="photo-list-box">
|
|
<el-row :gutter="10" class="photo-list-box">
|
|
|
<el-col
|
|
<el-col
|
|
@@ -80,14 +80,14 @@ export default {
|
|
|
end: '',
|
|
end: '',
|
|
|
pageSize: 8,
|
|
pageSize: 8,
|
|
|
// 分页
|
|
// 分页
|
|
|
- total: null,
|
|
|
|
|
|
|
+ total: 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
userType: function () {
|
|
userType: function () {
|
|
|
// 获取用户类型
|
|
// 获取用户类型
|
|
|
return window.sessionStorage.getItem('myuser_type')
|
|
return window.sessionStorage.getItem('myuser_type')
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.getImageList()
|
|
this.getImageList()
|
|
@@ -113,8 +113,8 @@ export default {
|
|
|
page: this.page,
|
|
page: this.page,
|
|
|
page_size: 8,
|
|
page_size: 8,
|
|
|
start_time: this.begin,
|
|
start_time: this.begin,
|
|
|
- end_time: this.end,
|
|
|
|
|
- }),
|
|
|
|
|
|
|
+ end_time: this.end
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.data.data !== null) {
|
|
if (res.data.data !== null) {
|
|
@@ -150,24 +150,24 @@ export default {
|
|
|
this.$confirm('此操作将删除该图片, 是否继续?', '提示', {
|
|
this.$confirm('此操作将删除该图片, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
|
|
|
|
+ type: 'warning'
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
var ad = JSON.stringify(arr)
|
|
var ad = JSON.stringify(arr)
|
|
|
ad = ad.replace('[', '')
|
|
ad = ad.replace('[', '')
|
|
|
ad = ad.replace(']', '')
|
|
ad = ad.replace(']', '')
|
|
|
let postData = this.qs.stringify({
|
|
let postData = this.qs.stringify({
|
|
|
- photo_id_list: ad,
|
|
|
|
|
|
|
+ photo_id_list: ad
|
|
|
})
|
|
})
|
|
|
this.$axios({
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
url: '/api/api_gateway?method=camera.camera_manage.del_camera_photo',
|
|
url: '/api/api_gateway?method=camera.camera_manage.del_camera_photo',
|
|
|
- data: postData,
|
|
|
|
|
|
|
+ data: postData
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
- message: '删除成功!',
|
|
|
|
|
|
|
+ message: '删除成功!'
|
|
|
})
|
|
})
|
|
|
this.images = []
|
|
this.images = []
|
|
|
this.getImageList()
|
|
this.getImageList()
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
// console.log(err);
|
|
// console.log(err);
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'info',
|
|
type: 'info',
|
|
|
- message: '已取消删除',
|
|
|
|
|
|
|
+ message: '已取消删除'
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
@@ -191,8 +191,8 @@ export default {
|
|
|
handleSizeChange(val) {
|
|
handleSizeChange(val) {
|
|
|
this.pageSize = val
|
|
this.pageSize = val
|
|
|
this.getImageList()
|
|
this.getImageList()
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|