|  |  | @ -1,7 +1,9 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | import React, { useEffect, useState, useRef } from 'react'; |  |  |  | import React, { useEffect, useState, useRef } from 'react'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { Modal, Form, Input,message,DatePicker } from 'antd'; |  |  |  | import { Modal, Form, Input, message, DatePicker, Select } from 'antd'; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import ButtonComp from '@/components/ButtonComp'; |  |  |  | import ButtonComp from '@/components/ButtonComp'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { addPasswordDeviceInfo } from '@/services/device'; |  |  |  | import { addPasswordDeviceInfo } from '@/services/device'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import styles from './index.less'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import moment from 'moment'; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | interface PageProps { |  |  |  | interface PageProps { | 
			
		
	
		
		
			
				
					
					|  |  |  |   title?: string; |  |  |  |   title?: string; | 
			
		
	
	
		
		
			
				
					|  |  | @ -19,32 +21,33 @@ const AddModal = ({ | 
			
		
	
		
		
			
				
					
					|  |  |  | }: PageProps) => { |  |  |  | }: PageProps) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   const [form] = Form.useForm(); |  |  |  |   const [form] = Form.useForm(); | 
			
		
	
		
		
			
				
					
					|  |  |  |   const passwordDeviceInfo = { |  |  |  |   const passwordDeviceInfo = { | 
			
		
	
		
		
			
				
					
					|  |  |  |     "belongCryptoSystem": "string", |  |  |  |     "belongCryptoSystem": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "communicationAddressType": "string", |  |  |  |     "communicationAddressType": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "createTime": "string", |  |  |  |     "createTime": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "deviceAliases": "string", |  |  |  |     "deviceAliases": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "equipmentDeploymentLocation": "string", |  |  |  |     "equipmentDeploymentLocation": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "equipmentManagementUnit": "string", |  |  |  |     "equipmentManagementUnit": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "equipmentManufacturer": "string", |  |  |  |     "equipmentManufacturer": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "equipmentType": "string", |  |  |  |     "equipmentType": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "equipmentUserUnit": "string", |  |  |  |     "equipmentUserUnit": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "id": 0, |  |  |  |     "id": '', | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "isolatorExternalNetworkIp": "string", |  |  |  |     "isolatorExternalNetworkIp": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "memo": "string", |  |  |  |     "memo": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "passwordDeviceNumber": "string", |  |  |  |     "passwordDeviceNumber": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "passwordDeviceSerialNumber": "string", |  |  |  |     "passwordDeviceSerialNumber": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "passwordEntityIdentifier": "string", |  |  |  |     "passwordEntityIdentifier": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "registrationDate": "string", |  |  |  |     "registrationDate": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "superiorEquipmentNumber": "string", |  |  |  |     "superiorEquipmentNumber": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "sysType": "string", |  |  |  |     "sysType": "", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     "updateTime": "string" |  |  |  |     "updateTime": "" | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   }; |  |  |  |   }; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   const onFinish = (values: any) => { |  |  |  |   const onFinish = (values: any) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     values.registrationDate=values['registrationDate'].format('YYYY-MM-DD'), |  |  |  |     values.registrationDate = (values['registrationDate'] || moment()).format('YYYY-MM-DD'), | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       addPasswordDeviceInfo({ ...values, passwordDeviceInfo }).then((res) => { |  |  |  |       addPasswordDeviceInfo({ ...values, passwordDeviceInfo }).then((res) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (res?.result == "success") { |  |  |  |         if (res?.result == "success") { | 
			
		
	
		
		
			
				
					
					|  |  |  |           message.success('新增成功'); |  |  |  |           message.success('新增成功'); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           onCancel(); | 
			
		
	
		
		
			
				
					
					|  |  |  |           form.resetFields(); |  |  |  |           form.resetFields(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } else { |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |           message.error(res?.errorMsg); |  |  |  |           message.error(res?.errorMsg); | 
			
		
	
	
		
		
			
				
					|  |  | @ -67,6 +70,7 @@ const AddModal = ({ | 
			
		
	
		
		
			
				
					
					|  |  |  |           onFinish={onFinish} |  |  |  |           onFinish={onFinish} | 
			
		
	
		
		
			
				
					
					|  |  |  |           form={form} |  |  |  |           form={form} | 
			
		
	
		
		
			
				
					
					|  |  |  |           style={{ maxHeight: '500px', overflow: 'auto' }} |  |  |  |           style={{ maxHeight: '500px', overflow: 'auto' }} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           className={styles.formWrap} | 
			
		
	
		
		
			
				
					
					|  |  |  |         > |  |  |  |         > | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="belongCryptoSystem" label="所属密码系统"> |  |  |  |           <Form.Item name="belongCryptoSystem" label="所属密码系统"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请输入所属密码系统" /> |  |  |  |             <Input placeholder="请输入所属密码系统" /> | 
			
		
	
	
		
		
			
				
					|  |  | @ -75,43 +79,57 @@ const AddModal = ({ | 
			
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请输入所属设备类型" /> |  |  |  |             <Input placeholder="请输入所属设备类型" /> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <div style={{ display: 'flex' }}> |  |  |  |           <div style={{ display: 'flex' }}> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <Form.Item name="passwordEntityIdentifier" label="密码实体标识" rules={[{ required: true, message: '请选择密码实体标识' },]}> |  |  |  |             <Form.Item style={{flex:'1'}} name="passwordEntityIdentifier" label="密码实体标识" rules={[{ required: true, message: '请选择密码实体标识' },]}> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |               <Input placeholder="请选择密码实体标识" /> |  |  |  |               <Input placeholder="请选择密码实体标识" /> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </Form.Item> |  |  |  |             </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |             {/* <ButtonComp text={'选择'} style={{ marginLeft: '20px' }} onClick={() => { }} /> */} |  |  |  |             {/* <ButtonComp text={'选择'} style={{ marginLeft: '20px' }} onClick={() => { }} /> */} | 
			
		
	
		
		
			
				
					
					|  |  |  |           </div> |  |  |  |           </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <div style={{ display: 'flex' }}> |  |  |  |           <div style={{ display: 'flex' }}> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <Form.Item name="passwordDeviceSerialNumber" label="密码设备序号" rules={[{ required: true, message: '请选择密码设备序号' },]}> |  |  |  |             <div style={{flex:'1'}}> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <Form.Item name="passwordDeviceSerialNumber" label="密码设备序号" rules={[{ required: true, message: '请输入密码设备序号' },]}> | 
			
		
	
		
		
			
				
					
					|  |  |  |               <Input placeholder="请输入密码设备序号" /> |  |  |  |               <Input placeholder="请输入密码设备序号" /> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </Form.Item> |  |  |  |             </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <div style={{ marginLeft: '20px' }}>(如0000001)</div> |  |  |  |             <div style={{ marginLeft: '20px' }}>(如0000001)</div> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </div> |  |  |  |           </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="passwordDeviceNumber" label="密码设备编号" rules={[{ required: true, message: '请选择密码设备序号' },]}> |  |  |  |           <Form.Item name="passwordDeviceNumber" label="密码设备编号" > | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请输入密码设备编号" /> |  |  |  |             <Input placeholder="请输入密码设备编号" /> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="superiorEquipmentNumber" label="上级设备编号" rules={[{ required: true, message: '请选择密码设备序号' },]}> |  |  |  |           <Form.Item name="superiorEquipmentNumber" label="上级设备编号" rules={[{ required: true, message: '请输入上级设备编号' },]}> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请输入上级设备编号" /> |  |  |  |             <Input placeholder="请输入上级设备编号" /> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="equipmentUserUnit" label="设备使用单位" rules={[{ required: true, message: '请选择密码设备序号' },]}> |  |  |  |           <Form.Item name="equipmentUserUnit" label="设备使用单位"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请输入设备使用单位" /> |  |  |  |             <Input placeholder="请输入设备使用单位" /> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="equipmentDeploymentLocation" label="设备部署地点" rules={[{ required: true, message: '请选择密码设备序号' },]}> |  |  |  |           <Form.Item name="equipmentDeploymentLocation" label="设备部署地点" > | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请输入设备部署地点" /> |  |  |  |             <Input placeholder="请输入设备部署地点" /> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="equipmentManagementUnit" label="设备管理单位" rules={[{ required: true, message: '请选择密码设备序号' },]}> |  |  |  |           <Form.Item name="equipmentManagementUnit" label="设备管理单位" rules={[{ required: true, message: '请选择设备管理单位' },]}> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请选择设备管理单位" /> |  |  |  |             <Select placeholder="请选择设备管理单位"> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <Option value="单位1">单位11</Option> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <Option value="单位2">单位2</Option> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <Option value="单位3">单位3</Option> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </Select> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="communicationAddressType" label="通信地址类型" rules={[{ required: true, message: '请选择密码设备序号' },]}> |  |  |  |           <Form.Item name="communicationAddressType" label="通信地址类型" rules={[{ required: true, message: '请选择通信地址类型' },]}> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请选择通信地址类型" /> |  |  |  |             <Select placeholder="请选择通信地址类型"> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <Option value="网络地址">网络地址</Option> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <Option value="电信地址">电信地址</Option> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <Option value="移动地址">移动地址</Option> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </Select> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="isolatorExternalNetworkIp" label="隔离器外网IP" rules={[{ required: true, message: '请选择密码设备序号' },]}> |  |  |  |           <Form.Item name="isolatorExternalNetworkIp" label="隔离器外网IP" rules={[{ required: true, message: '请输入隔离器外网IP' },]}> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请输入隔离器外网IP" /> |  |  |  |             <Input placeholder="请输入隔离器外网IP" /> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="equipmentManufacturer" label="设备生产厂商(可空)"> |  |  |  |           <Form.Item name="equipmentManufacturer" label="设备生产厂商(可空)"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请选择设备生产厂商" /> |  |  |  |             <Select placeholder="请选择设备生产厂商"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <Option value="厂商1">厂商1</Option> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <Option value="厂商2">厂商2</Option> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <Option value="厂商3">厂商3</Option> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </Select> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="deviceAliases" label="设备别名(可空)"> |  |  |  |           <Form.Item name="deviceAliases" label="设备别名(可空)"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请选择设备别名" /> |  |  |  |             <Input placeholder="请输入设备别名" /> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |           </Form.Item> |  |  |  |           </Form.Item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <Form.Item name="memo" label="备注信息(可空)"> |  |  |  |           <Form.Item name="memo" label="备注信息(可空)"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <Input placeholder="请输入备注信息" /> |  |  |  |             <Input placeholder="请输入备注信息" /> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |