Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
707610b0
提交
707610b0
编写于
1月 13, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
4e2411c0
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
42 行增加
和
29 行删除
+42
-29
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+0
-1
index.ts
...s/templ/r7/app_{{apps}}/src/core/modules/widgets/index.ts
+1
-0
{{ctrls@GRID-GRID}}-grid-state.ts.hbs
...ls@GRID-GRID}}-grid/{{ctrls@GRID-GRID}}-grid-state.ts.hbs
+18
-14
{{ctrls@GRID-GRID}}-grid.vue.hbs
...{{ctrls@GRID-GRID}}-grid/{{ctrls@GRID-GRID}}-grid.vue.hbs
+23
-14
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
707610b0
import
{
deepCopy
,
GridControlState
,
IActionParam
,
IParam
,
MDControl
}
from
"@core"
;
import
{
createUUID
}
from
"qx-util"
;
/**
* @description 表格部件
* @export
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/index.ts
浏览文件 @
707610b0
export
*
from
'./control-base'
export
*
from
'./main-control'
export
*
from
'./md-control'
export
*
from
'./exp-bar-control'
export
*
from
'./form-control'
export
*
from
'./menu-control'
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID-GRID}}-grid/{{ctrls@GRID-GRID}}-grid-state.ts.hbs
浏览文件 @
707610b0
...
...
@@ -20,20 +20,14 @@ export class ControlVO extends ControlVOBase {
}
export const ctrlState = {
controlCodeName: "
{{
ctrl
.
codeName
}}
",
controlName: "
{{
ctrl
.
name
}}
",
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
appEntityCodeName:'
{{
ctrl
.
appEntity
.
codeName
}}
',
controlService: new GridService
<ControlVO>
(ControlVO, new
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service() ),
data
: [],
items
: [],
selectedRowKeys: [],
gridAgg: {
aggMode: "
{{
ctrl
.
aggMode
}}
",
aggData: [],
{{#if
ctrl
.
aggPSAppDataEntity
}}
aggEntity: "
{{
ctrl
.
aggPSAppDataEntity
.
codeName
}}
",
aggDataSet: "
{{
ctrl
.
aggPSAppDEDataSet
.
codeName
}}
",
{{/if}}
},
gridGroup: {
// 多数据部件分组
mdCtrlGroup: {
enableGroup:
{{
ctrl
.
enableGroup
}}
,
groupMode: "
{{
ctrl
.
groupMode
}}
",
groupField: "
{{
lowerCase
ctrl
.
groupPSAppDEField
.
codeName
}}
",
...
...
@@ -44,12 +38,14 @@ export const ctrlState = {
},
{{/if}}
},
gridSort: {
// 多数据部件排序
mdCtrlSort: {
noSort:
{{
ctrl
.
noSort
}}
,
minorSortDir: "
{{#if
ctrl
.
minorSortDir
}}{{
ctrl
.
minorSortDir
}}{{/if}}
",
minorSortPSDEF: "
{{
ctrl
.
minorSortPSAppDEField
.
codeName
}}
",
},
gridPaging: {
// 多数据部件分页
mdCtrlPaging: {
enablePagingBar:
{{
ctrl
.
enablePagingBar
}}
,
current: 1,
pageSize:
{{#if
ctrl
.
pagingSize
}}{{
ctrl
.
pagingSize
}}{{else}}
20
{{/if}}
,
...
...
@@ -61,6 +57,14 @@ export const ctrlState = {
pageSizeOptions: ['10','20','50','100'],
}
{{else}}
false
{{/if}}
,
},
gridAgg: {
aggMode: "
{{
ctrl
.
aggMode
}}
",
aggData: [],
{{#if
ctrl
.
aggPSAppDataEntity
}}
aggEntity: "
{{
ctrl
.
aggPSAppDataEntity
.
codeName
}}
",
aggDataSet: "
{{
ctrl
.
aggPSAppDEDataSet
.
codeName
}}
",
{{/if}}
},
uAColumnModel:[
{{#
each
ctrl
.
psDEGridColumns
as
|
column
|
}}
{{>
(
lookup
'UACOLUMNMODEL'
)
item
=
column
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID-GRID}}-grid/{{ctrls@GRID-GRID}}-grid.vue.hbs
浏览文件 @
707610b0
...
...
@@ -6,11 +6,11 @@ import { GridControl, IActionParam, IParam, IContext, ControlAction, deepCopy }
interface
Props
{
context
:
IContext
;
m
ultiple
:
boolean
;
isM
ultiple
:
boolean
;
rowEditState
:
boolean
;
rowActiveMode
:
0
|
1
|
2
;
selectedData
:
IParam
[];
selectFirs
tDefault
:
boolean
;
isSelec
tDefault
:
boolean
;
viewParams
?:
IParam
;
controlAction
:
ControlAction
;
showBusyIndicator
?:
boolean
;
...
...
@@ -27,24 +27,33 @@ const props = withDefaults(defineProps < Props > (), {
})
// emit声明
interface
CtrlEmit
{
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
{(
event
:
'ctrlevent'
,
value
:
IActionParam
):
void
;}
>
();
// 安装功能模块,提供状态和能力
const
{
state
,
load
,
handleEditorEvent
,
handleToolbarEvent
,
custom
}
=
new
GridControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
scrollOption
,
rowKey
,
rowClassName
,
customRow
,
rowSelectionOption
,
resizeColumn
,
handle
GridChange
}
=
custom
;
const
{
state
,
custom
}
=
new
GridControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
scrollOption
,
rowKey
,
rowClassName
,
customRow
,
rowSelectionOption
,
resizeColumn
,
on
GridChange
}
=
custom
;
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
,
load
});
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
</script>
<template>
<a-table
bordered
sticky
class=
"app-grid
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
:rowKey=
"rowKey"
:showHeader=
"
{{#if
ctrl
.
hideHeader
}}
false
{{else}}
true
{{/if}}
"
:scroll=
"scrollOption"
:sortDirections=
"['ascend', 'descend']"
:data-source=
"state.data"
:row-selection=
"rowSelectionOption"
:columns=
"state.columnsModel"
:pagination=
"state.gridPaging.pagination"
:customRow=
"customRow"
:rowClassName=
"rowClassName"
@
change=
"handleGridChange"
@
resizeColumn=
"resizeColumn"
>
<a-table
bordered
sticky
class=
"app-grid"
:rowKey=
"rowKey"
:showHeader=
"true"
:scroll=
"scrollOption"
:sortDirections=
"['ascend', 'descend']"
:data-source=
"state.items"
:row-selection=
"rowSelectionOption"
:columns=
"state.columnsModel"
:pagination=
"state.mdCtrlPaging.pagination"
:customRow=
"customRow"
:rowClassName=
"rowClassName"
@
change=
"onGridChange"
@
resizeColumn=
"resizeColumn"
>
<template
#
emptyText
>
<div
class=
"not-data"
>
<span
class=
"empty-text"
>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录