feat 优化直播对话框
This commit is contained in:
@@ -123,7 +123,7 @@
|
|||||||
<el-dialog v-model="dialog1.visible" class="monitor-dialog" :before-close="handleMonitorDialogClose" fullscreen destroy-on-close>
|
<el-dialog v-model="dialog1.visible" class="monitor-dialog" :before-close="handleMonitorDialogClose" fullscreen destroy-on-close>
|
||||||
<template #header>
|
<template #header>
|
||||||
<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">实时监控</span>
|
<span class="truncate">实时监控-{{ monitoringArea }}监控</span>
|
||||||
<div>
|
<div>
|
||||||
<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>
|
||||||
@@ -182,6 +182,7 @@ const monitorVideoUrl = ref('');
|
|||||||
const monitorVideoRef = ref<HTMLVideoElement>();
|
const monitorVideoRef = ref<HTMLVideoElement>();
|
||||||
let hlsInstance: Hls | null = null;
|
let hlsInstance: Hls | null = null;
|
||||||
let visibilityHandler: (() => void) | null = null;
|
let visibilityHandler: (() => void) | null = null;
|
||||||
|
const monitoringArea = ref<string>('');
|
||||||
|
|
||||||
const initHls = () => {
|
const initHls = () => {
|
||||||
const url = monitorVideoUrl.value;
|
const url = monitorVideoUrl.value;
|
||||||
@@ -401,6 +402,7 @@ const handleSee = async (row?: any) => {
|
|||||||
reset();
|
reset();
|
||||||
resetMonitorDraw();
|
resetMonitorDraw();
|
||||||
seeSee.value = row?.isDrawArea === 1 ? 1 : 0;
|
seeSee.value = row?.isDrawArea === 1 ? 1 : 0;
|
||||||
|
monitoringArea.value = row?.monitoringArea;
|
||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
const res = await getDeviceInfo(_id);
|
const res = await getDeviceInfo(_id);
|
||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
|
|||||||
Reference in New Issue
Block a user