Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
64779705
提交
64779705
编写于
1月 23, 2022
作者:
WodahsOrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 表格修复
上级
bce14421
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
30 行增加
和
22 行删除
+30
-22
main-view.ts
...pp_{{apps}}/src/core/modules/views/main-view/main-view.ts
+4
-4
md-view.ts
...r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
+23
-13
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+2
-4
{{ctrls@GRID}}-grid-state.ts.hbs
...es}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/main-view/main-view.ts
浏览文件 @
64779705
...
@@ -30,13 +30,13 @@ export class MainView extends ViewBase {
...
@@ -30,13 +30,13 @@ export class MainView extends ViewBase {
* @memberof MainView
* @memberof MainView
*/
*/
public
onToolbarEvent
(
actionParam
:
IActionParam
)
{
public
onToolbarEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
const
{
data
}
=
actionParam
;
if
(
!
tag
||
!
action
||
!
data
)
{
if
(
!
data
)
{
console
.
warn
(
"工具栏执行参数不足"
);
console
.
warn
(
"工具栏执行参数不足"
);
return
;
return
;
}
}
const
{
xDataControlName
,
uIAction
}
=
data
;
const
{
uIAction
}
=
data
;
if
(
!
xDataControlName
||
!
uIAction
)
{
if
(
!
uIAction
)
{
console
.
warn
(
"工具栏执行参数不足"
);
console
.
warn
(
"工具栏执行参数不足"
);
return
;
return
;
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
浏览文件 @
64779705
...
@@ -8,7 +8,6 @@ import { IActionParam, IParam, MainView, MDViewState } from '@core';
...
@@ -8,7 +8,6 @@ import { IActionParam, IParam, MainView, MDViewState } from '@core';
* @extends {MainView}
* @extends {MainView}
*/
*/
export
class
MDView
extends
MainView
{
export
class
MDView
extends
MainView
{
/**
/**
* 视图状态数据
* 视图状态数据
*
*
...
@@ -57,7 +56,7 @@ export class MDView extends MainView {
...
@@ -57,7 +56,7 @@ export class MDView extends MainView {
}
else
{
}
else
{
this
.
state
.
isLoadDefault
=
true
;
this
.
state
.
isLoadDefault
=
true
;
}
}
})
})
;
}
}
/**
/**
...
@@ -111,7 +110,7 @@ export class MDView extends MainView {
...
@@ -111,7 +110,7 @@ export class MDView extends MainView {
*/
*/
public
handleQuickGroupSearch
(
args
:
any
=
{}):
void
{
public
handleQuickGroupSearch
(
args
:
any
=
{}):
void
{
const
{
viewParams
}
=
this
.
state
;
const
{
viewParams
}
=
this
.
state
;
Object
.
assign
(
viewParams
,
{
quickGroup
:
args
.
data
})
Object
.
assign
(
viewParams
,
{
quickGroup
:
args
.
data
});
const
tag
=
this
.
getMDCtrl
().
name
;
const
tag
=
this
.
getMDCtrl
().
name
;
this
.
next
({
tag
:
tag
,
action
:
'load'
,
data
:
viewParams
});
this
.
next
({
tag
:
tag
,
action
:
'load'
,
data
:
viewParams
});
}
}
...
@@ -124,7 +123,7 @@ export class MDView extends MainView {
...
@@ -124,7 +123,7 @@ export class MDView extends MainView {
public
handleQuickSearch
(
args
:
any
=
{}):
void
{
public
handleQuickSearch
(
args
:
any
=
{}):
void
{
const
{
viewParams
}
=
this
.
state
;
const
{
viewParams
}
=
this
.
state
;
const
query
=
args
?.
target
?.
_value
||
''
;
const
query
=
args
?.
target
?.
_value
||
''
;
Object
.
assign
(
viewParams
,
{
query
:
query
});
Object
.
assign
(
viewParams
,
{
query
:
query
});
const
tag
=
this
.
getMDCtrl
().
name
;
const
tag
=
this
.
getMDCtrl
().
name
;
this
.
next
({
tag
:
tag
,
action
:
'load'
,
data
:
viewParams
});
this
.
next
({
tag
:
tag
,
action
:
'load'
,
data
:
viewParams
});
}
}
...
@@ -153,15 +152,15 @@ export class MDView extends MainView {
...
@@ -153,15 +152,15 @@ export class MDView extends MainView {
*/
*/
public
MDCtrlEvent
(
eventName
:
string
,
args
:
any
):
void
{
public
MDCtrlEvent
(
eventName
:
string
,
args
:
any
):
void
{
if
(
Object
.
is
(
eventName
,
'beforeload'
))
{
if
(
Object
.
is
(
eventName
,
'beforeload'
))
{
this
.
MDCtrlBeforeLoad
(
args
)
this
.
MDCtrlBeforeLoad
(
args
)
;
}
}
if
(
Object
.
is
(
eventName
,
'load'
))
{
if
(
Object
.
is
(
eventName
,
'load'
))
{
this
.
MDCtrlLoaded
(
args
);
this
.
MDCtrlLoaded
(
args
);
}
}
if
(
Object
.
is
(
eventName
,
'row
click'
)
)
{
if
(
Object
.
is
(
eventName
,
'row
Click'
)
&&
this
.
state
.
gridRowActiveMode
===
1
)
{
this
.
doEdit
(
args
);
this
.
doEdit
(
args
);
}
}
if
(
Object
.
is
(
eventName
,
'row
dblclick'
)
)
{
if
(
Object
.
is
(
eventName
,
'row
DbClick'
)
&&
this
.
state
.
gridRowActiveMode
===
2
)
{
this
.
doEdit
(
args
);
this
.
doEdit
(
args
);
}
}
if
(
Object
.
is
(
eventName
,
'selectionchange'
))
{
if
(
Object
.
is
(
eventName
,
'selectionchange'
))
{
...
@@ -207,7 +206,7 @@ export class MDView extends MainView {
...
@@ -207,7 +206,7 @@ export class MDView extends MainView {
* @memberof MDView
* @memberof MDView
*/
*/
public
MDCtrlLoaded
(
args
:
any
)
{
public
MDCtrlLoaded
(
args
:
any
)
{
console
.
log
(
"数据加载完成"
,
args
);
console
.
log
(
'数据加载完成'
,
args
);
}
}
/**
/**
...
@@ -227,7 +226,19 @@ export class MDView extends MainView {
...
@@ -227,7 +226,19 @@ export class MDView extends MainView {
* @memberof MDView
* @memberof MDView
*/
*/
public
doEdit
(
args
:
any
)
{
public
doEdit
(
args
:
any
)
{
throw
new
Error
(
'Method not implemented.'
);
this
.
onToolbarEvent
({
tag
:
''
,
action
:
''
,
data
:
{
uIAction
:
{
codeName
:
'Edit'
,
fullCodeName
:
'Edit'
,
uIActionMode
:
'SYS'
,
uIActionTag
:
'Edit'
,
uIActionType
:
'DEUIACTION'
,
},
},
});
}
}
/**
/**
...
@@ -254,7 +265,7 @@ export class MDView extends MainView {
...
@@ -254,7 +265,7 @@ export class MDView extends MainView {
/**
/**
* @description 安装视图所有功能模块的方法
* @description 安装视图所有功能模块的方法
*
*
* @memberof MDView
* @memberof MDView
*/
*/
public
moduleInstall
()
{
public
moduleInstall
()
{
...
@@ -265,7 +276,7 @@ export class MDView extends MainView {
...
@@ -265,7 +276,7 @@ export class MDView extends MainView {
searchForm
:
this
.
searchForm
,
searchForm
:
this
.
searchForm
,
searchBar
:
this
.
searchBar
,
searchBar
:
this
.
searchBar
,
onQuickGroupEvent
:
this
.
onQuickGroupEvent
.
bind
(
this
),
onQuickGroupEvent
:
this
.
onQuickGroupEvent
.
bind
(
this
),
onQuickSearchEvent
:
this
.
onQuickSearchEvent
.
bind
(
this
)
onQuickSearchEvent
:
this
.
onQuickSearchEvent
.
bind
(
this
)
,
};
};
}
}
...
@@ -295,6 +306,5 @@ export class MDView extends MainView {
...
@@ -295,6 +306,5 @@ export class MDView extends MainView {
* @return {*} {*}
* @return {*} {*}
* @memberof MDView
* @memberof MDView
*/
*/
public
getMDCtrl
():
any
{
}
public
getMDCtrl
():
any
{}
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
64779705
...
@@ -56,14 +56,12 @@ export class GridControl extends MDControl {
...
@@ -56,14 +56,12 @@ export class GridControl extends MDControl {
selectedRowKeys
.
value
=
[
record
.
srfkey
];
selectedRowKeys
.
value
=
[
record
.
srfkey
];
if
(
!
record
.
children
)
{
if
(
!
record
.
children
)
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
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
:
this
.
props
.
name
,
action
:
"rowClick"
,
data
:
[
deepCopy
(
record
)]
})
}
}
}
}
}
},
},
onDblclick
:
()
=>
{
onDblclick
:
()
=>
{
if
(
!
record
.
children
&&
Object
.
is
(
rowActiveMode
,
2
)
)
{
if
(
!
record
.
children
)
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowDbClick"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowDbClick"
,
data
:
[
deepCopy
(
record
)]
})
}
}
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
浏览文件 @
64779705
...
@@ -53,7 +53,7 @@ export const ctrlState = {
...
@@ -53,7 +53,7 @@ export const ctrlState = {
position: ['bottomRight'],
position: ['bottomRight'],
defaultPageSize:
{{#if
ctrl
.
pagingSize
}}{{
ctrl
.
pagingSize
}}{{else}}
20
{{/if}}
,
defaultPageSize:
{{#if
ctrl
.
pagingSize
}}{{
ctrl
.
pagingSize
}}{{else}}
20
{{/if}}
,
showQuickJumper: true,
showQuickJumper: true,
showTotal: (total: number, range: IParam[]) => `
${range[0]}-${range[1]} of ${total} items
`,
showTotal: (total: number, range: IParam[]) => `
显示 ${range[0]} - ${range[1]} 条数据,共 ${total} 条数据
`,
pageSizeOptions: ['10','20','50','100'],
pageSizeOptions: ['10','20','50','100'],
}
{{else}}
false
{{/if}}
,
}
{{else}}
false
{{/if}}
,
},
},
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录