Browse Source

增加元数据管理框架

master
zmh 2 years ago
parent
commit
24cfb8d56d
  1. 15
      web/client/src/sections/metadataManagement/actions/example.js
  2. 7
      web/client/src/sections/metadataManagement/actions/index.js
  3. 7
      web/client/src/sections/metadataManagement/containers/businessMetadata.js
  4. 9
      web/client/src/sections/metadataManagement/containers/index.js
  5. 24
      web/client/src/sections/metadataManagement/containers/latestMetadata.js
  6. 7
      web/client/src/sections/metadataManagement/containers/metaModelManagement.js
  7. 7
      web/client/src/sections/metadataManagement/containers/metadataDetails.js
  8. 7
      web/client/src/sections/metadataManagement/containers/tagManagement.js
  9. 15
      web/client/src/sections/metadataManagement/index.js
  10. 24
      web/client/src/sections/metadataManagement/nav-item.js
  11. 5
      web/client/src/sections/metadataManagement/reducers/index.js
  12. 38
      web/client/src/sections/metadataManagement/routes.js

15
web/client/src/sections/metadataManagement/actions/example.js

@ -0,0 +1,15 @@
'use strict';
import { basicAction } from '@peace/utils'
import { ApiTable } from '$utils'
// export function getMembers(orgId) {
// return dispatch => basicAction({
// type: 'get',
// dispatch: dispatch,
// actionType: 'GET_MEMBERS',
// url: `${ApiTable.getEnterprisesMembers.replace('{enterpriseId}', orgId)}`,
// msg: { error: '获取用户列表失败' },
// reducer: { name: 'members' }
// });
// }

7
web/client/src/sections/metadataManagement/actions/index.js

@ -0,0 +1,7 @@
'use strict';
import * as example from './example'
export default {
...example,
}

7
web/client/src/sections/metadataManagement/containers/businessMetadata.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function BusinessMetadata (props) {
return <>业务元数据管理</>
}
export default BusinessMetadata

9
web/client/src/sections/metadataManagement/containers/index.js

@ -0,0 +1,9 @@
'use strict';
import LatestMetadata from './latestMetadata';
import BusinessMetadata from './businessMetadata';
import MetaModelManagement from './metaModelManagement';
import TagManagement from './tagManagement';
import MetadataDetails from './metadataDetails';
export { LatestMetadata, BusinessMetadata, MetaModelManagement, TagManagement, MetadataDetails };

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

@ -0,0 +1,24 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Button, } from 'antd'
const LatestMetadata = (props) => {
const { user, dispatch, actions, history } = props;
useEffect(() => {
}, [])
return <>最新元数据
<Button type="primary" onClick={() => { history.push(`/metadataManagement/latestMetadata/detail/${1}`) }} >查看详情</Button>
</>
}
function mapStateToProps(state) {
const { global, auth } = state;
return {
clientHeight: global.clientHeight,
user: auth.user,
actions: global.actions,
};
}
export default connect(mapStateToProps)(LatestMetadata)

7
web/client/src/sections/metadataManagement/containers/metaModelManagement.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function MetaModelManagement (props) {
return <>模型管理</>
}
export default MetaModelManagement

7
web/client/src/sections/metadataManagement/containers/metadataDetails.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function MetadataDetails (props) {
return <>元数据详情</>
}
export default MetadataDetails

7
web/client/src/sections/metadataManagement/containers/tagManagement.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function TagManagement (props) {
return <>标签管理</>
}
export default TagManagement

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

@ -0,0 +1,15 @@
'use strict';
import reducers from './reducers';
import routes from './routes';
import actions from './actions';
import { getNavItem } from './nav-item';
export default {
key: 'metadataManagement',
name: '元数据管理',
reducers: reducers,
routes: routes,
actions: actions,
getNavItem: getNavItem
};

24
web/client/src/sections/metadataManagement/nav-item.js

@ -0,0 +1,24 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { Menu } from 'antd';
import { SettingOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu;
export function getNavItem() {
return (
<SubMenu key="metadataManagement" icon={<SettingOutlined />} title='元数据管理'>
<Menu.Item key="latestMetadata">
<Link to="/metadataManagement/latestMetadata">最新元数据</Link>
</Menu.Item>
<Menu.Item key="businessMetadata">
<Link to="/metadataManagement/businessMetadata">业务元数据管理</Link>
</Menu.Item>
<Menu.Item key="metaModelManagement">
<Link to="/metadataManagement/metaModelManagement">模型管理</Link>
</Menu.Item>
<Menu.Item key="tagManagement">
<Link to="/metadataManagement/tagManagement">标签管理</Link>
</Menu.Item>
</ SubMenu >
);
}

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

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

38
web/client/src/sections/metadataManagement/routes.js

@ -0,0 +1,38 @@
'use strict';
import { LatestMetadata, BusinessMetadata, MetaModelManagement, TagManagement, MetadataDetails } from './containers';
export default [{
type: 'inner',
route: {
path: '/metadataManagement',
key: 'metadataManagement',
breadcrumb: '元数据管理',
// 不设置 component 则面包屑禁止跳转
childRoutes: [{
path: '/latestMetadata',
key: 'latestMetadata',
component: LatestMetadata,
breadcrumb: '最新元数据',
childRoutes: [{
path: '/detail/:id',
key: 'detail',
component: MetadataDetails,
breadcrumb: '元数据详情'
}]
}, {
path: '/businessMetadata',
key: 'businessMetadata',
component: BusinessMetadata,
breadcrumb: '业务元数据管理'
}, {
path: '/metaModelManagement',
key: 'metaModelManagement',
component: MetaModelManagement,
breadcrumb: '模型管理'
}, {
path: '/tagManagement',
key: 'tagManagement',
component: TagManagement,
breadcrumb: '标签管理'
}]
}
}];
Loading…
Cancel
Save