Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
f5b850f7
提交
f5b850f7
编写于
1月 19, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
e74fb898
da5b4d9f
变更
77
展开全部
显示空白字符变更
内嵌
并排
正在显示
77 个修改的文件
包含
1340 行增加
和
459 行删除
+1340
-459
AppEntityModel.java
...rc/main/java/cn/ibizlab/codegen/model/AppEntityModel.java
+24
-0
auto-complete.hbs
...urces/templ/r7/@macro/front-end/editors/auto-complete.hbs
+1
-1
checkbox-list.hbs
...urces/templ/r7/@macro/front-end/editors/checkbox-list.hbs
+1
-1
checkbox.hbs
.../resources/templ/r7/@macro/front-end/editors/checkbox.hbs
+1
-1
code.hbs
...main/resources/templ/r7/@macro/front-end/editors/code.hbs
+1
-1
data-picker-view.hbs
...es/templ/r7/@macro/front-end/editors/data-picker-view.hbs
+1
-1
data-picker.hbs
...sources/templ/r7/@macro/front-end/editors/data-picker.hbs
+1
-1
date-picker.hbs
...sources/templ/r7/@macro/front-end/editors/date-picker.hbs
+1
-1
dropdown-list.hbs
...urces/templ/r7/@macro/front-end/editors/dropdown-list.hbs
+1
-1
input-ip.hbs
.../resources/templ/r7/@macro/front-end/editors/input-ip.hbs
+1
-1
input.hbs
...ain/resources/templ/r7/@macro/front-end/editors/input.hbs
+1
-1
list-box.hbs
.../resources/templ/r7/@macro/front-end/editors/list-box.hbs
+1
-1
radio-group.hbs
...sources/templ/r7/@macro/front-end/editors/radio-group.hbs
+1
-1
rating.hbs
...in/resources/templ/r7/@macro/front-end/editors/rating.hbs
+1
-1
raw.hbs
.../main/resources/templ/r7/@macro/front-end/editors/raw.hbs
+1
-1
rich-text.hbs
...resources/templ/r7/@macro/front-end/editors/rich-text.hbs
+1
-1
slider.hbs
...in/resources/templ/r7/@macro/front-end/editors/slider.hbs
+1
-1
stepper.hbs
...n/resources/templ/r7/@macro/front-end/editors/stepper.hbs
+1
-1
switch.hbs
...in/resources/templ/r7/@macro/front-end/editors/switch.hbs
+1
-1
upload.hbs
...in/resources/templ/r7/@macro/front-end/editors/upload.hbs
+1
-1
view-base-config.hbs
...rces/templ/r7/@macro/front-end/views/view-base-config.hbs
+3
-3
form-druipart.hbs
...r7/@macro/front-end/widgets/form-detail/form-druipart.hbs
+30
-1
grid-column.hbs
...l/r7/@macro/front-end/widgets/grid-detail/grid-column.hbs
+1
-1
app.ts
...e/src/main/resources/templ/r7/app_{{apps}}/src/app/app.ts
+23
-3
app-entity-config.ts.hbs
...l/r7/app_{{apps}}/src/app/config/app-entity-config.ts.hbs
+12
-0
app-view-config.ts.hbs
...mpl/r7/app_{{apps}}/src/app/config/app-view-config.ts.hbs
+6
-0
index.ts
...n/resources/templ/r7/app_{{apps}}/src/app/config/index.ts
+2
-1
app-grid-view-layout.vue
...p_{{apps}}/src/components/layout/app-grid-view-layout.vue
+1
-0
app-filter-tree.vue
...r7/app_{{apps}}/src/components/render/app-filter-tree.vue
+25
-0
app-form-druipart.vue
.../app_{{apps}}/src/components/render/app-form-druipart.vue
+144
-0
i-app.ts
...ces/templ/r7/app_{{apps}}/src/core/interface/app/i-app.ts
+20
-2
i-nav-data-service.ts
...{{apps}}/src/core/interface/service/i-nav-data-service.ts
+26
-0
index.ts
...templ/r7/app_{{apps}}/src/core/interface/service/index.ts
+2
-1
app-action-base.ts
..._{{apps}}/src/core/logic/app-ui-action/app-action-base.ts
+74
-9
app-backend-action.ts
...apps}}/src/core/logic/app-ui-action/app-backend-action.ts
+6
-6
app-front-action.ts
...{{apps}}/src/core/logic/app-ui-action/app-front-action.ts
+2
-2
app-base.ts
...es/templ/r7/app_{{apps}}/src/core/modules/app/app-base.ts
+10
-1
grid-view.ts
...pp_{{apps}}/src/core/modules/views/grid-view/grid-view.ts
+2
-2
md-view.ts
...r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
+1
-1
pickup-grid-view.ts
...c/core/modules/views/pickup-grid-view/pickup-grid-view.ts
+1
-1
pickup-view.ts
...{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
+1
-1
view-base.ts
...pp_{{apps}}/src/core/modules/views/view-base/view-base.ts
+13
-1
exp-bar-control.ts
...c/core/modules/widgets/exp-bar-control/exp-bar-control.ts
+2
-2
form-control.ts
...s}}/src/core/modules/widgets/form-control/form-control.ts
+89
-43
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+19
-8
index.ts
...s/templ/r7/app_{{apps}}/src/core/modules/widgets/index.ts
+2
-1
md-control.ts
...{apps}}/src/core/modules/widgets/md-control/md-control.ts
+335
-291
pickup-view-panel-control.ts
...ts/pickup-view-panel-control/pickup-view-panel-control.ts
+1
-1
quick-search-form-control.ts
...ts/quick-search-form-control/quick-search-form-control.ts
+2
-2
search-form-control.ts
...odules/widgets/search-form-control/search-form-control.ts
+2
-4
index.ts
...pps}}/src/core/modules/widgets/searchbar-control/index.ts
+3
-0
searchbar-control-prop.ts
...dules/widgets/searchbar-control/searchbar-control-prop.ts
+11
-0
searchbar-control-state.ts
...ules/widgets/searchbar-control/searchbar-control-state.ts
+11
-0
searchbar-control.ts
...re/modules/widgets/searchbar-control/searchbar-control.ts
+44
-0
tree-control.ts
...s}}/src/core/modules/widgets/tree-control/tree-control.ts
+4
-8
index.ts
.../r7/app_{{apps}}/src/core/service/common-service/index.ts
+2
-0
navdata-param.ts
...{{apps}}/src/core/service/common-service/navdata-param.ts
+52
-0
navdata-service.ts
...apps}}/src/core/service/common-service/navdata-service.ts
+181
-0
index.ts
...resources/templ/r7/app_{{apps}}/src/core/service/index.ts
+2
-1
uiaction-util.ts
.../templ/r7/app_{{apps}}/src/core/utils/ui/uiaction-util.ts
+13
-10
{{appEntities}}-ui-service-base.ts.hbs
...ce/{{appEntities}}/{{appEntities}}-ui-service-base.ts.hbs
+4
-2
app-modal.vue
...s/templ/r7/app_{{apps}}/src/utils/app-modal/app-modal.vue
+1
-2
{{pages@APPINDEXVIEW}}.vue.hbs
...s}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
+1
-1
{{pages@DEGRIDVIEW}}.vue.hbs
...dules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
+15
-5
{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
...ges@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
+3
-3
{{pages@DEPICKUPVIEW}}.vue.hbs
...s}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
+3
-3
{{pages@DETREEEXPVIEW}}.vue.hbs
...}/{{pages@DETREEEXPVIEW}}/{{pages@DETREEEXPVIEW}}.vue.hbs
+3
-3
{{ctrls@APPMENU}}-menu.vue.hbs
...s}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
+2
-2
{{ctrls@FORM}}-form.vue.hbs
...ntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
+17
-3
{{ctrls@GRID}}-grid.vue.hbs
...ntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
+7
-2
{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel.vue.hbs
...w-panel/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel.vue.hbs
+2
-2
{{ctrls@QUICKSEARCHFORM}}-quick-search-form.vue.hbs
...-form/{{ctrls@QUICKSEARCHFORM}}-quick-search-form.vue.hbs
+1
-1
index.ts.hbs
...{appEntities}}/{{ctrls@SEARCHBAR}}-searchBar/index.ts.hbs
+3
-0
{{ctrls@SEARCHBAR}}-searchBar-config.ts.hbs
...R}}-searchBar/{{ctrls@SEARCHBAR}}-searchBar-config.ts.hbs
+15
-0
{{ctrls@SEARCHBAR}}-searchBar.vue.hbs
...ARCHBAR}}-searchBar/{{ctrls@SEARCHBAR}}-searchBar.vue.hbs
+36
-0
{{ctrls@SEARCHFORM}}-search-form.vue.hbs
...RM}}-search-form/{{ctrls@SEARCHFORM}}-search-form.vue.hbs
+1
-1
{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
...}}-tree-exp-bar/{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
+3
-3
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/AppEntityModel.java
浏览文件 @
f5b850f7
...
...
@@ -69,6 +69,8 @@ public class AppEntityModel extends BaseModel{
}
// 初始化界面行为
keyField
=
getAppDataEntity
().
getPSDataEntity
().
getKeyPSDEField
().
getCodeName
();
majorField
=
getAppDataEntity
().
getPSDataEntity
().
getMajorPSDEField
().
getCodeName
();
if
(
getAppDataEntity
().
getAllPSAppDEUIActions
()
!=
null
){
getAppDataEntity
().
getAllPSAppDEUIActions
().
forEach
(
appDEUIAction
->{
JSONObject
actionJson
=
new
JSONObject
();
...
...
@@ -81,6 +83,24 @@ public class AppEntityModel extends BaseModel{
actionJson
.
put
(
"htmlPageUrl"
,
appDEUIAction
.
getHtmlPageUrl
());
actionJson
.
put
(
"refreshMode"
,
appDEUIAction
.
getRefreshMode
());
actionJson
.
put
(
"uILogicAttachMode"
,
appDEUIAction
.
getUILogicAttachMode
());
StringBuffer
navContexts
=
new
StringBuffer
();
navContexts
.
append
(
"{"
);
if
(
appDEUIAction
.
getPSNavigateContexts
()
!=
null
){
appDEUIAction
.
getPSNavigateContexts
().
forEach
(
context
->{
navContexts
.
append
(
context
.
getName
().
toLowerCase
()
+
":'"
+(
context
.
isRawValue
()?
""
:
"%"
)
+
context
.
getValue
()+(
context
.
isRawValue
()?
""
:
"%"
)+
"',"
);
});
}
navContexts
.
append
(
"}"
);
actionJson
.
put
(
"navContexts"
,
navContexts
);
StringBuffer
navParams
=
new
StringBuffer
();
navParams
.
append
(
"{"
);
if
(
appDEUIAction
.
getPSNavigateParams
()
!=
null
){
appDEUIAction
.
getPSNavigateParams
().
forEach
(
param
->{
navParams
.
append
(
param
.
getName
().
toLowerCase
()
+
":'"
+(
param
.
isRawValue
()?
""
:
"%"
)+
param
.
getValue
()+(
param
.
isRawValue
()?
""
:
"%"
)+
"',"
);
});
}
navParams
.
append
(
"}"
);
actionJson
.
put
(
"navParams"
,
navParams
);
if
(
appDEUIAction
.
getPSAppDEMethod
()
!=
null
){
actionJson
.
put
(
"methodCodeName"
,
appDEUIAction
.
getPSAppDEMethod
().
getCodeName
());
}
...
...
@@ -95,6 +115,10 @@ public class AppEntityModel extends BaseModel{
});
}
}
// 主键属性名称
public
String
keyField
=
""
;
// 主信息属性名称
public
String
majorField
=
""
;
public
IPSAppDataEntity
getAppDataEntity
()
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/auto-complete.hbs
浏览文件 @
f5b850f7
...
...
@@ -44,6 +44,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/checkbox-list.hbs
浏览文件 @
f5b850f7
...
...
@@ -26,6 +26,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/checkbox.hbs
浏览文件 @
f5b850f7
...
...
@@ -12,6 +12,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/code.hbs
浏览文件 @
f5b850f7
...
...
@@ -9,7 +9,7 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
:context=
"state.context"
:viewParams=
"state.viewParams"
/>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/data-picker-view.hbs
浏览文件 @
f5b850f7
...
...
@@ -30,6 +30,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/data-picker.hbs
浏览文件 @
f5b850f7
...
...
@@ -57,6 +57,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/date-picker.hbs
浏览文件 @
f5b850f7
...
...
@@ -51,6 +51,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/dropdown-list.hbs
浏览文件 @
f5b850f7
...
...
@@ -33,6 +33,6 @@
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
:data=
"record"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/input-ip.hbs
浏览文件 @
f5b850f7
...
...
@@ -12,7 +12,7 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/input.hbs
浏览文件 @
f5b850f7
...
...
@@ -42,6 +42,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/list-box.hbs
浏览文件 @
f5b850f7
...
...
@@ -42,6 +42,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/radio-group.hbs
浏览文件 @
f5b850f7
...
...
@@ -26,6 +26,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/rating.hbs
浏览文件 @
f5b850f7
...
...
@@ -18,6 +18,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/raw.hbs
浏览文件 @
f5b850f7
...
...
@@ -16,6 +16,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/rich-text.hbs
浏览文件 @
f5b850f7
...
...
@@ -25,6 +25,6 @@
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
:data=
"record"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/slider.hbs
浏览文件 @
f5b850f7
...
...
@@ -22,6 +22,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/stepper.hbs
浏览文件 @
f5b850f7
...
...
@@ -24,6 +24,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/switch.hbs
浏览文件 @
f5b850f7
...
...
@@ -15,6 +15,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/upload.hbs
浏览文件 @
f5b850f7
...
...
@@ -35,6 +35,6 @@
{{/if}}
{{#
eq
ctrlType
'grid'
}}
:value=
"record.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"
($event: IActionParam) => onEditorEvent(index,$event
)"
@
editorEvent=
"
onEditorEvent($event,index
)"
{{/
eq
}}
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/views/view-base-config.hbs
浏览文件 @
f5b850f7
...
...
@@ -18,16 +18,16 @@
},
{{/if}}
appEntityName: '
{{
page
.
appEntity
.
codeName
}}
',
isLoadDefault:
true
,
isLoadDefault:
{{#if
(
or
page
.
loadDefault
(
eq
page
.
loadDefault
false
))
}}{{
page
.
loadDefault
}}{{else}}
true
{{/if}}
,
keyPSDEField: '
{{
lowerCase
page
.
appEntity
.
codeName
}}
',
{{!-- viewMsgGroup: '{{page.psAppViewMsgGroup}}', --}}
{{!-- viewUIActions: '{{page.psAppViewUIActions}}', --}}
viewSysCss: '
{{
page
.
psSysCss
}}
',
viewSysCss: '
{{
page
.
psSysCss
.
cssName
}}
',
{{!-- viewSysImage: '{{page.psSysImage}}', --}}
subCaption: '
{{
page
.
subCaption
}}
',
viewType: '
{{
page
.
viewType
}}
',
viewStyle: '
{{
page
.
viewStyle
}}
',
showCaptionBar:
'
{{
page
.
viewStyle
}}
'
,
showCaptionBar:
{{
page
.
showCaptionBar
}}
,
xDataControlName:'
{{
page
.
xDataControlName
}}
',
openDataViewName: 'ExampleEditorEditView',
appViewNavContexts:
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
page
.
psAppViewNavContexts
}}
,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/form-detail/form-druipart.hbs
浏览文件 @
f5b850f7
关系界面未实现
\ No newline at end of file
{{#
eq
item
.
psLayoutPos
'FLEX'
}}
<div
style=
"flex-grow:
{{#if
item
.
psLayoutPos
.
grow
}}{{
item
.
psLayoutPos
.
grow
}}{{else}}
0
{{/if}}
;"
>
<AppFormDruipart
v-show=
"state.detailsModel.
{{
item
.
codeName
}}
.visible"
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
>
<
{{
item
.
psAppView
.
codeName
}}
:class
="['
app-view-layout--from-druipart
']"
:context=
"druipartParams.context"
:viewParams=
"druipartParams.viewParams"
:viewDefaultUsage=
"false"
:noViewCaption=
"true"
@
viewEvent=
"druipartParams.viewEvent"
>
</
{{
item
.
psAppView
.
codeName
}}
>
</AppFormDruipart>
</div>
{{else}}
<a-col
{{>
@macro
/
front-end
/
widgets
/
common
/
layout-pos
.
hbs
item
=
item
.
psLayoutPos
}}
>
<AppFormDruipart
v-show=
"state.detailsModel.
{{
item
.
codeName
}}
.visible"
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
>
<
{{
item
.
psAppView
.
codeName
}}
:class
="['
app-view-layout--from-druipart
']"
:context=
"druipartParams.context"
:viewParams=
"druipartParams.viewParams"
:viewDefaultUsage=
"false"
:noViewCaption=
"true"
@
viewEvent=
"druipartParams.viewEvent"
>
</
{{
item
.
psAppView
.
codeName
}}
>
</AppFormDruipart>
</a-col>
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/grid-detail/grid-column.hbs
浏览文件 @
f5b850f7
...
...
@@ -28,7 +28,7 @@
mode=
"link"
name=
"
{{
lowerCase
item
.
codeName
}}
"
:actionModel=
"record.
{{
lowerCase
item
.
codeName
}}
"
@
onToolbarEvent=
"
($event: IActionParam) => onToolbarEvent(record, $event
)"
/>
@
onToolbarEvent=
"
onToolbarEvent($event, record
)"
/>
{{/if}}
</div>
{{/
unless
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/app.ts
浏览文件 @
f5b850f7
import
{
Environment
}
from
"@/environments/environment"
;
import
{
OpenViewService
}
from
"@/utils"
;
import
{
AppBase
,
IParam
,
ViewDetail
,
IApp
,
IOpenViewService
,
deepCopy
,
getSessionStorage
,
Http
,
AppUtil
}
from
"@core"
;
import
{
AppBase
,
IParam
,
ViewDetail
,
IApp
,
IOpenViewService
,
deepCopy
,
getSessionStorage
,
Http
,
AppUtil
,
NavDataService
,
INavDataService
}
from
"@core"
;
import
{
SyncSeriesHook
}
from
"qx-util"
;
import
{
AppFuncConfig
,
AppViewConfig
}
from
'./config'
;
import
{
AppFuncConfig
,
AppViewConfig
,
AppEntityConfig
}
from
'./config'
;
import
{
DataServiceRegister
,
UIServiceRegister
}
from
"./register"
;
export
class
App
extends
AppBase
implements
IApp
{
...
...
@@ -131,4 +131,24 @@ export class App extends AppBase implements IApp {
return
AppViewConfig
[
codeName
]
?
(
deepCopy
(
AppViewConfig
[
codeName
])
as
ViewDetail
)
:
undefined
;;
}
/**
* 获取实体信息
*
* @static
* @param codeName 实体codeName
* @return {*}
*/
public
getEntityInfo
(
codeName
:
string
):
any
{
return
AppEntityConfig
[
codeName
]
?
deepCopy
(
AppEntityConfig
[
codeName
])
:
undefined
;
}
/**
* @description 获取导航数据服务
* @return {*} {*}
* @memberof App
*/
public
getNavDataService
():
INavDataService
{
return
NavDataService
.
getInstance
();
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/config/app-entity-config.ts.hbs
0 → 100644
浏览文件 @
f5b850f7
import { IParam } from "@core";
export const AppEntityConfig:IParam = {
{{#
each
app
.
appEntitiesMap
as
|
appEntity
|
}}
"
{{
appEntity
.
codeName
}}
":{
"name": "
{{
appEntity
.
name
}}
",
"codeName": "
{{
appEntity
.
codeName
}}
",
"majorField":"
{{
appEntity
.
majorField
}}
",
"keyField":"
{{
appEntity
.
keyField
}}
"
}
{{#
unless
@last
}}
,
{{/
unless
}}
{{/
each
}}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/config/app-view-config.ts.hbs
浏览文件 @
f5b850f7
...
...
@@ -16,6 +16,12 @@ export const AppViewConfig:IParam = {
"parameters": [
{ "pathName": "views", "parameterName": "
{{
lowerCase
appView
.
codeName
}}
" }
],
{{#if
(
gt
appView
.
height
0
)
}}
"height":
{{
appView
.
height
}}
,
{{/if}}
{{#if
(
gt
appView
.
width
0
)
}}
"width":
{{
appView
.
width
}}
,
{{/if}}
{{#if
appView
.
capPSLanguageRes
}}
"captionTag": "
{{
appView
.
capPSLanguageRes
.
lanResTag
}}
",
{{/if}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/config/index.ts
浏览文件 @
f5b850f7
export
{
AppFuncConfig
}
from
'./app-func-config'
;
export
{
AppViewConfig
}
from
'./app-view-config'
;
export
{
AppCodeListConfig
}
from
'./app-code-list-config'
;
export
{
AppEntityConfig
}
from
'./app-entity-config'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/app-grid-view-layout.vue
浏览文件 @
f5b850f7
...
...
@@ -20,6 +20,7 @@
<
template
v-slot:header-bottom
>
<slot
name=
"quickSearchForm"
/>
<slot
name=
"searchForm"
/>
<slot
name=
"searchBar"
/>
</
template
>
<
template
v-slot:body-top
>
<slot
name=
"bodyMessage"
/>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/app-filter-tree.vue
0 → 100644
浏览文件 @
f5b850f7
<
script
setup
lang=
"ts"
>
import
{
IActionParam
,
IParam
}
from
"@core"
;
interface
FilterTreeProps
{
datas
:
any
[]
fields
:
any
[]
}
const
props
=
withDefaults
(
defineProps
<
FilterTreeProps
>
(),
{
});
onMounted
(()
=>
{
console
.
log
(
props
)
});
</
script
>
<
template
>
<div
class=
"app-filter-tree"
>
暂未支持
</div>
</
template
>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/app-form-druipart.vue
0 → 100644
浏览文件 @
f5b850f7
<
script
setup
lang=
"ts"
>
import
{
IActionParam
,
IParam
,
RouteUtil
}
from
'@core'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
interface
FormDruipartProps
{
// 关联视图
viewName
:
string
;
// 刷新关系项
tempMode
:
string
;
// 禁止加载
isForbidLoad
:
string
;
// 传入参数项名称
paramItem
:
string
;
// 视图上下文
context
:
string
;
// 视图参数
viewParams
:
boolean
;
// 应用实体参数名称
parentName
:
number
;
// 应用实体映射实体名称
parentDeName
:
boolean
;
// 标题
title
:
string
;
// 刷新关系项
refreshItems
:
string
;
// 表单数据
data
:
string
;
// 表单订阅对象
formState
:
Subject
<
any
>
;
// 视图路由参数
parameters
:
any
[];
// 名称
name
:
string
;
// 是否忽略表单项值变化
ignoreFieldValueChange
:
boolean
;
}
interface
FormDruipartEmit
{
(
name
:
'componentEvent'
,
value
:
IActionParam
):
void
;
}
const
props
=
withDefaults
(
defineProps
<
FormDruipartProps
>
(),
{});
const
emit
=
defineEmits
<
FormDruipartEmit
>
();
let
formStateEvent
:
undefined
|
Subscription
=
undefined
;
const
formDruipart
:
Subject
<
any
>
=
new
Subject
<
any
>
();
// 关秀界面上下文
let
druipartContext
:
any
=
undefined
;
// 关秀界面视图参数
let
druipartViewParams
:
any
=
undefined
;
onBeforeMount
(()
=>
{
watch
(
()
=>
props
.
data
,
(
newVal
:
any
,
oldVal
:
any
)
=>
{
if
(
props
.
ignoreFieldValueChange
)
{
return
;
}
if
(
Object
.
is
(
newVal
,
oldVal
))
{
return
;
}
refreshDRUIPart
();
},
);
druipartInit
();
});
// 关系界面初始化
const
druipartInit
=
()
=>
{
if
(
!
props
.
formState
)
{
return
;
}
formStateEvent
=
props
.
formState
.
subscribe
((
$event
:
any
)
=>
{
// 表单加载完成
if
(
Object
.
is
(
$event
.
type
,
'load'
))
{
refreshDRUIPart
(
$event
.
data
);
}
});
};
// 刷新关系界面
const
refreshDRUIPart
=
(
data
?:
any
)
=>
{
// const formData: any = data ? data : JSON.parse(props.data);
// const _paramItem = formData[props.paramItem];
// let tempContext: any = {};
// let tempParam: any = {};
// const _parameters: any[] = [RouteUtil.getIndexViewParam(), ...props.parameters];
// _parameters.forEach((parameter: any) => {
// const { pathName, parameterName }: { pathName: string; parameterName: string } = parameter;
// if (formData[parameterName] && !Object.is(formData[parameterName], '')) {
// Object.assign(tempContext, {
// [parameterName]: formData[parameterName],
// });
// }
// });
// Object.assign(tempContext, { [props.paramItem]: _paramItem });
// //设置顶层视图唯一标识
// Object.assign(tempContext, props.context);
// Object.assign(tempContext, {
// srfParentDeName: props.parentName,
// srfParentDeMapName: props.parentDeName,
// srfParentKey: _paramItem,
// });
// Object.assign(tempParam, {
// srfParentDeName: props.parentName,
// srfParentDeMapName: props.parentDeName,
// srfParentKey: _paramItem,
// });
// 设置局部上下文
formDruipart
.
next
({
action
:
'load'
});
};
const
viewEvent
=
(
action
:
any
)
=>
{
};
</
script
>
<
template
>
<a-card
:class=
"['app-form-druipart', `app-form-druipart-$
{name}`]" :bordered="false">
<template
#
title
>
<p
:class=
"['app-form-druipart-title']"
>
<AppIconText
:text=
"title"
/>
</p>
</
template
>
<slot
:context=
"druipartContext"
:viewParams=
"druipartViewParams"
:viewEvent=
"viewEvent"
></slot>
</a-card>
</template>
<
style
lang=
"scss"
>
.app-form-druipart
{
height
:
100%
;
width
:
100%
;
.ant-card-head
{
text-align
:
left
;
.app-form-druipart-title
{
margin
:
0px
;
}
}
.app-view-layout--from-druipart
{
padding
:
0
;
}
}
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/app/i-app.ts
浏览文件 @
f5b850f7
import
{
IParam
,
ViewDetail
}
from
"../common"
;
import
{
IAppFuncService
,
IDataServiceRegister
,
IOpenViewService
,
IUIServiceRegister
}
from
"../service"
;
import
{
IAppFuncService
,
IDataServiceRegister
,
I
NavDataService
,
I
OpenViewService
,
IUIServiceRegister
}
from
"../service"
;
/**
...
...
@@ -72,6 +72,17 @@ export interface IApp {
*/
getViewInfo
(
codeName
:
string
):
ViewDetail
|
undefined
;
/**
* 获取实体信息
*
* @static
* @param codeName 实体codeName
* @return {*}
*/
getEntityInfo
(
codeName
:
string
):
any
;
/**
* 获取应用数据
*
...
...
@@ -86,6 +97,13 @@ export interface IApp {
* @param {IParam} opt
* @memberof IApp
*/
setAppData
(
opt
:
IParam
):
void
;
setAppData
(
opt
:
IParam
):
void
;
/**
* @description 获取导航数据服务
* @return {*} {INavDataService}
* @memberof IApp
*/
getNavDataService
():
INavDataService
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/service/i-nav-data-service.ts
0 → 100644
浏览文件 @
f5b850f7
import
{
INavDataParam
,
IParam
,
ViewDetail
}
from
"@core"
;
import
{
Subject
}
from
'rxjs'
;
/**
* @description 打开视图服务接口
* @export
* @interface INavDataService
*/
export
interface
INavDataService
{
addNavData
(
curNavData
:
INavDataParam
):
void
;
getNavData
():
Array
<
INavDataParam
>
;
getPreNavData
(
tag
:
string
):
INavDataParam
|
null
;
skipNavData
(
tag
:
string
):
void
;
removeNavData
(
tag
:
string
):
void
;
removeNavDataFirst
():
void
;
removeNavDataLast
():
void
;
removeAllNavData
():
void
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/service/index.ts
浏览文件 @
f5b850f7
...
...
@@ -3,3 +3,4 @@ export * from './i-app-action-service';
export
*
from
'./i-open-view-service'
;
export
*
from
'./i-data-service-register'
;
export
*
from
'./i-ui-service-register'
;
export
*
from
'./i-nav-data-service'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/logic/app-ui-action/app-action-base.ts
浏览文件 @
f5b850f7
import
{
AppActionService
,
IContext
,
IParam
}
from
"@core"
;
import
{
AppActionService
,
IContext
,
IParam
,
UIActionUtil
}
from
"@core"
;
export
interface
ActionParams
{
/**
...
...
@@ -60,7 +60,7 @@ export class AppActionBase {
* @memberof AppActionBase
*/
public
static
async
getUIService
(
actionEnvironment
:
IParam
)
{
const
entityName
=
actionEnvironment
?.
viewS
tate
?.
appEntityName
;
const
entityName
=
actionEnvironment
?.
s
tate
?.
appEntityName
;
if
(
!
entityName
)
{
console
.
log
(
"实体名称不存在"
);
return
;
...
...
@@ -76,13 +76,48 @@ export class AppActionBase {
/**
* 根据数据目标处理行为参数
*
* @param {string}
ActionTarget
* @param {string}
action
* @param { context: IContext, viewParams: IParam, data: IParam, event: MouseEvent, actionEnvironment: IParam } params
* @memberof AppFrontAction
*/
public
static
handleActionTarget
(
ActionTarget
:
string
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
}):
IParam
{
// todo
return
{};
public
static
handleActionTarget
(
action
:
IParam
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
}):
ActionParams
{
const
{
actionTarget
,
entityCodeName
}
=
action
;
const
{
data
}
=
params
;
// 数据目标值
let
resultData
:
ActionParams
=
{
context
:
{},
viewParams
:
{},
data
:
{}
};
switch
(
actionTarget
)
{
case
'SINGLEKEY'
:
case
'MULTIKEY'
:
// 多数据主键和单数据主键,合并实体的主键参数和主信息参数 到上下文 后续统一合并进数据目标值
if
(
!
entityCodeName
)
{
console
.
log
(
"实体名称不存在"
);
break
;
}
const
entity
=
App
.
getEntityInfo
(
entityCodeName
);
if
(
!
entity
)
{
console
.
log
(
"实体不存在"
);
break
;
}
const
entityName
=
entityCodeName
.
toLowerCase
();
const
keyField
=
entity
.
keyField
.
toLowerCase
();
const
majorField
=
entity
.
majorField
.
toLowerCase
();
if
(
data
?.[
0
]?.[
keyField
])
{
Object
.
assign
(
resultData
.
context
,
{
[
entityName
]:
`%
${
keyField
}
%`
});
}
else
{
Object
.
assign
(
resultData
.
context
,
{
[
entityName
]:
`%
${
entityName
}
%`
});
}
Object
.
assign
(
resultData
.
viewParams
,
{
[
keyField
]:
`%
${
keyField
}
%`
});
Object
.
assign
(
resultData
.
viewParams
,
{
[
majorField
]:
`%
${
majorField
}
%`
});
break
;
case
'SINGLEDATA'
:
resultData
.
data
=
data
?.[
0
]?
data
?.[
0
]:{};
break
;
}
return
resultData
;
}
/**
...
...
@@ -93,9 +128,39 @@ export class AppActionBase {
* @param { context: IContext, viewParams: IParam, data: IParam, event: MouseEvent, actionEnvironment: IParam } params
* @memberof AppFrontAction
*/
public
static
handleActionParam
(
uiAction
:
IParam
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
},
data
:
IParam
):
ActionParams
{
// todo
return
{
context
:
{},
viewParams
:
{},
data
:
{}
};
public
static
handleActionParam
(
uiAction
:
IParam
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
},
data
:
ActionParams
):
ActionParams
{
const
{
navContexts
,
navParams
,
actionTarget
}
=
uiAction
;
const
{
viewParams
,
context
,
data
:
_data
}
=
params
;
const
{
context
:
tempContext
,
viewParams
:
tempViewParams
,
}
=
data
;
let
{
data
:
resultData
}
=
data
;
// 合并导航参数和导航上下文至数据目标处理后的参数
Object
.
assign
(
tempContext
,
navContexts
);
Object
.
assign
(
tempViewParams
,
navParams
);
// 根据上下文和导航参数,解析参数
const
_context
=
UIActionUtil
.
formatDataActionData
(
actionTarget
,
_data
,
context
,
viewParams
,
tempContext
);
const
_viewParams
=
UIActionUtil
.
formatDataActionData
(
actionTarget
,
_data
,
context
,
viewParams
,
tempViewParams
);
if
(
Object
.
is
(
actionTarget
,
'SINGLEDATA'
))
{
Object
.
assign
(
resultData
,
_viewParams
);
}
else
{
resultData
=
_viewParams
;
}
// 多项数据主键转换数据
if
(
Object
.
is
(
actionTarget
,
'MULTIKEY'
))
{
let
tempDataArray
:
Array
<
any
>
=
[];
if
(
_data
.
length
>
1
&&
Object
.
keys
(
data
).
length
>
0
)
{
for
(
let
i
=
0
;
i
<
_data
.
length
;
i
++
)
{
let
tempObject
:
any
=
{};
Object
.
keys
(
resultData
).
forEach
((
key
:
string
)
=>
{
Object
.
assign
(
tempObject
,
{
[
key
]:
resultData
[
key
].
split
(
','
)[
i
]
});
});
tempDataArray
.
push
(
tempObject
);
}
}
else
{
tempDataArray
.
push
(
data
);
}
resultData
=
tempDataArray
;
}
return
{
context
:
_context
,
viewParams
:
_viewParams
,
data
:
resultData
};
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/logic/app-ui-action/app-backend-action.ts
浏览文件 @
f5b850f7
...
...
@@ -16,14 +16,14 @@ export class AppBackendAction extends AppActionBase {
*/
public
static
async
doBackendAction
(
uiAction
:
IParam
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
},
actionParams
:
ActionParams
):
Promise
<
UIActionResult
>
{
try
{
const
{
context
,
actionEnvironment
}
=
params
;
const
entityName
=
actionEnvironment
?.
viewState
?.
appEntityName
;
const
{
actionEnvironment
}
=
params
;
const
{
context
}
=
actionParams
;
const
entityName
=
actionEnvironment
?.
state
?.
appEntityName
;
if
(
!
entityName
)
{
console
.
log
(
"实体名称不存在"
);
return
{
ok
:
false
,
result
:
null
};
}
const
methodCodeName
:
string
=
uiAction
.
methodCodeName
;
if
(
!
methodCodeName
)
{
console
.
log
(
"实体行为不存在"
);
return
{
ok
:
false
,
result
:
null
};
...
...
@@ -31,7 +31,7 @@ export class AppBackendAction extends AppActionBase {
// 获取实体服务
const
dataService
=
await
App
.
getDataService
(
entityName
.
toLowerCase
(),
context
)
// 获取实体行为名称
const
response
=
await
dataService
[
methodCodeName
](
context
,
actionParams
);
const
response
=
await
dataService
[
methodCodeName
](
context
,
actionParams
.
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
if
(
response
&&
response
.
ok
)
{
this
.
doSuccessMessage
(
uiAction
);
...
...
@@ -112,7 +112,7 @@ export class AppBackendAction extends AppActionBase {
/**
* 执行
前
台行为
* 执行
后
台行为
*
* @param {IParam} uiAction
* @memberof AppFrontAction
...
...
@@ -125,7 +125,7 @@ export class AppBackendAction extends AppActionBase {
// 消息确认提示
this
.
doConfirmMessage
(
uiAction
);
// 根据行为目标 合并行为参数
const
data
=
this
.
handleActionTarget
(
uiAction
.
actionTarget
,
params
);
const
data
=
this
.
handleActionTarget
(
uiAction
,
params
);
// 处理行为参数 导航参数、数据项、信息项、参数项
const
actionParams
=
this
.
handleActionParam
(
uiAction
,
params
,
data
);
// 执行行为
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/logic/app-ui-action/app-front-action.ts
浏览文件 @
f5b850f7
...
...
@@ -19,8 +19,8 @@ export class AppFrontAction extends AppActionBase {
*/
public
static
openView
(
uiAction
:
IParam
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
},
actionParams
:
ActionParams
):
Promise
<
UIActionResult
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
{
context
,
viewParams
}
=
params
;
const
{
frontPSAppView
}
=
uiAction
;
const
{
context
,
viewParams
,
data
}
=
actionParams
;
if
(
!
frontPSAppView
)
{
console
.
log
(
"模型视图名称不存在"
);
return
reject
({
ok
:
false
,
result
:
null
});
...
...
@@ -103,7 +103,7 @@ export class AppFrontAction extends AppActionBase {
return
this
.
executeUILogic
(
uiAction
,
params
);
}
// 根据行为目标 合并行为参数
const
data
=
this
.
handleActionTarget
(
uiAction
.
actionTarget
,
params
);
const
data
=
this
.
handleActionTarget
(
uiAction
,
params
);
// 处理行为参数 导航参数、数据项、信息项、参数项
const
actionParams
=
this
.
handleActionParam
(
uiAction
,
params
,
data
);
// 执行行为
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/app/app-base.ts
浏览文件 @
f5b850f7
import
{
AppFuncService
,
IApp
,
IAppFuncService
,
IOpenViewService
,
ViewDetail
}
from
"@core"
;
import
{
IDataServiceRegister
,
IParam
,
IUIServiceRegister
}
from
"@core/interface"
;
import
{
IDataServiceRegister
,
I
NavDataService
,
I
Param
,
IUIServiceRegister
}
from
"@core/interface"
;
/**
* 应用基类
...
...
@@ -120,4 +120,13 @@ export abstract class AppBase implements IApp {
public
getViewInfo
(
codeName
:
string
):
ViewDetail
|
undefined
{
return
undefined
;
}
/**
* @description 获取导航数据服务
* @return {*} {INavDataService}
* @memberof AppBase
*/
public
getNavDataService
():
INavDataService
{
throw
new
Error
(
"Method not implemented."
);
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/grid-view/grid-view.ts
浏览文件 @
f5b850f7
...
...
@@ -41,12 +41,12 @@ public declare state: GridViewState;
* @param {IActionParam} actionParam
* @memberof MDView
*/
public
handle
CtrlEvent
(
actionParam
:
IActionParam
)
{
public
on
CtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
if
(
Object
.
is
(
tag
,
'grid'
))
{
this
.
MDCtrlEvent
(
action
,
data
);
}
super
.
handle
CtrlEvent
(
actionParam
);
super
.
on
CtrlEvent
(
actionParam
);
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
浏览文件 @
f5b850f7
...
...
@@ -66,7 +66,7 @@ export class MDView extends MainView {
* @param {IActionParam} actionParam
* @memberof MDView
*/
public
handle
CtrlEvent
(
actionParam
:
IActionParam
)
{
public
on
CtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
if
(
Object
.
is
(
tag
,
'searchform'
))
{
this
.
handleSearchFormEvent
(
action
,
data
);
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-grid-view/pickup-grid-view.ts
浏览文件 @
f5b850f7
...
...
@@ -38,7 +38,7 @@ export class PickupGridView extends PickupView {
* @param {IActionParam} actionParam
* @memberof PickupGridView
*/
public
handle
CtrlEvent
(
actionParam
:
IActionParam
)
{
public
on
CtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
if
(
tag
!==
'grid'
)
{
return
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
浏览文件 @
f5b850f7
...
...
@@ -49,7 +49,7 @@ export class PickupView extends MainView {
this
.
emit
(
'viewEvent'
,
{
data
:
this
.
selectData
,
tag
:
''
,
action
:
'close'
})
}
public
handle
CtrlEvent
(
actionParam
:
IActionParam
)
{
public
on
CtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
// TODO
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/view-base/view-base.ts
浏览文件 @
f5b850f7
...
...
@@ -194,7 +194,19 @@ export class ViewBase {
*
* @memberof ViewBase
*/
public
useViewInit
()
{
}
public
useViewInit
()
{
const
route
=
useRoute
();
App
.
getNavDataService
().
addNavData
({
title
:
this
.
state
.
viewCaption
,
viewType
:
this
.
state
.
viewType
,
path
:
unref
(
route
.
fullPath
),
openType
:
this
.
props
.
openType
,
tag
:
this
.
state
.
viewCodeName
,
key
:
''
,
data
:
{}});
}
/**
* @description 视图销毁
* @memberof ViewBase
*/
public
useViewDestroyed
()
{
// 视图销毁从导航栈里面删除数据
App
.
getNavDataService
().
removeNavData
(
this
.
state
.
viewCodeName
);
}
/**
* @description 安装视图所有功能模块的方法
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/exp-bar-control/exp-bar-control.ts
浏览文件 @
f5b850f7
...
...
@@ -21,7 +21,7 @@ export class ExpBarControl extends MainControl {
* @param {IActionParam} actionParam
* @memberof ExpBarControl
*/
public
handle
CtrlEvent
(
actionParam
:
IActionParam
)
{
public
on
CtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
const
{
selection
}
=
this
.
state
;
switch
(
action
)
{
...
...
@@ -73,7 +73,7 @@ export class ExpBarControl extends MainControl {
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
handleCtrlEvent
:
this
.
handle
CtrlEvent
.
bind
(
this
)
onCtrlEvent
:
this
.
on
CtrlEvent
.
bind
(
this
)
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/form-control/form-control.ts
浏览文件 @
f5b850f7
import
{
DataTypes
,
dateFormat
,
deepCopy
,
FormControlProps
,
FormControlState
,
IActionParam
,
IParam
,
MainControl
,
UIUtil
,
verifyValue
}
from
'@core'
;
import
{
DataTypes
,
dateFormat
,
deepCopy
,
FormControlProps
,
FormControlState
,
IActionParam
,
IParam
,
MainControl
,
UIUtil
,
verifyValue
,
}
from
'@core'
;
/**
* @description 表单部件
...
...
@@ -28,12 +39,12 @@ export class FormControl extends MainControl {
if
(
logic
.
groupOP
==
'AND'
)
{
const
falseItem
=
logic
.
logics
.
find
((
childLogic
:
IParam
)
=>
{
return
!
this
.
verifyGroupLogic
(
data
,
childLogic
);
})
})
;
result
=
falseItem
?
false
:
true
;
}
else
if
(
logic
.
groupOP
==
'OR'
)
{
const
trueItem
=
logic
.
logics
.
find
((
childLogic
:
IParam
)
=>
{
return
this
.
verifyGroupLogic
(
data
,
childLogic
);
})
})
;
result
=
trueItem
?
true
:
false
;
}
// 是否取反
...
...
@@ -62,7 +73,7 @@ export class FormControl extends MainControl {
this
.
formItemUpdate
(
name
);
this
.
formDynamicLogic
(
name
);
if
(
enableAutoSave
)
{
this
.
useSave
().
save
();
this
.
save
();
}
}
...
...
@@ -80,7 +91,7 @@ export class FormControl extends MainControl {
this
.
handleFormDataChange
(
item
.
valueItemName
,
null
);
}
}
})
})
;
}
/**
...
...
@@ -110,7 +121,7 @@ export class FormControl extends MainControl {
if
(
data
.
value
.
hasOwnProperty
(
detailsName
))
{
data
.
value
[
detailsName
]
=
response
.
data
[
detailsName
];
}
})
})
;
this
.
afterFormAction
(
'formItemUpdate'
);
}
}
...
...
@@ -284,12 +295,14 @@ export class FormControl extends MainControl {
data
.
value
[
detail
.
codeName
]
=
controlService
.
getRemoteCopyData
()?.[
detail
.
codeName
]
||
null
;
break
;
default
:
data
.
value
[
detail
.
codeName
]
=
DataTypes
.
isNumber
(
detail
.
dataType
)
?
Number
(
detail
?.
createDV
)
:
detail
?.
createDV
;
data
.
value
[
detail
.
codeName
]
=
DataTypes
.
isNumber
(
detail
.
dataType
)
?
Number
(
detail
?.
createDV
)
:
detail
?.
createDV
;
break
;
}
}
}
})
})
;
}
/**
...
...
@@ -325,14 +338,24 @@ export class FormControl extends MainControl {
data
.
value
[
detail
.
codeName
]
=
controlService
.
getRemoteCopyData
()?.[
detail
.
codeName
]
||
null
;
break
;
default
:
data
.
value
[
detail
.
codeName
]
=
DataTypes
.
isNumber
(
detail
.
dataType
)
?
Number
(
detail
.
updateDV
)
:
detail
.
updateDV
;
data
.
value
[
detail
.
codeName
]
=
DataTypes
.
isNumber
(
detail
.
dataType
)
?
Number
(
detail
.
updateDV
)
:
detail
.
updateDV
;
break
;
}
}
}
})
})
;
}
/**
* 加载草稿行为
*
* @protected
* @param [opt={}]
*/
protected
async
loadDraft
(
opt
:
any
=
{})
{}
/**
* @description 使用加载草稿功能模块
* @param {FormControlProps} props 传入的props
...
...
@@ -371,6 +394,10 @@ export class FormControl extends MainControl {
console
.
log
(
error
);
}
};
// 在类里绑定能力方法
this
.
loadDraft
=
loadDraft
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
@@ -378,14 +405,23 @@ export class FormControl extends MainControl {
loadDraft
(
data
);
}
});
// 部件卸载时退订viewSubject
onUnmounted
(()
=>
{
subscription
.
unsubscribe
();
});
}
return
{
loadDraft
}
;
return
loadDraft
;
}
/**
* 加载行为
*
* @protected
* @param [opt={}]
*/
protected
async
load
(
opt
:
any
=
{})
{}
/**
* @description 使用加载功能模块
* @return {*}
...
...
@@ -427,6 +463,9 @@ export class FormControl extends MainControl {
}
};
// 在类里绑定能力方法
this
.
load
=
load
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
@@ -441,11 +480,17 @@ export class FormControl extends MainControl {
});
}
return
{
load
:
load
,
};
return
load
;
}
/**
* 保存行为
*
* @protected
* @param [opt={}]
*/
protected
async
save
(
opt
:
any
=
{})
{}
/**
* @description 使用加载功能模块
* @return {*}
...
...
@@ -482,19 +527,14 @@ export class FormControl extends MainControl {
Object
.
assign
(
arg
,
data
.
getDo
());
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
});
// TODO 关系界面保存通知处理,做成异步。
// TODO 拷贝相关。
// 发起请求处理与解析请求
const
response
=
await
controlService
[
saveFunName
](
_context
,
arg
,
{
const
response
=
await
controlService
[
saveFunName
](
_context
,
arg
,
{
action
:
saveAction
,
isLoading
:
showBusyIndicator
,
},
);
});
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
// TODO 统一Error格式
return
;
...
...
@@ -510,6 +550,9 @@ export class FormControl extends MainControl {
}
};
// 在类里绑定能力方法
this
.
save
=
save
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
@@ -523,11 +566,17 @@ export class FormControl extends MainControl {
});
}
return
{
save
:
save
,
};
return
save
;
}
/**
* 删除行为
*
* @protected
* @param [opt={}]
*/
protected
async
remove
(
opt
:
any
=
{})
{}
/**
* @description 使用加载功能模块
* @param {FormControlProps} props 传入的props
...
...
@@ -558,17 +607,13 @@ export class FormControl extends MainControl {
let
_context
=
deepCopy
(
context
);
let
_viewParams
=
deepCopy
(
viewParams
);
const
arg
:
any
=
opt
[
0
];
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
}
,
);
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
});
// 发起请求处理与解析请求
const
response
=
await
controlService
.
remove
(
_context
,
arg
,
{
const
response
=
await
controlService
.
remove
(
_context
,
arg
,
{
action
:
removeAction
,
isLoading
:
showBusyIndicator
},
);
isLoading
:
showBusyIndicator
,
});
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
return
;
}
...
...
@@ -581,6 +626,9 @@ export class FormControl extends MainControl {
}
};
// 在类里绑定能力方法
this
.
remove
=
remove
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
@@ -595,9 +643,7 @@ export class FormControl extends MainControl {
});
}
return
{
remove
:
remove
,
};
return
remove
;
}
/**
...
...
@@ -639,7 +685,7 @@ export class FormControl extends MainControl {
* @memberof FormControl
*/
public
handleFormGroupAction
(
tag
:
string
,
data
:
any
)
{
console
.
log
(
tag
,
data
)
console
.
log
(
tag
,
data
)
;
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
f5b850f7
...
...
@@ -55,16 +55,16 @@ export class GridControl extends MDControl {
if
(
!
rowEditState
)
{
selectedRowKeys
.
value
=
[
record
.
srfkey
];
if
(
!
record
.
children
)
{
this
.
emit
(
"
onCtrlEvent"
,
{
tag
:
controlN
ame
,
action
:
"selectionChange"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"
ctrlEvent"
,
{
tag
:
this
.
props
.
n
ame
,
action
:
"selectionChange"
,
data
:
[
deepCopy
(
record
)]
})
if
(
Object
.
is
(
rowActiveMode
,
1
))
{
this
.
emit
(
"
onCtrlEvent"
,
{
tag
:
controlN
ame
,
action
:
"rowClick"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"
ctrlEvent"
,
{
tag
:
this
.
props
.
n
ame
,
action
:
"rowClick"
,
data
:
[
deepCopy
(
record
)]
})
}
}
}
},
onDblclick
:
()
=>
{
if
(
!
record
.
children
&&
Object
.
is
(
rowActiveMode
,
2
))
{
this
.
emit
(
"
onCtrlEvent"
,
{
tag
:
controlN
ame
,
action
:
"rowDbClick"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"
ctrlEvent"
,
{
tag
:
this
.
props
.
n
ame
,
action
:
"rowDbClick"
,
data
:
[
deepCopy
(
record
)]
})
}
}
};
...
...
@@ -86,7 +86,7 @@ export class GridControl extends MDControl {
selection
.
push
(
select
);
}
})
this
.
emit
(
"
onCtrlEvent"
,
{
tag
:
controlN
ame
,
action
:
"selectionChange"
,
data
:
selection
})
this
.
emit
(
"
ctrlEvent"
,
{
tag
:
this
.
props
.
n
ame
,
action
:
"selectionChange"
,
data
:
selection
})
},
};
});
...
...
@@ -97,7 +97,7 @@ export class GridControl extends MDControl {
// 处理表格变化(分页,过滤,排序)
const
onGridChange
=
(
pagination
:
IParam
,
filters
:
IParam
,
sorter
:
IParam
,
data
:
IParam
)
=>
{
if
(
pagination
)
{
this
.
useLoad
().
load
();
this
.
load
();
}
}
return
{
...
...
@@ -116,7 +116,7 @@ export class GridControl extends MDControl {
* @param {IActionParam} actionParam 行为参数
* @memberof GridControl
*/
public
onEditorEvent
(
rowIndex
:
number
,
actionParam
:
IActionParam
)
{
public
onEditorEvent
(
actionParam
:
IActionParam
,
rowIndex
:
number
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
switch
(
action
)
{
case
"valueChange"
:
...
...
@@ -131,6 +131,16 @@ export class GridControl extends MDControl {
}
}
/**
* @description 操作列事件触发
* @param {IActionParam} action
* @param {IParam} record
* @memberof GridControl
*/
public
onToolbarEvent
(
action
:
IActionParam
,
record
:
IParam
)
{
//todo 界面行为
}
/**
* @description 处理表格操作列事件
* @param {IActionParam} actionParam 行为参数
...
...
@@ -179,8 +189,8 @@ export class GridControl extends MDControl {
selectedRowKeys
.
value
=
_selectedRowKeys
;
}
else
if
(
isSelectDefault
)
{
if
(
items
&&
items
.
length
>
0
)
{
this
.
emit
(
"
onC
trlEvent"
,
{
tag
:
controlN
ame
,
this
.
emit
(
"
c
trlEvent"
,
{
tag
:
this
.
props
.
n
ame
,
action
:
"selectionChange"
,
data
:
[
deepCopy
(
items
[
0
])],
});
...
...
@@ -433,6 +443,7 @@ export class GridControl extends MDControl {
...
superParams
,
useCustom
:
this
.
useCustom
(),
onEditorEvent
:
this
.
onEditorEvent
.
bind
(
this
),
onToolbarEvent
:
this
.
onToolbarEvent
.
bind
(
this
)
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/index.ts
浏览文件 @
f5b850f7
...
...
@@ -10,3 +10,4 @@ export * from './tree-exp-bar-control'
export
*
from
'./tree-control'
export
*
from
'./search-form-control'
export
*
from
'./quick-search-form-control'
export
*
from
'./searchbar-control'
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/md-control.ts
浏览文件 @
f5b850f7
此差异已折叠。
点击以展开。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/pickup-view-panel-control/pickup-view-panel-control.ts
浏览文件 @
f5b850f7
...
...
@@ -49,7 +49,7 @@ export class PickupViewPanelControl extends MainControl {
const
{
tag
,
action
,
data
}
=
actionParam
;
const
{
controlName
}
=
this
.
state
;
if
(
Object
.
is
(
"selectionChange"
,
action
))
{
this
.
emit
(
'ctrlEvent'
,
{
tag
:
controlN
ame
,
action
:
action
,
data
:
data
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
n
ame
,
action
:
action
,
data
:
data
});
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/quick-search-form-control/quick-search-form-control.ts
浏览文件 @
f5b850f7
...
...
@@ -21,8 +21,8 @@ export class QuickSearchFormControl extends FormControl {
*/
public
onEditorEvent
(
actionParam
:
IActionParam
)
{
super
.
onEditorEvent
(
actionParam
);
this
.
emit
(
"
onC
trlEvent"
,
{
tag
:
this
.
state
.
controlN
ame
,
this
.
emit
(
"
c
trlEvent"
,
{
tag
:
this
.
props
.
n
ame
,
action
:
"selectionChange"
,
data
:
this
.
state
.
data
,
});
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/search-form-control/search-form-control.ts
浏览文件 @
f5b850f7
...
...
@@ -19,9 +19,8 @@ export class SearchFormControl extends FormControl {
* @memberof SearchFormControl
*/
public
onSearch
()
{
const
{
controlName
}
=
this
.
state
;
this
.
emit
(
"onCtrlEvent"
,
{
tag
:
controlName
,
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
this
.
state
.
data
,
});
...
...
@@ -75,7 +74,6 @@ export class SearchFormControl extends FormControl {
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
// 表单行为能力启用
const
{
loadDraft
}
=
this
.
useLoadDraft
();
return
{
...
superParams
,
onSearch
:
this
.
onSearch
.
bind
(
this
),
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/searchbar-control/index.ts
0 → 100644
浏览文件 @
f5b850f7
export
*
from
'./searchbar-control-prop'
export
*
from
'./searchbar-control-state'
export
*
from
'./searchbar-control'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/searchbar-control/searchbar-control-prop.ts
0 → 100644
浏览文件 @
f5b850f7
import
{
IParam
,
MainControlProps
}
from
"@core"
;
/**
* @description 搜索栏部件的props
* @export
* @interface SearchBarControlProps
* @extends {MainControlProps}
*/
export
interface
SearchBarControlProps
extends
MainControlProps
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/searchbar-control/searchbar-control-state.ts
0 → 100644
浏览文件 @
f5b850f7
import
{
IParam
,
MainControlState
}
from
'@core'
;
/**
* @description 搜索栏部件状态
* @export
* @interface SearchBarControlState
* @extends {MainControlState}
*/
export
interface
SearchBarControlState
extends
MainControlState
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/searchbar-control/searchbar-control.ts
0 → 100644
浏览文件 @
f5b850f7
import
{
UIUtil
,
deepCopy
,
IActionParam
,
IParam
,
MainControl
,
SearchBarControlState
,
SearchBarControlProps
}
from
'@core'
;
/**
* @description 搜索栏部件
* @export
* @class SearchBarControl
* @extends {MainControl}
*/
export
class
SearchBarControl
extends
MainControl
{
/**
* @description 部件状态
* @type {SearchBarControlState}
* @memberof SearchBarControl
*/
public
declare
state
:
SearchBarControlState
;
/**
* @description
* @param {SearchBarControlProps} props
* @memberof SearchBarControl
*/
public
setState
(
props
:
SearchBarControlState
)
{
super
.
setState
(
props
);
this
.
state
.
filterFields
=
Object
.
values
(
this
.
state
.
detailsModel
);
this
.
state
.
filterItems
=
[];
}
/**
* @description 安装部件所有功能模块的方法
* @param {SearchBarControlProps} props
* @param {Function} [emit]
* @return {*}
* @memberof SearchBarControl [emit] 事件
*/
public
moduleInstall
(
props
:
SearchBarControlProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
return
{
...
superParams
,
state
:
this
.
state
,
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tree-control/tree-control.ts
浏览文件 @
f5b850f7
import
{
toRef
}
from
"vue"
;
import
{
deepCopy
,
deepObjectMerge
,
IActionParam
,
MainControl
}
from
"@core"
;
import
{
TreeControlProps
}
from
"./tree-control-prop"
;
import
{
TreeControlState
}
from
"./tree-control-state"
;
...
...
@@ -46,7 +45,7 @@ export class TreeControl extends MainControl {
currentselectedNode
.
value
=
e
.
node
;
if
(
!
multiple
)
{
selectedNodes
.
push
(
currentselectedNode
.
value
);
this
.
emit
(
"ctrlEvent"
,
{
tag
:
controlN
ame
,
action
:
'selectionchange'
,
data
:
deepCopy
(
selectedNodes
)
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
n
ame
,
action
:
'selectionchange'
,
data
:
deepCopy
(
selectedNodes
)
});
}
}
}
...
...
@@ -126,7 +125,7 @@ export class TreeControl extends MainControl {
const
isSelectedAll
=
node
.
checked
;
// TODO 默认选中
// this.setDefaultSelection(items, isRoot, isSelectedAll);
this
.
emit
(
"ctrlEvent"
,
{
tag
:
controlN
ame
,
action
:
"load"
,
data
:
items
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
n
ame
,
action
:
"load"
,
data
:
items
});
}
catch
(
error
)
{
console
.
error
(
error
);
}
...
...
@@ -143,9 +142,7 @@ export class TreeControl extends MainControl {
subscription
.
unsubscribe
();
})
}
return
{
load
};
return
load
;
}
/**
...
...
@@ -155,11 +152,10 @@ export class TreeControl extends MainControl {
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
const
{
load
}
=
this
.
useLoad
();
return
{
...
superParams
,
treeNodeSelect
:
this
.
treeNodeSelect
.
bind
(
this
),
load
load
:
this
.
useLoad
(),
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/service/common-service/index.ts
0 → 100644
浏览文件 @
f5b850f7
export
*
from
'./navdata-service'
;
export
*
from
'./navdata-param'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/service/common-service/navdata-param.ts
0 → 100644
浏览文件 @
f5b850f7
import
{
IParam
}
from
'@core'
;
export
interface
INavDataParam
{
/**
* @description 视图标题
* @type {*}
* @memberof INavDataParam
*/
title
:
string
;
/**
* @description 视图数据
* @type {*}
* @memberof INavDataParam
*/
data
:
IParam
;
/**
* @description 视图路径
* @type {string}
* @memberof INavDataParam
*/
path
:
string
;
/**
* @description 视图打开模式("ROUTE" | "MODAL" | "EMBED")
* @type {("ROUTE" | "MODAL" | "EMBED")}
* @memberof INavDataParam
*/
openType
:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
/**
* @description 视图类型
* @type {string}
* @memberof INavDataParam
*/
viewType
:
string
;
/**
* @description 视图标识
* @type {string}
* @memberof INavDataParam
*/
tag
:
string
;
/**
* @description 数据标识
* @type {*}
* @memberof INavDataParam
*/
key
:
string
;
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/service/common-service/navdata-service.ts
0 → 100644
浏览文件 @
f5b850f7
import
{
IActionParam
,
INavDataService
}
from
'@core'
;
import
{
Subject
}
from
'rxjs'
;
import
{
INavDataParam
}
from
'./navdata-param'
;
/**
* 导航数据服务
*
* @export
* @class CodeListService
*/
export
class
NavDataService
implements
INavDataService
{
/**
* 单例变量声明
*
* @private
* @static
* @type {NavDataService}
* @memberof NavDataService
*/
private
static
navDataService
:
NavDataService
;
/**
* 服务状态
*
* @memberof NavDataService
*/
public
serviceState
:
Subject
<
IActionParam
>
=
new
Subject
();
/**
* 导航数据栈
*
* @memberof NavDataService
*/
public
navDataStack
:
Array
<
INavDataParam
>
=
[];
/**
* 初始化实例
*
* @memberof NavDataService
*/
constructor
(
opts
:
any
=
{})
{
}
/**
* 获取 NavDataService 单例对象
*
* @static
* @returns {NavDataService}
* @memberof NavDataService
*/
public
static
getInstance
():
NavDataService
{
if
(
!
NavDataService
.
navDataService
)
{
NavDataService
.
navDataService
=
new
NavDataService
();
}
return
this
.
navDataService
;
}
/**
* 添加基础导航数据到栈中
*
* @memberof NavDataService
*/
public
addNavData
(
curNavData
:
INavDataParam
)
{
this
.
navDataStack
.
push
(
curNavData
);
}
/**
* 设置指定数据到基础导航数据栈中
*
* @memberof NavDataService
*/
public
setNavDataByTag
(
tag
:
string
,
isSingleMode
:
boolean
,
data
:
any
)
{
if
(
this
.
navDataStack
.
length
>
0
)
{
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
INavDataParam
)
=>
{
return
Object
.
is
(
element
.
tag
,
tag
);
})
if
(
this
.
navDataStack
[
tempIndex
]){
this
.
navDataStack
[
tempIndex
].
data
=
data
;
if
(
isSingleMode
&&
data
.
srfkey
&&
data
.
srfmajortext
)
{
this
.
navDataStack
[
tempIndex
].
key
=
data
.
srfkey
;
this
.
navDataStack
[
tempIndex
].
title
=
data
.
srfmajortext
;
}
return
this
.
navDataStack
[
tempIndex
];
}
else
{
return
null
;
}
}
else
{
return
null
;
}
}
/**
* 获取基础导航数据
*
* @memberof NavDataService
*/
public
getNavData
()
{
return
this
.
navDataStack
;
}
/**
* 从导航数据栈中获取指定数据的前一条数据
*
* @memberof NavDataService
*/
public
getPreNavData
(
tag
:
string
)
{
if
(
this
.
navDataStack
.
length
>
0
)
{
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
INavDataParam
)
=>
{
return
Object
.
is
(
element
.
tag
,
tag
);
})
return
this
.
navDataStack
[
tempIndex
-
1
];
}
else
{
return
null
;
}
}
/**
* 跳转到导航数据栈中指定数据
*
* @memberof NavDataService
*/
public
skipNavData
(
tag
:
string
)
{
if
((
this
.
navDataStack
.
length
>
0
)
&&
tag
)
{
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
INavDataParam
)
=>
{
return
Object
.
is
(
element
.
tag
,
tag
);
})
if
(
tempIndex
!==
-
1
)
{
this
.
navDataStack
=
this
.
navDataStack
.
slice
(
0
,
tempIndex
+
1
);
}
}
}
/**
* 从导航数据栈中指定数据
*
* @memberof NavDataService
*/
public
removeNavData
(
tag
:
string
)
{
if
((
this
.
navDataStack
.
length
>
0
)
&&
tag
)
{
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
INavDataParam
)
=>
{
return
Object
.
is
(
element
.
tag
,
tag
);
})
if
(
tempIndex
!==
-
1
)
{
this
.
navDataStack
=
this
.
navDataStack
.
slice
(
0
,
tempIndex
);
}
}
}
/**
* 从导航数据栈中删除仅剩第一条数据
*
* @memberof NavDataService
*/
public
removeNavDataFirst
()
{
if
(
this
.
navDataStack
.
length
>
0
)
{
this
.
navDataStack
=
this
.
navDataStack
.
slice
(
0
,
1
);
}
}
/**
* 从导航数据栈中删除最后一条数据
*
* @memberof NavDataService
*/
public
removeNavDataLast
()
{
if
(
this
.
navDataStack
.
length
>
0
)
{
this
.
navDataStack
.
pop
();
}
}
/**
* 从导航数据栈中删除所有数据
*
* @memberof NavDataService
*/
public
removeAllNavData
()
{
this
.
navDataStack
=
[];
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/service/index.ts
浏览文件 @
f5b850f7
export
*
from
'./control-service'
export
*
from
'./entity-service'
export
*
from
'./ui-service'
export
*
from
'./common-service'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/utils/ui/uiaction-util.ts
浏览文件 @
f5b850f7
...
...
@@ -21,7 +21,10 @@ export class UIActionUtil {
Object
.
is
(
actionTarget
,
'NONE'
)
||
Object
.
is
(
actionTarget
,
'SINGLEDATA'
)
)
{
const
[
arg
]
=
args
;
let
arg
:
any
=
{};
if
(
args
){
[
arg
]
=
args
;
}
Object
.
keys
(
_params
).
forEach
((
name
:
string
)
=>
{
let
hasProperty
=
true
;
if
(
!
name
)
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ui-service/{{appEntities}}/{{appEntities}}-ui-service-base.ts.hbs
浏览文件 @
f5b850f7
...
...
@@ -31,13 +31,15 @@ export class {{pascalCase appEntity.codeName}}UIServiceBase extends UIServiceBas
uIActionTag:'
{{
upperCase
appDEUIAction
.
uIActionTag
}}
',
frontPSAppView:'
{{
appDEUIAction
.
frontPSAppView
}}
',
caption:'
{{
appDEUIAction
.
caption
}}
',
entityCodeName:'
{{
app
DEUIAction
.
entityC
odeName
}}
',
entityCodeName:'
{{
app
Entity
.
c
odeName
}}
',
methodCodeName:'
{{
appDEUIAction
.
methodCodeName
}}
',
frontProcessType:'
{{
appDEUIAction
.
frontProcessType
}}
',
refreshMode:'
{{
appDEUIAction
.
refreshMode
}}
',
htmlPageUrl:'
{{
appDEUIAction
.
htmlPageUrl
}}
',
uILogicAttachMode:'
{{
appDEUIAction
.
uILogicAttachMode
}}
',
nextActionCodeName:'
{{
appDEUIAction
.
nextActionCodeName
}}
',
navContexts:
{{
appDEUIAction
.
navContexts
}}
,
navParams:
{{
appDEUIAction
.
navParams
}}
},
{{/
each
}}
};
...
...
@@ -49,7 +51,7 @@ export class {{pascalCase appEntity.codeName}}UIServiceBase extends UIServiceBas
* @param {*} params
* @memberof
{{
pascalCase
appEntity
.
codeName
}}
UIServiceBase
*/
public async
{{
appDEUIAction
.
codeName
}}
(params:any){
public async
{{
appDEUIAction
.
codeName
}}
(
uiAction:any,
params:any){
const actionModel = this.getUIActionModel('
{{
appDEUIAction
.
codeName
}}
');
{{#
eq
appDEUIAction
.
UIActionMode
'FRONT'
}}
AppFrontAction.doAction(actionModel, params);
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/utils/app-modal/app-modal.vue
浏览文件 @
f5b850f7
...
...
@@ -196,14 +196,13 @@ const handleShowState = ($event: any) => {
:maskClosable=
"true"
:destroyOnClose=
"true"
:width=
"width"
:height=
"height"
:bodyStyle=
"style"
@
cancel=
"onVisibleChange($event)"
>
<component
:is=
"viewName"
class=
"app-modal-view-component"
:width=
"width"
:height=
"height"
:context=
"context"
:viewParams=
"viewParams"
:viewDefaultUsage=
"false"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -39,7 +39,7 @@ const collapsedChange = () => {
</script>
<template>
<AppDefaultIndexViewLayout
class=
"app-index-view
"
:menuAlign=
"state.menuAlign"
:collapsed=
"collapsed"
>
<AppDefaultIndexViewLayout
:class=
"['app-index-view', state.viewSysCss]
"
:menuAlign=
"state.menuAlign"
:collapsed=
"collapsed"
>
<template
#
caption
>
<div
class=
"index-view-header"
>
\{{state.viewCaption}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -13,6 +13,9 @@ import { {{codeName}}SearchForm } from '@widgets/{{spinalCase appEntity.codeName
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'quicksearchform'
))
}}
import
{
{{
codeName
}}
QuickSearchForm
}
from
'@widgets/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-quick-search-form'
;
{{/if}}
{{#
eq
controlType
"SEARCHBAR"
}}
import
{
{{
codeName
}}
SearchBar
}
from
'@widgets/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-searchBar'
;
{{/
eq
}}
{{/
page
.
ctrls
}}
// props声明和默认值处理
...
...
@@ -41,7 +44,7 @@ const { state, grid, onCtrlEvent, onToolbarEvent, onQuickGroupEvent } = new Grid
</script>
<template>
<AppGridViewLayout
class=
"app-grid-view
"
>
<AppGridViewLayout
:class=
"['app-grid-view', state.viewSysCss]
"
>
<template
v-slot:caption
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
...
...
@@ -72,7 +75,7 @@ const { state, grid, onCtrlEvent, onToolbarEvent, onQuickGroupEvent } = new Grid
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
onC
trlEvent=
"onCtrlEvent"
@
c
trlEvent=
"onCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
<a-button><filter-outlined
/></a-button>
...
...
@@ -86,7 +89,7 @@ const { state, grid, onCtrlEvent, onToolbarEvent, onQuickGroupEvent } = new Grid
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
onC
trlEvent=
"onCtrlEvent"
@
c
trlEvent=
"onCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
{{/if}}
...
...
@@ -98,10 +101,17 @@ const { state, grid, onCtrlEvent, onToolbarEvent, onQuickGroupEvent } = new Grid
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
onC
trlEvent=
"onCtrlEvent"
@
c
trlEvent=
"onCtrlEvent"
></
{{
codeName
}}
QuickSearchForm>
</template>
{{/if}}
{{#
eq
controlType
"SEARCHBAR"
}}
<template
v-slot:searchBar
>
<
{{
codeName
}}
SearchBar
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
/>
</template>
{{/
eq
}}
{{#
eq
controlType
"GRID"
}}
<
{{
codeName
}}
Grid
ref=
"grid"
...
...
@@ -112,7 +122,7 @@ const { state, grid, onCtrlEvent, onToolbarEvent, onQuickGroupEvent } = new Grid
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
onC
trlEvent=
"onCtrlEvent"
@
c
trlEvent=
"onCtrlEvent"
></
{{
codeName
}}
Grid>
{{/
eq
}}
{{/
page
.
ctrls
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -32,11 +32,11 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
confirm
,
handle
CtrlEvent
}
=
new
PickupGridView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
confirm
,
on
CtrlEvent
}
=
new
PickupGridView
(
viewState
,
props
,
emit
).
moduleInstall
();
</script>
<template>
<AppPickerUpGridViewLayout
class=
"app-pickup-grid-view
"
>
<AppPickerUpGridViewLayout
:class=
"['app-pickup-grid-view', state.viewSysCss]
"
>
<template
v-slot:header-left
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
...
...
@@ -62,7 +62,7 @@ const { state, confirm, handleCtrlEvent } = new PickupGridView(viewState, props,
:viewParams=
"state.viewParams"
:controlAction=
"state.controlsAction.grid"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"
handle
CtrlEvent"
@
ctrlEvent=
"
on
CtrlEvent"
></MainGrid>
</AppPickerUpGridViewLayout>
</template>
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -28,11 +28,11 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
cancel
,
confirm
,
handle
CtrlEvent
}
=
new
PickupView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
cancel
,
confirm
,
on
CtrlEvent
}
=
new
PickupView
(
viewState
,
props
,
emit
).
moduleInstall
();
</script>
<template>
<AppPickerUpViewLayout
class=
"app-pickup-view
"
>
<AppPickerUpViewLayout
:class=
"['app-pickup-view', state.viewSysCss]
"
>
<template
v-slot:header-left
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
...
...
@@ -56,7 +56,7 @@ const { state, cancel, confirm,handleCtrlEvent } = new PickupView(viewState, pro
:viewParams=
"state.viewParams"
:controlAction=
"state.controlsAction.
{{
name
}}
"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"
handle
CtrlEvent"
@
ctrlEvent=
"
on
CtrlEvent"
></
{{
codeName
}}
PickUpViewPanel>
{{/
eq
}}
{{/
page
.
ctrls
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DETREEEXPVIEW}}/{{pages@DETREEEXPVIEW}}.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -25,11 +25,11 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块
const
{
state
,
handle
CtrlEvent
,
onToolbarEvent
}
=
new
TreeExpView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
on
CtrlEvent
,
onToolbarEvent
}
=
new
TreeExpView
(
viewState
,
props
,
emit
).
moduleInstall
();
</script>
<template>
<AppTreeExpViewLayout
class=
"app-tree-exp-view
"
>
<AppTreeExpViewLayout
:class=
"['app-tree-exp-view', state.viewSysCss]
"
>
<template
v-slot:caption
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
...
...
@@ -49,7 +49,7 @@ const { state, handleCtrlEvent, onToolbarEvent } = new TreeExpView(viewState, pr
:showBusyIndicator=
"true"
:viewParams=
"state.viewParams"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"
handle
CtrlEvent"
@
ctrlEvent=
"
on
CtrlEvent"
></
{{
codeName
}}
TreeExpBar>
{{/
eq
}}
{{/
page
.
ctrls
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -18,7 +18,7 @@ const props = withDefaults(defineProps < Props > (), {
interface
CtrlEmit
{
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
{
state
,
menuSelect
}
=
new
MenuControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
...
...
@@ -27,7 +27,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
</script>
<template>
<a-menu
class=
"app-menu"
v-model:openKeys=
"state.defaultOpens"
v-model:selectedKeys=
"state.defaultSelect"
<a-menu
class=
"app-menu
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
v-model:openKeys=
"state.defaultOpens"
v-model:selectedKeys=
"state.defaultSelect"
:mode=
"Object.is('LEFT', state.menuAlign) ? 'inline' : 'horizontal'"
@
select=
"menuSelect"
>
<AppMenuItem
:items=
"state.menus"
:collapsed=
"collapsed"
/>
</a-menu>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -3,7 +3,21 @@
import
{
Subject
}
from
'rxjs'
;
import
{
ctrlState
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-form-state'
;
import
{
FormControl
,
IActionParam
,
IParam
,
ControlAction
,
IContext
}
from
'@core'
;
{{#
*
inline
"importFormDruipart"
}}
{{#
each
items
as
|
formDetail
|
}}
{{#
eq
formDetail
.
detailType
'DRUIPART'
}}
import
{{
formDetail
.
psAppView
.
codeName
}}
from
'@views/
{{
spinalCase
formDetail
.
psAppView
.
psAppModule
.
codeName
}}
/
{{
spinalCase
formDetail
.
psAppView
.
codeName
}}
'
;
{{/
eq
}}
{{#if
formDetail
.
psDEFormDetails
}}
{{>
(
lookup
'importFormDruipart'
)
items
=
formDetail
.
psDEFormDetails
}}
{{/if}}
{{/
each
}}
{{/
inline
}}
{{#
each
ctrl
.
psDEFormPages
as
|
items
|
}}
{{#if
items
.
psDEFormDetails
}}
{{>
(
lookup
'importFormDruipart'
)
items
=
items
.
psDEFormDetails
}}
{{/if}}
{{/
each
}}
interface
Props
{
context
:
IContext
;
viewParams
?:
IParam
;
...
...
@@ -19,10 +33,10 @@ const props = withDefaults(defineProps < Props > (), {
// emit声明
interface
CtrlEmit
{
(
name
:
"
onC
trlEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"
c
trlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onEditorEvent
,
onComponentEvent
}
=
new
FormControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -27,7 +27,12 @@ const props = withDefaults(defineProps < Props > (), {
})
// emit声明
const
emit
=
defineEmits
<
{(
event
:
'onCtrlevent'
,
value
:
IActionParam
):
void
;}
>
();
interface
CtrlEmit
{
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
// emit声明
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力
const
{
state
,
useCustom
,
onEditorEvent
,
onToolbarEvent
}
=
new
GridControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
...
...
@@ -40,7 +45,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
<a-table
bordered
sticky
class=
"app-grid"
class=
"app-grid
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
:rowKey=
"rowKey"
:showHeader=
"true"
:scroll=
"scrollOption"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -28,7 +28,7 @@ interface CtrlEmit {
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
inited
,
viewdata
,
viewparam
}
=
new
PickupViewPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
...
...
@@ -38,7 +38,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
</script>
<template>
<div
class=
"app-pickupviewpanel"
>
<div
class=
"app-pickupviewpanel
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<component
v-if=
"inited && state.embeddedView && state.embeddedView.viewName"
:if=
"state.embeddedView.viewName"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:isSingleSelect=
"state.isSingleSelect"
:isShowButton=
"state.isShowButton"
:selectedData=
"state.selectedData"
></component>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@QUICKSEARCHFORM}}-quick-search-form/{{ctrls@QUICKSEARCHFORM}}-quick-search-form.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -20,7 +20,7 @@ const props = withDefaults(defineProps<Props>(), {
// emit声明
interface
CtrlEmit
{
(
name
:
"
onC
trlEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"
c
trlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@SEARCHBAR}}-searchBar/index.ts.hbs
0 → 100644
浏览文件 @
f5b850f7
import
{{
ctrl
.
codeName
}}
SearchBar from "./
{{
spinalCase
ctrl
.
codeName
}}
-searchBar.vue";
export {
{{
ctrl
.
codeName
}}
SearchBar };
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@SEARCHBAR}}-searchBar/{{ctrls@SEARCHBAR}}-searchBar-config.ts.hbs
0 → 100644
浏览文件 @
f5b850f7
export const CtrlConfig = {
controlCodeName: "
{{
ctrl
.
codeName
}}
",
controlName: "
{{
ctrl
.
name
}}
",
detailsModel: {
{{#
each
ctrl
.
psSearchBarFilters
as
|
filter
|
}}
{{
filter
.
name
}}
: {
label: '
{{
filter
.
psAppDEField
.
logicName
}}
',
name: '
{{
filter
.
name
}}
',
prop: '
{{
lowerCase
filter
.
psAppDEField
.
codeName
}}
',
disabled: false,
{{#if
filter
.
psDEFSearchMode
}}
mode: '
{{
filter
.
psDEFSearchMode
.
valueOP
}}
',
{{/if}}
},
{{/
each
}}
},
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@SEARCHBAR}}-searchBar/{{ctrls@SEARCHBAR}}-searchBar.vue.hbs
0 → 100644
浏览文件 @
f5b850f7
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
CtrlConfig
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-searchBar-config'
;
import
{
SearchBarControl
,
IActionParam
,
IParam
,
IContext
,
ControlAction
,
deepCopy
}
from
'@core'
;
interface
Props
{
controlAction
:
ControlAction
;
viewSubject
:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
})
// emit声明
interface
CtrlEmit
{
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
}
=
new
SearchBarControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
</script>
<template>
<div
class=
"search-bar
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<app-filter-tree
:datas=
"state.filterItems"
:fields=
"state.filterFields"
/>
</div>
</template>
<style
lang=
"scss"
>
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@SEARCHFORM}}-search-form/{{ctrls@SEARCHFORM}}-search-form.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -20,7 +20,7 @@ const props = withDefaults(defineProps<Props>(), {
// emit声明
interface
CtrlEmit
{
(
name
:
"
onC
trlEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"
c
trlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEEXPBAR}}-tree-exp-bar/{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
浏览文件 @
f5b850f7
...
...
@@ -32,10 +32,10 @@ interface CtrlEmit {
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
handle
CtrlEvent
}
=
new
TreeExpBarControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
on
CtrlEvent
}
=
new
TreeExpBarControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
...
...
@@ -53,7 +53,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
:viewParams=
"state.viewParams"
:viewSubject=
"state.viewSubject"
:isBranchAvailable=
"true"
@
ctrlEvent=
"
handle
CtrlEvent"
@
ctrlEvent=
"
on
CtrlEvent"
></
{{
codeName
}}
Tree>
{{/
eq
}}
{{/
ctrl
.
ctrls
}}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录