From 853667f537f7562f38c937ae20a865332773e08f Mon Sep 17 00:00:00 2001 From: "peng.peng" Date: Mon, 6 Nov 2023 14:19:53 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BC=88*=EF=BC=89=E7=94=A8=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=9C=BA=E6=9E=84=E7=AE=A1=E7=90=86=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/app.js | 2 -- .../memberManagement/actions/index.js | 4 +++- .../actions/organization.js | 0 .../components/organizationModal.js | 0 .../memberManagement/containers/index.js | 4 ++-- .../memberManagement/containers/member.js | 2 +- .../containers/organization.js | 8 ++++---- .../src/sections/memberManagement/nav-item.js | 13 +++++++++--- .../src/sections/memberManagement/routes.js | 11 +++++++--- .../containers/latestMetadata.js | 2 +- .../sections/organization/actions/index.js | 2 +- .../sections/organization/containers/index.js | 5 ----- .../organization/containers/style.less | 5 ----- web/client/src/sections/organization/index.js | 15 -------------- .../src/sections/organization/nav-item.js | 20 ------------------- .../sections/organization/reducers/index.js | 5 ----- .../src/sections/organization/routes.js | 12 ----------- 17 files changed, 30 insertions(+), 80 deletions(-) rename web/client/src/sections/{organization => memberManagement}/actions/organization.js (100%) rename web/client/src/sections/{organization => memberManagement}/components/organizationModal.js (100%) rename web/client/src/sections/{organization => memberManagement}/containers/organization.js (94%) delete mode 100644 web/client/src/sections/organization/containers/index.js delete mode 100644 web/client/src/sections/organization/containers/style.less delete mode 100644 web/client/src/sections/organization/index.js delete mode 100644 web/client/src/sections/organization/nav-item.js delete mode 100644 web/client/src/sections/organization/reducers/index.js delete mode 100644 web/client/src/sections/organization/routes.js diff --git a/web/client/src/app.js b/web/client/src/app.js index 690698f..e1fea98 100644 --- a/web/client/src/app.js +++ b/web/client/src/app.js @@ -13,7 +13,6 @@ import dataQuality from './sections/dataQuality'; import safetySpecification from './sections/safetySpecification'; import backups from './sections/backups'; import dataService from './sections/dataService'; -import organization from './sections/organization' const App = props => { const { projectName } = props @@ -36,7 +35,6 @@ const App = props => { dataService, memberManagement, backups, - organization ]} /> ) diff --git a/web/client/src/sections/memberManagement/actions/index.js b/web/client/src/sections/memberManagement/actions/index.js index 5abd7d2..1a21b3f 100644 --- a/web/client/src/sections/memberManagement/actions/index.js +++ b/web/client/src/sections/memberManagement/actions/index.js @@ -1,6 +1,8 @@ 'use strict'; import * as member from './member'; +import * as organization from './organization'; export default { - ...member + ...member, + ...organization } \ No newline at end of file diff --git a/web/client/src/sections/organization/actions/organization.js b/web/client/src/sections/memberManagement/actions/organization.js similarity index 100% rename from web/client/src/sections/organization/actions/organization.js rename to web/client/src/sections/memberManagement/actions/organization.js diff --git a/web/client/src/sections/organization/components/organizationModal.js b/web/client/src/sections/memberManagement/components/organizationModal.js similarity index 100% rename from web/client/src/sections/organization/components/organizationModal.js rename to web/client/src/sections/memberManagement/components/organizationModal.js diff --git a/web/client/src/sections/memberManagement/containers/index.js b/web/client/src/sections/memberManagement/containers/index.js index b322ad1..27dfef9 100644 --- a/web/client/src/sections/memberManagement/containers/index.js +++ b/web/client/src/sections/memberManagement/containers/index.js @@ -1,5 +1,5 @@ 'use strict'; import MemberManagement from './member'; - -export { MemberManagement }; +import Organization from './organization'; +export { MemberManagement, Organization }; diff --git a/web/client/src/sections/memberManagement/containers/member.js b/web/client/src/sections/memberManagement/containers/member.js index d7c7599..0d2eafb 100644 --- a/web/client/src/sections/memberManagement/containers/member.js +++ b/web/client/src/sections/memberManagement/containers/member.js @@ -29,7 +29,7 @@ function Member(props) { useEffect(() => { queryData(); - dispatch(actions.organization.getOrganizationList()); + dispatch(actions.memberManagement.getOrganizationList()); }, [pageSize, currentPage]); const columns = [ diff --git a/web/client/src/sections/organization/containers/organization.js b/web/client/src/sections/memberManagement/containers/organization.js similarity index 94% rename from web/client/src/sections/organization/containers/organization.js rename to web/client/src/sections/memberManagement/containers/organization.js index 62b814b..0efed38 100644 --- a/web/client/src/sections/organization/containers/organization.js +++ b/web/client/src/sections/memberManagement/containers/organization.js @@ -23,7 +23,7 @@ function organization(props) { role: searchRole } - dispatch(actions.organization.getOrganizationList(query)); + dispatch(actions.memberManagement.getOrganizationList(query)); } useEffect(() => { @@ -83,7 +83,7 @@ function organization(props) { ]; const handleDelete = (id) => { - dispatch(actions.organization.deleteOrganization(id)).then(() => { + dispatch(actions.memberManagement.deleteOrganization(id)).then(() => { queryData(); }); }; @@ -92,7 +92,7 @@ function organization(props) { if (editData) { const dataToSave = { ...values } return dispatch( - actions.organization.modifyOrganization(editData.id, dataToSave, values?.msg || ''), + actions.memberManagement.modifyOrganization(editData.id, dataToSave, values?.msg || ''), ).then((res) => { if (res.success) { queryData(); @@ -103,7 +103,7 @@ function organization(props) { }); } - return dispatch(actions.organization.addOrganization({ + return dispatch(actions.memberManagement.addOrganization({ ...values, })).then(res => { if (res.success) { diff --git a/web/client/src/sections/memberManagement/nav-item.js b/web/client/src/sections/memberManagement/nav-item.js index baa19f7..1a1719c 100644 --- a/web/client/src/sections/memberManagement/nav-item.js +++ b/web/client/src/sections/memberManagement/nav-item.js @@ -7,9 +7,16 @@ const SubMenu = Menu.SubMenu; export function getNavItem(user) { return ( - user?.username == 'SuperAdmin' && } key="auth"> - 用户管理 - + user?.username == 'SuperAdmin' && } title='统一用户管理'> + + 用户管理 + + + 机构管理 + + + // user?.role == '系统管理员' && } title='用户管理'> // // 用户权限 diff --git a/web/client/src/sections/memberManagement/routes.js b/web/client/src/sections/memberManagement/routes.js index 91e3250..57c6f78 100644 --- a/web/client/src/sections/memberManagement/routes.js +++ b/web/client/src/sections/memberManagement/routes.js @@ -1,17 +1,22 @@ 'use strict'; -import { MemberManagement } from './containers'; +import { MemberManagement, Organization } from './containers'; export default [{ type: 'inner', route: { path: '/memberManagement', key: 'memberManagement', - breadcrumb: '用户管理', + breadcrumb: '统一用户管理', // 不设置 component 则面包屑禁止跳转 childRoutes: [{ path: '/auth', key: 'auth', component: MemberManagement, - breadcrumb: '权限管理' + breadcrumb: '用户管理' + }, { + path: '/organization', + key: 'organization', + component: MemberManagement, + breadcrumb: '机构管理' }] } }]; \ No newline at end of file diff --git a/web/client/src/sections/metadataManagement/containers/latestMetadata.js b/web/client/src/sections/metadataManagement/containers/latestMetadata.js index ed9434f..d61e75b 100644 --- a/web/client/src/sections/metadataManagement/containers/latestMetadata.js +++ b/web/client/src/sections/metadataManagement/containers/latestMetadata.js @@ -32,7 +32,7 @@ const LatestMetadata = (props) => { useEffect(() => { const jumpSelectedKey = sessionStorage.getItem('jumpSelectedKey') || null; initData(true, jumpSelectedKey); - dispatch(actions.organization.getOrganizationList()); + dispatch(actions.memberManagement.getOrganizationList()); }, []) const initData = (configRefresh, jumpSelectedKey) => { dispatch(metadataManagement.getResourceCatalog()).then(res => { diff --git a/web/client/src/sections/organization/actions/index.js b/web/client/src/sections/organization/actions/index.js index d5ff79e..f2e6538 100644 --- a/web/client/src/sections/organization/actions/index.js +++ b/web/client/src/sections/organization/actions/index.js @@ -1,6 +1,6 @@ 'use strict'; -import * as member from './organization'; +import * as member from '../../memberManagement/actions/organization'; export default { ...member } \ No newline at end of file diff --git a/web/client/src/sections/organization/containers/index.js b/web/client/src/sections/organization/containers/index.js deleted file mode 100644 index ac6d772..0000000 --- a/web/client/src/sections/organization/containers/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -import Organization from './organization'; - -export { Organization }; diff --git a/web/client/src/sections/organization/containers/style.less b/web/client/src/sections/organization/containers/style.less deleted file mode 100644 index 8219c4f..0000000 --- a/web/client/src/sections/organization/containers/style.less +++ /dev/null @@ -1,5 +0,0 @@ -.protable-title { - margin-bottom: 16px; - padding-left: 24px; - padding-right: 24px; -} \ No newline at end of file diff --git a/web/client/src/sections/organization/index.js b/web/client/src/sections/organization/index.js deleted file mode 100644 index 535f432..0000000 --- a/web/client/src/sections/organization/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -import reducers from './reducers'; -import routes from './routes'; -import actions from './actions'; -import { getNavItem } from './nav-item'; - -export default { - key: 'organization', - name: '机构管理', - reducers: reducers, - routes: routes, - actions: actions, - getNavItem: getNavItem -}; \ No newline at end of file diff --git a/web/client/src/sections/organization/nav-item.js b/web/client/src/sections/organization/nav-item.js deleted file mode 100644 index 0514371..0000000 --- a/web/client/src/sections/organization/nav-item.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router-dom'; -import { Menu } from 'antd'; -import { UserOutlined } from '@ant-design/icons'; -const SubMenu = Menu.SubMenu; - -export function getNavItem(user) { - - return ( - user?.username == 'SuperAdmin' && } key="organization"> - 机构管理 - - // user?.role == '系统管理员' && } title='用户管理'> - // - // 用户权限 - // - // - ) - -} \ No newline at end of file diff --git a/web/client/src/sections/organization/reducers/index.js b/web/client/src/sections/organization/reducers/index.js deleted file mode 100644 index 7ed1088..0000000 --- a/web/client/src/sections/organization/reducers/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -export default { - -} \ No newline at end of file diff --git a/web/client/src/sections/organization/routes.js b/web/client/src/sections/organization/routes.js deleted file mode 100644 index 6d19150..0000000 --- a/web/client/src/sections/organization/routes.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; -import { Organization } from './containers'; -export default [{ - type: 'inner', - route: { - path: '/organization', - key: 'organization', - breadcrumb: '机构管理', - component: Organization, - - } -}]; \ No newline at end of file