Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
8325476a
提交
8325476a
编写于
2月 14, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:适配表格列宽度
上级
25defc75
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
75 行增加
和
4 行删除
+75
-4
CtrlModel.java
...ore/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
+34
-0
grid-column-model.hbs
...macro/front-end/widgets/grid-detail/grid-column-model.hbs
+1
-1
grid-control-state.ts
...c/core/modules/widgets/grid-control/grid-control-state.ts
+7
-0
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+3
-3
app-grid.scss
...ces/templ/r7/app_{{apps}}/src/style/widgets/app-grid.scss
+10
-0
{{ctrls@GRID}}-grid-state.ts.hbs
...es}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
+20
-0
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
浏览文件 @
8325476a
...
@@ -12,6 +12,8 @@ import net.ibizsys.model.control.IPSControl;
...
@@ -12,6 +12,8 @@ import net.ibizsys.model.control.IPSControl;
import
net.ibizsys.model.control.IPSControlContainer
;
import
net.ibizsys.model.control.IPSControlContainer
;
import
net.ibizsys.model.control.dashboard.IPSDBContainerPortletPart
;
import
net.ibizsys.model.control.dashboard.IPSDBContainerPortletPart
;
import
net.ibizsys.model.control.dashboard.IPSDBPortletPart
;
import
net.ibizsys.model.control.dashboard.IPSDBPortletPart
;
import
net.ibizsys.model.control.grid.IPSDEGrid
;
import
net.ibizsys.model.control.grid.IPSDEGridColumn
;
import
net.ibizsys.model.control.toolbar.IPSDETBUIActionItem
;
import
net.ibizsys.model.control.toolbar.IPSDETBUIActionItem
;
import
net.ibizsys.model.control.toolbar.IPSDEToolbar
;
import
net.ibizsys.model.control.toolbar.IPSDEToolbar
;
import
net.ibizsys.model.view.IPSUIAction
;
import
net.ibizsys.model.view.IPSUIAction
;
...
@@ -217,6 +219,38 @@ public class CtrlModel extends BaseModel{
...
@@ -217,6 +219,38 @@ public class CtrlModel extends BaseModel{
}
}
}
}
// 表格是否需要空白列
public
Boolean
isNeedEmptyColumn
()
{
if
(
getControl
().
getControlType
()
!=
null
&&
"GRID"
.
equals
(
getControl
().
getControlType
()))
{
Boolean
flag
=
true
;
for
(
IPSDEGridColumn
column
:
((
IPSDEGrid
)
getControl
()).
getPSDEGridColumns
())
{
// 自适应列
if
(
column
.
getWidthUnit
()
!=
null
&&
"STAR"
.
equals
(
column
.
getWidthUnit
())
&&
column
.
getColumnType
()
!=
null
&&
!
"GROUPGRIDCOLUMN"
.
equals
(
column
.
getColumnType
())
)
{
flag
=
false
;
break
;
}
}
return
flag
;
}
return
false
;
}
// 获取表格列总宽度
public
Integer
getTotalColumnWidth
()
{
Integer
width
=
10
;
if
(
getControl
().
getControlType
()
!=
null
&&
"GRID"
.
equals
(
getControl
().
getControlType
()))
{
for
(
IPSDEGridColumn
column
:
((
IPSDEGrid
)
getControl
()).
getPSDEGridColumns
())
{
width
+=
column
.
getWidth
();
}
}
return
width
;
}
// 忽略发布
// 忽略发布
public
Boolean
ignore
()
{
public
Boolean
ignore
()
{
IPSControl
control
=
getControl
();
IPSControl
control
=
getControl
();
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/widgets/grid-detail/grid-column-model.hbs
浏览文件 @
8325476a
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
{{#
eq
item
.
columnType
'GROUPGRIDCOLUMN'
}}
{{#
eq
item
.
columnType
'GROUPGRIDCOLUMN'
}}
children: [
children: [
{{#
each
item
.
psDEGridColumns
as
|
column
|
}}
{{#
each
item
.
psDEGridColumns
as
|
column
|
}}
{{>
@macro
/
front-end
/
widgets
/
grid-detail
/
include-grid
.
hbs
type
=
"COLUMNMODEL"
item
=
column
}}
{{>
@macro
/
front-end
/
widgets
/
grid-detail
/
include-grid
.
hbs
type
=
"COLUMNMODEL"
item
=
column
}}
{{/
each
}}
{{/
each
}}
],
],
{{else}}
{{else}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control-state.ts
浏览文件 @
8325476a
...
@@ -58,4 +58,11 @@ export interface GridControlState extends MDControlState {
...
@@ -58,4 +58,11 @@ export interface GridControlState extends MDControlState {
*/
*/
updateDefaultItems
:
IParam
[];
updateDefaultItems
:
IParam
[];
/**
* @description 表格列总宽度
* @type {number}
* @memberof GridControlState
*/
totalColumnWidth
:
number
;
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
8325476a
...
@@ -30,12 +30,12 @@ export class GridControl extends MDControl {
...
@@ -30,12 +30,12 @@ export class GridControl extends MDControl {
* @memberof GridControl
* @memberof GridControl
*/
*/
public
useCustom
()
{
public
useCustom
()
{
const
{
controlName
,
selectFirstDefault
,
rowEditState
,
rowActiveMode
,
isSingleSelect
}
=
this
.
state
;
const
{
controlName
,
selectFirstDefault
,
rowEditState
,
rowActiveMode
,
isSingleSelect
,
totalColumnWidth
}
=
this
.
state
;
// 滚动条配置
// 滚动条配置
const
useScrollOption
=
computed
(()
=>
{
const
useScrollOption
=
computed
(()
=>
{
return
{
return
{
scrollToFirstRowOnChange
:
true
,
scrollToFirstRowOnChange
:
true
,
x
:
'10
0%'
,
x
:
totalColumnWidth
||
'15
0%'
,
y
:
'100%'
,
y
:
'100%'
,
}
}
});
});
...
@@ -107,7 +107,7 @@ export class GridControl extends MDControl {
...
@@ -107,7 +107,7 @@ export class GridControl extends MDControl {
}
}
return
{
return
{
type
:
isSingleSelect
?
'radio'
:
'checkbox'
,
type
:
isSingleSelect
?
'radio'
:
'checkbox'
,
columnWidth
:
32
,
columnWidth
:
50
,
selectedRowKeys
:
this
.
state
.
selectedRowKeys
,
selectedRowKeys
:
this
.
state
.
selectedRowKeys
,
checkStrictly
:
this
.
props
.
multiple
?
false
:
true
,
checkStrictly
:
this
.
props
.
multiple
?
false
:
true
,
onChange
:
(
_selectedRowKeys
:
string
[],
selectedRows
:
IParam
[])
=>
{
onChange
:
(
_selectedRowKeys
:
string
[],
selectedRows
:
IParam
[])
=>
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/app-grid.scss
浏览文件 @
8325476a
...
@@ -15,4 +15,14 @@
...
@@ -15,4 +15,14 @@
&
:first-child
{
&
:first-child
{
padding-left
:
0
;
padding-left
:
0
;
}
}
}
.app-grid
{
.header-cell
{
display
:
flex
;
}
.not-data
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
浏览文件 @
8325476a
...
@@ -22,6 +22,7 @@ export class ControlVO extends ControlVOBase {
...
@@ -22,6 +22,7 @@ export class ControlVO extends ControlVOBase {
export const ctrlState = {
export const ctrlState = {
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
controlName: '
{{
ctrl
.
name
}}
',
totalColumnWidth:
{{
ctrl
.
totalColumnWidth
}}
,
appEntityCodeName: '
{{
ctrl
.
appEntity
.
codeName
}}
',
appEntityCodeName: '
{{
ctrl
.
appEntity
.
codeName
}}
',
appDeCodeName:'
{{
ctrl
.
appEntity
.
codeName
}}
',
appDeCodeName:'
{{
ctrl
.
appEntity
.
codeName
}}
',
appDeKeyFieldName: '
{{#if
ctrl
.
appEntity
.
keyPSAppDEField
}}{{
ctrl
.
appEntity
.
keyPSAppDEField
.
codeName
}}{{/if}}
',
appDeKeyFieldName: '
{{#if
ctrl
.
appEntity
.
keyPSAppDEField
}}{{
ctrl
.
appEntity
.
keyPSAppDEField
.
codeName
}}{{/if}}
',
...
@@ -114,8 +115,27 @@ export const ctrlState = {
...
@@ -114,8 +115,27 @@ export const ctrlState = {
},
},
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{!-- 适配表格操作列浮动 --}}
{{#
each
ctrl
.
psDEGridColumns
as
|
column
|
}}
{{#
each
ctrl
.
psDEGridColumns
as
|
column
|
}}
{{#
unless
(
eq
column
.
columnType
'UAGRIDCOLUMN'
)
}}
{{>
@macro
/
front-end
/
widgets
/
grid-detail
/
include-grid
.
hbs
type
=
"COLUMNMODEL"
item
=
column
}}
{{>
@macro
/
front-end
/
widgets
/
grid-detail
/
include-grid
.
hbs
type
=
"COLUMNMODEL"
item
=
column
}}
{{/
unless
}}
{{/
each
}}
{{#if
ctrl
.
needEmptyColumn
}}
{
title: "",
columnType: "EMPTYCOLUMN",
dataIndex: "autowidthcolumn",
align: "center",
resizable: true,
ellipsis: true,
aggMode: "NONE",
},
{{/if}}
{{#
each
ctrl
.
psDEGridColumns
as
|
column
|
}}
{{#if
(
eq
column
.
columnType
'UAGRIDCOLUMN'
)
}}
{{>
@macro
/
front-end
/
widgets
/
grid-detail
/
include-grid
.
hbs
type
=
"COLUMNMODEL"
item
=
column
}}
{{/if}}
{{/
each
}}
{{/
each
}}
],
],
// 是否单选
// 是否单选
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录