市局基础设施只要图片预览

This commit is contained in:
wuhongjian 2022-08-24 13:53:45 +08:00
parent d1a50bc25a
commit 894db08c4e
1 changed files with 51 additions and 1 deletions

View File

@ -438,7 +438,12 @@
</div> </div>
<i class="boundary"></i> <i class="boundary"></i>
<!-- 批量预览 --> <!-- 批量预览 -->
<a-button type="primary" @click="batchPreview" class="buttonAdd"> <a-button
type="primary"
@click="batchPreview"
class="buttonAdd"
v-show="isXiHaiAn"
>
批量预览 批量预览
</a-button> </a-button>
<!-- 添加至申购车 --> <!-- 添加至申购车 -->
@ -474,6 +479,7 @@
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'operation'"> <template v-if="column.dataIndex === 'operation'">
<a <a
v-if="isXiHaiAn"
@click=" @click="
openVideo( openVideo(
record.channelCode || record.channelCode ||
@ -484,6 +490,18 @@
> >
预览 预览
</a> </a>
<a
v-else
@click="
openPicture(
record.channelCode ||
record.channelId ||
record.channelCode.channelId
)
"
>
预览
</a>
</template> </template>
</template> </template>
</a-table> </a-table>
@ -532,6 +550,19 @@
</div> </div>
</div> </div>
</a-modal> </a-modal>
<!-- 图片预览 -->
<a-modal
wrapClassName="single-preview-modal"
v-model:visible="picVisible"
title="图片预览"
:width="960"
destroyOnClose
>
<template #footer></template>
<div style="width: 100%; display: flex; justify-content: center">
<a-image :src="options.src" />
</div>
</a-modal>
<!-- 批量预览弹窗 --> <!-- 批量预览弹窗 -->
<a-modal <a-modal
wrapClassName="batch-preview-modal" wrapClassName="batch-preview-modal"
@ -641,6 +672,7 @@
getCameraByParentId, getCameraByParentId,
getStreamByChannelCode, getStreamByChannelCode,
getCameraAllLabel, getCameraAllLabel,
selectByChannelCode,
} from '@/api/videoSurveillance' } from '@/api/videoSurveillance'
import { getCameraByCondition } from '@/api/file' import { getCameraByCondition } from '@/api/file'
import { import {
@ -692,6 +724,7 @@
}) })
const videoList = ref([]) const videoList = ref([])
let visible = ref(false) let visible = ref(false)
let picVisible = ref(false)
let batchVisible = ref(false) let batchVisible = ref(false)
const jcssType = ref(router.currentRoute.value.query.type) const jcssType = ref(router.currentRoute.value.query.type)
const pagination = ref({ const pagination = ref({
@ -884,6 +917,7 @@
tabList.value[0].content.push('无人机') tabList.value[0].content.push('无人机')
tabList.value[0].content.push('单兵设备') tabList.value[0].content.push('单兵设备')
} }
//
const openVideo = (id) => { const openVideo = (id) => {
console.log('打开视频', id) console.log('打开视频', id)
const param = { const param = {
@ -895,6 +929,22 @@
options.src = res.data.data options.src = res.data.data
}) })
} }
//
const openPicture = (id) => {
console.log('打开图片', id)
const param = {
channelCode: id,
}
selectByChannelCode(param).then((res) => {
console.log(res)
if (res.data.data && res.data.data[0].picUrl) {
options.src = res.data.data[0].picUrl
picVisible.value = true
} else {
message.warning('该点位暂无预览图片!')
}
})
}
// const dataTypeList = () => { // const dataTypeList = () => {
// if (tabList.value[0].content.indexOf('') != -1) { // if (tabList.value[0].content.indexOf('') != -1) {
// tabList.value[1].content = ['123344', '213124'] // tabList.value[1].content = ['123344', '213124']