Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
94b52b8b
提交
94b52b8b
编写于
2月 16, 2023
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lab_xuhui 发布系统代码 [ibz-dst,应用]
上级
132d41e1
变更
17
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
294 行增加
和
51 行删除
+294
-51
meta-model_BO_CN_base.ts
...ocale/lanres/entities/meta-model/meta-model_BO_CN_base.ts
+4
-4
meta-model_en_US_base.ts
...ocale/lanres/entities/meta-model/meta-model_en_US_base.ts
+4
-4
meta-model_zh_CN_base.ts
...ocale/lanres/entities/meta-model/meta-model_zh_CN_base.ts
+4
-4
rule-engine_BO_CN_base.ts
...ale/lanres/entities/rule-engine/rule-engine_BO_CN_base.ts
+8
-0
rule-engine_en_US_base.ts
...ale/lanres/entities/rule-engine/rule-engine_en_US_base.ts
+8
-0
rule-engine_zh_CN_base.ts
...ale/lanres/entities/rule-engine/rule-engine_zh_CN_base.ts
+8
-0
rule-engines.ts
app_web/src/mock/entity/rule-engines/rule-engines.ts
+38
-0
meta-model-grid-view-base.vue
...s/lite/meta-model-grid-view/meta-model-grid-view-base.vue
+15
-15
rule-engine-grid-view-base.vue
...rule/rule-engine-grid-view/rule-engine-grid-view-base.vue
+43
-0
rule-engine-service-base.ts
app_web/src/service/rule-engine/rule-engine-service-base.ts
+28
-0
rule-engine-ui-service-base.ts
.../src/uiservice/rule-engine/rule-engine-ui-service-base.ts
+89
-0
main-grid-base.vue
app_web/src/widgets/rule-item/main-grid/main-grid-base.vue
+8
-22
IRuleEngineService.java
...java/cn/ibizlab/core/rule/service/IRuleEngineService.java
+2
-0
RuleEngineServiceImpl.java
...ibizlab/core/rule/service/impl/RuleEngineServiceImpl.java
+16
-0
h2_table.xml
ibzdst-core/src/main/resources/liquibase/h2_table.xml
+1
-1
systemResource.json
...st-core/src/main/resources/permission/systemResource.json
+1
-1
RuleEngineResource.java
...src/main/java/cn/ibizlab/api/rest/RuleEngineResource.java
+17
-0
未找到文件。
app_web/src/locale/lanres/entities/meta-model/meta-model_BO_CN_base.ts
浏览文件 @
94b52b8b
...
@@ -104,14 +104,14 @@ function getLocaleResourceBase(){
...
@@ -104,14 +104,14 @@ function getLocaleResourceBase(){
},
},
},
},
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem1_import
:
{
caption
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
},
tbitem1_export
:
{
tbitem1_export
:
{
caption
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
},
},
tbitem1_import
:
{
caption
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
},
tbitem2
:
{
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"-"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"-"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
""
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
app_web/src/locale/lanres/entities/meta-model/meta-model_en_US_base.ts
浏览文件 @
94b52b8b
...
@@ -104,14 +104,14 @@ function getLocaleResourceBase(){
...
@@ -104,14 +104,14 @@ function getLocaleResourceBase(){
},
},
},
},
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem1_import
:
{
caption
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
},
tbitem1_export
:
{
tbitem1_export
:
{
caption
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
},
},
tbitem1_import
:
{
caption
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
},
tbitem2
:
{
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"-"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"-"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
""
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
app_web/src/locale/lanres/entities/meta-model/meta-model_zh_CN_base.ts
浏览文件 @
94b52b8b
...
@@ -104,14 +104,14 @@ function getLocaleResourceBase(){
...
@@ -104,14 +104,14 @@ function getLocaleResourceBase(){
},
},
},
},
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem1_import
:
{
caption
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
},
tbitem1_export
:
{
tbitem1_export
:
{
caption
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导出"
,
null
),
},
},
tbitem1_import
:
{
caption
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"模型导入"
,
null
),
},
tbitem2
:
{
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"-"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"-"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
""
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
app_web/src/locale/lanres/entities/rule-engine/rule-engine_BO_CN_base.ts
浏览文件 @
94b52b8b
...
@@ -82,6 +82,14 @@ function getLocaleResourceBase(){
...
@@ -82,6 +82,14 @@ function getLocaleResourceBase(){
},
},
},
},
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem1_cleankc
:
{
caption
:
commonLogic
.
appcommonhandle
(
"清除规则缓存"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"清除规则缓存"
,
null
),
},
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"-"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
""
,
null
),
},
tbitem3
:
{
tbitem3
:
{
caption
:
commonLogic
.
appcommonhandle
(
"新建"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"新建"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"新建"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"新建"
,
null
),
...
...
app_web/src/locale/lanres/entities/rule-engine/rule-engine_en_US_base.ts
浏览文件 @
94b52b8b
...
@@ -82,6 +82,14 @@ function getLocaleResourceBase(){
...
@@ -82,6 +82,14 @@ function getLocaleResourceBase(){
},
},
},
},
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem1_cleankc
:
{
caption
:
commonLogic
.
appcommonhandle
(
"清除规则缓存"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"清除规则缓存"
,
null
),
},
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"-"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
""
,
null
),
},
tbitem3
:
{
tbitem3
:
{
caption
:
commonLogic
.
appcommonhandle
(
"New"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"New"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"New"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"New"
,
null
),
...
...
app_web/src/locale/lanres/entities/rule-engine/rule-engine_zh_CN_base.ts
浏览文件 @
94b52b8b
...
@@ -82,6 +82,14 @@ function getLocaleResourceBase(){
...
@@ -82,6 +82,14 @@ function getLocaleResourceBase(){
},
},
},
},
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem1_cleankc
:
{
caption
:
commonLogic
.
appcommonhandle
(
"清除规则缓存"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"清除规则缓存"
,
null
),
},
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"-"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
""
,
null
),
},
tbitem3
:
{
tbitem3
:
{
caption
:
commonLogic
.
appcommonhandle
(
"新建"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"新建"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"新建"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"新建"
,
null
),
...
...
app_web/src/mock/entity/rule-engines/rule-engines.ts
浏览文件 @
94b52b8b
...
@@ -163,6 +163,44 @@ mock.onPost(new RegExp(/^\/ruleengines\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).r
...
@@ -163,6 +163,44 @@ mock.onPost(new RegExp(/^\/ruleengines\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).r
return
[
status
,
data
];
return
[
status
,
data
];
});
});
// CleanKC
mock
.
onPost
(
new
RegExp
(
/^
\/
ruleengines
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
cleankc$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ruleengine 方法: CleanKC"
);
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
>
=
[
'engine_id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ruleengines
\/([
a-zA-Z0-9
\-\;]{1,35})\/
cleankc$/
).
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.engine_id, tempValue.engine_id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'engine_id'
]
==
tempValue
[
'engine_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
];
});
// Create
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
ruleengines
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ruleengines
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ruleengine 方法: Create"
);
console
.
groupCollapsed
(
"实体:ruleengine 方法: Create"
);
...
...
app_web/src/pages/lite/meta-model-grid-view/meta-model-grid-view-base.vue
浏览文件 @
94b52b8b
...
@@ -13,18 +13,18 @@
...
@@ -13,18 +13,18 @@
<div
class=
'pull-right'
>
<div
class=
'pull-right'
>
<div
class=
'toolbar-container'
>
<div
class=
'toolbar-container'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem1_
import.visabled"
:disabled=
"toolBarModels.tbitem1_import.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem1_im
port' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem1_
export.visabled"
:disabled=
"toolBarModels.tbitem1_export.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem1_ex
port' }, $event)">
<i
class=
''
></i>
<i
class=
''
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.metamodel.gridviewtoolbar_toolbar.tbitem1_
im
port.caption'
)
}}
</span>
<span
class=
'caption'
>
{{
$t
(
'entities.metamodel.gridviewtoolbar_toolbar.tbitem1_
ex
port.caption'
)
}}
</span>
</i-button>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.metamodel.gridviewtoolbar_toolbar.tbitem1_
im
port.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.metamodel.gridviewtoolbar_toolbar.tbitem1_
ex
port.tip'
)
}}
</div>
</tooltip>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem1_
export.visabled"
:disabled=
"toolBarModels.tbitem1_export.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem1_ex
port' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem1_
import.visabled"
:disabled=
"toolBarModels.tbitem1_import.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem1_im
port' }, $event)">
<i
class=
''
></i>
<i
class=
''
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.metamodel.gridviewtoolbar_toolbar.tbitem1_
ex
port.caption'
)
}}
</span>
<span
class=
'caption'
>
{{
$t
(
'entities.metamodel.gridviewtoolbar_toolbar.tbitem1_
im
port.caption'
)
}}
</span>
</i-button>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.metamodel.gridviewtoolbar_toolbar.tbitem1_
ex
port.tip'
)
}}
</div>
<div
slot=
'content'
>
{{
$t
(
'entities.metamodel.gridviewtoolbar_toolbar.tbitem1_
im
port.tip'
)
}}
</div>
</tooltip>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
...
@@ -384,10 +384,10 @@ export default class MetaModelGridViewBase extends Vue {
...
@@ -384,10 +384,10 @@ export default class MetaModelGridViewBase extends Vue {
* @memberof MetaModelGridView
* @memberof MetaModelGridView
*/
*/
public
toolBarModels
:
any
=
{
public
toolBarModels
:
any
=
{
tbitem1_import
:
{
name
:
'tbitem1_import'
,
actiontarget
:
'NONE'
,
caption
:
'模型导入'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'import'
,
target
:
'NONE'
}
},
tbitem1_export
:
{
name
:
'tbitem1_export'
,
actiontarget
:
'NONE'
,
caption
:
'模型导出'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'export'
,
target
:
'MULTIKEY'
}
},
tbitem1_export
:
{
name
:
'tbitem1_export'
,
actiontarget
:
'NONE'
,
caption
:
'模型导出'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'export'
,
target
:
'MULTIKEY'
}
},
tbitem1_import
:
{
name
:
'tbitem1_import'
,
actiontarget
:
'NONE'
,
caption
:
'模型导入'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'import'
,
target
:
'NONE'
}
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem3
:
{
name
:
'tbitem3'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem3
:
{
name
:
'tbitem3'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
...
@@ -860,12 +860,12 @@ export default class MetaModelGridViewBase extends Vue {
...
@@ -860,12 +860,12 @@ export default class MetaModelGridViewBase extends Vue {
* @memberof MetaModelGridViewBase
* @memberof MetaModelGridViewBase
*/
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
)
{
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
)
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem1_import'
))
{
this
.
toolbar_tbitem1_import_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem1_export'
))
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem1_export'
))
{
this
.
toolbar_tbitem1_export_click
(
null
,
''
,
$event2
);
this
.
toolbar_tbitem1_export_click
(
null
,
''
,
$event2
);
}
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem1_import'
))
{
this
.
toolbar_tbitem1_import_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem3'
))
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem3'
))
{
this
.
toolbar_tbitem3_click
(
null
,
''
,
$event2
);
this
.
toolbar_tbitem3_click
(
null
,
''
,
$event2
);
}
}
...
@@ -920,7 +920,7 @@ export default class MetaModelGridViewBase extends Vue {
...
@@ -920,7 +920,7 @@ export default class MetaModelGridViewBase extends Vue {
* @param {*} [$event]
* @param {*} [$event]
* @memberof
* @memberof
*/
*/
public
toolbar_tbitem1_
im
port_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
toolbar_tbitem1_
ex
port_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 参数
// 取数
// 取数
let
datas
:
any
[]
=
[];
let
datas
:
any
[]
=
[];
...
@@ -938,7 +938,7 @@ export default class MetaModelGridViewBase extends Vue {
...
@@ -938,7 +938,7 @@ export default class MetaModelGridViewBase extends Vue {
}
}
// 界面行为
// 界面行为
const
curUIService
:
MetaModelUIService
=
new
MetaModelUIService
();
const
curUIService
:
MetaModelUIService
=
new
MetaModelUIService
();
curUIService
.
MetaModel_
im
port
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MetaModel"
);
curUIService
.
MetaModel_
ex
port
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MetaModel"
);
}
}
/**
/**
...
@@ -949,7 +949,7 @@ export default class MetaModelGridViewBase extends Vue {
...
@@ -949,7 +949,7 @@ export default class MetaModelGridViewBase extends Vue {
* @param {*} [$event]
* @param {*} [$event]
* @memberof
* @memberof
*/
*/
public
toolbar_tbitem1_
ex
port_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
toolbar_tbitem1_
im
port_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 参数
// 取数
// 取数
let
datas
:
any
[]
=
[];
let
datas
:
any
[]
=
[];
...
@@ -967,7 +967,7 @@ export default class MetaModelGridViewBase extends Vue {
...
@@ -967,7 +967,7 @@ export default class MetaModelGridViewBase extends Vue {
}
}
// 界面行为
// 界面行为
const
curUIService
:
MetaModelUIService
=
new
MetaModelUIService
();
const
curUIService
:
MetaModelUIService
=
new
MetaModelUIService
();
curUIService
.
MetaModel_
ex
port
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MetaModel"
);
curUIService
.
MetaModel_
im
port
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MetaModel"
);
}
}
/**
/**
...
...
app_web/src/pages/rule/rule-engine-grid-view/rule-engine-grid-view-base.vue
浏览文件 @
94b52b8b
...
@@ -12,6 +12,14 @@
...
@@ -12,6 +12,14 @@
<i-input
v-show=
"!isExpandSearchForm"
v-model=
"query"
search
enter-button
@
on-search=
"onSearch($event)"
class=
'quick-search-input'
style=
'max-width: 400px;padding-left: 24px'
placeholder=
"名称"
/>
<i-input
v-show=
"!isExpandSearchForm"
v-model=
"query"
search
enter-button
@
on-search=
"onSearch($event)"
class=
'quick-search-input'
style=
'max-width: 400px;padding-left: 24px'
placeholder=
"名称"
/>
<div
class=
'pull-right'
>
<div
class=
'pull-right'
>
<div
class=
'toolbar-container'
>
<div
class=
'toolbar-container'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem1_cleankc.visabled"
:disabled=
"toolBarModels.tbitem1_cleankc.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem1_cleankc' }, $event)">
<i
class=
''
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.ruleengine.gridviewtoolbar_toolbar.tbitem1_cleankc.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.ruleengine.gridviewtoolbar_toolbar.tbitem1_cleankc.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem3.visabled"
:disabled=
"toolBarModels.tbitem3.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem3' }, $event)">
<i-button
v-show=
"toolBarModels.tbitem3.visabled"
:disabled=
"toolBarModels.tbitem3.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem3' }, $event)">
<i
class=
'fa fa-file-text-o'
></i>
<i
class=
'fa fa-file-text-o'
></i>
...
@@ -369,6 +377,9 @@ export default class RuleEngineGridViewBase extends Vue {
...
@@ -369,6 +377,9 @@ export default class RuleEngineGridViewBase extends Vue {
* @memberof RuleEngineGridView
* @memberof RuleEngineGridView
*/
*/
public
toolBarModels
:
any
=
{
public
toolBarModels
:
any
=
{
tbitem1_cleankc
:
{
name
:
'tbitem1_cleankc'
,
actiontarget
:
'NONE'
,
caption
:
'清除规则缓存'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'CleanKC'
,
target
:
'NONE'
}
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem3
:
{
name
:
'tbitem3'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem3
:
{
name
:
'tbitem3'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem4
:
{
name
:
'tbitem4'
,
actiontarget
:
'NONE'
,
caption
:
'编辑'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
}
},
tbitem4
:
{
name
:
'tbitem4'
,
actiontarget
:
'NONE'
,
caption
:
'编辑'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
}
},
...
@@ -840,6 +851,9 @@ export default class RuleEngineGridViewBase extends Vue {
...
@@ -840,6 +851,9 @@ export default class RuleEngineGridViewBase extends Vue {
* @memberof RuleEngineGridViewBase
* @memberof RuleEngineGridViewBase
*/
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
)
{
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
)
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem1_cleankc'
))
{
this
.
toolbar_tbitem1_cleankc_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem3'
))
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem3'
))
{
this
.
toolbar_tbitem3_click
(
null
,
''
,
$event2
);
this
.
toolbar_tbitem3_click
(
null
,
''
,
$event2
);
}
}
...
@@ -886,6 +900,35 @@ export default class RuleEngineGridViewBase extends Vue {
...
@@ -886,6 +900,35 @@ export default class RuleEngineGridViewBase extends Vue {
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem1_cleankc_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
const
curUIService
:
RuleEngineUIService
=
new
RuleEngineUIService
();
curUIService
.
RuleEngine_CleanKC
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"RuleEngine"
);
}
/**
/**
* 逻辑事件
* 逻辑事件
*
*
...
...
app_web/src/service/rule-engine/rule-engine-service-base.ts
浏览文件 @
94b52b8b
...
@@ -80,6 +80,34 @@ export default class RuleEngineServiceBase extends EntityService {
...
@@ -80,6 +80,34 @@ export default class RuleEngineServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* CleanKC接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof RuleEngineServiceBase
*/
public
async
CleanKC
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/ruleengines/
${
context
.
ruleengine
}
/cleankc`
,
data
,
isloading
);
return
res
;
}
/**
* CleanKCBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof RuleEngineServiceBase
*/
public
async
CleanKCBatch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/ruleengines/cleankcbatch`
,
tempData
,
isloading
);
}
/**
/**
* Create接口方法
* Create接口方法
*
*
...
...
app_web/src/uiservice/rule-engine/rule-engine-ui-service-base.ts
浏览文件 @
94b52b8b
...
@@ -197,6 +197,95 @@ export default class RuleEngineUIServiceBase extends UIService {
...
@@ -197,6 +197,95 @@ export default class RuleEngineUIServiceBase extends UIService {
backend
();
backend
();
}
}
/**
* 清除规则缓存
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public
async
RuleEngine_CleanKC
(
args
:
any
[],
context
:
any
=
{},
params
:
any
=
{},
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
){
let
confirmResult
:
boolean
=
await
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
actionContext
.
$Modal
.
confirm
({
title
:
'警告'
,
content
:
'确认清除规则缓存?'
,
onOk
:
()
=>
{
resolve
(
true
);},
onCancel
:
()
=>
{
resolve
(
false
);}
});
});
if
(
!
confirmResult
){
return
;
}
let
data
:
any
=
{};
let
parentContext
:
any
=
{};
let
parentViewParam
:
any
=
{};
const
_this
:
any
=
actionContext
;
const
_args
:
any
[]
=
Util
.
deepCopy
(
args
);
const
actionTarget
:
string
|
null
=
'NONE'
;
if
(
_this
.
context
){
parentContext
=
_this
.
context
;
}
if
(
_this
.
viewparams
){
parentViewParam
=
_this
.
viewparams
;
}
context
=
UIActionTool
.
handleContextParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
context
);
data
=
UIActionTool
.
handleActionParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
params
);
if
(
Object
.
is
(
actionTarget
,
"MULTIKEY"
)){
let
tempDataArray
:
Array
<
any
>
=
[];
if
((
_args
.
length
>
1
)
&&
(
Object
.
keys
(
data
).
length
>
0
)){
for
(
let
i
=
0
;
i
<
_args
.
length
;
i
++
){
let
tempObject
:
any
=
{};
Object
.
keys
(
data
).
forEach
((
key
:
string
)
=>
{
Object
.
assign
(
tempObject
,{[
key
]:
data
[
key
].
split
(
','
)[
i
]});
})
tempDataArray
.
push
(
tempObject
);
}
}
else
{
tempDataArray
.
push
(
data
);
}
data
=
tempDataArray
;
}
context
=
Object
.
assign
({},
actionContext
.
context
,
context
);
let
parentObj
:
any
=
{
srfparentdename
:
srfParentDeName
?
srfParentDeName
:
null
,
srfparentkey
:
srfParentDeName
?
context
[
srfParentDeName
.
toLowerCase
()]:
null
};
if
(
!
Object
.
is
(
actionTarget
,
"MULTIKEY"
)){
Object
.
assign
(
data
,
parentObj
);
}
Object
.
assign
(
context
,
parentObj
);
// 直接调实体服务需要转换的数据
if
(
context
&&
context
.
srfsessionid
){
context
.
srfsessionkey
=
context
.
srfsessionid
;
delete
context
.
srfsessionid
;
}
const
backend
=
()
=>
{
const
curService
:
RuleEngineService
=
new
RuleEngineService
();
curService
.
CleanKC
(
context
,
data
,
true
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
message
});
return
;
}
actionContext
.
$Notice
.
success
({
title
:
'成功'
,
desc
:
'清除成功!'
});
const
_this
:
any
=
actionContext
;
return
response
;
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
actionContext
.
$Notice
.
error
({
title
:
(
actionContext
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
actionContext
.
$Notice
.
error
({
title
:
(
actionContext
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
actionContext
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
return
;
}
return
response
;
});
};
backend
();
}
/**
/**
* 运行
* 运行
*
*
...
...
app_web/src/widgets/rule-item/main-grid/main-grid-base.vue
浏览文件 @
94b52b8b
...
@@ -393,20 +393,6 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -393,20 +393,6 @@ export default class MainBase extends Vue implements ControlInterface {
return
this
.
selections
[
0
];
return
this
.
selections
[
0
];
}
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof MainBase
*/
@
Prop
()
public
newdata
:
any
;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof MainBase
*/
@
Prop
()
public
opendata
:
any
;
/**
/**
* 是否嵌入关系界面
* 是否嵌入关系界面
...
@@ -974,7 +960,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -974,7 +960,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
*/
public
load
(
opt
:
any
=
{},
pageReset
:
boolean
=
false
):
void
{
public
load
(
opt
:
any
=
{},
pageReset
:
boolean
=
false
):
void
{
if
(
!
this
.
fetchAction
){
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItemGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.fetchAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItem
Pickup
GridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.fetchAction'
)
as
string
)
});
return
;
return
;
}
}
if
(
pageReset
){
if
(
pageReset
){
...
@@ -1069,7 +1055,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1069,7 +1055,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
!
this
.
removeAction
){
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItemGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.removeAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItem
Pickup
GridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.removeAction'
)
as
string
)
});
return
;
return
;
}
}
let
_datas
:
any
[]
=
[];
let
_datas
:
any
[]
=
[];
...
@@ -1175,7 +1161,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1175,7 +1161,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
*/
public
addBatch
(
arg
:
any
=
{}):
void
{
public
addBatch
(
arg
:
any
=
{}):
void
{
if
(
!
this
.
fetchAction
){
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItemGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.fetchAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItem
Pickup
GridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.fetchAction'
)
as
string
)
});
return
;
return
;
}
}
if
(
!
arg
){
if
(
!
arg
){
...
@@ -1991,7 +1977,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1991,7 +1977,7 @@ export default class MainBase extends Vue implements ControlInterface {
public
setColState
()
{
public
setColState
()
{
this
.
resetColModel
=
Util
.
deepCopy
(
this
.
allColumns
);
this
.
resetColModel
=
Util
.
deepCopy
(
this
.
allColumns
);
const
viewParams
:
any
=
Util
.
deepCopy
(
this
.
viewparams
);
const
viewParams
:
any
=
Util
.
deepCopy
(
this
.
viewparams
);
Object
.
assign
(
viewParams
,{
utilServiceName
:
'grid_dynaconfig'
,
modelid
:
'ibzdst_web_ruleitemgridview_grid_main'
});
Object
.
assign
(
viewParams
,{
utilServiceName
:
'grid_dynaconfig'
,
modelid
:
'ibzdst_web_ruleitem
pickup
gridview_grid_main'
});
const
post
=
this
.
service
.
loadModel
(
'grid_dynaconfig'
,
this
.
context
,
viewParams
);
const
post
=
this
.
service
.
loadModel
(
'grid_dynaconfig'
,
this
.
context
,
viewParams
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
response
.
status
==
200
&&
response
.
data
)
{
if
(
response
.
status
==
200
&&
response
.
data
)
{
...
@@ -2058,7 +2044,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2058,7 +2044,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
*/
public
saveDynaConfig
()
{
public
saveDynaConfig
()
{
const
viewParams
:
any
=
Util
.
deepCopy
(
this
.
viewparams
);
const
viewParams
:
any
=
Util
.
deepCopy
(
this
.
viewparams
);
Object
.
assign
(
viewParams
,{
utilServiceName
:
'grid_dynaconfig'
,
modelid
:
'ibzdst_web_ruleitemgridview_grid_main'
,
model
:
this
.
allColumns
});
Object
.
assign
(
viewParams
,{
utilServiceName
:
'grid_dynaconfig'
,
modelid
:
'ibzdst_web_ruleitem
pickup
gridview_grid_main'
,
model
:
this
.
allColumns
});
const
post
=
this
.
service
.
saveModel
(
'grid_dynaconfig'
,
this
.
context
,
viewParams
);
const
post
=
this
.
service
.
saveModel
(
'grid_dynaconfig'
,
this
.
context
,
viewParams
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
response
.
status
==
200
)
{
if
(
response
.
status
==
200
)
{
...
@@ -2129,7 +2115,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2129,7 +2115,7 @@ export default class MainBase extends Vue implements ControlInterface {
try
{
try
{
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
)){
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
)){
if
(
!
this
.
createAction
){
if
(
!
this
.
createAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItemGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.createAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItem
Pickup
GridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.createAction'
)
as
string
)
});
}
else
{
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
let
response
=
await
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
let
response
=
await
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
...
@@ -2137,7 +2123,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2137,7 +2123,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
if
(
!
this
.
updateAction
){
if
(
!
this
.
updateAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItemGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.updateAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItem
Pickup
GridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.updateAction'
)
as
string
)
});
}
else
{
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
if
(
item
.
ruleitem
){
if
(
item
.
ruleitem
){
...
@@ -2210,7 +2196,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2210,7 +2196,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
*/
public
newRow
(
args
:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
):
void
{
public
newRow
(
args
:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
):
void
{
if
(
!
this
.
loaddraftAction
){
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItemGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.loaddraftAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'RuleItem
Pickup
GridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.loaddraftAction'
)
as
string
)
});
return
;
return
;
}
}
let
_this
=
this
;
let
_this
=
this
;
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/rule/service/IRuleEngineService.java
浏览文件 @
94b52b8b
...
@@ -36,6 +36,8 @@ public interface IRuleEngineService extends IService<RuleEngine> {
...
@@ -36,6 +36,8 @@ public interface IRuleEngineService extends IService<RuleEngine> {
RuleEngine
check
(
RuleEngine
et
);
RuleEngine
check
(
RuleEngine
et
);
boolean
checkBatch
(
List
<
RuleEngine
>
etList
);
boolean
checkBatch
(
List
<
RuleEngine
>
etList
);
boolean
checkKey
(
RuleEngine
et
);
boolean
checkKey
(
RuleEngine
et
);
RuleEngine
cleanKC
(
RuleEngine
et
);
boolean
cleanKCBatch
(
List
<
RuleEngine
>
etList
);
RuleEngine
run
(
RuleEngine
et
);
RuleEngine
run
(
RuleEngine
et
);
boolean
runBatch
(
List
<
RuleEngine
>
etList
);
boolean
runBatch
(
List
<
RuleEngine
>
etList
);
boolean
save
(
RuleEngine
et
);
boolean
save
(
RuleEngine
et
);
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/rule/service/impl/RuleEngineServiceImpl.java
浏览文件 @
94b52b8b
...
@@ -141,6 +141,22 @@ public class RuleEngineServiceImpl extends ServiceImpl<RuleEngineMapper, RuleEng
...
@@ -141,6 +141,22 @@ public class RuleEngineServiceImpl extends ServiceImpl<RuleEngineMapper, RuleEng
public
boolean
checkKey
(
RuleEngine
et
)
{
public
boolean
checkKey
(
RuleEngine
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getEngineId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getEngineId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getEngineId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getEngineId
())));
}
}
@Override
@Transactional
public
RuleEngine
cleanKC
(
RuleEngine
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
boolean
cleanKCBatch
(
List
<
RuleEngine
>
etList
)
{
for
(
RuleEngine
et
:
etList
)
{
cleanKC
(
et
);
}
return
true
;
}
@Override
@Override
public
RuleEngine
run
(
RuleEngine
et
)
{
public
RuleEngine
run
(
RuleEngine
et
)
{
//自定义代码
//自定义代码
...
...
ibzdst-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
94b52b8b
...
@@ -468,7 +468,7 @@
...
@@ -468,7 +468,7 @@
<!--输出实体[RU_ENGINE]数据结构 -->
<!--输出实体[RU_ENGINE]数据结构 -->
<changeSet
author=
"root"
id=
"tab-ru_engine-
24
-17"
>
<changeSet
author=
"root"
id=
"tab-ru_engine-
30
-17"
>
<createTable
tableName=
"IBZRULEENGINE"
>
<createTable
tableName=
"IBZRULEENGINE"
>
<column
name=
"ENGINEID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ENGINEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_ENGINE_ENGINEID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_ENGINE_ENGINEID"
/>
...
...
ibzdst-core/src/main/resources/permission/systemResource.json
浏览文件 @
94b52b8b
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
"delogicname"
:
"规则引擎"
,
"delogicname"
:
"规则引擎"
,
"sysmoudle"
:{
"id"
:
"RULE"
,
"name"
:
"rule"
},
"sysmoudle"
:{
"id"
:
"RULE"
,
"name"
:
"rule"
},
"dedataset"
:[{
"id"
:
"Default"
,
"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"
:
"Check"
,
"name"
:
"校验"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Run"
,
"name"
:
"运行"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"SyncRun"
,
"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"
:
"Check"
,
"name"
:
"校验"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
CleanKC"
,
"name"
:
"清除构建KC缓存"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"
Run"
,
"name"
:
"运行"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"SyncRun"
,
"name"
:
"同步运行"
,
"type"
:
"USERCUSTOM"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
...
...
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/rest/RuleEngineResource.java
浏览文件 @
94b52b8b
...
@@ -133,6 +133,23 @@ public class RuleEngineResource {
...
@@ -133,6 +133,23 @@ public class RuleEngineResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ruleengineService
.
checkKey
(
ruleengineMapping
.
toDomain
(
ruleenginedto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ruleengineService
.
checkKey
(
ruleengineMapping
.
toDomain
(
ruleenginedto
)));
}
}
@ApiOperation
(
value
=
"清除构建KC缓存"
,
tags
=
{
"规则引擎"
},
notes
=
"清除构建KC缓存"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ruleengines/{ruleengine_id}/cleankc"
)
public
ResponseEntity
<
RuleEngineDTO
>
cleanKC
(
@PathVariable
(
"ruleengine_id"
)
String
ruleengine_id
,
@RequestBody
RuleEngineDTO
ruleenginedto
)
{
RuleEngine
domain
=
ruleengineMapping
.
toDomain
(
ruleenginedto
);
domain
.
setEngineId
(
ruleengine_id
);
domain
=
ruleengineService
.
cleanKC
(
domain
);
ruleenginedto
=
ruleengineMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ruleenginedto
);
}
@ApiOperation
(
value
=
"批量处理[清除构建KC缓存]"
,
tags
=
{
"规则引擎"
},
notes
=
"批量处理[清除构建KC缓存]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ruleengines/cleankcbatch"
)
public
ResponseEntity
<
Boolean
>
cleanKCBatch
(
@RequestBody
List
<
RuleEngineDTO
>
ruleenginedtos
)
{
List
<
RuleEngine
>
domains
=
ruleengineMapping
.
toDomain
(
ruleenginedtos
);
boolean
result
=
ruleengineService
.
cleanKCBatch
(
domains
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
@ApiOperation
(
value
=
"获取规则引擎草稿"
,
tags
=
{
"规则引擎"
},
notes
=
"获取规则引擎草稿"
)
@ApiOperation
(
value
=
"获取规则引擎草稿"
,
tags
=
{
"规则引擎"
},
notes
=
"获取规则引擎草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ruleengines/getdraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ruleengines/getdraft"
)
public
ResponseEntity
<
RuleEngineDTO
>
getDraft
(
RuleEngineDTO
dto
)
{
public
ResponseEntity
<
RuleEngineDTO
>
getDraft
(
RuleEngineDTO
dto
)
{
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录