Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
d8a98197
提交
d8a98197
编写于
8月 31, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong 发布系统代码 [ibz-wf,统一工作流]
上级
f648e17f
变更
67
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
67 个修改的文件
包含
2040 行增加
和
1188 行删除
+2040
-1188
app-menu-item.vue
app_web/src/components/app-menu-item/app-menu-item.vue
+5
-5
app-quick-menus.vue
app_web/src/components/app-quick-menus/app-quick-menus.vue
+2
-2
BO-CN-base.ts
app_web/src/locale/lang/BO-CN-base.ts
+2
-0
en-US-base.ts
app_web/src/locale/lang/en-US-base.ts
+2
-0
zh-CN-base.ts
app_web/src/locale/lang/zh-CN-base.ts
+2
-0
wfgroups.ts
app_web/src/mock/entity/wfgroups/wfgroups.ts
+61
-61
wfmembers.ts
app_web/src/mock/entity/wfmembers/wfmembers.ts
+163
-163
wfprocess-definitions.ts
...ock/entity/wfprocess-definitions/wfprocess-definitions.ts
+61
-61
wfremodels.ts
app_web/src/mock/entity/wfremodels/wfremodels.ts
+61
-61
wfsystems.ts
app_web/src/mock/entity/wfsystems/wfsystems.ts
+61
-61
wftasks.ts
app_web/src/mock/entity/wftasks/wftasks.ts
+237
-61
wfusers.ts
app_web/src/mock/entity/wfusers/wfusers.ts
+61
-61
wfgroup-mpickup-view-base.vue
...rkflow/wfgroup-mpickup-view/wfgroup-mpickup-view-base.vue
+1
-1
wfmember-grid-view-base.vue
...s/workflow/wfmember-grid-view/wfmember-grid-view-base.vue
+3
-1
wfuser-mpickup-view-base.vue
...workflow/wfuser-mpickup-view/wfuser-mpickup-view-base.vue
+1
-1
wfgroup-service-base.ts
app_web/src/service/wfgroup/wfgroup-service-base.ts
+38
-38
wfmember-service-base.ts
app_web/src/service/wfmember/wfmember-service-base.ts
+69
-69
wfprocess-definition-service-base.ts
...wfprocess-definition/wfprocess-definition-service-base.ts
+38
-38
wfremodel-service-base.ts
app_web/src/service/wfremodel/wfremodel-service-base.ts
+38
-38
wfsystem-service-base.ts
app_web/src/service/wfsystem/wfsystem-service-base.ts
+38
-38
wftask-service-base.ts
app_web/src/service/wftask/wftask-service-base.ts
+150
-34
wfuser-service-base.ts
app_web/src/service/wfuser/wfuser-service-base.ts
+38
-38
wfindex-view-appmenu-base.vue
...ts/app/wfindex-view-appmenu/wfindex-view-appmenu-base.vue
+5
-5
default-searchform-base.vue
...ts/wfgroup/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
app_web/src/widgets/wfgroup/main-grid/main-grid-base.vue
+9
-6
default-searchform-base.vue
...s/wfmember/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
app_web/src/widgets/wfmember/main-grid/main-grid-base.vue
+9
-6
default-searchform-base.vue
...definition/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
...widgets/wfprocess-definition/main-grid/main-grid-base.vue
+9
-6
default-searchform-base.vue
...ets/wftask/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
app_web/src/widgets/wftask/main-grid/main-grid-base.vue
+9
-6
default-searchform-base.vue
...ets/wfuser/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
app_web/src/widgets/wfuser/main-grid/main-grid-base.vue
+9
-6
pom.xml
ibzwf-app/ibzwf-app-web/pom.xml
+27
-1
Dockerfile
ibzwf-app/ibzwf-app-web/src/main/docker/Dockerfile
+1
-1
application-web-prod.yml
...ibzwf-app-web/src/main/resources/application-web-prod.yml
+28
-28
CommonAutoConfig.java
...in/java/cn/ibizlab/core/util/config/CommonAutoConfig.java
+29
-0
WFProcessDefinitionMapper.java
...izlab/core/workflow/mapper/WFProcessDefinitionMapper.java
+1
-1
IWFTaskService.java
...java/cn/ibizlab/core/workflow/service/IWFTaskService.java
+4
-0
h2_table.xml
ibzwf-core/src/main/resources/liquibase/h2_table.xml
+4
-4
systemResource.json
ibzwf-core/src/main/resources/permission/systemResource.json
+1
-1
pom.xml
ibzwf-provider/ibzwf-provider-api/pom.xml
+35
-1
WFGroupResource.java
...pi/src/main/java/cn/ibizlab/api/rest/WFGroupResource.java
+27
-27
WFMemberResource.java
...i/src/main/java/cn/ibizlab/api/rest/WFMemberResource.java
+83
-83
WFProcessDefinitionResource.java
...java/cn/ibizlab/api/rest/WFProcessDefinitionResource.java
+27
-27
WFREModelResource.java
.../src/main/java/cn/ibizlab/api/rest/WFREModelResource.java
+24
-24
WFSystemResource.java
...i/src/main/java/cn/ibizlab/api/rest/WFSystemResource.java
+27
-27
WFTaskResource.java
...api/src/main/java/cn/ibizlab/api/rest/WFTaskResource.java
+104
-24
WFUserResource.java
...api/src/main/java/cn/ibizlab/api/rest/WFUserResource.java
+27
-27
DELogicAspect.java
...l/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
+21
-9
CusCaffeineCache.java
...in/java/cn/ibizlab/util/cache/cache/CusCaffeineCache.java
+42
-0
CusRedisCache.java
.../main/java/cn/ibizlab/util/cache/cache/CusRedisCache.java
+16
-0
LayeringCacheManager.java
...ibizlab/util/cache/cacheManager/LayeringCacheManager.java
+2
-1
IBZWFFallback.java
...l/src/main/java/cn/ibizlab/util/client/IBZWFFallback.java
+17
-0
IBZWFFeignClient.java
...rc/main/java/cn/ibizlab/util/client/IBZWFFeignClient.java
+12
-0
DELogic.java
ibzwf-util/src/main/java/cn/ibizlab/util/domain/DELogic.java
+2
-0
DEFieldDefaultValueType.java
...n/java/cn/ibizlab/util/enums/DEFieldDefaultValueType.java
+17
-1
DEPredefinedFieldType.java
...ain/java/cn/ibizlab/util/enums/DEPredefinedFieldType.java
+13
-1
Globs.java
ibzwf-util/src/main/java/cn/ibizlab/util/helper/Globs.java
+195
-0
RuleUtils.java
...-util/src/main/java/cn/ibizlab/util/helper/RuleUtils.java
+20
-16
AppController.java
...til/src/main/java/cn/ibizlab/util/rest/AppController.java
+21
-0
AuthenticationInfo.java
...ain/java/cn/ibizlab/util/security/AuthenticationInfo.java
+6
-2
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+0
-1
AuthenticationUserService.java
...va/cn/ibizlab/util/service/AuthenticationUserService.java
+1
-1
IBZConfigService.java
...c/main/java/cn/ibizlab/util/service/IBZConfigService.java
+10
-0
SearchContextHandlerMethodArgumentResolver.java
.../util/web/SearchContextHandlerMethodArgumentResolver.java
+3
-2
application-sys.yml
ibzwf-util/src/main/resources/application-sys.yml
+1
-1
未找到文件。
app_web/src/components/app-menu-item/app-menu-item.vue
浏览文件 @
d8a98197
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<
template
v-else
>
<
template
v-else
>
<i
v-if=
"isFirst"
class=
'fa fa-cogs app-menu-icon'
></i>
<i
v-if=
"isFirst"
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
</
template
>
<span
ref=
"circleText"
:class=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}"
:title=
"$t(`app.menus.${ctrlName}.${item.name
}`)"
>
{{$t(`app.menus.${ctrlName}.${item.name
}`)}}
</span>
<span
ref=
"circleText"
:class=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}"
:title=
"$t(`app.menus.${ctrlName}.${item.name
.toLowerCase()}`)"
>
{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()
}`)}}
</span>
</template>
</template>
<app-menu-item
:isCollapse=
"isCollapse"
:menus=
"item.items"
:ctrlName=
"ctrlName"
:isFirst=
"false"
:counterdata=
"counterdata"
:popper-class=
"popperClass"
></app-menu-item>
<app-menu-item
:isCollapse=
"isCollapse"
:menus=
"item.items"
:ctrlName=
"ctrlName"
:isFirst=
"false"
:counterdata=
"counterdata"
:popper-class=
"popperClass"
></app-menu-item>
</el-submenu>
</el-submenu>
...
@@ -23,18 +23,18 @@
...
@@ -23,18 +23,18 @@
<el-menu-item
:class=
"[
{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id">
<el-menu-item
:class=
"[
{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id">
<template
v-if=
"item.icon && item.icon != ''"
>
<template
v-if=
"item.icon && item.icon != ''"
>
<img
:src=
"item.icon"
class=
'app-menu-icon'
/>
<img
:src=
"item.icon"
class=
'app-menu-icon'
/>
<span
v-if=
"(isFirst && isCollapse) ? true : false"
ref=
"circleText"
:class=
"
{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name
}`)">
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<span
v-if=
"(isFirst && isCollapse) ? true : false"
ref=
"circleText"
:class=
"
{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name
.toLowerCase()}`)">
{{
$t
(
`app.menus.${ctrlName
}
.${item.name.toLowerCase()
}
`
)
}}
<
/span
>
<
/template
>
<
/template
>
<
template
v
-
else
-
if
=
"item.iconcls && item.iconcls != ''"
>
<
template
v
-
else
-
if
=
"item.iconcls && item.iconcls != ''"
>
<
i
:
class
=
"[item.iconcls, 'app-menu-icon']"
><
/i
>
<
i
:
class
=
"[item.iconcls, 'app-menu-icon']"
><
/i
>
<
span
v
-
if
=
"(isFirst && isCollapse) ? true : false"
ref
=
"circleText"
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<
span
v
-
if
=
"(isFirst && isCollapse) ? true : false"
ref
=
"circleText"
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name.toLowerCase()
}
`
)
}}
<
/span
>
<
/template
>
<
/template
>
<
template
v
-
else
>
<
template
v
-
else
>
<
i
v
-
if
=
"isFirst"
class
=
'fa fa-cogs app-menu-icon'
><
/i
>
<
i
v
-
if
=
"isFirst"
class
=
'fa fa-cogs app-menu-icon'
><
/i
>
<
span
v
-
if
=
"(isFirst && isCollapse) ? true : false"
ref
=
"circleText"
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<
span
v
-
if
=
"(isFirst && isCollapse) ? true : false"
ref
=
"circleText"
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name.toLowerCase()
}
`
)
}}
<
/span
>
<
/template
>
<
/template
>
<
template
slot
=
"title"
>
<
template
slot
=
"title"
>
<
span
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<
span
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name.toLowerCase()
}
`
)
}}
<
/span
>
<
template
v
-
if
=
"counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0"
>
<
template
v
-
if
=
"counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0"
>
<
span
class
=
"pull-right"
>
<
span
class
=
"pull-right"
>
<
badge
:
count
=
"counterdata[item.counterid]"
:
overflow
-
count
=
"9999"
><
/badge
>
<
badge
:
count
=
"counterdata[item.counterid]"
:
overflow
-
count
=
"9999"
><
/badge
>
...
...
app_web/src/components/app-quick-menus/app-quick-menus.vue
浏览文件 @
d8a98197
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<img
:src=
"item.iconcls"
v-else-if=
"!Object.is(item.iconcls, '')"
/>
<img
:src=
"item.iconcls"
v-else-if=
"!Object.is(item.iconcls, '')"
/>
<i
class=
"fa fa-cogs"
v-else
></i>
<i
class=
"fa fa-cogs"
v-else
></i>
</span>
</span>
<span>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<span>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`
)
}}
<
/span
>
<
span
class
=
"line"
><
/span
>
<
span
class
=
"line"
><
/span
>
<
/p
>
<
/p
>
<
p
style
=
" display: 'flex' "
>
<
p
style
=
" display: 'flex' "
>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<
img
:
src
=
"item.iconcls"
v
-
else
-
if
=
"!Object.is(item.iconcls, '')"
/>
<
img
:
src
=
"item.iconcls"
v
-
else
-
if
=
"!Object.is(item.iconcls, '')"
/>
<
i
class
=
"fa fa-cogs"
v
-
else
><
/i
>
<
i
class
=
"fa fa-cogs"
v
-
else
><
/i
>
<
/span
>
<
/span
>
<
h4
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/h4
>
<
h4
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`
)
}}
<
/h4
>
<
/div
>
<
/div
>
<
/card
>
<
/card
>
<
/template
>
<
/template
>
...
...
app_web/src/locale/lang/BO-CN-base.ts
浏览文件 @
d8a98197
...
@@ -36,6 +36,8 @@ function getAppLocale(){
...
@@ -36,6 +36,8 @@ function getAppLocale(){
nomore
:
"དེ་ལས་མང་བ་མི་འདུག"
,
nomore
:
"དེ་ལས་མང་བ་མི་འདུག"
,
other
:
"གཞན་དག"
,
other
:
"གཞན་དག"
,
valueNotEmpty
:
"སྟོང་མི་ཆོག"
,
valueNotEmpty
:
"སྟོང་མི་ཆོག"
,
createFailed
:
"གསར་འཛུགས་ཕམ་པ།"
,
isExist
:
"གནས་པ་"
,
},
},
local
:{
local
:{
new
:
"གསར་འཛུགས།"
,
new
:
"གསར་འཛུགས།"
,
...
...
app_web/src/locale/lang/en-US-base.ts
浏览文件 @
d8a98197
...
@@ -36,6 +36,8 @@ function getAppLocale(){
...
@@ -36,6 +36,8 @@ function getAppLocale(){
nomore
:
"No more"
,
nomore
:
"No more"
,
other
:
"other"
,
other
:
"other"
,
valueNotEmpty
:
"The value cannot be null"
,
valueNotEmpty
:
"The value cannot be null"
,
createFailed
:
"Create Failed"
,
isExist
:
"Exist"
,
},
},
local
:{
local
:{
new
:
"New"
,
new
:
"New"
,
...
...
app_web/src/locale/lang/zh-CN-base.ts
浏览文件 @
d8a98197
...
@@ -36,6 +36,8 @@ function getAppLocale(){
...
@@ -36,6 +36,8 @@ function getAppLocale(){
nomore
:
"没有更多了"
,
nomore
:
"没有更多了"
,
other
:
"其他"
,
other
:
"其他"
,
valueNotEmpty
:
"值不能为空"
,
valueNotEmpty
:
"值不能为空"
,
createFailed
:
"创建失败"
,
isExist
:
"已存在"
,
},
},
local
:{
local
:{
new
:
"新建"
,
new
:
"新建"
,
...
...
app_web/src/mock/entity/wfgroups/wfgroups.ts
浏览文件 @
d8a98197
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfgroups\/batch$/)).reply((config: any) => {
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfgroups\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
Select
//
CheckKey
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Post
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Select
"
);
console
.
groupCollapsed
(
"实体:wfgroup 方法:
CheckKey
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
});
});
});
});
}
}
let
items
=
mockDatas
?
mockDatas
:
[];
//let items = mockDatas ? mockDatas : [];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
});
// Create
// Create
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfgroups\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfgroups\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
return
[
status
,
mockDatas
[
0
]];
});
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法: Update"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfgroups
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
wfgroups
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfgroups\/getdraft$/)).reply((config: any) => {
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfgroups\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
CheckKey
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法:
CheckKey
"
);
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfgroups\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfgroups\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Sav
e
//
Updat
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ut
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Updat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfgroups\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfgroups\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法: Select"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
// Get
console
.
groupCollapsed
(
"实体:wfgroup 方法: Remove"
);
mock
.
onGet
(
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
return
[
status
,
_items
?
_items
:{}];
return
[
status
,
_items
?
_items
:{}];
});
});
//
Get
//
Remove
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Delete
(
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Get
"
);
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/wfmembers/wfmembers.ts
浏览文件 @
d8a98197
此差异已折叠。
点击以展开。
app_web/src/mock/entity/wfprocess-definitions/wfprocess-definitions.ts
浏览文件 @
d8a98197
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfprocessdefinitions\/batch$/)).reply((config: any)
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfprocessdefinitions\/batch$/)).reply((config: any)
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
Select
//
CheckKey
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Post
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Select
"
);
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
CheckKey
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfprocessdefinitions\/([a-zA-Z0-9\-\;]{1,35})\/select$
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfprocessdefinitions\/([a-zA-Z0-9\-\;]{1,35})\/select$
});
});
});
});
}
}
let
items
=
mockDatas
?
mockDatas
:
[];
//let items = mockDatas ? mockDatas : [];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
definitionkey
,
tempValue
.
definitionkey
));
//let _items = items.find((item: any) => Object.is(item.definitionkey, tempValue.definitionkey));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'definitionkey'
]
==
tempValue
[
'definitionkey'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
});
// Create
// Create
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfprocessdefinitions\/?([a-zA-Z0-9\-\;]{0,35})$/)).re
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfprocessdefinitions\/?([a-zA-Z0-9\-\;]{0,35})$/)).re
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
return
[
status
,
mockDatas
[
0
]];
});
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Update"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.definitionkey, tempValue.definitionkey));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'definitionkey'
]
==
tempValue
[
'definitionkey'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfprocessdefinitions\/getdraft$/)).reply((config: any)
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfprocessdefinitions\/getdraft$/)).reply((config: any)
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
CheckKey
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
CheckKey
"
);
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfprocessdefinitions\/?([a-zA-Z0-9\-\;]{0,35})\/check
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfprocessdefinitions\/?([a-zA-Z0-9\-\;]{0,35})\/check
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Sav
e
//
Updat
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ut
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Updat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfprocessdefinitions\/fetchdefault(\?[\w-./?%&=,]*)*$/
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfprocessdefinitions\/fetchdefault(\?[\w-./?%&=,]*)*$/
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Select"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
definitionkey
,
tempValue
.
definitionkey
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
// Get
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Remove"
);
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfprocessdefinitions\/([a-zA-Z0-9\-\;]{1,35})$/)).r
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfprocessdefinitions\/([a-zA-Z0-9\-\;]{1,35})$/)).r
return
[
status
,
_items
?
_items
:{}];
return
[
status
,
_items
?
_items
:{}];
});
});
//
Get
//
Remove
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Delete
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Get
"
);
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/wfremodels/wfremodels.ts
浏览文件 @
d8a98197
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfremodels\/batch$/)).reply((config: any) => {
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfremodels\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
Select
//
CheckKey
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Post
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Select
"
);
console
.
groupCollapsed
(
"实体:wfremodel 方法:
CheckKey
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfremodels\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfremodels\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(
});
});
});
});
}
}
let
items
=
mockDatas
?
mockDatas
:
[];
//let items = mockDatas ? mockDatas : [];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
});
// Create
// Create
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfremodels\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((confi
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfremodels\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((confi
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
return
[
status
,
mockDatas
[
0
]];
});
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法: Update"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfremodels
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
wfremodels
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfremodels\/getdraft$/)).reply((config: any) => {
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfremodels\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
CheckKey
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
CheckKey
"
);
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfremodels\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).re
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfremodels\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).re
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Sav
e
//
Updat
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ut
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Updat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfremodels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfremodels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法: Select"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
// Get
console
.
groupCollapsed
(
"实体:wfremodel 方法: Remove"
);
mock
.
onGet
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfremodels\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((conf
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfremodels\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((conf
return
[
status
,
_items
?
_items
:{}];
return
[
status
,
_items
?
_items
:{}];
});
});
//
Get
//
Remove
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Delete
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Get
"
);
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/wfsystems/wfsystems.ts
浏览文件 @
d8a98197
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfsystems\/batch$/)).reply((config: any) => {
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfsystems\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
Select
//
CheckKey
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Post
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法:
Select
"
);
console
.
groupCollapsed
(
"实体:wfsystem 方法:
CheckKey
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'pssystemid'
];
const
paramArray
:
Array
<
any
>
=
[
'pssystemid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfsystems\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfsystems\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((
});
});
});
});
}
}
let
items
=
mockDatas
?
mockDatas
:
[];
//let items = mockDatas ? mockDatas : [];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
pssystemid
,
tempValue
.
pssystemid
));
//let _items = items.find((item: any) => Object.is(item.pssystemid, tempValue.pssystemid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'pssystemid'
]
==
tempValue
[
'pssystemid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
});
// Create
// Create
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfsystems\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfsystems\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
return
[
status
,
mockDatas
[
0
]];
});
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法: Update"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'pssystemid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.pssystemid, tempValue.pssystemid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'pssystemid'
]
==
tempValue
[
'pssystemid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfsystems
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
wfsystems
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfsystems\/getdraft$/)).reply((config: any) => {
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfsystems\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
CheckKey
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法:
CheckKey
"
);
console
.
groupCollapsed
(
"实体:wfsystem 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'pssystemid'
];
const
paramArray
:
Array
<
any
>
=
[
'pssystemid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfsystems\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).rep
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfsystems\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).rep
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Sav
e
//
Updat
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ut
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:wfsystem 方法:
Updat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'pssystemid'
];
const
paramArray
:
Array
<
any
>
=
[
'pssystemid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfsystems\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfsystems\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法: Select"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'pssystemid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
pssystemid
,
tempValue
.
pssystemid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
// Get
console
.
groupCollapsed
(
"实体:wfsystem 方法: Remove"
);
mock
.
onGet
(
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfsystems\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfsystems\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
return
[
status
,
_items
?
_items
:{}];
return
[
status
,
_items
?
_items
:{}];
});
});
//
Get
//
Remove
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Delete
(
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法:
Get
"
);
console
.
groupCollapsed
(
"实体:wfsystem 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/wftasks/wftasks.ts
浏览文件 @
d8a98197
此差异已折叠。
点击以展开。
app_web/src/mock/entity/wfusers/wfusers.ts
浏览文件 @
d8a98197
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfusers\/batch$/)).reply((config: any) => {
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/wfusers\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
Select
//
CheckKey
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Post
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法:
Select
"
);
console
.
groupCollapsed
(
"实体:wfuser 方法:
CheckKey
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((co
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((co
});
});
});
});
}
}
let
items
=
mockDatas
?
mockDatas
:
[];
//let items = mockDatas ? mockDatas : [];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
});
// Create
// Create
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/wfusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
return
[
status
,
mockDatas
[
0
]];
});
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法: Update"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfusers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
wfusers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfusers\/getdraft$/)).reply((config: any) => {
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/wfusers\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
CheckKey
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法:
CheckKey
"
);
console
.
groupCollapsed
(
"实体:wfuser 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/wfusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Sav
e
//
Updat
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ut
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:wfuser 方法:
Updat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfusers\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((con
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/wfusers\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((con
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法: Select"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
// Get
console
.
groupCollapsed
(
"实体:wfuser 方法: Remove"
);
mock
.
onGet
(
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config:
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config:
return
[
status
,
_items
?
_items
:{}];
return
[
status
,
_items
?
_items
:{}];
});
});
//
Get
//
Remove
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Delete
(
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法:
Get
"
);
console
.
groupCollapsed
(
"实体:wfuser 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
...
app_web/src/pages/workflow/wfgroup-mpickup-view/wfgroup-mpickup-view-base.vue
浏览文件 @
d8a98197
...
@@ -843,7 +843,7 @@ export default class WFGroupMPickupViewBase extends Vue {
...
@@ -843,7 +843,7 @@ export default class WFGroupMPickupViewBase extends Vue {
}
}
if
(
model
.
datas
.
length
>
0
){
if
(
model
.
datas
.
length
>
0
){
model
.
datas
.
forEach
((
data
:
any
,
index
:
any
)
=>
{
model
.
datas
.
forEach
((
data
:
any
,
index
:
any
)
=>
{
Object
.
assign
(
data
,{
srfmajortext
:
data
[
'name'
]});
Object
.
assign
(
data
,{
srfmajortext
:
data
.
hasOwnProperty
(
'srfmajortext'
)
?
data
[
'srfmajortext'
]
:
data
[
'name'
]});
})
})
}
}
model
.
datas
.
forEach
((
item
:
any
)
=>
{
model
.
datas
.
forEach
((
item
:
any
)
=>
{
...
...
app_web/src/pages/workflow/wfmember-grid-view/wfmember-grid-view-base.vue
浏览文件 @
d8a98197
...
@@ -1260,6 +1260,8 @@ export default class WFMemberGridViewBase extends Vue {
...
@@ -1260,6 +1260,8 @@ export default class WFMemberGridViewBase extends Vue {
public
newdata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
public
newdata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
let
localContext
:
any
=
null
;
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
let
localViewParam
:
any
=
null
;
let
tempContext
:
any
=
this
.
$util
.
deepCopy
(
this
.
context
);
let
data
:
any
=
this
.
$util
.
deepCopy
(
args
[
0
]);
let
batchAddPSAppViews
:
Array
<
any
>=
[];
let
batchAddPSAppViews
:
Array
<
any
>=
[];
batchAddPSAppViews
=
[
batchAddPSAppViews
=
[
{
view
:{
viewname
:
'wfgroup-mpickup-view'
,
height
:
0
,
width
:
0
,
title
:
'角色/用户组数据多项选择视图'
},
{
view
:{
viewname
:
'wfgroup-mpickup-view'
,
height
:
0
,
width
:
0
,
title
:
'角色/用户组数据多项选择视图'
},
...
@@ -1279,7 +1281,7 @@ export default class WFMemberGridViewBase extends Vue {
...
@@ -1279,7 +1281,7 @@ export default class WFMemberGridViewBase extends Vue {
let
otherViewModel
:
any
=
batchAddPSAppViews
.
find
((
item
:
any
)
=>
{
let
otherViewModel
:
any
=
batchAddPSAppViews
.
find
((
item
:
any
)
=>
{
return
(
item
.
res
&&
(
item
.
res
[
0
]
==
this
.
context
.
srfparentdename
));
return
(
item
.
res
&&
(
item
.
res
[
0
]
==
this
.
context
.
srfparentdename
));
})
})
let
container
:
Subject
<
any
>
=
this
.
$appmodal
.
openModal
(
openViewModel
.
view
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
]
);
let
container
:
Subject
<
any
>
=
this
.
$appmodal
.
openModal
(
openViewModel
.
view
,
tempContext
,
data
);
container
.
subscribe
((
result
:
any
)
=>
{
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
return
;
...
...
app_web/src/pages/workflow/wfuser-mpickup-view/wfuser-mpickup-view-base.vue
浏览文件 @
d8a98197
...
@@ -843,7 +843,7 @@ export default class WFUserMPickupViewBase extends Vue {
...
@@ -843,7 +843,7 @@ export default class WFUserMPickupViewBase extends Vue {
}
}
if
(
model
.
datas
.
length
>
0
){
if
(
model
.
datas
.
length
>
0
){
model
.
datas
.
forEach
((
data
:
any
,
index
:
any
)
=>
{
model
.
datas
.
forEach
((
data
:
any
,
index
:
any
)
=>
{
Object
.
assign
(
data
,{
srfmajortext
:
data
[
'displayname'
]});
Object
.
assign
(
data
,{
srfmajortext
:
data
.
hasOwnProperty
(
'srfmajortext'
)
?
data
[
'srfmajortext'
]
:
data
[
'displayname'
]});
})
})
}
}
model
.
datas
.
forEach
((
item
:
any
)
=>
{
model
.
datas
.
forEach
((
item
:
any
)
=>
{
...
...
app_web/src/service/wfgroup/wfgroup-service-base.ts
浏览文件 @
d8a98197
...
@@ -39,7 +39,7 @@ export default class WFGroupServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class WFGroupServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,9 +47,8 @@ export default class WFGroupServiceBase extends EntityService {
...
@@ -47,9 +47,8 @@ export default class WFGroupServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
* @memberof WFGroupServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -78,37 +77,6 @@ export default class WFGroupServiceBase extends EntityService {
...
@@ -78,37 +77,6 @@ export default class WFGroupServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfgroups/
${
context
.
wfgroup
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfgroups/
${
context
.
wfgroup
}
`
,
isloading
);
return
res
;
}
/**
/**
* Get接口方法
* Get接口方法
*
*
...
@@ -141,7 +109,7 @@ export default class WFGroupServiceBase extends EntityService {
...
@@ -141,7 +109,7 @@ export default class WFGroupServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -149,8 +117,8 @@ export default class WFGroupServiceBase extends EntityService {
...
@@ -149,8 +117,8 @@ export default class WFGroupServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
* @memberof WFGroupServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfgroups/
${
context
.
wfgroup
}
`
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -171,6 +139,23 @@ export default class WFGroupServiceBase extends EntityService {
...
@@ -171,6 +139,23 @@ export default class WFGroupServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfgroups/
${
context
.
wfgroup
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -199,4 +184,19 @@ export default class WFGroupServiceBase extends EntityService {
...
@@ -199,4 +184,19 @@ export default class WFGroupServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/wfgroups/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/wfgroups/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/service/wfmember/wfmember-service-base.ts
浏览文件 @
d8a98197
...
@@ -39,7 +39,7 @@ export default class WFMemberServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class WFMemberServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,19 +47,22 @@ export default class WFMemberServiceBase extends EntityService {
...
@@ -47,19 +47,22 @@ export default class WFMemberServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
* @memberof WFMemberServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/select`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/select`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfmembers/
${
context
.
wfmember
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfmembers/
${
context
.
wfmember
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -115,59 +118,6 @@ export default class WFMemberServiceBase extends EntityService {
...
@@ -115,59 +118,6 @@ export default class WFMemberServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
return
res
;
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
return
res
;
}
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
return
res
;
}
/**
/**
* Get接口方法
* Get接口方法
*
*
...
@@ -222,7 +172,7 @@ export default class WFMemberServiceBase extends EntityService {
...
@@ -222,7 +172,7 @@ export default class WFMemberServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -230,27 +180,52 @@ export default class WFMemberServiceBase extends EntityService {
...
@@ -230,27 +180,52 @@ export default class WFMemberServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
* @memberof WFMemberServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
return
res
;
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
return
res
;
}
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
return
res
;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/
checkkey
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/
save
`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/
checkkey
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/
save
`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfmembers/
${
context
.
wfmember
}
/checkkey`
,
data
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfmembers/
${
context
.
wfmember
}
/save`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
/**
/**
*
Sav
e接口方法
*
Updat
e接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -258,24 +233,24 @@ export default class WFMemberServiceBase extends EntityService {
...
@@ -258,24 +233,24 @@ export default class WFMemberServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
* @memberof WFMemberServiceBase
*/
*/
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Updat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ost
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/save
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ut
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ost
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/save
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ut
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ost
(
`/wfmembers/
${
context
.
wfmember
}
/save
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ut
(
`/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -326,4 +301,29 @@ export default class WFMemberServiceBase extends EntityService {
...
@@ -326,4 +301,29 @@ export default class WFMemberServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/wfmembers/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/wfmembers/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/select`
,
isloading
);
return
res
;
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/select`
,
isloading
);
return
res
;
}
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfmembers/
${
context
.
wfmember
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/service/wfprocess-definition/wfprocess-definition-service-base.ts
浏览文件 @
d8a98197
...
@@ -39,7 +39,7 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,9 +47,8 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
...
@@ -47,9 +47,8 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
* @memberof WFProcessDefinitionServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -77,37 +76,6 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
...
@@ -77,37 +76,6 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
isloading
);
return
res
;
}
/**
/**
* Get接口方法
* Get接口方法
*
*
...
@@ -140,7 +108,7 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
...
@@ -140,7 +108,7 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -148,8 +116,8 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
...
@@ -148,8 +116,8 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
* @memberof WFProcessDefinitionServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -170,6 +138,23 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
...
@@ -170,6 +138,23 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -198,4 +183,19 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
...
@@ -198,4 +183,19 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/service/wfremodel/wfremodel-service-base.ts
浏览文件 @
d8a98197
...
@@ -39,7 +39,7 @@ export default class WFREModelServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class WFREModelServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,9 +47,8 @@ export default class WFREModelServiceBase extends EntityService {
...
@@ -47,9 +47,8 @@ export default class WFREModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
* @memberof WFREModelServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfremodels/
${
context
.
wfremodel
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfremodels/
${
context
.
wfremodel
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -77,37 +76,6 @@ export default class WFREModelServiceBase extends EntityService {
...
@@ -77,37 +76,6 @@ export default class WFREModelServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
isloading
);
return
res
;
}
/**
/**
* Get接口方法
* Get接口方法
*
*
...
@@ -140,7 +108,7 @@ export default class WFREModelServiceBase extends EntityService {
...
@@ -140,7 +108,7 @@ export default class WFREModelServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -148,8 +116,8 @@ export default class WFREModelServiceBase extends EntityService {
...
@@ -148,8 +116,8 @@ export default class WFREModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
* @memberof WFREModelServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfremodels/
${
context
.
wfremodel
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -170,6 +138,23 @@ export default class WFREModelServiceBase extends EntityService {
...
@@ -170,6 +138,23 @@ export default class WFREModelServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -198,4 +183,19 @@ export default class WFREModelServiceBase extends EntityService {
...
@@ -198,4 +183,19 @@ export default class WFREModelServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/wfremodels/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/wfremodels/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfremodels/
${
context
.
wfremodel
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/service/wfsystem/wfsystem-service-base.ts
浏览文件 @
d8a98197
...
@@ -39,7 +39,7 @@ export default class WFSystemServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class WFSystemServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,9 +47,8 @@ export default class WFSystemServiceBase extends EntityService {
...
@@ -47,9 +47,8 @@ export default class WFSystemServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
* @memberof WFSystemServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfsystems/
${
context
.
wfsystem
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfsystems/
${
context
.
wfsystem
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -77,37 +76,6 @@ export default class WFSystemServiceBase extends EntityService {
...
@@ -77,37 +76,6 @@ export default class WFSystemServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfsystems/
${
context
.
wfsystem
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfsystems/
${
context
.
wfsystem
}
`
,
isloading
);
return
res
;
}
/**
/**
* Get接口方法
* Get接口方法
*
*
...
@@ -140,7 +108,7 @@ export default class WFSystemServiceBase extends EntityService {
...
@@ -140,7 +108,7 @@ export default class WFSystemServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -148,8 +116,8 @@ export default class WFSystemServiceBase extends EntityService {
...
@@ -148,8 +116,8 @@ export default class WFSystemServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
* @memberof WFSystemServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfsystems/
${
context
.
wfsystem
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfsystems/
${
context
.
wfsystem
}
`
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -170,6 +138,23 @@ export default class WFSystemServiceBase extends EntityService {
...
@@ -170,6 +138,23 @@ export default class WFSystemServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfsystems/
${
context
.
wfsystem
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -198,4 +183,19 @@ export default class WFSystemServiceBase extends EntityService {
...
@@ -198,4 +183,19 @@ export default class WFSystemServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/wfsystems/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/wfsystems/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfsystems/
${
context
.
wfsystem
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/service/wftask/wftask-service-base.ts
浏览文件 @
d8a98197
此差异已折叠。
点击以展开。
app_web/src/service/wfuser/wfuser-service-base.ts
浏览文件 @
d8a98197
...
@@ -39,7 +39,7 @@ export default class WFUserServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class WFUserServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,9 +47,8 @@ export default class WFUserServiceBase extends EntityService {
...
@@ -47,9 +47,8 @@ export default class WFUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFUserServiceBase
* @memberof WFUserServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfusers/
${
context
.
wfuser
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -78,37 +77,6 @@ export default class WFUserServiceBase extends EntityService {
...
@@ -78,37 +77,6 @@ export default class WFUserServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfusers/
${
context
.
wfuser
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfusers/
${
context
.
wfuser
}
`
,
isloading
);
return
res
;
}
/**
/**
* Get接口方法
* Get接口方法
*
*
...
@@ -141,7 +109,7 @@ export default class WFUserServiceBase extends EntityService {
...
@@ -141,7 +109,7 @@ export default class WFUserServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -149,8 +117,8 @@ export default class WFUserServiceBase extends EntityService {
...
@@ -149,8 +117,8 @@ export default class WFUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof WFUserServiceBase
* @memberof WFUserServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/wfusers/
${
context
.
wfuser
}
`
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -171,6 +139,23 @@ export default class WFUserServiceBase extends EntityService {
...
@@ -171,6 +139,23 @@ export default class WFUserServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfusers/
${
context
.
wfuser
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -199,4 +184,19 @@ export default class WFUserServiceBase extends EntityService {
...
@@ -199,4 +184,19 @@ export default class WFUserServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/wfusers/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/wfusers/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/wfusers/
${
context
.
wfuser
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/widgets/app/wfindex-view-appmenu/wfindex-view-appmenu-base.vue
浏览文件 @
d8a98197
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<
template
v-else
>
<
template
v-else
>
<i
class=
'fa fa-cogs app-menu-icon'
></i>
<i
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
</
template
>
<span
class=
'text'
:title=
"$t('app.menus.wfindexview.' + item0.name
)"
>
{{$t('app.menus.wfindexview.' + item0.name
)}}
</span>
<span
class=
'text'
:title=
"$t('app.menus.wfindexview.' + item0.name
.toLowerCase())"
>
{{$t('app.menus.wfindexview.' + item0.name.toLowerCase()
)}}
</span>
</template>
</template>
<
template
v-for=
"item1 in item0.items"
>
<
template
v-for=
"item1 in item0.items"
>
<template
v-if=
"item1.items && Array.isArray(item1.items) && item1.items.length > 0"
>
<template
v-if=
"item1.items && Array.isArray(item1.items) && item1.items.length > 0"
>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<
template
v-else-if=
"item1.iconcls && item1.iconcls != ''"
>
<
template
v-else-if=
"item1.iconcls && item1.iconcls != ''"
>
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
</
template
>
</
template
>
<span
class=
'text'
:title=
"$t('app.menus.wfindexview.' + item1.name
)"
>
{{$t('app.menus.wfindexview.' + item1.name
)}}
</span>
<span
class=
'text'
:title=
"$t('app.menus.wfindexview.' + item1.name
.toLowerCase())"
>
{{$t('app.menus.wfindexview.' + item1.name.toLowerCase()
)}}
</span>
</template>
</template>
<
template
v-for=
"item2 in item1.items"
>
<
template
v-for=
"item2 in item1.items"
>
<template
v-if=
"item2.type =='MENUITEM'"
>
<template
v-if=
"item2.type =='MENUITEM'"
>
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<i
:class=
"[item2.iconcls, 'app-menu-icon']"
></i>
<i
:class=
"[item2.iconcls, 'app-menu-icon']"
></i>
</
template
>
</
template
>
<
template
slot=
"title"
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t('app.menus.wfindexview.' + item2.name
)"
>
{{
$t
(
'app.menus.wfindexview.'
+
item2
.
name
)
}}
</span>
<span
class=
"text"
:title=
"$t('app.menus.wfindexview.' + item2.name
.toLowerCase())"
>
{{
$t
(
'app.menus.wfindexview.'
+
item2
.
name
.
toLowerCase
()
)
}}
</span>
<template
v-if=
"counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0"
>
<template
v-if=
"counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0"
>
<span
class=
"pull-right"
>
<span
class=
"pull-right"
>
<badge
:count=
"counterdata[item2.counterid]"
:overflow-count=
"9999"
></badge>
<badge
:count=
"counterdata[item2.counterid]"
:overflow-count=
"9999"
></badge>
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
</
template
>
</
template
>
<
template
slot=
"title"
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t('app.menus.wfindexview.' + item1.name
)"
>
{{
$t
(
'app.menus.wfindexview.'
+
item1
.
name
)
}}
</span>
<span
class=
"text"
:title=
"$t('app.menus.wfindexview.' + item1.name
.toLowerCase())"
>
{{
$t
(
'app.menus.wfindexview.'
+
item1
.
name
.
toLowerCase
()
)
}}
</span>
<template
v-if=
"counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0"
>
<template
v-if=
"counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0"
>
<span
class=
"pull-right"
>
<span
class=
"pull-right"
>
<badge
:count=
"counterdata[item1.counterid]"
:overflow-count=
"9999"
></badge>
<badge
:count=
"counterdata[item1.counterid]"
:overflow-count=
"9999"
></badge>
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<i
class=
'fa fa-cogs app-menu-icon'
></i>
<i
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
</
template
>
<
template
slot=
"title"
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t('app.menus.wfindexview.' + item0.name
)"
>
{{
$t
(
'app.menus.wfindexview.'
+
item0
.
name
)
}}
</span>
<span
class=
"text"
:title=
"$t('app.menus.wfindexview.' + item0.name
.toLowerCase())"
>
{{
$t
(
'app.menus.wfindexview.'
+
item0
.
name
.
toLowerCase
()
)
}}
</span>
<template
v-if=
"counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0"
>
<template
v-if=
"counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0"
>
<span
class=
"pull-right"
>
<span
class=
"pull-right"
>
<badge
:count=
"counterdata[item0.counterid]"
:overflow-count=
"9999"
></badge>
<badge
:count=
"counterdata[item0.counterid]"
:overflow-count=
"9999"
></badge>
...
...
app_web/src/widgets/wfgroup/default-searchform/default-searchform-base.vue
浏览文件 @
d8a98197
...
@@ -670,8 +670,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -670,8 +670,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/wfgroup/main-grid/main-grid-base.vue
浏览文件 @
d8a98197
...
@@ -845,8 +845,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -845,8 +845,8 @@ export default class MainBase extends Vue implements ControlInterface {
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
@@ -896,7 +896,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -896,7 +896,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
}
}
...
@@ -981,7 +981,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -981,7 +981,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
!=
200
)
{
if
(
response
&&
response
.
status
!=
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
message
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
return
;
return
;
}
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
@@ -1102,6 +1102,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1102,6 +1102,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
@@ -1969,8 +1972,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1969,8 +1972,8 @@ export default class MainBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/wfmember/default-searchform/default-searchform-base.vue
浏览文件 @
d8a98197
...
@@ -670,8 +670,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -670,8 +670,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/wfmember/main-grid/main-grid-base.vue
浏览文件 @
d8a98197
...
@@ -866,8 +866,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -866,8 +866,8 @@ export default class MainBase extends Vue implements ControlInterface {
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
@@ -917,7 +917,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -917,7 +917,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
}
}
...
@@ -1002,7 +1002,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1002,7 +1002,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
!=
200
)
{
if
(
response
&&
response
.
status
!=
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
message
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
return
;
return
;
}
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
@@ -1123,6 +1123,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1123,6 +1123,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
@@ -1987,8 +1990,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1987,8 +1990,8 @@ export default class MainBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/wfprocess-definition/default-searchform/default-searchform-base.vue
浏览文件 @
d8a98197
...
@@ -706,8 +706,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -706,8 +706,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/wfprocess-definition/main-grid/main-grid-base.vue
浏览文件 @
d8a98197
...
@@ -889,8 +889,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -889,8 +889,8 @@ export default class MainBase extends Vue implements ControlInterface {
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
@@ -940,7 +940,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -940,7 +940,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
}
}
...
@@ -1025,7 +1025,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1025,7 +1025,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
!=
200
)
{
if
(
response
&&
response
.
status
!=
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
message
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
return
;
return
;
}
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
@@ -1146,6 +1146,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1146,6 +1146,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
@@ -2027,8 +2030,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2027,8 +2030,8 @@ export default class MainBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/wftask/default-searchform/default-searchform-base.vue
浏览文件 @
d8a98197
...
@@ -785,8 +785,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -785,8 +785,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/wftask/main-grid/main-grid-base.vue
浏览文件 @
d8a98197
...
@@ -985,8 +985,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -985,8 +985,8 @@ export default class MainBase extends Vue implements ControlInterface {
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
@@ -1036,7 +1036,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1036,7 +1036,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
}
}
...
@@ -1121,7 +1121,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1121,7 +1121,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
!=
200
)
{
if
(
response
&&
response
.
status
!=
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
message
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
return
;
return
;
}
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
@@ -1242,6 +1242,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1242,6 +1242,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
@@ -2130,8 +2133,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2130,8 +2133,8 @@ export default class MainBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/wfuser/default-searchform/default-searchform-base.vue
浏览文件 @
d8a98197
...
@@ -670,8 +670,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -670,8 +670,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/wfuser/main-grid/main-grid-base.vue
浏览文件 @
d8a98197
...
@@ -887,8 +887,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -887,8 +887,8 @@ export default class MainBase extends Vue implements ControlInterface {
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
@@ -938,7 +938,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -938,7 +938,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
}
}
...
@@ -1023,7 +1023,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1023,7 +1023,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
!=
200
)
{
if
(
response
&&
response
.
status
!=
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
message
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
return
;
return
;
}
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
@@ -1144,6 +1144,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1144,6 +1144,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
@@ -2017,8 +2020,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2017,8 +2020,8 @@ export default class MainBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
ibzwf-app/ibzwf-app-web/pom.xml
浏览文件 @
d8a98197
...
@@ -77,6 +77,32 @@
...
@@ -77,6 +77,32 @@
<workingDirectory>
../../app_web
</workingDirectory>
<workingDirectory>
../../app_web
</workingDirectory>
</configuration>
</configuration>
</execution>
</execution>
<execution>
<id>
prepare
</id>
<configuration>
<executable>
cp
</executable>
<arguments>
<argument>
../../${project.artifactId}.jar
</argument>
<argument>
${project.basedir}/src/main/docker/
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>
buildpush
</id>
<configuration>
<executable>
docker
</executable>
<arguments>
<argument>
buildx
</argument>
<argument>
build
</argument>
<argument>
--platform
</argument>
<argument>
linux/amd64,linux/arm64
</argument>
<argument>
-t
</argument>
<argument>
${docker.image.prefix}/${project.artifactId}:latest
</argument>
<argument>
${project.basedir}/src/main/docker
</argument>
<argument>
--push
</argument>
</arguments>
</configuration>
</execution>
</executions>
</executions>
</plugin>
</plugin>
...
@@ -114,7 +140,7 @@
...
@@ -114,7 +140,7 @@
</resource>
</resource>
</resources>
</resources>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
</profile>
</profile>
...
...
ibzwf-app/ibzwf-app-web/src/main/docker/Dockerfile
浏览文件 @
d8a98197
FROM
openjdk:8-jre-alpine
FROM
adoptopenjdk/openjdk8:jdk8u242-b08-centos
ENV
TZ=Asia/Shanghai \
ENV
TZ=Asia/Shanghai \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
...
...
ibzwf-app/ibzwf-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
d8a98197
...
@@ -7,34 +7,6 @@ logging:
...
@@ -7,34 +7,6 @@ logging:
#zuul网关路由设置
#zuul网关路由设置
zuul
:
zuul
:
routes
:
routes
:
wf_task
:
path
:
/wftasks/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_group_member
:
path
:
/wfmembers/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_user
:
path
:
/wfusers/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_group
:
path
:
/wfgroups/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_model
:
path
:
/wfremodels/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_pssystem
:
path
:
/wfsystems/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_definition
:
path
:
/wfprocessdefinitions/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
loginv7
:
loginv7
:
path
:
/v7/login
path
:
/v7/login
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
...
@@ -91,5 +63,33 @@ zuul:
...
@@ -91,5 +63,33 @@ zuul:
path
:
/sysauthlogs
path
:
/sysauthlogs
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
stripPrefix
:
false
wf_task
:
path
:
/wftasks/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_group_member
:
path
:
/wfmembers/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_user
:
path
:
/wfusers/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_group
:
path
:
/wfgroups/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_model
:
path
:
/wfremodels/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_pssystem
:
path
:
/wfsystems/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
wf_definition
:
path
:
/wfprocessdefinitions/**
serviceId
:
${ibiz.ref.service.ibzwf-api:ibzwf-api}
stripPrefix
:
false
sensitive-headers
:
sensitive-headers
:
-
Cookie,Set-Cookie,Authorization
-
Cookie,Set-Cookie,Authorization
ibzwf-core/src/main/java/cn/ibizlab/core/util/config/CommonAutoConfig.java
0 → 100644
浏览文件 @
d8a98197
package
cn
.
ibizlab
.
core
.
util
.
config
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.stereotype.Component
;
/**
* 通用配置类
*/
@Configuration
public
class
CommonAutoConfig
{
@Value
(
"${jbpm.enable.multi.con:true}"
)
private
String
flag
;
/**
* 处理逻辑节点支持多来源配置
*/
@Component
public
class
InstallSystemParamsCommandLineRunner
implements
CommandLineRunner
{
@Override
public
void
run
(
String
...
var1
){
System
.
setProperty
(
"jbpm.enable.multi.con"
,
flag
);
}
}
}
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/mapper/WFProcessDefinitionMapper.java
浏览文件 @
d8a98197
...
@@ -30,7 +30,7 @@ public interface WFProcessDefinitionMapper extends BaseMapper<WFProcessDefinitio
...
@@ -30,7 +30,7 @@ public interface WFProcessDefinitionMapper extends BaseMapper<WFProcessDefinitio
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
)
int
updateById
(
@Param
(
Constants
.
ENTITY
)
WFProcessDefinition
entity
);
int
updateById
(
@Param
(
Constants
.
ENTITY
)
WFProcessDefinition
entity
);
@Override
@Override
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
,
condition
=
"#p0 != null"
)
int
update
(
@Param
(
Constants
.
ENTITY
)
WFProcessDefinition
entity
,
@Param
(
"ew"
)
Wrapper
<
WFProcessDefinition
>
updateWrapper
);
int
update
(
@Param
(
Constants
.
ENTITY
)
WFProcessDefinition
entity
,
@Param
(
"ew"
)
Wrapper
<
WFProcessDefinition
>
updateWrapper
);
@Override
@Override
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0"
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0"
)
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFTaskService.java
浏览文件 @
d8a98197
...
@@ -36,6 +36,10 @@ public interface IWFTaskService {
...
@@ -36,6 +36,10 @@ public interface IWFTaskService {
boolean
save
(
WFTask
et
);
boolean
save
(
WFTask
et
);
void
saveBatch
(
List
<
WFTask
>
list
);
void
saveBatch
(
List
<
WFTask
>
list
);
Page
<
WFTask
>
searchDefault
(
WFTaskSearchContext
context
);
Page
<
WFTask
>
searchDefault
(
WFTaskSearchContext
context
);
Page
<
WFTask
>
searchDoneTask
(
WFTaskSearchContext
context
);
Page
<
WFTask
>
searchFinishTask
(
WFTaskSearchContext
context
);
Page
<
WFTask
>
searchTodoTask
(
WFTaskSearchContext
context
);
Page
<
WFTask
>
searchToreadTask
(
WFTaskSearchContext
context
);
}
}
...
...
ibzwf-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
d8a98197
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<!--输出实体[WF_GROUP]数据结构 -->
<!--输出实体[WF_GROUP]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-wf_group-9-1"
>
<changeSet
author=
"
root
"
id=
"tab-wf_group-9-1"
>
<createTable
tableName=
"IBZWFGROUP"
>
<createTable
tableName=
"IBZWFGROUP"
>
<column
name=
"GROUPID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"GROUPID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_GROUP_GROUPID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_GROUP_GROUPID"
/>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<!--输出实体[WF_GROUP_MEMBER]数据结构 -->
<!--输出实体[WF_GROUP_MEMBER]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-wf_group_member-13-2"
>
<changeSet
author=
"
root
"
id=
"tab-wf_group_member-13-2"
>
<createTable
tableName=
"IBZWFMEMBER"
>
<createTable
tableName=
"IBZWFMEMBER"
>
<column
name=
"MEMBERID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"MEMBERID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_GROUP_MEMBER_MEMBERID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_GROUP_MEMBER_MEMBERID"
/>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<!--输出实体[WF_DEFINITION]数据结构 -->
<!--输出实体[WF_DEFINITION]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-wf_definition-1-3"
>
<changeSet
author=
"
root
"
id=
"tab-wf_definition-1-3"
>
<createTable
tableName=
"IBZWFDEFINITION"
>
<createTable
tableName=
"IBZWFDEFINITION"
>
<column
name=
"DEFINITIONKEY"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"DEFINITIONKEY"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_DEFINITION_DEFINITIONKEY"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_DEFINITION_DEFINITIONKEY"
/>
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
<!--输出实体[WF_GROUP]外键关系 -->
<!--输出实体[WF_GROUP]外键关系 -->
<!--输出实体[WF_GROUP_MEMBER]外键关系 -->
<!--输出实体[WF_GROUP_MEMBER]外键关系 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"fk-wf_group_member-13-5"
>
<changeSet
author=
"
root
"
id=
"fk-wf_group_member-13-5"
>
<addForeignKeyConstraint
baseColumnNames=
"GROUPID"
baseTableName=
"IBZWFMEMBER"
constraintName=
"DER1N_WF_GROUP_MEMBER_WF_GROUP"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"GROUPID"
referencedTableName=
"IBZWFGROUP"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"GROUPID"
baseTableName=
"IBZWFMEMBER"
constraintName=
"DER1N_WF_GROUP_MEMBER_WF_GROUP"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"GROUPID"
referencedTableName=
"IBZWFGROUP"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[WF_DEFINITION]外键关系 -->
<!--输出实体[WF_DEFINITION]外键关系 -->
...
...
ibzwf-core/src/main/resources/permission/systemResource.json
浏览文件 @
d8a98197
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
"dename"
:
"WFTask"
,
"dename"
:
"WFTask"
,
"delogicname"
:
"工作流任务"
,
"delogicname"
:
"工作流任务"
,
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}
,{
"id"
:
"DoneTask"
,
"name"
:
"已办任务"
},{
"id"
:
"FinishTask"
,
"name"
:
"办结任务"
},{
"id"
:
"TodoTask"
,
"name"
:
"待办任务"
},{
"id"
:
"ToreadTask"
,
"name"
:
"待阅任务"
}
],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
...
...
ibzwf-provider/ibzwf-provider-api/pom.xml
浏览文件 @
d8a98197
...
@@ -73,7 +73,41 @@
...
@@ -73,7 +73,41 @@
</resource>
</resource>
</resources>
</resources>
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
exec-maven-plugin
</artifactId>
<version>
3.0.0
</version>
<executions>
<execution>
<id>
prepare
</id>
<configuration>
<executable>
cp
</executable>
<arguments>
<argument>
../../${project.artifactId}.jar
</argument>
<argument>
${project.basedir}/src/main/docker/
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>
buildpush
</id>
<configuration>
<executable>
docker
</executable>
<arguments>
<argument>
buildx
</argument>
<argument>
build
</argument>
<argument>
--platform
</argument>
<argument>
linux/amd64,linux/arm64
</argument>
<argument>
-t
</argument>
<argument>
${docker.image.prefix}/${project.artifactId}:latest
</argument>
<argument>
${project.basedir}/src/main/docker
</argument>
<argument>
--push
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</plugins>
</build>
</build>
</profile>
</profile>
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFGroupResource.java
浏览文件 @
d8a98197
...
@@ -65,25 +65,15 @@ public class WFGroupResource {
...
@@ -65,25 +65,15 @@ public class WFGroupResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Update-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Get-all')"
)
@ApiOperation
(
value
=
"更新角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"更新角色/用户组"
)
@ApiOperation
(
value
=
"获取角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"获取角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfgroups/{wfgroup_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfgroups/{wfgroup_id}"
)
public
ResponseEntity
<
WFGroupDTO
>
update
(
@PathVariable
(
"wfgroup_id"
)
String
wfgroup_id
,
@RequestBody
WFGroupDTO
wfgroupdto
)
{
public
ResponseEntity
<
WFGroupDTO
>
get
(
@PathVariable
(
"wfgroup_id"
)
String
wfgroup_id
)
{
WFGroup
domain
=
wfgroupMapping
.
toDomain
(
wfgroupdto
);
WFGroup
domain
=
wfgroupService
.
get
(
wfgroup_id
);
domain
.
setId
(
wfgroup_id
);
WFGroupDTO
dto
=
wfgroupMapping
.
toDto
(
domain
);
wfgroupService
.
update
(
domain
);
WFGroupDTO
dto
=
wfgroupMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Update-all')"
)
@ApiOperation
(
value
=
"批量更新角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"批量更新角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfgroups/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFGroupDTO
>
wfgroupdtos
)
{
wfgroupService
.
updateBatch
(
wfgroupMapping
.
toDomain
(
wfgroupdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Remove-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Remove-all')"
)
@ApiOperation
(
value
=
"删除角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"删除角色/用户组"
)
@ApiOperation
(
value
=
"删除角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"删除角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfgroups/{wfgroup_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfgroups/{wfgroup_id}"
)
...
@@ -99,20 +89,23 @@ public class WFGroupResource {
...
@@ -99,20 +89,23 @@ public class WFGroupResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Get-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Update-all')"
)
@ApiOperation
(
value
=
"获取角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"获取角色/用户组"
)
@ApiOperation
(
value
=
"更新角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"更新角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfgroups/{wfgroup_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfgroups/{wfgroup_id}"
)
public
ResponseEntity
<
WFGroupDTO
>
get
(
@PathVariable
(
"wfgroup_id"
)
String
wfgroup_id
)
{
public
ResponseEntity
<
WFGroupDTO
>
update
(
@PathVariable
(
"wfgroup_id"
)
String
wfgroup_id
,
@RequestBody
WFGroupDTO
wfgroupdto
)
{
WFGroup
domain
=
wfgroupService
.
get
(
wfgroup_id
);
WFGroup
domain
=
wfgroupMapping
.
toDomain
(
wfgroupdto
);
WFGroupDTO
dto
=
wfgroupMapping
.
toDto
(
domain
);
domain
.
setId
(
wfgroup_id
);
wfgroupService
.
update
(
domain
);
WFGroupDTO
dto
=
wfgroupMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"获取角色/用户组草稿"
,
tags
=
{
"角色/用户组"
},
notes
=
"获取角色/用户组草稿"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Update-all')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfgroups/getdraft"
)
@ApiOperation
(
value
=
"批量更新角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"批量更新角色/用户组"
)
public
ResponseEntity
<
WFGroupDTO
>
getDraft
(
WFGroupDTO
dto
)
{
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfgroups/batch"
)
WFGroup
domain
=
wfgroupMapping
.
toDomain
(
dto
);
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFGroupDTO
>
wfgroupdtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupMapping
.
toDto
(
wfgroupService
.
getDraft
(
domain
)));
wfgroupService
.
updateBatch
(
wfgroupMapping
.
toDomain
(
wfgroupdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"检查角色/用户组"
)
@ApiOperation
(
value
=
"检查角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"检查角色/用户组"
)
...
@@ -121,6 +114,13 @@ public class WFGroupResource {
...
@@ -121,6 +114,13 @@ public class WFGroupResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupService
.
checkKey
(
wfgroupMapping
.
toDomain
(
wfgroupdto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupService
.
checkKey
(
wfgroupMapping
.
toDomain
(
wfgroupdto
)));
}
}
@ApiOperation
(
value
=
"获取角色/用户组草稿"
,
tags
=
{
"角色/用户组"
},
notes
=
"获取角色/用户组草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfgroups/getdraft"
)
public
ResponseEntity
<
WFGroupDTO
>
getDraft
(
WFGroupDTO
dto
)
{
WFGroup
domain
=
wfgroupMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupMapping
.
toDto
(
wfgroupService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Save-all')"
)
@ApiOperation
(
value
=
"保存角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"保存角色/用户组"
)
@ApiOperation
(
value
=
"保存角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"保存角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/save"
)
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFMemberResource.java
浏览文件 @
d8a98197
此差异已折叠。
点击以展开。
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFProcessDefinitionResource.java
浏览文件 @
d8a98197
...
@@ -65,25 +65,15 @@ public class WFProcessDefinitionResource {
...
@@ -65,25 +65,15 @@ public class WFProcessDefinitionResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Update-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Get-all')"
)
@ApiOperation
(
value
=
"更新流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"更新流程定义"
)
@ApiOperation
(
value
=
"获取流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"获取流程定义"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfprocessdefinitions/{wfprocessdefinition_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfprocessdefinitions/{wfprocessdefinition_id}"
)
public
ResponseEntity
<
WFProcessDefinitionDTO
>
update
(
@PathVariable
(
"wfprocessdefinition_id"
)
String
wfprocessdefinition_id
,
@RequestBody
WFProcessDefinitionDTO
wfprocessdefinitiondto
)
{
public
ResponseEntity
<
WFProcessDefinitionDTO
>
get
(
@PathVariable
(
"wfprocessdefinition_id"
)
String
wfprocessdefinition_id
)
{
WFProcessDefinition
domain
=
wfprocessdefinitionMapping
.
toDomain
(
wfprocessdefinitiondto
);
WFProcessDefinition
domain
=
wfprocessdefinitionService
.
get
(
wfprocessdefinition_id
);
domain
.
setDefinitionkey
(
wfprocessdefinition_id
);
WFProcessDefinitionDTO
dto
=
wfprocessdefinitionMapping
.
toDto
(
domain
);
wfprocessdefinitionService
.
update
(
domain
);
WFProcessDefinitionDTO
dto
=
wfprocessdefinitionMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Update-all')"
)
@ApiOperation
(
value
=
"批量更新流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"批量更新流程定义"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfprocessdefinitions/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFProcessDefinitionDTO
>
wfprocessdefinitiondtos
)
{
wfprocessdefinitionService
.
updateBatch
(
wfprocessdefinitionMapping
.
toDomain
(
wfprocessdefinitiondtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Remove-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Remove-all')"
)
@ApiOperation
(
value
=
"删除流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"删除流程定义"
)
@ApiOperation
(
value
=
"删除流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"删除流程定义"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfprocessdefinitions/{wfprocessdefinition_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfprocessdefinitions/{wfprocessdefinition_id}"
)
...
@@ -99,20 +89,23 @@ public class WFProcessDefinitionResource {
...
@@ -99,20 +89,23 @@ public class WFProcessDefinitionResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Get-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Update-all')"
)
@ApiOperation
(
value
=
"获取流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"获取流程定义"
)
@ApiOperation
(
value
=
"更新流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"更新流程定义"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfprocessdefinitions/{wfprocessdefinition_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfprocessdefinitions/{wfprocessdefinition_id}"
)
public
ResponseEntity
<
WFProcessDefinitionDTO
>
get
(
@PathVariable
(
"wfprocessdefinition_id"
)
String
wfprocessdefinition_id
)
{
public
ResponseEntity
<
WFProcessDefinitionDTO
>
update
(
@PathVariable
(
"wfprocessdefinition_id"
)
String
wfprocessdefinition_id
,
@RequestBody
WFProcessDefinitionDTO
wfprocessdefinitiondto
)
{
WFProcessDefinition
domain
=
wfprocessdefinitionService
.
get
(
wfprocessdefinition_id
);
WFProcessDefinition
domain
=
wfprocessdefinitionMapping
.
toDomain
(
wfprocessdefinitiondto
);
WFProcessDefinitionDTO
dto
=
wfprocessdefinitionMapping
.
toDto
(
domain
);
domain
.
setDefinitionkey
(
wfprocessdefinition_id
);
wfprocessdefinitionService
.
update
(
domain
);
WFProcessDefinitionDTO
dto
=
wfprocessdefinitionMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"获取流程定义草稿"
,
tags
=
{
"流程定义"
},
notes
=
"获取流程定义草稿"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Update-all')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfprocessdefinitions/getdraft"
)
@ApiOperation
(
value
=
"批量更新流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"批量更新流程定义"
)
public
ResponseEntity
<
WFProcessDefinitionDTO
>
getDraft
(
WFProcessDefinitionDTO
dto
)
{
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfprocessdefinitions/batch"
)
WFProcessDefinition
domain
=
wfprocessdefinitionMapping
.
toDomain
(
dto
);
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFProcessDefinitionDTO
>
wfprocessdefinitiondtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfprocessdefinitionMapping
.
toDto
(
wfprocessdefinitionService
.
getDraft
(
domain
)));
wfprocessdefinitionService
.
updateBatch
(
wfprocessdefinitionMapping
.
toDomain
(
wfprocessdefinitiondtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"检查流程定义"
)
@ApiOperation
(
value
=
"检查流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"检查流程定义"
)
...
@@ -121,6 +114,13 @@ public class WFProcessDefinitionResource {
...
@@ -121,6 +114,13 @@ public class WFProcessDefinitionResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfprocessdefinitionService
.
checkKey
(
wfprocessdefinitionMapping
.
toDomain
(
wfprocessdefinitiondto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfprocessdefinitionService
.
checkKey
(
wfprocessdefinitionMapping
.
toDomain
(
wfprocessdefinitiondto
)));
}
}
@ApiOperation
(
value
=
"获取流程定义草稿"
,
tags
=
{
"流程定义"
},
notes
=
"获取流程定义草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfprocessdefinitions/getdraft"
)
public
ResponseEntity
<
WFProcessDefinitionDTO
>
getDraft
(
WFProcessDefinitionDTO
dto
)
{
WFProcessDefinition
domain
=
wfprocessdefinitionMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfprocessdefinitionMapping
.
toDto
(
wfprocessdefinitionService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Save-all')"
)
@ApiOperation
(
value
=
"保存流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"保存流程定义"
)
@ApiOperation
(
value
=
"保存流程定义"
,
tags
=
{
"流程定义"
},
notes
=
"保存流程定义"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfprocessdefinitions/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfprocessdefinitions/save"
)
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFREModelResource.java
浏览文件 @
d8a98197
...
@@ -63,23 +63,14 @@ public class WFREModelResource {
...
@@ -63,23 +63,14 @@ public class WFREModelResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"更新流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"更新流程模型"
)
@ApiOperation
(
value
=
"获取流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"获取流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfremodels/{wfremodel_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfremodels/{wfremodel_id}"
)
public
ResponseEntity
<
WFREModelDTO
>
update
(
@PathVariable
(
"wfremodel_id"
)
String
wfremodel_id
,
@RequestBody
WFREModelDTO
wfremodeldto
)
{
public
ResponseEntity
<
WFREModelDTO
>
get
(
@PathVariable
(
"wfremodel_id"
)
String
wfremodel_id
)
{
WFREModel
domain
=
wfremodelMapping
.
toDomain
(
wfremodeldto
);
WFREModel
domain
=
wfremodelService
.
get
(
wfremodel_id
);
domain
.
setId
(
wfremodel_id
);
WFREModelDTO
dto
=
wfremodelMapping
.
toDto
(
domain
);
wfremodelService
.
update
(
domain
);
WFREModelDTO
dto
=
wfremodelMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"批量更新流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"批量更新流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfremodels/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFREModelDTO
>
wfremodeldtos
)
{
wfremodelService
.
updateBatch
(
wfremodelMapping
.
toDomain
(
wfremodeldtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"删除流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"删除流程模型"
)
@ApiOperation
(
value
=
"删除流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"删除流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfremodels/{wfremodel_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfremodels/{wfremodel_id}"
)
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"wfremodel_id"
)
String
wfremodel_id
)
{
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"wfremodel_id"
)
String
wfremodel_id
)
{
...
@@ -93,19 +84,21 @@ public class WFREModelResource {
...
@@ -93,19 +84,21 @@ public class WFREModelResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"获取流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"获取流程模型"
)
@ApiOperation
(
value
=
"更新流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"更新流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfremodels/{wfremodel_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfremodels/{wfremodel_id}"
)
public
ResponseEntity
<
WFREModelDTO
>
get
(
@PathVariable
(
"wfremodel_id"
)
String
wfremodel_id
)
{
public
ResponseEntity
<
WFREModelDTO
>
update
(
@PathVariable
(
"wfremodel_id"
)
String
wfremodel_id
,
@RequestBody
WFREModelDTO
wfremodeldto
)
{
WFREModel
domain
=
wfremodelService
.
get
(
wfremodel_id
);
WFREModel
domain
=
wfremodelMapping
.
toDomain
(
wfremodeldto
);
WFREModelDTO
dto
=
wfremodelMapping
.
toDto
(
domain
);
domain
.
setId
(
wfremodel_id
);
wfremodelService
.
update
(
domain
);
WFREModelDTO
dto
=
wfremodelMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"
获取流程模型草稿"
,
tags
=
{
"流程模型"
},
notes
=
"获取流程模型草稿
"
)
@ApiOperation
(
value
=
"
批量更新流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"批量更新流程模型
"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfremodels/getdraft
"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfremodels/batch
"
)
public
ResponseEntity
<
WFREModelDTO
>
getDraft
(
WFREModelDTO
dto
)
{
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFREModelDTO
>
wfremodeldtos
)
{
WFREModel
domain
=
wfremodelMapping
.
toDomain
(
dto
);
wfremodelService
.
updateBatch
(
wfremodelMapping
.
toDomain
(
wfremodeldtos
)
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelMapping
.
toDto
(
wfremodelService
.
getDraft
(
domain
))
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"检查流程模型"
)
@ApiOperation
(
value
=
"检查流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"检查流程模型"
)
...
@@ -114,6 +107,13 @@ public class WFREModelResource {
...
@@ -114,6 +107,13 @@ public class WFREModelResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelService
.
checkKey
(
wfremodelMapping
.
toDomain
(
wfremodeldto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelService
.
checkKey
(
wfremodelMapping
.
toDomain
(
wfremodeldto
)));
}
}
@ApiOperation
(
value
=
"获取流程模型草稿"
,
tags
=
{
"流程模型"
},
notes
=
"获取流程模型草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfremodels/getdraft"
)
public
ResponseEntity
<
WFREModelDTO
>
getDraft
(
WFREModelDTO
dto
)
{
WFREModel
domain
=
wfremodelMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelMapping
.
toDto
(
wfremodelService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"保存流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"保存流程模型"
)
@ApiOperation
(
value
=
"保存流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"保存流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels/save"
)
public
ResponseEntity
<
WFREModelDTO
>
save
(
@RequestBody
WFREModelDTO
wfremodeldto
)
{
public
ResponseEntity
<
WFREModelDTO
>
save
(
@RequestBody
WFREModelDTO
wfremodeldto
)
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFSystemResource.java
浏览文件 @
d8a98197
...
@@ -65,25 +65,15 @@ public class WFSystemResource {
...
@@ -65,25 +65,15 @@ public class WFSystemResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Update-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Get-all')"
)
@ApiOperation
(
value
=
"更新系统"
,
tags
=
{
"系统"
},
notes
=
"更新系统"
)
@ApiOperation
(
value
=
"获取系统"
,
tags
=
{
"系统"
},
notes
=
"获取系统"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfsystems/{wfsystem_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfsystems/{wfsystem_id}"
)
public
ResponseEntity
<
WFSystemDTO
>
update
(
@PathVariable
(
"wfsystem_id"
)
String
wfsystem_id
,
@RequestBody
WFSystemDTO
wfsystemdto
)
{
public
ResponseEntity
<
WFSystemDTO
>
get
(
@PathVariable
(
"wfsystem_id"
)
String
wfsystem_id
)
{
WFSystem
domain
=
wfsystemMapping
.
toDomain
(
wfsystemdto
);
WFSystem
domain
=
wfsystemService
.
get
(
wfsystem_id
);
domain
.
setPssystemid
(
wfsystem_id
);
WFSystemDTO
dto
=
wfsystemMapping
.
toDto
(
domain
);
wfsystemService
.
update
(
domain
);
WFSystemDTO
dto
=
wfsystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Update-all')"
)
@ApiOperation
(
value
=
"批量更新系统"
,
tags
=
{
"系统"
},
notes
=
"批量更新系统"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfsystems/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFSystemDTO
>
wfsystemdtos
)
{
wfsystemService
.
updateBatch
(
wfsystemMapping
.
toDomain
(
wfsystemdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Remove-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Remove-all')"
)
@ApiOperation
(
value
=
"删除系统"
,
tags
=
{
"系统"
},
notes
=
"删除系统"
)
@ApiOperation
(
value
=
"删除系统"
,
tags
=
{
"系统"
},
notes
=
"删除系统"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfsystems/{wfsystem_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfsystems/{wfsystem_id}"
)
...
@@ -99,20 +89,23 @@ public class WFSystemResource {
...
@@ -99,20 +89,23 @@ public class WFSystemResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Get-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Update-all')"
)
@ApiOperation
(
value
=
"获取系统"
,
tags
=
{
"系统"
},
notes
=
"获取系统"
)
@ApiOperation
(
value
=
"更新系统"
,
tags
=
{
"系统"
},
notes
=
"更新系统"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfsystems/{wfsystem_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfsystems/{wfsystem_id}"
)
public
ResponseEntity
<
WFSystemDTO
>
get
(
@PathVariable
(
"wfsystem_id"
)
String
wfsystem_id
)
{
public
ResponseEntity
<
WFSystemDTO
>
update
(
@PathVariable
(
"wfsystem_id"
)
String
wfsystem_id
,
@RequestBody
WFSystemDTO
wfsystemdto
)
{
WFSystem
domain
=
wfsystemService
.
get
(
wfsystem_id
);
WFSystem
domain
=
wfsystemMapping
.
toDomain
(
wfsystemdto
);
WFSystemDTO
dto
=
wfsystemMapping
.
toDto
(
domain
);
domain
.
setPssystemid
(
wfsystem_id
);
wfsystemService
.
update
(
domain
);
WFSystemDTO
dto
=
wfsystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"获取系统草稿"
,
tags
=
{
"系统"
},
notes
=
"获取系统草稿"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Update-all')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfsystems/getdraft"
)
@ApiOperation
(
value
=
"批量更新系统"
,
tags
=
{
"系统"
},
notes
=
"批量更新系统"
)
public
ResponseEntity
<
WFSystemDTO
>
getDraft
(
WFSystemDTO
dto
)
{
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfsystems/batch"
)
WFSystem
domain
=
wfsystemMapping
.
toDomain
(
dto
);
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFSystemDTO
>
wfsystemdtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfsystemMapping
.
toDto
(
wfsystemService
.
getDraft
(
domain
)));
wfsystemService
.
updateBatch
(
wfsystemMapping
.
toDomain
(
wfsystemdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查系统"
,
tags
=
{
"系统"
},
notes
=
"检查系统"
)
@ApiOperation
(
value
=
"检查系统"
,
tags
=
{
"系统"
},
notes
=
"检查系统"
)
...
@@ -121,6 +114,13 @@ public class WFSystemResource {
...
@@ -121,6 +114,13 @@ public class WFSystemResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfsystemService
.
checkKey
(
wfsystemMapping
.
toDomain
(
wfsystemdto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfsystemService
.
checkKey
(
wfsystemMapping
.
toDomain
(
wfsystemdto
)));
}
}
@ApiOperation
(
value
=
"获取系统草稿"
,
tags
=
{
"系统"
},
notes
=
"获取系统草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfsystems/getdraft"
)
public
ResponseEntity
<
WFSystemDTO
>
getDraft
(
WFSystemDTO
dto
)
{
WFSystem
domain
=
wfsystemMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfsystemMapping
.
toDto
(
wfsystemService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Save-all')"
)
@ApiOperation
(
value
=
"保存系统"
,
tags
=
{
"系统"
},
notes
=
"保存系统"
)
@ApiOperation
(
value
=
"保存系统"
,
tags
=
{
"系统"
},
notes
=
"保存系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems/save"
)
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFTaskResource.java
浏览文件 @
d8a98197
此差异已折叠。
点击以展开。
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFUserResource.java
浏览文件 @
d8a98197
...
@@ -65,25 +65,15 @@ public class WFUserResource {
...
@@ -65,25 +65,15 @@ public class WFUserResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasPermission(this.wfuserService.get(#wfuser_id),'ibzwf-WFUser-Update')"
)
@PostAuthorize
(
"hasPermission(this.wfuserMapping.toDomain(returnObject.body),'ibzwf-WFUser-Get')"
)
@ApiOperation
(
value
=
"更新用户"
,
tags
=
{
"用户"
},
notes
=
"更新用户"
)
@ApiOperation
(
value
=
"获取用户"
,
tags
=
{
"用户"
},
notes
=
"获取用户"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfusers/{wfuser_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfusers/{wfuser_id}"
)
public
ResponseEntity
<
WFUserDTO
>
update
(
@PathVariable
(
"wfuser_id"
)
String
wfuser_id
,
@RequestBody
WFUserDTO
wfuserdto
)
{
public
ResponseEntity
<
WFUserDTO
>
get
(
@PathVariable
(
"wfuser_id"
)
String
wfuser_id
)
{
WFUser
domain
=
wfuserMapping
.
toDomain
(
wfuserdto
);
WFUser
domain
=
wfuserService
.
get
(
wfuser_id
);
domain
.
setId
(
wfuser_id
);
WFUserDTO
dto
=
wfuserMapping
.
toDto
(
domain
);
wfuserService
.
update
(
domain
);
WFUserDTO
dto
=
wfuserMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasPermission(this.wfuserService.getWfuserByEntities(this.wfuserMapping.toDomain(#wfuserdtos)),'ibzwf-WFUser-Update')"
)
@ApiOperation
(
value
=
"批量更新用户"
,
tags
=
{
"用户"
},
notes
=
"批量更新用户"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfusers/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFUserDTO
>
wfuserdtos
)
{
wfuserService
.
updateBatch
(
wfuserMapping
.
toDomain
(
wfuserdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.wfuserService.get(#wfuser_id),'ibzwf-WFUser-Remove')"
)
@PreAuthorize
(
"hasPermission(this.wfuserService.get(#wfuser_id),'ibzwf-WFUser-Remove')"
)
@ApiOperation
(
value
=
"删除用户"
,
tags
=
{
"用户"
},
notes
=
"删除用户"
)
@ApiOperation
(
value
=
"删除用户"
,
tags
=
{
"用户"
},
notes
=
"删除用户"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfusers/{wfuser_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfusers/{wfuser_id}"
)
...
@@ -99,20 +89,23 @@ public class WFUserResource {
...
@@ -99,20 +89,23 @@ public class WFUserResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PostAuthorize
(
"hasPermission(this.wfuserMapping.toDomain(returnObject.body),'ibzwf-WFUser-Get')"
)
@PreAuthorize
(
"hasPermission(this.wfuserService.get(#wfuser_id),'ibzwf-WFUser-Update')"
)
@ApiOperation
(
value
=
"获取用户"
,
tags
=
{
"用户"
},
notes
=
"获取用户"
)
@ApiOperation
(
value
=
"更新用户"
,
tags
=
{
"用户"
},
notes
=
"更新用户"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfusers/{wfuser_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfusers/{wfuser_id}"
)
public
ResponseEntity
<
WFUserDTO
>
get
(
@PathVariable
(
"wfuser_id"
)
String
wfuser_id
)
{
public
ResponseEntity
<
WFUserDTO
>
update
(
@PathVariable
(
"wfuser_id"
)
String
wfuser_id
,
@RequestBody
WFUserDTO
wfuserdto
)
{
WFUser
domain
=
wfuserService
.
get
(
wfuser_id
);
WFUser
domain
=
wfuserMapping
.
toDomain
(
wfuserdto
);
WFUserDTO
dto
=
wfuserMapping
.
toDto
(
domain
);
domain
.
setId
(
wfuser_id
);
wfuserService
.
update
(
domain
);
WFUserDTO
dto
=
wfuserMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"获取用户草稿"
,
tags
=
{
"用户"
},
notes
=
"获取用户草稿"
)
@PreAuthorize
(
"hasPermission(this.wfuserService.getWfuserByEntities(this.wfuserMapping.toDomain(#wfuserdtos)),'ibzwf-WFUser-Update')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfusers/getdraft"
)
@ApiOperation
(
value
=
"批量更新用户"
,
tags
=
{
"用户"
},
notes
=
"批量更新用户"
)
public
ResponseEntity
<
WFUserDTO
>
getDraft
(
WFUserDTO
dto
)
{
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfusers/batch"
)
WFUser
domain
=
wfuserMapping
.
toDomain
(
dto
);
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
WFUserDTO
>
wfuserdtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserMapping
.
toDto
(
wfuserService
.
getDraft
(
domain
)));
wfuserService
.
updateBatch
(
wfuserMapping
.
toDomain
(
wfuserdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查用户"
,
tags
=
{
"用户"
},
notes
=
"检查用户"
)
@ApiOperation
(
value
=
"检查用户"
,
tags
=
{
"用户"
},
notes
=
"检查用户"
)
...
@@ -121,6 +114,13 @@ public class WFUserResource {
...
@@ -121,6 +114,13 @@ public class WFUserResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserService
.
checkKey
(
wfuserMapping
.
toDomain
(
wfuserdto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserService
.
checkKey
(
wfuserMapping
.
toDomain
(
wfuserdto
)));
}
}
@ApiOperation
(
value
=
"获取用户草稿"
,
tags
=
{
"用户"
},
notes
=
"获取用户草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfusers/getdraft"
)
public
ResponseEntity
<
WFUserDTO
>
getDraft
(
WFUserDTO
dto
)
{
WFUser
domain
=
wfuserMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserMapping
.
toDto
(
wfuserService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasPermission(this.wfuserMapping.toDomain(#wfuserdto),'ibzwf-WFUser-Save')"
)
@PreAuthorize
(
"hasPermission(this.wfuserMapping.toDomain(#wfuserdto),'ibzwf-WFUser-Save')"
)
@ApiOperation
(
value
=
"保存用户"
,
tags
=
{
"用户"
},
notes
=
"保存用户"
)
@ApiOperation
(
value
=
"保存用户"
,
tags
=
{
"用户"
},
notes
=
"保存用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers/save"
)
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
浏览文件 @
d8a98197
...
@@ -28,6 +28,7 @@ import org.springframework.expression.ExpressionParser;
...
@@ -28,6 +28,7 @@ import org.springframework.expression.ExpressionParser;
import
org.springframework.expression.spel.standard.SpelExpressionParser
;
import
org.springframework.expression.spel.standard.SpelExpressionParser
;
import
org.springframework.expression.spel.support.StandardEvaluationContext
;
import
org.springframework.expression.spel.support.StandardEvaluationContext
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ClassUtils
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -80,7 +81,7 @@ public class DELogicAspect {
...
@@ -80,7 +81,7 @@ public class DELogicAspect {
if
(!
ObjectUtils
.
isEmpty
(
entity
))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
))
{
String
id
=
DEFieldCacheMap
.
getDEKeyField
(
entity
.
getClass
());
String
id
=
DEFieldCacheMap
.
getDEKeyField
(
entity
.
getClass
());
if
(
StringUtils
.
isEmpty
(
id
))
{
if
(
StringUtils
.
isEmpty
(
id
))
{
log
.
debug
(
"无法获取实体主键属性[{}]"
,
entity
.
getClass
().
getSimpleName
(
));
log
.
debug
(
"无法获取实体主键属性[{}]"
,
getEntityName
(
entity
));
return
point
.
proceed
();
return
point
.
proceed
();
}
}
entity
.
set
(
id
,
arg
);
entity
.
set
(
id
,
arg
);
...
@@ -101,6 +102,17 @@ public class DELogicAspect {
...
@@ -101,6 +102,17 @@ public class DELogicAspect {
return
point
.
proceed
();
return
point
.
proceed
();
}
}
/**
* 判断类是否被代理类代理
*/
private
String
getEntityName
(
Object
entity
){
String
entityName
=
entity
.
getClass
().
getSimpleName
();
if
(
entityName
.
contains
(
"$$"
)){
entityName
=
ClassUtils
.
getUserClass
(
entity
.
getClass
()).
getSimpleName
();
}
return
entityName
;
}
/**
/**
* 前附加逻辑
* 前附加逻辑
*
*
...
@@ -108,7 +120,7 @@ public class DELogicAspect {
...
@@ -108,7 +120,7 @@ public class DELogicAspect {
* @param action
* @param action
*/
*/
private
void
executeBeforeLogic
(
EntityBase
entity
,
String
action
)
{
private
void
executeBeforeLogic
(
EntityBase
entity
,
String
action
)
{
Resource
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(
),
action
,
LogicExecMode
.
BEFORE
);
Resource
bpmnFile
=
getLocalModel
(
getEntityName
(
entity
),
action
,
LogicExecMode
.
BEFORE
);
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
executeLogic
(
bpmnFile
,
entity
,
action
);
}
}
...
@@ -121,7 +133,7 @@ public class DELogicAspect {
...
@@ -121,7 +133,7 @@ public class DELogicAspect {
* @param action
* @param action
*/
*/
private
void
executeAfterLogic
(
EntityBase
entity
,
String
action
)
{
private
void
executeAfterLogic
(
EntityBase
entity
,
String
action
)
{
Resource
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(
),
action
,
LogicExecMode
.
AFTER
);
Resource
bpmnFile
=
getLocalModel
(
getEntityName
(
entity
),
action
,
LogicExecMode
.
AFTER
);
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
executeLogic
(
bpmnFile
,
entity
,
action
);
}
}
...
@@ -134,7 +146,7 @@ public class DELogicAspect {
...
@@ -134,7 +146,7 @@ public class DELogicAspect {
* @param action
* @param action
*/
*/
private
void
executeLogic
(
EntityBase
entity
,
String
action
)
{
private
void
executeLogic
(
EntityBase
entity
,
String
action
)
{
Resource
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(
),
action
,
LogicExecMode
.
EXEC
);
Resource
bpmnFile
=
getLocalModel
(
getEntityName
(
entity
),
action
,
LogicExecMode
.
EXEC
);
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
executeLogic
(
bpmnFile
,
entity
,
action
);
}
}
...
@@ -148,7 +160,7 @@ public class DELogicAspect {
...
@@ -148,7 +160,7 @@ public class DELogicAspect {
*/
*/
private
void
executeLogic
(
Resource
bpmnFile
,
Object
entity
,
String
action
)
{
private
void
executeLogic
(
Resource
bpmnFile
,
Object
entity
,
String
action
)
{
try
{
try
{
log
.
debug
(
"开始执行实体处理逻辑[{}:{}:{}:本地模式]"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmnFile
.
getFilename
());
log
.
debug
(
"开始执行实体处理逻辑[{}:{}:{}:本地模式]"
,
getEntityName
(
entity
),
action
,
bpmnFile
.
getFilename
());
String
bpmnId
=
DigestUtils
.
md5DigestAsHex
(
bpmnFile
.
getURL
().
getPath
().
getBytes
());
String
bpmnId
=
DigestUtils
.
md5DigestAsHex
(
bpmnFile
.
getURL
().
getPath
().
getBytes
());
DELogic
logic
=
getDELogic
(
bpmnFile
);
DELogic
logic
=
getDELogic
(
bpmnFile
);
if
(
logic
==
null
)
{
if
(
logic
==
null
)
{
...
@@ -172,9 +184,9 @@ public class DELogicAspect {
...
@@ -172,9 +184,9 @@ public class DELogicAspect {
}
}
}
}
kieSession
.
startProcess
(
mainProcess
.
getId
());
kieSession
.
startProcess
(
mainProcess
.
getId
());
log
.
debug
(
"实体处理逻辑[{}:{}:{}:本地模式]执行结束"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmnFile
.
getFilename
());
log
.
debug
(
"实体处理逻辑[{}:{}:{}:本地模式]执行结束"
,
getEntityName
(
entity
),
action
,
bpmnFile
.
getFilename
());
}
catch
(
IO
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"实体处理逻辑[{}:{}:{}:本地模式]发生异常"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmnFile
.
getFilename
());
log
.
error
(
"实体处理逻辑[{}:{}:{}:本地模式]发生异常"
,
getEntityName
(
entity
),
action
,
bpmnFile
.
getFilename
());
throw
new
BadRequestAlertException
(
"执行实体处理逻辑发生异常"
+
e
.
getMessage
(),
"DELogicAspect"
,
"executeLogic"
);
throw
new
BadRequestAlertException
(
"执行实体处理逻辑发生异常"
+
e
.
getMessage
(),
"DELogicAspect"
,
"executeLogic"
);
}
}
}
}
...
@@ -414,7 +426,7 @@ public class DELogicAspect {
...
@@ -414,7 +426,7 @@ public class DELogicAspect {
* @return
* @return
*/
*/
private
boolean
isValid
(
Resource
bpmn
,
Object
entity
,
Object
action
)
{
private
boolean
isValid
(
Resource
bpmn
,
Object
entity
,
Object
action
)
{
String
logicId
=
String
.
format
(
"%s%s%s"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmn
.
getFilename
()).
toLowerCase
();
String
logicId
=
String
.
format
(
"%s%s%s"
,
getEntityName
(
entity
),
action
,
bpmn
.
getFilename
()).
toLowerCase
();
if
(
validLogic
.
containsKey
(
logicId
))
{
if
(
validLogic
.
containsKey
(
logicId
))
{
return
true
;
return
true
;
}
else
{
}
else
{
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/cache/cache/CusCaffeineCache.java
0 → 100644
浏览文件 @
d8a98197
package
cn
.
ibizlab
.
util
.
cache
.
cache
;
import
cn.ibizlab.util.helper.Globs
;
import
org.springframework.cache.caffeine.CaffeineCache
;
import
com.github.benmanes.caffeine.cache.Cache
;
import
javax.validation.constraints.NotNull
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* 自定义的Caffeine缓存
*/
public
class
CusCaffeineCache
extends
CaffeineCache
{
public
CusCaffeineCache
(
String
name
,
Cache
<
Object
,
Object
>
cache
)
{
super
(
name
,
cache
);
}
public
CusCaffeineCache
(
String
name
,
Cache
<
Object
,
Object
>
cache
,
boolean
allowNullValues
)
{
super
(
name
,
cache
,
allowNullValues
);
}
@Override
public
void
evict
(
@NotNull
Object
key
)
{
if
(
key
instanceof
String
&&
((
String
)
key
).
startsWith
(
"glob:"
))
{
String
globPattern
=
((
String
)
key
).
split
(
"glob:"
)[
1
];
// 将Glob匹配转换成正则匹配
String
regexPattern
=
Globs
.
toUnixRegexPattern
(
globPattern
);
// String regexPattern = Globs.toWindowsRegexPattern(globPattern);
Cache
<
Object
,
Object
>
cache
=
super
.
getNativeCache
();
Set
<
Object
>
keySet
=
cache
.
asMap
().
keySet
();
keySet
=
keySet
.
stream
().
filter
(
o
->
o
.
toString
().
matches
(
regexPattern
)).
collect
(
Collectors
.
toSet
());
cache
.
invalidateAll
(
keySet
);
}
else
{
super
.
evict
(
key
);
}
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/cache/cache/CusRedisCache.java
浏览文件 @
d8a98197
...
@@ -4,6 +4,8 @@ import org.springframework.data.redis.cache.RedisCache;
...
@@ -4,6 +4,8 @@ import org.springframework.data.redis.cache.RedisCache;
import
org.springframework.data.redis.cache.RedisCacheConfiguration
;
import
org.springframework.data.redis.cache.RedisCacheConfiguration
;
import
org.springframework.data.redis.cache.RedisCacheWriter
;
import
org.springframework.data.redis.cache.RedisCacheWriter
;
import
javax.validation.constraints.NotNull
;
/**
/**
* 自定义的redis缓存
* 自定义的redis缓存
*/
*/
...
@@ -12,4 +14,18 @@ public class CusRedisCache extends RedisCache {
...
@@ -12,4 +14,18 @@ public class CusRedisCache extends RedisCache {
public
CusRedisCache
(
String
name
,
RedisCacheWriter
redisCacheWriter
,
RedisCacheConfiguration
configuration
)
{
public
CusRedisCache
(
String
name
,
RedisCacheWriter
redisCacheWriter
,
RedisCacheConfiguration
configuration
)
{
super
(
name
,
redisCacheWriter
,
configuration
);
super
(
name
,
redisCacheWriter
,
configuration
);
}
}
@Override
public
void
evict
(
@NotNull
Object
key
)
{
if
(
key
instanceof
String
&&
((
String
)
key
).
startsWith
(
"glob:"
))
{
String
globPattern
=
((
String
)
key
).
split
(
"glob:"
)[
1
];
byte
[]
globPatternBytes
=
super
.
getCacheConfiguration
().
getConversionService
().
convert
(
globPattern
,
byte
[].
class
);
if
(
globPatternBytes
!=
null
){
super
.
getNativeCache
().
clean
(
super
.
getName
(),
globPatternBytes
);
}
}
else
{
super
.
evict
(
key
);
}
}
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/cache/cacheManager/LayeringCacheManager.java
浏览文件 @
d8a98197
...
@@ -15,6 +15,7 @@ import java.util.Collections;
...
@@ -15,6 +15,7 @@ import java.util.Collections;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
import
java.util.concurrent.ConcurrentMap
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
cn.ibizlab.util.cache.cache.CusCaffeineCache
;
import
cn.ibizlab.util.cache.cache.CusRedisCache
;
import
cn.ibizlab.util.cache.cache.CusRedisCache
;
import
cn.ibizlab.util.cache.cache.LayeringCache
;
import
cn.ibizlab.util.cache.cache.LayeringCache
;
...
@@ -80,7 +81,7 @@ public class LayeringCacheManager implements CacheManager {
...
@@ -80,7 +81,7 @@ public class LayeringCacheManager implements CacheManager {
* @return
* @return
*/
*/
protected
Cache
createCache
(
String
cacheName
)
{
protected
Cache
createCache
(
String
cacheName
)
{
return
new
LayeringCache
(
cacheName
,
new
CaffeineCache
(
cacheName
,
this
.
cacheBuilder
.
build
(),
true
),
new
CusRedisCache
(
cacheName
,
redisCacheWriter
,
redisConfiguration
),
redisTemplate
);
return
new
LayeringCache
(
cacheName
,
new
C
usC
affeineCache
(
cacheName
,
this
.
cacheBuilder
.
build
(),
true
),
new
CusRedisCache
(
cacheName
,
redisCacheWriter
,
redisConfiguration
),
redisTemplate
);
}
}
/**
/**
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/client/IBZWFFallback.java
浏览文件 @
d8a98197
...
@@ -3,6 +3,7 @@ package cn.ibizlab.util.client;
...
@@ -3,6 +3,7 @@ package cn.ibizlab.util.client;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.*
;
import
java.util.*
;
import
java.io.Serializable
;
@Component
@Component
public
class
IBZWFFallback
implements
IBZWFFeignClient
{
public
class
IBZWFFallback
implements
IBZWFFeignClient
{
...
@@ -26,4 +27,20 @@ public class IBZWFFallback implements IBZWFFeignClient {
...
@@ -26,4 +27,20 @@ public class IBZWFFallback implements IBZWFFeignClient {
public
JSONObject
wfstart
(
String
system
,
String
appname
,
String
entity
,
String
businessKey
,
JSONObject
instance
)
{
public
JSONObject
wfstart
(
String
system
,
String
appname
,
String
entity
,
String
businessKey
,
JSONObject
instance
)
{
return
null
;
return
null
;
}
}
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
getTask
(
String
system
,
String
userId
,
String
entity
,
String
instTag
,
String
instTag2
,
String
taskType
)
{
return
null
;
}
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
getTaskByStep
(
String
system
,
String
userId
,
String
entity
,
String
instTag
,
String
instTag2
,
String
taskType
,
String
srfwfstep
)
{
return
null
;
}
@Override
public
Integer
getDataAccessMode
(
String
system
,
String
entity
,
Serializable
businessKey
)
{
return
null
;
}
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/client/IBZWFFeignClient.java
浏览文件 @
d8a98197
...
@@ -4,6 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient;
...
@@ -4,6 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.*
;
import
java.util.*
;
import
java.io.Serializable
;
@FeignClient
(
value
=
"${ibiz.ref.service.wf:ibzwf-api}"
,
contextId
=
"wf"
,
fallback
=
IBZWFFallback
.
class
)
@FeignClient
(
value
=
"${ibiz.ref.service.wf:ibzwf-api}"
,
contextId
=
"wf"
,
fallback
=
IBZWFFallback
.
class
)
public
interface
IBZWFFeignClient
public
interface
IBZWFFeignClient
...
@@ -25,4 +26,15 @@ public interface IBZWFFeignClient
...
@@ -25,4 +26,15 @@ public interface IBZWFFeignClient
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"businessKey"
)
String
businessKey
,
@RequestBody
JSONObject
instance
);
@PathVariable
(
"businessKey"
)
String
businessKey
,
@RequestBody
JSONObject
instance
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks"
)
Map
<
String
,
Map
<
String
,
Object
>>
getTask
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"userId"
)
String
userId
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"insttag"
)
String
instTag
,
@PathVariable
(
"insttag2"
)
String
instTag2
,
@RequestParam
(
"srfwf"
)
String
taskType
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks"
)
Map
<
String
,
Map
<
String
,
Object
>>
getTaskByStep
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"userId"
)
String
userId
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"insttag"
)
String
instTag
,
@PathVariable
(
"insttag2"
)
String
instTag2
,
@RequestParam
(
"srfwf"
)
String
taskType
,
@RequestParam
(
"n_taskdefinitionkey_eq"
)
String
srfwfstep
);
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{system}/{entity}/{businessKey}/dataaccessmode"
)
Integer
getDataAccessMode
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"businessKey"
)
Serializable
businessKey
);
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/domain/DELogic.java
浏览文件 @
d8a98197
...
@@ -17,4 +17,6 @@ public class DELogic implements Serializable {
...
@@ -17,4 +17,6 @@ public class DELogic implements Serializable {
List
<
DELogic
>
refLogic
;
List
<
DELogic
>
refLogic
;
List
<
Resource
>
refRuleFiles
;
List
<
Resource
>
refRuleFiles
;
String
md5
;
String
md5
;
int
logicMode
;
long
loadedTime
;
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/enums/DEFieldDefaultValueType.java
浏览文件 @
d8a98197
...
@@ -43,5 +43,21 @@ public enum DEFieldDefaultValueType {
...
@@ -43,5 +43,21 @@ public enum DEFieldDefaultValueType {
/**
/**
* 默认值
* 默认值
*/
*/
NONE
NONE
,
/**
* 用户自定义
*/
USER
,
/**
* 用户自定义2
*/
USER2
,
/**
* 用户自定义3
*/
USER3
,
/**
* 用户自定义4
*/
USER4
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/enums/DEPredefinedFieldType.java
浏览文件 @
d8a98197
...
@@ -55,5 +55,17 @@ public enum DEPredefinedFieldType {
...
@@ -55,5 +55,17 @@ public enum DEPredefinedFieldType {
/**
/**
* 不处理
* 不处理
*/
*/
NONE
NONE
,
/**
* 动态父类型
*/
PARENTTYPE
,
/**
* 动态父标识
*/
PARENTID
,
/**
* 动态父名称
*/
PARENTNAME
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/helper/Globs.java
0 → 100644
浏览文件 @
d8a98197
package
cn
.
ibizlab
.
util
.
helper
;
import
java.util.regex.PatternSyntaxException
;
/**
* Copy from class sun.nio.fs.Globs
*/
public
class
Globs
{
private
Globs
()
{
}
private
static
final
String
regexMetaChars
=
".^$+{[]|()"
;
private
static
final
String
globMetaChars
=
"\\*?[{"
;
private
static
boolean
isRegexMeta
(
char
c
)
{
return
regexMetaChars
.
indexOf
(
c
)
!=
-
1
;
}
private
static
boolean
isGlobMeta
(
char
c
)
{
return
globMetaChars
.
indexOf
(
c
)
!=
-
1
;
}
private
static
char
EOL
=
0
;
//TBD
private
static
char
next
(
String
glob
,
int
i
)
{
if
(
i
<
glob
.
length
())
{
return
glob
.
charAt
(
i
);
}
return
EOL
;
}
/**
* Creates a regex pattern from the given glob expression.
*
* @throws PatternSyntaxException
*/
private
static
String
toRegexPattern
(
String
globPattern
,
boolean
isDos
)
{
boolean
inGroup
=
false
;
StringBuilder
regex
=
new
StringBuilder
(
"^"
);
int
i
=
0
;
while
(
i
<
globPattern
.
length
())
{
char
c
=
globPattern
.
charAt
(
i
++);
switch
(
c
)
{
case
'\\'
:
// escape special characters
if
(
i
==
globPattern
.
length
())
{
throw
new
PatternSyntaxException
(
"No character to escape"
,
globPattern
,
i
-
1
);
}
char
next
=
globPattern
.
charAt
(
i
++);
if
(
isGlobMeta
(
next
)
||
isRegexMeta
(
next
))
{
regex
.
append
(
'\\'
);
}
regex
.
append
(
next
);
break
;
case
'/'
:
if
(
isDos
)
{
regex
.
append
(
"\\\\"
);
}
else
{
regex
.
append
(
c
);
}
break
;
case
'['
:
// don't match name separator in class
if
(
isDos
)
{
regex
.
append
(
"[[^\\\\]&&["
);
}
else
{
regex
.
append
(
"[[^/]&&["
);
}
if
(
next
(
globPattern
,
i
)
==
'^'
)
{
// escape the regex negation char if it appears
regex
.
append
(
"\\^"
);
i
++;
}
else
{
// negation
if
(
next
(
globPattern
,
i
)
==
'!'
)
{
regex
.
append
(
'^'
);
i
++;
}
// hyphen allowed at start
if
(
next
(
globPattern
,
i
)
==
'-'
)
{
regex
.
append
(
'-'
);
i
++;
}
}
boolean
hasRangeStart
=
false
;
char
last
=
0
;
while
(
i
<
globPattern
.
length
())
{
c
=
globPattern
.
charAt
(
i
++);
if
(
c
==
']'
)
{
break
;
}
if
(
c
==
'/'
||
(
isDos
&&
c
==
'\\'
))
{
throw
new
PatternSyntaxException
(
"Explicit 'name separator' in class"
,
globPattern
,
i
-
1
);
}
// TBD: how to specify ']' in a class?
if
(
c
==
'\\'
||
c
==
'['
||
c
==
'&'
&&
next
(
globPattern
,
i
)
==
'&'
)
{
// escape '\', '[' or "&&" for regex class
regex
.
append
(
'\\'
);
}
regex
.
append
(
c
);
if
(
c
==
'-'
)
{
if
(!
hasRangeStart
)
{
throw
new
PatternSyntaxException
(
"Invalid range"
,
globPattern
,
i
-
1
);
}
if
((
c
=
next
(
globPattern
,
i
++))
==
EOL
||
c
==
']'
)
{
break
;
}
if
(
c
<
last
)
{
throw
new
PatternSyntaxException
(
"Invalid range"
,
globPattern
,
i
-
3
);
}
regex
.
append
(
c
);
hasRangeStart
=
false
;
}
else
{
hasRangeStart
=
true
;
last
=
c
;
}
}
if
(
c
!=
']'
)
{
throw
new
PatternSyntaxException
(
"Missing ']"
,
globPattern
,
i
-
1
);
}
regex
.
append
(
"]]"
);
break
;
case
'{'
:
if
(
inGroup
)
{
throw
new
PatternSyntaxException
(
"Cannot nest groups"
,
globPattern
,
i
-
1
);
}
regex
.
append
(
"(?:(?:"
);
inGroup
=
true
;
break
;
case
'}'
:
if
(
inGroup
)
{
regex
.
append
(
"))"
);
inGroup
=
false
;
}
else
{
regex
.
append
(
'}'
);
}
break
;
case
','
:
if
(
inGroup
)
{
regex
.
append
(
")|(?:"
);
}
else
{
regex
.
append
(
','
);
}
break
;
case
'*'
:
if
(
next
(
globPattern
,
i
)
==
'*'
)
{
// crosses directory boundaries
regex
.
append
(
".*"
);
i
++;
}
else
{
// within directory boundary
if
(
isDos
)
{
regex
.
append
(
"[^\\\\]*"
);
}
else
{
regex
.
append
(
"[^/]*"
);
}
}
break
;
case
'?'
:
if
(
isDos
)
{
regex
.
append
(
"[^\\\\]"
);
}
else
{
regex
.
append
(
"[^/]"
);
}
break
;
default
:
if
(
isRegexMeta
(
c
))
{
regex
.
append
(
'\\'
);
}
regex
.
append
(
c
);
}
}
if
(
inGroup
)
{
throw
new
PatternSyntaxException
(
"Missing '}"
,
globPattern
,
i
-
1
);
}
return
regex
.
append
(
'$'
).
toString
();
}
public
static
String
toUnixRegexPattern
(
String
globPattern
)
{
return
toRegexPattern
(
globPattern
,
false
);
}
public
static
String
toWindowsRegexPattern
(
String
globPattern
)
{
return
toRegexPattern
(
globPattern
,
true
);
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/helper/RuleUtils.java
浏览文件 @
d8a98197
...
@@ -280,22 +280,26 @@ public class RuleUtils
...
@@ -280,22 +280,26 @@ public class RuleUtils
}
}
return
finalTime
.
getTime
()<
tm
.
getTime
();
return
finalTime
.
getTime
()<
tm
.
getTime
();
}
}
else
if
(
finalObject
instanceof
Integer
)
else
if
(
finalObject
instanceof
Integer
)
{
{
return
(((
Integer
)
finalObject
).
intValue
()
<
((
Integer
)
exp
).
intValue
());
return
Integer
.
parseInt
(
finalObject
.
toString
())
<
Integer
.
parseInt
(
exp
.
toString
());
}
}
else
if
(
finalObject
instanceof
Double
)
else
if
(
finalObject
instanceof
Double
)
{
{
return
(((
Double
)
finalObject
).
doubleValue
()
<
((
Double
)
exp
).
doubleValue
());
return
Double
.
parseDouble
(
finalObject
.
toString
())
<
Double
.
parseDouble
(
exp
.
toString
());
}
}
else
if
(
finalObject
instanceof
Float
)
else
if
(
finalObject
instanceof
Float
)
{
{
return
(((
Float
)
finalObject
).
floatValue
()
<
((
Float
)
exp
).
floatValue
());
return
Float
.
parseFloat
(
finalObject
.
toString
())
<
Float
.
parseFloat
(
exp
.
toString
());
}
}
else
if
(
finalObject
instanceof
String
)
else
if
(
finalObject
instanceof
String
)
{
{
return
finalObject
.
toString
().
compareToIgnoreCase
(
exp
.
toString
())<
0
;
return
finalObject
.
toString
().
compareToIgnoreCase
(
exp
.
toString
())<
0
;
}
}
else
if
(
finalObject
instanceof
Long
)
{
return
Long
.
parseLong
(
finalObject
.
toString
())
<
Long
.
parseLong
(
exp
.
toString
());
}
else
else
return
false
;
return
false
;
}
}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/rest/AppController.java
浏览文件 @
d8a98197
...
@@ -12,6 +12,7 @@ import org.springframework.http.ResponseEntity;
...
@@ -12,6 +12,7 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
java.util.*
;
import
java.util.*
;
@RestController
@RestController
...
@@ -95,6 +96,26 @@ public class AppController {
...
@@ -95,6 +96,26 @@ public class AppController {
return
ResponseEntity
.
ok
(
ibzConfigService
.
getConfig
(
configType
,
targetType
,
userId
));
return
ResponseEntity
.
ok
(
ibzConfigService
.
getConfig
(
configType
,
targetType
,
userId
));
}
}
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/configs/share/{id}"
)
public
ResponseEntity
<
JSONObject
>
getShareConfig
(
@PathVariable
(
"id"
)
String
id
)
{
JSONObject
jo
=
ibzConfigService
.
getShareConfig
(
id
);
if
(
jo
==
null
)
{
throw
new
BadRequestAlertException
(
"无效的共享配置数据"
,
"IBZConfig"
,
id
);
}
return
ResponseEntity
.
ok
(
jo
);
}
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/configs/share/{configType}/{targetType}"
)
public
ResponseEntity
<
String
>
shareConfig
(
@PathVariable
(
"configType"
)
String
configType
,
@PathVariable
(
"targetType"
)
String
targetType
)
{
String
userId
=
AuthenticationUser
.
getAuthenticationUser
().
getUserid
();
if
(
StringUtils
.
isEmpty
(
userId
))
{
throw
new
BadRequestAlertException
(
"分享配置失败,参数缺失"
,
"IBZConfig"
,
configType
);
}
String
id
=
IdWorker
.
get32UUID
();
ibzConfigService
.
saveShareConfig
(
id
,
configType
,
targetType
,
userId
);
return
ResponseEntity
.
ok
(
id
);
}
/**
/**
* 应用参数扩展
* 应用参数扩展
* @param appData
* @param appData
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/security/AuthenticationInfo.java
浏览文件 @
d8a98197
...
@@ -9,6 +9,10 @@ import java.io.Serializable;
...
@@ -9,6 +9,10 @@ import java.io.Serializable;
@AllArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
AuthenticationInfo
implements
Serializable
{
public
class
AuthenticationInfo
implements
Serializable
{
private
final
String
token
;
private
String
token
;
private
final
AuthenticationUser
user
;
private
AuthenticationUser
user
;
public
AuthenticationInfo
()
{
}
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
d8a98197
...
@@ -260,7 +260,6 @@ public class AuthenticationUser implements UserDetails
...
@@ -260,7 +260,6 @@ public class AuthenticationUser implements UserDetails
{
{
sessionParams
=
getUserSessionParam
();
sessionParams
=
getUserSessionParam
();
sessionParams
.
put
(
"srfsystemid"
,
this
.
getSrfsystemid
());
sessionParams
.
put
(
"srfsystemid"
,
this
.
getSrfsystemid
());
sessionParams
.
put
(
"srfdynainstid"
,
this
.
getSrfdynainstid
());
sessionParams
.
put
(
"srfpersonid"
,
this
.
getUserid
());
sessionParams
.
put
(
"srfpersonid"
,
this
.
getUserid
());
sessionParams
.
put
(
"srfpersonname"
,
this
.
getPersonname
());
sessionParams
.
put
(
"srfpersonname"
,
this
.
getPersonname
());
sessionParams
.
put
(
"srforgsectorid"
,
this
.
getMdeptid
());
sessionParams
.
put
(
"srforgsectorid"
,
this
.
getMdeptid
());
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/service/AuthenticationUserService.java
浏览文件 @
d8a98197
...
@@ -24,7 +24,7 @@ public interface AuthenticationUserService extends UserDetailsService {
...
@@ -24,7 +24,7 @@ public interface AuthenticationUserService extends UserDetailsService {
@Cacheable
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
@Cacheable
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
AuthenticationUser
loadUserByLogin
(
String
username
,
String
password
);
AuthenticationUser
loadUserByLogin
(
String
username
,
String
password
);
@CacheEvict
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
@CacheEvict
(
value
=
"ibzuaa_users"
,
key
=
"'g
lob:*g
etByUsername:'+#p0"
)
default
void
resetByUsername
(
String
username
){}
default
void
resetByUsername
(
String
username
){}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/service/IBZConfigService.java
浏览文件 @
d8a98197
...
@@ -64,4 +64,14 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
...
@@ -64,4 +64,14 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
this
.
remove
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()));
this
.
remove
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()));
}
}
@Cacheable
(
value
=
"ibzrt_shareconfigs"
,
key
=
"'cfgid:'+#p0"
)
public
JSONObject
saveShareConfig
(
String
id
,
String
cfgType
,
String
targetType
,
String
userId
){
return
this
.
getConfig
(
cfgType
,
targetType
,
userId
);
}
@Cacheable
(
value
=
"ibzrt_shareconfigs"
,
key
=
"'cfgid:'+#p0"
)
public
JSONObject
getShareConfig
(
String
id
){
return
null
;
}
}
}
\ No newline at end of file
ibzwf-util/src/main/java/cn/ibizlab/util/web/SearchContextHandlerMethodArgumentResolver.java
浏览文件 @
d8a98197
package
cn
.
ibizlab
.
util
.
web
;
package
cn
.
ibizlab
.
util
.
web
;
import
cn.ibizlab.util.filter.SearchContextBase
;
import
cn.ibizlab.util.filter.SearchContextBase
;
import
cn.ibizlab.util.domain.DTOBase
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.core.MethodParameter
;
...
@@ -24,7 +25,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
...
@@ -24,7 +25,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
@Override
@Override
public
boolean
supportsParameter
(
MethodParameter
parameter
)
{
public
boolean
supportsParameter
(
MethodParameter
parameter
)
{
return
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
());
return
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
||
DTOBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
;
}
}
@Override
@Override
...
@@ -35,7 +36,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
...
@@ -35,7 +36,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
for
(
String
key
:
params
.
keySet
())
{
for
(
String
key
:
params
.
keySet
())
{
set
.
put
(
key
,
params
.
get
(
key
)[
0
]);
set
.
put
(
key
,
params
.
get
(
key
)[
0
]);
}
}
if
(
(!
set
.
containsKey
(
"size"
))
){
if
(
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
&&
(!
set
.
containsKey
(
"size"
))
){
set
.
put
(
"size"
,
pageLimit
);
set
.
put
(
"size"
,
pageLimit
);
}
}
String
json
=
objectMapper
.
writeValueAsString
(
set
);
String
json
=
objectMapper
.
writeValueAsString
(
set
);
...
...
ibzwf-util/src/main/resources/application-sys.yml
浏览文件 @
d8a98197
...
@@ -23,7 +23,7 @@ spring:
...
@@ -23,7 +23,7 @@ spring:
datasource
:
datasource
:
username
:
a_A_5d9d78509
username
:
a_A_5d9d78509
password
:
'
@6dEfb3@'
password
:
'
@6dEfb3@'
url
:
jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
url
:
jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
&serverTimezone=GMT%2B8
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
isSyncDBSchema
:
false
isSyncDBSchema
:
false
defaultSchema
:
a_A_5d9d78509
defaultSchema
:
a_A_5d9d78509
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录