From 81be16ab8c7c44cff6aed15f7fad38707c4c0e6d Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Wed, 31 Aug 2022 16:38:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../videoOperationCloudControl.jsx | 2 +- .../videoPlayer/videoOperationHistroyTime.jsx | 4 +-- .../videoPlayer/videoOperationTalk.jsx | 4 +-- .../src/components/videoPlayer/videoPlay.jsx | 9 +++--- .../src/components/videoPlayer/videoPlay.less | 2 +- .../components/videoPlayer/voiceHeader.jsx | 4 +-- .../openness/containers/mirroringDetail.jsx | 32 +++++++++++-------- 7 files changed, 31 insertions(+), 26 deletions(-) diff --git a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationCloudControl.jsx b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationCloudControl.jsx index 32f6573..dce0e80 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationCloudControl.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationCloudControl.jsx @@ -14,7 +14,7 @@ const VideoOperationCloudControl = ({ gbptz(ac, videoObj, iotVideoServer) } } - const vcmpVideo = document.getElementById('vcmp_videoplay')?.offsetHeight; + const vcmpVideo = document.getElementsByClassName('vcmp_video'+videoObj.id)?.offsetHeight; console.log(vcmpVideo); return (
{ +const VideoOperationHistroyTime = ({ close, histroyTime, setHistroyTime, setProcessDisX,videoObj }) => { const [selectedTimeRange, setSelectedTimeRange] = useState(histroyTime) useEffect(() => { @@ -16,7 +16,7 @@ const VideoOperationHistroyTime = ({ close, histroyTime, setHistroyTime, setProc }, []) const ToastInCustomContainer = ToastFactory.create({ - getPopupContainer: () => document.getElementById('vcmp_videoplay'), + getPopupContainer: () => document.getElementsByClassName('vcmp_video'+videoObj.id), }); return ( diff --git a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationTalk.jsx b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationTalk.jsx index cc8865c..10ba1cf 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationTalk.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperationTalk.jsx @@ -15,7 +15,7 @@ const VideoOperationTalk = ({ const [recordState, setRecordState] = useState(RecordState.NONE) const ToastInCustomContainer = ToastFactory.create({ - getPopupContainer: () => document.getElementById('vcmp_videoplay'), + getPopupContainer: () => document.getElementsByClassName('vcmp_video'+videoObj.id), }); useEffect(() => { @@ -57,7 +57,7 @@ const VideoOperationTalk = ({ } } } - const vcmpVideo = document.getElementById('vcmp_videoplay')?.offsetHeight; + const vcmpVideo = document.getElementsByClassName('vcmp_video'+videoObj.id)?.offsetHeight; return (
{ changeSelectState('fullScreen') - let videoplay = document.getElementById('vcmp_videoplay') + let videoplay = document.getElementsByClassName('vcmp_video'+videoObj.id) if (screenfull.isEnabled) { screenfull.toggle(videoplay); if (videoObj?.type == 'yingshi' && player) { @@ -209,7 +209,7 @@ const VideoPlay = ({ // 全屏状态监听 screenfull.on('change', (e) => { - if (e?.path[0]?.id=="vcmp_videoplay") { + if (e?.path[0]?.id=="vcmp_videoplay"+videoObj.id) { if (screenfull.isFullscreen && operationRef.current && !operationRef.current['fullScreen'].select) { changeSelectState('fullScreen') } @@ -436,9 +436,8 @@ const VideoPlay = ({ return ( <> -
-
- {/* 顶部信息 */} +
+
{/* 顶部信息 */} diff --git a/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx b/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx index c79d24c..da1366c 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/openness/containers/mirroringDetail.jsx @@ -1,7 +1,7 @@ import React, { useEffect, useState, useRef } from 'react'; import { connect } from 'react-redux'; import '../style.less' -import { Tree, Popconfirm, Typography, Input, Switch, Modal, Checkbox, CheckboxGroup, Select, Toast, Button } from "@douyinfe/semi-ui" +import { Tree, Popconfirm, Typography, Input, Switch, Modal, Checkbox, CheckboxGroup, Select, Toast, Button, Notification } from "@douyinfe/semi-ui" import VideoScreen from '../components/videoScreen'; import { set } from 'nprogress'; @@ -227,7 +227,13 @@ const MirroringDetail = (props) => { filterGroup: filterGroup } dispatch(openness.putMirror(mirrordata)).then((res) => { - history.goBack() + if (res.success) { + sethasModify(false) + Notification.success({ + content: publish?'发布完成':'保存完成', + duration: 3, + }) + } }) } } @@ -750,7 +756,7 @@ const MirroringDetail = (props) => { setAddScreen(true) } function addLabelGroup (index) {//标签组弹框 - let myAllCameraList=[] + let myAllCameraList = [] for (let j = 0; j < treeData.length; j++) {//第一级 if (treeData[j].children) {//有没有子集 for (let k = 0; k < treeData[j].children.length; k++) {//第二级 @@ -786,20 +792,20 @@ const MirroringDetail = (props) => { } } } - let myFilterGroupList=JSON.parse(JSON.stringify(filterGroup)) + let myFilterGroupList = JSON.parse(JSON.stringify(filterGroup)) for (let i = 0; i < myFilterGroupList.length; i++) { - if(myFilterGroupList[i].filters){ + if (myFilterGroupList[i].filters) { for (let j = 0; j < myFilterGroupList[i].filters.length; j++) { - let idArr=JSON.parse(JSON.stringify(myFilterGroupList[i].filters[j].cameraIds)) - let newArr=[] + let idArr = JSON.parse(JSON.stringify(myFilterGroupList[i].filters[j].cameraIds)) + let newArr = [] for (let k = 0; k < idArr.length; k++) { for (let l = 0; l < myAllCameraList.length; l++) { - if(idArr[k]==myAllCameraList[l].id){ + if (idArr[k] == myAllCameraList[l].id) { newArr.push(idArr[k]) } } } - myFilterGroupList[i].filters[j].cameraIds=newArr + myFilterGroupList[i].filters[j].cameraIds = newArr } } } @@ -938,7 +944,7 @@ const MirroringDetail = (props) => { { editHeaderName ? (
- { setEditHeaderName(false) }} onChange={(value) => setHeaderName(value)} style={{ width: 200, color: 'rgba(255,255,255,0.9)', background: 'rgba(0,0,0,0.2)' }} maxLength={20} className='inputpadding'> + { setEditHeaderName(false) }} onChange={(value) => { setHeaderName(value); sethasModify(true) }} style={{ width: 200, color: 'rgba(255,255,255,0.9)', background: 'rgba(0,0,0,0.2)' }} maxLength={20} className='inputpadding'>
) : (
@@ -1078,7 +1084,7 @@ const MirroringDetail = (props) => {
header
-
{setShowHeader(v);sethasModify(true)}} size="small" aria-label="是否有头部">
+
{ setShowHeader(v); sethasModify(true) }} size="small" aria-label="是否有头部">
{ setComingVisible(true) }}>
自定义样式
@@ -1144,7 +1150,7 @@ const MirroringDetail = (props) => {
{ editNum == item.num ? ( - { toChangeScreen(item.num, item.name) }} onChange={(value) => toEditscreen(value, index)} style={{ width: 120 }} maxLength={8} className='inputpadding' size='small'> + { toChangeScreen(item.num, item.name) }} onChange={(value) => { toEditscreen(value, index) }} style={{ width: 120 }} maxLength={8} className='inputpadding' size='small'> ) : (item.name) }
@@ -1219,7 +1225,7 @@ const MirroringDetail = (props) => {
{ labelEditNum == item.num ? ( - { toChangeLabel(item.num, item.name, addLabelNum) }} onChange={(value) => toEditLabel(value, index)} style={{ width: 120 }} maxLength={6} className='inputpadding' size='small'> + { toChangeLabel(item.num, item.name, addLabelNum) }} onChange={(value) => { toEditLabel(value, index) }} style={{ width: 120 }} maxLength={6} className='inputpadding' size='small'> ) : (item.name) }