|
|
@ -20,8 +20,12 @@ |
|
|
|
<el-table-column type="index" label="序号" width="100" align="center" /> |
|
|
|
<el-table-column prop="storeroomName" label="所属区域" align="center" min-width="150" /> |
|
|
|
<el-table-column prop="deviceName" label="设备" align="center" min-width="150" /> |
|
|
|
<el-table-column prop="camerName" label="摄像头" align="center" min-width="180" /> |
|
|
|
<el-table-column prop="timeSize" label="录像保存时长" align="center" min-width="180" /> |
|
|
|
<el-table-column prop="cameraName" label="摄像头" align="center" min-width="180" /> |
|
|
|
<el-table-column prop="timeSize" label="录像保存时长" align="center" min-width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>时间触发前后{{ scope.row.timeSize }}秒</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="create_time" label="操作时间" align="center" min-width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.create_time | parseTime }}</div> |
|
|
@ -33,11 +37,11 @@ |
|
|
|
<Details ref="DetailsDom" /> |
|
|
|
<BindCamera ref="bindDom" /> |
|
|
|
<!-- 删除 --> |
|
|
|
<el-dialog :visible.sync="delVisible" title="提示"> |
|
|
|
<el-dialog :visible.sync="delVisible" title="删除绑定"> |
|
|
|
<span class="dialog-right-top" /> |
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
<div class="setting-dialog"> |
|
|
|
<p class="delMsg">确定删除所选消息吗?</p> |
|
|
|
<p class="delMsg">确定要删除当前已绑定的设备吗?</p> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="handleDelConfirm">确定</el-button> |
|
|
|
</div> |
|
|
@ -53,7 +57,8 @@ import DateRangePicker from '@/components/DateRangePicker' |
|
|
|
import pagination from '@crud/Pagination' |
|
|
|
import Details from '../module/details.vue' |
|
|
|
import BindCamera from '../module/bindCamera.vue' |
|
|
|
import data1 from '../module/data1' |
|
|
|
import { cameraDelete } from '@/api/storeManage/listenManage' |
|
|
|
|
|
|
|
// import qs from 'qs' |
|
|
|
export default { |
|
|
|
name: 'ListenConfig', |
|
|
@ -62,13 +67,13 @@ export default { |
|
|
|
cruds() { |
|
|
|
return CRUD({ |
|
|
|
url: 'api/camera/list', |
|
|
|
sort: ['createTime,desc'] |
|
|
|
sort: ['createTime,desc'], |
|
|
|
optShow: {} |
|
|
|
}) |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
delVisible: false, |
|
|
|
tableData: [], |
|
|
|
selections: [], |
|
|
|
keyWord: '', |
|
|
|
timeType: '', |
|
|
@ -86,9 +91,6 @@ export default { |
|
|
|
queryTime: null |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.tableData = data1.rows |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取数据前的处理 |
|
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
@ -107,7 +109,19 @@ export default { |
|
|
|
}, |
|
|
|
// 删除 |
|
|
|
handleDelConfirm() { |
|
|
|
this.handleDelConfirm = false |
|
|
|
const params = this.selections.map(item => item.id) |
|
|
|
cameraDelete(params).then(res => { |
|
|
|
if (res === 'SUCCESS') { |
|
|
|
this.$message({ |
|
|
|
message: '删除成功', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
this.delVisible = false |
|
|
|
this.crud.refresh() |
|
|
|
} else { |
|
|
|
this.$message.error('删除失败') |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
clickRowHandler(row) { |
|
|
|
this.$refs.table.toggleRowSelection(row) // 单击选中 |
|
|
|