Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
6192ed43
提交
6192ed43
编写于
1月 21, 2022
作者:
zhujiamin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 选择视图、选择表格视图串通逻辑、UI绘制快速分组等
上级
7c265aeb
变更
9
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
113 行增加
和
18 行删除
+113
-18
app-pickup-grid-view-layout.vue
...s}}/src/components/layout/app-pickup-grid-view-layout.vue
+8
-1
pickup-grid-view.ts
...c/core/modules/views/pickup-grid-view/pickup-grid-view.ts
+32
-6
pickup-view.ts
...{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
+1
-0
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+5
-5
pickup-view-panel-control.ts
...ts/pickup-view-panel-control/pickup-view-panel-control.ts
+2
-1
{{pages@DEPICKUPGRIDVIEW}}-state.ts.hbs
...EPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}-state.ts.hbs
+2
-0
{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
...ges@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
+58
-3
{{pages@DEPICKUPVIEW}}.vue.hbs
...s}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
+2
-1
{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
...panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
+3
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/app-pickup-grid-view-layout.vue
浏览文件 @
6192ed43
...
...
@@ -4,14 +4,21 @@
<
template
>
<AppViewBaseLayout>
<template
v-slot:header-top
>
<slot
name=
"topMessage"
/>
</
template
>
<
template
v-slot:header-left
>
<slot
name=
"caption"
/>
</
template
>
<
template
v-slot:header-content
>
<slot
name=
"quickGroupSearch"
/>
<slot
name=
"quickSearch"
/>
</
template
>
<
template
v-slot:header-right
>
<slot
name=
"toolbar"
/>
</
template
>
<
template
v-slot:header-bottom
>
<slot
name=
"
topMessage
"
/>
<slot
name=
"
quickSearchForm
"
/>
<slot
name=
"searchForm"
/>
</
template
>
<
template
v-slot:body-top
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-grid-view/pickup-grid-view.ts
浏览文件 @
6192ed43
import
{
IActionParam
}
from
"@core"
;
import
{
PickupView
}
from
"../pickup
-view"
;
import
{
IActionParam
,
IParam
}
from
"@core"
;
import
{
MDView
}
from
"../md
-view"
;
import
{
PickupGridViewProps
}
from
"./pickup-grid-view-prop"
;
import
{
PickupGridViewState
}
from
"./pickup-grid-view-state"
;
...
...
@@ -9,7 +9,7 @@ import { PickupGridViewState } from "./pickup-grid-view-state";
* @class PickupGridView
* @extends {MainView}
*/
export
class
PickupGridView
extends
Pickup
View
{
export
class
PickupGridView
extends
MD
View
{
/**
* @description 视图状态
...
...
@@ -18,6 +18,24 @@ export class PickupGridView extends PickupView {
*/
public
declare
state
:
PickupGridViewState
;
/**
* 当前视图表格部件
*
* @type {IParam}
* @memberof PickupGridView
*/
public
declare
grid
:
IParam
;
/**
* @description 处理视图初始化
*
* @memberof PickupGridView
*/
public
useViewInit
()
{
super
.
useViewInit
();
// 初始化搜索表格引用
this
.
grid
=
ref
(
null
);
}
/**
* @description 使用加载功能模块
...
...
@@ -31,7 +49,6 @@ export class PickupGridView extends PickupView {
})
}
/**
* 部件事件
*
...
...
@@ -44,11 +61,19 @@ export class PickupGridView extends PickupView {
return
;
}
if
(
action
===
'selectionChange'
)
{
this
.
selectData
=
data
;
this
.
emit
(
'viewEvent'
,
actionParam
)
}
}
/**
* 获取多数据部件
*
* @return {*} {*}
* @memberof PickupGridView
*/
public
getMDCtrl
():
any
{
return
unref
(
this
.
grid
);
}
/**
* @description 安装视图所有功能模块的方法
...
...
@@ -60,7 +85,8 @@ export class PickupGridView extends PickupView {
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
...
superParams
,
grid
:
this
.
grid
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
浏览文件 @
6192ed43
...
...
@@ -73,6 +73,7 @@ export class PickupView extends MainView {
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
selectData
:
this
.
selectData
,
onCancel
:
this
.
onCancel
.
bind
(
this
),
onConfirm
:
this
.
onConfirm
.
bind
(
this
)
};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
6192ed43
...
...
@@ -55,16 +55,16 @@ export class GridControl extends MDControl {
if
(
!
rowEditState
)
{
selectedRowKeys
.
value
=
[
record
.
srfkey
];
if
(
!
record
.
children
)
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
'grid'
,
action
:
"selectionChange"
,
data
:
[
deepCopy
(
record
)]
})
if
(
Object
.
is
(
rowActiveMode
,
1
))
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowClick"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
'grid'
,
action
:
"rowClick"
,
data
:
[
deepCopy
(
record
)]
})
}
}
}
},
onDblclick
:
()
=>
{
if
(
!
record
.
children
&&
Object
.
is
(
rowActiveMode
,
2
))
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowDbClick"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
'grid'
,
action
:
"rowDbClick"
,
data
:
[
deepCopy
(
record
)]
})
}
}
};
...
...
@@ -87,7 +87,7 @@ export class GridControl extends MDControl {
selection
.
push
(
select
);
}
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
selection
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
'grid'
,
action
:
"selectionChange"
,
data
:
selection
})
},
};
});
...
...
@@ -191,7 +191,7 @@ export class GridControl extends MDControl {
}
else
if
(
selectFirstDefault
)
{
if
(
items
&&
items
.
length
>
0
)
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
tag
:
'grid'
,
action
:
"selectionChange"
,
data
:
[
deepCopy
(
items
[
0
])],
});
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/pickup-view-panel-control/pickup-view-panel-control.ts
浏览文件 @
6192ed43
...
...
@@ -28,7 +28,7 @@ export class PickupViewPanelControl extends MainControl {
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
});
}
})
// 部件卸载时退订viewSubject
...
...
@@ -62,6 +62,7 @@ export class PickupViewPanelControl extends MainControl {
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
load
:
this
.
useLoad
.
bind
(
this
),
onViewEvent
:
this
.
onViewEvent
.
bind
(
this
)
};
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}-state.ts.hbs
浏览文件 @
6192ed43
export const viewState = {
enableQuickSearch:
{{#if
page
.
enableQuickSearch
}}{{
page
.
enableQuickSearch
}}{{else}}
false
{{/if}}
,
expandSearchForm:
{{#if
page
.
expandSearchForm
}}{{
page
.
expandSearchForm
}}{{else}}
false
{{/if}}
,
{{>
@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@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
浏览文件 @
6192ed43
...
...
@@ -4,10 +4,18 @@ import { PickupGridView, IActionParam, IParam, IContext } from '@core';
import
{
viewState
}
from
'./
{{
spinalCase
page
.
codeName
}}
-state'
;
// todo 表格部件拿不到目前导入固定表格
import
{
MainGrid
}
from
'@widgets/chart-data/main-grid'
;
import
{
DefaultSearchForm
}
from
'@widgets/chart-data/default-search-form'
;
{{#
each
page
.
controls
as
|
control
|
}}
{{#if
(
eq
control
.
controlType
'GRID'
)
}}
{{#if
(
eq
control
.
controlType
'GRID'
)
}}
import
{
{{
control
.
codeName
}}
Grid
}
from
'@widgets/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-grid'
;
{{/if}}
{{/if}}
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'searchform'
))
}}
import
{
{{
codeName
}}
SearchForm
}
from
'@widgets/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-search-form'
;
{{/if}}
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'quicksearchform'
))
}}
import
{
{{
codeName
}}
QuickSearchForm
}
from
'@widgets/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-quick-search-form'
;
{{/if}}
{{/
each
}}
...
...
@@ -17,6 +25,7 @@ interface Props {
viewParams
?:
IParam
;
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
viewSubject
?:
Subject
<
IActionParam
>
;
selectedData
?:
string
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
...
...
@@ -32,7 +41,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
confirm
,
onCtrl
Event
}
=
new
PickupGridView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
grid
,
onCtrlEvent
,
onQuickGroupEvent
,
onQuickSearch
Event
}
=
new
PickupGridView
(
viewState
,
props
,
emit
).
moduleInstall
();
</script>
<template>
...
...
@@ -41,8 +50,53 @@ const { state, confirm, onCtrlEvent } = new PickupGridView(viewState, props, emi
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
{{#
page
.
ctrls
}}
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'searchform'
))
}}
{{#if
page
.
enableFilter
}}
<template
v-slot:quickSearch
>
<div
class=
'app-quick-search'
>
<a-input
v-if=
"state.enableQuickSearch"
@
pressEnter=
"onQuickSearchEvent($event)"
allowClear
/>
<a-popover
trigger=
"click"
:overlayStyle=
"{width: '50%'}"
>
<template
#
content
>
<
{{
codeName
}}
SearchForm
v-if=
"state.expandSearchForm"
:context=
"state.context"
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
<a-button><filter-outlined
/></a-button>
</a-popover>
</div>
</template>
{{else}}
<template
v-slot:searchForm
>
<
{{
codeName
}}
SearchForm
v-if=
"state.expandSearchForm"
:context=
"state.context"
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
{{/if}}
{{/if}}
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'quicksearchform'
))
}}
<template
v-slot:quickSearchForm
>
<
{{
codeName
}}
QuickSearchForm
:context=
"state.context"
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
QuickSearchForm>
</template>
{{/if}}
{{#
eq
controlType
"GRID"
}}
<
{{
codeName
}}
Grid
ref=
"grid"
:context=
"state.context"
:multiple=
"false"
:rowEditState=
"state.rowEditState"
...
...
@@ -51,6 +105,7 @@ const { state, confirm, onCtrlEvent } = new PickupGridView(viewState, props, emi
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
Grid>
{{/
eq
}}
{{/
page
.
ctrls
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
浏览文件 @
6192ed43
...
...
@@ -28,7 +28,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onCancel
,
onConfirm
,
onCtrlEvent
}
=
new
PickupView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
onCancel
,
onConfirm
,
onCtrlEvent
,
selectData
}
=
new
PickupView
(
viewState
,
props
,
emit
).
moduleInstall
();
</script>
<template>
...
...
@@ -55,6 +55,7 @@ const { state, onCancel, onConfirm, onCtrlEvent } = new PickupView(viewState, pr
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
name
}}
.action"
:viewSubject=
"state.viewSubject"
:selectData=
"selectData"
@
onCtrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
PickupViewPanel>
{{/
eq
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
浏览文件 @
6192ed43
...
...
@@ -33,7 +33,7 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
}
=
new
PickupViewPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
onViewEvent
}
=
new
PickupViewPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
...
...
@@ -46,6 +46,8 @@ defineExpose({ state, name: '{{ctrl.name}}' });
<
{{
ctrl
.
embeddedPSAppDEView
.
codeName
}}
:isShowButton
="
state
.
isShowButton
"
:selectedData=
"state.selectedData"
:viewSubject=
"state.viewSubject"
@
viewEvent=
"onViewEvent"
/>
{{else}}
<div
class=
"app-pickup-view-panel--empty"
>
视图不存在,请配置选择视图
</div>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录