diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js index f6394c9..965b071 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js @@ -123,7 +123,10 @@ async function getNvrSteam (ctx) { }, include: [{ model: models.CameraRemark, - attributes: ['remark'] + attributes: ['remark'], + order: [ + ['id', 'DESC'] + ], }], }) @@ -424,7 +427,10 @@ async function getCascadeSteam (ctx) { }, include: [{ model: models.CameraRemark, - attributes: ['remark'] + attributes: ['remark'], + order: [ + ['id', 'DESC'] + ], }], }) diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js index f8492cb..2c50b27 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js @@ -33,7 +33,10 @@ async function getCameraProject (ctx, next) { attributes: ['token'] }, { model: models.CameraRemark, - attributes: ['remark'] + attributes: ['remark'], + order: [ + ['id', 'DESC'] + ], }], distinct: true } 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 a1a1e36..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 ( -