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