Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
app-manage-console
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
app-manage-console
Commits
f93cd135
提交
f93cd135
authored
10月 14, 2017
作者:
vipcxj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:修复导致生产环境的路径相关问题
上级
f386bea9
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
46 行增加
和
42 行删除
+46
-42
.roadhogrc.js
.roadhogrc.js
+2
-1
bpm.js
src/services/bpm.js
+2
-2
datasource.js
src/services/datasource.js
+20
-20
domain.js
src/services/domain.js
+4
-4
login.js
src/services/login.js
+2
-2
main.js
src/services/main.js
+1
-1
modules.js
src/services/modules.js
+3
-3
template.js
src/services/template.js
+9
-9
config.js
src/utils/config.js
+3
-0
没有找到文件。
.roadhogrc.js
浏览文件 @
f93cd135
...
...
@@ -46,7 +46,8 @@ module.exports = {
"production"
:
{
publicPath
:
"/bm/"
,
define
:
{
contextPath
:
"/bm"
contextPath
:
"/bm"
,
apiContextPath
:
"/bm"
},
"extraBabelPlugins"
:
[
"transform-runtime"
,
...
...
src/services/bpm.js
浏览文件 @
f93cd135
...
...
@@ -2,12 +2,12 @@ import request from '../utils/request';
import
config
from
'../utils/config'
;
export
async
function
countTasks
(
filters
=
[])
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/bpm/task/all/count`
,
filters
);
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/bpm/task/all/count`
,
filters
);
}
export
async
function
fetchTasks
({
pst
,
psz
,
filters
})
{
const
queryParams
=
[...
filters
];
queryParams
.
push
([
'pst'
,
pst
]);
queryParams
.
push
([
'psz'
,
psz
]);
return
request
(
`
${
config
.
c
ontextPath
}
/api/bpm/task/all/info`
,
queryParams
);
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/bpm/task/all/info`
,
queryParams
);
}
src/services/datasource.js
浏览文件 @
f93cd135
...
...
@@ -66,23 +66,23 @@ const makeParams = (otherParams, { filters = [], sortBys = [], sortTypes = [], p
};
export
async
function
calcGlobalDatasource
(
name
,
{
pst
,
psz
,
filters
=
[],
sortBys
=
[],
sortTypes
=
[],
params
=
{},
dmPath
})
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
`
,
makeParams
({
pst
,
psz
,
dmPath
},
{
filters
,
sortBys
,
sortTypes
,
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
`
,
makeParams
({
pst
,
psz
,
dmPath
},
{
filters
,
sortBys
,
sortTypes
,
params
}));
}
export
async
function
countGlobalDatasource
(
name
,
{
filters
=
[],
params
=
{},
dmPath
})
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
/count`
,
makeParams
({
dmPath
},
{
filters
,
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
/count`
,
makeParams
({
dmPath
},
{
filters
,
params
}));
}
export
async
function
cursorGlobalDatasource
(
name
,
key
,
params
=
{},
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
/cursor`
,
makeParams
({
key
,
dmPath
},
{
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
/cursor`
,
makeParams
({
key
,
dmPath
},
{
params
}));
}
export
async
function
validateUpdateGlobalDatasource
(
name
,
key
,
params
=
{},
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
/update/validate`
,
makeParams
({
key
,
dmPath
},
{
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
/update/validate`
,
makeParams
({
key
,
dmPath
},
{
params
}));
}
export
async
function
updateGlobalDatasource
(
name
,
key
,
params
=
{},
dmPath
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
/update`
,
{
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
/update`
,
{
key
,
params
,
dmPath
,
...
...
@@ -90,22 +90,22 @@ export async function updateGlobalDatasource(name, key, params = {}, dmPath) {
}
export
async
function
validateCreateGlobalDatasource
(
name
,
params
=
{},
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
/create/validate`
,
makeParams
({
dmPath
},
{
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
/create/validate`
,
makeParams
({
dmPath
},
{
params
}));
}
export
async
function
createGlobalDatasource
(
name
,
params
=
{},
dmPath
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
/create`
,
{
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
/create`
,
{
params
,
dmPath
,
});
}
export
async
function
validateRemoveGlobalDatasource
(
name
,
key
,
params
=
{},
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
/remove/validate`
,
makeParams
({
key
,
dmPath
},
{
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
/remove/validate`
,
makeParams
({
key
,
dmPath
},
{
params
}));
}
export
async
function
removeGlobalDatasource
(
name
,
key
,
params
=
{},
dmPath
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
/remove`
,
{
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
/remove`
,
{
key
,
params
,
dmPath
,
...
...
@@ -113,27 +113,27 @@ export async function removeGlobalDatasource(name, key, params = {}, dmPath) {
}
export
async
function
getGlobalDatasourceMeta
(
name
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/datasource/
${
name
}
/meta`
);
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/datasource/
${
name
}
/meta`
);
}
export
async
function
calcModuleDatasource
(
mdName
,
dsName
,
{
pst
,
psz
,
filters
=
[],
sortBys
=
[],
sortTypes
=
[],
params
=
{},
dmPath
})
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
`
,
makeParams
({
pst
,
psz
,
dmPath
},
{
filters
,
sortBys
,
sortTypes
,
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
`
,
makeParams
({
pst
,
psz
,
dmPath
},
{
filters
,
sortBys
,
sortTypes
,
params
}));
}
export
async
function
countModuleDatasource
(
mdName
,
dsName
,
{
filters
=
[],
params
=
{},
dmPath
})
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/count`
,
makeParams
({
dmPath
},
{
filters
,
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/count`
,
makeParams
({
dmPath
},
{
filters
,
params
}));
}
export
async
function
cursorModuleDatasource
(
mdName
,
dsName
,
key
,
params
=
{},
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/cursor`
,
makeParams
({
key
,
dmPath
},
{
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/cursor`
,
makeParams
({
key
,
dmPath
},
{
params
}));
}
export
async
function
validateUpdateModuleDatasource
(
mdName
,
dsName
,
key
,
params
=
{},
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/update/validate`
,
makeParams
({
key
,
dmPath
},
{
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/update/validate`
,
makeParams
({
key
,
dmPath
},
{
params
}));
}
export
async
function
updateModuleDatasource
(
mdName
,
dsName
,
key
,
params
=
{},
dmPath
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/update`
,
{
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/update`
,
{
key
,
params
,
dmPath
,
...
...
@@ -141,22 +141,22 @@ export async function updateModuleDatasource(mdName, dsName, key, params = {}, d
}
export
async
function
validateCreateModuleDatasource
(
mdName
,
dsName
,
params
=
{},
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/create/validate`
,
makeParams
({
dmPath
},
{
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/create/validate`
,
makeParams
({
dmPath
},
{
params
}));
}
export
async
function
createModuleDatasource
(
mdName
,
dsName
,
params
=
{},
dmPath
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/create`
,
{
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/create`
,
{
params
,
dmPath
,
});
}
export
async
function
validateRemoveModuleDatasource
(
mdName
,
dsName
,
key
,
params
=
{},
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/remove/validate`
,
makeParams
({
key
,
dmPath
},
{
params
}));
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/remove/validate`
,
makeParams
({
key
,
dmPath
},
{
params
}));
}
export
async
function
removeModuleDatasource
(
mdName
,
dsName
,
key
,
params
=
{},
dmPath
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/remove`
,
{
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/remove`
,
{
key
,
params
,
dmPath
,
...
...
@@ -164,6 +164,6 @@ export async function removeModuleDatasource(mdName, dsName, key, params = {}, d
}
export
async
function
getModuleDatasourceMeta
(
mdName
,
dsName
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/meta`
);
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
mdName
}
/datasource/
${
dsName
}
/meta`
);
}
src/services/domain.js
浏览文件 @
f93cd135
...
...
@@ -8,8 +8,8 @@ export async function fetchDomains(basePath, withRoot = false) {
if
(
!
basePath
)
{
basePath
=
getCookie
(
cookie
.
domainPath
);
}
const
rootDomainInfo
=
withRoot
?
await
request
(
`
${
config
.
c
ontextPath
}
/api/domain/user/info`
,
{
dmPath
:
basePath
})
:
null
;
const
childrenDomainInfoList
=
await
request
(
`
${
config
.
c
ontextPath
}
/api/domain/user/children-info`
,
{
dmPath
:
basePath
});
const
rootDomainInfo
=
withRoot
?
await
request
(
`
${
config
.
apiC
ontextPath
}
/api/domain/user/info`
,
{
dmPath
:
basePath
})
:
null
;
const
childrenDomainInfoList
=
await
request
(
`
${
config
.
apiC
ontextPath
}
/api/domain/user/children-info`
,
{
dmPath
:
basePath
});
let
infoList
;
if
(
rootDomainInfo
&&
childrenDomainInfoList
)
{
infoList
=
[
...
...
@@ -27,9 +27,9 @@ export async function fetchDomains(basePath, withRoot = false) {
}
export
async
function
switchDomain
(
path
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/domain/user/path`
,
{
dmPath
:
path
});
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/domain/user/path`
,
{
dmPath
:
path
});
}
export
async
function
currentDomain
()
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/domain/user/info`
);
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/domain/user/info`
);
}
src/services/login.js
浏览文件 @
f93cd135
...
...
@@ -22,9 +22,9 @@ export async function login(payload) {
productId
:
'big-machine-web-front'
,
deviceId
:
`
${
new
Fingerprint
({
ie_activex
:
true
}).
get
()}
`
,
};
return
post
(
`
${
config
.
c
ontextPath
}
/api/auth/login`
,
data
,
{},
{},
false
);
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/auth/login`
,
data
,
{},
{},
false
);
}
export
async
function
userInfo
()
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/user/info`
);
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/user/info`
);
}
src/services/main.js
浏览文件 @
f93cd135
...
...
@@ -2,5 +2,5 @@ import post from '../utils/post';
import
config
from
'../utils/config'
;
export
async
function
logout
()
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/auth/logout`
);
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/auth/logout`
);
}
src/services/modules.js
浏览文件 @
f93cd135
...
...
@@ -2,13 +2,13 @@ import request from '../utils/request';
import
config
from
'../utils/config'
;
export
async
function
fetchMenus
()
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/configure/user/menus`
);
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/configure/user/menus`
);
}
export
async
function
fetchModuleInfos
()
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/module/user/info`
);
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/info`
);
}
export
async
function
fetchModuleLayout
(
name
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/module/user/
${
name
}
/layout`
);
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/module/user/
${
name
}
/layout`
);
}
src/services/template.js
浏览文件 @
f93cd135
...
...
@@ -22,37 +22,37 @@ export const templateApi = (dmPath) => {
};
export
async
function
getAllAdminTemplateInfoes
(
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/template/admin/info`
,
{
dmPath
});
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/template/admin/info`
,
{
dmPath
});
}
export
async
function
getAdminTemplateInfo
(
name
,
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/info`
,
{
dmPath
});
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/info`
,
{
dmPath
});
}
export
async
function
getAdminTemplateConfigure
(
name
,
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/configure`
,
{
dmPath
});
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/configure`
,
{
dmPath
});
}
export
async
function
getAdminTemplatePlainConfigure
(
name
,
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/plainConfigure`
,
{
dmPath
});
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/plainConfigure`
,
{
dmPath
});
}
export
async
function
setAdminTemplateConfigure
(
name
,
configure
,
dmPath
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/configure`
,
{
configure
,
dmPath
});
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/configure`
,
{
configure
,
dmPath
});
}
export
async
function
removeAdminTemplateConfigure
(
name
,
dmPath
)
{
return
doDelete
(
`
${
config
.
c
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/configure`
,
{
dmPath
});
return
doDelete
(
`
${
config
.
apiC
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/configure`
,
{
dmPath
});
}
export
async
function
setAdminTemplateTemplate
(
name
,
uri
,
dmPath
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/template`
,
{
uri
,
dmPath
});
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/template`
,
{
uri
,
dmPath
});
}
export
async
function
getAdminTemplateTemplate
(
name
,
dmPath
)
{
return
request
(
`
${
config
.
c
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/template`
,
{
dmPath
});
return
request
(
`
${
config
.
apiC
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/template`
,
{
dmPath
});
}
export
async
function
adminRender
(
name
,
params
,
mediaType
,
dmPath
)
{
return
post
(
`
${
config
.
c
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/render`
,
{
dmPath
,
mediaType
,
params
});
return
post
(
`
${
config
.
apiC
ontextPath
}
/api/template/admin/
${
encodeURIComponent
(
name
)}
/render`
,
{
dmPath
,
mediaType
,
params
});
}
src/utils/config.js
浏览文件 @
f93cd135
...
...
@@ -34,6 +34,8 @@ const defaultDateFormat = 'YYYY-MM-DD';
const
defaultTimeFormat
=
'HH:mm:ss'
;
const
defaultDateTimeFormat
=
`
${
defaultDateFormat
}
${
defaultTimeFormat
}
`
;
// eslint-disable-next-line no-underscore-dangle
const
_apiContextPath
=
process
.
env
.
NODE_ENV
===
'development'
?
''
:
apiContextPath
;
// eslint-disable-next-line no-underscore-dangle
const
_contextPath
=
process
.
env
.
NODE_ENV
===
'development'
?
''
:
contextPath
;
...
...
@@ -42,6 +44,7 @@ const config = {
footerText
:
'上海铂蓝信息科技有限公司'
,
logo
:
`
${
_contextPath
}
/logo.png`
,
contextPath
:
_contextPath
,
apiContextPath
:
_apiContextPath
,
defaultDateFormat
,
defaultTimeFormat
,
defaultDateTimeFormat
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论