|
|
@ -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){ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<Form |
|
|
|
labelPosition='left' |
|
|
|
labelAlign='left' |
|
|
|
labelWidth= '115px' |
|
|
|
onValueChange={values=>console.log(values)} |
|
|
|
getFormApi={formApi => form.current = formApi}> |
|
|
|
<Row> |
|
|
|
<Col span={12}> |
|
|
|
<Form.Input field='UserName' label='设备名称:' initValue={''} placeholder='请输入设备名称、常用项目或位置定义' style={{ width:307 }} |
|
|
|
rules={[ |
|
|
|
{ required: true, message: '请输入设备名称' } |
|
|
|
]}/> |
|
|
|
</Col> |
|
|
|
<Col span={12}> |
|
|
|
<Form.RadioGroup |
|
|
|
label="云台支持:" |
|
|
|
field='role' |
|
|
|
type='pureCard' |
|
|
|
direction='horizontal' |
|
|
|
style={{padding:0}} |
|
|
|
rules={[ |
|
|
|
{ required: true, message: '请选择云台支持' } |
|
|
|
]} |
|
|
|
onChange={(checked) => { |
|
|
|
console.log(checked.target.value); |
|
|
|
if(checked.target.value=='yes'){ |
|
|
|
setcloud('yes') |
|
|
|
} |
|
|
|
else{ |
|
|
|
setcloud('no') |
|
|
|
} |
|
|
|
}}> |
|
|
|
<Form.Radio value="yes" style={{width:58,height:30,padding:0,margin:0,background:'#F9F9F9'}}> |
|
|
|
<div className='cloud' style={{width:58,height:30,textAlign:'center',lineHeight:'30px'}}> |
|
|
|
支持 |
|
|
|
</div> |
|
|
|
{cloud=='yes'?<div style={{position: 'absolute', top: '-2px', right: '-1px'}}> |
|
|
|
<img src="/assets/images/background/formchoose.png" alt="1" /> |
|
|
|
</div>:''} |
|
|
|
</Form.Radio> |
|
|
|
<Form.Radio value="no" style={{width:58,height:30,padding:0,margin:0,marginLeft:18,background:'#F9F9F9'}}> |
|
|
|
<div className='cloud' style={{width:58,height:30,textAlign:'center',lineHeight:'30px'}}> |
|
|
|
不支持 |
|
|
|
</div> |
|
|
|
{cloud=='no'?<div style={{position: 'absolute', top: '-2px', right: '-1px'}}> |
|
|
|
<img src="/assets/images/background/formchoose.png" alt="1" /> |
|
|
|
</div>:''} |
|
|
|
</Form.Radio> |
|
|
|
</Form.RadioGroup> |
|
|
|
</Col> |
|
|
|
<Col span={12}> |
|
|
|
<Form.Input field='Use11rName11' label='设备厂家:' placeholder='请选择设备厂家' style={{ width:307 }}/> |
|
|
|
</Col> |
|
|
|
<Col span={12}> |
|
|
|
<div style={{display:'flex'}}> |
|
|
|
<Form.Select label="内存:" field='business2' placeholder='未安装' style={{ width:92 }}> |
|
|
|
<Form.Select.Option value="abc">Semi</Form.Select.Option> |
|
|
|
<Form.Select.Option value="ulikeCam">轻颜相机</Form.Select.Option> |
|
|
|
<Form.Select.Option value="toutiao">今日头条</Form.Select.Option> |
|
|
|
</Form.Select> |
|
|
|
<div style={{marginLeft:18}}> |
|
|
|
<Form.RadioGroup |
|
|
|
labelWidth= '76px' |
|
|
|
label="语音支持:" |
|
|
|
field='role2' |
|
|
|
type='pureCard' |
|
|
|
direction='horizontal' |
|
|
|
style={{padding:0}} |
|
|
|
onChange={(checked) => { |
|
|
|
console.log(checked.target.value); |
|
|
|
if(checked.target.value=='yes'){ |
|
|
|
setvoice('yes') |
|
|
|
} |
|
|
|
else{ |
|
|
|
setvoice('no') |
|
|
|
} |
|
|
|
}}> |
|
|
|
<Form.Radio value="yes" style={{width:58,height:30,padding:0,margin:0,background:'#F9F9F9'}}> |
|
|
|
<div className='voice' style={{width:58,height:30,textAlign:'center',lineHeight:'30px'}}> |
|
|
|
支持 |
|
|
|
</div> |
|
|
|
{voice=='yes'?<div style={{position: 'absolute', top: '-2px', right: '-1px'}}> |
|
|
|
<img src="/assets/images/background/formchoose.png" alt="1" /> |
|
|
|
</div>:''} |
|
|
|
</Form.Radio> |
|
|
|
<Form.Radio value="no" style={{width:58,height:30,padding:0,margin:0,marginLeft:18,background:'#F9F9F9'}}> |
|
|
|
<div className='voice' style={{width:58,height:30,textAlign:'center',lineHeight:'30px'}}> |
|
|
|
不支持 |
|
|
|
</div> |
|
|
|
{voice=='no'?<div style={{position: 'absolute', top: '-2px', right: '-1px'}}> |
|
|
|
<img src="/assets/images/background/formchoose.png" alt="1" /> |
|
|
|
</div>:''} |
|
|
|
</Form.Radio> |
|
|
|
</Form.RadioGroup> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Col> |
|
|
|
<Col span={12}> |
|
|
|
<div style={{display:'flex'}}> |
|
|
|
<Form.Input field='Use11rName1312' label='安装位置:' placeholder='请输入或拾取高德经纬度坐标' style={{ width:270 }} |
|
|
|
rules={[ |
|
|
|
{ required: true, message: '请输入或拾取高德经纬度坐标' } |
|
|
|
]}/> |
|
|
|
<div style={{ |
|
|
|
width:32, |
|
|
|
height:32, |
|
|
|
background:"#1859C1", |
|
|
|
marginLeft:4, |
|
|
|
display:'flex', |
|
|
|
justifyContent: 'center', |
|
|
|
alignItems: 'center', |
|
|
|
cursor: "pointer", |
|
|
|
marginTop:12, |
|
|
|
borderRadius: 3+'px'}} |
|
|
|
onClick={handleLocation}> |
|
|
|
<img src="../../../assets/images/background/location.png" width={16} height={20}/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<Form.Input field='UserName11' label='设备编号接入:' initValue={''} placeholder='请输入设备编号' style={{ width:307 }}/> |
|
|
|
</div> |
|
|
|
</Col> |
|
|
|
<Col span={12}> |
|
|
|
<TextArea |
|
|
|
style={{ width:320, height: 90 }} |
|
|
|
field='description' |
|
|
|
label='RTMP地址接入:' |
|
|
|
placeholder='请输入RTMP地址接入' |
|
|
|
/> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Form> |
|
|
|
</div> |
|
|
|
</Spin> |
|
|
|
</Modal> |
|
|
|
</> |
|
|
|