Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
62af6348
提交
62af6348
编写于
3月 28, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add:新增表格导航视图、表格导航栏部件支持
上级
b60332f1
变更
20
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
390 行增加
和
14 行删除
+390
-14
app-grid-exp-view-layout.vue
...apps}}/src/components/layout/app-grid-exp-view-layout.vue
+30
-0
grid-exp-view-prop.ts
...rc/core/modules/views/grid-exp-view/grid-exp-view-prop.ts
+10
-0
grid-exp-view-state.ts
...c/core/modules/views/grid-exp-view/grid-exp-view-state.ts
+10
-0
grid-exp-view.ts
...s}}/src/core/modules/views/grid-exp-view/grid-exp-view.ts
+28
-0
index.ts
...pp_{{apps}}/src/core/modules/views/grid-exp-view/index.ts
+3
-0
index.ts
...ces/templ/r7/app_{{apps}}/src/core/modules/views/index.ts
+2
-1
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+19
-11
grid-exp-bar-control-prop.ts
...widgets/grid-exp-bar-control/grid-exp-bar-control-prop.ts
+10
-0
grid-exp-bar-control-state.ts
...idgets/grid-exp-bar-control/grid-exp-bar-control-state.ts
+10
-0
grid-exp-bar-control.ts
...ules/widgets/grid-exp-bar-control/grid-exp-bar-control.ts
+28
-0
index.ts
...}}/src/core/modules/widgets/grid-exp-bar-control/index.ts
+3
-0
index.ts
...s/templ/r7/app_{{apps}}/src/core/modules/widgets/index.ts
+2
-1
index.ts.hbs
...n/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
+1
-0
index.ts.hbs
...views/{{appModules}}/{{pages@DEGRIDEXPVIEW}}/index.ts.hbs
+3
-0
{{pages@DEGRIDEXPVIEW}}-state.ts.hbs
...ages@DEGRIDEXPVIEW}}/{{pages@DEGRIDEXPVIEW}}-state.ts.hbs
+8
-0
{{pages@DEGRIDEXPVIEW}}.vue.hbs
...}/{{pages@DEGRIDEXPVIEW}}/{{pages@DEGRIDEXPVIEW}}.vue.hbs
+60
-0
index.ts.hbs
...Entities}}/{{ctrls@GRIDEXPBAR}}-grid-exp-bar/index.ts.hbs
+3
-0
{{ctrls@GRIDEXPBAR}}-grid-exp-bar-state.ts.hbs
...id-exp-bar/{{ctrls@GRIDEXPBAR}}-grid-exp-bar-state.ts.hbs
+49
-0
{{ctrls@GRIDEXPBAR}}-grid-exp-bar.vue.hbs
...}}-grid-exp-bar/{{ctrls@GRIDEXPBAR}}-grid-exp-bar.vue.hbs
+110
-0
{{ctrls@GRID}}-grid.vue.hbs
...ntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/app-grid-exp-view-layout.vue
0 → 100644
浏览文件 @
62af6348
<
script
setup
lang=
"ts"
>
</
script
>
<
template
>
<AppViewBaseLayout>
<template
v-slot:header-left
>
<slot
name=
"caption"
/>
</
template
>
<
template
v-slot:header-right
>
<slot
name=
"toolbar"
/>
</
template
>
<
template
v-slot:header-bottom
>
<slot
name=
"topMessage"
/>
<slot
name=
"searchForm"
/>
</
template
>
<
template
v-slot:body-top
>
<slot
name=
"bodyMessage"
/>
</
template
>
<slot
/>
<
template
v-slot:footer-content
>
<slot
name=
"bottomMessage"
/>
</
template
>
</AppViewBaseLayout>
</template>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/grid-exp-view/grid-exp-view-prop.ts
0 → 100644
浏览文件 @
62af6348
import
{
ExpViewProps
}
from
"../exp-view"
;
/**
* 表格导航视图输入参数
*
* @export
* @interface GridExpViewProps
* @extends {ExpViewProps}
*/
export
interface
GridExpViewProps
extends
ExpViewProps
{}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/grid-exp-view/grid-exp-view-state.ts
0 → 100644
浏览文件 @
62af6348
import
{
ExpViewState
}
from
"../exp-view"
;
/**
* 表格导航视图状态
*
* @export
* @interface GridExpViewState
* @extends {ExpViewState}
*/
export
interface
GridExpViewState
extends
ExpViewState
{}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/grid-exp-view/grid-exp-view.ts
0 → 100644
浏览文件 @
62af6348
import
{
ExpView
}
from
"../exp-view"
;
import
{
GridExpViewProps
}
from
"./grid-exp-view-prop"
;
import
{
GridExpViewState
}
from
"./grid-exp-view-state"
;
/**
* 表格导航视图
*
* @export
* @class GridExpView
* @extends {ExpView}
*/
export
class
GridExpView
extends
ExpView
{
/**
* 表格导航视图状态
*
* @type {GridExpViewState}
* @memberof GridExpView
*/
public
declare
state
:
GridExpViewState
;
/**
* 表格导航视图输入参数
*
* @type {GridExpViewProps}
* @memberof GridExpView
*/
public
declare
props
:
GridExpViewProps
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/grid-exp-view/index.ts
0 → 100644
浏览文件 @
62af6348
export
*
from
'./grid-exp-view-prop'
;
export
*
from
'./grid-exp-view-state'
;
export
{
GridExpView
}
from
'./grid-exp-view'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/index.ts
浏览文件 @
62af6348
...
@@ -15,4 +15,5 @@ export * from './tab-exp-view'
...
@@ -15,4 +15,5 @@ export * from './tab-exp-view'
export
*
from
'./list-view'
export
*
from
'./list-view'
export
*
from
'./panel-view'
export
*
from
'./panel-view'
export
*
from
'./pickup-tree-view'
export
*
from
'./pickup-tree-view'
export
*
from
'./list-exp-view'
export
*
from
'./list-exp-view'
\ No newline at end of file
export
*
from
'./grid-exp-view'
\ 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.ts
浏览文件 @
62af6348
...
@@ -45,7 +45,15 @@ export class GridControl extends MDControl {
...
@@ -45,7 +45,15 @@ export class GridControl extends MDControl {
}
}
// 表格行样式
// 表格行样式
const
useRowClassName
=
(
record
:
IParam
,
index
:
number
)
=>
{
const
useRowClassName
=
(
record
:
IParam
,
index
:
number
)
=>
{
return
index
%
2
===
1
?
"table-striped"
:
null
;
let
classStr
:
string
=
''
;
if
(
index
%
2
===
1
)
{
classStr
+=
' table-striped'
;
}
const
{
selectedRowKeys
}
=
toRefs
(
this
.
state
);
if
(
selectedRowKeys
.
value
.
indexOf
(
record
.
srfkey
)
!==
-
1
)
{
classStr
+=
' ant-table-row-selected'
;
}
return
classStr
;
}
}
// 表格行自定义
// 表格行自定义
const
useCustomRow
=
(
record
:
IParam
,
index
:
number
)
=>
{
const
useCustomRow
=
(
record
:
IParam
,
index
:
number
)
=>
{
...
@@ -78,16 +86,15 @@ export class GridControl extends MDControl {
...
@@ -78,16 +86,15 @@ export class GridControl extends MDControl {
// 表格选择功能配置
// 表格选择功能配置
const
useRowSelectionOption
=
computed
(()
=>
{
const
useRowSelectionOption
=
computed
(()
=>
{
// 作为导航部件或单选时不呈现多选框
// 作为导航部件或单选时不呈现多选框
if
(
selectFirstDefault
)
{
if
(
selectFirstDefault
||
!
this
.
state
.
isMultiple
)
{
return
false
;
return
false
;
}
}
return
{
return
{
type
:
this
.
state
.
isMultiple
?
'checkbox'
:
'radio
'
,
type
:
'checkbox
'
,
columnWidth
:
selectColumnWidth
,
columnWidth
:
selectColumnWidth
,
selectedRowKeys
:
this
.
state
.
selectedRowKeys
,
selectedRowKeys
:
this
.
state
.
selectedRowKeys
,
checkStrictly
:
false
,
checkStrictly
:
false
,
onSelect
:
(
record
:
IParam
,
selected
:
boolean
,
selectedRows
:
IParam
[],
$event
:
any
)
=>
{
onSelect
:
(
record
:
IParam
,
selected
:
boolean
,
selectedRows
:
IParam
[],
$event
:
any
)
=>
{
const
{
selections
}
=
toRefs
(
this
.
state
);
if
(
selected
)
{
if
(
selected
)
{
const
{
appDeKeyFieldName
}
=
this
.
state
;
const
{
appDeKeyFieldName
}
=
this
.
state
;
const
selectedRowKey
:
string
=
record
[
appDeKeyFieldName
]
||
record
.
srfkey
;
const
selectedRowKey
:
string
=
record
[
appDeKeyFieldName
]
||
record
.
srfkey
;
...
@@ -95,21 +102,19 @@ export class GridControl extends MDControl {
...
@@ -95,21 +102,19 @@ export class GridControl extends MDControl {
if
(
Object
.
is
(
index
,
-
1
)
&&
record
.
children
&&
record
.
children
.
length
>
0
)
{
if
(
Object
.
is
(
index
,
-
1
)
&&
record
.
children
&&
record
.
children
.
length
>
0
)
{
useExpandedRowKeys
.
value
.
push
(
selectedRowKey
);
useExpandedRowKeys
.
value
.
push
(
selectedRowKey
);
}
}
selections
.
value
.
push
(
selectedRows
);
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
selection
})
}
}
},
},
onChange
:
(
_selectedRowKeys
:
string
[],
selectedRows
:
any
[])
=>
{
onChange
:
(
_selectedRowKeys
:
string
[],
selectedRows
:
any
[])
=>
{
this
.
state
.
selectedRowKeys
=
_selectedRowKeys
;
const
{
selectedRowKeys
,
selections
}
=
toRefs
(
this
.
state
);
selectedRowKeys
.
value
=
[...
_selectedRowKeys
];
const
selection
:
IParam
[]
=
[];
const
selection
:
IParam
[]
=
[];
selectedRows
.
forEach
((
select
:
IParam
)
=>
{
selectedRows
.
forEach
((
select
:
IParam
)
=>
{
if
(
!
select
.
children
)
{
if
(
!
select
.
children
)
{
selection
.
push
(
select
);
selection
.
push
(
select
);
}
}
})
})
;
// 选中赋值
// 选中赋值
this
.
state
.
selections
=
selection
;
selections
.
value
=
[...
selection
]
;
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
selection
})
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
selection
})
},
},
};
};
...
@@ -335,10 +340,13 @@ export class GridControl extends MDControl {
...
@@ -335,10 +340,13 @@ export class GridControl extends MDControl {
public
handleDefaultSelect
()
{
public
handleDefaultSelect
()
{
const
{
selectFirstDefault
,
items
}
=
this
.
state
;
const
{
selectFirstDefault
,
items
}
=
this
.
state
;
if
(
selectFirstDefault
&&
items
&&
items
.
length
)
{
if
(
selectFirstDefault
&&
items
&&
items
.
length
)
{
const
{
selectedRowKeys
,
selections
}
=
toRefs
(
this
.
state
);
selections
.
value
=
[
items
[
0
]];
selectedRowKeys
.
value
=
[
items
[
0
].
srfkey
];
this
.
emit
(
"ctrlEvent"
,
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
action
:
"selectionChange"
,
data
:
[
deepCopy
(
items
[
0
])
],
data
:
[
items
[
0
]
],
});
});
}
}
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-exp-bar-control/grid-exp-bar-control-prop.ts
0 → 100644
浏览文件 @
62af6348
import
{
ExpBarControlProps
}
from
"../exp-bar-control"
;
/**
* 表格导航栏输入参数
*
* @export
* @interface GridExpBarControlProps
* @extends {ExpBarControlProps}
*/
export
interface
GridExpBarControlProps
extends
ExpBarControlProps
{}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-exp-bar-control/grid-exp-bar-control-state.ts
0 → 100644
浏览文件 @
62af6348
import
{
ExpBarControlState
}
from
"../exp-bar-control"
;
/**
* 表格导航栏部件状态
*
* @export
* @interface GridExpBarControlState
* @extends {ExpBarControlState}
*/
export
interface
GridExpBarControlState
extends
ExpBarControlState
{}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-exp-bar-control/grid-exp-bar-control.ts
0 → 100644
浏览文件 @
62af6348
import
{
ExpBarControl
}
from
"../exp-bar-control"
;
import
{
GridExpBarControlProps
}
from
"./grid-exp-bar-control-prop"
;
import
{
GridExpBarControlState
}
from
"./grid-exp-bar-control-state"
;
/**
* 表格导航栏部件
*
* @export
* @class GridExpBarControl
* @extends {ExpBarControl}
*/
export
class
GridExpBarControl
extends
ExpBarControl
{
/**
* 表格导航栏状态
*
* @type {GridExpBarControlState}
* @memberof GridExpBarControl
*/
public
declare
state
:
GridExpBarControlState
;
/**
* 表格导航栏输入参数
*
* @type {GridExpBarControlProps}
* @memberof GridExpBarControl
*/
public
declare
props
:
GridExpBarControlProps
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-exp-bar-control/index.ts
0 → 100644
浏览文件 @
62af6348
export
*
from
'./grid-exp-bar-control-prop'
;
export
*
from
'./grid-exp-bar-control-state'
;
export
{
GridExpBarControl
}
from
'./grid-exp-bar-control'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/index.ts
浏览文件 @
62af6348
...
@@ -17,4 +17,5 @@ export * from './tab-exp-panel-control'
...
@@ -17,4 +17,5 @@ export * from './tab-exp-panel-control'
export
*
from
'./tab-view-panel-control'
export
*
from
'./tab-view-panel-control'
export
*
from
'./list-control'
export
*
from
'./list-control'
export
*
from
'./panel-control'
export
*
from
'./panel-control'
export
*
from
'./list-exp-bar-control'
export
*
from
'./list-exp-bar-control'
\ No newline at end of file
export
*
from
'./grid-exp-bar-control'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
浏览文件 @
62af6348
...
@@ -21,6 +21,7 @@ const routes = [
...
@@ -21,6 +21,7 @@ const routes = [
{{#if
(
or
{{#if
(
or
(
eq
appView
.
viewType
'DEEDITVIEW'
)
(
eq
appView
.
viewType
'DEEDITVIEW'
)
(
eq
appView
.
viewType
'DEGRIDVIEW'
)
(
eq
appView
.
viewType
'DEGRIDVIEW'
)
(
eq
appView
.
viewType
'DEGRIDEXPVIEW'
)
(
eq
appView
.
viewType
'DELISTVIEW'
)
(
eq
appView
.
viewType
'DELISTVIEW'
)
(
eq
appView
.
viewType
'DELISTEXPVIEW'
)
(
eq
appView
.
viewType
'DELISTEXPVIEW'
)
(
eq
appView
.
viewType
'DEPANELVIEW'
)
(
eq
appView
.
viewType
'DEPANELVIEW'
)
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEGRIDEXPVIEW}}/index.ts.hbs
0 → 100644
浏览文件 @
62af6348
import
{{
page
.
codeName
}}
from "./
{{
spinalCase
page
.
codeName
}}
.vue";
export default
{{
page
.
codeName
}}
;
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEGRIDEXPVIEW}}/{{pages@DEGRIDEXPVIEW}}-state.ts.hbs
0 → 100644
浏览文件 @
62af6348
export const viewState = {
{{#
each
page
.
ctrls
as
|
ctrl
|
}}
{{#if
(
eq
ctrl
.
controlType
"GRIDEXPBAR"
)
}}
gridExpBarName: '
{{
ctrl
.
name
}}
',
{{/if}}
{{/
each
}}
{{>
@macro
/
front-end
/
views
/
view-base-config
.
hbs
}}
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEGRIDEXPVIEW}}/{{pages@DEGRIDEXPVIEW}}.vue.hbs
0 → 100644
浏览文件 @
62af6348
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
GridExpView
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
import
{
viewState
}
from
'./
{{
spinalCase
page
.
codeName
}}
-state'
;
{{#
page
.
ctrls
}}
{{#
eq
controlType
"GRIDEXPBAR"
}}
import
{
{{
codeName
}}
GridExpBar
}
from
'@widgets/
{{
spinalCase
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-grid-exp-bar'
;
{{/
eq
}}
{{/
page
.
ctrls
}}
interface
Props
{
context
?:
IContext
;
viewParams
?:
IParam
;
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
viewSubject
?:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
openType
:
'ROUTE'
,
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
interface
ViewEmit
{
(
name
:
"viewEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块
const
gridExpView
=
new
GridExpView
(
viewState
,
props
,
emit
).
moduleInstall
()
const
{
state
,
onCtrlEvent
,
onToolbarEvent
}
=
gridExpView
;
</script>
<template>
<AppGridExpViewLayout
:class=
"['app-grid-exp-view', state.viewSysCss]"
>
<template
v-slot:caption
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
{{#
page
.
ctrls
}}
{{#
eq
controlType
"TOOLBAR"
}}
<template
v-slot:toolbar
>
<AppToolbar
mode=
"button"
name=
"
{{
lowerCase
codeName
}}
"
:actionModel=
"state.toolbar"
@
onToolbarEvent=
"onToolbarEvent"
/>
</template>
{{/
eq
}}
{{#
eq
controlType
"GRIDEXPBAR"
}}
<
{{
codeName
}}
GridExpBar
name=
"
{{
name
}}
"
:context=
"state.context"
:showBusyIndicator=
"true"
:viewParams=
"state.viewParams"
:viewSubject=
"state.viewSubject"
:parent=
"gridExpView"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
GridExpBar>
{{/
eq
}}
{{/
page
.
ctrls
}}
</AppGridExpViewLayout>
</template>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRIDEXPBAR}}-grid-exp-bar/index.ts.hbs
0 → 100644
浏览文件 @
62af6348
import
{{
ctrl
.
codeName
}}
GridExpBar from "./
{{
spinalCase
ctrl
.
codeName
}}
-grid-exp-bar.vue";
export {
{{
ctrl
.
codeName
}}
GridExpBar };
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRIDEXPBAR}}-grid-exp-bar/{{ctrls@GRIDEXPBAR}}-grid-exp-bar-state.ts.hbs
0 → 100644
浏览文件 @
62af6348
export const ctrlState = {
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
counter: 0,
enableSearch:
{{
ctrl
.
enableSearch
}}
,
xDataControlName: '
{{
ctrl
.
xDataControlName
}}
',
selection: {},
searchValue: '',
showTitleBar:
{{#if
ctrl
.
showTitleBar
}}
true
{{else}}
false
{{/if}}
,
split: 0.2,
title: '
{{
ctrl
.
title
}}
',
titleRes: '
{{#if
ctrl
.
titlePSLanguageRes
}}{{
ctrl
.
titlePSLanguageRes
.
lanResTag
}}{{/if}}
',
{{#
each
ctrl
.
psControls
as
|
childCtrl
|
}}
{{#
eq
childCtrl
.
controlType
'TOOLBAR'
}}
toolbar: [
{{#
childCtrl
.
psDEToolbarItems
}}
{ name:'
{{
name
}}
',caption:'
{{
caption
}}
',groupExtractMode:'
{{
groupExtractMode
}}
',itemType:'
{{
itemType
}}
',noPrivDisplayMode:'
{{
noPrivDisplayMode
}}
',showIcon:
{{
showIcon
}}
,showCaption:
{{
showCaption
}}
,tooltip:'
{{
tooltip
}}
',disabled: false, visible: true, imgPath: '
{{
imgPath
}}
',iconClass: '
{{
iconClass
}}
',xDataControlName:'
{{
xDataControlName
}}
',
{{#if
psUIAction
}}
uIAction:{codeName:'
{{
psUIAction
.
codeName
}}
',fullCodeName:'
{{
psUIAction
.
fullCodeName
}}
',uIActionMode:'
{{
psUIAction
.
uIActionMode
}}
',actionTarget:'
{{
psUIAction
.
actionTarget
}}
',uIActionTag:'
{{
psUIAction
.
uIActionTag
}}
',dataAccessAction:'
{{
psUIAction
.
dataAccessAction
}}
',uIActionType:'
{{
psUIAction
.
uIActionType
}}
'}
{{#if
psUIAction
.
counterId
}}
,counterId: '
{{
psUIAction
.
counterId
}}
'
{{/if}}{{/if}}
},
{{/
childCtrl
.
psDEToolbarItems
}}
],
{{/
eq
}}
{{#
eq
childCtrl
.
controlType
'GRID'
}}
{{
childCtrl
.
name
}}
: {
action:{
loadAction: '
{{
childCtrl
.
getPSControlAction
.
psAppDEMethod
.
codeName
}}
',
removeAction: '
{{
childCtrl
.
removePSControlAction
.
psAppDEMethod
.
codeName
}}
',
updateAction: '
{{
childCtrl
.
updatePSControlAction
.
psAppDEMethod
.
codeName
}}
',
loadDraftAction: '
{{
childCtrl
.
getDraftPSControlAction
.
psAppDEMethod
.
codeName
}}
',
createAction: '
{{
childCtrl
.
createPSControlAction
.
psAppDEMethod
.
codeName
}}
',
fetchAction:'
{{
childCtrl
.
fetchPSControlAction
.
psAppDEMethod
.
codeName
}}
'
}
},
{{#
and
childCtrl
.
navPSDER
childCtrl
.
navPSDER
.
minorCodeName
}}
navPSDer: 'n_
{{
lowerCase
childCtrl
.
navPSDER
.
minorCodeName
}}
_eq',
{{/
and
}}
{{#if
childCtrl
.
navFilter
}}
navFilter: '
{{
lowerCase
childCtrl
.
navFilter
}}
',
{{/if}}
{{#if
childCtrl
.
navPSAppView
}}
navViewName: '
{{
childCtrl
.
navPSAppView
.
name
}}
',
{{/if}}
{{#if
childCtrl
.
psNavigateContexts
}}
navigateContexts:
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
childCtrl
.
psNavigateContexts
}}
,
{{/if}}
{{#if
childCtrl
.
psNavigateParams
}}
navigateParams:
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
childCtrl
.
psNavigateParams
}}
,
{{/if}}
{{/
eq
}}
{{/
each
}}
};
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRIDEXPBAR}}-grid-exp-bar/{{ctrls@GRIDEXPBAR}}-grid-exp-bar.vue.hbs
0 → 100644
浏览文件 @
62af6348
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
IActionParam
,
IParam
,
ControlAction
,
GridExpBarControl
,
IContext
}
from
'@core'
;
import
{
ctrlState
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-grid-exp-bar-state'
;
{{#
ctrl
.
psControls
}}
{{#
eq
controlType
"GRID"
}}
import
{
{{
codeName
}}
Grid
}
from
'@widgets/
{{
spinalCase
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-grid'
;
{{#if
navPSAppView
}}
import
{{
navPSAppView
.
name
}}
from
'@views/
{{
spinalCase
navPSAppView
.
psAppModule
.
codeName
}}
/
{{
spinalCase
navPSAppView
.
codeName
}}
'
;
{{/if}}
{{/
eq
}}
{{/
ctrl
.
psControls
}}
interface
Props
{
name
:
string
,
parent
:
IParam
;
context
:
IContext
;
viewParams
?:
IParam
;
showBusyIndicator
?:
boolean
;
viewMode
?:
number
;
viewSubject
:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
viewMode
:
0
,
showBusyIndicator
:
true
,
});
interface
CtrlEmit
{
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
name
,
state
,
onCtrlEvent
,
xDataControl
,
search
,
onToolbarEvent
}
=
new
GridExpBarControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
name
,
state
});
</script>
<template>
<div
class=
"app-grid-exp-bar app-exp-bar
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<AppSplit
v-model=
"state.split"
>
<template
#
left
>
<div
v-if=
"state.enableSearch || state.toolbar || state.showTitleBar"
class=
"exp-bar-header"
>
<div
class=
"title"
v-if=
"state.showTitleBar"
><span>
\{{ state.title }}
</span></div>
{{
~#
if
ctrl
.
enableSearch
}}
<a-input-search
class=
"search"
v-model:value=
"state.searchValue"
@
search=
"search"
/>
{{/if}}
{{#
each
ctrl
.
psControls
as
|
childCtrl
|
}}
{{#
eq
childCtrl
.
controlType
'TOOLBAR'
}}
{{!-- TODO 计数器 --}}
<AppToolbar
mode=
"button"
name=
"
{{
lowerCase
childCtrl
.
codeName
}}
"
:actionModel=
"state.toolbar"
@
onToolbarEvent=
"onToolbarEvent"
>
</AppToolbar>
{{/
eq
}}
{{/
each
}}
</div>
<div
class=
"exp-bar-body"
>
{{#
ctrl
.
psControls
}}
{{#
eq
controlType
"GRID"
}}
<
{{
codeName
}}
Grid
ref=
"xDataControl"
name=
"
{{
name
}}
"
:controlAction=
"state.
{{
name
}}
.action"
:context=
"state.context"
:viewParams=
"state.viewParams"
:viewSubject=
"state.viewSubject"
:selectFirstDefault=
"true"
:isBranchAvailable=
"true"
:rowActiveMode=
"1"
:multiple=
"false"
:parent=
"parent"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
Grid>
{{/
eq
}}
{{/
ctrl
.
psControls
}}
</div>
</template>
<template
#
right
>
{{#
ctrl
.
psControls
}}
{{#
eq
controlType
"GRID"
}}
{{#if
navPSAppView
}}
<
{{
navPSAppView
.
name
}}
v-if
="
state
.
selection
&&
state
.
selection
.
key
"
class=
"grid-exp-bar-navview exp-bar-navview"
:context=
"state.selection.context"
:key=
"state.selection.key"
:viewDefaultUsage=
"false"
:viewParams=
"state.selection.viewParams"
></
{{
navPSAppView
.
name
}}
>
{{/if}}
{{/
eq
}}
{{/
ctrl
.
psControls
}}
</template>
</AppSplit>
</div>
</template>
<style
lang=
"scss"
scoped
>
.app-grid-exp-bar
{
width
:
100%
;
height
:
100%
;
}
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
浏览文件 @
62af6348
...
@@ -24,7 +24,7 @@ interface Props {
...
@@ -24,7 +24,7 @@ interface Props {
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
showBusyIndicator
:
true
,
showBusyIndicator
:
true
,
multiple
:
fals
e
,
multiple
:
tru
e
,
rowEditState
:
false
,
rowEditState
:
false
,
rowActiveMode
:
0
,
rowActiveMode
:
0
,
selectFirstDefault
:
false
,
selectFirstDefault
:
false
,
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录