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;
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
java.util.Collection
;
import
java.util.LinkedHashMap
;
...
...
@@ -46,10 +47,15 @@ public class CtrlModel extends BaseModel{
}
}
handleChildControls
();
if
(
"DASHBOARD"
.
equals
(
getControl
().
getControlType
())){
handleAllPortlets
((
IPSControlContainer
)
getControl
());
}
}
public
Map
<
String
,
CtrlModel
>
ctrlsMap
=
new
LinkedHashMap
();
public
Map
<
String
,
IPSControl
>
portletsMap
=
new
LinkedHashMap
();
private
AppModel
app
;
private
AppEntityModel
appEntity
;
...
...
@@ -70,6 +76,11 @@ public class CtrlModel extends BaseModel{
return
ctrlsMap
.
values
();
}
public
Collection
<
IPSControl
>
getAllPortlets
()
{
return
portletsMap
.
values
();
}
public
IPSControl
getControl
()
{
return
(
IPSControl
)
opt
;
...
...
@@ -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
()
{
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
"CONTAINER"
}}{{>
@macro
/
front-end
/
widgets
/
dashboard-detail
/
portlet-container
.
hbs
}}{{/
inline
}}
\ No newline at end of file
{{#
*
inline
"PORTLET_CONTAINER"
}}{{>
@macro
/
front-end
/
widgets
/
dashboard-detail
/
container
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PORTLET"
}}{{>
@macro
/
front-end
/
widgets
/
dashboard-detail
/
portlet
.
hbs
}}{{/
inline
}}
\ 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
name=
"
{{
item
.
codeName
}}
"
:visible=
"state.detailsModel.
{{
item
.
codeName
}}
.visible"
:layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
formDetail
.
psLayout
layoutPos
=
formDetail
.
psLayoutPos
}}
"
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) {
}
// 插槽类名和插槽样式,只有不绘制根元素的时候需要传递给插槽
const
attrs
=
useAttrs
()
// 在template里写会丢失响应性,故封一个计算属性。
const
attrs
=
useAttrs
()
let
slotStyle
=
computed
(()
=>
{
// 有根元素无需传样式给插槽
if
(
!
props
.
noRoot
){
return
''
}
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
(
result
)
if
(
layout
?.
value
?.
colStyle
)
{
if
(
layout
?.
value
?.
colStyle
)
{
result
+=
layout
.
value
.
colStyle
;
}
result
+=
props
.
visible
==
true
?
""
:
"display: none;"
;
return
result
;
});
let
slotClass
=
computed
(()
=>
{
let
result
=
''
;
// 插槽类名
let
slotClass
=
computed
(()
=>
{
// 有根元素无需传类名给插槽
if
(
!
props
.
noRoot
){
return
''
}
let
result
=
'app-col '
;
result
+=
attrs
.
class
;
if
(
props
.
layoutOpts
?.
parentLayout
==
'FLEX'
&&
props
.
noRoot
)
{
result
+=
" app-col
app-col
--flex"
;
if
(
props
.
layoutOpts
?.
parentLayout
==
'FLEX'
)
{
result
+=
" app-col--flex"
;
}
return
result
;
})
// 计算是否需要绘制根元素(layoutOpts不存在或者flex模式下noRoot为true时不绘制根元素)
let
hasRoot
=
computed
(()
=>
{
return
props
.
layoutOpts
!==
undefined
&&
(
props
.
layoutOpts
.
parentLayout
!==
'FLEX'
||
!
props
.
noRoot
);
})
</
script
>
<
template
>
<template
v-if=
"!hasRoot"
>
<!-- 没有根元素的直接输出插槽 -->
<slot
:slotStyle=
"slotStyle"
:slotClass=
"slotClass"
></slot>
<template
v-if=
"layoutOpts"
>
<!-- 有布局模式配置的 -->
<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>
<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>
<
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>(), {
</
script
>
<
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}">
<a-button
:class=
"slotClass"
...
...
@@ -28,7 +28,7 @@ const props = withDefaults(defineProps<FormButtonProps>(), {
<AppIconText
:class=
"labelCssName"
:iconClass=
"iconClass"
:imgPath=
"imagePath"
:text=
"showCaption ? caption : '' "
/>
</a-button>
</
template
>
</
app-c
ol>
</
AppC
ol>
</template>
<
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) => {
</
script
>
<
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}">
<a-card
:class=
"slotClass"
:style=
"slotStyle"
:bordered=
"false"
>
<template
#
title
>
...
...
@@ -132,7 +132,7 @@ const viewEvent = (action:any) => {
<slot
:context=
"druipartContext"
:viewParams=
"druipartViewParams"
:viewEvent=
"viewEvent"
></slot>
</a-card>
</template>
</
app-c
ol>
</
AppC
ol>
</template>
<
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) => {
</
script
>
<
template
>
<
app-c
ol
<
AppC
ol
noRoot
:visible=
"visible"
:layoutOpts=
"layoutOpts"
...
...
@@ -93,12 +93,12 @@ const handleMenuGroupAction = ($event: IParam) => {
</
template
>
</template>
</template>
<
app-r
ow
:layoutOpts=
"layoutOpts"
>
<
AppR
ow
:layoutOpts=
"layoutOpts"
>
<slot></slot>
</
app-r
ow>
</
AppR
ow>
</a-card>
</template>
</
app-c
ol>
</
AppC
ol>
</template>
<
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>(), {
</
script
>
<
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>
</
app-c
ol>
</
AppC
ol>
</
template
>
<
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 = () => {
</
script
>
<
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}">
<a-form-item
:class=
"slotClass"
...
...
@@ -62,7 +62,7 @@ const initRules = () => {
<slot></slot>
</a-form-item>
</template>
</
app-c
ol>
</
AppC
ol>
</template>
<
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>(), {
<
template
>
<a-tab-pane
class=
"app-formPage"
:key=
"$attrs.key"
:tab=
"tab"
>
<
app-r
ow
:layoutOpts=
"layoutOpts"
>
<
AppR
ow
:layoutOpts=
"layoutOpts"
>
<slot></slot>
</
app-r
ow>
</
AppR
ow>
</a-tab-pane>
</
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>(), {
</
script
>
<
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}">
<AppRaw
:class=
"slotClass"
...
...
@@ -27,7 +27,7 @@ const props = withDefaults(defineProps<FormRawProps>(), {
:contentType=
"contentType"
>
</AppRaw>
</
template
>
</
app-c
ol>
</
AppC
ol>
</template>
<
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>(), {
<
template
>
<a-tab-pane
class=
"app-formTabPage"
v-show=
"visible"
:tab=
"caption"
>
<
app-r
ow
:layoutOpts=
"layoutOpts"
>
<
AppR
ow
:layoutOpts=
"layoutOpts"
>
<slot></slot>
</
app-r
ow>
</
AppR
ow>
</a-tab-pane>
</
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>(), {
</
script
>
<
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 }">
<a-tabs
:class=
"slotClass"
:style=
"slotStyle"
>
<slot></slot>
</a-tabs>
</
template
>
</
app-c
ol>
</
AppC
ol>
</template>
<
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)
<AppIconText
class=
"app-view__caption"
size=
"large"
:subCaption=
"state.subCaption"
:showCaptionBar=
"state.showCaptionBar"
:text=
"state.viewCaption"
/>
</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';
import
{
ctrlState
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-dashboard-state'
;
import
{
DashboardControl
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
{{#
each
ctrl
.
psControls
as
|
control
|
}}
{{#
eq
control
.
portletType
"CONTAINER"
}}
{{#
each
control
.
psControls
as
|
control2
|
}}
{{#if
control2
.
psAppDataEntity
}}
import
{
{{
codeName
}}
Portlet
}
from
'@widgets/
{{
spinalCase
control2
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-portlet'
;
{{#
each
ctrl
.
allPortlets
as
|
control
|
}}
{{#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}}
{{/
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
}}
interface
Props
{
...
...
@@ -50,7 +39,13 @@ defineExpose({ name, state });
<template>
<div
class=
"app-dashboard
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<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>
</div>
</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 @@
export const ctrlState = {
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
showTitleBar:
{{#if
ctrl
.
showTitleBar
}}
true
{{else}}
false
{{/if}}
,
title: '
{{
ctrl
.
title
}}
',
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
}}
// 部件高度
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 @@
import
{
Subject
}
from
'rxjs'
;
import
{
ctrlState
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-portlet-state'
;
import
{
PortletControl
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
// 引入视图start
{{!-- 引入视图start --}}
{{#if
(
eq
ctrl
.
portletType
"VIEW"
)
}}
{{#if
ctrl
.
portletPSAppView
}}
import
{{
ctrl
.
portletPSAppView
.
codeName
}}
from
'@views/
{{
spinalCase
ctrl
.
portletPSAppView
.
psAppModule
.
codeName
}}
/
{{
spinalCase
ctrl
.
portletPSAppView
.
codeName
}}
'
;
{{/if}}
{{/if}}
// 引入视图end
// 引入菜单start
{{!-- 引入视图end --}}
{{!-- 引入菜单start --}}
{{#if
(
eq
ctrl
.
portletType
"APPMENU"
)
}}
{{#
each
ctrl
.
psControls
as
|
control
|
}}
{{#
eq
control
.
controlType
"APPMENU"
}}
...
...
@@ -17,7 +17,7 @@ import { {{control.codeName}}Menu } from '@widgets/app/{{spinalCase control.code
{{/
eq
}}
{{/
each
}}
{{/if}}
// 引入菜单end
{{!-- 引入菜单end --}}
interface
Props
{
...
...
@@ -25,10 +25,27 @@ interface Props {
context
:
IContext
;
viewParams
?:
IParam
;
viewSubject
:
Subject
<
IActionParam
>
;
showCaption
?:
boolean
;
title
?:
string
;
imgPath
?:
string
;
iconClass
?:
string
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
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声明
...
...
@@ -45,14 +62,17 @@ const { name, state, onViewEvent, onCtrlEvent, handleItemClick, handleActionClic
defineExpose
({
name
,
state
});
</script>
<template>
<div
class=
"app-portlet
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<template
v-if=
"state.showTitleBar && state.title"
>
<div
class=
'portlet-title'
>
<span>
<i
v-if=
"state.iconcls"
:class=
"state.iconcls"
/>
<img
v-if=
"state.imagePath"
:src=
"state.imagePath"
/>
\{{state.title}}
</span>
<AppPortletCard
class=
"app-portlet
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
:title=
"title"
:iconClass=
"iconClass"
:imgPath=
"imgPath"
:showCaption=
"showCaption"
{{#if
(
or
ctrl
.
width
ctrl
.
height
)
}}
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'"
>
<template
v-for=
"(item,index) in Object.values(state.actionBarModelData)"
:key=
"index"
>
<a-tooltip>
...
...
@@ -67,9 +87,7 @@ defineExpose({ name, state });
</a-tooltip>
</template>
</span>
</div>
</template>
<div
:class=
"{'portlet-with-title': state.showTitleBar, 'portlet-without-title': !state.showTitleBar}"
>
</template>
{{#if
(
eq
ctrl
.
portletType
'VIEW'
)
}}
<
{{
ctrl
.
portletPSAppView
.
codeName
}}
:context
="
state
.
context
"
...
...
@@ -102,7 +120,7 @@ defineExpose({ name, state });
{{else
if
(
eq
ctrl
.
portletType
'TOOLBAR'
)
}}
<div>
暂未支持工具栏绘制
</div>
{{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'
)
}}
<app-raw
:name=
"state.controlName"
...
...
@@ -111,11 +129,10 @@ defineExpose({ name, state });
:imgPath=
"state.imagePath"
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}}
></app-raw>
>
></app-raw>
{{else}}
{{/if}}
</div>
</div>
</AppPortletCard>
</template>
<style
lang=
"scss"
>
</style>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录