Browse Source

(*)增加元数据采集、资源消费、资源检索框架

master
zmh 2 years ago
parent
commit
877e54c348
  1. 11
      web/client/src/app.js
  2. 6
      web/client/src/sections/homePage/nav-item.js
  3. 15
      web/client/src/sections/metadataAcquisition/actions/example.js
  4. 7
      web/client/src/sections/metadataAcquisition/actions/index.js
  5. 7
      web/client/src/sections/metadataAcquisition/containers/acquisitionLog.js
  6. 7
      web/client/src/sections/metadataAcquisition/containers/acquisitionTask.js
  7. 7
      web/client/src/sections/metadataAcquisition/containers/adapter.js
  8. 7
      web/client/src/sections/metadataAcquisition/containers/dataSourceManagement.js
  9. 8
      web/client/src/sections/metadataAcquisition/containers/index.js
  10. 15
      web/client/src/sections/metadataAcquisition/index.js
  11. 24
      web/client/src/sections/metadataAcquisition/nav-item.js
  12. 5
      web/client/src/sections/metadataAcquisition/reducers/index.js
  13. 32
      web/client/src/sections/metadataAcquisition/routes.js
  14. 15
      web/client/src/sections/resourceConsumption/actions/example.js
  15. 7
      web/client/src/sections/resourceConsumption/actions/index.js
  16. 7
      web/client/src/sections/resourceConsumption/containers/approve.js
  17. 6
      web/client/src/sections/resourceConsumption/containers/index.js
  18. 7
      web/client/src/sections/resourceConsumption/containers/myApplication.js
  19. 15
      web/client/src/sections/resourceConsumption/index.js
  20. 18
      web/client/src/sections/resourceConsumption/nav-item.js
  21. 5
      web/client/src/sections/resourceConsumption/reducers/index.js
  22. 22
      web/client/src/sections/resourceConsumption/routes.js
  23. 15
      web/client/src/sections/resourceRetrieval/actions/example.js
  24. 7
      web/client/src/sections/resourceRetrieval/actions/index.js
  25. 6
      web/client/src/sections/resourceRetrieval/containers/index.js
  26. 7
      web/client/src/sections/resourceRetrieval/containers/results.js
  27. 7
      web/client/src/sections/resourceRetrieval/containers/retrieval.js
  28. 15
      web/client/src/sections/resourceRetrieval/index.js
  29. 18
      web/client/src/sections/resourceRetrieval/nav-item.js
  30. 5
      web/client/src/sections/resourceRetrieval/reducers/index.js
  31. 22
      web/client/src/sections/resourceRetrieval/routes.js

11
web/client/src/app.js

