diff --git a/web/client/src/app.js b/web/client/src/app.js
index 82e4578..e615824 100644
--- a/web/client/src/app.js
+++ b/web/client/src/app.js
@@ -4,19 +4,29 @@ import React, { useEffect } from 'react';
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
+ const { projectName } = props
- useEffect(() => {
- document.title = projectName;
- }, [])
+ useEffect(() => {
+ document.title = projectName;
+ }, [])
- return (
-
- )
+ return (
+
+ )
}
diff --git a/web/client/src/components/Upload/index.js b/web/client/src/components/Upload/index.js
index 9a1dad4..b9fa031 100644
--- a/web/client/src/components/Upload/index.js
+++ b/web/client/src/components/Upload/index.js
@@ -9,7 +9,7 @@ import { PlusOutlined, UploadOutlined, CloseOutlined } from '@ant-design/icons';
class Uploads extends Component {
constructor(props) {
super(props);
- this.ApiRoot = API_ROOT
+ this.ApiRoot = FS_API_ROOT
this.state = {
fileUploading: false,
fileList: [],
@@ -109,10 +109,10 @@ class Uploads extends Component {
video: ['mp4']
};
/**
- * uploadType 【string】 主要区别文件上传路径 以及类型 以 web/routes/attachment/index.js 中 UploadPath 的 key 值为准;默认 project;
+ * uploadType 【string】 主要区别文件上传路径 以及类型 以 web/routes/attachment/index.js 中 UploadPath 的 key 值为准;默认 project;
* disabled 【boolean】 上传是否可用
* maxFilesNum 【number】 最大上传数量
- * fileTypes 【array[string]】 可允许上传的文件类型;
+ * fileTypes 【array[string]】 可允许上传的文件类型;
* maxFileSize 【number】 单个文件最大大小 M
* listType 【antd】 upload 组件的属性
* onChange 【function】 文件数量变化时候回调 返回文件
@@ -149,13 +149,13 @@ class Uploads extends Component {
return false;
}
if (file.name.length > 60) {
- message.warning(`文件名过长(大于60字符),请修改后上传`);
+ message.warning(`文件名过长(大于60字符),请修改后上传`);
return false;
}
const extNames = file.name.split('.');
var reg = /^[\.\s\u4e00-\u9fa5a-zA-Z0-9_-]{0,}$/;
if (!reg.exec(file.name)) {
- message.warning(`文件名包含除字母、汉字、数字、中划线、下划线之外的字符,请修改后上传`);
+ message.warning(`文件名包含除字母、汉字、数字、中划线、下划线之外的字符,请修改后上传`);
return false;
}
let isDAE = false;
@@ -210,7 +210,7 @@ class Uploads extends Component {
that.setState({
fileUploading: false
});
- message.error(`${info.file.name} 上传失败,请重试`);
+ message.error(`${info.file.name} 上传失败,请重试`);
if (onStateChange) {
onStateChange({ uploading: false });
}
diff --git a/web/client/src/index.js b/web/client/src/index.js
index f748dd7..4367f4d 100644
--- a/web/client/src/index.js
+++ b/web/client/src/index.js
@@ -4,4 +4,4 @@ import React from 'react';
import { render } from 'react-dom';
import App from './app';
-render((), document.getElementById('App'));
\ No newline at end of file
+render((), document.getElementById('App'));
\ No newline at end of file
diff --git a/web/client/src/layout/components/header/index.js b/web/client/src/layout/components/header/index.js
index 9d5f354..77fbad3 100644
--- a/web/client/src/layout/components/header/index.js
+++ b/web/client/src/layout/components/header/index.js
@@ -39,7 +39,7 @@ const Header = props => {
}
-
项目运管调度平台
+
政务数据资源中心
diff --git a/web/client/src/layout/containers/layout/breadcrumb.js b/web/client/src/layout/containers/layout/breadcrumb.js
index d0459a4..80b4f6c 100644
--- a/web/client/src/layout/containers/layout/breadcrumb.js
+++ b/web/client/src/layout/containers/layout/breadcrumb.js
@@ -11,7 +11,7 @@ const Breadcrumbs = (props) => {
return (
{
- breadcrumbs.map((bc, index) => {
+ breadcrumbs.filter(bc => bc.key != '/metadataManagement/latestMetadata/detail').map((bc, index) => {
return (
{
@@ -34,7 +34,7 @@ const Breadcrumbs = (props) => {
)
});
-
+
return (
);
diff --git a/web/client/src/layout/containers/layout/index.js b/web/client/src/layout/containers/layout/index.js
index add40ff..4e84c16 100644
--- a/web/client/src/layout/containers/layout/index.js
+++ b/web/client/src/layout/containers/layout/index.js
@@ -66,7 +66,7 @@ const LayoutContainer = props => {
dom.scrollTop = 0;
}
})
- console.log(API_ROOT);
+ console.log(FS_API_ROOT);
return (
@@ -115,7 +115,7 @@ const LayoutContainer = props => {
)
}
-function mapStateToProps (state) {
+function mapStateToProps(state) {
const { global, auth, ajaxResponse } = state;
return {
title: global.title,
diff --git a/web/client/src/sections/auth/containers/login.js b/web/client/src/sections/auth/containers/login.js
index 010c805..c131417 100644
--- a/web/client/src/sections/auth/containers/login.js
+++ b/web/client/src/sections/auth/containers/login.js
@@ -116,7 +116,7 @@ const Login = props => {
justifyContent: 'space-around'
}}>
- 项目运管调度平台
+ 政务数据资源中心
{
setCurTabKey(k)
@@ -250,7 +250,6 @@ const Login = props => {
function mapStateToProps(state) {
const { auth } = state;
- console.log(auth.error);
return {
user: auth.user,
error: auth.error,
diff --git a/web/client/src/sections/homePage/nav-item.js b/web/client/src/sections/homePage/nav-item.js
index 5c9e502..e541a1e 100644
--- a/web/client/src/sections/homePage/nav-item.js
+++ b/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 (
- }>
+ }>
首页
);
diff --git a/web/client/src/sections/metadataAcquisition/actions/example.js b/web/client/src/sections/metadataAcquisition/actions/example.js
new file mode 100644
index 0000000..6b3c25d
--- /dev/null
+++ b/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' }
+// });
+// }
diff --git a/web/client/src/sections/metadataAcquisition/actions/index.js b/web/client/src/sections/metadataAcquisition/actions/index.js
new file mode 100644
index 0000000..444af37
--- /dev/null
+++ b/web/client/src/sections/metadataAcquisition/actions/index.js
@@ -0,0 +1,7 @@
+'use strict';
+
+import * as example from './example'
+
+export default {
+ ...example,
+}
\ No newline at end of file
diff --git a/web/client/src/sections/metadataAcquisition/containers/acquisitionLog.js b/web/client/src/sections/metadataAcquisition/containers/acquisitionLog.js
new file mode 100644
index 0000000..f792f7e
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/metadataAcquisition/containers/acquisitionTask.js b/web/client/src/sections/metadataAcquisition/containers/acquisitionTask.js
new file mode 100644
index 0000000..8fa053f
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/metadataAcquisition/containers/adapter.js b/web/client/src/sections/metadataAcquisition/containers/adapter.js
new file mode 100644
index 0000000..c6045bf
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/metadataAcquisition/containers/dataSourceManagement.js b/web/client/src/sections/metadataAcquisition/containers/dataSourceManagement.js
new file mode 100644
index 0000000..e15bc52
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/metadataAcquisition/containers/index.js b/web/client/src/sections/metadataAcquisition/containers/index.js
new file mode 100644
index 0000000..64c6eb2
--- /dev/null
+++ b/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 };
diff --git a/web/client/src/sections/metadataAcquisition/index.js b/web/client/src/sections/metadataAcquisition/index.js
new file mode 100644
index 0000000..ca12d50
--- /dev/null
+++ b/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
+};
\ No newline at end of file
diff --git a/web/client/src/sections/metadataAcquisition/nav-item.js b/web/client/src/sections/metadataAcquisition/nav-item.js
new file mode 100644
index 0000000..3b6bb5b
--- /dev/null
+++ b/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 (
+ } title='元数据采集'>
+
+ 适配器管理
+
+
+ 数据源管理
+
+
+ 采集任务配置
+
+
+ 采集日志
+
+ SubMenu >
+ );
+}
\ No newline at end of file
diff --git a/web/client/src/sections/metadataAcquisition/reducers/index.js b/web/client/src/sections/metadataAcquisition/reducers/index.js
new file mode 100644
index 0000000..7ed1088
--- /dev/null
+++ b/web/client/src/sections/metadataAcquisition/reducers/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+export default {
+
+}
\ No newline at end of file
diff --git a/web/client/src/sections/metadataAcquisition/routes.js b/web/client/src/sections/metadataAcquisition/routes.js
new file mode 100644
index 0000000..9b36a28
--- /dev/null
+++ b/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: '采集日志'
+ }]
+ }
+}];
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/actions/example.js b/web/client/src/sections/metadataManagement/actions/example.js
new file mode 100644
index 0000000..6b3c25d
--- /dev/null
+++ b/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' }
+// });
+// }
diff --git a/web/client/src/sections/metadataManagement/actions/index.js b/web/client/src/sections/metadataManagement/actions/index.js
new file mode 100644
index 0000000..444af37
--- /dev/null
+++ b/web/client/src/sections/metadataManagement/actions/index.js
@@ -0,0 +1,7 @@
+'use strict';
+
+import * as example from './example'
+
+export default {
+ ...example,
+}
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/containers/businessMetadata.js b/web/client/src/sections/metadataManagement/containers/businessMetadata.js
new file mode 100644
index 0000000..e240f90
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/containers/index.js b/web/client/src/sections/metadataManagement/containers/index.js
new file mode 100644
index 0000000..4d4f80a
--- /dev/null
+++ b/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 };
diff --git a/web/client/src/sections/metadataManagement/containers/latestMetadata.js b/web/client/src/sections/metadataManagement/containers/latestMetadata.js
new file mode 100644
index 0000000..ebdba2d
--- /dev/null
+++ b/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 <>最新元数据
+
+ >
+}
+
+function mapStateToProps(state) {
+ const { global, auth } = state;
+ return {
+ clientHeight: global.clientHeight,
+ user: auth.user,
+ actions: global.actions,
+ };
+}
+export default connect(mapStateToProps)(LatestMetadata)
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/containers/metaModelManagement.js b/web/client/src/sections/metadataManagement/containers/metaModelManagement.js
new file mode 100644
index 0000000..85213aa
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/containers/metadataDetails.js b/web/client/src/sections/metadataManagement/containers/metadataDetails.js
new file mode 100644
index 0000000..74e2af6
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/containers/tagManagement.js b/web/client/src/sections/metadataManagement/containers/tagManagement.js
new file mode 100644
index 0000000..277791c
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/index.js b/web/client/src/sections/metadataManagement/index.js
new file mode 100644
index 0000000..52d218b
--- /dev/null
+++ b/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
+};
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/nav-item.js b/web/client/src/sections/metadataManagement/nav-item.js
new file mode 100644
index 0000000..8f9133a
--- /dev/null
+++ b/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 (
+ } title='元数据管理'>
+
+ 最新元数据
+
+
+ 业务元数据管理
+
+
+ 模型管理
+
+
+ 标签管理
+
+ SubMenu >
+ );
+}
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/reducers/index.js b/web/client/src/sections/metadataManagement/reducers/index.js
new file mode 100644
index 0000000..7ed1088
--- /dev/null
+++ b/web/client/src/sections/metadataManagement/reducers/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+export default {
+
+}
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/routes.js b/web/client/src/sections/metadataManagement/routes.js
new file mode 100644
index 0000000..063e29e
--- /dev/null
+++ b/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: '标签管理'
+ }]
+ }
+}];
\ No newline at end of file
diff --git a/web/client/src/sections/resourceConsumption/actions/example.js b/web/client/src/sections/resourceConsumption/actions/example.js
new file mode 100644
index 0000000..6b3c25d
--- /dev/null
+++ b/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' }
+// });
+// }
diff --git a/web/client/src/sections/resourceConsumption/actions/index.js b/web/client/src/sections/resourceConsumption/actions/index.js
new file mode 100644
index 0000000..444af37
--- /dev/null
+++ b/web/client/src/sections/resourceConsumption/actions/index.js
@@ -0,0 +1,7 @@
+'use strict';
+
+import * as example from './example'
+
+export default {
+ ...example,
+}
\ No newline at end of file
diff --git a/web/client/src/sections/resourceConsumption/containers/approve.js b/web/client/src/sections/resourceConsumption/containers/approve.js
new file mode 100644
index 0000000..d4a16fd
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/resourceConsumption/containers/index.js b/web/client/src/sections/resourceConsumption/containers/index.js
new file mode 100644
index 0000000..aa8404c
--- /dev/null
+++ b/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 };
diff --git a/web/client/src/sections/resourceConsumption/containers/myApplication.js b/web/client/src/sections/resourceConsumption/containers/myApplication.js
new file mode 100644
index 0000000..6e17d56
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/resourceConsumption/index.js b/web/client/src/sections/resourceConsumption/index.js
new file mode 100644
index 0000000..38cf233
--- /dev/null
+++ b/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
+};
\ No newline at end of file
diff --git a/web/client/src/sections/resourceConsumption/nav-item.js b/web/client/src/sections/resourceConsumption/nav-item.js
new file mode 100644
index 0000000..0092f1f
--- /dev/null
+++ b/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 (
+ } title='资源消费'>
+
+ 数据消费审批
+
+
+ 我的数据消费申请
+
+ SubMenu >
+ );
+}
\ No newline at end of file
diff --git a/web/client/src/sections/resourceConsumption/reducers/index.js b/web/client/src/sections/resourceConsumption/reducers/index.js
new file mode 100644
index 0000000..7ed1088
--- /dev/null
+++ b/web/client/src/sections/resourceConsumption/reducers/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+export default {
+
+}
\ No newline at end of file
diff --git a/web/client/src/sections/resourceConsumption/routes.js b/web/client/src/sections/resourceConsumption/routes.js
new file mode 100644
index 0000000..3710d2f
--- /dev/null
+++ b/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: '我的数据消费申请'
+ }]
+ }
+}];
\ No newline at end of file
diff --git a/web/client/src/sections/resourceRetrieval/actions/example.js b/web/client/src/sections/resourceRetrieval/actions/example.js
new file mode 100644
index 0000000..6b3c25d
--- /dev/null
+++ b/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' }
+// });
+// }
diff --git a/web/client/src/sections/resourceRetrieval/actions/index.js b/web/client/src/sections/resourceRetrieval/actions/index.js
new file mode 100644
index 0000000..444af37
--- /dev/null
+++ b/web/client/src/sections/resourceRetrieval/actions/index.js
@@ -0,0 +1,7 @@
+'use strict';
+
+import * as example from './example'
+
+export default {
+ ...example,
+}
\ No newline at end of file
diff --git a/web/client/src/sections/resourceRetrieval/containers/index.js b/web/client/src/sections/resourceRetrieval/containers/index.js
new file mode 100644
index 0000000..396e9d6
--- /dev/null
+++ b/web/client/src/sections/resourceRetrieval/containers/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+import Retrieval from './retrieval';
+export { Retrieval };
diff --git a/web/client/src/sections/resourceRetrieval/containers/retrieval.js b/web/client/src/sections/resourceRetrieval/containers/retrieval.js
new file mode 100644
index 0000000..fc69057
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/web/client/src/sections/resourceRetrieval/index.js b/web/client/src/sections/resourceRetrieval/index.js
new file mode 100644
index 0000000..e26dddf
--- /dev/null
+++ b/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
+};
\ No newline at end of file
diff --git a/web/client/src/sections/resourceRetrieval/nav-item.js b/web/client/src/sections/resourceRetrieval/nav-item.js
new file mode 100644
index 0000000..71f64e1
--- /dev/null
+++ b/web/client/src/sections/resourceRetrieval/nav-item.js
@@ -0,0 +1,12 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { Menu } from 'antd';
+import { FileSearchOutlined } from '@ant-design/icons';
+
+export function getNavItem() {
+ return (
+ }>
+ 资源检索
+
+ );
+}
\ No newline at end of file
diff --git a/web/client/src/sections/resourceRetrieval/reducers/index.js b/web/client/src/sections/resourceRetrieval/reducers/index.js
new file mode 100644
index 0000000..7ed1088
--- /dev/null
+++ b/web/client/src/sections/resourceRetrieval/reducers/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+export default {
+
+}
\ No newline at end of file
diff --git a/web/client/src/sections/resourceRetrieval/routes.js b/web/client/src/sections/resourceRetrieval/routes.js
new file mode 100644
index 0000000..9b51604
--- /dev/null
+++ b/web/client/src/sections/resourceRetrieval/routes.js
@@ -0,0 +1,11 @@
+'use strict';
+import { Retrieval } from './containers';
+export default [{
+ type: 'inner',
+ route: {
+ path: '/resourceRetrieval',
+ key: 'resourceRetrieval',
+ breadcrumb: '资源消费',
+ component: Retrieval
+ }
+}];
\ No newline at end of file
diff --git a/web/config.js b/web/config.js
index 4dccb0f..456413c 100644
--- a/web/config.js
+++ b/web/config.js
@@ -10,8 +10,7 @@ const os = require('os');
const moment = require('moment');
const args = require('args');
const dev = process.env.NODE_ENV == 'development';
-
-dev && console.log('\x1B[33m%s\x1b[0m', '请遵循并及时更新 readme.md,维护良好的开发环境,媛猿有责');
+dev && console.log('\x1B[33m%s\x1b[0m', '请遵循并及时更新 readme.md,维护良好的开发环境,媛猿有责');
// // 启动参数
args.option(['p', 'port'], '启动端口');
args.option(['u', 'api-url'], 'webapi的URL');
@@ -41,7 +40,7 @@ if (
// || !ANXINCLOUD_QINIU_BUCKET_RESOURCE
// || !ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE
) {
- console.log('缺少启动参数,异常退出');
+ console.log('缺少启动参数,异常退出');
args.showHelp();
process.exit(-1);
}
@@ -51,7 +50,7 @@ const product = {
staticDirs: [path.join(__dirname, './client')],
frontParams: {
// 以大写字母命名
- API_ROOT: FS_UNIAPP_API
+ FS_API_ROOT: FS_UNIAPP_API
},
mws: [
{
@@ -116,6 +115,15 @@ const product = {
maxRetries: 1
}
};
+if (product.frontParams) {
+ const patt = /[^A-Z|_]+/
+ for (let k in product.frontParams) {
+ if (!k.startsWith('FS_') || patt.test(k)) {
+ console.warn(`参数 ${k} 当以大写字母和下划线组成 且以 FS_ 开头`);
+ process.exit(-1);
+ }
+ }
+}
let config;
if (dev) {
diff --git a/web/routes/attachment/index.js b/web/routes/attachment/index.js
index b1dd63d..6c1de58 100644
--- a/web/routes/attachment/index.js
+++ b/web/routes/attachment/index.js
@@ -172,12 +172,12 @@ module.exports = {
const filename = file.filename || path.basename(file);
const client = new OSS({
- // yourRegion填写Bucket所在地域。以华东1(杭州)为例,Region填写为oss-cn-hangzhou。
+ // yourRegion填写Bucket所在地域.以华东1(杭州)为例,Region填写为oss-cn-hangzhou.
region: aliOss.region,
- // 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。
+ // 阿里云账号AccessKey拥有所有API的访问权限,风险很高.强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户.
accessKeyId: aliOss.accessKey,
accessKeySecret: aliOss.secretKey,
- // 填写Bucket名称,例如examplebucket。
+ // 填写Bucket名称,例如examplebucket.
bucket: aliOss.bucket,
});
@@ -206,12 +206,12 @@ module.exports = {
const { aliOss } = opts
const { path, filename } = ctx.query
const client = new OSS({
- // yourRegion填写Bucket所在地域。以华东1(杭州)为例,Region填写为oss-cn-hangzhou。
+ // yourRegion填写Bucket所在地域.以华东1(杭州)为例,Region填写为oss-cn-hangzhou.
region: aliOss.region,
- // 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。
+ // 阿里云账号AccessKey拥有所有API的访问权限,风险很高.强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户.
accessKeyId: aliOss.accessKey,
accessKeySecret: aliOss.secretKey,
- // 填写Bucket名称,例如examplebucket。
+ // 填写Bucket名称,例如examplebucket.
bucket: aliOss.bucket,
});