Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
be500336
提交
be500336
编写于
3月 08, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新面板
上级
8bf6fa90
变更
27
显示空白字符变更
内嵌
并排
正在显示
27 个修改的文件
包含
542 行增加
和
41 行删除
+542
-41
include-view-control.hbs
.../templ/r7/@macro/front-end/views/include-view-control.hbs
+2
-1
view-control-panel.hbs
...-end/views/view-control/view-panel/view-control-panel.hbs
+9
-0
panel-button.hbs
...r7/@macro/front-end/widgets/panel-detail/panel-button.hbs
+18
-0
panel-container.hbs
...@macro/front-end/widgets/panel-detail/panel-container.hbs
+1
-2
panel-detail-model.hbs
...cro/front-end/widgets/panel-detail/panel-detail-model.hbs
+9
-6
panel-field.hbs
.../r7/@macro/front-end/widgets/panel-detail/panel-field.hbs
+1
-2
panel-rawitem.hbs
...7/@macro/front-end/widgets/panel-detail/panel-rawitem.hbs
+26
-0
panel-tabpage.hbs
...7/@macro/front-end/widgets/panel-detail/panel-tabpage.hbs
+23
-0
panel-tabpanel.hbs
.../@macro/front-end/widgets/panel-detail/panel-tabpanel.hbs
+15
-0
app-col.vue
...s/templ/r7/app_{{apps}}/src/components/common/app-col.vue
+12
-7
app-panel-button.vue
...7/app_{{apps}}/src/components/common/app-panel-button.vue
+38
-0
app-panel-container.vue
...pp_{{apps}}/src/components/common/app-panel-container.vue
+26
-8
app-panel-raw.vue
...l/r7/app_{{apps}}/src/components/common/app-panel-raw.vue
+37
-0
app-panel-tab-page.vue
...app_{{apps}}/src/components/common/app-panel-tab-page.vue
+23
-0
app-panel-tab-panel.vue
...pp_{{apps}}/src/components/common/app-panel-tab-panel.vue
+26
-0
app-panel-view-layout.vue
..._{{apps}}/src/components/layout/app-panel-view-layout.vue
+30
-0
layout-tool.ts
...pl/r7/app_{{apps}}/src/core/modules/common/layout-tool.ts
+26
-13
index.ts
...ces/templ/r7/app_{{apps}}/src/core/modules/views/index.ts
+1
-0
index.ts
...7/app_{{apps}}/src/core/modules/views/panel-view/index.ts
+3
-0
panel-view-prop.ts
...ps}}/src/core/modules/views/panel-view/panel-view-prop.ts
+12
-0
panel-view-state.ts
...s}}/src/core/modules/views/panel-view/panel-view-state.ts
+10
-0
panel-view.ts
..._{{apps}}/src/core/modules/views/panel-view/panel-view.ts
+52
-0
panel-control.ts
...}/src/core/modules/widgets/panel-control/panel-control.ts
+47
-0
index.ts.hbs
...c/views/{{appModules}}/{{pages@DEPANELVIEW}}/index.ts.hbs
+3
-0
{{pages@DEPANELVIEW}}-state.ts.hbs
.../{{pages@DEPANELVIEW}}/{{pages@DEPANELVIEW}}-state.ts.hbs
+3
-0
{{pages@DEPANELVIEW}}.vue.hbs
...les}}/{{pages@DEPANELVIEW}}/{{pages@DEPANELVIEW}}.vue.hbs
+87
-0
{{ctrls@PANEL}}-panel.vue.hbs
...ies}}/{{ctrls@PANEL}}-panel/{{ctrls@PANEL}}-panel.vue.hbs
+2
-2
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/views/include-view-control.hbs
浏览文件 @
be500336
...
@@ -5,3 +5,4 @@
...
@@ -5,3 +5,4 @@
{{#
eq
ctrl
.
controlType
"APPMENU"
}}{{>
@macro
/
front-end
/
views
/
view-control
/
view-menu
/
view-control-menu
.
hbs
}}{{/
eq
~
}}
{{#
eq
ctrl
.
controlType
"APPMENU"
}}{{>
@macro
/
front-end
/
views
/
view-control
/
view-menu
/
view-control-menu
.
hbs
}}{{/
eq
~
}}
{{#
eq
ctrl
.
controlType
"PICKUPVIEWPANEL"
}}{{>
@macro
/
front-end
/
views
/
view-control
/
view-pickup-panel
/
view-pickup-panel
.
hbs
}}{{/
eq
~
}}
{{#
eq
ctrl
.
controlType
"PICKUPVIEWPANEL"
}}{{>
@macro
/
front-end
/
views
/
view-control
/
view-pickup-panel
/
view-pickup-panel
.
hbs
}}{{/
eq
~
}}
{{#
eq
ctrl
.
controlType
"TREEVIEW"
}}{{>
@macro
/
front-end
/
views
/
view-control
/
view-tree
/
view-control-tree
.
hbs
}}{{/
eq
~
}}
{{#
eq
ctrl
.
controlType
"TREEVIEW"
}}{{>
@macro
/
front-end
/
views
/
view-control
/
view-tree
/
view-control-tree
.
hbs
}}{{/
eq
~
}}
{{#
eq
ctrl
.
controlType
"PANEL"
}}{{>
@macro
/
front-end
/
views
/
view-control
/
view-panel
/
view-control-panel
.
hbs
}}{{/
eq
~
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/views/view-control/view-panel/view-control-panel.hbs
0 → 100644
浏览文件 @
be500336
{{
ctrl
.
name
}}
:{
action:{
loadAction: '
{{
ctrl
.
getPSControlAction
.
psAppDEMethod
.
codeName
}}
',
removeAction: '
{{
ctrl
.
removePSControlAction
.
psAppDEMethod
.
codeName
}}
',
updateAction: '
{{
ctrl
.
updatePSControlAction
.
psAppDEMethod
.
codeName
}}
',
loadDraftAction: '
{{
ctrl
.
getDraftPSControlAction
.
psAppDEMethod
.
codeName
}}
',
createAction: '
{{
ctrl
.
createPSControlAction
.
psAppDEMethod
.
codeName
}}
'
}
},
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/panel-detail/panel-button.hbs
浏览文件 @
be500336
<AppPanelButton
{{#if
item
.
caption
}}
caption=
"
{{
item
.
caption
}}
"
{{/if}}
class=
"app-panel-button app-panel-button__
{{
lowerCase
item
.
name
}}{{#if
item
.
psSysCss
}}
{{
item
.
psSysCss
.
cssName
}}{{/if}}
"
name=
"
{{
item
.
name
}}
"
tooltip=
"
{{#if
item
.
tooltip
}}{{
item
.
tooltip
}}{{else
if
item
.
caption
}}{{
item
.
caption
}}{{/if}}
"
:visible=
"state.detailsModel.
{{
item
.
name
}}
.visible"
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
:uIAction=
"state.detailsModel.
{{
item
.
name
}}
.uIAction"
:layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
item
.
psLayout
layoutPos
=
item
.
psLayoutPos
}}
"
{{#if
(
or
item
.
width
item
.
height
)
}}
style=
"
{{#if
item
.
width
}}
width:
{{
item
.
width
}}
px;
{{/if}}{{#if
item
.
height
}}
height:
{{
item
.
height
}}
px;
{{/if}}
"
{{/if}}
:showCaption=
"
{{
item
.
showCaption
}}
"
@
onPanelItemEvents=
"onPanelItemEvents"
>
<AppIconText
{{#if
item
.
labelPSSysCss
}}
class=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
{{/if}}{{#if
item
.
psSysImage
}}{{#if
item
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
item
.
psSysImage
.
cssClass
}}
"
{{/if}}{{#if
item
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
{{/if}}{{/if}}
text=
"
{{
item
.
caption
}}
"
/>
</AppPanelButton>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/panel-detail/panel-container.hbs
浏览文件 @
be500336
...
@@ -13,11 +13,10 @@
...
@@ -13,11 +13,10 @@
{{#if
item
.
psSysImage
.
imagePath
}}
{{#if
item
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
{{/if}}
{{/if}}
:showCaption=
"
{{
item
.
showCaption
}}
"
{{#if
item
.
labelPSSysCss
}}
{{#if
item
.
labelPSSysCss
}}
labelCssName=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
labelCssName=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
{{/if}}
{{/if}}
>
:showCaption=
"
{{
item
.
showCaption
}}
"
>
{{#if
item
.
psPanelItems
}}
{{#if
item
.
psPanelItems
}}
{{#
each
item
.
psPanelItems
as
|
childItem
|
}}
{{#
each
item
.
psPanelItems
as
|
childItem
|
}}
{{>
@macro
/
front-end
/
widgets
/
panel-detail
/
include-panel
.
hbs
item
=
childItem
type
=
childItem
.
itemType
}}
{{>
@macro
/
front-end
/
widgets
/
panel-detail
/
include-panel
.
hbs
item
=
childItem
type
=
childItem
.
itemType
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/panel-detail/panel-detail-model.hbs
浏览文件 @
be500336
{{
item
.
name
}}
: {
{{
item
.
name
}}
: {
{{#
eq
itemType
'TABPANEL'
}}
{{#
each
item
.
psPanelTabPages
}}
{{#
eq
@index
0
}}
activedKey: '
{{
lowerCase
this
.
name
}}
',
{{/
eq
}}
{{/
each
}}
{{/
eq
}}
{{#
item
}}
{{#
item
}}
caption: '
{{
caption
}}
',
caption: '
{{
caption
}}
',
disabled: false,
disabled: false,
...
@@ -11,7 +18,7 @@
...
@@ -11,7 +18,7 @@
uIAction: {
uIAction: {
actionTarget: '
{{
actionTarget
}}
',
actionTarget: '
{{
actionTarget
}}
',
dataAccessAction: '
{{
dataAccessAction
}}
',
dataAccessAction: '
{{
dataAccessAction
}}
',
noPrivDisplayMode: '
{{
noPrivDisplayMode
}}
'
noPrivDisplayMode: '
{{
noPrivDisplayMode
}}
'
,
uIActionType: '
{{
uIActionType
}}
',
uIActionType: '
{{
uIActionType
}}
',
uIActionTag: '
{{
uIActionTag
}}
',
uIActionTag: '
{{
uIActionTag
}}
',
uIActionMode: '
{{
uIActionMode
}}
',
uIActionMode: '
{{
uIActionMode
}}
',
...
@@ -27,10 +34,6 @@
...
@@ -27,10 +34,6 @@
{{/if}}
{{/if}}
{{#if
item
.
psPanelTabPages
}}
{{#if
item
.
psPanelTabPages
}}
{{#
each
item
.
psPanelTabPages
as
|
tabPage
|
}}
{{#
each
item
.
psPanelTabPages
as
|
tabPage
|
}}
{{#if
tabPage
.
psPanelItems
}}
{{>
@macro
/
front-end
/
widgets
/
panel-detail
/
panel-detail-model
.
hbs
item
=
tabPage
}}
{{#
each
tabPage
.
psPanelItems
as
|
tabPanel
|
}}
{{>
@macro
/
front-end
/
widgets
/
panel-detail
/
panel-detail-model
.
hbs
item
=
tabPanel
}}
{{/
each
}}
{{/if}}
{{/
each
}}
{{/
each
}}
{{/if}}
{{/if}}
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/panel-detail/panel-field.hbs
浏览文件 @
be500336
...
@@ -15,14 +15,13 @@
...
@@ -15,14 +15,13 @@
{{#if
item
.
psSysImage
.
imagePath
}}
{{#if
item
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
{{/if}}
{{/if}}
:showCaption=
"
{{
item
.
showCaption
}}
"
{{#if
item
.
labelPSSysCss
}}
{{#if
item
.
labelPSSysCss
}}
labelCssName=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
labelCssName=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
{{/if}}
{{/if}}
{{#if
item
.
labelPos
}}
{{#if
item
.
labelPos
}}
labelPos=
"
{{
item
.
labelPos
}}
"
labelPos=
"
{{
item
.
labelPos
}}
"
{{/if}}
{{/if}}
>
:showCaption=
"
{{
item
.
showCaption
}}
"
>
{{#if
item
.
psEditor
}}
{{#if
item
.
psEditor
}}
<div
class=
"panel-editor-container"
style=
"
{{#if
item
.
psEditor
.
editorWidth
}}
width:
{{
item
.
psEditor
.
editorWidth
}}
px;
{{/if}}{{#if
item
.
psEditor
.
editorHeight
}}
height:
{{
item
.
psEditor
.
editorHeight
}}
px
{{/if}}
"
>
<div
class=
"panel-editor-container"
style=
"
{{#if
item
.
psEditor
.
editorWidth
}}
width:
{{
item
.
psEditor
.
editorWidth
}}
px;
{{/if}}{{#if
item
.
psEditor
.
editorHeight
}}
height:
{{
item
.
psEditor
.
editorHeight
}}
px
{{/if}}
"
>
{{>
@macro
/
front-end
/
editors
/
include-editor
.
hbs
type
=
item
.
psEditor
.
editorType
item
=
item
ctrlType
=
"panel"
}}
{{>
@macro
/
front-end
/
editors
/
include-editor
.
hbs
type
=
item
.
psEditor
.
editorType
item
=
item
ctrlType
=
"panel"
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/panel-detail/panel-rawitem.hbs
浏览文件 @
be500336
<AppPanelRaw
name=
"
{{
item
.
name
}}
"
:visible=
"state.detailsModel.
{{
item
.
name
}}
.visible"
class=
"app-panel-rawitem app-panel-rawitem__
{{
lowerCase
item
.
name
}}{{#if
item
.
psSysCss
}}
{{
item
.
psSysCss
.
cssName
}}{{/if}}
"
{{#if
item
.
psSysImage
}}
{{#if
item
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
item
.
psSysImage
.
cssClass
}}
"
{{/if}}
{{#if
item
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
{{/if}}
{{/if}}
{{#if
(
and
item
.
psLayoutPos
(
or
item
.
psLayoutPos
.
width
item
.
psLayoutPos
.
height
))
}}
style=
"
{{#if
item
.
psLayoutPos
.
width
}}
width:
{{
item
.
psLayoutPos
.
width
}}
px;
{{/if}}{{#if
item
.
psLayoutPos
.
height
}}
height:
{{
item
.
psLayoutPos
.
height
}}
px;
{{/if}}
"
{{/if}}
{{#if
(
or
(
gt
item
.
rawItemWidth
0
)
(
gt
item
.
rawItemHeight
0
))
}}
rawStyle=
"
{{#
gt
item
.
rawItemWidth
0
}}
width:
{{
item
.
rawItemWidth
}}
px;
{{/
gt
}}{{#
gt
item
.
rawItemHeight
0
}}
height:
{{
item
.
rawItemHeight
}}
px;
{{/
gt
}}
"
{{/if}}
:layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
item
.
psLayout
layoutPos
=
item
.
psLayoutPos
}}
"
{{#if
(
eq
item
.
contentType
'RAW'
)
}}
value=
"
{{
item
.
rawContent
}}
"
{{else
if
(
eq
item
.
contentType
'HTML'
)
}}
:value=
"`
{{
item
.
htmlContent
}}
`"
{{/if}}
contentType=
"
{{
item
.
contentType
}}
"
>
</AppPanelRaw>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/panel-detail/panel-tabpage.hbs
浏览文件 @
be500336
<AppPanelTabPage
name=
"
{{
item
.
name
}}
"
caption=
"
{{
item
.
caption
}}
"
tabClass=
"app-panel-tabpage app-panel-tabpage__
{{
lowerCase
item
.
name
}}{{#if
item
.
psSysCss
}}
{{
item
.
psSysCss
.
cssName
}}{{/if}}
"
key=
"
{{
item
.
name
}}
"
:visible=
"state.detailsModel.
{{
item
.
name
}}
.visible"
:layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
item
.
psLayout
layoutPos
=
item
.
psLayoutPos
}}
"
{{#if
(
or
item
.
width
item
.
height
)
}}
style=
"
{{#if
item
.
width
}}
width:
{{
item
.
width
}}
px;
{{/if}}{{#if
item
.
height
}}
height:
{{
item
.
height
}}
px;
{{/if}}
"
{{/if}}
{{#if
item
.
labelPSSysCss
}}
labelCssName=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
{{/if}}
:showCaption=
"
{{
item
.
showCaption
}}
"
>
<template
#
tab
>
<AppIconText
{{#if
item
.
labelPSSysCss
}}
class=
"
{{
item
.
labelPSSysCss
.
cssName
}}
"
{{/if}}{{#if
item
.
psSysImage
}}{{#if
item
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
item
.
psSysImage
.
cssClass
}}
"
{{/if}}{{#if
item
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
{{/if}}{{/if}}
text=
"
{{
item
.
caption
}}
"
/>
</template>
{{#if
item
.
psPanelItems
}}
{{#
each
item
.
psPanelItems
as
|
childItem
|
}}
{{>
@macro
/
front-end
/
widgets
/
panel-detail
/
include-panel
.
hbs
item
=
childItem
type
=
childItem
.
itemType
}}
{{/
each
}}
{{/if}}
</AppPanelTabPage>
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/panel-detail/panel-tabpanel.hbs
浏览文件 @
be500336
<AppPanelTabPanel
:activeKey=
"state.detailsModel.
{{
item
.
name
}}
.activedKey"
name=
"
{{
item
.
name
}}
"
class=
"app-panel-tabpanel app-panel-tabpanel__
{{
lowerCase
item
.
name
}}{{#if
item
.
psSysCss
}}
{{
item
.
psSysCss
.
cssName
}}{{/if}}
"
:visible=
"state.detailsModel.
{{
item
.
name
}}
.visible"
{{#if
(
or
item
.
width
item
.
height
)
}}
style=
"
{{#if
item
.
width
}}
width:
{{
item
.
width
}}
px;
{{/if}}{{#if
item
.
height
}}
height:
{{
item
.
height
}}
px;
{{/if}}
"
{{/if}}
:layoutOpts=
"
{{>
@macro
/
front-end
/
common
/
layoutPos
.
hbs
layout
=
item
.
psLayout
layoutPos
=
item
.
psLayoutPos
}}
"
>
{{#if
item
.
psPanelTabPages
}}
{{#
each
item
.
psPanelTabPages
as
|
tabPage
|
}}
{{>
@macro
/
front-end
/
widgets
/
panel-detail
/
include-panel
.
hbs
item
=
tabPage
type
=
tabPage
.
itemType
}}
{{/
each
}}
{{/if}}
</AppPanelTabPanel>
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-col.vue
浏览文件 @
be500336
...
@@ -25,16 +25,21 @@ const attrs = useAttrs()
...
@@ -25,16 +25,21 @@ const attrs = useAttrs()
let
slotStyle
=
computed
(()
=>
{
let
slotStyle
=
computed
(()
=>
{
// 有根元素无需传样式给插槽
// 有根元素无需传样式给插槽
if
(
!
props
.
noRoot
){
if
(
!
props
.
noRoot
){
return
''
return
{};
}
let
result
=
''
;
if
(
attrs
.
style
)
{
result
+=
isObject
(
attrs
.
style
)
?
styleObj2Str
(
attrs
.
style
)
:
attrs
.
style
;
}
}
let
result
=
{};
if
(
layout
?.
value
?.
colStyle
)
{
if
(
layout
?.
value
?.
colStyle
)
{
result
+=
layout
.
value
.
colStyle
;
Object
.
assign
(
result
,
layout
.
value
.
colStyle
);
}
if
(
props
.
layoutOpts
?.
selfLayout
===
'FLEX'
&&
layout
?.
value
?.
rowStyle
)
{
Object
.
assign
(
result
,
layout
.
value
.
rowStyle
);
}
if
(
!
props
.
visible
)
{
Object
.
assign
(
result
,
{
display
:
'none'
});
}
if
(
attrs
.
style
)
{
Object
.
assign
(
result
,
attrs
.
style
);
}
}
result
+=
props
.
visible
==
true
?
""
:
"display: none;"
;
return
result
;
return
result
;
});
});
// 插槽类名
// 插槽类名
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-panel-button.vue
0 → 100644
浏览文件 @
be500336
<
script
setup
lang=
"ts"
>
import
{
IActionParam
,
IParam
,
deepCopy
,
ILayoutOpts
}
from
'@core'
;
interface
IProps
{
name
:
string
;
tooltip
:
string
;
caption
?:
string
;
visible
?:
boolean
;
showCaption
?:
boolean
;
disabled
?:
boolean
;
uIAction
:
IParam
;
layoutOpts
:
ILayoutOpts
;
}
const
props
=
withDefaults
(
defineProps
<
IProps
>
(),
{
visible
:
true
,
showCaption
:
true
,
disabled
:
false
});
interface
EmitEvents
{
(
name
:
'onPanelItemEvents'
,
value
:
IActionParam
):
void
}
const
emit
=
defineEmits
<
EmitEvents
>
();
// 按钮点击
const
click
=
(
event
:
MouseEvent
)
=>
{
const
params
=
deepCopy
(
props
.
uIAction
);
Object
.
assign
(
params
,
{
event
:
event
});
emit
(
'onPanelItemEvents'
,
{
tag
:
props
.
name
,
action
:
'PanelButton'
,
data
:
params
});
}
</
script
>
<
template
>
<a-col
v-show=
"visible"
>
<a-button
type=
"primary"
:disabled=
"disabled"
@
click
.
stop=
"click"
>
<slot></slot>
</a-button>
</a-col>
</
template
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-panel-container.vue
浏览文件 @
be500336
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ILayoutOpts
}
from
"@core"
;
import
{
ILayoutOpts
,
LayoutTool
}
from
"@core"
;
// 输入参数
// 输入参数
interface
IProps
{
interface
IProps
{
caption
?:
string
caption
?:
string
...
@@ -11,14 +11,32 @@ interface IProps {
...
@@ -11,14 +11,32 @@ interface IProps {
const
props
=
withDefaults
(
defineProps
<
IProps
>
(),
{
const
props
=
withDefaults
(
defineProps
<
IProps
>
(),
{
showCaption
:
true
showCaption
:
true
});
});
const
layout
=
LayoutTool
.
useLayout
(
toRef
(
props
,
"layoutOpts"
));
const
attrs
=
useAttrs
();
const
getStyle
=
computed
(()
=>
{
const
{
parentLayout
,
selfLayout
}
=
props
.
layoutOpts
;
const
style
=
{};
if
(
parentLayout
===
'FLEX'
)
{
Object
.
assign
(
style
,
layout
.
value
.
colStyle
);
}
if
(
selfLayout
===
'FLEX'
)
{
Object
.
assign
(
style
,
layout
.
value
.
rowStyle
);
}
if
(
attrs
.
style
)
{
Object
.
assign
(
style
,
attrs
.
style
);
}
return
style
;
});
</
script
>
</
script
>
<
template
>
<
template
>
<AppCol
noRoot
:visible=
"visible"
:layoutOpts=
"layoutOpts"
>
<a-col
v-show=
"visible"
:style=
"getStyle"
>
<template
#
default=
"
{ slotClass, slotStyle }">
<div
v-if=
"showCaption"
class=
"panel-container-header"
>
<div
:class=
"slotClass"
:style=
"slotStyle"
>
<span
class=
"text"
>
{{
caption
}}
</span>
<slot></slot>
</div>
</div>
<
/
template
>
<
slot></slot
>
</
AppCol>
</
a-col>
</
template
>
</
template
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-panel-raw.vue
0 → 100644
浏览文件 @
be500336
<
script
setup
lang=
"ts"
>
import
{
IActionParam
,
ILayoutOpts
,
IParam
}
from
"@core"
;
interface
FormRawProps
{
name
:
string
;
layoutOpts
:
ILayoutOpts
;
visible
?:
boolean
;
iconClass
?:
string
;
imgPath
?:
string
;
value
?:
any
;
contentType
?:
string
;
rawStyle
?:
IParam
}
const
props
=
withDefaults
(
defineProps
<
FormRawProps
>
(),
{
visible
:
true
,
});
</
script
>
<
template
>
<AppCol
:visible=
"visible"
noRoot
:layoutOpts=
"layoutOpts"
class=
"app-panel-raw"
>
<template
#
default=
"
{ slotStyle, slotClass }">
<AppRaw
:name=
"name"
:class=
"slotClass"
:style=
"slotStyle"
:iconClass=
"iconClass"
:value=
"value"
:rawStyle=
"rawStyle"
:contentType=
"contentType"
>
</AppRaw>
</
template
>
</AppCol>
</template>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-panel-tab-page.vue
0 → 100644
浏览文件 @
be500336
<
script
setup
lang=
"ts"
>
import
{
ILayoutOpts
}
from
'@core'
;
interface
IProps
{
tabClass
:
string
;
caption
?:
string
name
:
string
;
layoutOpts
:
ILayoutOpts
;
visible
:
boolean
;
showCaption
?:
boolean
}
// 输入参数
const
props
=
withDefaults
(
defineProps
<
IProps
>
(),
{
showCaption
:
true
});
</
script
>
<
template
>
<a-tab-pane
:class=
"tabClass"
v-show=
"visible"
:key=
"name"
>
<AppRow
:layoutOpts=
"layoutOpts"
>
<slot></slot>
</AppRow>
</a-tab-pane>
</
template
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-panel-tab-panel.vue
0 → 100644
浏览文件 @
be500336
<
script
setup
lang=
"ts"
>
import
{
ILayoutOpts
}
from
'@core'
;
interface
IProps
{
activeKey
:
string
;
caption
?:
string
name
:
string
;
layoutOpts
:
ILayoutOpts
;
visible
:
boolean
;
showCaption
?:
boolean
;
}
// 输入参数
const
props
=
withDefaults
(
defineProps
<
IProps
>
(),
{
showCaption
:
true
});
</
script
>
<
template
>
<AppCol
:visible=
"visible"
:layoutOpts=
"layoutOpts"
noRoot
>
<template
#
default=
"
{ slotClass, slotStyle }">
<a-tabs
v-model:activeKey=
"activeKey"
:class=
"slotClass"
:style=
"slotStyle"
>
<slot></slot>
</a-tabs>
</
template
>
</AppCol>
</template>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/app-panel-view-layout.vue
0 → 100644
浏览文件 @
be500336
<
script
setup
lang=
"ts"
>
</
script
>
<
template
>
<AppViewBaseLayout>
<template
v-slot:header-left
>
<slot
name=
"caption"
/>
</
template
>
<
template
v-slot:header-right
>
<slot
name=
"toolbar"
/>
</
template
>
<
template
v-slot:header-bottom
>
<slot
name=
"topMessage"
/>
<slot
name=
"searchForm"
/>
</
template
>
<
template
v-slot:body-top
>
<slot
name=
"bodyMessage"
/>
</
template
>
<slot
/>
<
template
v-slot:footer-content
>
<slot
name=
"bottomMessage"
/>
</
template
>
</AppViewBaseLayout>
</template>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/common/layout-tool.ts
浏览文件 @
be500336
import
{
ILayoutOpts
,
notEmpty
}
from
'@core'
;
import
{
ILayoutOpts
,
notEmpty
,
IParam
}
from
'@core'
;
import
{
isNumber
}
from
'qx-util'
;
import
{
isNumber
}
from
'qx-util'
;
import
{
Ref
}
from
'vue'
;
import
{
Ref
}
from
'vue'
;
...
@@ -17,16 +17,27 @@ export class LayoutTool {
...
@@ -17,16 +17,27 @@ export class LayoutTool {
* @returns {string}
* @returns {string}
* @memberof LayoutTool
* @memberof LayoutTool
*/
*/
public
static
getRowFlexStyle
(
layoutOpts
:
ILayoutOpts
):
string
{
public
static
getRowFlexStyle
(
layoutOpts
:
ILayoutOpts
):
IParam
{
if
(
layoutOpts
?.
selfLayout
==
'FLEX'
)
{
if
(
layoutOpts
?.
selfLayout
==
'FLEX'
)
{
const
{
dir
,
align
,
vAlign
}
=
layoutOpts
;
const
{
dir
,
align
,
vAlign
}
=
layoutOpts
;
let
cssStyle
:
string
=
'width: 100%; height: 100%; overflow: auto; display: flex;'
;
const
cssStyle
=
{
cssStyle
+=
dir
?
`flex-direction:
${
dir
}
;`
:
''
;
width
:
'100%'
,
cssStyle
+=
align
?
`justify-content:
${
align
}
;`
:
''
;
height
:
'100%'
,
cssStyle
+=
vAlign
?
`align-items:
${
vAlign
}
;`
:
''
;
overflow
:
'auto'
,
display
:
'flex'
};
if
(
dir
)
{
Object
.
assign
(
cssStyle
,
{
'flex-direction'
:
dir
});
}
if
(
align
)
{
Object
.
assign
(
cssStyle
,
{
'justify-content'
:
align
});
}
if
(
vAlign
)
{
Object
.
assign
(
cssStyle
,
{
'align-items'
:
vAlign
});
}
return
cssStyle
;
return
cssStyle
;
}
else
{
}
else
{
return
''
;
return
{}
;
}
}
}
}
...
@@ -38,12 +49,14 @@ export class LayoutTool {
...
@@ -38,12 +49,14 @@ export class LayoutTool {
* @returns {string}
* @returns {string}
* @memberof LayoutTool
* @memberof LayoutTool
*/
*/
public
static
getColFlexStyle
(
layoutOpts
:
ILayoutOpts
):
string
{
public
static
getColFlexStyle
(
layoutOpts
:
ILayoutOpts
):
IParam
{
if
(
layoutOpts
?.
parentLayout
==
'FLEX'
&&
notEmpty
(
layoutOpts
.
grow
))
{
if
(
layoutOpts
?.
parentLayout
==
'FLEX'
&&
notEmpty
(
layoutOpts
.
grow
))
{
let
grow
=
layoutOpts
.
grow
!
<
0
?
0
:
layoutOpts
.
grow
;
let
grow
=
layoutOpts
.
grow
!
<
0
?
0
:
layoutOpts
.
grow
;
return
`flex-grow:
${
grow
}
;`
;
return
{
'flex-grow'
:
grow
}
}
}
return
''
;
return
{}
;
}
}
/**
/**
...
@@ -112,9 +125,9 @@ export class LayoutTool {
...
@@ -112,9 +125,9 @@ export class LayoutTool {
*/
*/
public
static
useLayout
(
layoutOpts
:
Ref
<
ILayoutOpts
>
)
{
public
static
useLayout
(
layoutOpts
:
Ref
<
ILayoutOpts
>
)
{
// 创建新的ref对象
// 创建新的ref对象
const
layoutResult
:
Ref
<
{
rowStyle
:
string
;
colStyle
:
string
;
colGridOpts
:
any
}
>
=
ref
({
const
layoutResult
:
Ref
<
{
rowStyle
:
IParam
;
colStyle
:
IParam
;
colGridOpts
:
any
}
>
=
ref
({
rowStyle
:
''
,
rowStyle
:
{}
,
colStyle
:
''
,
colStyle
:
{}
,
colGridOpts
:
{},
colGridOpts
:
{},
});
});
watch
(
watch
(
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/index.ts
浏览文件 @
be500336
...
@@ -13,3 +13,4 @@ export * from './tree-view'
...
@@ -13,3 +13,4 @@ export * from './tree-view'
export
*
from
'./portal-view'
export
*
from
'./portal-view'
export
*
from
'./tab-exp-view'
export
*
from
'./tab-exp-view'
export
*
from
'./list-view'
export
*
from
'./list-view'
export
*
from
'./panel-view'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/panel-view/index.ts
0 → 100644
浏览文件 @
be500336
export
*
from
'./panel-view-prop'
export
*
from
'./panel-view-state'
export
*
from
'./panel-view'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/panel-view/panel-view-prop.ts
0 → 100644
浏览文件 @
be500336
import
{
MainViewProps
}
from
"../main-view"
;
/**
* 实体面板视图输入参数
*
* @export
* @interface PanelViewProps
* @extends {MainViewProps}
*/
export
interface
PanelViewProps
extends
MainViewProps
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/panel-view/panel-view-state.ts
0 → 100644
浏览文件 @
be500336
import
{
MainViewState
}
from
"../main-view"
;
/**
* 实体面板视图状态
*
* @export
* @interface PanelViewState
* @extends {MainViewState}
*/
export
interface
PanelViewState
extends
MainViewState
{}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/panel-view/panel-view.ts
0 → 100644
浏览文件 @
be500336
import
{
IParam
}
from
"@core/interface"
;
import
{
MainView
}
from
"../main-view"
;
import
{
PanelViewState
}
from
"./panel-view-state"
;
/**
* 实体面板视图
*
* @export
* @class PanelView
* @extends {MainView}
*/
export
class
PanelView
extends
MainView
{
/**
* 实体面板视图输入参数
*
* @type {PanelViewState}
* @memberof PanelView
*/
public
declare
state
:
PanelViewState
;
/**
* 面板部件引用
*
* @type {IParam}
* @memberof PanelView
*/
public
declare
panel
:
IParam
;
/**
* 视图初始化模块
*
* @memberof PanelView
*/
public
useViewInit
():
void
{
super
.
useViewInit
();
this
.
panel
=
ref
(
null
);
}
/**
* 安装视图所有功能模块
*
* @return {*}
* @memberof PanelView
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
panel
:
this
.
panel
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/panel-control/panel-control.ts
浏览文件 @
be500336
...
@@ -85,10 +85,56 @@ export class PanelControl extends MainControl {
...
@@ -85,10 +85,56 @@ export class PanelControl extends MainControl {
return
load
;
return
load
;
}
}
/**
* 加载面板数据
*
* @private
* @param {IParam} [opts={}]
* @memberof PanelControl
*/
private
loadPanelData
(
opts
:
IParam
=
{})
{
private
loadPanelData
(
opts
:
IParam
=
{})
{
}
}
/**
* 处理面板项事件
*
* @protected
* @param {IActionParam} actionParam
* @memberof PanelControl
*/
protected
onPanelItemEvents
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
switch
(
action
)
{
case
'PanelButton'
:
this
.
handleButtonAction
(
tag
,
data
);
break
;
}
}
/**
* 处理按钮行为
*
* @private
* @param {string} tag 按钮标识
* @param {IParam} action 数据源
* @memberof PanelControl
*/
private
handleButtonAction
(
tag
:
string
,
action
:
IParam
)
{
if
(
!
action
)
{
console
.
warn
(
"面板按钮执行参数不足"
);
return
;
}
const
inputParam
=
{
context
:
this
.
state
.
context
,
viewParams
:
this
.
state
.
viewParams
,
data
:
this
.
getData
(),
event
:
action
.
event
,
actionEnvironment
:
this
}
App
.
getAppActionService
().
execute
(
action
,
inputParam
);
}
/**
/**
* @description 安装部件所有功能模块的方法
* @description 安装部件所有功能模块的方法
* @return {*}
* @return {*}
...
@@ -100,6 +146,7 @@ export class PanelControl extends MainControl {
...
@@ -100,6 +146,7 @@ export class PanelControl extends MainControl {
return
{
return
{
...
superParams
,
...
superParams
,
load
:
this
.
useLoad
(),
load
:
this
.
useLoad
(),
onPanelItemEvents
:
this
.
onPanelItemEvents
.
bind
(
this
)
}
}
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPANELVIEW}}/index.ts.hbs
0 → 100644
浏览文件 @
be500336
import
{{
page
.
codeName
}}
from "./
{{
spinalCase
page
.
codeName
}}
.vue";
export default
{{
page
.
codeName
}}
;
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPANELVIEW}}/{{pages@DEPANELVIEW}}-state.ts.hbs
0 → 100644
浏览文件 @
be500336
export const viewState = {
{{>
@macro
/
front-end
/
views
/
view-base-config
.
hbs
}}
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPANELVIEW}}/{{pages@DEPANELVIEW}}.vue.hbs
0 → 100644
浏览文件 @
be500336
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
PanelView
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
import
{
viewState
}
from
'./
{{
spinalCase
page
.
codeName
}}
-state'
;
{{#
page
.
ctrls
}}
{{#
eq
controlType
"PANEL"
}}
import
{
{{
codeName
}}
Panel
}
from
'@widgets/
{{
spinalCase
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-panel'
;
{{/
eq
}}
{{/
page
.
ctrls
}}
// props声明和默认值处理
interface
Props
{
context
?:
IContext
;
viewParams
?:
IParam
;
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
viewSubject
?:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
openType
:
'ROUTE'
,
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
// emit声明
interface
ViewEmit
{
(
name
:
"viewEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
panelView
=
new
PanelView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
panel
,
onToolbarEvent
,
onCtrlEvent
}
=
panelView
;
{{#if
page
.
psAppCounterRefs
}}
// 计数器数据
const
counterData
=
computed
(()
=>
{
const
{
counterServices
}
=
toRefs
(
state
);
if
(
counterServices
&&
counterServices
.
value
&&
counterServices
.
value
.
length
)
{
return
counterServices
.
value
[
0
].
data
;
}
return
{};
})
{{/if}}
</script>
<template>
<AppPanelViewLayout
:class=
"['app-panel-view', state.viewSysCss]"
:showCaptionBar=
"state.showCaptionBar"
>
<template
v-slot:caption
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:subCaption=
"state.subCaption"
:text=
"state.viewCaption"
/>
</template>
{{#
page
.
ctrls
}}
{{#
eq
controlType
"TOOLBAR"
}}
<template
v-slot:toolbar
>
<AppToolbar
mode=
"button"
name=
"
{{
lowerCase
codeName
}}
"
:actionModel=
"state.toolbar"
{{#if
page
.
psAppCounterRefs
}}
:counterData=
"counterData"
{{/if}}
@
onToolbarEvent=
"onToolbarEvent"
/>
</template>
{{/
eq
}}
{{#
eq
controlType
"PANEL"
}}
<
{{
codeName
}}
Panel
ref=
"panel"
name=
"
{{
name
}}
"
:showBusyIndicator=
"true"
:context=
"state.context"
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
name
}}
.action"
:viewSubject=
"state.viewSubject"
:parent=
"panelView"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
Panel>
{{/
eq
}}
{{/
page
.
ctrls
}}
</AppPanelViewLayout>
</template>
<style
lang=
"scss"
>
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PANEL}}-panel/{{ctrls@PANEL}}-panel.vue.hbs
浏览文件 @
be500336
...
@@ -28,10 +28,10 @@ interface CtrlEmit {
...
@@ -28,10 +28,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
// 安装功能模块,提供状态和能力方法
const
{
name
,
state
,
load
,
loadDraft
,
save
,
remove
,
refresh
,
onEditorEvent
,
onComponentEvent
,
getData
,
xDataCtrl
}
=
new
PanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
load
,
onPanelItemEvents
,
getData
,
xDataCtrl
}
=
new
PanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
// 暴露内部状态及能力
defineExpose
({
name
,
state
,
load
,
loadDraft
,
save
,
remove
,
refresh
,
getData
});
defineExpose
({
name
,
state
,
load
,
getData
});
</script>
</script>
<template>
<template>
<AppRow
<AppRow
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录