From 1d3b753cbd3a0f19b6aa066d2318fb6c4d456cd1 Mon Sep 17 00:00:00 2001 From: chizhehui Date: Sat, 13 Jul 2024 14:36:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=B2=BE=E7=AE=80=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91=E9=85=8D=E7=BD=AE=E8=A1=A8=E3=80=81minio=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=A1=A8=E3=80=81=E8=85=BE=E8=AE=AF=E4=BA=91=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=A1=A8=E3=80=81=E4=B8=83=E7=89=9B=E4=BA=91=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=A1=A8=E3=80=81up=E9=85=8D=E7=BD=AE=E8=A1=A8?= =?UTF-8?q?=E3=80=81sftp=E9=85=8D=E7=BD=AE=E8=A1=A8=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Ali/index.tsx | 25 +--- src/pages/Minio/index.tsx | 12 +- src/pages/Permission/index.tsx | 2 +- src/pages/Qiniu/index.tsx | 21 +-- src/pages/Role/index.tsx | 2 +- src/pages/Sftp/index.tsx | 17 +-- src/pages/Tencent/index.tsx | 23 +--- src/pages/Up/index.tsx | 22 +--- src/pages/Users/components/UpdateForm.tsx | 150 +++++++++++++++++++--- src/pages/Users/index.tsx | 2 +- 10 files changed, 141 insertions(+), 135 deletions(-) diff --git a/src/pages/Ali/index.tsx b/src/pages/Ali/index.tsx index 2df473e..d9ef9ce 100644 --- a/src/pages/Ali/index.tsx +++ b/src/pages/Ali/index.tsx @@ -109,21 +109,6 @@ const User: React.FC = () => { dataIndex: 'endpoint', valueType: 'text', }, - { - title: 'access_key_id', - dataIndex: 'AccessKey ID', - valueType: 'text', - }, - { - title: 'access_key_secret', - dataIndex: 'AccessKey Secret', - valueType: 'text', - }, - { - title: 'security_token', - dataIndex: 'security Token', - valueType: 'text', - }, { title: 'Bucket名称', dataIndex: 'bucket_name', @@ -139,15 +124,9 @@ const User: React.FC = () => { dataIndex: 'user_agent', valueType: 'text', }, + { - title: '失败后最大重试次数', - dataIndex: 'max_error_retry', - default: '3', - tip: '请求失败后最大的重试次数。默认3次。', - valueType: 'text', - }, - { - title: '注册时间', + title: '创建时间', dataIndex: 'create_time', valueType: 'dateTime', }, diff --git a/src/pages/Minio/index.tsx b/src/pages/Minio/index.tsx index e36ffb9..786d93f 100644 --- a/src/pages/Minio/index.tsx +++ b/src/pages/Minio/index.tsx @@ -130,17 +130,7 @@ const User: React.FC = () => { valueType: 'text', }, { - title: 'file_host', - dataIndex: 'file_host', - valueType: 'text', - }, - { - title: 'download_host', - dataIndex: 'download_host', - valueType: 'text', - }, - { - title: '注册时间', + title: '创建时间', dataIndex: 'create_time', valueType: 'dateTime', }, diff --git a/src/pages/Permission/index.tsx b/src/pages/Permission/index.tsx index fef0274..3937515 100644 --- a/src/pages/Permission/index.tsx +++ b/src/pages/Permission/index.tsx @@ -127,7 +127,7 @@ const User: React.FC = () => { valueType: 'text', }, { - title: '注册时间', + title: '创建时间', dataIndex: 'create_time', valueType: 'dateTime', }, diff --git a/src/pages/Qiniu/index.tsx b/src/pages/Qiniu/index.tsx index 4f48df1..7cb4830 100644 --- a/src/pages/Qiniu/index.tsx +++ b/src/pages/Qiniu/index.tsx @@ -130,26 +130,7 @@ const User: React.FC = () => { valueType: 'text', }, { - title: '使用的Region', - dataIndex: 'region', - valueType: 'text', - }, - { - title: '是否使用https', - tip: '空间相关上传管理操作是否使用 https , 默认 是', - default: '1', - dataIndex: 'use_https_domains', - valueType: 'text', - }, - { - title: '是否使用代理加速上传', - tip: '空间相关上传管理操作是否使用代理加速上传,默认 是', - default: '1', - dataIndex: 'acc_up_host_first', - valueType: 'text', - }, - { - title: '注册时间', + title: '创建时间', dataIndex: 'create_time', valueType: 'dateTime', }, diff --git a/src/pages/Role/index.tsx b/src/pages/Role/index.tsx index f7500bb..258c64a 100644 --- a/src/pages/Role/index.tsx +++ b/src/pages/Role/index.tsx @@ -119,7 +119,7 @@ const User: React.FC = () => { }, }, { - title: '注册时间', + title: '创建时间', dataIndex: 'create_time', valueType: 'dateTime', }, diff --git a/src/pages/Sftp/index.tsx b/src/pages/Sftp/index.tsx index bbafc12..32bc183 100644 --- a/src/pages/Sftp/index.tsx +++ b/src/pages/Sftp/index.tsx @@ -136,22 +136,7 @@ const User: React.FC = () => { valueType: 'text', }, { - title: '连接超时时长,单位毫秒', - dataIndex: 'connection_timeout', - valueType: 'text', - }, - { - title: 'Socket连接超时时长,单位毫秒', - dataIndex: 'so_timeout', - valueType: 'text', - }, - { - title: '设置服务器语言', - dataIndex: 'server_language_code', - valueType: 'text', - }, - { - title: '注册时间', + title: '创建时间', dataIndex: 'create_time', valueType: 'dateTime', }, diff --git a/src/pages/Tencent/index.tsx b/src/pages/Tencent/index.tsx index f0efa75..063c656 100644 --- a/src/pages/Tencent/index.tsx +++ b/src/pages/Tencent/index.tsx @@ -132,28 +132,7 @@ const User: React.FC = () => { valueType: 'text', }, { - title: '使用的Region', - dataIndex: 'region', - valueType: 'text', - }, - { - title: '域名后缀', - dataIndex: 'end_point_suffix', - valueType: 'text', - }, - { - title: 'http proxy代理', - tip: 'http proxy代理,如果使用http proxy代理,需要设置IP与端口', - dataIndex: 'http_proxy_Ip', - valueType: 'text', - }, - { - title: '代理服务器端口', - dataIndex: 'http_proxy_port', - valueType: 'text', - }, - { - title: '注册时间', + title: '创建时间', dataIndex: 'create_time', valueType: 'dateTime', }, diff --git a/src/pages/Up/index.tsx b/src/pages/Up/index.tsx index 7445345..f7fcf63 100644 --- a/src/pages/Up/index.tsx +++ b/src/pages/Up/index.tsx @@ -129,28 +129,8 @@ const User: React.FC = () => { dataIndex: 'base_path', valueType: 'text', }, - { - title: '分片大小', - default: '5', - dataIndex: 'part_size', - valueType: 'text', - }, - { - title: '超时时间', - tip: '默认的超时时间:30秒', - default: '30', - dataIndex: 'timeout', - valueType: 'text', - }, - { - title: '接入点', - tip: '默认为自动识别接入点', - dataIndex: 'api_domain', - valueType: 'text', - }, - { - title: '注册时间', + title: '创建时间', dataIndex: 'create_time', valueType: 'dateTime', }, diff --git a/src/pages/Users/components/UpdateForm.tsx b/src/pages/Users/components/UpdateForm.tsx index e5233db..32fecde 100644 --- a/src/pages/Users/components/UpdateForm.tsx +++ b/src/pages/Users/components/UpdateForm.tsx @@ -1,26 +1,138 @@ +import { + ProFormDateTimePicker, + ProFormRadio, + ProFormSelect, + ProFormText, + ProFormTextArea, + StepsForm, +} from '@ant-design/pro-components'; import { Modal } from 'antd'; -import React, { PropsWithChildren } from 'react'; +import React from 'react'; -interface CreateFormProps { - modalVisible: boolean; - onCancel: () => void; +export interface FormValueType extends Partial { + target?: string; + template?: string; + type?: string; + time?: string; + frequency?: string; } -const CreateForm: React.FC> = (props) => { - const { modalVisible, onCancel } = props; +export interface UpdateFormProps { + onCancel: (flag?: boolean, formVals?: FormValueType) => void; + onSubmit: (values: FormValueType) => Promise; + updateModalVisible: boolean; + values: Partial; +} - return ( - onCancel()} - footer={null} +const UpdateForm: React.FC = (props) => ( + { + return ( + props.onCancel()} + > + {dom} + + ); + }} + onFinish={props.onSubmit} + > + - {props.children} - - ); -}; + + + + + + + + + + + + + +); -export default CreateForm; +export default UpdateForm; diff --git a/src/pages/Users/index.tsx b/src/pages/Users/index.tsx index c77e7e8..774e33e 100644 --- a/src/pages/Users/index.tsx +++ b/src/pages/Users/index.tsx @@ -10,7 +10,7 @@ import { import { Button, Divider, Drawer, message } from 'antd'; import React, { useRef, useState } from 'react'; import CreateForm from './components/CreateForm'; -//import UpdateForm, { FormValueType } from './components/UpdateForm'; +import UpdateForm, { FormValueType } from './components/UpdateForm'; const { addUser, queryUserList, deleteUser, modifyUser } = services.UserController;