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 [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,

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 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,6 +54,8 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name,
}, [showTime])
return (
<div>
{roll?
<div style={{
height: 42, lineHeight: '42px', background: '#00000026',
position: 'absolute', width: '100%', zIndex: 99,
@ -78,10 +80,11 @@ const VideoHeader = ({ operationState, changeSelectState, setProcessDisX, name,
</Col>
<Col span={15} style={{}}>
<div style={{ paddingRight: 12 }}>
<TextScroll content={[]} duration={6} />
<TextScroll content={content||[]} duration={6} />
</div>
</Col>
</Row>
</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);
if (cameraData.id) {
let sip = res.payload.data.find((item) => item.streamid == cameraData.topSerialNo)
console.log(sip);
dispatch(equipmentWarehouse.getCascadeStream({ streamId: sip.streamid })).then((res) => {
let oneData = res.payload.data[0];
let modifyData = res.payload.data.find(
@ -156,13 +155,13 @@ function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, tes
//nvr
if (cameraData.gbId == id || !cameraData.gbId) {
let data = cascadeList.find((item) => item.id == id)
console.log(formData);
setVideoObj({
type: 'cascade',
audio: false,
serialNo: data.streamid,
topSerialNo: cameraData.id ? cameraData.topSerialNo : formData?.streamId,
playUrlSd: data?.playUrl?.liveUrl?.sd["WS-RAW"],
content: data?.camera?.cameraRemarks.map((item) => item.remark),
})
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,
topSerialNo: cameraDataNvr ? cameraDataNvr.serialNo : addNvr ? nvrNumber : equipmentNum,
playUrlSd: data?.playUrl?.liveUrl?.sd["WS-RAW"],
content:data?.camera?.cameraRemarks.map((item) => item.remark)
})
setVideoPlay(true);
}

30
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:''}]); //
@ -17,13 +18,19 @@ function remarksModal (props) {
const [roll,setroll] = useState(false);
const [showValueNum,setShowValueNum] = useState(0);
const valueNum = useRef(0);
// useEffect(() => {
// setShowScrollList([
// '76',
// '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,13 +43,11 @@ function remarksModal (props) {
close();
})
}
function handleAfterClose () {
//
}
function handleCancel () {
close();
//
}
//
function onChange(value,num){
valueNum.current=0
let myScrollList=ScrollList
@ -56,10 +61,12 @@ function remarksModal (props) {
}
setShowValueNum(valueNum.current);
}
//
function onFocus(num){
setShowScrollList([ScrollList[num].value])
setroll(true)
}
//
function onBlur(){
setShowScrollList([])
let myScrollList = []
@ -80,7 +87,6 @@ function remarksModal (props) {
visible={visible}
onOk={handleOk}
width={763}
afterClose={handleAfterClose}
onCancel={handleCancel}
>
<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 [videoObj, setVideoObj] = useState(); //
const [axyData, setAxyData] = useState();
const [cameraRemarks, setCameraRemarks] = useState([]);//
const { equipmentWarehouse } = actions;
const api = useRef();
const searchData = useRef({})
@ -194,7 +195,6 @@ const CameraHeader = (props) => {
theme="borderless"
onClick={() => {
let data = row?.cameraRemarks.map((item)=>item.remark)
console.log((data));
if (row.type == "yingshi") {
setVideoObj({
type: row.type,
@ -211,6 +211,7 @@ const CameraHeader = (props) => {
serialNo: row.serialNo,
topSerialNo: row.topSerialNo,
playUrlSd: row.gbCamera?.playUrl?.liveUrl?.sd["WS-RAW"],
content:data,
})
}
setVideoPlay(true)
@ -284,13 +285,7 @@ const CameraHeader = (props) => {
<Button
theme="borderless"
onClick={() => {
setVideoObj({
type:'remarks',
// serialNo: row.serialNo,
// yingshiToken: row.secretYingshi.token,
// playUrlSd: row.gbCamera.playUrl.liveUrl.sd.ezopen,
// playUrlHd: row.gbCamera.playUrl.liveUrl.hd.ezopen,
})
setCameraRemarks(row.cameraRemarks||[])
setRowId(row.id);
setRemarksModal(true)
}}
@ -845,9 +840,11 @@ const CameraHeader = (props) => {
<RemarksModal
visible={true}
rowId={rowId}
cameraRemarks={cameraRemarks}
close={() => {
setRemarksModal(false)
setRowId()
setRemarksModal(false);
setRowId();
equipmentGetCamera();
}} >
</RemarksModal>:''
}

Loading…
Cancel
Save