|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
*/
|
|
|
|
|
import { putDeviceCategoryUpdateDeviceCategory } from '@/services/device/DeviceCategory';
|
|
|
|
|
import { postDeviceGroupGetDeviceGroupFkSelect } from '@/services/device/DeviceGroup';
|
|
|
|
|
import { postInterfaces, postTestDevice } from '@/services/alarm/Interfaces';
|
|
|
|
|
import { postInterfacesUpload, getInterfacesUpload } from '@/services/alarm/Interfaces';
|
|
|
|
|
import { ModalForm, ProForm, ProFormFieldSet, ProFormSelect, ProFormSwitch, ProFormText, ProFormTextArea } from '@ant-design/pro-components';
|
|
|
|
|
import { FormattedMessage, useIntl } from '@umijs/max';
|
|
|
|
|
import { Button, Form, message } from 'antd';
|
|
|
|
@ -36,43 +36,50 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
const [form] = Form.useForm<API.UpdateInterfacesParams>();
|
|
|
|
|
const [loading, setLoading] = useState<boolean>(false);
|
|
|
|
|
const [fileType, setFileType] = useState<string>('1');
|
|
|
|
|
const [fileMethod, setFileMethod] = useState<string>('pull');
|
|
|
|
|
const [methodName, setMethodName] = useState<string>('0');
|
|
|
|
|
const connection = () => {
|
|
|
|
|
setLoading(true);
|
|
|
|
|
console.log(props.values);
|
|
|
|
|
postTestDevice({
|
|
|
|
|
device_ip: form.getFieldsValue().device_ip,
|
|
|
|
|
id: props.values.id,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
// message.success(intl.formatMessage({ id: 'common.success', defaultMessage: '成功' }));
|
|
|
|
|
// props.reload();
|
|
|
|
|
console.log(res);
|
|
|
|
|
if(res.success) {
|
|
|
|
|
message.success(res.msg);
|
|
|
|
|
}
|
|
|
|
|
setLoading(false);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
message.error(intl.formatMessage({ id: 'common.failure', defaultMessage: '失败' }));
|
|
|
|
|
setLoading(false);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const [fileMethod, setFileMethod] = useState<number>(props.values.upload_or_download);
|
|
|
|
|
const [methodName, setMethodName] = useState<number>(props.values.operate_mode);
|
|
|
|
|
|
|
|
|
|
const handleChangeFileType = (value: string) => {
|
|
|
|
|
const handleChangeFileType = async (value: number) => {
|
|
|
|
|
setFileMethod(value);
|
|
|
|
|
// 根据选择的获取方式更新第二个下拉框的值
|
|
|
|
|
if (value === 2) {
|
|
|
|
|
setMethodName(1); // 设置为初始值 '0',只展示FTP选项
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
operate_mode: 1, // 设置第二个下拉框的值
|
|
|
|
|
device_ip: props.values.device_ip,
|
|
|
|
|
device_port: props.values.device_port,
|
|
|
|
|
device_username: props.values.device_username,
|
|
|
|
|
device_password: props.values.device_password,
|
|
|
|
|
source_directory: props.values.source_directory,
|
|
|
|
|
});
|
|
|
|
|
} else if (value === 1) {
|
|
|
|
|
setMethodName(2); // 设置为 '2',只展示FTP上传选项
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
operate_mode: 2, // 设置第二个下拉框的值
|
|
|
|
|
});
|
|
|
|
|
await getInterfacesUpload({ 'templet': true })
|
|
|
|
|
.then( (resp)=> {
|
|
|
|
|
const{ data } = resp
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
device_ip: data.device_ip,
|
|
|
|
|
device_port: data.device_port,
|
|
|
|
|
device_username: data.device_username,
|
|
|
|
|
device_password: data.device_password,
|
|
|
|
|
destination_directory: data.destination_directory,
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const handleChangeFile = (value: string) => {
|
|
|
|
|
const handleChangeFile = (value: number) => {
|
|
|
|
|
setMethodName(value);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (fileMethod === 'upload' && methodName === '2') {
|
|
|
|
|
if (fileMethod === 1 && methodName === 2) {
|
|
|
|
|
setFileType(() => {
|
|
|
|
|
return '3';
|
|
|
|
|
});
|
|
|
|
|
} else if (fileMethod === 'pull' && methodName === '1') {
|
|
|
|
|
} else if (fileMethod === 2 && methodName === 3) {
|
|
|
|
|
setFileType(() => {
|
|
|
|
|
return '2';
|
|
|
|
|
});
|
|
|
|
@ -82,6 +89,23 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, [methodName, fileMethod]);
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
setFileMethod(props.values.upload_or_download);
|
|
|
|
|
setMethodName(props.values.operate_mode);
|
|
|
|
|
if (fileMethod === 1 && methodName === 2) {
|
|
|
|
|
setFileType(() => {
|
|
|
|
|
return '3';
|
|
|
|
|
});
|
|
|
|
|
} else if (fileMethod === 2 && methodName === 3) {
|
|
|
|
|
setFileType(() => {
|
|
|
|
|
return '2';
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
setFileType(() => {
|
|
|
|
|
return '1';
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, [props.updateModalOpen]);
|
|
|
|
|
return (
|
|
|
|
|
<ModalForm<any>
|
|
|
|
|
width={proFormSmallModelWidth}
|
|
|
|
@ -105,7 +129,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
onFinish={async (values) => {
|
|
|
|
|
console.log(values);
|
|
|
|
|
values.id = props.values.id
|
|
|
|
|
postInterfaces(values)
|
|
|
|
|
postInterfacesUpload(values)
|
|
|
|
|
.then(() => {
|
|
|
|
|
message.success(intl.formatMessage({ id: 'common.success', defaultMessage: '成功' }));
|
|
|
|
|
props.reload();
|
|
|
|
@ -135,6 +159,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.name',
|
|
|
|
|
defaultMessage: '接口名称',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.device_name}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -155,81 +180,64 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
width={250}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: 'pull',
|
|
|
|
|
value: 2,
|
|
|
|
|
label: '文件拉取',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'upload',
|
|
|
|
|
value: 1,
|
|
|
|
|
label: '文件上传',
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
onChange={handleChangeFileType}
|
|
|
|
|
initialValue={fileMethod}
|
|
|
|
|
name="fileType"
|
|
|
|
|
initialValue={props.values.upload_or_download}
|
|
|
|
|
name="upload_or_download"
|
|
|
|
|
// label="获取方式"
|
|
|
|
|
/>
|
|
|
|
|
{/* <ProFormSelect
|
|
|
|
|
width={250}
|
|
|
|
|
options={
|
|
|
|
|
fileMethod === 2
|
|
|
|
|
? [
|
|
|
|
|
{
|
|
|
|
|
value: 0,
|
|
|
|
|
label: 'FTP',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 1,
|
|
|
|
|
label: '文件系统',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: [
|
|
|
|
|
{
|
|
|
|
|
value: 2,
|
|
|
|
|
label: 'FTP上传',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
initialValue={props.values.operate_mode}
|
|
|
|
|
onChange={handleChangeFile}
|
|
|
|
|
name="file"
|
|
|
|
|
// label="获取方式"
|
|
|
|
|
/> */}
|
|
|
|
|
<ProFormSelect
|
|
|
|
|
width={250}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: '0',
|
|
|
|
|
label: 'FTP',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '1',
|
|
|
|
|
label: '文件系统',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '2',
|
|
|
|
|
label: 'FTP上传',
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
initialValue={methodName}
|
|
|
|
|
{ value: 1, label: 'FTP' },
|
|
|
|
|
{ value: 2, label: 'FTP上传' },
|
|
|
|
|
{ value: 3, label: '文件系统' },
|
|
|
|
|
].filter(option => (fileMethod === 2 ? option.value !== 2 : option.value === 2))}
|
|
|
|
|
initialValue={props.values.operate_mode}
|
|
|
|
|
onChange={handleChangeFile}
|
|
|
|
|
name="file"
|
|
|
|
|
name="operate_mode"
|
|
|
|
|
// label="获取方式"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{/* <ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width - 96}
|
|
|
|
|
name="device_ip"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage id="device.interface_manage.table.list.ip" defaultMessage="IP地址" />
|
|
|
|
|
}
|
|
|
|
|
placeholder={`${intl.formatMessage({
|
|
|
|
|
id: 'common.please_input',
|
|
|
|
|
defaultMessage: '请输入',
|
|
|
|
|
})}${intl.formatMessage({
|
|
|
|
|
id: 'device.interface_manage.table.list.ip',
|
|
|
|
|
defaultMessage: 'IP地址',
|
|
|
|
|
})}`}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: (
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.rule.required.ip"
|
|
|
|
|
defaultMessage="IP地址为必填项"
|
|
|
|
|
/>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
addonAfter={
|
|
|
|
|
<Button
|
|
|
|
|
style={{ width:86,height:32,border:'1px solid #081FA8',borderRadius:4,fontSize: 14,color:'#081FA8' }}
|
|
|
|
|
loading={loading}
|
|
|
|
|
onClick={() => connection()}>
|
|
|
|
|
{ loading ? '' : '连接测试'}
|
|
|
|
|
</Button>
|
|
|
|
|
}
|
|
|
|
|
/> */}
|
|
|
|
|
{fileType === '1' && (
|
|
|
|
|
<ProForm.Group>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
width={proFormSmallItemStyleProps.width / 2 - 8}
|
|
|
|
|
name="device_ip"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.ip"
|
|
|
|
@ -244,6 +252,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
defaultMessage: '接口地址',
|
|
|
|
|
})}`}
|
|
|
|
|
required={true}
|
|
|
|
|
initialValue={props.values.device_ip}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
@ -257,8 +266,8 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
width={proFormSmallItemStyleProps.width / 2 - 8}
|
|
|
|
|
name="device_port"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.port"
|
|
|
|
@ -272,6 +281,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.port',
|
|
|
|
|
defaultMessage: '端口',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.device_port}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -286,8 +296,8 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
width={proFormSmallItemStyleProps.width / 2 - 8}
|
|
|
|
|
name="device_username"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.loginName"
|
|
|
|
@ -301,6 +311,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.loginName',
|
|
|
|
|
defaultMessage: '登录名',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.device_username}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -315,8 +326,8 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
width={proFormSmallItemStyleProps.width / 2 - 8}
|
|
|
|
|
name="device_password"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.password"
|
|
|
|
@ -330,6 +341,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.password',
|
|
|
|
|
defaultMessage: '密码',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.device_password}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -345,7 +357,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
name="source_directory"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.fileDirectory"
|
|
|
|
@ -359,6 +371,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.fileDirectory',
|
|
|
|
|
defaultMessage: '文件目录',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.source_directory}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -378,7 +391,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
<ProForm.Group>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
name="device_ip"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.requestAddress"
|
|
|
|
@ -392,6 +405,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.requestAddress',
|
|
|
|
|
defaultMessage: '请求地址',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.device_ip}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -407,7 +421,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
name="access_key_id"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.requestKey"
|
|
|
|
@ -421,6 +435,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.requestKey',
|
|
|
|
|
defaultMessage: '请求Key',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.access_key_id}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -436,7 +451,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
name="access_key_secret"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.secretKey"
|
|
|
|
@ -450,6 +465,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.secretKey',
|
|
|
|
|
defaultMessage: '秘钥',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.access_key_secret}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -465,7 +481,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
name="bucket"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.bucket"
|
|
|
|
@ -479,6 +495,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.bucket',
|
|
|
|
|
defaultMessage: 'Bucket',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.bucket}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -497,39 +514,39 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
{fileType === '3' && (
|
|
|
|
|
<ProForm.Group>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
width={proFormSmallItemStyleProps.width / 2 - 8}
|
|
|
|
|
name="device_ip"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.Code"
|
|
|
|
|
defaultMessage="Code"
|
|
|
|
|
id="device.interface_manage.table.list.ip"
|
|
|
|
|
defaultMessage="ip"
|
|
|
|
|
/>
|
|
|
|
|
}
|
|
|
|
|
placeholder={`${intl.formatMessage({
|
|
|
|
|
id: 'common.please_input',
|
|
|
|
|
defaultMessage: '请输入',
|
|
|
|
|
})}${intl.formatMessage({
|
|
|
|
|
id: 'device.interface_manage.table.list.Code',
|
|
|
|
|
defaultMessage: 'Code',
|
|
|
|
|
id: 'device.interface_manage.table.list.ip',
|
|
|
|
|
defaultMessage: 'ip',
|
|
|
|
|
})}`}
|
|
|
|
|
disabled
|
|
|
|
|
initialValue={props.values.device_ip}
|
|
|
|
|
required={true}
|
|
|
|
|
initialValue={'123'}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: (
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.rule.required.Code"
|
|
|
|
|
defaultMessage="Code为必填项"
|
|
|
|
|
id="device.interface_manage.table.rule.required.ip"
|
|
|
|
|
defaultMessage="ip为必填项"
|
|
|
|
|
/>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
width={proFormSmallItemStyleProps.width / 2 - 8}
|
|
|
|
|
name="device_port"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.port"
|
|
|
|
@ -544,6 +561,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.port',
|
|
|
|
|
defaultMessage: '端口',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.device_port}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -558,8 +576,8 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
width={proFormSmallItemStyleProps.width / 2 - 8}
|
|
|
|
|
name="device_username"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.loginName"
|
|
|
|
@ -574,6 +592,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.loginName',
|
|
|
|
|
defaultMessage: '登录名',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.device_username}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -588,8 +607,8 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
width={proFormSmallItemStyleProps.width / 2 - 8}
|
|
|
|
|
name="device_password"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.password"
|
|
|
|
@ -604,6 +623,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.password',
|
|
|
|
|
defaultMessage: '密码',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.device_password}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -619,7 +639,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText
|
|
|
|
|
width={proFormSmallItemStyleProps.width}
|
|
|
|
|
name="device_api"
|
|
|
|
|
name="destination_directory"
|
|
|
|
|
label={
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
id="device.interface_manage.table.list.fileDirectory"
|
|
|
|
@ -634,6 +654,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.fileDirectory',
|
|
|
|
|
defaultMessage: '文件目录',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.destination_directory}
|
|
|
|
|
required={true}
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
@ -665,6 +686,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|
|
|
|
id: 'device.interface_manage.table.list.remark',
|
|
|
|
|
defaultMessage: '备注',
|
|
|
|
|
})}`}
|
|
|
|
|
initialValue={props.values.note}
|
|
|
|
|
required={false}
|
|
|
|
|
/>
|
|
|
|
|
</ProForm.Group>
|
|
|
|
|