feat 多像摄像头切换

This commit is contained in:
Ironsp
2026-07-27 09:19:45 +08:00
parent 1b55bf6935
commit 5ff0a2e048

View File

@@ -232,7 +232,7 @@
<div class="flex w-full items-center justify-between gap-2 min-w-0 pr-8">
<span class="truncate">{{ videoName }}-{{ monitoringArea }}监控</span>
<div>
<el-button type="primary" class="shrink-0" @click="handleVideo()">切换摄像头</el-button>
<el-button type="primary" class="shrink-0" @click="handleVideo(videosInfo)">切换摄像头</el-button>
<el-button type="primary" class="shrink-0" @click="handleRefresh">刷新</el-button>
<el-button v-if="!seeSee" type="primary" class="shrink-0" @click="drawImage()">绘制区域</el-button>
<el-button v-if="seeSee" type="primary" class="shrink-0" @click="clearImage()">清空区域</el-button>
@@ -260,6 +260,7 @@ import { initHls, destroyHls } from '@/utils/video';
import { nextTick } from 'vue';
import { useVideosStore } from '@/store/modules/video';
import { addDemo } from '@/api/video/index';
import { AnyARecord } from 'dns';
const videosStore = useVideosStore();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -446,9 +447,10 @@ const resetMonitorDraw = () => {
monitorRectPx.value = null;
currentDrawArea.value = null;
};
const videosInfo = ref();
const handleSee = async (row?: any) => {
console.log('1111111111111111', row, row.drawArea);
videosInfo.value = row;
reset();
resetMonitorDraw();
seeSee.value = row?.isDrawArea === 1 ? 1 : 0;
@@ -795,8 +797,9 @@ watch(
}
);
/** 刷新按钮操作 */
const handleVideo = async (row?: DemoVO) => {
console.log('11111111111');
const handleVideo = async (row?: any) => {
console.log('11111111111', row);
handleSee(row);
};
/** 刷新按钮操作 */