@ -5,6 +5,9 @@ import Layout from './layout';
import Auth from './sections/auth';
import homePage from './sections/homePage';
import MetadataManagement from './sections/metadataManagement';
import MetadataAcquisition from './sections/metadataAcquisition';
import resourceConsumption from './sections/resourceConsumption';
import resourceRetrieval from './sections/resourceRetrieval';
const App = props => {
const { projectName } = props
@ -15,7 +18,13 @@ const App = props => {
return (
<Layout
title={projectName}
sections={[homePage, Auth, MetadataManagement]}
sections={[
homePage,
Auth,
MetadataManagement,
MetadataAcquisition,
resourceConsumption,
resourceRetrieval]}
/>
)

6
web/client/src/sections/homePage/nav-item.js

@ -1,10 +1,10 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { Menu } from 'antd';
import { BarChartOutlined } from '@ant-design/icons';
export function getNavItem () {
import { HomeOutlined } from '@ant-design/icons';
export function getNavItem() {
return (
<Menu.Item key="homePage" icon={<BarChartOutlined />}>
<Menu.Item key="homePage" icon={<HomeOutlined />}>
<Link to="/homePage">首页</Link>
</Menu.Item>
);

15
web/client/src/sections/metadataAcquisition/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/metadataAcquisition/actions/index.js

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

7
web/client/src/sections/metadataAcquisition/containers/acquisitionLog.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function AcquisitionLog (props) {
return <>采集日志</>
}
export default AcquisitionLog

7
web/client/src/sections/metadataAcquisition/containers/acquisitionTask.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function AcquisitionTask (props) {
return <>采集任务配置</>
}
export default AcquisitionTask

7
web/client/src/sections/metadataAcquisition/containers/adapter.js

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

7
web/client/src/sections/metadataAcquisition/containers/dataSourceManagement.js

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

8
web/client/src/sections/metadataAcquisition/containers/index.js

@ -0,0 +1,8 @@
'use strict';
import Adapter from './adapter';
import DataSourceManagement from './dataSourceManagement';
import AcquisitionTask from './acquisitionTask';
import AcquisitionLog from './acquisitionLog';
export { Adapter, DataSourceManagement, AcquisitionTask, AcquisitionLog };

15
web/client/src/sections/metadataAcquisition/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: 'metadataAcquisition',
name: '元数据采集',
reducers: reducers,
routes: routes,
actions: actions,
getNavItem: getNavItem
};

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

@ -0,0 +1,24 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { Menu } from 'antd';
import { BarChartOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu;
export function getNavItem() {
return (
<SubMenu key="metadataAcquisition" icon={<BarChartOutlined />} title='元数据采集'>
<Menu.Item key="Adapter">
<Link to="/metadataAcquisition/Adapter">适配器管理</Link>
</Menu.Item>
<Menu.Item key="dataSourceManagement">
<Link to="/metadataAcquisition/dataSourceManagement">数据源管理</Link>
</Menu.Item>
<Menu.Item key="acquisitionTask">
<Link to="/metadataAcquisition/acquisitionTask">采集任务配置</Link>
</Menu.Item>
<Menu.Item key="acquisitionLog">
<Link to="/metadataAcquisition/acquisitionLog">采集日志</Link>
</Menu.Item>
</ SubMenu >
);
}

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

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

32
web/client/src/sections/metadataAcquisition/routes.js

@ -0,0 +1,32 @@
'use strict';
import { Adapter, DataSourceManagement, AcquisitionTask, AcquisitionLog } from './containers';
export default [{
type: 'inner',
route: {
path: '/metadataAcquisition',
key: 'metadataAcquisition',
breadcrumb: '元数据采集',
// 不设置 component 则面包屑禁止跳转
childRoutes: [{
path: '/adapter',
key: 'adapter',
component: Adapter,
breadcrumb: '适配器管理'
}, {
path: '/dataSourceManagement',
key: 'dataSourceManagement',
component: DataSourceManagement,
breadcrumb: '数据源管理'
}, {
path: '/acquisitionTask',
key: 'acquisitionTask',
component: AcquisitionTask,
breadcrumb: '采集任务配置'
}, {
path: '/acquisitionLog',
key: 'acquisitionLog',
component: AcquisitionLog,
breadcrumb: '采集日志'
}]
}
}];

15
web/client/src/sections/resourceConsumption/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/resourceConsumption/actions/index.js

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

7
web/client/src/sections/resourceConsumption/containers/approve.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function Approve (props) {
return <>数据消费审批</>
}
export default Approve

6
web/client/src/sections/resourceConsumption/containers/index.js

@ -0,0 +1,6 @@
'use strict';
import Approve from './approve';
import MyApplication from './myApplication';
export { Approve, MyApplication };

7
web/client/src/sections/resourceConsumption/containers/myApplication.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function MyApplication (props) {
return <>我的数据消费申请</>
}
export default MyApplication

15
web/client/src/sections/resourceConsumption/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: 'resourceConsumption',
name: '资源消费',
reducers: reducers,
routes: routes,
actions: actions,
getNavItem: getNavItem
};

18
web/client/src/sections/resourceConsumption/nav-item.js

@ -0,0 +1,18 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { Menu } from 'antd';
import { CarryOutOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu;
export function getNavItem() {
return (
<SubMenu key="resourceConsumption" icon={<CarryOutOutlined />} title='资源消费'>
<Menu.Item key="approve">
<Link to="/resourceConsumption/approve">数据消费审批</Link>
</Menu.Item>
<Menu.Item key="myApplication">
<Link to="/resourceConsumption/myApplication">我的数据消费申请</Link>
</Menu.Item>
</ SubMenu >
);
}

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

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

22
web/client/src/sections/resourceConsumption/routes.js

@ -0,0 +1,22 @@
'use strict';
import { Approve, MyApplication } from './containers';
export default [{
type: 'inner',
route: {
path: '/resourceConsumption',
key: 'resourceConsumption',
breadcrumb: '资源消费',
// 不设置 component 则面包屑禁止跳转
childRoutes: [{
path: '/approve',
key: 'approve',
component: Approve,
breadcrumb: '数据消费审批'
}, {
path: '/myApplication',
key: 'myApplication',
component: MyApplication,
breadcrumb: '我的数据消费申请'
}]
}
}];

15
web/client/src/sections/resourceRetrieval/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/resourceRetrieval/actions/index.js

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

6
web/client/src/sections/resourceRetrieval/containers/index.js

@ -0,0 +1,6 @@
'use strict';
import Retrieval from './retrieval';
import Results from './results';
export { Retrieval, Results };

7
web/client/src/sections/resourceRetrieval/containers/results.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function Results (props) {
return <>检索结果</>
}
export default Results

7
web/client/src/sections/resourceRetrieval/containers/retrieval.js

@ -0,0 +1,7 @@
import React, { useEffect, useState } from 'react'
function Retrieval (props) {
return <>数据资源检索</>
}
export default Retrieval

15
web/client/src/sections/resourceRetrieval/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: 'resourceRetrieval',
name: '资源检索',
reducers: reducers,
routes: routes,
actions: actions,
getNavItem: getNavItem
};

18
web/client/src/sections/resourceRetrieval/nav-item.js

@ -0,0 +1,18 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { Menu } from 'antd';
import { FileSearchOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu;
export function getNavItem() {
return (
<SubMenu key="resourceRetrieval" icon={<FileSearchOutlined />} title='资源检索'>
<Menu.Item key="retrieval">
<Link to="/resourceRetrieval/retrieval">数据资源检索</Link>
</Menu.Item>
<Menu.Item key="results">
<Link to="/resourceRetrieval/results">检索结果</Link>
</Menu.Item>
</ SubMenu >
);
}

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

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

22
web/client/src/sections/resourceRetrieval/routes.js

@ -0,0 +1,22 @@
'use strict';
import { Retrieval, Results } from './containers';
export default [{
type: 'inner',
route: {
path: '/resourceRetrieval',
key: 'resourceRetrieval',
breadcrumb: '资源消费',
// 不设置 component 则面包屑禁止跳转
childRoutes: [{
path: '/retrieval',
key: 'retrieval',
component: Retrieval,
breadcrumb: '数据资源检索'
}, {
path: '/results',
key: 'results',
component: Results,
breadcrumb: '检索结果'
}]
}
}];
Loading…
Cancel
Save