From 761c829c0e3daf7b8c104017c02e246d3d6a738d Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Wed, 6 Jul 2022 19:32:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E6=B3=A8=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/videoPlayer/videoPlay.jsx | 9 ++- .../components/videoPlayer/voiceHeader.jsx | 63 ++++++++++--------- .../components/remarksModal.jsx | 25 ++++---- .../equipmentWarehouse/containers/camera.jsx | 15 ++--- 4 files changed, 61 insertions(+), 51 deletions(-) diff --git a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx index 89d4c4e..36d05a1 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx @@ -55,6 +55,7 @@ const VideoPlay = ({ const [isAdjustProcess, setIsAdjustProcess] = useState(false) const [histroyTime, setHistroyTime] = useState([]) const [histroyBegain, setHistroyBegain] = useState() + const [roll, setRoll] = useState()//滚动备注 const [resolution, setResolution] = useState('sd') // 标清 sd 高清 hd // 标记萤石操作中,等待ifream返回信息后清空 @@ -65,6 +66,10 @@ const VideoPlay = ({ // 标记萤石操作中,等待ifream返回信息后清空 const yingshiPrepareRef = useRef(null) + useEffect(() => { + setRoll(false) + }, [resolution]); + const changeSelectState = (key) => { if (videoObj.type == 'yingshi' && yingshiPrepareRef.current) { return @@ -157,6 +162,7 @@ const VideoPlay = ({ console.log(e); if (origin !== 'https://open.ys7.com') return if (data.type == "handleSuccess") { + setRoll(true) if (yingshiPrepareRef.current == 'play') { setIsPlaying(true) } @@ -311,6 +317,7 @@ const VideoPlay = ({ operationState={operationState} changeSelectState={changeSelectState} histroyTime={histroyTime} setoperationState={setoperationState} name={name} + roll={roll} showTime={ videoObj.type == 'yingshi' && yingshiPrepare == 'play' ? null : (histroyBegain || moment()) @@ -368,7 +375,7 @@ const VideoPlay = ({ function mapStateToProps (state) { const { auth, global } = state; - console.log(global); + console.log('global',global); return { user: auth.user, iotVideoServer: global.iotVideoServer, diff --git a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/voiceHeader.jsx b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/voiceHeader.jsx index db1ba54..0cb5498 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/voiceHeader.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/voiceHeader.jsx @@ -8,7 +8,7 @@ import './videoPlay.less'; const timeFormat = 'YYYY-MM-DD HH:mm:ss' -const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name, showTime, histroyTime,content }) => { +const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name, showTime, histroyTime,content,roll }) => { const time = useRef(moment(showTime || undefined)) const upTimeInterval = useRef(null) const [showTime_, setShowTime] = useState(' ') @@ -54,35 +54,38 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name, }, [showTime]) return ( -
- - - { - operationState && operationState.histroy.select ? - <> - { - changeSelectState('histroy') - }} /> - : '' - } - {showTime_} {name} - - -
- -
- -
-
+
+ {roll? +
+ + + { + operationState && operationState.histroy.select ? + <> + { + changeSelectState('histroy') + }} /> + : '' + } + {showTime_} {name} + + +
+ +
+ +
+
:''} +
) } diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/remarksModal.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/remarksModal.jsx index cae0297..0567346 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/remarksModal.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/remarksModal.jsx @@ -9,7 +9,8 @@ function remarksModal (props) { visible, rowId, dispatch, - actions + actions, + cameraRemarks } = props; const { equipmentWarehouse } = actions; const [ScrollList, setScrollList] = useState([{num:'01',value:''},{num:'02',value:''},{num:'03',value:''}]); //显示 @@ -18,12 +19,18 @@ function remarksModal (props) { const [showValueNum,setShowValueNum] = useState(0); const valueNum = useRef(0); - // useEffect(() => { - // setShowScrollList([ - // '周杰伦7月6日出专辑,请大家多多捧场备注', - // '111111111111111111111111111111111111111111111111111111' - // ]) - // }, []); + useEffect(() => { + let myScrollList=ScrollList + for (let index = 0; index < cameraRemarks.length; index++) { + myScrollList[index].value=cameraRemarks[index].remark + } + setScrollList(myScrollList) + let mycameraRemarks=[] + for (let index = 0; index < cameraRemarks.length; index++) { + mycameraRemarks.push(cameraRemarks[index].remark) + } + setShowScrollList(mycameraRemarks) + }, []); function handleOk () { //点击弹框确定 右边按钮 @@ -36,9 +43,6 @@ function remarksModal (props) { close(); }) } - function handleAfterClose () { - //在关闭之后 - } function handleCancel () { close(); //点击弹框取消 左边按钮 @@ -80,7 +84,6 @@ function remarksModal (props) { visible={visible} onOk={handleOk} width={763} - afterClose={handleAfterClose} onCancel={handleCancel} >
diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx index 3298f75..80b959e 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx @@ -43,6 +43,7 @@ const CameraHeader = (props) => { const [nvrNumber, setNvrNumber] = useState(); const [videoObj, setVideoObj] = useState(); //播放条件 const [axyData, setAxyData] = useState(); + const [cameraRemarks, setCameraRemarks] = useState([]);//备注 const { equipmentWarehouse } = actions; const api = useRef(); const searchData = useRef({}) @@ -284,13 +285,7 @@ const CameraHeader = (props) => {