diff --git a/api/app/lib/controllers/backups/index.js b/api/app/lib/controllers/backups/index.js index 7198a6e..7cb1c4b 100644 --- a/api/app/lib/controllers/backups/index.js +++ b/api/app/lib/controllers/backups/index.js @@ -8,7 +8,7 @@ function getBackupsList(opts) { let errMsg = { message: '获取数据备份失败' } try { let searchWhere = { - + } let option = { where: searchWhere, diff --git a/web/client/src/sections/backups/containers/backupTask.js b/web/client/src/sections/backups/containers/backupTask.js index 14f6c82..8243bc1 100644 --- a/web/client/src/sections/backups/containers/backupTask.js +++ b/web/client/src/sections/backups/containers/backupTask.js @@ -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( { + 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 + return } title='数据备份恢复'> + user?.role == '系统管理员' && } title='数据备份恢复'> 备份恢复 diff --git a/web/client/src/sections/backups/routes.js b/web/client/src/sections/backups/routes.js index 935dda3..8bbbbc0 100644 --- a/web/client/src/sections/backups/routes.js +++ b/web/client/src/sections/backups/routes.js @@ -5,7 +5,7 @@ export default [{ route: { path: '/backups', key: 'backups', - breadcrumb: '用户管理', + breadcrumb: '数据备份恢复', // 不设置 component 则面包屑禁止跳转 childRoutes: [{ path: '/restore', diff --git a/web/client/src/sections/memberManagement/nav-item.js b/web/client/src/sections/memberManagement/nav-item.js index 1615180..ba32aaf 100644 --- a/web/client/src/sections/memberManagement/nav-item.js +++ b/web/client/src/sections/memberManagement/nav-item.js @@ -1,13 +1,13 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { Menu } from 'antd'; -import { BarChartOutlined } from '@ant-design/icons'; +import { UserOutlined } from '@ant-design/icons'; const SubMenu = Menu.SubMenu; export function getNavItem(user) { return ( - user?.role == '系统管理员' && } title='用户管理'> + user?.role == '系统管理员' && } title='用户管理'> 用户权限 diff --git a/web/client/src/sections/resourceRetrieval/containers/retrieval.js b/web/client/src/sections/resourceRetrieval/containers/retrieval.js index b80e07f..f2a23c6 100644 --- a/web/client/src/sections/resourceRetrieval/containers/retrieval.js +++ b/web/client/src/sections/resourceRetrieval/containers/retrieval.js @@ -181,7 +181,11 @@ function Retrieval(props) { : <> { setKeywords(value) }} + + onSearch={value => { + setPage(1) + setKeywords(value) + }} /> {result?.rows?.slice((page - 1) * 10, (page - 1) * 10 + 10).map(s => { const catalogText = renderCatalog(s?.catalog).split('/').reverse().toString().replaceAll(',', '/') @@ -212,9 +216,11 @@ function Retrieval(props) { })} {result?.rows?.length > 0 && `共 ${total} 条数据`} + showSizeChanger={false} onChange={(page, pageSize) => { setPage(page) }}