From 5a86abc520eb933489d1bea095c2294eab5923a5 Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Wed, 25 May 2022 11:28:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentWarehouse/actions/camera.js | 11 ++ .../components/cameraModal.jsx | 22 ++- .../components/fluoriteCamera.jsx | 97 +++++++------ .../components/ipcCamera.jsx | 137 +++++++++--------- .../components/nvrModal.jsx | 10 +- .../equipmentWarehouse/containers/camera.jsx | 2 +- .../web/client/src/utils/webapi.js | 2 + 7 files changed, 146 insertions(+), 135 deletions(-) diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/camera.js b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/camera.js index 80bd4cf..5390586 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/camera.js +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/camera.js @@ -39,4 +39,15 @@ export function getCamera(query) { msg: { option: "" }, //获取摄像头详情 reducer: { name: "nvrDetails" }, }); + } + export function getAbility() { + return (dispatch) => + basicAction({ + type: "get", + dispatch: dispatch, + actionType: "GET_ABILITY", + url: `${ApiTable.getAbility}`, + msg: { option: "获取摄像头能力列表" }, + reducer: { name: "equipmentWarehouseCamera" }, + }); } \ No newline at end of file diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cameraModal.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cameraModal.jsx index 27b1ff9..4df61da 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cameraModal.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cameraModal.jsx @@ -16,11 +16,6 @@ function cameraModal(props){ const [loadingTip,setloadingTip] = useState('获取中...请稍后...');//loading tip的值 const [okText,setokText] = useState('确定')//ok弹框text 右边 const [cancelText,setcancelText] = useState('取消')//取消弹框text 左边 - const opts ={//添加完成确认后通知 - title:'Hi', - content:'添加成功', - duration:3 - } const [clickNum,setclickNum] = useState(1);//点击的第几个 const cameraList=[//循环摄像头列表 { @@ -28,11 +23,6 @@ function cameraModal(props){ img:'/assets/images/background/ysy.png', title:'萤石云平台摄像头', text:'通过萤石云平台rtmp地址配置完成推流的平台摄像头。' - },{ - id:2, - img:'/assets/images/background/nvr.png', - title:'NVR摄像头', - text:'通过连接NVR(网络硬盘录像机)进行视频流推送的摄像头' },{ id:3, img:'/assets/images/background/ipc.png', @@ -43,6 +33,11 @@ function cameraModal(props){ img:'/assets/images/background/cascade.png', title:'级联摄像头', text:'通过GB/T28181协议级联的平台摄像头,常用于平台对接推送' + },{ + id:2, + img:'/assets/images/background/nvr.png', + title:'NVR摄像头', + text:'通过连接NVR(网络硬盘录像机)进行视频流推送的摄像头' }, ] const [showcameraList,setcameraList]=useState(cameraList.slice(0,3));//轮播图 @@ -56,7 +51,6 @@ function cameraModal(props){ }else if(clickNum==4){ console.log('44444444444444'); } - // Notification.success(opts) // close(); } function handleAfterClose(){//在关闭之后 @@ -76,9 +70,11 @@ function cameraModal(props){ } function onReset(){ if(clickNum==1){ - fluoriteRef.current.resetFluoriteCamera() + fluoriteRef.current.resetFluoriteCamera(); + fluoriteRef.current.toempty(); }else if(clickNum==3){ - ipcRef.current.resetIpcCamera() + ipcRef.current.resetIpcCamera(); + ipcRef.current.toempty(); }else if(clickNum==4){ } diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx index 4a1ebf0..1616577 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx @@ -56,8 +56,14 @@ function fluoriteCamera({cRef}){ useImperativeHandle(cRef,() => ({//传给父组件方法 //子组件暴露给父组件的方法 fluoriteCameraForm : form.current.validate, - resetFluoriteCamera : form.current.reset + resetFluoriteCamera : form.current.reset, + toempty:empty, })) + function empty(){ + setcloud(null) + setvoice(null) + setSwitching(null) + } return ( <>
:''} + {/* 内存 */} + + {memoryList.map((item,index)=>( + {item.value} + ))} + {/* 安装位置 */}
:''} - {/* 内存 */} -
- - {memoryList.map((item,index)=>( - {item.value} - ))} - - {/* 语音支持 */} -
- { - console.log(checked.target.value); - if(checked.target.value=='yes'){ - setvoice('yes') - } - else{ - setvoice('no') - } - }}> - -
- 支持 -
- {voice=='yes'?
- 1 -
:''} -
- -
- 不支持 -
- {voice=='no'?
- 1 -
:''} -
-
-
-
+ {/* 语音支持 */} + { + console.log(checked.target.value); + if(checked.target.value=='yes'){ + setvoice('yes') + } + else{ + setvoice('no') + } + }}> + +
+ 支持 +
+ {voice=='yes'?
+ 1 +
:''} +
+ +
+ 不支持 +
+ {voice=='no'?
+ 1 +
:''} +
+
+ {/* 设备名称 */} + {/* RTMP地址接入 */}