Browse Source

(*)用户管理机构管理合并

master
peng.peng 1 year ago
parent
commit
853667f537
  1. 2
      web/client/src/app.js
  2. 4
      web/client/src/sections/memberManagement/actions/index.js
  3. 0
      web/client/src/sections/memberManagement/actions/organization.js
  4. 0
      web/client/src/sections/memberManagement/components/organizationModal.js
  5. 4
      web/client/src/sections/memberManagement/containers/index.js
  6. 2
      web/client/src/sections/memberManagement/containers/member.js
  7. 8
      web/client/src/sections/memberManagement/containers/organization.js
  8. 13
      web/client/src/sections/memberManagement/nav-item.js
  9. 11
      web/client/src/sections/memberManagement/routes.js
  10. 2
      web/client/src/sections/metadataManagement/containers/latestMetadata.js
  11. 2
      web/client/src/sections/organization/actions/index.js
  12. 5
      web/client/src/sections/organization/containers/index.js
  13. 5
      web/client/src/sections/organization/containers/style.less
  14. 15
      web/client/src/sections/organization/index.js
  15. 20
      web/client/src/sections/organization/nav-item.js
  16. 5
      web/client/src/sections/organization/reducers/index.js
  17. 12
      web/client/src/sections/organization/routes.js

2
web/client/src/app.js

@ -13,7 +13,6 @@ import dataQuality from './sections/dataQuality';
import safetySpecification from './sections/safetySpecification'; import safetySpecification from './sections/safetySpecification';
import backups from './sections/backups'; import backups from './sections/backups';
import dataService from './sections/dataService'; import dataService from './sections/dataService';
import organization from './sections/organization'
const App = props => { const App = props => {
const { projectName } = props const { projectName } = props
@ -36,7 +35,6 @@ const App = props => {
dataService, dataService,
memberManagement, memberManagement,
backups, backups,
organization
]} ]}
/> />
) )

4
web/client/src/sections/memberManagement/actions/index.js

@ -1,6 +1,8 @@
'use strict'; 'use strict';
import * as member from './member'; import * as member from './member';
import * as organization from './organization';
export default { export default {
...member ...member,
...organization
} }

0
web/client/src/sections/organization/actions/organization.js → web/client/src/sections/memberManagement/actions/organization.js

0
web/client/src/sections/organization/components/organizationModal.js → web/client/src/sections/memberManagement/components/organizationModal.js

4
web/client/src/sections/memberManagement/containers/index.js

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import MemberManagement from './member'; import MemberManagement from './member';
import Organization from './organization';
export { MemberManagement }; export { MemberManagement, Organization };

2
web/client/src/sections/memberManagement/containers/member.js

