Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
24ef466c
提交
24ef466c
编写于
12月 03, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tony001 发布系统代码 [后台服务,演示应用]
上级
e95c0858
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
208 行增加
和
4 行删除
+208
-4
ibizbooks.ts
app_Web/src/mock/entity/ibizbooks/ibizbooks.ts
+2
-0
ibizbookwizard-view-base.vue
...s/sample/ibizbookwizard-view/ibizbookwizard-view-base.vue
+2
-2
finish-logic-base.ts
app_Web/src/service/ibizbook/finish-logic-base.ts
+115
-0
finish-logic.ts
app_Web/src/service/ibizbook/finish-logic.ts
+22
-0
ibizbook-service-base.ts
app_Web/src/service/ibizbook/ibizbook-service-base.ts
+33
-0
init-data-logic-base.ts
app_Web/src/service/ibizbook/init-data-logic-base.ts
+33
-1
systemResource.json
demo-core/src/main/resources/permission/systemResource.json
+1
-1
未找到文件。
app_Web/src/mock/entity/ibizbooks/ibizbooks.ts
浏览文件 @
24ef466c
...
...
@@ -419,6 +419,8 @@ mock.onGet(new RegExp(/^\/ibizbooks\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
...
...
app_Web/src/pages/sample/ibizbookwizard-view/ibizbookwizard-view-base.vue
浏览文件 @
24ef466c
...
...
@@ -17,8 +17,8 @@
:viewparams=
"viewparams"
:context=
"context"
:showBusyIndicator=
"true"
finishAction=
'
Update
'
initAction=
'
Ge
t'
finishAction=
'
Finish
'
initAction=
'
Ini
t'
name=
"wizardpanel"
ref=
'wizardpanel'
@
finish=
"wizardpanel_finish($event)"
...
...
app_Web/src/service/ibizbook/finish-logic-base.ts
0 → 100644
浏览文件 @
24ef466c
import
IBIZBOOKService
from
'@/service/ibizbook/ibizbook-service'
;
import
{
Verify
}
from
'@/utils/verify/verify'
;
/**
* 完成图书流程
*
* @export
* @class FinishLogicBase
*/
export
default
class
FinishLogicBase
{
/**
* 名称
*
* @memberof FinishLogicBase
*/
private
name
:
string
=
"finish"
;
/**
* 唯一标识
*
* @memberof FinishLogicBase
*/
private
id
:
string
=
"2AF2CCC0-86F0-4F45-9FE1-D7055BED0654"
;
/**
* 默认参数名称
*
* @memberof FinishLogicBase
*/
private
defaultParamName
:
string
=
"Default"
;
/**
* 参数集合
*
* @memberof FinishLogicBase
*/
private
paramsMap
:
Map
<
string
,
any
>
=
new
Map
();
/**
* Creates an instance of FinishLogicBase.
*
* @param {*} [opts={}]
* @memberof FinishLogicBase
*/
constructor
(
opts
:
any
=
{})
{
this
.
initParams
(
opts
);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof FinishLogicBase
*/
public
initParams
(
opts
:
any
){
this
.
paramsMap
.
set
(
'Default'
,
opts
);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public
compute0Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 执行逻辑
*
* @param context 应用上下文
* @param params 传入参数
*/
public
onExecute
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
return
this
.
executeBegin
(
context
,
params
,
isloading
);
}
/**
* 完成图书状态
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executeDeaction1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 行为处理节点
let
result
:
any
;
let
actionParam
:
any
=
this
.
paramsMap
.
get
(
'Default'
);
const
targetService
:
IBIZBOOKService
=
new
IBIZBOOKService
();
if
(
targetService
[
'Save'
]
&&
targetService
[
'Save'
]
instanceof
Function
)
{
result
=
await
targetService
[
'Save'
](
actionParam
.
context
,
actionParam
.
data
,
false
);
}
if
(
result
&&
result
.
status
==
200
){
Object
.
assign
(
actionParam
.
data
,
result
.
data
);
return
this
.
paramsMap
.
get
(
this
.
defaultParamName
).
data
;
}
}
/**
* 开始
*
* @param params 传入参数
*/
private
async
executeBegin
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
//开始节点
if
(
this
.
compute0Cond
(
params
)){
return
this
.
executeDeaction1
(
context
,
params
,
isloading
);
}
}
}
\ No newline at end of file
app_Web/src/service/ibizbook/finish-logic.ts
0 → 100644
浏览文件 @
24ef466c
import
{
Http
,
Util
}
from
'@/utils'
;
import
FinishLogicBase
from
'./finish-logic-base'
;
/**
* 完成图书流程
*
* @export
* @class FinishLogic
*/
export
default
class
FinishLogic
extends
FinishLogicBase
{
/**
* Creates an instance of FinishLogic
*
* @param {*} [opts={}]
* @memberof FinishLogic
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_Web/src/service/ibizbook/ibizbook-service-base.ts
浏览文件 @
24ef466c
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
import
FinishLogic
from
'@/service/ibizbook/finish-logic'
;
import
InitDataLogic
from
'@/service/ibizbook/init-data-logic'
;
...
...
@@ -209,4 +210,36 @@ export default class IBIZBOOKServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/ibizbooks/searchdefault`
,
tempData
,
isloading
);
}
/**
* Finish接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Finish
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
appLogic
:
FinishLogic
=
new
FinishLogic
({
context
:
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
))});
data
=
await
appLogic
.
onExecute
(
context
,
data
,
isloading
?
true
:
false
);
let
res
:
any
=
{
status
:
200
,
data
:
data
};
return
res
;
}
/**
* Init接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Init
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
appLogic
:
InitDataLogic
=
new
InitDataLogic
({
context
:
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
))});
data
=
await
appLogic
.
onExecute
(
context
,
data
,
isloading
?
true
:
false
);
let
res
:
any
=
{
status
:
200
,
data
:
data
};
return
res
;
}
}
\ No newline at end of file
app_Web/src/service/ibizbook/init-data-logic-base.ts
浏览文件 @
24ef466c
import
IBIZBOOKService
from
'@/service/ibizbook/ibizbook-service'
;
import
{
Verify
}
from
'@/utils/verify/verify'
;
...
...
@@ -58,6 +59,15 @@ export default class InitDataLogicBase {
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public
compute0Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 执行逻辑
*
...
...
@@ -69,6 +79,26 @@ export default class InitDataLogicBase {
}
/**
* 获取图书数据
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executeDeaction1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 行为处理节点
let
result
:
any
;
let
actionParam
:
any
=
this
.
paramsMap
.
get
(
'Default'
);
const
targetService
:
IBIZBOOKService
=
new
IBIZBOOKService
();
if
(
targetService
[
'Get'
]
&&
targetService
[
'Get'
]
instanceof
Function
)
{
result
=
await
targetService
[
'Get'
](
actionParam
.
context
,
actionParam
.
data
,
false
);
}
if
(
result
&&
result
.
status
==
200
){
Object
.
assign
(
actionParam
.
data
,
result
.
data
);
return
this
.
paramsMap
.
get
(
this
.
defaultParamName
).
data
;
}
}
/**
* 开始
*
...
...
@@ -76,7 +106,9 @@ export default class InitDataLogicBase {
*/
private
async
executeBegin
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
//开始节点
return
this
.
paramsMap
.
get
(
this
.
defaultParamName
).
data
;
if
(
this
.
compute0Cond
(
params
)){
return
this
.
executeDeaction1
(
context
,
params
,
isloading
);
}
}
...
...
demo-core/src/main/resources/permission/systemResource.json
浏览文件 @
24ef466c
...
...
@@ -21,7 +21,7 @@
"delogicname"
:
"图书"
,
"sysmoudle"
:{
"id"
:
"SAMPLE"
,
"name"
:
"示例"
},
"dedataset"
:[{
"id"
:
"Default"
,
"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"
},{
"id"
:
"UpdatePress"
,
"name"
:
"更新出版社"
,
"type"
:
"USERCUSTOM"
}],
"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"
:
"
Finish"
,
"name"
:
"完成借书流程"
,
"type"
:
"DELOGIC"
},{
"id"
:
"Init"
,
"name"
:
"初始化"
,
"type"
:
"DELOGIC"
},{
"id"
:
"
Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UpdatePress"
,
"name"
:
"更新出版社"
,
"type"
:
"USERCUSTOM"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
}
,
{
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录