|
@ -34,20 +34,12 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="downloadLink" label="操作" align="center" min-width="100"> |
|
|
<el-table-column prop="downloadLink" label="操作" align="center" min-width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button v-if="scope.row.downloadLink" size="mini" style="background:#3A99FD;border:none" @click="handleListen(scope.row.downloadLink)">查看监控</el-button> |
|
|
|
|
|
<el-button v-if="!scope.row.downloadLink" size="mini" style="background:#FD8042;border:none" @click="handleListen(scope.row.downloadLink)">重新下载</el-button> |
|
|
|
|
|
|
|
|
<el-button v-if="scope.row.downloadLink" size="mini" style="background:#3A99FD;border:none" @click="handleListen(scope.row)">查看监控</el-button> |
|
|
|
|
|
<el-button v-if="!scope.row.downloadLink" size="mini" style="background:#FD8042;border:none" @click="handleListen(scope.row)">重新下载</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<pagination /> |
|
|
<pagination /> |
|
|
<!-- 查看监控 --> |
|
|
|
|
|
<el-dialog append-to-body :close-on-click-modal="false" :visible.sync="lookVisible" title="查看监控"> |
|
|
|
|
|
<span class="dialog-right-top" /> |
|
|
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
|
|
<div class="setting-dialog"> |
|
|
|
|
|
<!-- --> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -58,6 +50,8 @@ import DateRangePicker from '@/components/DateRangePicker' |
|
|
import pagination from '@crud/Pagination' |
|
|
import pagination from '@crud/Pagination' |
|
|
import data1 from '../module/data1' |
|
|
import data1 from '../module/data1' |
|
|
import { cameraDownload } from '@/api/storeManage/listenManage' |
|
|
import { cameraDownload } from '@/api/storeManage/listenManage' |
|
|
|
|
|
import { parseTime, downloadFile } from '@/utils/index' |
|
|
|
|
|
|
|
|
// import qs from 'qs' |
|
|
// import qs from 'qs' |
|
|
export default { |
|
|
export default { |
|
|
name: 'VideoListen', |
|
|
name: 'VideoListen', |
|
@ -72,7 +66,6 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
lookVisible: false, |
|
|
|
|
|
optionVal: '全部', |
|
|
optionVal: '全部', |
|
|
options: [ |
|
|
options: [ |
|
|
{ value: '全部', label: '全部' }, |
|
|
{ value: '全部', label: '全部' }, |
|
@ -94,8 +87,8 @@ export default { |
|
|
// return 'text-red' |
|
|
// return 'text-red' |
|
|
// } |
|
|
// } |
|
|
// }, |
|
|
// }, |
|
|
|
|
|
parseTime, downloadFile, |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
// this.crud.downloadLoading = true |
|
|
|
|
|
this.crud.query.event = null |
|
|
this.crud.query.event = null |
|
|
this.crud.query.createTime = null |
|
|
this.crud.query.createTime = null |
|
|
if (this.optionVal === '全部') { |
|
|
if (this.optionVal === '全部') { |
|
@ -103,7 +96,6 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
this.crud.query.event = this.optionVal |
|
|
this.crud.query.event = this.optionVal |
|
|
} |
|
|
} |
|
|
// this.crud.query.blurry = this.keyWord |
|
|
|
|
|
if (this.queryTime) { |
|
|
if (this.queryTime) { |
|
|
this.crud.query.createTime = this.queryTime |
|
|
this.crud.query.createTime = this.queryTime |
|
|
} else { |
|
|
} else { |
|
@ -112,13 +104,15 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 查看监控 |
|
|
// 查看监控 |
|
|
handleListen(row) { |
|
|
handleListen(row) { |
|
|
// this.lookVisible = true |
|
|
|
|
|
console.log(row) |
|
|
console.log(row) |
|
|
const params = { |
|
|
const params = { |
|
|
'fileName': '1662714646.ts' |
|
|
|
|
|
|
|
|
'fileName': row.downloadLink |
|
|
} |
|
|
} |
|
|
cameraDownload(params).then(res => { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
|
|
|
const name = row.deviceCamerBindId.storeroomName + row.deviceCamerBindId.deviceName + '监控' |
|
|
|
|
|
cameraDownload(params).then(result => { |
|
|
|
|
|
this.downloadFile(result, name, 'ts') |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$message.error('下载失败,请检查好网络后重新下载') |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|