@ -29,7 +29,7 @@ function Member(props) {
useEffect(() => { useEffect(() => {
queryData(); queryData();
dispatch(actions.organization.getOrganizationList()); dispatch(actions.memberManagement.getOrganizationList());
}, [pageSize, currentPage]); }, [pageSize, currentPage]);
const columns = [ const columns = [

8
web/client/src/sections/organization/containers/organization.js → web/client/src/sections/memberManagement/containers/organization.js

@ -23,7 +23,7 @@ function organization(props) {
role: searchRole role: searchRole
} }
dispatch(actions.organization.getOrganizationList(query)); dispatch(actions.memberManagement.getOrganizationList(query));
} }
useEffect(() => { useEffect(() => {
@ -83,7 +83,7 @@ function organization(props) {
]; ];
const handleDelete = (id) => { const handleDelete = (id) => {
dispatch(actions.organization.deleteOrganization(id)).then(() => { dispatch(actions.memberManagement.deleteOrganization(id)).then(() => {
queryData(); queryData();
}); });
}; };
@ -92,7 +92,7 @@ function organization(props) {
if (editData) { if (editData) {
const dataToSave = { ...values } const dataToSave = { ...values }
return dispatch( return dispatch(
actions.organization.modifyOrganization(editData.id, dataToSave, values?.msg || ''), actions.memberManagement.modifyOrganization(editData.id, dataToSave, values?.msg || ''),
).then((res) => { ).then((res) => {
if (res.success) { if (res.success) {
queryData(); queryData();
@ -103,7 +103,7 @@ function organization(props) {
}); });
} }
return dispatch(actions.organization.addOrganization({ return dispatch(actions.memberManagement.addOrganization({
...values, ...values,
})).then(res => { })).then(res => {
if (res.success) { if (res.success) {

13
web/client/src/sections/memberManagement/nav-item.js

@ -7,9 +7,16 @@ const SubMenu = Menu.SubMenu;
export function getNavItem(user) { export function getNavItem(user) {
return ( return (
user?.username == 'SuperAdmin' && <Menu.Item icon={<UserOutlined />} key="auth"> user?.username == 'SuperAdmin' && <SubMenu key="memberManagement"
<Link to="/memberManagement/auth">用户管理</Link> icon={<UserOutlined />} title='统一用户管理'>
</Menu.Item> <Menu.Item key="auth">
<Link to="/memberManagement/auth">用户管理</Link>
</Menu.Item>
<Menu.Item key="organization">
<Link to="/memberManagement/organization">机构管理</Link>
</Menu.Item>
</ SubMenu >
// user?.role == '系统管理员' && <SubMenu key="memberManagement" icon={<UserOutlined />} title='用户管理'> // user?.role == '系统管理员' && <SubMenu key="memberManagement" icon={<UserOutlined />} title='用户管理'>
// <Menu.Item key="auth"> // <Menu.Item key="auth">
// <Link to="/memberManagement/auth">用户权限</Link> // <Link to="/memberManagement/auth">用户权限</Link>

11
web/client/src/sections/memberManagement/routes.js

@ -1,17 +1,22 @@
'use strict'; 'use strict';
import { MemberManagement } from './containers'; import { MemberManagement, Organization } from './containers';
export default [{ export default [{
type: 'inner', type: 'inner',
route: { route: {
path: '/memberManagement', path: '/memberManagement',
key: 'memberManagement', key: 'memberManagement',
breadcrumb: '用户管理', breadcrumb: '统一用户管理',
// 不设置 component 则面包屑禁止跳转 // 不设置 component 则面包屑禁止跳转
childRoutes: [{ childRoutes: [{
path: '/auth', path: '/auth',
key: 'auth', key: 'auth',
component: MemberManagement, component: MemberManagement,
breadcrumb: '权限管理' breadcrumb: '用户管理'
}, {
path: '/organization',
key: 'organization',
component: MemberManagement,
breadcrumb: '机构管理'
}] }]
} }
}]; }];

2
web/client/src/sections/metadataManagement/containers/latestMetadata.js

@ -32,7 +32,7 @@ const LatestMetadata = (props) => {
useEffect(() => { useEffect(() => {
const jumpSelectedKey = sessionStorage.getItem('jumpSelectedKey') || null; const jumpSelectedKey = sessionStorage.getItem('jumpSelectedKey') || null;
initData(true, jumpSelectedKey); initData(true, jumpSelectedKey);
dispatch(actions.organization.getOrganizationList()); dispatch(actions.memberManagement.getOrganizationList());
}, []) }, [])
const initData = (configRefresh, jumpSelectedKey) => { const initData = (configRefresh, jumpSelectedKey) => {
dispatch(metadataManagement.getResourceCatalog()).then(res => { dispatch(metadataManagement.getResourceCatalog()).then(res => {

2
web/client/src/sections/organization/actions/index.js

@ -1,6 +1,6 @@
'use strict'; 'use strict';
import * as member from './organization'; import * as member from '../../memberManagement/actions/organization';
export default { export default {
...member ...member
} }

5
web/client/src/sections/organization/containers/index.js

@ -1,5 +0,0 @@
'use strict';
import Organization from './organization';
export { Organization };

5
web/client/src/sections/organization/containers/style.less

@ -1,5 +0,0 @@
.protable-title {
margin-bottom: 16px;
padding-left: 24px;
padding-right: 24px;
}

15
web/client/src/sections/organization/index.js

@ -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
};

20
web/client/src/sections/organization/nav-item.js

@ -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' && <Menu.Item icon={<UserOutlined />} key="organization">
<Link to="/organization">机构管理</Link>
</Menu.Item>
// user?.role == '系统管理员' && <SubMenu key="memberManagement" icon={<UserOutlined />} title='用户管理'>
// <Menu.Item key="auth">
// <Link to="/memberManagement/auth">用户权限</Link>
// </Menu.Item>
// </ SubMenu >
)
}

5
web/client/src/sections/organization/reducers/index.js

@ -1,5 +0,0 @@
'use strict';
export default {
}

12
web/client/src/sections/organization/routes.js

@ -1,12 +0,0 @@
'use strict';
import { Organization } from './containers';
export default [{
type: 'inner',
route: {
path: '/organization',
key: 'organization',
breadcrumb: '机构管理',
component: Organization,
}
}];
Loading…
Cancel
Save