Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
e78222e4
提交
e78222e4
编写于
1月 10, 2022
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
bb5ef064
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
116 行增加
和
11 行删除
+116
-11
form-details-model.hbs
...ources/templ/r7/@macro/form-detail/form-details-model.hbs
+2
-1
form-group-panel.hbs
...esources/templ/r7/@macro/form-detail/form-group-panel.hbs
+16
-3
IbizFormGroup.vue
...l/r7/app_{{apps}}/src/components/render/IbizFormGroup.vue
+71
-6
form-control.ts
...s}}/src/core/modules/widgets/form-control/form-control.ts
+26
-0
{{ctrls@FORM}}-form.vue.hbs
...ntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/form-details-model.hbs
浏览文件 @
e78222e4
...
...
@@ -53,9 +53,10 @@
{{#if
(
and
(
eq
formDetail
.
detailType
"GROUPPANEL"
)
(
formDetail
.
psUIActionGroup
))
}}
uIActionGroup: {
extractMode: '
{{
formDetail
.
psUIActionGroup
.
actionGroupExtractMode
}}
',
caption: '
{{
formDetail
.
psUIActionGroup
.
name
}}
',
details: [
{{#
each
formDetail
.
psUIActionGroup
.
psUIActionGroupDetails
as
|
detail
|
}}
{ caption: '
{{
detail
.
caption
}}
', disabled: false, visible: true, uIActionTag: '
{{
detail
.
psUIAction
.
uIActionTag
}}
', showCaption:
{{
detail
.
showCaption
}}
, showIcon:
{{
detail
.
showIcon
}}
,
{{#if
detail
.
psUIAction
.
psSysImage
}}{{#if
detail
.
psUIAction
.
psSysImage
.
imagePath
}}
imgPath: "
{{
detail
.
psUIAction
.
psSysImage
.
imagePath
}}
",
{{/if}}{{#if
detail
.
psUIAction
.
psSysImage
.
cssClass
}}
iconClass: "
{{
detail
.
psUIAction
.
psSysImage
.
cssClass
}}
",
{{/if}}{{/if}}
},
{ caption: '
{{
detail
.
psUIAction
.
caption
}}
', disabled: false, visible: true, uIActionTag: '
{{
detail
.
psUIAction
.
uIActionTag
}}
', showCaption:
{{
detail
.
showCaption
}}
, showIcon:
{{
detail
.
showIcon
}}
,
{{#if
detail
.
psUIAction
.
psSysImage
}}{{#if
detail
.
psUIAction
.
psSysImage
.
imagePath
}}
imgPath: "
{{
detail
.
psUIAction
.
psSysImage
.
imagePath
}}
",
{{/if}}{{#if
detail
.
psUIAction
.
psSysImage
.
cssClass
}}
iconClass: "
{{
detail
.
psUIAction
.
psSysImage
.
cssClass
}}
",
{{/if}}{{/if}}
},
{{/
each
}}
],
},
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/form-group-panel.hbs
浏览文件 @
e78222e4
...
...
@@ -7,11 +7,12 @@
{{#if
item
.
psSysImage
}}
{{#if
item
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
{{else
if
item
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
item
.
psSysImage
.
cssClass
}}
"
{{/if}}
{{/if}}
:
titleStyle=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
titleStyle=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
:infoGroupMode=
"
{{
item
.
infoGroupMode
}}
"
:titleBarCloseMode=
"
{{
item
.
titleBarCloseMode
}}
"
:showCaption=
"
{{
item
.
showCaption
}}
"
:uIActionGroup=
"state.detailsModel.
{{
item
.
codeName
}}
.uIActionGroup"
>
:uIActionGroup=
"state.detailsModel.
{{
item
.
codeName
}}
.uIActionGroup"
@
componentEvent=
"handleComponentEvent"
>
{{#
eq
item
.
psLayout
.
layout
"FLEX"
}}
<div
class=
"app-form-layout-flex"
style=
"
{{#if
item
.
psLayout
.
dir
}}
flex-direction:
{{
item
.
psLayout
.
dir
}}
;
{{/if}}{{#if
item
.
psLayout
.
align
}}
justify-content:
{{
item
.
psLayout
.
align
}}
;
{{/if}}{{#if
item
.
psLayout
.
vAlign
}}
align-items:
{{
item
.
psLayout
.
vAlign
}}
;
{{/if}}
"
>
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
...
...
@@ -30,7 +31,19 @@
{{else}}
<a-col
{{>
@macro
/
front-end
/
ctrl
/
common
/
layoutPos
.
hbs
item
=
item
.
psLayoutPos
}}
>
<IbizFormGroup
v-show=
"state.detailsModel.
{{
item
.
codeName
}}
.visible"
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
>
<IbizFormGroup
v-show=
"state.detailsModel.
{{
item
.
codeName
}}
.visible"
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
{{#if
item
.
psSysImage
}}
{{#if
item
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
{{else
if
item
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
item
.
psSysImage
.
cssClass
}}
"
{{/if}}
{{/if}}
titleStyle=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
:infoGroupMode=
"
{{
item
.
infoGroupMode
}}
"
:titleBarCloseMode=
"
{{
item
.
titleBarCloseMode
}}
"
:showCaption=
"
{{
item
.
showCaption
}}
"
:uIActionGroup=
"state.detailsModel.
{{
item
.
codeName
}}
.uIActionGroup"
@
componentEvent=
"handleComponentEvent"
>
{{#
eq
item
.
psLayout
.
layout
"FLEX"
}}
<div
class=
"app-form-layout-flex"
style=
"
{{#if
item
.
psLayout
.
dir
}}
flex-direction:
{{
item
.
psLayout
.
dir
}}
;
{{/if}}{{#if
item
.
psLayout
.
align
}}
justify-content:
{{
item
.
psLayout
.
align
}}
;
{{/if}}{{#if
item
.
psLayout
.
vAlign
}}
align-items:
{{
item
.
psLayout
.
vAlign
}}
;
{{/if}}
"
>
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/IbizFormGroup.vue
浏览文件 @
e78222e4
<
script
setup
lang=
"ts"
>
import
{
IActionParam
}
from
"@core"
;
import
{
IActionParam
,
IParam
}
from
"@core"
;
interface
FormGroupProps
{
name
:
string
;
title
:
string
;
imgPath
:
string
;
iconClass
:
string
;
titleStyle
:
string
;
infoGroupMode
:
boolean
;
titleBarCloseMode
:
number
;
showCaption
:
boolean
;
uIActionGroup
:
IParam
;
}
interface
FormGroupEmit
{
(
name
:
'componentEvent'
,
value
:
IActionParam
):
void
}
const
props
=
withDefaults
(
defineProps
<
FormGroupProps
>
(),
{});
const
props
=
withDefaults
(
defineProps
<
FormGroupProps
>
(),
{
infoGroupMode
:
false
,
showCaption
:
true
,
titleBarCloseMode
:
0
,
});
const
emit
=
defineEmits
<
FormGroupEmit
>
();
const
handleGroupAction
=
(
action
:
IParam
)
=>
{
emit
(
'componentEvent'
,
{
tag
:
props
.
name
,
action
:
'formGroupAction'
,
data
:
action
});
}
const
handleMenuGroupAction
=
(
uIActionTag
:
string
)
=>
{
if
(
props
.
uIActionGroup
&&
props
.
uIActionGroup
.
details
?.
length
>
0
)
{
const
details
=
props
.
uIActionGroup
.
details
;
const
detail
=
details
.
find
((
action
:
IParam
)
=>
Object
.
is
(
action
.
uIActionTag
,
uIActionTag
));
emit
(
'componentEvent'
,
{
tag
:
props
.
name
,
action
:
'formGroupAction'
,
data
:
detail
});
}
}
</
script
>
<
template
>
<a-card
:class=
"['app-form-group', `app-form-group-$
{name}`]"
:title="title"
:bordered="false">
<template
#
extra
>
<!--
<a
href=
"#"
>
行为
</a>
-->
<template
v-if=
"showCaption"
#
title
>
<p
:class=
"['app-form-group-title', `$
{titleStyle}`]">
<IbizIconText
:iconClass=
"iconClass"
:imgPath=
"imgPath"
:text=
"title"
/>
</p>
</
template
>
<
template
v-if=
"showCaption"
#
extra
>
<template
v-if=
"uIActionGroup"
>
<template
v-if=
"Object.is(uIActionGroup.extractMode, 'ITEMS')"
>
<a-dropdown>
<span
class=
"group-action"
>
{{
uIActionGroup
.
action
}}
</span>
<template
#
overlay
>
<a-menu
@
click=
"handleMenuGroupAction"
>
<template
v-for=
"(item, index) in uIActionGroup.details"
:key=
"index"
>
<a-menu-item
v-if=
"item.visible"
:key=
"item.uIActionTag"
:disabled=
"item.disabled"
>
<IbizIconText
:iconClass=
"item.showIcon && item.iconClass"
:imgPath=
"item.showIcon && item.imgPath"
:text=
"item.showCaption && item.caption"
/>
</a-menu-item>
</
template
>
</a-menu>
</template>
</a-dropdown>
</template>
<
template
v-else
>
<span
v-for=
"(item, index) in uIActionGroup.details"
:key=
"index"
>
<span
v-if=
"index > 0"
class=
"separator"
>
|
</span>
<a-button
v-show=
"item.visible"
type=
"link"
:disabled=
"item.disabled"
@
click=
"handleGroupAction(item)"
>
<IbizIconText
:iconClass=
"item.showIcon && item.iconClass"
:imgPath=
"item.showIcon && item.imgPath"
:text=
"item.showCaption && item.caption"
/>
</a-button>
</span>
</
template
>
</template>
</template>
<slot></slot>
</a-card>
...
...
@@ -31,6 +93,9 @@ const emit = defineEmits<FormGroupEmit>();
width
:
100%
;
.ant-card-head
{
text-align
:
left
;
.app-form-group-title
{
margin
:
0px
;
}
}
}
</
style
>
\ 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
浏览文件 @
e78222e4
...
...
@@ -629,6 +629,32 @@ export class FormControl extends MainControl {
}
}
/**
* @description 处理组件事件
* @param {IActionParam} actionParam 行为参数
* @memberof FormControl
*/
public
handleComponentEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
switch
(
action
)
{
case
'formGroupAction'
:
this
.
handleFormGroupAction
(
tag
,
data
);
break
;
default
:
break
;
}
}
/**
* @description 处理表单分组行为
* @param {string} tag
* @param {*} data
* @memberof FormControl
*/
public
handleFormGroupAction
(
tag
:
string
,
data
:
any
)
{
console
.
log
(
tag
,
data
)
}
/**
* @description 安装部件所有功能模块的方法
* @param {FormControlProps} props 传入的Props
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
浏览文件 @
e78222e4
...
...
@@ -25,7 +25,7 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
handleEditorEvent
}
=
new
FormControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
handleEditorEvent
,
handleComponentEvent
}
=
new
FormControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
</script>
<template>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录