Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
5d89de7e
提交
5d89de7e
编写于
1月 30, 2022
作者:
WodahsOrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 门户
上级
3cb85367
变更
20
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
236 行增加
和
103 行删除
+236
-103
CtrlModel.java
...ore/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
+26
-0
container.hbs
...7/@macro/front-end/widgets/dashboard-detail/container.hbs
+24
-0
include-dashboard.hbs
.../front-end/widgets/dashboard-detail/include-dashboard.hbs
+2
-2
portlet.hbs
.../r7/@macro/front-end/widgets/dashboard-detail/portlet.hbs
+22
-0
form-tabpanel.hbs
...r7/@macro/front-end/widgets/form-detail/form-tabpanel.hbs
+1
-0
app-col.vue
...s/templ/r7/app_{{apps}}/src/components/common/app-col.vue
+47
-36
app-form-button.vue
...r7/app_{{apps}}/src/components/common/app-form-button.vue
+2
-2
app-form-druipart.vue
.../app_{{apps}}/src/components/common/app-form-druipart.vue
+2
-2
app-form-group.vue
.../r7/app_{{apps}}/src/components/common/app-form-group.vue
+4
-4
app-form-iframe.vue
...r7/app_{{apps}}/src/components/common/app-form-iframe.vue
+2
-2
app-form-item.vue
...l/r7/app_{{apps}}/src/components/common/app-form-item.vue
+2
-2
app-form-page.vue
...l/r7/app_{{apps}}/src/components/common/app-form-page.vue
+2
-2
app-form-raw.vue
...pl/r7/app_{{apps}}/src/components/common/app-form-raw.vue
+2
-2
app-form-tab-page.vue
.../app_{{apps}}/src/components/common/app-form-tab-page.vue
+2
-2
app-form-tab-panel.vue
...app_{{apps}}/src/components/common/app-form-tab-panel.vue
+2
-2
app-portlet-card.vue
...7/app_{{apps}}/src/components/common/app-portlet-card.vue
+48
-0
{{pages@APPPORTALVIEW}}.vue.hbs
...}/{{pages@APPPORTALVIEW}}/{{pages@APPPORTALVIEW}}.vue.hbs
+0
-2
{{ctrls@DASHBOARD}}-dashboard.vue.hbs
...SHBOARD}}-dashboard/{{ctrls@DASHBOARD}}-dashboard.vue.hbs
+10
-15
{{ctrls@PORTLET}}-portlet-state.ts.hbs
...@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet-state.ts.hbs
+0
-9
{{ctrls@PORTLET}}-portlet.vue.hbs
...ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet.vue.hbs
+36
-19
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
浏览文件 @
5d89de7e
...
@@ -9,6 +9,7 @@ import net.ibizsys.model.app.view.IPSAppViewRef;
...
@@ -9,6 +9,7 @@ import net.ibizsys.model.app.view.IPSAppViewRef;
import
net.ibizsys.model.control.IPSControl
;
import
net.ibizsys.model.control.IPSControl
;
import
net.ibizsys.model.control.IPSControlContainer
;
import
net.ibizsys.model.control.IPSControlContainer
;
import
net.ibizsys.model.control.dashboard.IPSDBContainerPortletPart
;
import
net.ibizsys.model.control.dashboard.IPSDBContainerPortletPart
;
import
net.ibizsys.model.control.dashboard.IPSDBPortletPart
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
...
@@ -46,10 +47,15 @@ public class CtrlModel extends BaseModel{
...
@@ -46,10 +47,15 @@ public class CtrlModel extends BaseModel{
}
}
}
}
handleChildControls
();
handleChildControls
();
if
(
"DASHBOARD"
.
equals
(
getControl
().
getControlType
())){
handleAllPortlets
((
IPSControlContainer
)
getControl
());
}
}
}
public
Map
<
String
,
CtrlModel
>
ctrlsMap
=
new
LinkedHashMap
();
public
Map
<
String
,
CtrlModel
>
ctrlsMap
=
new
LinkedHashMap
();
public
Map
<
String
,
IPSControl
>
portletsMap
=
new
LinkedHashMap
();
private
AppModel
app
;
private
AppModel
app
;
private
AppEntityModel
appEntity
;
private
AppEntityModel
appEntity
;
...
@@ -70,6 +76,11 @@ public class CtrlModel extends BaseModel{
...
@@ -70,6 +76,11 @@ public class CtrlModel extends BaseModel{
return
ctrlsMap
.
values
();
return
ctrlsMap
.
values
();
}
}
public
Collection
<
IPSControl
>
getAllPortlets
()
{
return
portletsMap
.
values
();
}
public
IPSControl
getControl
()
public
IPSControl
getControl
()
{
{
return
(
IPSControl
)
opt
;
return
(
IPSControl
)
opt
;
...
@@ -110,6 +121,21 @@ public class CtrlModel extends BaseModel{
...
@@ -110,6 +121,21 @@ public class CtrlModel extends BaseModel{
}
}
}
}
public
void
handleAllPortlets
(
IPSControlContainer
control
)
{
List
<
IPSControl
>
controls
=
control
.
getPSControls
();
if
(
controls
!=
null
&&
controls
.
size
()
>
0
)
{
for
(
IPSControl
_control
:
controls
)
{
if
(
"CONTAINER"
.
equals
(
((
IPSDBPortletPart
)
_control
).
getPortletType
()
)){
this
.
handleAllPortlets
((
IPSControlContainer
)
_control
);
}
else
{
if
(!
this
.
portletsMap
.
containsKey
(
_control
.
getCodeName
()))
{
this
.
portletsMap
.
put
(
_control
.
getCodeName
(),
_control
);
}
}
}
}
}
// 忽略发布
// 忽略发布
public
Boolean
ignore
()
{
public
Boolean
ignore
()
{
IPSControl
control
=
getControl
();
IPSControl
control
=
getControl
();
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/dashboard-detail/container.hbs
0 → 100644
浏览文件 @
5d89de7e
<AppPortletCard
name=
{{
portlet
.
name
}}
:isContainer="true"
{{#if
portlet
.
caption
}}
title=
"
{{
portlet
.
caption
}}
"
{{/if}}
:showCaption=
"
{{
portlet
.
isShowTitleBar
}}
"
{{#if
portlet
.
psSysImage
}}
{{#if
portlet
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
portlet
.
psSysImage
.
imagePath
}}
"
{{else
if
portlet
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
portlet
.
psSysImage
.
cssClass
}}
"
{{/if}}
{{/if}}
:layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
portlet
.
psLayout
layoutPos
=
portlet
.
psLayoutPos
}}
"
class=
"app-portletContainer
{{
portlet
.
psSysCss
.
cssName
}}
"
{{#if
(
or
portlet
.
width
portlet
.
height
)
}}
style=
"
{{#if
portlet
.
width
}}
width:
{{
portlet
.
width
}}
px;
{{/if}}{{#if
portlet
.
height
}}
height:
{{
portlet
.
height
}}
px;
{{/if}}
"
{{/if}}
>
{{#
each
portlet
.
psControls
as
|
subPortlet
|
}}
{{#
eq
subPortlet
.
portletType
'CONTAINER'
}}
{{>
(
lookup
'PORTLET_CONTAINER'
)
portlet
=
subPortlet
}}
{{else}}
{{>
(
lookup
'PORTLET'
)
portlet
=
subPortlet
}}
{{/
eq
}}
{{/
each
}}
</AppPortletCard>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/dashboard-detail/include-dashboard.hbs
浏览文件 @
5d89de7e
{{#
*
inline
"DASHBOARD"
}}{{>
@macro
/
front-end
/
widgets
/
dashboard-detail
/
dashboard
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PORTLET_CONTAINER"
}}{{>
@macro
/
front-end
/
widgets
/
dashboard-detail
/
container
.
hbs
}}{{/
inline
}}
{{#
*
inline
"CONTAINER"
}}{{>
@macro
/
front-end
/
widgets
/
dashboard-detail
/
portlet-container
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PORTLET"
}}{{>
@macro
/
front-end
/
widgets
/
dashboard-detail
/
portlet
.
hbs
}}{{/
inline
}}
\ No newline at end of file
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/dashboard-detail/portlet.hbs
0 → 100644
浏览文件 @
5d89de7e
<
{{
codeName
}}
Portlet
ref=
"portlet"
name=
"
{{
portlet
.
name
}}
"
{{#if
portlet
.
caption
}}
title=
"
{{
portlet
.
caption
}}
"
{{/if}}
:showCaption=
"
{{
portlet
.
isShowTitleBar
}}
"
:layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
portlet
.
psLayout
layoutPos
=
portlet
.
psLayoutPos
}}
"
{{#if
portlet
.
psSysImage
}}
{{#if
portlet
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
portlet
.
psSysImage
.
imagePath
}}
"
{{else
if
portlet
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
portlet
.
psSysImage
.
cssClass
}}
"
{{/if}}
{{/if}}
{{#if
portlet
.
psSysCss
}}
class=
"
{{
portlet
.
psSysCss
.
cssName
}}
"
{{/if}}
{{#if
(
or
portlet
.
width
portlet
.
height
)
}}
style=
"
{{#if
portlet
.
width
}}
width:
{{
portlet
.
width
}}
px;
{{/if}}{{#if
portlet
.
height
}}
height:
{{
portlet
.
height
}}
px;
{{/if}}
"
{{/if}}
:context=
"state.context"
:viewParams=
"state.viewParams"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"onCtrlEvent"
/>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/form-detail/form-tabpanel.hbs
浏览文件 @
5d89de7e
<AppFormTabpanel
<AppFormTabpanel
name=
"
{{
item
.
codeName
}}
"
:visible=
"state.detailsModel.
{{
item
.
codeName
}}
.visible"
:visible=
"state.detailsModel.
{{
item
.
codeName
}}
.visible"
:layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
formDetail
.
psLayout
layoutPos
=
formDetail
.
psLayoutPos
}}
"
:layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
formDetail
.
psLayout
layoutPos
=
formDetail
.
psLayoutPos
}}
"
name=
{{
item
.
name
}}
>
name=
{{
item
.
name
}}
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-col.vue
浏览文件 @
5d89de7e
...
@@ -20,62 +20,73 @@ if (props.layoutOpts) {
...
@@ -20,62 +20,73 @@ if (props.layoutOpts) {
}
}
// 插槽类名和插槽样式,只有不绘制根元素的时候需要传递给插槽
// 插槽类名和插槽样式,只有不绘制根元素的时候需要传递给插槽
const
attrs
=
useAttrs
()
// 在template里写会丢失响应性,故封一个计算属性。
// 在template里写会丢失响应性,故封一个计算属性。
const
attrs
=
useAttrs
()
let
slotStyle
=
computed
(()
=>
{
let
slotStyle
=
computed
(()
=>
{
// 有根元素无需传样式给插槽
if
(
!
props
.
noRoot
){
return
''
}
let
result
=
''
;
let
result
=
''
;
result
+=
isObject
(
attrs
.
style
)
?
styleObj2Str
(
attrs
.
style
)
:
attrs
.
style
;
result
+=
isObject
(
attrs
.
style
)
?
styleObj2Str
(
attrs
.
style
)
:
attrs
.
style
;
console
.
log
(
attrs
.
style
)
console
.
log
(
attrs
.
style
)
console
.
log
(
result
)
console
.
log
(
result
)
if
(
layout
?.
value
?.
colStyle
)
{
if
(
layout
?.
value
?.
colStyle
)
{
result
+=
layout
.
value
.
colStyle
;
result
+=
layout
.
value
.
colStyle
;
}
}
result
+=
props
.
visible
==
true
?
""
:
"display: none;"
;
result
+=
props
.
visible
==
true
?
""
:
"display: none;"
;
return
result
;
return
result
;
});
});
// 插槽类名
let
slotClass
=
computed
(()
=>
{
let
slotClass
=
computed
(()
=>
{
let
result
=
''
;
// 有根元素无需传类名给插槽
if
(
!
props
.
noRoot
){
return
''
}
let
result
=
'app-col '
;
result
+=
attrs
.
class
;
result
+=
attrs
.
class
;
if
(
props
.
layoutOpts
?.
parentLayout
==
'FLEX'
&&
props
.
noRoot
)
{
if
(
props
.
layoutOpts
?.
parentLayout
==
'FLEX'
)
{
result
+=
" app-col
app-col
--flex"
;
result
+=
" app-col--flex"
;
}
}
return
result
;
return
result
;
})
})
// 计算是否需要绘制根元素(layoutOpts不存在或者flex模式下noRoot为true时不绘制根元素)
let
hasRoot
=
computed
(()
=>
{
return
props
.
layoutOpts
!==
undefined
&&
(
props
.
layoutOpts
.
parentLayout
!==
'FLEX'
||
!
props
.
noRoot
);
})
</
script
>
</
script
>
<
template
>
<
template
>
<template
v-if=
"!hasRoot"
>
<template
v-if=
"layoutOpts"
>
<!-- 没有根元素的直接输出插槽 -->
<!-- 有布局模式配置的 -->
<slot
:slotStyle=
"slotStyle"
:slotClass=
"slotClass"
></slot>
<template
v-if=
"layoutOpts.parentLayout == 'FLEX'"
>
<template
v-if=
"noRoot"
>
<!-- Flex布局,没根元素时,需要把相关样式和类型传给插槽 -->
<slot
:slotStyle=
"slotStyle"
:slotClass=
"slotClass"
></slot>
</
template
>
<div
v-else
v-show=
"visible"
:style=
"layout.colStyle"
class=
"app-col app-col--flex"
>
<slot
:slotStyle=
"slotStyle"
:slotClass=
"slotClass"
></slot>
</div>
</template>
<a-col
v-else
v-show=
"visible"
:lg=
"layout.colGridOpts.lg"
:xs=
"layout.colGridOpts.md"
:md=
"layout.colGridOpts.md"
:sm=
"layout.colGridOpts.sm"
class=
"app-col app-col--grid"
>
<slot
:slotStyle=
"slotStyle"
:slotClass=
"slotClass"
></slot>
</a-col>
</template>
<
template
v-else
>
<!-- 无布局模式配置,根据noRoot输出根元素 -->
<template
v-if=
"noRoot"
>
<slot
:slotStyle=
"slotStyle"
:slotClass=
"slotClass"
></slot>
</
template
>
<div
v-else
class=
"app-col"
>
<slot
:slotStyle=
"slotStyle"
:slotClass=
"slotClass"
></slot>
</div>
</template>
</template>
<div
v-else-if=
"layoutOpts?.parentLayout == 'FLEX'"
v-show=
"visible"
:style=
"layout.colStyle"
class=
"app-col app-col--flex"
>
<slot
slotStyle=
""
slotClass=
""
></slot>
</div>
<a-col
v-else
v-show=
"visible"
:lg=
"layout.colGridOpts.lg"
:xs=
"layout.colGridOpts.md"
:md=
"layout.colGridOpts.md"
:sm=
"layout.colGridOpts.sm"
class=
"app-col app-col--grid"
>
<slot
slotStyle=
""
slotClass=
""
></slot>
</a-col>
</template>
</template>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-button.vue
浏览文件 @
5d89de7e
...
@@ -19,7 +19,7 @@ const props = withDefaults(defineProps<FormButtonProps>(), {
...
@@ -19,7 +19,7 @@ const props = withDefaults(defineProps<FormButtonProps>(), {
</
script
>
</
script
>
<
template
>
<
template
>
<
app-c
ol
:visible=
"visible"
noRoot
:layoutOpts=
"layoutOpts"
class=
"app-formButton"
>
<
AppC
ol
:visible=
"visible"
noRoot
:layoutOpts=
"layoutOpts"
class=
"app-formButton"
>
<template
#
default=
"
{slotStyle, slotClass}">
<template
#
default=
"
{slotStyle, slotClass}">
<a-button
<a-button
:class=
"slotClass"
:class=
"slotClass"
...
@@ -28,7 +28,7 @@ const props = withDefaults(defineProps<FormButtonProps>(), {
...
@@ -28,7 +28,7 @@ const props = withDefaults(defineProps<FormButtonProps>(), {
<AppIconText
:class=
"labelCssName"
:iconClass=
"iconClass"
:imgPath=
"imagePath"
:text=
"showCaption ? caption : '' "
/>
<AppIconText
:class=
"labelCssName"
:iconClass=
"iconClass"
:imgPath=
"imagePath"
:text=
"showCaption ? caption : '' "
/>
</a-button>
</a-button>
</
template
>
</
template
>
</
app-c
ol>
</
AppC
ol>
</template>
</template>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-druipart.vue
浏览文件 @
5d89de7e
...
@@ -121,7 +121,7 @@ const viewEvent = (action:any) => {
...
@@ -121,7 +121,7 @@ const viewEvent = (action:any) => {
</
script
>
</
script
>
<
template
>
<
template
>
<
app-c
ol
noRoot
:visible=
"visible"
:layoutOpts=
"layoutOpts"
:class=
"['app-form-druipart', `app-form-druipart-$
{name}`]">
<
AppC
ol
noRoot
:visible=
"visible"
:layoutOpts=
"layoutOpts"
:class=
"['app-form-druipart', `app-form-druipart-$
{name}`]">
<template
#
default=
"
{slotStyle, slotClass}">
<template
#
default=
"
{slotStyle, slotClass}">
<a-card
:class=
"slotClass"
:style=
"slotStyle"
:bordered=
"false"
>
<a-card
:class=
"slotClass"
:style=
"slotStyle"
:bordered=
"false"
>
<template
#
title
>
<template
#
title
>
...
@@ -132,7 +132,7 @@ const viewEvent = (action:any) => {
...
@@ -132,7 +132,7 @@ const viewEvent = (action:any) => {
<slot
:context=
"druipartContext"
:viewParams=
"druipartViewParams"
:viewEvent=
"viewEvent"
></slot>
<slot
:context=
"druipartContext"
:viewParams=
"druipartViewParams"
:viewEvent=
"viewEvent"
></slot>
</a-card>
</a-card>
</template>
</template>
</
app-c
ol>
</
AppC
ol>
</template>
</template>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-group.vue
浏览文件 @
5d89de7e
...
@@ -37,7 +37,7 @@ const handleMenuGroupAction = ($event: IParam) => {
...
@@ -37,7 +37,7 @@ const handleMenuGroupAction = ($event: IParam) => {
</
script
>
</
script
>
<
template
>
<
template
>
<
app-c
ol
<
AppC
ol
noRoot
noRoot
:visible=
"visible"
:visible=
"visible"
:layoutOpts=
"layoutOpts"
:layoutOpts=
"layoutOpts"
...
@@ -93,12 +93,12 @@ const handleMenuGroupAction = ($event: IParam) => {
...
@@ -93,12 +93,12 @@ const handleMenuGroupAction = ($event: IParam) => {
</
template
>
</
template
>
</template>
</template>
</template>
</template>
<
app-r
ow
:layoutOpts=
"layoutOpts"
>
<
AppR
ow
:layoutOpts=
"layoutOpts"
>
<slot></slot>
<slot></slot>
</
app-r
ow>
</
AppR
ow>
</a-card>
</a-card>
</template>
</template>
</
app-c
ol>
</
AppC
ol>
</template>
</template>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-iframe.vue
浏览文件 @
5d89de7e
...
@@ -14,9 +14,9 @@ const props = withDefaults(defineProps<FormIframeProps>(), {
...
@@ -14,9 +14,9 @@ const props = withDefaults(defineProps<FormIframeProps>(), {
</
script
>
</
script
>
<
template
>
<
template
>
<
app-c
ol
class=
"app-formDruipart"
:visible=
"visible"
:layoutOpts=
"layoutOpts"
v-show=
"visible"
>
<
AppC
ol
class=
"app-formDruipart"
:visible=
"visible"
:layoutOpts=
"layoutOpts"
v-show=
"visible"
>
<iframe
class=
"app-formDruipart__iframe"
:src=
"iFrameUrl"
style=
"height: 100%;width: 100%;border: 0"
></iframe>
<iframe
class=
"app-formDruipart__iframe"
:src=
"iFrameUrl"
style=
"height: 100%;width: 100%;border: 0"
></iframe>
</
app-c
ol>
</
AppC
ol>
</
template
>
</
template
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-item.vue
浏览文件 @
5d89de7e
...
@@ -42,7 +42,7 @@ const initRules = () => {
...
@@ -42,7 +42,7 @@ const initRules = () => {
</
script
>
</
script
>
<
template
>
<
template
>
<
app-c
ol
:visible=
"visible"
noRoot
:layoutOpts=
"layoutOpts"
class=
"app-form-item"
>
<
AppC
ol
:visible=
"visible"
noRoot
:layoutOpts=
"layoutOpts"
class=
"app-form-item"
>
<template
v-slot:default=
"
{slotStyle, slotClass}">
<template
v-slot:default=
"
{slotStyle, slotClass}">
<a-form-item
<a-form-item
:class=
"slotClass"
:class=
"slotClass"
...
@@ -62,7 +62,7 @@ const initRules = () => {
...
@@ -62,7 +62,7 @@ const initRules = () => {
<slot></slot>
<slot></slot>
</a-form-item>
</a-form-item>
</template>
</template>
</
app-c
ol>
</
AppC
ol>
</template>
</template>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-page.vue
浏览文件 @
5d89de7e
...
@@ -13,9 +13,9 @@ const props = withDefaults(defineProps<FormPageProps>(), {
...
@@ -13,9 +13,9 @@ const props = withDefaults(defineProps<FormPageProps>(), {
<
template
>
<
template
>
<a-tab-pane
class=
"app-formPage"
:key=
"$attrs.key"
:tab=
"tab"
>
<a-tab-pane
class=
"app-formPage"
:key=
"$attrs.key"
:tab=
"tab"
>
<
app-r
ow
:layoutOpts=
"layoutOpts"
>
<
AppR
ow
:layoutOpts=
"layoutOpts"
>
<slot></slot>
<slot></slot>
</
app-r
ow>
</
AppR
ow>
</a-tab-pane>
</a-tab-pane>
</
template
>
</
template
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-raw.vue
浏览文件 @
5d89de7e
...
@@ -17,7 +17,7 @@ const props = withDefaults(defineProps<FormRawProps>(), {
...
@@ -17,7 +17,7 @@ const props = withDefaults(defineProps<FormRawProps>(), {
</
script
>
</
script
>
<
template
>
<
template
>
<
app-c
ol
:visible=
"visible"
noRoot
:layoutOpts=
"layoutOpts"
class=
"app-formRaw"
>
<
AppC
ol
:visible=
"visible"
noRoot
:layoutOpts=
"layoutOpts"
class=
"app-formRaw"
>
<template
#
default=
"
{slotStyle, slotClass}">
<template
#
default=
"
{slotStyle, slotClass}">
<AppRaw
<AppRaw
:class=
"slotClass"
:class=
"slotClass"
...
@@ -27,7 +27,7 @@ const props = withDefaults(defineProps<FormRawProps>(), {
...
@@ -27,7 +27,7 @@ const props = withDefaults(defineProps<FormRawProps>(), {
:contentType=
"contentType"
>
:contentType=
"contentType"
>
</AppRaw>
</AppRaw>
</
template
>
</
template
>
</
app-c
ol>
</
AppC
ol>
</template>
</template>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-tab-page.vue
浏览文件 @
5d89de7e
...
@@ -16,9 +16,9 @@ const props = withDefaults(defineProps<FormTabPageProps>(), {
...
@@ -16,9 +16,9 @@ const props = withDefaults(defineProps<FormTabPageProps>(), {
<
template
>
<
template
>
<a-tab-pane
class=
"app-formTabPage"
v-show=
"visible"
:tab=
"caption"
>
<a-tab-pane
class=
"app-formTabPage"
v-show=
"visible"
:tab=
"caption"
>
<
app-r
ow
:layoutOpts=
"layoutOpts"
>
<
AppR
ow
:layoutOpts=
"layoutOpts"
>
<slot></slot>
<slot></slot>
</
app-r
ow>
</
AppR
ow>
</a-tab-pane>
</a-tab-pane>
</
template
>
</
template
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-tab-panel.vue
浏览文件 @
5d89de7e
...
@@ -14,13 +14,13 @@ const props = withDefaults(defineProps<FormTabPanelProps>(), {
...
@@ -14,13 +14,13 @@ const props = withDefaults(defineProps<FormTabPanelProps>(), {
</
script
>
</
script
>
<
template
>
<
template
>
<
app-c
ol
:visible=
"visible"
noRoot
:layoutOpts=
"layoutOpts"
class=
"app-formTabPanel"
>
<
AppC
ol
:visible=
"visible"
noRoot
:layoutOpts=
"layoutOpts"
class=
"app-formTabPanel"
>
<template
v-slot:default=
"
{ slotStyle, slotClass }">
<template
v-slot:default=
"
{ slotStyle, slotClass }">
<a-tabs
:class=
"slotClass"
:style=
"slotStyle"
>
<a-tabs
:class=
"slotClass"
:style=
"slotStyle"
>
<slot></slot>
<slot></slot>
</a-tabs>
</a-tabs>
</
template
>
</
template
>
</
app-c
ol>
</
AppC
ol>
</template>
</template>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-portlet-card.vue
0 → 100644
浏览文件 @
5d89de7e
<
script
setup
lang=
"ts"
>
import
{
ILayoutOpts
}
from
"@core"
;
import
{
LayoutTool
}
from
"@core/modules/common/layout-tool"
;
interface
AppPortletCardProps
{
layoutOpts
:
ILayoutOpts
;
// 是否是容器,是容器的话需要在默认插槽外层适配布局
isContainer
?:
boolean
;
showCaption
?:
boolean
;
title
?:
string
;
imgPath
?:
string
;
iconClass
?:
string
;
}
const
props
=
withDefaults
(
defineProps
<
AppPortletCardProps
>
(),
{
isContainer
:
false
,
});
// 使用布局逻辑获得响应式的layout对象
const
layout
=
LayoutTool
.
useLayout
(
toRef
(
props
,
"layoutOpts"
));
</
script
>
<
template
>
<AppCol
class=
"app-portletCard"
:layoutOpts=
"layoutOpts"
>
<div
class=
"app-portletCard__head"
>
<div
class=
"app-portletCard__headLeft"
>
<slot
name=
"header-left"
>
<AppIconText
v-if=
"showCaption"
:text=
"title"
:imgPath=
"imgPath"
:iconClass=
"iconClass"
/>
</slot>
</div>
<div
class=
"app-portletCard__headerRight"
>
<slot
name=
"header-right"
></slot>
</div>
</div>
<div
class=
"app-portletCard__body"
>
<AppRow
v-if=
"isContainer"
:layoutOpts=
"layoutOpts"
>
<slot></slot>
</AppRow>
<template
v-else
>
<slot></slot>
</
template
>
</div>
</AppCol>
</template>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@APPPORTALVIEW}}/{{pages@APPPORTALVIEW}}.vue.hbs
浏览文件 @
5d89de7e
...
@@ -39,8 +39,6 @@ const { state, dashboard, onCtrlEvent } = new PortalView(viewState, props, emit)
...
@@ -39,8 +39,6 @@ const { state, dashboard, onCtrlEvent } = new PortalView(viewState, props, emit)
<AppIconText
<AppIconText
class=
"app-view__caption"
class=
"app-view__caption"
size=
"large"
size=
"large"
:subCaption=
"state.subCaption"
:showCaptionBar=
"state.showCaptionBar"
:text=
"state.viewCaption"
:text=
"state.viewCaption"
/>
/>
</template>
</template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@DASHBOARD}}-dashboard/{{ctrls@DASHBOARD}}-dashboard.vue.hbs
浏览文件 @
5d89de7e
...
@@ -4,23 +4,12 @@ import { Subject } from 'rxjs';
...
@@ -4,23 +4,12 @@ import { Subject } from 'rxjs';
import
{
ctrlState
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-dashboard-state'
;
import
{
ctrlState
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-dashboard-state'
;
import
{
DashboardControl
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
import
{
DashboardControl
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
{{#
each
ctrl
.
psControls
as
|
control
|
}}
{{#
each
ctrl
.
allPortlets
as
|
control
|
}}
{{#
eq
control
.
portletType
"CONTAINER"
}}
{{#if
control
.
psAppDataEntity
}}
{{#
each
control
.
psControls
as
|
control2
|
}}
import
{
{{
codeName
}}
Portlet
}
from
'@widgets/
{{
spinalCase
control
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-portlet'
;
{{#if
control2
.
psAppDataEntity
}}
import
{
{{
codeName
}}
Portlet
}
from
'@widgets/
{{
spinalCase
control2
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-portlet'
;
{{else}}
{{else}}
import
{
{{
codeName
}}
Portlet
}
from
'@widgets/app/
{{
spinalCase
codeName
}}
-portlet'
;
import
{
{{
codeName
}}
Portlet
}
from
'@widgets/app/
{{
spinalCase
codeName
}}
-portlet'
;
{{/if}}
{{/if}}
{{/
each
}}
{{/
eq
}}
{{#
neq
control
.
portletType
"CONTAINER"
}}
{{#if
control
.
psAppDataEntity
}}
import
{
{{
codeName
}}
Portlet
}
from
'@widgets/
{{
spinalCase
control
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-portlet'
;
{{else}}
import
{
{{
codeName
}}
Portlet
}
from
'@widgets/app/
{{
spinalCase
codeName
}}
-portlet'
;
{{/if}}
{{/
neq
}}
{{/
each
}}
{{/
each
}}
interface
Props
{
interface
Props
{
...
@@ -50,7 +39,13 @@ defineExpose({ name, state });
...
@@ -50,7 +39,13 @@ defineExpose({ name, state });
<template>
<template>
<div
class=
"app-dashboard
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<div
class=
"app-dashboard
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<template
v-if=
"!state.isEnableCustomized"
>
<template
v-if=
"!state.isEnableCustomized"
>
{{>
(
lookup
'DASHBOARD'
)
ctrl
=
ctrl
}}
{{#
each
ctrl
.
psControls
as
|
portlet
|
}}
{{#
eq
portlet
.
portletType
'CONTAINER'
}}
{{>
(
lookup
'PORTLET_CONTAINER'
)
portlet
=
portlet
}}
{{else}}
{{>
(
lookup
'PORTLET'
)
portlet
=
portlet
}}
{{/
eq
}}
{{/
each
}}
</template>
</template>
</div>
</div>
</template>
</template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet-state.ts.hbs
浏览文件 @
5d89de7e
...
@@ -2,16 +2,7 @@
...
@@ -2,16 +2,7 @@
export const ctrlState = {
export const ctrlState = {
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
controlName: '
{{
ctrl
.
name
}}
',
showTitleBar:
{{#if
ctrl
.
showTitleBar
}}
true
{{else}}
false
{{/if}}
,
title: '
{{
ctrl
.
title
}}
',
portletType: '
{{
ctrl
.
portletType
}}
',
portletType: '
{{
ctrl
.
portletType
}}
',
{{#if
ctrl
.
psSysImage
}}
{{#if
ctrl
.
psSysImage
.
cssClass
}}
iconcls: '
{{
ctrl
.
psSysImage
.
cssClass
}}
',
{{else
if
(
ctrl
.
psSysImage
.
imagePath
)
}}
imgPath: '
{{
ctrl
.
psSysImage
.
imagePath
}}
',
{{/if}}
{{/if}}
{{#if
ctrl
.
psLayoutPos
.
height
}}
{{#if
ctrl
.
psLayoutPos
.
height
}}
// 部件高度
// 部件高度
height:
{{
ctrl
.
psLayoutPos
.
height
}}
,
height:
{{
ctrl
.
psLayoutPos
.
height
}}
,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet.vue.hbs
浏览文件 @
5d89de7e
...
@@ -2,14 +2,14 @@
...
@@ -2,14 +2,14 @@
import
{
Subject
}
from
'rxjs'
;
import
{
Subject
}
from
'rxjs'
;
import
{
ctrlState
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-portlet-state'
;
import
{
ctrlState
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-portlet-state'
;
import
{
PortletControl
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
import
{
PortletControl
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
// 引入视图start
{{!-- 引入视图start --}}
{{#if
(
eq
ctrl
.
portletType
"VIEW"
)
}}
{{#if
(
eq
ctrl
.
portletType
"VIEW"
)
}}
{{#if
ctrl
.
portletPSAppView
}}
{{#if
ctrl
.
portletPSAppView
}}
import
{{
ctrl
.
portletPSAppView
.
codeName
}}
from
'@views/
{{
spinalCase
ctrl
.
portletPSAppView
.
psAppModule
.
codeName
}}
/
{{
spinalCase
ctrl
.
portletPSAppView
.
codeName
}}
'
;
import
{{
ctrl
.
portletPSAppView
.
codeName
}}
from
'@views/
{{
spinalCase
ctrl
.
portletPSAppView
.
psAppModule
.
codeName
}}
/
{{
spinalCase
ctrl
.
portletPSAppView
.
codeName
}}
'
;
{{/if}}
{{/if}}
{{/if}}
{{/if}}
// 引入视图end
{{!-- 引入视图end --}}
// 引入菜单start
{{!-- 引入菜单start --}}
{{#if
(
eq
ctrl
.
portletType
"APPMENU"
)
}}
{{#if
(
eq
ctrl
.
portletType
"APPMENU"
)
}}
{{#
each
ctrl
.
psControls
as
|
control
|
}}
{{#
each
ctrl
.
psControls
as
|
control
|
}}
{{#
eq
control
.
controlType
"APPMENU"
}}
{{#
eq
control
.
controlType
"APPMENU"
}}
...
@@ -17,7 +17,7 @@ import { {{control.codeName}}Menu } from '@widgets/app/{{spinalCase control.code
...
@@ -17,7 +17,7 @@ import { {{control.codeName}}Menu } from '@widgets/app/{{spinalCase control.code
{{/
eq
}}
{{/
eq
}}
{{/
each
}}
{{/
each
}}
{{/if}}
{{/if}}
// 引入菜单end
{{!-- 引入菜单end --}}
interface
Props
{
interface
Props
{
...
@@ -25,10 +25,27 @@ interface Props {
...
@@ -25,10 +25,27 @@ interface Props {
context
:
IContext
;
context
:
IContext
;
viewParams
?:
IParam
;
viewParams
?:
IParam
;
viewSubject
:
Subject
<
IActionParam
>
;
viewSubject
:
Subject
<
IActionParam
>
;
showCaption
?:
boolean
;
title
?:
string
;
imgPath
?:
string
;
iconClass
?:
string
;
}
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
{{#if
ctrl
.
title
}}
title
:
'
{{
ctrl
.
title
}}
'
,
{{/if}}
{{#if
ctrl
.
showTitleBar
}}
showCaption
:
'
{{
ctrl
.
showTitleBar
}}
'
,
{{/if}}
{{#if
ctrl
.
psSysImage
}}
{{#if
ctrl
.
psSysImage
.
cssClass
}}
iconcls
:
'
{{
ctrl
.
psSysImage
.
cssClass
}}
'
,
{{else
if
(
ctrl
.
psSysImage
.
imagePath
)
}}
imgPath
:
'
{{
ctrl
.
psSysImage
.
imagePath
}}
'
,
{{/if}}
{{/if}}
})
})
// emit声明
// emit声明
...
@@ -45,14 +62,17 @@ const { name, state, onViewEvent, onCtrlEvent, handleItemClick, handleActionClic
...
@@ -45,14 +62,17 @@ const { name, state, onViewEvent, onCtrlEvent, handleItemClick, handleActionClic
defineExpose
({
name
,
state
});
defineExpose
({
name
,
state
});
</script>
</script>
<template>
<template>
<div
class=
"app-portlet
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<AppPortletCard
<template
v-if=
"state.showTitleBar && state.title"
>
class=
"app-portlet
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
<div
class=
'portlet-title'
>
:title=
"title"
<span>
:iconClass=
"iconClass"
<i
v-if=
"state.iconcls"
:class=
"state.iconcls"
/>
:imgPath=
"imgPath"
<img
v-if=
"state.imagePath"
:src=
"state.imagePath"
/>
:showCaption=
"showCaption"
\{{state.title}}
{{#if
(
or
ctrl
.
width
ctrl
.
height
)
}}
</span>
style=
"
{{#if
ctrl
.
width
}}
width:
{{
ctrl
.
width
}}
px;
{{/if}}{{#if
ctrl
.
height
}}
height:
{{
ctrl
.
height
}}
px;
{{/if}}
"
{{/if}}
>
<template
#
header-right
>
<span
class=
"portlet-action"
v-if=
"state.actionBarModelData && state.portletType !== 'ACTIONBAR'"
>
<span
class=
"portlet-action"
v-if=
"state.actionBarModelData && state.portletType !== 'ACTIONBAR'"
>
<template
v-for=
"(item,index) in Object.values(state.actionBarModelData)"
:key=
"index"
>
<template
v-for=
"(item,index) in Object.values(state.actionBarModelData)"
:key=
"index"
>
<a-tooltip>
<a-tooltip>
...
@@ -67,9 +87,7 @@ defineExpose({ name, state });
...
@@ -67,9 +87,7 @@ defineExpose({ name, state });
</a-tooltip>
</a-tooltip>
</template>
</template>
</span>
</span>
</div>
</template>
</template>
<div
:class=
"{'portlet-with-title': state.showTitleBar, 'portlet-without-title': !state.showTitleBar}"
>
{{#if
(
eq
ctrl
.
portletType
'VIEW'
)
}}
{{#if
(
eq
ctrl
.
portletType
'VIEW'
)
}}
<
{{
ctrl
.
portletPSAppView
.
codeName
}}
<
{{
ctrl
.
portletPSAppView
.
codeName
}}
:context
="
state
.
context
"
:context
="
state
.
context
"
...
@@ -102,7 +120,7 @@ defineExpose({ name, state });
...
@@ -102,7 +120,7 @@ defineExpose({ name, state });
{{else
if
(
eq
ctrl
.
portletType
'TOOLBAR'
)
}}
{{else
if
(
eq
ctrl
.
portletType
'TOOLBAR'
)
}}
<div>
暂未支持工具栏绘制
</div>
<div>
暂未支持工具栏绘制
</div>
{{else
if
(
eq
ctrl
.
portletType
'HTML'
)
}}
{{else
if
(
eq
ctrl
.
portletType
'HTML'
)
}}
<iframe
:src=
"state.pageUrl"
:style=
"{height: state.height && state.height > 0 ?
state.height + 'px
' : '400px', width: '100%', borderWidth: '0px'}"
></iframe>
<iframe
:src=
"state.pageUrl"
:style=
"{height: state.height && state.height > 0 ?
'100%
' : '400px', width: '100%', borderWidth: '0px'}"
></iframe>
{{else
if
(
eq
ctrl
.
portletType
'RAWITEM'
)
}}
{{else
if
(
eq
ctrl
.
portletType
'RAWITEM'
)
}}
<app-raw
<app-raw
:name=
"state.controlName"
:name=
"state.controlName"
...
@@ -111,11 +129,10 @@ defineExpose({ name, state });
...
@@ -111,11 +129,10 @@ defineExpose({ name, state });
:imgPath=
"state.imagePath"
:imgPath=
"state.imagePath"
style=
"
{{#if
ctrl
.
rawItemHeight
}}
height:
{{
ctrl
.
rawItemHeight
}}
px;
{{/if}}{{#if
ctrl
.
rawItemWidth
}}
width:
{{
ctrl
.
rawItemWidth
}}
px
{{/if}}
"
style=
"
{{#if
ctrl
.
rawItemHeight
}}
height:
{{
ctrl
.
rawItemHeight
}}
px;
{{/if}}{{#if
ctrl
.
rawItemWidth
}}
width:
{{
ctrl
.
rawItemWidth
}}
px
{{/if}}
"
{{#if
(
eq
ctrl
.
contentType
'RAW'
)
}}
value=
"
{{
ctrl
.
rawContent
}}
"
{{else
if
(
eq
ctrl
.
contentType
'HTML'
)
}}
:value=
"`
{{
ctrl
.
htmlContent
}}
`"
{{/if}}
{{#if
(
eq
ctrl
.
contentType
'RAW'
)
}}
value=
"
{{
ctrl
.
rawContent
}}
"
{{else
if
(
eq
ctrl
.
contentType
'HTML'
)
}}
:value=
"`
{{
ctrl
.
htmlContent
}}
`"
{{/if}}
></app-raw>
>
></app-raw>
{{else}}
{{else}}
{{/if}}
{{/if}}
</div>
</AppPortletCard>
</div>
</template>
</template>
<style
lang=
"scss"
>
<style
lang=
"scss"
>
</style>
</style>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录