Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
5206e49f
提交
5206e49f
编写于
1月 11, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新树节点导航参数支持
上级
74e5086e
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
77 行增加
和
69 行删除
+77
-69
tree-exp-bar-control.ts
...ules/widgets/tree-exp-bar-control/tree-exp-bar-control.ts
+3
-3
tree-node-rs-vo.ts
...ore/runtime/control-vo/tree-control-vo/tree-node-rs-vo.ts
+14
-0
tree-node-vo.ts
...c/core/runtime/control-vo/tree-control-vo/tree-node-vo.ts
+15
-0
tree-service.ts
...{{apps}}/src/core/service/control-service/tree-service.ts
+5
-64
{{ctrls@TREEVIEW}}-tree-config.ts.hbs
...rls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree-config.ts.hbs
+40
-2
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tree-exp-bar-control/tree-exp-bar-control.ts
浏览文件 @
5206e49f
...
@@ -60,7 +60,7 @@ export class TreeExpBarControl extends ExpBarControl {
...
@@ -60,7 +60,7 @@ export class TreeExpBarControl extends ExpBarControl {
protected
computeNavParams
(
arg
:
any
):
{
tempContext
:
any
,
tempViewParams
:
any
}
{
protected
computeNavParams
(
arg
:
any
):
{
tempContext
:
any
,
tempViewParams
:
any
}
{
const
tempContext
:
any
=
{};
const
tempContext
:
any
=
{};
const
tempViewParams
:
any
=
{};
const
tempViewParams
:
any
=
{};
cons
t
{
counter
,
context
}
=
this
.
controlState
;
le
t
{
counter
,
context
}
=
this
.
controlState
;
if
(
arg
&&
arg
.
navfilter
)
{
if
(
arg
&&
arg
.
navfilter
)
{
Object
.
defineProperty
(
tempViewParams
,
arg
.
navfilter
,
{
Object
.
defineProperty
(
tempViewParams
,
arg
.
navfilter
,
{
value
:
arg
.
srfkey
,
value
:
arg
.
srfkey
,
...
@@ -96,8 +96,8 @@ export class TreeExpBarControl extends ExpBarControl {
...
@@ -96,8 +96,8 @@ export class TreeExpBarControl extends ExpBarControl {
Object
.
assign
(
tempData
,
arg
);
Object
.
assign
(
tempData
,
arg
);
let
_params
=
UIUtil
.
computedNavData
(
tempData
,
tempContext
,
tempViewParams
,
arg
.
navigateParams
);
let
_params
=
UIUtil
.
computedNavData
(
tempData
,
tempContext
,
tempViewParams
,
arg
.
navigateParams
);
Object
.
assign
(
tempViewParams
,
_params
);
Object
.
assign
(
tempViewParams
,
_params
);
counter
.
value
+=
1
;
counter
+=
1
;
Object
.
assign
(
tempContext
,
{
srfcounter
:
counter
.
value
});
Object
.
assign
(
tempContext
,
{
srfcounter
:
counter
});
}
}
return
{
tempContext
,
tempViewParams
};
return
{
tempContext
,
tempViewParams
};
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/runtime/control-vo/tree-control-vo/tree-node-rs-vo.ts
浏览文件 @
5206e49f
...
@@ -8,6 +8,20 @@ export interface TreeNodeRSVO {
...
@@ -8,6 +8,20 @@ export interface TreeNodeRSVO {
*/
*/
childDeTreeNode
?:
IParam
;
childDeTreeNode
?:
IParam
;
/**
* @description 导航上下文
* @type {IParam}
* @memberof TreeNodeRSVO
*/
navigateContext
?:
IParam
;
/**
* @description 导航参数
* @type {IParam}
* @memberof TreeNodeRSVO
*/
navigateParams
?:
IParam
;
/**
/**
* @description 父值过滤项
* @description 父值过滤项
* @type {string}
* @type {string}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/runtime/control-vo/tree-control-vo/tree-node-vo.ts
浏览文件 @
5206e49f
...
@@ -176,6 +176,20 @@ export interface TreeNodeVO {
...
@@ -176,6 +176,20 @@ export interface TreeNodeVO {
*/
*/
navFilter
:
string
,
navFilter
:
string
,
/**
* @description 导航上下文
* @type {IParam}
* @memberof TreeNodeVO
*/
navigateContext
?:
IParam
;
/**
* @description 导航参数
* @type {IParam}
* @memberof TreeNodeVO
*/
navigateParams
?:
IParam
;
/**
/**
* @description 导航视图
* @description 导航视图
* @type {IParam}
* @type {IParam}
...
@@ -183,6 +197,7 @@ export interface TreeNodeVO {
...
@@ -183,6 +197,7 @@ export interface TreeNodeVO {
*/
*/
navView
?:
IParam
,
navView
?:
IParam
,
/**
/**
* @description 节点标识
* @description 节点标识
* @type {string}
* @type {string}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/service/control-service/tree-service.ts
浏览文件 @
5206e49f
...
@@ -134,9 +134,9 @@ export class TreeService<T extends ControlVOBase> extends ControlServiceBase<T>
...
@@ -134,9 +134,9 @@ export class TreeService<T extends ControlVOBase> extends ControlServiceBase<T>
// 填充对应节点关系的子节点
// 填充对应节点关系的子节点
if
(
nodeRSs
&&
nodeRSs
.
length
>
0
)
{
if
(
nodeRSs
&&
nodeRSs
.
length
>
0
)
{
for
(
let
i
=
0
,
len
=
nodeRSs
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
nodeRSs
.
length
;
i
<
len
;
i
++
)
{
let
rsNavContext
:
any
=
this
.
getNavContext
(
nodeRSs
[
i
])
;
let
rsNavContext
:
any
=
nodeRSs
[
i
].
navigateContext
;
let
rsNavParams
:
any
=
this
.
getNavParams
(
nodeRSs
[
i
])
;
let
rsNavParams
:
any
=
nodeRSs
[
i
].
navigateParams
;
let
rsParams
:
any
=
this
.
getParams
(
nodeRSs
[
i
])
;
let
rsParams
:
any
=
nodeRSs
[
i
].
params
;
// 根据节点标识填充节点
// 根据节点标识填充节点
let
treeNode
:
any
=
treeNodes
.
find
((
_node
:
TreeNodeVO
)
=>
{
let
treeNode
:
any
=
treeNodes
.
find
((
_node
:
TreeNodeVO
)
=>
{
return
nodeRSs
[
i
].
childDeTreeNode
?.
id
==
_node
.
id
;
return
nodeRSs
[
i
].
childDeTreeNode
?.
id
==
_node
.
id
;
...
@@ -191,9 +191,8 @@ export class TreeService<T extends ControlVOBase> extends ControlServiceBase<T>
...
@@ -191,9 +191,8 @@ export class TreeService<T extends ControlVOBase> extends ControlServiceBase<T>
leaf
:
!
node
.
hasPSDETreeNodeRSs
,
leaf
:
!
node
.
hasPSDETreeNodeRSs
,
selected
:
node
.
selected
,
selected
:
node
.
selected
,
navfilter
:
node
.
navFilter
,
navfilter
:
node
.
navFilter
,
// TODO 导航参数
navigateContext
:
node
.
navigateContext
,
// navgateContext: node.navgateContext,
navigateParams
:
node
.
navigateParams
// navgateParams: node.navgateParams
};
};
// 删除无用属性
// 删除无用属性
let
strNodeId
:
string
=
node
.
nodeType
;
let
strNodeId
:
string
=
node
.
nodeType
;
...
@@ -557,62 +556,4 @@ export class TreeService<T extends ControlVOBase> extends ControlServiceBase<T>
...
@@ -557,62 +556,4 @@ export class TreeService<T extends ControlVOBase> extends ControlServiceBase<T>
}
}
}
}
/**
* 获取树节点关系导航上下文
*
* @param noders 节点
* @memberof AppTreeService
*/
public
getNavContext
(
noders
:
TreeNodeRSVO
)
{
let
context
:
any
=
{};
// let navcontext: any = noders.getPSNavigateContexts();
// if (navcontext?.length > 0) {
// navcontext.forEach((item: IPSNavigateContext) => {
// context[item?.key] = {
// isRawValue: item?.rawValue,
// value: item.value
// }
// })
// }
return
context
;
}
/**
* 获取树节点关系导航参数
*
* @param noders 节点
* @memberof AppTreeService
*/
public
getNavParams
(
noders
:
TreeNodeRSVO
)
{
let
params
:
any
=
{};
// let navparams: any = noders.getPSNavigateParams();
// if (navparams?.length > 0) {
// navparams.forEach((item: IPSNavigateParam) => {
// params[item?.key] = {
// isRawValue: item?.rawValue,
// value: item.value
// }
// })
// }
return
params
;
}
/**
* 获取树节点关系参数
*
* @param noders 节点
* @memberof AppTreeService
*/
public
getParams
(
noders
:
TreeNodeRSVO
)
{
let
params
:
any
=
{};
// let reparams: any = noders?.getPSDETreeNodeRSParams();
// if (reparams?.length > 0) {
// reparams.forEach((item: IPSDETreeNodeRSParam) => {
// params[item?.key] = {
// value: item.value
// };
// })
// }
return
params
;
}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree-config.ts.hbs
浏览文件 @
5206e49f
import { ControlVOBase, TreeControlVO, TreeNodeVO, TreeService } from "@core";
import { ControlVOBase, TreeControlVO, TreeNodeVO, Tree
NodeRSVO, Tree
Service } from "@core";
import {
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service } from '@api/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
-service';
import {
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service } from '@api/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
-service';
export class ControlVO extends ControlVOBase implements TreeControlVO {
export class ControlVO extends ControlVOBase implements TreeControlVO {
...
@@ -79,11 +79,28 @@ export class ControlVO extends ControlVOBase implements TreeControlVO {
...
@@ -79,11 +79,28 @@ export class ControlVO extends ControlVOBase implements TreeControlVO {
{{/if}}
{{/if}}
id: '
{{
treeNode
.
id
}}
',
id: '
{{
treeNode
.
id
}}
',
navFilter: '
{{
treeNode
.
navFilter
}}
',
navFilter: '
{{
treeNode
.
navFilter
}}
',
{{#if
treeNode
.
psNavigateContexts
}}
navigateContext: {
{{#
each
treeNode
.
psNavigateContexts
as
|
navContext
|
}}
{{
navContext
.
key
}}
: '
{{#if
navContext
.
rawValue
}}{{
navContext
.
value
}}{{else}}
%
{{
navContext
.
value
}}
%
{{/if}}
',
{{/
each
}}
},
{{/if}}
{{#if
treeNode
.
psNavigateParams
}}
navigateParams: {
{{#
each
treeNode
.
psNavigateParams
as
|
navParam
|
}}
{{
navParam
.
key
}}
: '
{{#if
navParam
.
rawValue
}}{{
navParam
.
value
}}{{else}}
%
{{
navParam
.
value
}}
%
{{/if}}
',
{{/
each
}}
},
{{/if}}
{{#if
treeNode
.
navPSAppView
}}
{{#if
treeNode
.
navPSAppView
}}
navView: {
navView: {
viewName: '
{{
treeNode
.
navPSAppView
.
codeName
}}
'
viewName: '
{{
treeNode
.
navPSAppView
.
codeName
}}
'
},
},
{{/if}}
{{/if}}
{{#if
treeNode
.
nodeValue
}}
nodeValue: '
{{
treeNode
.
nodeValue
}}
',
{{/if}}
nodeType: '
{{
treeNode
.
nodeType
}}
',
nodeType: '
{{
treeNode
.
nodeType
}}
',
rootNode:
{{
treeNode
.
rootNode
}}
,
rootNode:
{{
treeNode
.
rootNode
}}
,
selectFirstOnly:
{{
treeNode
.
selectFirstOnly
}}
,
selectFirstOnly:
{{
treeNode
.
selectFirstOnly
}}
,
...
@@ -112,7 +129,7 @@ export class ControlVO extends ControlVOBase implements TreeControlVO {
...
@@ -112,7 +129,7 @@ export class ControlVO extends ControlVOBase implements TreeControlVO {
];
];
}
}
get treeNodeRSs() {
get treeNodeRSs()
: TreeNodeRSVO[]
{
return [
return [
{{#
each
ctrl
.
psDETreeNodeRSs
as
|
treeNodeRS
|
}}
{{#
each
ctrl
.
psDETreeNodeRSs
as
|
treeNodeRS
|
}}
{
{
...
@@ -121,6 +138,27 @@ export class ControlVO extends ControlVOBase implements TreeControlVO {
...
@@ -121,6 +138,27 @@ export class ControlVO extends ControlVOBase implements TreeControlVO {
id: '
{{
treeNodeRS
.
childPSDETreeNode
.
id
}}
'
id: '
{{
treeNodeRS
.
childPSDETreeNode
.
id
}}
'
},
},
{{/if}}
{{/if}}
{{#if
treeNodeRS
.
psNavigateContexts
}}
navigateContext: {
{{#
each
treeNodeRS
.
psNavigateContexts
as
|
navContext
|
}}
{{
navContext
.
key
}}
: '
{{#if
navContext
.
rawValue
}}{{
navContext
.
value
}}{{else}}
%
{{
navContext
.
value
}}
%
{{/if}}
',
{{/
each
}}
},
{{/if}}
{{#if
treeNodeRS
.
psNavigateParams
}}
navigateParams: {
{{#
each
treeNodeRS
.
psNavigateParams
as
|
navParam
|
}}
{{
navParam
.
key
}}
: '
{{#if
navParam
.
rawValue
}}{{
navParam
.
value
}}{{else}}
%
{{
navParam
.
value
}}
%
{{/if}}
',
{{/
each
}}
},
{{/if}}
{{#if
treeNodeRS
.
psDETreeNodeRSParams
}}
params: {
{{#
each
treeNodeRS
.
psDETreeNodeRSParams
as
|
param
|
}}
{{
param
.
key
}}
: { value: '
{{
param
.
value
}}
' }
{{/
each
}}
},
{{/if}}
{{#if
treeNodeRS
.
parentFilter
}}
{{#if
treeNodeRS
.
parentFilter
}}
parentFilter: '
{{
treeNodeRS
.
parentFilter
}}
',
parentFilter: '
{{
treeNodeRS
.
parentFilter
}}
',
{{/if}}
{{/if}}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录