Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
459e1d7c
提交
459e1d7c
编写于
4月 07, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新门户部件
上级
1172dead
变更
10
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
84 行增加
和
30 行删除
+84
-30
container.hbs
...7/@macro/front-end/widgets/dashboard-detail/container.hbs
+1
-1
dashboard-control-state.ts
...ules/widgets/dashboard-control/dashboard-control-state.ts
+8
-2
dashboard-control.ts
...re/modules/widgets/dashboard-control/dashboard-control.ts
+8
-4
portlet-control-state.ts
.../modules/widgets/portlet-control/portlet-control-state.ts
+8
-2
portlet-control.ts
...c/core/modules/widgets/portlet-control/portlet-control.ts
+8
-5
{{ctrls@APPMENU}}-menu.vue.hbs
...s}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
+7
-2
{{ctrls@DASHBOARD}}-dashboard-state.ts.hbs
...RD}}-dashboard/{{ctrls@DASHBOARD}}-dashboard-state.ts.hbs
+16
-0
{{ctrls@DASHBOARD}}-dashboard.vue.hbs
...SHBOARD}}-dashboard/{{ctrls@DASHBOARD}}-dashboard.vue.hbs
+1
-1
{{ctrls@PORTLET}}-portlet-state.ts.hbs
...@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet-state.ts.hbs
+7
-0
{{ctrls@PORTLET}}-portlet.vue.hbs
...ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet.vue.hbs
+20
-13
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/dashboard-detail/container.hbs
浏览文件 @
459e1d7c
<AppPortletCard
name=
{{
portlet
.
name
}}
name=
"
{{
portlet
.
name
}}
"
:isContainer=
"true"
{{#if
portlet
.
caption
}}
title=
"
{{
portlet
.
caption
}}
"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/dashboard-control/dashboard-control-state.ts
浏览文件 @
459e1d7c
import
{
IParam
,
MainControlState
}
from
'@core'
;
import
{
MainControlState
}
from
'@core'
;
/**
* @description 数据看板部件状态
...
...
@@ -7,5 +7,11 @@ import { IParam, MainControlState } from '@core';
* @extends {MainControlState}
*/
export
interface
DashboardControlState
extends
MainControlState
{
/**
* 门户部件标识集合
*
* @type {string[]}
* @memberof DashboardControlState
*/
portlets
:
string
[];
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/dashboard-control/dashboard-control.ts
浏览文件 @
459e1d7c
...
...
@@ -22,13 +22,17 @@ export class DashboardControl extends MainControl {
* @param {DashboardControlProps} props
* @memberof DashboardControl
*/
public
useLoad
(
props
:
DashboardControlProps
)
{
const
{
viewSubject
,
controlName
,
context
,
viewParams
}
=
this
.
state
;
public
useLoad
()
{
const
{
viewSubject
,
controlName
,
context
,
viewParams
,
portlets
}
=
this
.
state
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
if
(
Object
.
is
(
controlName
,
tag
)
&&
Object
.
is
(
"load"
,
action
))
{
viewSubject
.
next
({
tag
:
tag
,
action
:
"load"
,
data
:
data
});
if
(
portlets
.
length
)
{
portlets
.
forEach
((
portlet
:
string
)
=>
{
viewSubject
.
next
({
tag
:
portlet
,
action
:
"load"
,
data
:
data
});
});
}
}
})
// 部件卸载时退订viewSubject
...
...
@@ -56,9 +60,9 @@ export class DashboardControl extends MainControl {
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
this
.
useLoad
();
return
{
...
superParams
,
load
:
this
.
useLoad
.
bind
(
this
),
onCtrlEvent
:
this
.
onCtrlEvent
.
bind
(
this
),
};
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/portlet-control/portlet-control-state.ts
浏览文件 @
459e1d7c
import
{
IParam
,
MainControlState
}
from
'@core'
;
import
{
MainControlState
}
from
'@core'
;
/**
* @description 门户部件状态
...
...
@@ -7,5 +7,11 @@ import { IParam, MainControlState } from '@core';
* @extends {MainControlState}
*/
export
interface
PortletControlState
extends
MainControlState
{
/**
* 子部件标识集合
*
* @type {string[]}
* @memberof PortletControlState
*/
childControls
:
string
[];
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/portlet-control/portlet-control.ts
浏览文件 @
459e1d7c
...
...
@@ -22,13 +22,17 @@ export class PortletControl extends MainControl {
* @param {PortletControlProps} props
* @memberof PortletControl
*/
public
useLoad
(
props
:
PortletControlProps
)
{
const
{
viewSubject
,
controlName
,
context
,
viewParams
}
=
this
.
state
;
public
useLoad
()
{
const
{
viewSubject
,
controlName
,
context
,
viewParams
,
childControls
}
=
this
.
state
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
if
(
Object
.
is
(
controlName
,
tag
)
&&
Object
.
is
(
"load"
,
action
))
{
viewSubject
.
next
({
tag
:
tag
,
action
:
"load"
,
data
:
data
});
if
(
childControls
.
length
)
{
childControls
.
forEach
((
control
:
string
)
=>
{
viewSubject
.
next
({
tag
:
control
,
action
:
"load"
,
data
:
data
});
});
}
}
})
// 部件卸载时退订viewSubject
...
...
@@ -115,11 +119,10 @@ export class PortletControl extends MainControl {
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
this
.
useLoad
();
return
{
...
superParams
,
load
:
this
.
useLoad
.
bind
(
this
),
onViewEvent
:
this
.
onViewEvent
.
bind
(
this
),
onCtrlEvent
:
this
.
onCtrlEvent
.
bind
(
this
),
handleItemClick
:
this
.
handleItemClick
.
bind
(
this
),
handleActionClick
:
this
.
handleActionClick
.
bind
(
this
),
};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
浏览文件 @
459e1d7c
...
...
@@ -33,8 +33,13 @@ defineExpose({ name, state, load });
<div
v-if=
"Object.is('CENTER', state.menuAlign)"
class=
"app-menu app-menu--center
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<AppMenuCenter
:menus=
"state.menus"
@
onMenuSelect=
"onMenuSelect"
:counterData=
"counterData"
/>
</div>
<a-menu
v-else
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=
"onMenuSelect"
>
<a-menu
v-else
v-model:openKeys=
"state.defaultOpens"
v-model:selectedKeys=
"state.defaultSelect"
:mode=
"Object.is('LEFT', state.menuAlign) ? 'inline' : 'horizontal'"
class=
"app-menu
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
@
select=
"onMenuSelect"
>
<AppMenuItem
:items=
"state.menus"
:collapsed=
"collapsed"
:counterData=
"counterData"
/>
</a-menu>
</template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@DASHBOARD}}-dashboard/{{ctrls@DASHBOARD}}-dashboard-state.ts.hbs
浏览文件 @
459e1d7c
{{#
*
inline
"getPortlet"
portlet
}}
{{
~#
eq
portlet
.
portletType
'CONTAINER'
~
}}
{{#if
portlet
.
psControls
}}
{{
~#
each
portlet
.
psControls
as
|
control
|~
}}
{{>
getPortlet
portlet
=
control
}}{{#
unless
@last
}}
,
{{/
unless
}}
{{
~
/
each
~
}}
{{/if}}
{{
~
else
~
}}
'
{{
portlet
.
name
}}
'
{{
~
/
eq
~
}}
{{/
inline
}}
// 部件配置对象
export const ctrlState = {
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
isEnableCustomized:
{{
ctrl
.
enableCustomized
}}
,
portlets: [
{{
~#
each
ctrl
.
psControls
as
|
portlet
|~
}}
{{>
getPortlet
portlet
=
portlet
}}{{#
unless
@last
}}
,
{{/
unless
}}
{{
~
/
each
~
}}
]
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@DASHBOARD}}-dashboard/{{ctrls@DASHBOARD}}-dashboard.vue.hbs
浏览文件 @
459e1d7c
...
...
@@ -38,7 +38,7 @@ const { name, state, onCtrlEvent } = dashboardControl;
defineExpose
({
name
,
state
});
</script>
<template>
<AppRow
class=
"app-dashboard
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
ctrl
.
psLayout
layoutPos
=
ctrl
.
psLayoutPos
}}
"
>
<AppRow
class=
"app-dashboard
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
:
layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
ctrl
.
psLayout
layoutPos
=
ctrl
.
psLayoutPos
}}
"
>
<template
v-if=
"!state.isEnableCustomized"
>
{{#
each
ctrl
.
psControls
as
|
portlet
|
}}
{{#
eq
portlet
.
portletType
'CONTAINER'
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet-state.ts.hbs
浏览文件 @
459e1d7c
...
...
@@ -4,6 +4,13 @@ export const ctrlState = {
controlName: '
{{
ctrl
.
name
}}
',
portletType: '
{{
ctrl
.
portletType
}}
',
showCaption:
{{
ctrl
.
showTitleBar
}}
,
childControls: [
{{
~#
if
ctrl
.
psControls
~
}}
{{
~#
each
ctrl
.
psControls
as
|
control
|~
}}
'
{{
control
.
name
}}
'
{{
~
/
each
~
}}
{{
~
/
if
~
}}
],
{{#if
ctrl
.
psAppDataEntity
}}
// 实体名称
appEntityCodeName: '
{{
ctrl
.
psAppDataEntity
.
codeName
}}
',
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet.vue.hbs
浏览文件 @
459e1d7c
...
...
@@ -81,15 +81,16 @@ defineExpose({ name, state });
</template>
</span>
</template>
{{#if
(
eq
ctrl
.
portletType
'VIEW'
)
}}
{{#
eq
ctrl
.
portletType
'VIEW'
}}
<
{{
ctrl
.
portletPSAppView
.
codeName
}}
:context
="
state
.
context
"
:viewParams=
"state.viewParams"
:viewSubject=
"state.viewSubject"
@
viewEvent=
"onViewEvent"
/>
{{else
if
(
eq
ctrl
.
portletType
'APPMENU'
)
}}
{{#
each
ctrl
.
psControls
as
|
control
|
}}
{{/
eq
}}
{{#
eq
ctrl
.
portletType
'APPMENU'
}}
{{#
each
ctrl
.
psControls
as
|
control
|
}}
<
{{
control
.
codeName
}}
Menu
ref=
"menu"
name=
"
{{
name
}}
"
...
...
@@ -100,21 +101,26 @@ defineExpose({ name, state });
:collapsed=
"false"
@
ctrlEvent=
"onCtrlEvent"
></
{{
control
.
codeName
}}
Menu>
{{/
each
}}
{{else
if
(
eq
ctrl
.
portletType
'CUSTOM'
)
}}
{{/
each
}}
{{/
eq
}}
{{#
eq
ctrl
.
portletType
'CUSTOM'
}}
<div>
暂未支持自定义绘制
</div>
{{else
if
(
eq
ctrl
.
portletType
'ACTIONBAR'
)
}}
{{/
eq
}}
{{#
eq
ctrl
.
portletType
'ACTIONBAR'
}}
<app-action-bar
:viewSubject=
"state.viewSubject"
:uiService=
"state.UIService"
:items=
"state.actionBarModelData"
@
itemClick=
"handleItemClick"
></app-action-bar>
{{else
if
(
eq
ctrl
.
portletType
'TOOLBAR'
)
}}
{{/
eq
}}
{{#
eq
ctrl
.
portletType
'TOOLBAR'
}}
<div>
暂未支持工具栏绘制
</div>
{{else
if
(
eq
ctrl
.
portletType
'HTML'
)
}}
{{/
eq
}}
{{#
eq
ctrl
.
portletType
'HTML'
}}
<iframe
:src=
"state.pageUrl"
:style=
"{ height: '100%', width: '100%', borderWidth: '0px' }"
></iframe>
{{else
if
(
eq
ctrl
.
portletType
'RAWITEM'
)
}}
{{/
eq
}}
{{#
eq
ctrl
.
portletType
'RAWITEM'
}}
<app-raw
:name=
"state.controlName"
:contentType=
"state.contentType"
...
...
@@ -123,8 +129,9 @@ defineExpose({ name, state });
style=
"
{{#if
ctrl
.
rawItemHeight
}}
height:
{{
ctrl
.
rawItemHeight
}}
px;
{{/if}}{{#if
ctrl
.
rawItemWidth
}}
width:
{{
ctrl
.
rawItemWidth
}}
px
{{/if}}
"
:value=
"state.rawContent"
></app-raw>
{{else
if
(
eq
ctrl
.
portletType
'LIST'
)
}}
{{#
ctrl
.
psControls
}}
{{/
eq
}}
{{#
eq
ctrl
.
portletType
'LIST'
}}
{{#
ctrl
.
psControls
}}
<
{{
codeName
}}
List
ref=
"portlet"
name=
"
{{
name
}}
"
...
...
@@ -134,8 +141,8 @@ defineExpose({ name, state });
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"onCtrlEvent"
>
</
{{
codeName
}}
List>
{{/
ctrl
.
psControls
}}
{{/if
}}
{{/
ctrl
.
psControls
}}
{{/
eq
}}
</AppPortletCard>
</template>
<style
lang=
"scss"
>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录