|
|
@ -1,6 +1,7 @@
|
|
|
|
import React, { useEffect, useState, useRef } from 'react';
|
|
|
|
import React, { useEffect, useState, useRef } from 'react';
|
|
|
|
import { Modal, Form, Input } from 'antd';
|
|
|
|
import { Modal, Form, Input,message,DatePicker } from 'antd';
|
|
|
|
import ButtonComp from '@/components/ButtonComp';
|
|
|
|
import ButtonComp from '@/components/ButtonComp';
|
|
|
|
|
|
|
|
import { addPasswordDeviceInfo } from '@/services/device';
|
|
|
|
|
|
|
|
|
|
|
|
interface PageProps {
|
|
|
|
interface PageProps {
|
|
|
|
title?: string;
|
|
|
|
title?: string;
|
|
|
@ -17,6 +18,39 @@ const AddModal = ({
|
|
|
|
...props
|
|
|
|
...props
|
|
|
|
}: PageProps) => {
|
|
|
|
}: PageProps) => {
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
|
|
|
const passwordDeviceInfo= {
|
|
|
|
|
|
|
|
"belongCryptoSystem": "string",
|
|
|
|
|
|
|
|
"communicationAddressType": "string",
|
|
|
|
|
|
|
|
"createTime": "string",
|
|
|
|
|
|
|
|
"deviceAliases": "string",
|
|
|
|
|
|
|
|
"equipmentDeploymentLocation": "string",
|
|
|
|
|
|
|
|
"equipmentManagementUnit": "string",
|
|
|
|
|
|
|
|
"equipmentManufacturer": "string",
|
|
|
|
|
|
|
|
"equipmentType": "string",
|
|
|
|
|
|
|
|
"equipmentUserUnit": "string",
|
|
|
|
|
|
|
|
"id": 0,
|
|
|
|
|
|
|
|
"isolatorExternalNetworkIp": "string",
|
|
|
|
|
|
|
|
"memo": "string",
|
|
|
|
|
|
|
|
"passwordDeviceNumber": "string",
|
|
|
|
|
|
|
|
"passwordDeviceSerialNumber": "string",
|
|
|
|
|
|
|
|
"passwordEntityIdentifier": "string",
|
|
|
|
|
|
|
|
"registrationDate": "string",
|
|
|
|
|
|
|
|
"superiorEquipmentNumber": "string",
|
|
|
|
|
|
|
|
"sysType": "string",
|
|
|
|
|
|
|
|
"updateTime": "string"
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const onFinish = (values: any) => {
|
|
|
|
|
|
|
|
values.registrationDate=values['registrationDate'].format('YYYY-MM-DD'),
|
|
|
|
|
|
|
|
addPasswordDeviceInfo({...values,passwordDeviceInfo}).then((res) => {
|
|
|
|
|
|
|
|
if (res?.result == "success") {
|
|
|
|
|
|
|
|
message.success('新增成功');
|
|
|
|
|
|
|
|
form.resetFields();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
message.error(res?.errorMsg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
@ -28,63 +62,69 @@ const AddModal = ({
|
|
|
|
onCancel={onCancel}
|
|
|
|
onCancel={onCancel}
|
|
|
|
footer={null}
|
|
|
|
footer={null}
|
|
|
|
maskClosable={false}
|
|
|
|
maskClosable={false}
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Form
|
|
|
|
<Form
|
|
|
|
|
|
|
|
onFinish={onFinish}
|
|
|
|
form={form}
|
|
|
|
form={form}
|
|
|
|
style={{maxHeight:'500px',overflow:'auto'}}
|
|
|
|
style={{maxHeight:'500px',overflow:'auto'}}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Form.Item name="sysName" label="所属密码系统">
|
|
|
|
<Form.Item name="belongCryptoSystem" label="所属密码系统">
|
|
|
|
<Input placeholder="请输入所属密码系统" />
|
|
|
|
<Input placeholder="请输入所属密码系统" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="systype" label="所属设备类型">
|
|
|
|
<Form.Item name="equipmentType" label="所属设备类型">
|
|
|
|
<Input placeholder="请输入所属设备类型" />
|
|
|
|
<Input placeholder="请输入所属设备类型" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<div style={{ display: 'flex' }}>
|
|
|
|
<div style={{ display: 'flex' }}>
|
|
|
|
<Form.Item name="identifier" label="密码实体标识" rules={[{ required: true, message: '请选择密码实体标识' },]}>
|
|
|
|
<Form.Item 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="order" label="密码设备序号" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Form.Item name="passwordDeviceSerialNumber" label="密码设备序号" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Input placeholder="请选择密码设备序号" />
|
|
|
|
<Input placeholder="请输入密码设备序号" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<div style={{ marginLeft: '20px' }}>(如0000001)</div>
|
|
|
|
<div style={{ marginLeft: '20px' }}>(如0000001)</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Form.Item name="order" label="密码设备编号" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Form.Item name="passwordDeviceNumber" label="密码设备编号" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Input placeholder="请选择密码设备序号" />
|
|
|
|
<Input placeholder="请输入密码设备编号" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="order" 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="order" label="设备使用单位" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Form.Item name="equipmentUserUnit" label="设备使用单位" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Input placeholder="请选择密码设备序号" />
|
|
|
|
<Input placeholder="请输入设备使用单位" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="order" label="设备部署地点" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Form.Item name="equipmentDeploymentLocation" label="设备部署地点" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Input placeholder="请选择密码设备序号" />
|
|
|
|
<Input placeholder="请输入设备部署地点" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="order" label="设备管理单位" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Form.Item name="equipmentManagementUnit" label="设备管理单位" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Input placeholder="请选择密码设备序号" />
|
|
|
|
<Input placeholder="请选择设备管理单位" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="order" label="通信地址类型" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Form.Item name="communicationAddressType" label="通信地址类型" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Input placeholder="请选择密码设备序号" />
|
|
|
|
<Input placeholder="请选择通信地址类型" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="order" label="隔离器外网Ip" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Form.Item name="isolatorExternalNetworkIp" label="隔离器外网IP" rules={[{ required: true, message: '请选择密码设备序号' },]}>
|
|
|
|
<Input placeholder="请选择密码设备序号" />
|
|
|
|
<Input placeholder="请输入隔离器外网IP" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="order" label="设备生产厂商(可空)">
|
|
|
|
<Form.Item name="equipmentManufacturer" label="设备生产厂商(可空)">
|
|
|
|
<Input placeholder="请选择密码设备序号" />
|
|
|
|
<Input placeholder="请选择设备生产厂商" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="order" label="设备别名(可空)">
|
|
|
|
<Form.Item name="deviceAliases" label="设备别名(可空)">
|
|
|
|
<Input placeholder="请选择设备别名" />
|
|
|
|
<Input placeholder="请选择设备别名" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="order" label="备注信息(可空)">
|
|
|
|
<Form.Item name="memo" label="备注信息(可空)">
|
|
|
|
<Input placeholder="注册日期" />
|
|
|
|
<Input placeholder="请输入备注信息" />
|
|
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
<Form.Item name="registrationDate" label="注册日期(可空)">
|
|
|
|
|
|
|
|
<DatePicker />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
</Form>
|
|
|
|
</Form>
|
|
|
|
<div className='flex_jE mt20'>
|
|
|
|
<div className='flex_jE mt20'>
|
|
|
|
<ButtonComp style={{ marginRight: 20 }} text={'确定'} onClick={onOk} />
|
|
|
|
<ButtonComp style={{ marginRight: 20 }} text={'确定'} onClick={()=>{
|
|
|
|
|
|
|
|
form.submit();
|
|
|
|
|
|
|
|
// onOk();
|
|
|
|
|
|
|
|
}} />
|
|
|
|
<ButtonComp type="cancel" text={'取消'} onClick={onCancel} />
|
|
|
|
<ButtonComp type="cancel" text={'取消'} onClick={onCancel} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Modal>
|
|
|
|
</Modal>
|
|
|
|