Browse Source

Merge branch 'dev_trial' of https://gitea.free-sun.vip/free-sun/FS-IOT into dev_trial

release_0.0.2
巴林闲侠 2 years ago
parent
commit
d372ce14fc
  1. 9
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  2. 7
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/voiceHeader.jsx
  3. 3
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx
  4. 1
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrCamera.jsx
  5. 30
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/remarksModal.jsx
  6. 17
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx

9
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx

@ -55,6 +55,7 @@ const VideoPlay = ({
const [isAdjustProcess, setIsAdjustProcess] = useState(false) const [isAdjustProcess, setIsAdjustProcess] = useState(false)
const [histroyTime, setHistroyTime] = useState([]) const [histroyTime, setHistroyTime] = useState([])
const [histroyBegain, setHistroyBegain] = useState() const [histroyBegain, setHistroyBegain] = useState()
const [roll, setRoll] = useState()//
const [resolution, setResolution] = useState('sd') // sd hd const [resolution, setResolution] = useState('sd') // sd hd
// ifream // ifream
@ -65,6 +66,10 @@ const VideoPlay = ({
// ifream // ifream
const yingshiPrepareRef = useRef(null) const yingshiPrepareRef = useRef(null)
useEffect(() => {
setRoll(false)
}, [resolution]);
const changeSelectState = (key) => { const changeSelectState = (key) => {
if (videoObj.type == 'yingshi' && yingshiPrepareRef.current) { if (videoObj.type == 'yingshi' && yingshiPrepareRef.current) {
return return
@ -157,6 +162,7 @@ const VideoPlay = ({
console.log(e); console.log(e);
if (origin !== 'https://open.ys7.com') return if (origin !== 'https://open.ys7.com') return
if (data.type == "handleSuccess") { if (data.type == "handleSuccess") {
setRoll(true)
if (yingshiPrepareRef.current == 'play') { if (yingshiPrepareRef.current == 'play') {
setIsPlaying(true) setIsPlaying(true)
} }
@ -311,6 +317,7 @@ const VideoPlay = ({
operationState={operationState} changeSelectState={changeSelectState} operationState={operationState} changeSelectState={changeSelectState}
histroyTime={histroyTime} histroyTime={histroyTime}
setoperationState={setoperationState} name={name} setoperationState={setoperationState} name={name}
roll={roll}
showTime={ showTime={
videoObj.type == 'yingshi' && yingshiPrepare == 'play' ? videoObj.type == 'yingshi' && yingshiPrepare == 'play' ?
null : (histroyBegain || moment()) null : (histroyBegain || moment())
@ -368,7 +375,7 @@ const VideoPlay = ({
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global } = state; const { auth, global } = state;
console.log(global); console.log('global',global);
return { return {
user: auth.user, user: auth.user,
iotVideoServer: global.iotVideoServer, iotVideoServer: global.iotVideoServer,

7
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 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 time = useRef(moment(showTime || undefined))
const upTimeInterval = useRef(null) const upTimeInterval = useRef(null)
const [showTime_, setShowTime] = useState(' ') const [showTime_, setShowTime] = useState(' ')
@ -54,6 +54,8 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name,
}, [showTime]) }, [showTime])
return ( return (
<div>
{roll?
<div style={{ <div style={{
height: 42, lineHeight: '42px', background: '#00000026', height: 42, lineHeight: '42px', background: '#00000026',
position: 'absolute', width: '100%', zIndex: 99, position: 'absolute', width: '100%', zIndex: 99,
@ -78,10 +80,11 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name,
</Col> </Col>
<Col span={15} style={{}}> <Col span={15} style={{}}>
<div style={{ paddingRight: 12 }}> <div style={{ paddingRight: 12 }}>
<TextScroll content={[]} duration={6} /> <TextScroll content={content||[]} duration={6} />
</div> </div>
</Col> </Col>
</Row> </Row>
</div>:''}
</div> </div>
) )
} }

3
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx

@ -23,7 +23,6 @@ function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, tes
setSip(res.payload.data); setSip(res.payload.data);
if (cameraData.id) { if (cameraData.id) {
let sip = res.payload.data.find((item) => item.streamid == cameraData.topSerialNo) let sip = res.payload.data.find((item) => item.streamid == cameraData.topSerialNo)
console.log(sip);
dispatch(equipmentWarehouse.getCascadeStream({ streamId: sip.streamid })).then((res) => { dispatch(equipmentWarehouse.getCascadeStream({ streamId: sip.streamid })).then((res) => {
let oneData = res.payload.data[0]; let oneData = res.payload.data[0];
let modifyData = res.payload.data.find( let modifyData = res.payload.data.find(
@ -156,13 +155,13 @@ function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, tes
//nvr //nvr
if (cameraData.gbId == id || !cameraData.gbId) { if (cameraData.gbId == id || !cameraData.gbId) {
let data = cascadeList.find((item) => item.id == id) let data = cascadeList.find((item) => item.id == id)
console.log(formData);
setVideoObj({ setVideoObj({
type: 'cascade', type: 'cascade',
audio: false, audio: false,
serialNo: data.streamid, serialNo: data.streamid,
topSerialNo: cameraData.id ? cameraData.topSerialNo : formData?.streamId, topSerialNo: cameraData.id ? cameraData.topSerialNo : formData?.streamId,
playUrlSd: data?.playUrl?.liveUrl?.sd["WS-RAW"], playUrlSd: data?.playUrl?.liveUrl?.sd["WS-RAW"],
content: data?.camera?.cameraRemarks.map((item) => item.remark),
}) })
setVideoPlay(true); setVideoPlay(true);
} }

1
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrCamera.jsx

@ -212,6 +212,7 @@ function nvrCamera ({ dispatch, actions, nvrRef, cameraData, addNvr, nvrNumber,
serialNo: data.streamid, serialNo: data.streamid,
topSerialNo: cameraDataNvr ? cameraDataNvr.serialNo : addNvr ? nvrNumber : equipmentNum, topSerialNo: cameraDataNvr ? cameraDataNvr.serialNo : addNvr ? nvrNumber : equipmentNum,
playUrlSd: data?.playUrl?.liveUrl?.sd["WS-RAW"], playUrlSd: data?.playUrl?.liveUrl?.sd["WS-RAW"],
content:data?.camera?.cameraRemarks.map((item) => item.remark)
}) })
setVideoPlay(true); setVideoPlay(true);
} }

30
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/remarksModal.jsx

@ -9,7 +9,8 @@ function remarksModal (props) {
visible, visible,
rowId, rowId,
dispatch, dispatch,
actions actions,
cameraRemarks
} = props; } = props;
const { equipmentWarehouse } = actions; const { equipmentWarehouse } = actions;
const [ScrollList, setScrollList] = useState([{num:'01',value:''},{num:'02',value:''},{num:'03',value:''}]); // const [ScrollList, setScrollList] = useState([{num:'01',value:''},{num:'02',value:''},{num:'03',value:''}]); //
@ -17,13 +18,19 @@ function remarksModal (props) {
const [roll,setroll] = useState(false); const [roll,setroll] = useState(false);
const [showValueNum,setShowValueNum] = useState(0); const [showValueNum,setShowValueNum] = useState(0);
const valueNum = useRef(0); const valueNum = useRef(0);
//
// useEffect(() => { useEffect(() => {
// setShowScrollList([ let myScrollList=ScrollList
// '76', for (let index = 0; index < cameraRemarks.length; index++) {
// '111111111111111111111111111111111111111111111111111111' 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 () { function handleOk () {
// //
@ -36,13 +43,11 @@ function remarksModal (props) {
close(); close();
}) })
} }
function handleAfterClose () {
//
}
function handleCancel () { function handleCancel () {
close(); close();
// //
} }
//
function onChange(value,num){ function onChange(value,num){
valueNum.current=0 valueNum.current=0
let myScrollList=ScrollList let myScrollList=ScrollList
@ -56,10 +61,12 @@ function remarksModal (props) {
} }
setShowValueNum(valueNum.current); setShowValueNum(valueNum.current);
} }
//
function onFocus(num){ function onFocus(num){
setShowScrollList([ScrollList[num].value]) setShowScrollList([ScrollList[num].value])
setroll(true) setroll(true)
} }
//
function onBlur(){ function onBlur(){
setShowScrollList([]) setShowScrollList([])
let myScrollList = [] let myScrollList = []
@ -80,7 +87,6 @@ function remarksModal (props) {
visible={visible} visible={visible}
onOk={handleOk} onOk={handleOk}
width={763} width={763}
afterClose={handleAfterClose}
onCancel={handleCancel} onCancel={handleCancel}
> >
<div style={{margin:"2px 14px 18px 29px",display:'flex'}}> <div style={{margin:"2px 14px 18px 29px",display:'flex'}}>

17
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx

@ -43,6 +43,7 @@ const CameraHeader = (props) => {
const [nvrNumber, setNvrNumber] = useState(); const [nvrNumber, setNvrNumber] = useState();
const [videoObj, setVideoObj] = useState(); // const [videoObj, setVideoObj] = useState(); //
const [axyData, setAxyData] = useState(); const [axyData, setAxyData] = useState();
const [cameraRemarks, setCameraRemarks] = useState([]);//
const { equipmentWarehouse } = actions; const { equipmentWarehouse } = actions;
const api = useRef(); const api = useRef();
const searchData = useRef({}) const searchData = useRef({})
@ -194,7 +195,6 @@ const CameraHeader = (props) => {
theme="borderless" theme="borderless"
onClick={() => { onClick={() => {
let data = row?.cameraRemarks.map((item)=>item.remark) let data = row?.cameraRemarks.map((item)=>item.remark)
console.log((data));
if (row.type == "yingshi") { if (row.type == "yingshi") {
setVideoObj({ setVideoObj({
type: row.type, type: row.type,
@ -211,6 +211,7 @@ const CameraHeader = (props) => {
serialNo: row.serialNo, serialNo: row.serialNo,
topSerialNo: row.topSerialNo, topSerialNo: row.topSerialNo,
playUrlSd: row.gbCamera?.playUrl?.liveUrl?.sd["WS-RAW"], playUrlSd: row.gbCamera?.playUrl?.liveUrl?.sd["WS-RAW"],
content:data,
}) })
} }
setVideoPlay(true) setVideoPlay(true)
@ -284,13 +285,7 @@ const CameraHeader = (props) => {
<Button <Button
theme="borderless" theme="borderless"
onClick={() => { onClick={() => {
setVideoObj({ setCameraRemarks(row.cameraRemarks||[])
type:'remarks',
// serialNo: row.serialNo,
// yingshiToken: row.secretYingshi.token,
// playUrlSd: row.gbCamera.playUrl.liveUrl.sd.ezopen,
// playUrlHd: row.gbCamera.playUrl.liveUrl.hd.ezopen,
})
setRowId(row.id); setRowId(row.id);
setRemarksModal(true) setRemarksModal(true)
}} }}
@ -845,9 +840,11 @@ const CameraHeader = (props) => {
<RemarksModal <RemarksModal
visible={true} visible={true}
rowId={rowId} rowId={rowId}
cameraRemarks={cameraRemarks}
close={() => { close={() => {
setRemarksModal(false) setRemarksModal(false);
setRowId() setRowId();
equipmentGetCamera();
}} > }} >
</RemarksModal>:'' </RemarksModal>:''
} }

Loading…
Cancel
Save