Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
4e2411c0
提交
4e2411c0
编写于
1月 13, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
2bff2322
变更
13
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
763 行增加
和
705 行删除
+763
-705
grid-view.ts
...pp_{{apps}}/src/core/modules/views/grid-view/grid-view.ts
+1
-2
md-view.ts
...r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
+8
-7
pickup-view.ts
...{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
+0
-1
control-base.ts
...s}}/src/core/modules/widgets/control-base/control-base.ts
+11
-8
grid-control-prop.ts
...rc/core/modules/widgets/grid-control/grid-control-prop.ts
+3
-37
grid-control-state.ts
...c/core/modules/widgets/grid-control/grid-control-state.ts
+3
-72
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+283
-573
main-control.ts
...s}}/src/core/modules/widgets/main-control/main-control.ts
+15
-1
index.ts
...app_{{apps}}/src/core/modules/widgets/md-control/index.ts
+3
-0
md-control-prop.ts
...}}/src/core/modules/widgets/md-control/md-control-prop.ts
+45
-0
md-control-state.ts
...}/src/core/modules/widgets/md-control/md-control-state.ts
+60
-0
md-control.ts
...{apps}}/src/core/modules/widgets/md-control/md-control.ts
+329
-0
grid-service.ts
...{{apps}}/src/core/service/control-service/grid-service.ts
+2
-4
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/grid-view/grid-view.ts
浏览文件 @
4e2411c0
...
...
@@ -72,8 +72,7 @@ public declare state: GridViewState;
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
grid
:
this
.
grid
,
onSearchFormSearch
:
this
.
onSearchFormSearch
.
bind
(
this
)
grid
:
this
.
grid
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
浏览文件 @
4e2411c0
...
...
@@ -127,6 +127,12 @@ export class MDView extends MainView {
* @memberof MDView
*/
public
MDCtrlEvent
(
eventName
:
string
,
args
:
any
):
void
{
if
(
Object
.
is
(
eventName
,
'beforeload'
))
{
this
.
MDCtrlBeforeLoad
(
args
)
}
if
(
Object
.
is
(
eventName
,
'load'
))
{
this
.
MDCtrlLoaded
(
args
);
}
if
(
Object
.
is
(
eventName
,
'rowclick'
))
{
this
.
doEdit
(
args
);
}
...
...
@@ -136,12 +142,6 @@ export class MDView extends MainView {
if
(
Object
.
is
(
eventName
,
'selectionchange'
))
{
this
.
selectionChange
(
args
);
}
if
(
Object
.
is
(
eventName
,
'load'
))
{
this
.
MDCtrlLoaded
(
args
);
}
if
(
Object
.
is
(
eventName
,
'beforeload'
))
{
this
.
MDCtrlBeforeLoad
(
args
)
}
}
/**
...
...
@@ -157,6 +157,7 @@ export class MDView extends MainView {
if
(
this
.
getSearchBar
())
{
Object
.
assign
(
args
,
this
.
getSearchBar
().
getData
());
}
Object
.
assign
(
args
,
{
test
:
111
});
// if (this.view && !this.view.isExpandSearchForm) {
// Object.assign(args, { query: this.view.query });
// }
...
...
@@ -181,7 +182,7 @@ export class MDView extends MainView {
* @memberof MDView
*/
public
MDCtrlLoaded
(
args
:
any
)
{
throw
new
Error
(
'Method not implemented.'
);
console
.
log
(
"数据加载完成"
,
args
);
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
浏览文件 @
4e2411c0
...
...
@@ -50,7 +50,6 @@ export class PickupView extends MainView {
}
public
handleCtrlEvent
(
actionParam
:
IActionParam
)
{
debugger
const
{
tag
,
action
,
data
}
=
actionParam
;
// TODO
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/control-base/control-base.ts
浏览文件 @
4e2411c0
import
{
ControlPropsBase
,
ControlStateBase
,
IParam
,
UIBase
}
from
'@core'
;
import
{
ControlPropsBase
,
ControlStateBase
,
I
ActionParam
,
I
Param
,
UIBase
}
from
'@core'
;
/**
* @description 部件基类
...
...
@@ -31,11 +31,6 @@ export class ControlBase {
*/
public
declare
emit
:
Function
;
/**
* Creates an instance of ControlBase.
* @param {*} options 配置参数
* @memberof ControlBase
*/
/**
* Creates an instance of ControlBase.
* @param {*} options 配置参数
...
...
@@ -68,8 +63,15 @@ export class ControlBase {
// 把Ref赋值到State上进行解包
this
.
state
.
context
=
context
;
this
.
state
.
viewParams
=
viewParams
;
}
return
{
context
,
viewParams
};
/**
* 获取当前激活数据
*
* @memberof ControlBase
*/
public
getData
():
IParam
[]
{
return
[];
}
/**
...
...
@@ -83,7 +85,8 @@ export class ControlBase {
this
.
setState
();
this
.
useControlContextParams
();
return
{
state
:
this
.
state
state
:
this
.
state
,
activeData
:
this
.
getData
()
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control-prop.ts
浏览文件 @
4e2411c0
import
{
IParam
,
Main
ControlProps
}
from
"@core"
;
import
{
MD
ControlProps
}
from
"@core"
;
/**
* @description 表格部件的props
* @export
* @interface GridControlProps
* @extends {M
ain
ControlProps}
* @extends {M
D
ControlProps}
*/
export
interface
GridControlProps
extends
M
ain
ControlProps
{
export
interface
GridControlProps
extends
M
D
ControlProps
{
/**
* @description 是否多选
* @type {boolean}
* @memberof GridControlProps
*/
multiple
:
boolean
;
/**
* @description 行编辑状态
* @type {boolean}
* @memberof GridControlProps
*/
rowEditState
:
boolean
;
/**
* @description 行激活模式
* @type {(0 | 1 | 2)} 不激活 | 单击激活 | 双击激活
* @memberof GridControlProps
*/
rowActiveMode
:
0
|
1
|
2
;
/**
* @description 选中数据
* @type {IParam[]}
* @memberof GridControlProps
*/
selectedData
:
IParam
[];
/**
* @description 是否默认选中第一项数据
* @type {boolean}
* @memberof GridControlProps
*/
selectFirstDefault
:
boolean
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control-state.ts
浏览文件 @
4e2411c0
import
{
IParam
,
M
ain
ControlState
}
from
'@core'
;
import
{
IParam
,
M
D
ControlState
}
from
'@core'
;
/**
* @description 表格部件状态
* @export
* @interface GridControlState
* @extends {M
ain
ControlState}
* @extends {M
D
ControlState}
*/
export
interface
GridControlState
extends
MainControlState
{
/**
* @description 表格数据集合
* @type {IParam[]}
* @memberof GridControlState
*/
data
:
IParam
[];
export
interface
GridControlState
extends
MDControlState
{
/**
* @description 表格列模型
...
...
@@ -36,48 +29,6 @@ export interface GridControlState extends MainControlState {
*/
rules
:
IParam
;
/**
* @description 是否多选
* @type {boolean}
* @memberof GridControlState
*/
multiple
:
boolean
;
/**
* @description 行编辑状态
* @type {boolean}
* @memberof GridControlState
*/
rowEditState
:
boolean
;
/**
* @description 行激活模式
* @type {(0 | 1 | 2)} 不激活 | 单击激活 | 双击激活
* @memberof GridControlState
*/
rowActiveMode
:
0
|
1
|
2
;
/**
* @description 选中数据
* @type {IParam[]}
* @memberof GridControlState
*/
selectedData
:
IParam
[];
/**
* @description 选中行keys
* @type {string[]}
* @memberof GridControlState
*/
selectedRowKeys
:
string
[];
/**
* @description 是否默认选中第一条数据
* @type {boolean}
* @memberof GridControlState
*/
selectFirstDefault
:
boolean
;
/**
* @description 表格聚合
* @type {IParam}
...
...
@@ -85,24 +36,4 @@ export interface GridControlState extends MainControlState {
*/
gridAgg
:
IParam
;
/**
* @description 表格分组
* @type {IParam}
* @memberof GridControlState
*/
gridGroup
:
IParam
;
/**
* @description 表格排序
* @type {IParam}
* @memberof GridControlState
*/
gridSort
:
IParam
;
/**
* @description 表格分页
* @type {IParam}
* @memberof GridControlState
*/
gridPaging
:
IParam
;
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
4e2411c0
此差异已折叠。
点击以展开。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/main-control/main-control.ts
浏览文件 @
4e2411c0
import
{
ControlBase
,
MainControlProps
,
MainControlState
}
from
'@core'
;
import
{
ControlBase
,
IParam
,
MainControlProps
,
MainControlState
,
UIUtil
}
from
'@core'
;
/**
* @description 实体部件
...
...
@@ -24,6 +24,20 @@ export class MainControl extends ControlBase {
this
.
state
.
controlAction
=
toRef
(
this
.
props
,
'controlAction'
)
as
any
;
}
/**
* 获取指定数据的操作权限
*
* @param {IParam} data 指定数据
* @param {IParam} actionModel 界面行为模型
* @memberof MainControl
*/
public
async
getActionAuthState
(
data
:
IParam
,
actionModel
:
IParam
)
{
const
{
context
,
appEntityCodeName
}
=
this
.
state
;
const
tempUIservice
=
await
App
.
getUIService
(
appEntityCodeName
.
toLowerCase
(),
context
);
UIUtil
.
calcActionItemAuthState
(
data
,
actionModel
,
tempUIservice
);
return
actionModel
;
}
/**
* @description 安装部件所有功能模块的方法
* @return {*}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/index.ts
0 → 100644
浏览文件 @
4e2411c0
export
*
from
'./md-control-prop'
export
*
from
'./md-control-state'
export
*
from
'./md-control'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/md-control-prop.ts
0 → 100644
浏览文件 @
4e2411c0
import
{
IParam
,
MainControlProps
}
from
"@core"
;
/**
* @description 多数据部件的props
* @export
* @interface MDControlProps
* @extends {MainControlProps}
*/
export
interface
MDControlProps
extends
MainControlProps
{
/**
* @description 是否多选
* @type {boolean}
* @memberof MDControlProps
*/
isMultiple
:
boolean
;
/**
* @description 行编辑状态
* @type {boolean}
* @memberof MDControlProps
*/
rowEditState
:
boolean
;
/**
* @description 行激活模式
* @type {(0 | 1 | 2)} 不激活 | 单击激活 | 双击激活
* @memberof MDControlProps
*/
rowActiveMode
:
0
|
1
|
2
;
/**
* @description 选中数据
* @type {IParam[]}
* @memberof MDControlProps
*/
selectedData
:
IParam
[];
/**
* @description 是否默认选中第一项数据
* @type {boolean}
* @memberof MDControlProps
*/
isSelectDefault
:
boolean
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/md-control-state.ts
0 → 100644
浏览文件 @
4e2411c0
import
{
IParam
,
MainControlState
}
from
'@core'
;
/**
* @description 多数据部件状态
* @export
* @interface MDControlState
* @extends {MainControlState}
*/
export
interface
MDControlState
extends
MainControlState
{
/**
* @description 多数据部件数据
* @type {IParam[]}
* @memberof MDControlState
*/
items
:
IParam
[];
/**
* @description 是否多选
* @type {boolean}
* @memberof MDControlState
*/
isMultiple
:
boolean
;
/**
* @description 行编辑状态
* @type {boolean}
* @memberof MDControlState
*/
rowEditState
:
boolean
;
/**
* @description 行激活模式
* @type {(0 | 1 | 2)} 不激活 | 单击激活 | 双击激活
* @memberof MDControlState
*/
rowActiveMode
:
0
|
1
|
2
;
/**
* @description 选中数据
* @type {IParam[]}
* @memberof MDControlState
*/
selectedData
:
IParam
[];
/**
* @description 选中行keys
* @type {string[]}
* @memberof MDControlState
*/
selectedRowKeys
:
string
[];
/**
* @description 是否默认选中第一条数据
* @type {boolean}
* @memberof MDControlState
*/
isSelectDefault
:
boolean
;
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/md-control.ts
0 → 100644
浏览文件 @
4e2411c0
此差异已折叠。
点击以展开。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/service/control-service/grid-service.ts
浏览文件 @
4e2411c0
...
...
@@ -23,7 +23,6 @@ export class GridService<T extends ControlVOBase> extends ControlServiceBase<T>
// todo主键
const
action
=
hasFunction
(
_entityService
,
opts
.
action
)
?
opts
.
action
:
'GetDraft'
;
const
response
=
await
_entityService
[
action
](
Context
,
Data
,
opts
.
isLoading
);
// this.setRemoteCopyData(response);
response
.
data
=
this
.
newControlVO
(
response
.
data
);
response
.
data
.
srfuf
=
'0'
;
return
this
.
handleResponse
(
response
,
opts
);
...
...
@@ -37,13 +36,12 @@ export class GridService<T extends ControlVOBase> extends ControlServiceBase<T>
* @return {*} {Promise<any>}
* @memberof GridService
*/
public
async
get
(
context
:
IParam
,
data
:
IParam
,
opts
:
{
action
:
string
;
isLoading
?:
boolean
}):
Promise
<
any
>
{
public
async
search
(
context
:
IParam
,
data
:
IParam
,
opts
:
{
action
:
string
;
isLoading
?:
boolean
}):
Promise
<
any
>
{
let
_entityService
:
any
=
this
.
entityService
;
const
{
context
:
Context
,
data
:
Data
}
=
this
.
handleRequestData
(
context
,
data
,
opts
);
const
action
=
hasFunction
(
_entityService
,
opts
.
action
)
?
opts
.
action
:
'GET'
;
const
response
=
await
_entityService
[
action
](
Context
,
Data
,
opts
.
isLoading
);
//this.setCopynativeData(response.data);
response
.
data
?.
forEach
((
item
:
IParam
)
=>
{
response
.
data
?.
forEach
((
item
:
IParam
)
=>
{
item
=
this
.
newControlVO
(
item
);
})
return
this
.
handleResponse
(
response
,
opts
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录