|
|
@ -10,7 +10,8 @@ function Member(props) { |
|
|
|
const { loading, clientHeight, actions, dispatch, backups, user, dataSources } = props; |
|
|
|
const [pageSize, setPageSize] = useState(10); |
|
|
|
const [currentPage, setCurrentPage] = useState(1); |
|
|
|
const [searchValue, setSearchValue] = useState('') |
|
|
|
const [searchValue, setSearchValue] = useState(''); |
|
|
|
const [addLoading, setAddLoading] = useState(false) |
|
|
|
const queryData = (search) => { |
|
|
|
const query = { |
|
|
|
limit: search ? 10 : pageSize || 10, |
|
|
@ -59,8 +60,6 @@ function Member(props) { |
|
|
|
valueType: 'option', |
|
|
|
render: (text, record) => { |
|
|
|
const options = []; |
|
|
|
|
|
|
|
|
|
|
|
options.push( |
|
|
|
<Popconfirm |
|
|
|
key="del" |
|
|
@ -102,9 +101,11 @@ function Member(props) { |
|
|
|
}; |
|
|
|
|
|
|
|
const onFinish = async (values, editData) => { |
|
|
|
setAddLoading(true) |
|
|
|
return dispatch(actions.backups.addBackups({ |
|
|
|
...values, |
|
|
|
})).then(res => { |
|
|
|
setAddLoading(false) |
|
|
|
if (res.success) { |
|
|
|
queryData(); |
|
|
|
return true; |
|
|
@ -114,7 +115,7 @@ function Member(props) { |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
return <Spin spinning={loading}> |
|
|
|
return <Spin spinning={loading || addLoading}> |
|
|
|
<Row className='protable-title'> |
|
|
|
<Col span={12}> |
|
|
|
<BackupsModal |
|
|
|