Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
41e90bc5
提交
41e90bc5
编写于
1月 27, 2022
作者:
LUCIFER-ZHU
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
834903ef
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
88 行增加
和
9 行删除
+88
-9
portlet-control.ts
...c/core/modules/widgets/portlet-control/portlet-control.ts
+25
-2
app-portlet.scss
.../templ/r7/app_{{apps}}/src/style/widgets/app-portlet.scss
+9
-0
index.scss
...ources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
+2
-1
{{ctrls@PORTLET}}-portlet-state.ts.hbs
...@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet-state.ts.hbs
+23
-1
{{ctrls@PORTLET}}-portlet.vue.hbs
...ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet.vue.hbs
+29
-5
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/portlet-control/portlet-control.ts
浏览文件 @
41e90bc5
...
@@ -62,12 +62,11 @@ export class PortletControl extends MainControl {
...
@@ -62,12 +62,11 @@ export class PortletControl extends MainControl {
}
}
/**
/**
* 触发界面行为
*
操作栏
触发界面行为
*
*
* @memberof PortletControl
* @memberof PortletControl
*/
*/
public
handleItemClick
(
actionParam
:
any
):
void
{
public
handleItemClick
(
actionParam
:
any
):
void
{
console
.
log
(
'视图逻辑'
,
actionParam
);
const
{
data
:
uIAction
}
=
actionParam
;
const
{
data
:
uIAction
}
=
actionParam
;
if
(
!
uIAction
)
{
if
(
!
uIAction
)
{
console
.
warn
(
"执行参数不足"
);
console
.
warn
(
"执行参数不足"
);
...
@@ -86,6 +85,29 @@ export class PortletControl extends MainControl {
...
@@ -86,6 +85,29 @@ export class PortletControl extends MainControl {
}
}
/**
* 界面行为组触发界面行为
*
* @memberof PortletControl
*/
public
handleActionClick
(
item
:
any
,
event
:
any
):
void
{
const
uIAction
=
item
;
if
(
!
uIAction
)
{
console
.
warn
(
"执行参数不足"
);
return
;
}
// 准备参数
const
inputParam
=
{
context
:
this
.
state
.
context
,
viewParams
:
this
.
state
.
viewParams
,
data
:
[],
event
:
event
,
actionEnvironment
:
this
};
// 执行行为
App
.
getAppActionService
().
execute
(
uIAction
,
inputParam
);
}
/**
/**
* @description 安装部件所有功能模块的方法
* @description 安装部件所有功能模块的方法
* @return {*}
* @return {*}
...
@@ -99,6 +121,7 @@ export class PortletControl extends MainControl {
...
@@ -99,6 +121,7 @@ export class PortletControl extends MainControl {
onViewEvent
:
this
.
onViewEvent
.
bind
(
this
),
onViewEvent
:
this
.
onViewEvent
.
bind
(
this
),
onCtrlEvent
:
this
.
onCtrlEvent
.
bind
(
this
),
onCtrlEvent
:
this
.
onCtrlEvent
.
bind
(
this
),
handleItemClick
:
this
.
handleItemClick
.
bind
(
this
),
handleItemClick
:
this
.
handleItemClick
.
bind
(
this
),
handleActionClick
:
this
.
handleActionClick
.
bind
(
this
),
};
};
}
}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/app-portlet.scss
0 → 100644
浏览文件 @
41e90bc5
.app-portlet
{
.portlet-title
{
display
:
flex
;
justify-content
:
space-between
;
a
{
margin-right
:
10px
;
}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
浏览文件 @
41e90bc5
...
@@ -3,4 +3,5 @@
...
@@ -3,4 +3,5 @@
@use
'./app-menu.scss'
;
@use
'./app-menu.scss'
;
@use
'./app-tree-exp-bar.scss'
;
@use
'./app-tree-exp-bar.scss'
;
@use
'./app-tab-exp-panel.scss'
;
@use
'./app-tab-exp-panel.scss'
;
@use
'./app-tab-view-panel.scss'
;
@use
'./app-tab-view-panel.scss'
;
\ No newline at end of file
@use
'./app-portlet.scss'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet-state.ts.hbs
浏览文件 @
41e90bc5
...
@@ -12,6 +12,14 @@ export const ctrlState = {
...
@@ -12,6 +12,14 @@ export const ctrlState = {
imagePath: '
{{
ctrl
.
psSysImage
.
imagePath
}}
',
imagePath: '
{{
ctrl
.
psSysImage
.
imagePath
}}
',
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{#if
ctrl
.
psLayoutPos
.
height
}}
// 部件高度
height:
{{
ctrl
.
psLayoutPos
.
height
}}
,
{{/if}}
{{#if
ctrl
.
psLayoutPos
.
width
}}
// 部件宽度
width:
{{
ctrl
.
psLayoutPos
.
width
}}
,
{{/if}}
{{#if
ctrl
.
psAppDataEntity
}}
{{#if
ctrl
.
psAppDataEntity
}}
// 实体名称
// 实体名称
appEntityCodeName: '
{{
ctrl
.
psAppDataEntity
.
codeName
}}
',
appEntityCodeName: '
{{
ctrl
.
psAppDataEntity
.
codeName
}}
',
...
@@ -21,9 +29,11 @@ export const ctrlState = {
...
@@ -21,9 +29,11 @@ export const ctrlState = {
actionBarModelData: {
actionBarModelData: {
{{#
each
ctrl
.
psUIActionGroup
.
psUIActionGroupDetails
as
|
groupDetail
|
}}
{{#
each
ctrl
.
psUIActionGroup
.
psUIActionGroupDetails
as
|
groupDetail
|
}}
{{
groupDetail
.
psUIAction
.
uIActionTag
}}
: {
{{
groupDetail
.
psUIAction
.
uIActionTag
}}
: {
viewlogicname: '
{{
groupDetail
.
name
}}
',
viewlogicname: '
{{
groupDetail
.
name
}}
',
showCaption:
{{
groupDetail
.
showCaption
}}
,
actionName: '
{{
groupDetail
.
psUIAction
.
caption
}}
',
actionName: '
{{
groupDetail
.
psUIAction
.
caption
}}
',
icon: '
{{
groupDetail
.
psUIAction
.
psSysImage
.
cssClass
}}
',
icon: '
{{
groupDetail
.
psUIAction
.
psSysImage
.
cssClass
}}
',
imagePath: '
{{
groupDetail
.
psUIAction
.
psSysImage
.
imagePath
}}
',
disabled: false, visabled: true,
disabled: false, visabled: true,
dataAccessAction:
{{#if
groupDetail
.
psUIAction
.
dataAccessAction
}}
false
{{else}}
true
{{/if}}
,
dataAccessAction:
{{#if
groupDetail
.
psUIAction
.
dataAccessAction
}}
false
{{else}}
true
{{/if}}
,
getNoPrivDisplayMode:
{{#if
groupDetail
.
psUIAction
.
noPrivDisplayMode
}}
groupDetail.psUIAction.noPrivDisplayMode
{{else}}
6
{{/if}}
,
getNoPrivDisplayMode:
{{#if
groupDetail
.
psUIAction
.
noPrivDisplayMode
}}
groupDetail.psUIAction.noPrivDisplayMode
{{else}}
6
{{/if}}
,
...
@@ -36,4 +46,16 @@ export const ctrlState = {
...
@@ -36,4 +46,16 @@ export const ctrlState = {
{{/
each
}}
{{/
each
}}
},
},
{{/if}}
{{/if}}
{{#if
ctrl
.
pageUrl
}}
// 网页地址
pageUrl: '
{{
ctrl
.
pageUrl
}}
',
{{/if}}
{{#if
ctrl
.
contentType
}}
// 内容类型
contentType:'
{{
ctrl
.
contentType
}}
',
{{/if}}
{{#if
ctrl
.
rawContent
}}
// 直接内容
rawContent:'
{{
ctrl
.
rawContent
}}
',
{{/if}}
};
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet.vue.hbs
浏览文件 @
41e90bc5
...
@@ -39,7 +39,7 @@ interface CtrlEmit {
...
@@ -39,7 +39,7 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
// 安装功能模块,提供状态和能力方法
const
{
name
,
state
,
onViewEvent
,
onCtrlEvent
,
handleItemClick
}
=
new
PortletControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onViewEvent
,
onCtrlEvent
,
handleItemClick
,
handleActionClick
}
=
new
PortletControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
// 暴露内部状态及能力
defineExpose
({
name
,
state
});
defineExpose
({
name
,
state
});
...
@@ -53,6 +53,20 @@ defineExpose({ name, state });
...
@@ -53,6 +53,20 @@ defineExpose({ name, state });
<img
v-if=
"state.imagePath"
:src=
"state.imagePath"
/>
<img
v-if=
"state.imagePath"
:src=
"state.imagePath"
/>
\{{state.title}}
\{{state.title}}
</span>
</span>
<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>
<template
#
title
>
\{{item.actionName}}
</template>
<a
@
click=
"handleActionClick(item,$event)"
>
<i
v-if=
"item.icon"
:class=
"item.icon"
/>
<img
v-if=
"item.imagePath"
:src=
"item.imagePath"
/>
\{{item.actionName}}
</a>
</a-tooltip>
</template>
</span>
</div>
</div>
</template>
</template>
<div
:class=
"{'portlet-with-title': state.showTitleBar, 'portlet-without-title': !state.showTitleBar}"
>
<div
:class=
"{'portlet-with-title': state.showTitleBar, 'portlet-without-title': !state.showTitleBar}"
>
...
@@ -80,14 +94,24 @@ defineExpose({ name, state });
...
@@ -80,14 +94,24 @@ defineExpose({ name, state });
<div>
暂未支持自定义绘制
</div>
<div>
暂未支持自定义绘制
</div>
{{else
if
(
eq
ctrl
.
portletType
'ACTIONBAR'
)
}}
{{else
if
(
eq
ctrl
.
portletType
'ACTIONBAR'
)
}}
<app-action-bar
<app-action-bar
:viewSubject=
"state.viewSubject"
:viewSubject=
"state.viewSubject"
:uiService=
"state.UIService"
:uiService=
"state.UIService"
:items=
"state.actionBarModelData"
:items=
"state.actionBarModelData"
@
itemClick=
"handleItemClick"
@
itemClick=
"handleItemClick"
></app-action-bar>
></app-action-bar>
{{else
if
(
eq
ctrl
.
portletType
'TOOLBAR'
)
}}
{{else
if
(
eq
ctrl
.
portletType
'TOOLBAR'
)
}}
<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>
{{else
if
(
eq
ctrl
.
portletType
'RAWITEM'
)
}}
{{else
if
(
eq
ctrl
.
portletType
'RAWITEM'
)
}}
<app-raw
:name=
"state.controlName"
:contentType=
"state.contentType"
:iconClass=
"state.iconcls"
: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>
>
{{else}}
{{else}}
{{/if}}
{{/if}}
</div>
</div>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录