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