Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
272ed9fb
提交
272ed9fb
编写于
1月 26, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
a3ab3e1d
变更
21
显示空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
158 行增加
和
98 行删除
+158
-98
i-action-param.ts
.../app_{{apps}}/src/core/interface/common/i-action-param.ts
+2
-2
app-sys-action.ts
...p_{{apps}}/src/core/logic/app-ui-action/app-sys-action.ts
+30
-19
main-view.ts
...pp_{{apps}}/src/core/modules/views/main-view/main-view.ts
+1
-1
md-view.ts
...r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
+29
-19
control-base.ts
...s}}/src/core/modules/widgets/control-base/control-base.ts
+6
-4
form-control.ts
...s}}/src/core/modules/widgets/form-control/form-control.ts
+9
-9
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+50
-19
md-control.ts
...{apps}}/src/core/modules/widgets/md-control/md-control.ts
+7
-1
view-util.ts
...rces/templ/r7/app_{{apps}}/src/core/utils/ui/view-util.ts
+1
-1
{{ctrls@APPMENU}}-menu.vue.hbs
...s}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
+2
-2
{{ctrls@DASHBOARD}}-dashboard.vue.hbs
...SHBOARD}}-dashboard/{{ctrls@DASHBOARD}}-dashboard.vue.hbs
+2
-2
{{ctrls@FORM}}-form.vue.hbs
...ntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
+2
-2
{{ctrls@GRID}}-grid.vue.hbs
...ntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
+2
-2
{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
...panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
+2
-2
{{ctrls@PORTLET}}-portlet.vue.hbs
...ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet.vue.hbs
+2
-2
{{ctrls@QUICKSEARCHFORM}}-quick-search-form.vue.hbs
...-form/{{ctrls@QUICKSEARCHFORM}}-quick-search-form.vue.hbs
+1
-1
{{ctrls@SEARCHBAR}}-searchBar.vue.hbs
...ARCHBAR}}-searchBar/{{ctrls@SEARCHBAR}}-searchBar.vue.hbs
+2
-2
{{ctrls@TABEXPPANEL}}-tab-exp-panel.vue.hbs
...tab-exp-panel/{{ctrls@TABEXPPANEL}}-tab-exp-panel.vue.hbs
+2
-2
{{ctrls@TABVIEWPANEL}}-tab-view-panel.vue.hbs
...-view-panel/{{ctrls@TABVIEWPANEL}}-tab-view-panel.vue.hbs
+2
-2
{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
...}}-tree-exp-bar/{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
+2
-2
{{ctrls@TREEVIEW}}-tree.vue.hbs
...}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree.vue.hbs
+2
-2
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/common/i-action-param.ts
浏览文件 @
272ed9fb
...
...
@@ -14,10 +14,10 @@ export interface IActionParam {
/**
* @description 触发行为
* @type {
('LOAD' | 'SAVE' | 'REMOVE' | 'AUTOLOAD' | 'LOADDRAFT' | 'FILTER' | 'REFRESH_PARENT' | string)
}
* @type {
string
}
* @memberof IActionParam
*/
action
:
'LOAD'
|
'SAVE'
|
'REMOVE'
|
'AUTOLOAD'
|
'LOADDRAFT'
|
'FILTER'
|
'REFRESH_PARENT'
|
string
;
action
:
string
;
/**
* @description 数据
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/logic/app-ui-action/app-sys-action.ts
浏览文件 @
272ed9fb
...
...
@@ -96,15 +96,23 @@ export class AppSysAction {
* @return {*}
*/
public
static
edit
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
const
{
actionEnvironment
,
data
}
=
params
;
// 准备视图参数
if
(
!
actionEnvironment
?.
state
?.
viewLogics
?.
openData
?.
openDataViewName
)
{
return
;
}
const
viewName
=
actionEnvironment
?.
state
.
viewLogics
.
openData
.
openDataViewName
;
const
view
=
App
.
getViewInfo
(
viewName
);
if
(
!
view
)
{
console
.
warn
(
"视图参数不足"
);
return
;
}
// 准备数据参数
if
(
!
data
||
!
Array
.
isArray
(
data
)
||
(
data
.
length
==
0
))
{
console
.
warn
(
"数据参数不足"
);
return
;
}
Object
.
assign
(
params
.
context
,
{
[
actionEnvironment
.
state
.
keyPSDEField
]:
data
[
0
].
srfkey
})
ViewUtil
.
openData
(
view
,
params
);
}
...
...
@@ -116,6 +124,7 @@ export class AppSysAction {
*/
public
static
new
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
// 准备视图参数
if
(
!
actionEnvironment
?.
state
?.
viewLogics
?.
newData
?.
newDataViewName
)
{
return
;
}
...
...
@@ -124,6 +133,8 @@ export class AppSysAction {
if
(
!
view
)
{
return
;
}
// 准备数据参数
Object
.
assign
(
params
.
viewParams
,
{
w
:
new
Date
().
getTime
()
});
ViewUtil
.
newData
(
view
,
params
);
}
...
...
@@ -135,7 +146,7 @@ export class AppSysAction {
*/
public
static
toggleRowEdit
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
if
(
isExist
(
actionEnvironment
.
state
.
rowEditState
))
{
if
(
isExist
(
actionEnvironment
.
state
.
rowEditState
))
{
actionEnvironment
.
state
.
rowEditState
=
!
actionEnvironment
.
state
.
rowEditState
;
}
}
...
...
@@ -149,9 +160,9 @@ export class AppSysAction {
public
static
newRow
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
// 视图里获取多数据部件
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"newRow"
))
{
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"newRow"
))
{
actionEnvironment
.
xDataControl
.
newRow
();
}
else
if
(
isExist
(
actionEnvironment
.
newRow
))
{
}
else
if
(
isExist
(
actionEnvironment
.
newRow
))
{
actionEnvironment
.
newRow
();
}
}
...
...
@@ -165,9 +176,9 @@ export class AppSysAction {
public
static
save
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
// 视图里获取多数据部件
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"save"
))
{
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"save"
))
{
actionEnvironment
.
xDataControl
.
save
();
}
else
if
(
isExist
(
actionEnvironment
.
save
))
{
}
else
if
(
isExist
(
actionEnvironment
.
save
))
{
actionEnvironment
.
save
();
}
}
...
...
@@ -181,9 +192,9 @@ export class AppSysAction {
public
static
saveRow
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
// 视图里获取多数据部件
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"save"
))
{
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"save"
))
{
actionEnvironment
.
xDataControl
.
save
();
}
else
if
(
isExist
(
actionEnvironment
.
save
))
{
}
else
if
(
isExist
(
actionEnvironment
.
save
))
{
actionEnvironment
.
save
();
}
}
...
...
@@ -197,9 +208,9 @@ export class AppSysAction {
public
static
remove
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
// 视图里获取多数据部件
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"remove"
))
{
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"remove"
))
{
actionEnvironment
.
xDataControl
.
remove
();
}
else
if
(
isExist
(
actionEnvironment
.
remove
))
{
}
else
if
(
isExist
(
actionEnvironment
.
remove
))
{
actionEnvironment
.
remove
();
}
}
...
...
@@ -213,9 +224,9 @@ export class AppSysAction {
public
static
refresh
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
// 视图里获取多数据部件
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"refresh"
))
{
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"refresh"
))
{
actionEnvironment
.
xDataControl
.
refresh
();
}
else
if
(
isExist
(
actionEnvironment
.
refresh
))
{
}
else
if
(
isExist
(
actionEnvironment
.
refresh
))
{
actionEnvironment
.
refresh
();
}
}
...
...
@@ -228,7 +239,7 @@ export class AppSysAction {
*/
public
static
exit
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
if
(
isExist
(
actionEnvironment
.
closeView
))
{
if
(
isExist
(
actionEnvironment
.
closeView
))
{
actionEnvironment
.
refresh
();
}
}
...
...
@@ -242,9 +253,9 @@ export class AppSysAction {
public
static
async
saveAndExit
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
// 视图里获取多数据部件
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"save"
))
{
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"save"
))
{
await
actionEnvironment
.
xDataControl
.
save
();
}
else
if
(
isExist
(
actionEnvironment
.
save
))
{
}
else
if
(
isExist
(
actionEnvironment
.
save
))
{
await
actionEnvironment
.
save
();
}
// 关闭视图
...
...
@@ -260,9 +271,9 @@ export class AppSysAction {
public
static
async
removeAndExit
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
// 视图里获取多数据部件
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"remove"
))
{
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"remove"
))
{
await
actionEnvironment
.
xDataControl
.
remove
();
}
else
if
(
isExist
(
actionEnvironment
.
remove
))
{
}
else
if
(
isExist
(
actionEnvironment
.
remove
))
{
await
actionEnvironment
.
remove
();
}
// 关闭视图
...
...
@@ -277,7 +288,7 @@ export class AppSysAction {
*/
public
static
toggleFilter
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
if
(
isExist
(
actionEnvironment
.
state
.
expandSearchForm
))
{
if
(
isExist
(
actionEnvironment
.
state
.
expandSearchForm
))
{
actionEnvironment
.
state
.
expandSearchForm
=
!
actionEnvironment
.
state
.
expandSearchForm
;
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/main-view/main-view.ts
浏览文件 @
272ed9fb
...
...
@@ -44,7 +44,7 @@ export class MainView extends ViewBase {
const
inputParam
=
{
context
:
this
.
state
.
context
,
viewParams
:
this
.
state
.
viewParams
,
data
:
this
.
xDataControl
?.
getData
?.
(),
data
:
this
.
xDataControl
.
getData
(),
event
:
data
.
event
,
actionEnvironment
:
this
};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
浏览文件 @
272ed9fb
import
{
IActionParam
,
IParam
,
MainView
,
MDViewState
}
from
'@core'
;
import
{
IActionParam
,
IParam
,
MainView
,
MDViewState
,
ViewUtil
}
from
'@core'
;
/**
* 多数据视图
...
...
@@ -157,13 +157,13 @@ export class MDView extends MainView {
if
(
Object
.
is
(
eventName
,
'load'
))
{
this
.
MDCtrlLoaded
(
args
);
}
if
(
Object
.
is
(
eventName
,
'rowClick'
)
&&
this
.
state
.
gridRowActiveMode
===
1
)
{
if
(
Object
.
is
(
eventName
,
'rowClick'
))
{
this
.
doEdit
(
args
);
}
if
(
Object
.
is
(
eventName
,
'rowDbClick'
)
&&
this
.
state
.
gridRowActiveMode
===
2
)
{
if
(
Object
.
is
(
eventName
,
'rowDbClick'
))
{
this
.
doEdit
(
args
);
}
if
(
Object
.
is
(
eventName
,
'selection
c
hange'
))
{
if
(
Object
.
is
(
eventName
,
'selection
C
hange'
))
{
this
.
selectionChange
(
args
);
}
}
...
...
@@ -215,7 +215,9 @@ export class MDView extends MainView {
* @memberof MDView
*/
public
selectionChange
(
args
:
any
)
{
throw
new
Error
(
'Method not implemented.'
);
// 抛出数据
this
.
emit
(
"onViewEvent"
,
{
tag
:
this
.
state
.
viewName
,
action
:
'selectionChange'
,
data
:
args
});
// 计算按钮权限 todo
}
/**
...
...
@@ -225,19 +227,27 @@ export class MDView extends MainView {
* @memberof MDView
*/
public
doEdit
(
args
:
any
)
{
this
.
onToolbarEvent
({
tag
:
''
,
action
:
''
,
data
:
{
uIAction
:
{
codeName
:
'Edit'
,
fullCodeName
:
'Edit'
,
uIActionMode
:
'SYS'
,
uIActionTag
:
'Edit'
,
uIActionType
:
'DEUIACTION'
,
},
},
});
//准备打开视图
if
(
!
this
.
state
?.
viewLogics
?.
openData
?.
openDataViewName
)
{
return
;
}
const
viewName
=
this
.
state
.
viewLogics
.
openData
.
openDataViewName
;
const
view
=
App
.
getViewInfo
(
viewName
);
if
(
!
view
)
{
return
;
}
// 准备参数
const
tempContext
=
{};
Object
.
assign
(
tempContext
,
{
[
this
.
state
.
keyPSDEField
]:
args
[
0
].
srfkey
});
Object
.
assign
(
tempContext
,
this
.
state
.
context
);
const
params
=
{
context
:
tempContext
,
viewParams
:
this
.
state
.
viewParams
,
data
:
args
,
event
:
undefined
,
actionEnvironment
:
this
}
ViewUtil
.
openData
(
view
,
params
);
}
/**
...
...
@@ -305,5 +315,5 @@ export class MDView extends MainView {
* @return {*} {*}
* @memberof MDView
*/
public
getMDCtrl
():
any
{}
public
getMDCtrl
():
any
{
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/control-base/control-base.ts
浏览文件 @
272ed9fb
...
...
@@ -50,6 +50,7 @@ export class ControlBase {
*/
public
setState
()
{
this
.
state
.
viewSubject
=
toRef
(
this
.
props
,
'viewSubject'
)
as
any
;
this
.
state
.
controlName
=
this
.
props
.
name
;
}
/**
...
...
@@ -78,7 +79,7 @@ export class ControlBase {
* 关闭视图
*
*/
public
closeView
(){
public
closeView
()
{
this
.
emit
(
'ctrlEvent'
,
{
tag
:
this
.
props
.
name
,
action
:
'closeView'
,
data
:
undefined
});
}
...
...
@@ -88,7 +89,7 @@ export class ControlBase {
* @param {IActionParam} actionParam
* @memberof ControlBase
*/
public
onCtrlEvent
(
actionParam
:
IActionParam
)
{}
public
onCtrlEvent
(
actionParam
:
IActionParam
)
{
}
/**
* @description 安装部件所有功能模块的方法
...
...
@@ -102,8 +103,9 @@ export class ControlBase {
this
.
useControlContextParams
();
return
{
state
:
this
.
state
,
getData
:
this
.
getData
.
bind
(
this
),
onCtrlEvent
:
this
.
onCtrlEvent
.
bind
(
this
),
name
:
this
.
state
.
controlName
,
getData
:
this
.
getData
,
onCtrlEvent
:
this
.
onCtrlEvent
,
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/form-control/form-control.ts
浏览文件 @
272ed9fb
...
...
@@ -354,7 +354,7 @@ export class FormControl extends MainControl {
* @protected
* @param [opt={}]
*/
protected
async
loadDraft
(
opt
:
any
=
{})
{}
protected
async
loadDraft
(
opt
:
any
=
{})
{
}
/**
* @description 使用加载草稿功能模块
...
...
@@ -378,7 +378,7 @@ export class FormControl extends MainControl {
// 发起请求处理与解析请求
const
response
=
await
controlService
.
loadDraft
(
_context
,
{
viewParams
:
_viewParams
}
,
_viewParams
,
{
action
:
controlAction
.
loadDraftAction
,
isLoading
:
showBusyIndicator
},
);
if
(
response
.
status
&&
response
.
status
==
200
)
{
...
...
@@ -419,7 +419,7 @@ export class FormControl extends MainControl {
* @protected
* @param [opt={}]
*/
protected
async
load
(
opt
:
any
=
{})
{}
protected
async
load
(
opt
:
any
=
{})
{
}
/**
* @description 使用加载功能模块
...
...
@@ -449,7 +449,7 @@ export class FormControl extends MainControl {
// 发起请求处理与解析请求
const
response
=
await
controlService
.
get
(
_context
,
{
viewParams
:
_viewParams
}
,
_viewParams
,
{
action
:
controlAction
.
loadAction
,
isLoading
:
showBusyIndicator
},
);
if
(
response
.
status
&&
response
.
status
==
200
)
{
...
...
@@ -488,7 +488,7 @@ export class FormControl extends MainControl {
* @protected
* @param [opt={}]
*/
protected
async
save
(
opt
:
any
=
{})
{}
protected
async
save
(
opt
:
any
=
{})
{
}
/**
* @description 使用加载功能模块
...
...
@@ -524,7 +524,7 @@ export class FormControl extends MainControl {
let
_viewParams
=
deepCopy
(
viewParams
);
const
arg
:
any
=
{
...
opt
};
Object
.
assign
(
arg
,
data
.
getDo
());
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
}
);
Object
.
assign
(
arg
,
_viewParams
);
// TODO 关系界面保存通知处理,做成异步。
// TODO 拷贝相关。
...
...
@@ -574,7 +574,7 @@ export class FormControl extends MainControl {
* @protected
* @param [opt={}]
*/
protected
async
remove
(
opt
:
any
=
{})
{}
protected
async
remove
(
opt
:
any
=
{})
{
}
/**
* @description 使用加载功能模块
...
...
@@ -605,7 +605,7 @@ export class FormControl extends MainControl {
let
_context
=
deepCopy
(
context
);
let
_viewParams
=
deepCopy
(
viewParams
);
const
arg
:
any
=
opt
[
0
];
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
}
);
Object
.
assign
(
arg
,
_viewParams
);
// 发起请求处理与解析请求
const
response
=
await
controlService
.
remove
(
_context
,
arg
,
{
...
...
@@ -650,7 +650,7 @@ export class FormControl extends MainControl {
* @protected
* @param [opt={}]
*/
protected
async
refresh
(
opt
:
any
=
{})
{}
protected
async
refresh
(
opt
:
any
=
{})
{
}
/**
* @description 使用刷新功能模块
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
272ed9fb
...
...
@@ -31,13 +31,12 @@ export class GridControl extends MDControl {
*/
public
useCustom
()
{
const
{
controlName
,
selectFirstDefault
,
rowEditState
,
rowActiveMode
,
isSingleSelect
}
=
this
.
state
;
const
{
selectedRowKeys
}
=
toRefs
(
this
.
state
);
// 滚动条配置
const
useScrollOption
=
computed
(()
=>
{
return
{
scrollToFirstRowOnChange
:
true
,
x
:
'1
1
0%'
,
y
:
'
690px
'
,
x
:
'1
0
0%'
,
y
:
'
100%
'
,
}
});
// 指定表格行key
...
...
@@ -52,17 +51,51 @@ export class GridControl extends MDControl {
const
useCustomRow
=
(
record
:
IParam
,
index
:
number
)
=>
{
return
{
onClick
:
()
=>
{
// 单击激活
if
(
this
.
state
.
rowActiveMode
===
1
)
{
if
(
!
rowEditState
)
{
selectedRowKeys
.
value
=
[
record
.
srfkey
];
const
activeIndex
:
number
=
this
.
state
.
selectedRowKeys
.
findIndex
((
key
:
string
)
=>
{
return
record
.
srfkey
===
key
;
});
if
(
activeIndex
===
-
1
)
{
this
.
state
.
selectedRowKeys
.
push
(
record
.
srfkey
);
this
.
state
.
selectedData
.
push
(
record
);
}
else
{
this
.
state
.
selectedRowKeys
=
this
.
state
.
selectedRowKeys
.
filter
((
key
:
string
)
=>
{
return
key
!==
record
.
srfkey
;
})
this
.
state
.
selectedData
=
this
.
state
.
selectedData
.
filter
((
item
:
any
)
=>
{
return
item
.
srfkey
!==
record
.
srfkey
;
})
}
if
(
!
record
.
children
)
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowClick"
,
data
:
[
deepCopy
(
record
)]
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
[
record
]
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowClick"
,
data
:
[
record
]
});
}
}
}
},
onDblclick
:
()
=>
{
// 双击激活
if
(
this
.
state
.
rowActiveMode
===
2
)
{
if
(
!
record
.
children
)
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowDbClick"
,
data
:
[
deepCopy
(
record
)]
})
const
activeIndex
:
number
=
this
.
state
.
selectedRowKeys
.
findIndex
((
key
:
string
)
=>
{
return
record
.
srfkey
===
key
;
});
if
(
activeIndex
===
-
1
)
{
this
.
state
.
selectedRowKeys
.
push
(
record
.
srfkey
);
this
.
state
.
selectedData
.
push
(
record
);
}
else
{
this
.
state
.
selectedRowKeys
=
this
.
state
.
selectedRowKeys
.
filter
((
key
:
string
)
=>
{
return
key
!==
record
.
srfkey
;
})
this
.
state
.
selectedData
=
this
.
state
.
selectedData
.
filter
((
item
:
any
)
=>
{
return
item
.
srfkey
!==
record
.
srfkey
;
})
}
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowDbClick"
,
data
:
[
record
]
});
}
}
}
};
...
...
@@ -74,11 +107,11 @@ export class GridControl extends MDControl {
}
return
{
type
:
isSingleSelect
?
'radio'
:
'checkbox'
,
columnWidth
:
90
,
selectedRowKeys
:
selectedRowKeys
.
value
,
columnWidth
:
32
,
selectedRowKeys
:
this
.
state
.
selectedRowKeys
,
checkStrictly
:
this
.
props
.
multiple
?
false
:
true
,
onChange
:
(
_selectedRowKeys
:
string
[],
selectedRows
:
IParam
[])
=>
{
selectedRowKeys
.
value
=
_selectedRowKeys
;
this
.
state
.
selectedRowKeys
=
_selectedRowKeys
;
const
selection
:
IParam
[]
=
[];
selectedRows
.
forEach
((
select
:
IParam
)
=>
{
if
(
!
select
.
children
)
{
...
...
@@ -151,7 +184,7 @@ export class GridControl extends MDControl {
}
const
validator
=
new
schema
({
[
name
]:
fileRule
});
validator
.
validate
({
[
name
]:
value
},
undefined
,
(
errors
:
ErrorList
,
fields
:
FieldErrorList
)
=>
{
const
error
=
errors
?.
find
((
item
:
any
)
=>
{
const
error
=
errors
?.
find
((
item
:
any
)
=>
{
return
item
.
field
===
name
;
})
gridEditState
.
value
[
name
][
rowIndex
]
=
error
;
...
...
@@ -467,13 +500,11 @@ export class GridControl extends MDControl {
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
console
.
log
(
this
.
state
);
return
{
...
superParams
,
useCustom
:
this
.
useCustom
(),
onEditorEvent
:
this
.
onEditorEvent
.
bind
(
this
)
,
onToolbarEvent
:
this
.
onToolbarEvent
.
bind
(
this
)
onEditorEvent
:
this
.
onEditorEvent
,
onToolbarEvent
:
this
.
onToolbarEvent
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/md-control.ts
浏览文件 @
272ed9fb
...
...
@@ -24,7 +24,13 @@ export class MDControl extends MainControl {
this
.
state
.
isMultiple
=
toRef
(
this
.
props
,
'isMultiple'
)
as
any
;
this
.
state
.
rowEditState
=
toRef
(
this
.
props
,
'rowEditState'
)
as
any
;
this
.
state
.
rowActiveMode
=
toRef
(
this
.
props
,
'rowActiveMode'
)
as
any
;
if
(
this
.
props
[
'selectedData'
])
{
this
.
state
.
selectedData
=
UIBase
.
toOneWayRef
(
this
.
props
,
'selectedData'
)
as
any
;
}
else
{
if
(
!
this
.
state
.
selectedData
)
{
this
.
state
.
selectedData
=
ref
([])
as
any
;
}
}
this
.
state
.
selectFirstDefault
=
toRef
(
this
.
props
,
'selectFirstDefault'
)
as
any
;
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/utils/ui/view-util.ts
浏览文件 @
272ed9fb
...
...
@@ -89,7 +89,7 @@ export class ViewUtil {
* @param {ViewDetail} view
* @memberof ViewUtil
*/
public
static
async
openData
(
view
:
ViewDetail
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
})
{
public
static
async
openData
(
view
:
ViewDetail
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
|
undefined
,
actionEnvironment
:
IParam
})
{
const
{
context
,
viewParams
,
data
,
event
,
actionEnvironment
}
=
params
if
(
view
)
{
// const _data: any = {};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -21,10 +21,10 @@ interface CtrlEmit {
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
{
state
,
onMenuSelect
}
=
new
MenuControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onMenuSelect
}
=
new
MenuControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@DASHBOARD}}-dashboard/{{ctrls@DASHBOARD}}-dashboard.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -42,10 +42,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
}
=
new
DashboardControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
}
=
new
DashboardControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
<template>
<div
class=
"app-dashboard
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -40,10 +40,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onEditorEvent
,
onComponentEvent
}
=
new
FormControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onEditorEvent
,
onComponentEvent
}
=
new
FormControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
<template>
<a-form
name=
"
{{
ctrl
.
codeName
}}
"
class=
"app-form
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}{{#if
ctrl
.
infoFormMode
}}
app-info-form
{{/if}}
"
style=
"
{{#if
ctrl
.
formWidth
}}
width:
{{
ctrl
.
formWidth
}}
px;
{{/if}}
"
:model=
"state.data"
:rules=
"state.rules"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -36,11 +36,11 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力
const
{
state
,
useCustom
,
onEditorEvent
,
onToolbarEvent
,
newRow
,
remove
,
save
,
load
,
refresh
,
getData
}
=
new
GridControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
useCustom
,
onEditorEvent
,
onToolbarEvent
,
newRow
,
remove
,
save
,
load
,
refresh
,
getData
}
=
new
GridControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
useScrollOption
,
useRowKey
,
useRowClassName
,
useCustomRow
,
useRowSelectionOption
,
onResizeColumn
,
onGridChange
}
=
useCustom
;
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
,
newRow
,
remove
,
save
,
load
,
refresh
,
getData
});
defineExpose
({
name
,
state
,
newRow
,
remove
,
save
,
load
,
refresh
,
getData
});
</script>
<template>
<a-form
name=
"
{{
ctrl
.
name
}}
"
class=
"app-grid-form"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -34,10 +34,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onViewEvent
}
=
new
PickupViewPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onViewEvent
}
=
new
PickupViewPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PORTLET}}-portlet/{{ctrls@PORTLET}}-portlet.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -26,10 +26,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onViewEvent
}
=
new
PortletControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onViewEvent
}
=
new
PortletControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
<template>
<div
class=
"app-portlet
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@QUICKSEARCHFORM}}-quick-search-form/{{ctrls@QUICKSEARCHFORM}}-quick-search-form.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -27,7 +27,7 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onEditorEvent
}
=
new
QuickSearchFormControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onEditorEvent
}
=
new
QuickSearchFormControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@SEARCHBAR}}-searchBar/{{ctrls@SEARCHBAR}}-searchBar.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -22,10 +22,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
}
=
new
SearchBarControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
const
{
name
,
state
}
=
new
SearchBarControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
<template>
<div
class=
"search-bar
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TABEXPPANEL}}-tab-exp-panel/{{ctrls@TABEXPPANEL}}-tab-exp-panel.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -35,10 +35,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onCtrlEvent
}
=
new
TabExpPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onCtrlEvent
}
=
new
TabExpPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TABVIEWPANEL}}-tab-view-panel/{{ctrls@TABVIEWPANEL}}-tab-view-panel.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -26,10 +26,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onViewEvent
}
=
new
TabViewPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onViewEvent
}
=
new
TabViewPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEEXPBAR}}-tree-exp-bar/{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -36,10 +36,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onCtrlEvent
,
xData
}
=
new
TreeExpBarControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onCtrlEvent
,
xData
}
=
new
TreeExpBarControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree.vue.hbs
浏览文件 @
272ed9fb
...
...
@@ -29,10 +29,10 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
load
,
treeNodeSelect
}
=
new
TreeControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
load
,
treeNodeSelect
}
=
new
TreeControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
defineExpose
({
name
,
state
});
</script>
// TODO 树节点待支持图标和自定义绘制
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录