Browse Source

监控管理 监控配置

master
x_ying 2 years ago
parent
commit
5aef578044
  1. 10
      src/api/storeManage/listenManage/index.js
  2. 36
      src/views/storeManage/listenManage/listenConfig/index.vue
  3. 4
      src/views/storeManage/listenManage/module/bindCamera.vue
  4. 5
      src/views/storeManage/listenManage/videoListen/index.vue

10
src/api/storeManage/listenManage/index.js

@ -24,4 +24,12 @@ export function cameraDownload(params) {
})
}
export default { bind, getDevice, cameraDownload }
export function cameraDelete(data) {
return request({
url: 'api/camera/delete',
method: 'delete',
data
})
}
export default { bind, getDevice, cameraDownload, cameraDelete }

36
src/views/storeManage/listenManage/listenConfig/index.vue

@ -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) //

4
src/views/storeManage/listenManage/module/bindCamera.vue

@ -39,7 +39,10 @@
<script>
import { bind, getDevice } from '@/api/storeManage/listenManage'
import { getDeviceList } from '@/api/storeManage/deviceManage/device'
import { crud } from '@crud/crud'
export default {
mixins: [crud()],
data() {
return {
tableData: [],
@ -74,6 +77,7 @@ export default {
const data = this.selections.map(x => { return { deviceInfoId: this.devType, storeroomName: storeroomName, deviceName: deviceName, cameraId: x.id, timeSize: this.timeType } })
bind(data).then((devices) => {
this.bindVisible = false
this.crud.refresh()
})
}
},

5
src/views/storeManage/listenManage/videoListen/index.vue

@ -48,7 +48,6 @@ import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud, header } from '@crud/crud'
import DateRangePicker from '@/components/DateRangePicker'
import pagination from '@crud/Pagination'
import data1 from '../module/data1'
import { cameraDownload } from '@/api/storeManage/listenManage'
import { parseTime, downloadFile } from '@/utils/index'
@ -65,7 +64,6 @@ export default {
},
data() {
return {
tableData: [],
optionVal: '全部',
options: [
{ value: '全部', label: '全部' },
@ -76,9 +74,6 @@ export default {
queryTime: null
}
},
created() {
this.tableData = data1.rows
},
methods: {
// cell({ row, columnIndex }) {
// if (row.isdload === true && columnIndex === 1) {

Loading…
Cancel
Save