flx:修改百色监控

This commit is contained in:
X_Rian 2024-07-29 19:04:02 +08:00
parent 882b3e7a20
commit 8471c36973

View File

@ -5,7 +5,18 @@
<Card title="监控设备列表">
<el-scrollbar style="height: 100%">
<!-- default-expand-all -->
<el-tree ref="treeRef" icon="ArrowRight" :data="shipinList" node-key="id" @node-click="checkVideo" empty-text="">
<el-tree
ref="treeRef"
icon="ArrowRight"
:data="shipinList"
:props="{
label: 'name',
children: 'list'
}"
node-key="id"
@node-click="checkVideo"
empty-text=""
>
<template #default="{ node, data }">
<span class="custom-tree-node">
<img v-if="data.deviceType == 2 && data.videoId" src="@/assets/images/icon-video-blue.png" />
@ -47,12 +58,12 @@
<ysyPlayAndPlayback :ref="'ysy'" :ysyParams="ysyParams"></ysyPlayAndPlayback>
</div>
<!-- 播放海康 -->
<div ref="playWndBox" style="width: 96%; height: 100%; margin: 0 2% 0% 2%">
<div ref="playWndBox" style="width: 100%; height: 100%; margin: 0 2% 0% 1%">
<div id="playWnd" class="playWnd" style="width: 100%; height: 100%"></div>
<!-- :style="{
height: playWndHeight + 'px',
width: playWndWidth + 'px'
}" -->
height: playWndHeight + 'px',
width: playWndWidth + 'xp'
}" -->
</div>
</Card>
</div>
@ -287,11 +298,16 @@ onMounted(async () => {
// setTimeout(() => {
// }, 2500);
// ee
const pageInstance = getCurrentInstance();
// dom
const tagDomObj = pageInstance?.refs.playWndBox;
playWndHeight.value = tagDomObj?.clientHeight;
playWndWidth.value = tagDomObj?.clientWidth;
// const pageInstance = getCurrentInstance();
// // dom
// const tagDomObj = pageInstance?.refs.playWndBox;
const tagDomObj = document.querySelector(".videoPlayerBig .content");
const htmlFontSize = getComputedStyle(window.document.documentElement)["font-size"];
const htmlFontSizeNumber = +htmlFontSize.slice(0, htmlFontSize.indexOf("px"));
console.log(htmlFontSizeNumber,tagDomObj?.clientWidth, tagDomObj?.clientHeight / 12);
playWndHeight.value = tagDomObj?.clientHeight / 1.2;
playWndWidth.value = tagDomObj?.clientWidth / 1.2;
console.log(playWndHeight.value, playWndWidth.value, tagDomObj?.offsetHeight, tagDomObj?.offsetWidth, tagDomObj);
// scroll使DIV
window.addEventListener("scroll", () => {
@ -563,7 +579,7 @@ const previewVideo = (data: string | null) => {
}
.right {
margin-left: 1%;
width: 83%;
width: 82%;
height: 100%;
.videoPlayerBig {