From 981dc894c499d9c26b9aecf22a40f40f435c7ea4 Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Thu, 5 May 2022 17:19:30 +0800 Subject: [PATCH 1/5] =?UTF-8?q?nvr=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=91=84=E5=83=8F=E5=A4=B4=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentWarehouse/actions/nvr.js | 22 +++ .../components/cameraModal.jsx | 140 +++++++++++++++++- .../components/cameraModal.less | 6 + .../components/nvrModal.jsx | 65 ++++++-- .../equipmentWarehouse/containers/nvr.jsx | 10 +- .../web/client/src/utils/webapi.js | 2 + 6 files changed, 229 insertions(+), 16 deletions(-) create mode 100644 code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cameraModal.less diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/nvr.js b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/nvr.js index 367fa0e..f51a9a5 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/nvr.js +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/actions/nvr.js @@ -13,3 +13,25 @@ export function getMembers (orgId) { reducer: { name: 'members' } }); } + +export function addchangeNvr (data) { + return dispatch => basicAction({ + type: 'post', + dispatch: dispatch, + data, + actionType: 'ADD_CHANGE_NVR', + url: `${ApiTable.nvr}`, + msg: { option: '添加/修改' }, + }); +} + +export function getVender () {//获取设备厂商 + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'GET_VENDER', + url: `${ApiTable.getVender}`, + msg: { error: '获取设备厂商失败' }, + reducer: { name: 'vender' } + }); +} \ 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 0d19d87..b837f96 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 @@ -1,15 +1,19 @@ import React, { useState ,useRef} from 'react' import { Modal,Form,Row,Col,Spin,Notification,Button } from '@douyinfe/semi-ui'; import { IconChevronLeft,IconChevronRight } from '@douyinfe/semi-icons'; +import "./cameraModal.less"; function nvrModal(props){ + const { TextArea } = Form; const {modalName,visible,close}=props const form = useRef(); // const [visible, setVisible] = useState(false);//是否显示弹框 const [isloading,setloading] = useState(false);//是否显示loading const [loadingTip,setloadingTip] = useState('获取中...请稍后...');//loading tip的值 const [step,setstep] = useState(0)//第几步 - const [okText,setokText] = useState('测试校验')//ok弹框text 右边 + const [okText,setokText] = useState('确定')//ok弹框text 右边 const [cancelText,setcancelText] = useState('取消')//取消弹框text 左边 + const [cloud,setcloud] = useState('') + const [voice,setvoice] = useState('') const opts ={//添加完成确认后通知 title:'Hi', content:'添加成功', @@ -193,6 +197,140 @@ function nvrModal(props){ +
+
console.log(values)} + getFormApi={formApi => form.current = formApi}> + + + + + + { + console.log(checked.target.value); + if(checked.target.value=='yes'){ + setcloud('yes') + } + else{ + setcloud('no') + } + }}> + +
+ 支持 +
+ {cloud=='yes'?
+ 1 +
:''} +
+ +
+ 不支持 +
+ {cloud=='no'?
+ 1 +
:''} +
+
+ + + + + +
+ + Semi + 轻颜相机 + 今日头条 + +
+ { + console.log(checked.target.value); + if(checked.target.value=='yes'){ + setvoice('yes') + } + else{ + setvoice('no') + } + }}> + +
+ 支持 +
+ {voice=='yes'?
+ 1 +
:''} +
+ +
+ 不支持 +
+ {voice=='no'?
+ 1 +
:''} +
+
+
+
+ + +
+ +
+ +
+
+
+ +
+ + +