Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
2ea0ccea
提交
2ea0ccea
编写于
2月 10, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:调整部件模型支持获取快速工具栏和批操作工具栏
上级
88e37e90
变更
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
85 行增加
和
4 行删除
+85
-4
CtrlModel.java
...ore/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
+85
-4
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
浏览文件 @
2ea0ccea
package
cn
.
ibizlab
.
codegen
.
model
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
...
...
@@ -10,11 +12,11 @@ import net.ibizsys.model.control.IPSControl;
import
net.ibizsys.model.control.IPSControlContainer
;
import
net.ibizsys.model.control.dashboard.IPSDBContainerPortletPart
;
import
net.ibizsys.model.control.dashboard.IPSDBPortletPart
;
import
net.ibizsys.model.control.toolbar.IPSDETBUIActionItem
;
import
net.ibizsys.model.control.toolbar.IPSDEToolbar
;
import
net.ibizsys.model.view.IPSUIAction
;
import
java.util.Collection
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@Getter
@Setter
...
...
@@ -64,6 +66,21 @@ public class CtrlModel extends BaseModel{
private
Map
<
String
,
IPSAppViewRef
>
viewRefMap
=
new
LinkedHashMap
();
private
String
_quickToolbarName
;
public
String
getQuickToolBarName
()
{
return
_quickToolbarName
;
};
private
Collection
<
JSONObject
>
_quickToolbarItems
=
new
ArrayList
<>();
public
Collection
<
JSONObject
>
getQuickToolBarItems
(){
return
_quickToolbarItems
;
}
private
String
_batchToolbarName
;
public
String
getBatchToolBarName
()
{
return
_batchToolbarName
;
};
private
Collection
<
JSONObject
>
_batchToolbarItems
=
new
ArrayList
<>();
public
Collection
<
JSONObject
>
getBatchToolBarItems
(){
return
_batchToolbarItems
;
}
public
CtrlModel
addCtrl
(
String
codeName
,
CtrlModel
ctrlModel
)
{
if
(!
ctrlsMap
.
containsKey
(
codeName
))
...
...
@@ -116,6 +133,70 @@ public class CtrlModel extends BaseModel{
if
(!
app
.
getCtrlsMap
().
containsKey
(
ctrlModel
.
getId
()))
{
app
.
getCtrlsMap
().
put
(
ctrlModel
.
getId
(),
ctrlModel
);
}
if
(
"TOOLBAR"
.
equals
(
_control
.
getControlType
())){
JSONObject
mdToolbar
=
new
JSONObject
();
mdToolbar
.
put
(
"codeName"
,
_control
.
getCodeName
());
mdToolbar
.
put
(
"controlType"
,
_control
.
getControlType
());
mdToolbar
.
put
(
"logicName"
,
_control
.
getLogicName
());
if
(((
IPSDEToolbar
)
_control
).
getPSDEToolbarItems
()
!=
null
){
JSONArray
items
=
new
JSONArray
();
((
IPSDEToolbar
)
_control
).
getPSDEToolbarItems
().
forEach
(
singleItam
->{
JSONObject
toolbarItem
=
new
JSONObject
();
toolbarItem
.
put
(
"caption"
,
singleItam
.
getCaption
());
if
(
singleItam
.
getCapPSLanguageRes
()
!=
null
&&
singleItam
.
getCapPSLanguageRes
().
getLanResTag
()
!=
null
){
toolbarItem
.
put
(
"capPSLanguageRes"
,
singleItam
.
getCapPSLanguageRes
().
getLanResTag
());
}
toolbarItem
.
put
(
"tooltip"
,
singleItam
.
getTooltip
());
if
(
singleItam
.
getTooltipPSLanguageRes
()
!=
null
&&
singleItam
.
getTooltipPSLanguageRes
().
getLanResTag
()
!=
null
){
toolbarItem
.
put
(
"tooltipPSLanguageRes"
,
singleItam
.
getTooltipPSLanguageRes
().
getLanResTag
());
}
toolbarItem
.
put
(
"itemType"
,
singleItam
.
getItemType
());
toolbarItem
.
put
(
"name"
,
singleItam
.
getName
());
toolbarItem
.
put
(
"showCaption"
,
singleItam
.
isShowCaption
());
toolbarItem
.
put
(
"showIcon"
,
singleItam
.
isShowIcon
());
if
(
singleItam
.
getPSSysImage
()
!=
null
&&
singleItam
.
getPSSysImage
().
getCssClass
()
!=
null
){
toolbarItem
.
put
(
"iconClass"
,
singleItam
.
getPSSysImage
().
getCssClass
());
}
if
(
singleItam
.
getPSSysImage
()
!=
null
&&
singleItam
.
getPSSysImage
().
getImagePath
()
!=
null
){
toolbarItem
.
put
(
"imgPath"
,
singleItam
.
getPSSysImage
().
getImagePath
());
}
if
(
"DEUIACTION"
.
equals
(
singleItam
.
getItemType
())){
IPSDETBUIActionItem
actionItem
=
(
IPSDETBUIActionItem
)
singleItam
;
toolbarItem
.
put
(
"groupExtractMode"
,
actionItem
.
getNoPrivDisplayMode
());
toolbarItem
.
put
(
"noPrivDisplayMode"
,
actionItem
.
getNoPrivDisplayMode
());
toolbarItem
.
put
(
"id"
,
actionItem
.
getPSAppViewUIAction
().
getId
());
toolbarItem
.
put
(
"xDataControlName"
,
actionItem
.
getPSAppViewUIAction
().
getXDataControlName
());
if
(
actionItem
.
getPSAppViewUIAction
().
getPSUIAction
()
!=
null
){
IPSUIAction
UIAction
=
actionItem
.
getPSAppViewUIAction
().
getPSUIAction
();
JSONObject
appUIAction
=
new
JSONObject
();
appUIAction
.
put
(
"caption"
,
UIAction
.
getCaption
());
if
(
UIAction
.
getCapPSLanguageRes
()
!=
null
&&
UIAction
.
getCapPSLanguageRes
().
getLanResTag
()
!=
null
){
appUIAction
.
put
(
"capPSLanguageRes"
,
UIAction
.
getCapPSLanguageRes
().
getLanResTag
());
}
appUIAction
.
put
(
"codeName"
,
UIAction
.
getCodeName
());
appUIAction
.
put
(
"fullCodeName"
,
UIAction
.
getFullCodeName
());
appUIAction
.
put
(
"name"
,
UIAction
.
getName
());
appUIAction
.
put
(
"uIActionMode"
,
UIAction
.
getUIActionMode
());
appUIAction
.
put
(
"uIActionTag"
,
UIAction
.
getUIActionTag
());
appUIAction
.
put
(
"uIActionType"
,
UIAction
.
getUIActionType
());
appUIAction
.
put
(
"actionTarget"
,
UIAction
.
getActionTarget
());
appUIAction
.
put
(
"dataAccessAction"
,
UIAction
.
getDataAccessAction
());
toolbarItem
.
put
(
"uIAction"
,
appUIAction
);
}
}
items
.
add
(
toolbarItem
);
});
mdToolbar
.
put
(
"items"
,
items
);
}
if
(
_control
.
getName
()
!=
null
&&
_control
.
getName
().
endsWith
(
"quicktoolbar"
))
{
_quickToolbarItems
.
add
(
mdToolbar
);
_quickToolbarName
=
_control
.
getName
();
}
if
(
_control
.
getName
()
!=
null
&&
_control
.
getName
().
endsWith
(
"batchtoolbar"
))
{
_batchToolbarItems
.
add
(
mdToolbar
);
_batchToolbarName
=
_control
.
getName
();
}
}
}
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录