Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
8929b58f
提交
8929b58f
编写于
1月 12, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新视图
上级
a2c1e38f
变更
24
显示空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
273 行增加
和
260 行删除
+273
-260
edit-view.ts
...pp_{{apps}}/src/core/modules/views/edit-view/edit-view.ts
+36
-14
exp-view.ts
.../app_{{apps}}/src/core/modules/views/exp-view/exp-view.ts
+5
-18
grid-view.ts
...pp_{{apps}}/src/core/modules/views/grid-view/grid-view.ts
+12
-15
index-view.ts
..._{{apps}}/src/core/modules/views/index-view/index-view.ts
+44
-16
main-view.ts
...pp_{{apps}}/src/core/modules/views/main-view/main-view.ts
+11
-31
md-view.ts
...r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
+17
-17
pickup-grid-view.ts
...c/core/modules/views/pickup-grid-view/pickup-grid-view.ts
+5
-9
pickup-view.ts
...{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
+6
-10
tree-exp-view.ts
...s}}/src/core/modules/views/tree-exp-view/tree-exp-view.ts
+4
-6
view-base.ts
...pp_{{apps}}/src/core/modules/views/view-base/view-base.ts
+52
-45
tree-control.ts
...s}}/src/core/modules/widgets/tree-control/tree-control.ts
+1
-1
{{pages@APPINDEXVIEW}}.vue.hbs
...s}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
+3
-2
{{pages@DEEDITVIEW}}.vue.hbs
...dules}}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}.vue.hbs
+2
-1
{{pages@DEGRIDVIEW}}.vue.hbs
...dules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
+1
-1
{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
...ges@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
+1
-1
{{pages@DEPICKUPVIEW}}.vue.hbs
...s}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
+1
-1
{{pages@DETREEEXPVIEW}}.vue.hbs
...}/{{pages@DETREEEXPVIEW}}/{{pages@DETREEEXPVIEW}}.vue.hbs
+1
-1
{{ctrls@APPMENU}}-menu.vue.hbs
...s}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
+9
-10
{{ctrls@FORM}}-form.vue.hbs
...ntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
+10
-11
{{ctrls@GRID}}-grid.vue.hbs
...ntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
+35
-33
{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
...panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
+5
-7
{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel.vue.hbs
...ewpanel/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel.vue.hbs
+5
-10
{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
...}}-tree-exp-bar/{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
+3
-0
{{ctrls@TREEVIEW}}-tree.vue.hbs
...}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree.vue.hbs
+4
-0
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/edit-view/edit-view.ts
浏览文件 @
8929b58f
import
{
EditView
Props
,
EditViewState
,
MainView
}
from
'@core'
;
import
{
EditView
State
,
IParam
,
MainView
}
from
'@core'
;
/**
* @description 编辑视图
...
...
@@ -13,33 +13,55 @@ export class EditView extends MainView {
* @type {EditViewState}
* @memberof EditView
*/
public
declare
viewS
tate
:
EditViewState
;
public
declare
s
tate
:
EditViewState
;
/**
* @description 使用加载功能模块
* @param {EditViewProps} props 传入的props
* 当前视图表单部件
*
* @type {IParam}
* @memberof EditView
*/
public
useLoad
(
props
:
EditViewProps
){
const
{
viewSubject
}
=
this
.
viewState
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
'form'
,
action
:
"load"
,
data
:
{}})
public
declare
form
:
IParam
;
/**
* @description 处理视图初始化
*
* @memberof EditView
*/
public
useViewInit
()
{
super
.
useViewInit
();
// 初始化表单引用
this
.
form
=
ref
(
null
);
onMounted
(()
=>
{
const
{
viewSubject
}
=
this
.
state
;
viewSubject
.
next
({
tag
:
this
.
getForm
().
name
,
action
:
"load"
,
data
:
{}
})
})
}
/**
* 获取表单部件
*
* @return {*} {*}
* @memberof IndexView
*/
public
getForm
():
any
{
if
(
this
.
form
.
value
)
{
return
this
.
form
.
value
;
}
else
{
return
null
;
}
}
/**
* @description 安装视图所有功能模块的方法
* @param {EditViewProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof EditView
*/
public
moduleInstall
(
props
:
EditViewProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
this
.
useLoad
(
props
);
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
state
:
this
.
viewState
,
form
:
this
.
form
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/exp-view/exp-view.ts
浏览文件 @
8929b58f
import
{
MainView
}
from
"@core"
;
import
{
ExpViewProps
}
from
"./exp-view-prop"
;
import
{
ExpViewState
}
from
"./exp-view-state"
;
/**
...
...
@@ -9,36 +8,24 @@ import { ExpViewState } from "./exp-view-state";
* @extends {MainView}
*/
export
class
ExpView
extends
MainView
{
/**
* @description 视图状态
* @type {ExpViewState}
* @memberof ExpView
*/
public
declare
viewState
:
ExpViewState
;
/**
* @description 使用加载功能模块
* @param {ExpViewProps} props 传入的props
* @memberof ExpView
*/
public
useLoad
(
props
:
ExpViewProps
)
{
const
{
viewSubject
}
=
this
.
viewState
;
}
public
declare
state
:
ExpViewState
;
/**
* @description 安装视图所有功能模块的方法
* @param {ExpViewProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof ExpView
*/
public
moduleInstall
(
props
:
ExpViewProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
this
.
useLoad
(
props
);
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
state
:
this
.
viewState
...
superParams
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/grid-view/grid-view.ts
浏览文件 @
8929b58f
import
{
GridView
Props
,
GridView
State
,
IActionParam
,
IParam
,
MDView
}
from
'@core'
;
import
{
GridViewState
,
IActionParam
,
IParam
,
MDView
}
from
'@core'
;
/**
* @description 表格视图
...
...
@@ -8,12 +8,13 @@ import { GridViewProps, GridViewState, IActionParam, IParam, MDView } from '@cor
*/
export
class
GridView
extends
MDView
{
/**
* @description 视图状态
* @type {EditViewState}
/**
* 视图状态数据
*
* @type {GridViewState}
* @memberof GridView
*/
public
declare
viewS
tate
:
GridViewState
;
public
declare
s
tate
:
GridViewState
;
/**
* 当前视图表格部件
...
...
@@ -26,12 +27,10 @@ export class GridView extends MDView {
/**
* @description 处理视图初始化
*
* @param {GridViewProps} props
* @param {Function} emit
* @memberof GridView
*/
public
useViewInit
(
props
:
GridViewProps
,
emit
:
Function
)
{
super
.
useViewInit
(
props
,
emit
);
public
useViewInit
()
{
super
.
useViewInit
();
// 初始化搜索表格引用
this
.
grid
=
ref
(
null
);
}
...
...
@@ -66,13 +65,11 @@ export class GridView extends MDView {
/**
* @description 安装视图所有功能模块的方法
* @param {GridViewProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof GridView
*/
public
moduleInstall
(
props
:
GridViewProps
,
emit
:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
grid
:
this
.
grid
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/index-view/index-view.ts
浏览文件 @
8929b58f
import
{
IndexViewProps
,
IndexViewState
,
ViewBase
}
from
'@core'
;
import
{
onMounted
}
from
'vue'
;
import
{
IndexViewState
,
IParam
,
ViewBase
}
from
'@core'
;
/**
* @description 首页视图
* @export
* @class IndexView
* @extends {
ViewBase
}
* @extends {
IndexView
}
*/
export
class
IndexView
extends
ViewBase
{
/**
* 视图状态
*
* @type {IndexViewState}
* @memberof IndexView
*/
public
declare
viewS
tate
:
IndexViewState
;
public
declare
s
tate
:
IndexViewState
;
/**
* 使用加载功能模块
* @param props 传入的props
* 当前视图菜单部件
*
* @type {IParam}
* @memberof IndexView
*/
public
useLoad
(
props
:
IndexViewProps
)
{
const
{
viewSubject
}
=
this
.
viewState
;
public
declare
menu
:
IParam
;
/**
* @description 处理视图初始化
*
* @memberof IndexView
*/
public
useViewInit
()
{
// 初始化菜单引用
this
.
menu
=
ref
(
null
);
const
{
viewSubject
}
=
this
.
state
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
'appmenu'
,
action
:
"load"
,
data
:
{}
})
const
{
viewParams
}
=
this
.
state
;
viewSubject
.
next
({
tag
:
this
.
getMenu
().
name
,
action
:
"load"
,
data
:
viewParams
});
})
}
/**
* 安装视图所有功能模块的方法
* @param props 传入的Props
* @param [emit] 事件
* 获取菜单部件
*
* @return {*} {*}
* @memberof IndexView
*/
public
moduleInstall
(
props
:
IndexViewProps
,
emit
:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
this
.
useLoad
(
props
);
public
getMenu
():
any
{
if
(
this
.
menu
.
value
)
{
return
this
.
menu
.
value
;
}
else
{
return
null
;
}
}
/**
* @description 安装视图所有功能模块的方法
*
* @memberof IndexView
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
state
:
this
.
viewState
,
menu
:
this
.
menu
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/main-view/main-view.ts
浏览文件 @
8929b58f
import
{
ViewBase
,
MainView
Props
,
MainView
State
,
IActionParam
,
IParam
,
AppActionService
}
from
'@core'
;
import
{
ViewBase
,
MainViewState
,
IActionParam
,
IParam
,
AppActionService
}
from
'@core'
;
/**
* 实体视图
...
...
@@ -6,10 +6,14 @@ import { ViewBase, MainViewProps, MainViewState, IActionParam, IParam, AppAction
* @class ViewBase
*/
export
class
MainView
extends
ViewBase
{
/**
* 视图状态数据
*
* @type {MainViewState}
* @memberof MainView
*/
public
declare
viewS
tate
:
MainViewState
;
public
declare
s
tate
:
MainViewState
;
/**
* 当前视图具有数据能力部件
...
...
@@ -19,28 +23,6 @@ export class MainView extends ViewBase {
*/
public
declare
xDataControl
:
IParam
;
/**
* @description 根据props调整设置视图状态变量
*
* @param {ViewPropsBase} props 传入的Props
* @param {Function} emit 事件
* @memberof MainView
*/
protected
handleState
(
props
:
MainViewProps
,
emit
:
Function
)
{
super
.
handleState
(
props
,
emit
);
}
/**
* @description 处理视图初始化
*
* @param {MainViewProps} props
* @param {Function} emit
* @memberof MainView
*/
public
useViewInit
(
props
:
MainViewProps
,
emit
:
Function
)
{
super
.
useViewInit
(
props
,
emit
);
}
/**
* @description 处理工具栏事件
*
...
...
@@ -60,8 +42,8 @@ export class MainView extends ViewBase {
}
// 准备参数
const
inputParam
=
{
context
:
this
.
viewS
tate
.
context
,
viewParams
:
this
.
viewS
tate
.
viewParams
,
context
:
this
.
s
tate
.
context
,
viewParams
:
this
.
s
tate
.
viewParams
,
data
:
this
.
xDataControl
?.
value
?.
data
,
event
:
data
.
event
,
actionEnvironment
:
this
...
...
@@ -81,12 +63,10 @@ export class MainView extends ViewBase {
/**
* @description 安装视图所有功能模块的方法
*
* @param {ViewPropsBase} props 传入的Props
* @param {Function} emit 事件
* @memberof MainView
*/
public
moduleInstall
(
props
:
MainViewProps
,
emit
:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
xDataControl
:
this
.
xDataControl
,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
浏览文件 @
8929b58f
import
{
IActionParam
,
IParam
,
MainView
,
MDView
Props
,
MDView
State
}
from
'@core'
;
import
{
IActionParam
,
IParam
,
MainView
,
MDViewState
}
from
'@core'
;
/**
* 多数据视图
...
...
@@ -8,10 +8,14 @@ import { IActionParam, IParam, MainView, MDViewProps, MDViewState } from '@core'
* @extends {MainView}
*/
export
class
MDView
extends
MainView
{
/**
* 视图状态数据
*
* @type {MDViewState}
* @memberof MDView
*/
public
declare
viewS
tate
:
MDViewState
;
public
declare
s
tate
:
MDViewState
;
/**
* 当前视图搜索表单部件
...
...
@@ -32,12 +36,10 @@ export class MDView extends MainView {
/**
* @description 处理视图初始化
*
* @param {MainViewProps} props
* @param {Function} emit
* @memberof MDView
*/
public
useViewInit
(
props
:
MDViewProps
,
emit
:
Function
)
{
super
.
useViewInit
(
props
,
emit
);
public
useViewInit
()
{
super
.
useViewInit
();
// 初始化搜索表单引用
this
.
searchForm
=
ref
(
null
);
// 初始化搜索栏引用
...
...
@@ -45,7 +47,7 @@ export class MDView extends MainView {
onMounted
(()
=>
{
// 初始化数据能力部件
this
.
xDataControl
=
this
.
getMDCtrl
();
const
{
isLoadDefault
}
=
this
.
viewS
tate
;
const
{
isLoadDefault
}
=
this
.
s
tate
;
if
(
this
.
getSearchForm
()
&&
isLoadDefault
)
{
const
tag
=
this
.
getSearchForm
().
name
;
this
.
next
({
tag
:
tag
,
action
:
'loaddraft'
,
data
:
null
});
...
...
@@ -53,7 +55,7 @@ export class MDView extends MainView {
const
tag
=
this
.
getMDCtrl
().
name
;
this
.
next
({
tag
:
tag
,
action
:
'load'
,
data
:
null
});
}
else
{
this
.
viewS
tate
.
isLoadDefault
=
true
;
this
.
s
tate
.
isLoadDefault
=
true
;
}
})
}
...
...
@@ -94,12 +96,12 @@ export class MDView extends MainView {
* @memberof MDView
*/
public
onSearchFormLoad
(
args
:
any
=
{}):
void
{
const
{
isLoadDefault
,
viewParams
}
=
this
.
viewS
tate
;
const
{
isLoadDefault
,
viewParams
}
=
this
.
s
tate
;
if
(
this
.
getMDCtrl
()
&&
isLoadDefault
)
{
const
tag
=
this
.
getMDCtrl
().
name
;
this
.
next
({
tag
:
tag
,
action
:
'load'
,
data
:
viewParams
});
}
this
.
viewS
tate
.
isLoadDefault
=
true
;
this
.
s
tate
.
isLoadDefault
=
true
;
}
/**
...
...
@@ -109,12 +111,12 @@ export class MDView extends MainView {
* @memberof MDView
*/
public
onSearchFormSearch
(
args
:
any
=
{}):
void
{
const
{
isLoadDefault
,
viewParams
}
=
this
.
viewS
tate
;
const
{
isLoadDefault
,
viewParams
}
=
this
.
s
tate
;
if
(
this
.
getMDCtrl
()
&&
isLoadDefault
)
{
const
tag
=
this
.
getMDCtrl
().
name
;
this
.
next
({
tag
:
tag
,
action
:
'load'
,
data
:
viewParams
});
}
this
.
viewS
tate
.
isLoadDefault
=
true
;
this
.
s
tate
.
isLoadDefault
=
true
;
}
/**
...
...
@@ -205,12 +207,10 @@ export class MDView extends MainView {
/**
* @description 安装视图所有功能模块的方法
*
* @param {ViewPropsBase} props 传入的Props
* @param {Function} emit 事件
* @memberof MDView
*/
public
moduleInstall
(
props
:
MDViewProps
,
emit
:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
xDataControl
:
this
.
xDataControl
,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-grid-view/pickup-grid-view.ts
浏览文件 @
8929b58f
...
...
@@ -16,7 +16,7 @@ export class PickupGridView extends PickupView {
* @type {PickupGridViewState}
* @memberof PickupGridView
*/
public
declare
viewS
tate
:
PickupGridViewState
;
public
declare
s
tate
:
PickupGridViewState
;
/**
...
...
@@ -25,7 +25,7 @@ export class PickupGridView extends PickupView {
* @memberof PickupGridView
*/
public
useLoad
(
props
:
PickupGridViewProps
)
{
const
{
viewSubject
}
=
this
.
viewS
tate
;
const
{
viewSubject
}
=
this
.
s
tate
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
'grid'
,
action
:
"load"
,
data
:
{}
})
})
...
...
@@ -57,14 +57,10 @@ export class PickupGridView extends PickupView {
* @return {*}
* @memberof PickupGridView
*/
public
moduleInstall
(
props
:
PickupGridViewProps
,
emit
?:
Function
)
{
this
.
emit
=
emit
;
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
this
.
useLoad
(
props
);
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
handleCtrlEvent
:
this
.
handleCtrlEvent
.
bind
(
this
),
state
:
this
.
viewState
,
...
superParams
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
浏览文件 @
8929b58f
...
...
@@ -16,7 +16,7 @@ export class PickupView extends MainView {
* @type {PickupViewState}
* @memberof PickupView
*/
public
declare
viewS
tate
:
PickupViewState
;
public
declare
s
tate
:
PickupViewState
;
public
selectData
:
any
[]
=
[];
...
...
@@ -27,7 +27,7 @@ export class PickupView extends MainView {
* @memberof PickupView
*/
public
useLoad
(
props
:
PickupViewProps
)
{
const
{
viewSubject
}
=
this
.
viewS
tate
;
const
{
viewSubject
}
=
this
.
s
tate
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
'grid'
,
action
:
"load"
,
data
:
{}
})
})
...
...
@@ -67,17 +67,13 @@ export class PickupView extends MainView {
/**
* @description 安装视图所有功能模块的方法
* @param {PickupViewProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof PickupView
*/
public
moduleInstall
(
props
:
PickupViewProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
this
.
useLoad
(
props
);
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
state
:
this
.
viewState
,
selectData
:
this
.
selectData
,
cancel
:
this
.
cancel
.
bind
(
this
),
confirm
:
this
.
confirm
.
bind
(
this
)
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/tree-exp-view/tree-exp-view.ts
浏览文件 @
8929b58f
...
...
@@ -15,7 +15,7 @@ export class TreeExpView extends ExpView {
* @type {TreeExpViewState}
* @memberof TreeExpView
*/
public
declare
viewS
tate
:
TreeExpViewState
;
public
declare
s
tate
:
TreeExpViewState
;
/**
* @description 使用加载功能模块
...
...
@@ -23,7 +23,7 @@ export class TreeExpView extends ExpView {
* @memberof TreeExpView
*/
public
useLoad
(
props
:
TreeExpViewProps
)
{
const
{
viewSubject
,
treeExpBarName
}
=
this
.
viewS
tate
;
const
{
viewSubject
,
treeExpBarName
}
=
this
.
s
tate
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
treeExpBarName
,
action
:
"load"
,
data
:
{}
});
})
...
...
@@ -31,13 +31,11 @@ export class TreeExpView extends ExpView {
/**
* @description 安装视图所有功能模块的方法
* @param {TreeExpViewProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof TreeExpView
*/
public
moduleInstall
(
props
:
TreeExpViewProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/view-base/view-base.ts
浏览文件 @
8929b58f
import
{
Ref
}
from
'vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
ViewPropsBase
,
ViewStateBase
,
UIBase
,
IParam
,
UIUtil
}
from
'@core'
;
import
{
ViewPropsBase
,
ViewStateBase
,
UIBase
,
IParam
,
UIUtil
,
deepCopy
}
from
'@core'
;
/**
* @description 视图基类
...
...
@@ -10,11 +10,28 @@ import { ViewPropsBase, ViewStateBase, UIBase, IParam, UIUtil } from '@core';
export
class
ViewBase
{
/**
* @description 视图状态
* 响应状态
*
* @type {ViewStateBase}
* @memberof ViewBase
*/
public
viewState
:
ViewStateBase
;
public
declare
state
:
ViewStateBase
;
/**
* 输入参数
*
* @type {IParam}
* @memberof ViewBase
*/
public
declare
props
:
IParam
;
/**
* 输出事件
*
* @type {Function}
* @memberof ViewBase
*/
public
declare
emit
:
Function
;
/**
* 界面行为服务
...
...
@@ -35,21 +52,22 @@ export class ViewBase {
/**
* Creates an instance of ViewBase.
* @param {*} options 配置参数
* @param {IParam} props 输入参数
* @param {IParam} emit 输出参数
* @memberof ViewBase
*/
constructor
(
options
:
any
)
{
this
.
viewState
=
reactive
(
options
);
constructor
(
options
:
any
,
props
:
IParam
,
emit
:
Function
)
{
this
.
state
=
reactive
(
deepCopy
(
options
)
as
any
);
this
.
props
=
props
;
this
.
emit
=
emit
;
}
/**
* @description 根据props调整视图状态变量
* @param {ViewPropsBase} props 传入的Props
* @param {Function} emit 事件
* @description 处理响应式状态(state中的对象属性)
* @memberof ViewBase
*/
protected
handleState
(
props
:
ViewPropsBase
,
emit
:
Function
)
{
// 只读属性处理:把props的属性的Ref赋给state,以维持响应性
this
.
viewState
.
viewSubject
=
toRef
(
props
,
'viewSubject'
)
as
any
;
protected
handleReactiveState
()
{
this
.
state
.
viewSubject
=
toRef
(
this
.
props
,
'viewSubject'
)
as
any
;
}
/**
...
...
@@ -59,7 +77,7 @@ export class ViewBase {
* @memberof ViewEngine
*/
public
next
({
tag
,
action
,
data
}:
{
tag
:
string
,
action
:
string
,
data
:
any
}):
void
{
const
{
viewSubject
}
=
this
.
viewState
;
const
{
viewSubject
}
=
this
.
props
;
viewSubject
.
next
({
tag
:
tag
,
action
:
action
,
data
:
data
})
}
...
...
@@ -73,7 +91,7 @@ export class ViewBase {
private
handleViewContextParams
(
props
:
ViewPropsBase
,
context
:
Ref
<
IParam
|
undefined
>
,
viewParams
:
Ref
<
IParam
|
undefined
>
)
{
if
(
!
context
.
value
)
context
.
value
=
{};
if
(
!
viewParams
.
value
)
viewParams
.
value
=
{};
const
{
appViewNavContexts
,
appViewNavParams
}
=
this
.
viewS
tate
;
const
{
appViewNavContexts
,
appViewNavParams
}
=
this
.
s
tate
;
if
(
Object
.
is
(
props
.
openType
,
'ROUTE'
))
{
// 应用上下文
const
appContext
=
App
.
getAppData
();
...
...
@@ -123,29 +141,26 @@ export class ViewBase {
* @param {Function} emit 事件
* @memberof ViewBase
*/
public
useViewContextParams
(
props
:
ViewPropsBase
,
emit
:
Function
)
{
const
context
=
UIBase
.
toOneWayRef
(
props
,
'context'
);
const
viewParams
=
UIBase
.
toOneWayRef
(
props
,
'viewParams'
);
public
useViewContextParams
()
{
const
context
=
UIBase
.
toOneWayRef
(
this
.
props
,
'context'
);
const
viewParams
=
UIBase
.
toOneWayRef
(
this
.
props
,
'viewParams'
);
// 导航视图参数处理
this
.
handleViewContextParams
(
props
,
context
,
viewParams
);
this
.
handleViewContextParams
(
this
.
props
,
context
,
viewParams
);
watch
(
context
,
(
newVal
:
any
,
oldVal
:
any
)
=>
{
this
.
handleViewContextParams
(
props
,
newVal
,
viewParams
);
this
.
handleViewContextParams
(
this
.
props
,
newVal
,
viewParams
);
});
// 把Ref赋值到State上进行解包
this
.
viewState
.
context
=
context
;
this
.
viewState
.
viewParams
=
viewParams
;
return
{
context
,
viewParams
};
this
.
state
.
context
=
context
;
this
.
state
.
viewParams
=
viewParams
;
}
/**
*@description 使用UI服务
*
* @param {ViewPropsBase} props
* @param {Function} emit
* @memberof ViewBase
*/
public
useUIService
(
props
:
ViewPropsBase
,
emit
:
Function
)
{
const
{
appEntityName
,
context
}
=
this
.
viewS
tate
;
public
useUIService
()
{
const
{
appEntityName
,
context
}
=
this
.
s
tate
;
if
(
appEntityName
)
{
App
.
getUIService
(
appEntityName
.
toLowerCase
(),
context
).
then
((
service
:
IParam
)
=>
{
this
.
appUIService
=
service
;
...
...
@@ -156,12 +171,10 @@ export class ViewBase {
/**
*@description 使用数据服务
*
* @param {ViewPropsBase} props
* @param {Function} emit
* @memberof ViewBase
*/
public
useDataService
(
props
:
ViewPropsBase
,
emit
:
Function
)
{
const
{
appEntityName
,
context
}
=
this
.
viewS
tate
;
public
useDataService
()
{
const
{
appEntityName
,
context
}
=
this
.
s
tate
;
if
(
appEntityName
)
{
App
.
getDataService
(
appEntityName
.
toLowerCase
(),
context
).
then
((
service
:
IParam
)
=>
{
this
.
appDataService
=
service
;
...
...
@@ -172,43 +185,37 @@ export class ViewBase {
/**
* @description 使用计数器服务
*
* @param {ViewPropsBase} props 传入的Props
* @param {Function} emit 事件
* @memberof ViewBase
*/
public
useCounterService
(
props
:
ViewPropsBase
,
emit
:
Function
)
{
}
public
useCounterService
()
{
}
/**
* @description 处理视图初始化
*
* @param {ViewPropsBase} props
* @param {Function} emit
* @memberof ViewBase
*/
public
useViewInit
(
props
:
ViewPropsBase
,
emit
:
Function
)
{
}
public
useViewInit
()
{
}
/**
* @description 安装视图所有功能模块的方法
*
* @param {ViewPropsBase} props 传入的Props
* @param {Function} emit 事件
* @memberof ViewBase
*/
public
moduleInstall
(
props
:
ViewPropsBase
,
emit
:
Function
)
{
public
moduleInstall
()
{
// 处理视图状态
this
.
handle
State
(
props
,
emit
);
this
.
handle
ReactiveState
(
);
// 处理视图导航参数
this
.
useViewContextParams
(
props
,
emit
);
this
.
useViewContextParams
();
// 使用计数器服务
this
.
useCounterService
(
props
,
emit
);
this
.
useCounterService
();
// 使用数据服务
this
.
useDataService
(
props
,
emit
);
this
.
useDataService
();
// 使用UI服务
this
.
useUIService
(
props
,
emit
);
this
.
useUIService
();
// 处理视图初始化
this
.
useViewInit
(
props
,
emit
);
this
.
useViewInit
();
return
{
state
:
this
.
viewS
tate
state
:
this
.
s
tate
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tree-control/tree-control.ts
浏览文件 @
8929b58f
...
...
@@ -30,7 +30,7 @@ export class TreeControl extends MainControl {
/**
* @description 树节点选中
* @param {string} nodeId
* @param
\{{ nativeEvent: MouseEvent, node: any, selected: boolean }
} e
* @param
{ nativeEvent: MouseEvent, node: any, selected: boolean
} e
* @memberof TreeControl
*/
public
treeNodeSelect
(
nodeId
:
string
,
e
:
{
nativeEvent
:
MouseEvent
,
node
:
any
,
selected
:
boolean
})
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -31,7 +31,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
}
=
new
IndexView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
menu
}
=
new
IndexView
(
ViewConfig
,
props
,
emit
).
moduleInstall
(
);
const
collapsed
:
Ref
<
boolean
>
=
ref
(
false
);
const
collapsedChange
=
()
=>
{
collapsed
.
value
=
!
collapsed
.
value
;
...
...
@@ -56,6 +56,7 @@ const collapsedChange = () => {
</template>
<template
#
menu
>
<
{{#
page
.
ctrls
}}{{#
eq
controlType
"APPMENU"
}}{{
codeName
}}
Menu
{{/
eq
}}{{/
page
.
ctrls
}}
ref=
"menu"
:context=
"state.context"
:collapsed=
"collapsed"
:menuAlign=
"state.menuAlign"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -29,7 +29,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
handleToolbarEvent
}
=
new
EditView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
form
,
handleToolbarEvent
}
=
new
EditView
(
ViewConfig
,
props
,
emit
).
moduleInstall
(
);
</script>
...
...
@@ -56,6 +56,7 @@ const { state, handleToolbarEvent } = new EditView(ViewConfig).moduleInstall(pro
{{/
eq
}}
{{#
eq
controlType
"FORM"
}}
<
{{
codeName
}}
Form
ref=
"form"
:showBusyIndicator=
"true"
:context=
"state.context"
:viewParams=
"state.viewParams"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -32,7 +32,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
grid
,
handleCtrlEvent
,
handleToolbarEvent
}
=
new
GridView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
grid
,
handleCtrlEvent
,
handleToolbarEvent
}
=
new
GridView
(
ViewConfig
,
props
,
emit
).
moduleInstall
(
);
</script>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -32,7 +32,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
confirm
,
handleCtrlEvent
}
=
new
PickupGridView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
confirm
,
handleCtrlEvent
}
=
new
PickupGridView
(
ViewConfig
,
props
,
emit
).
moduleInstall
(
);
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -28,7 +28,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
cancel
,
confirm
,
handleCtrlEvent
}
=
new
PickupView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
cancel
,
confirm
,
handleCtrlEvent
}
=
new
PickupView
(
ViewConfig
,
props
,
emit
).
moduleInstall
(
);
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DETREEEXPVIEW}}/{{pages@DETREEEXPVIEW}}.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -25,7 +25,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块
const
{
state
,
handleCtrlEvent
,
handleToolbarEvent
}
=
new
TreeExpView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
handleCtrlEvent
,
handleToolbarEvent
}
=
new
TreeExpView
(
ViewConfig
,
props
,
emit
).
moduleInstall
(
);
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -2,7 +2,7 @@
import
{
Subject
}
from
"rxjs"
;
import
{
CtrlConfig
}
from
"./
{{
spinalCase
ctrl
.
codeName
}}
-menu-config"
;
import
{
IParam
,
IActionParam
,
MenuControl
,
IContext
}
from
"@core"
;
interface
Props
{
interface
Props
{
context
:
IContext
;
defaultView
:
string
;
collapsed
:
boolean
;
...
...
@@ -10,7 +10,7 @@ interface Props{
viewParams
?:
IParam
;
viewSubject
:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
menuAlign
:
"LEFT"
,
collapsed
:
false
,
});
...
...
@@ -18,19 +18,18 @@ const props = withDefaults(defineProps<Props>(), {
interface
CtrlEmit
{
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
{
state
,
menuSelect
}
=
new
MenuControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
</script>
<template>
<a-menu
class=
"ibiz-menu"
v-model:openKeys=
"state.defaultOpens"
v-model:selectedKeys=
"state.defaultSelect"
:mode=
"Object.is('LEFT', state.menuAlign) ? 'inline' : 'horizontal'"
@
select=
"menuSelect"
>
<IbizMenuItem
:items=
"state.menus"
:collapsed=
"collapsed"
/>
<a-menu
class=
"ibiz-menu"
v-model:openKeys=
"state.defaultOpens"
v-model:selectedKeys=
"state.defaultSelect"
:mode=
"Object.is('LEFT', state.menuAlign) ? 'inline' : 'horizontal'"
@
select=
"menuSelect"
>
<IbizMenuItem
:items=
"state.menus"
:collapsed=
"collapsed"
/>
</a-menu>
</template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -12,8 +12,8 @@ interface Props {
viewSubject
:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
showBusyIndicator
:
true
,
})
...
...
@@ -22,19 +22,18 @@ interface CtrlEmit {
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
handleEditorEvent
,
handleComponentEvent
}
=
new
FormControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
</script>
<template>
<a-form
name=
"
{{
ctrl
.
codeName
}}
"
<a-form
name=
"
{{
ctrl
.
codeName
}}
"
class=
"ibiz-form
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}{{#if
ctrl
.
infoFormMode
}}
ibiz-info-form
{{/if}}
"
style=
"
{{#if
ctrl
.
formWidth
}}
width:
{{
ctrl
.
formWidth
}}
px;
{{/if}}
"
:model=
"state.data"
:rules=
"state.rules"
>
style=
"
{{#if
ctrl
.
formWidth
}}
width:
{{
ctrl
.
formWidth
}}
px;
{{/if}}
"
:model=
"state.data"
:rules=
"state.rules"
>
{{#if
ctrl
.
noTabHeader
}}
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{#
each
ctrlPage
.
psDEFormDetails
as
|
formDetail
|
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
浏览文件 @
8929b58f
{{>
@macro
/
front-end
/
widgets
/
grid-detail
/
include-grid
.
hbs
}}
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
CtrlConfig
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-grid-config'
;
import
{
GridControl
,
IActionParam
,
IParam
,
IContext
,
ControlAction
,
deepCopy
}
from
'@core'
;
import
{
Subject
}
from
'rxjs'
;
import
{
CtrlConfig
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-grid-config'
;
import
{
GridControl
,
IActionParam
,
IParam
,
IContext
,
ControlAction
,
deepCopy
}
from
'@core'
;
interface
Props
{
interface
Props
{
context
:
IContext
;
multiple
:
boolean
;
rowEditState
:
boolean
;
...
...
@@ -15,27 +15,29 @@
controlAction
:
ControlAction
;
showBusyIndicator
?:
boolean
;
viewSubject
:
Subject
<
IActionParam
>
;
}
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
showBusyIndicator
:
true
,
multiple
:
false
,
rowEditState
:
false
,
rowActiveMode
:
0
,
selectFirstDefault
:
false
,
})
})
// emit声明
interface
CtrlEmit
{
// emit声明
interface
CtrlEmit
{
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力
const
{
state
,
load
,
handleEditorEvent
,
handleToolbarEvent
,
custom
}
=
new
GridControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
const
{
scrollOption
,
rowKey
,
rowClassName
,
customRow
,
rowSelectionOption
,
resizeColumn
,
handleGridChange
}
=
custom
;
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
,
load
});
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力
const
{
state
,
load
,
handleEditorEvent
,
handleToolbarEvent
,
custom
}
=
new
GridControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
const
{
scrollOption
,
rowKey
,
rowClassName
,
customRow
,
rowSelectionOption
,
resizeColumn
,
handleGridChange
}
=
custom
;
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
,
load
});
</script>
<template>
<a-table
bordered
sticky
class=
"ibiz-grid
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
:rowKey=
"rowKey"
...
...
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
浏览文件 @
8929b58f
...
...
@@ -31,17 +31,15 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
handleViewEvent
}
=
new
PickupViewPanelControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
handleViewEvent
}
=
new
PickupViewPanelControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
</script>
<template>
<div
class=
"ibiz-pickupviewpanel"
>
<ChartDataPickUpGridView
:isSingleSelect=
"state.isSingleSelect"
:isShowButton=
"state.isShowButton"
:selectedData=
"state.selectedData"
@
viewEvent=
"handleViewEvent"
></ChartDataPickUpGridView>
<ChartDataPickUpGridView
:isSingleSelect=
"state.isSingleSelect"
:isShowButton=
"state.isShowButton"
:selectedData=
"state.selectedData"
@
viewEvent=
"handleViewEvent"
></ChartDataPickUpGridView>
</div>
</template>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -33,19 +33,14 @@ const emit = defineEmits < CtrlEmit > ();
// 安装功能模块,提供状态和能力方法
const
{
state
,
inited
,
viewdata
,
viewparam
}
=
new
PickupViewPanelControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
</script>
<template>
<div
class=
"ibiz-pickupviewpanel"
>
<component
v-if=
"inited && state.embeddedView && state.embeddedView.viewName"
:if=
"state.embeddedView.viewName"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:isSingleSelect=
"state.isSingleSelect"
:isShowButton=
"state.isShowButton"
:selectedData=
"state.selectedData"
></component>
<component
v-if=
"inited && state.embeddedView && state.embeddedView.viewName"
:if=
"state.embeddedView.viewName"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:isSingleSelect=
"state.isSingleSelect"
:isShowButton=
"state.isShowButton"
:selectedData=
"state.selectedData"
></component>
</div>
</template>
\ No newline at end of file
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
浏览文件 @
8929b58f
...
...
@@ -36,6 +36,9 @@ const emit = defineEmits < CtrlEmit > ();
// 安装功能模块,提供状态和能力方法
const
{
state
,
handleCtrlEvent
}
=
new
TreeExpBarControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
</script>
<template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree.vue.hbs
浏览文件 @
8929b58f
...
...
@@ -27,8 +27,12 @@ interface CtrlEmit {
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
load
,
treeNodeSelect
}
=
new
TreeControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
</script>
// TODO 树节点待支持图标和自定义绘制
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录