Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
3a8962fe
提交
3a8962fe
编写于
3月 17, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
1、调整部分视图事件表示 2、更新选择视图逻辑 3、调整多数据视图基类逻辑
上级
32b83f86
变更
30
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
328 行增加
和
156 行删除
+328
-156
span.hbs
...main/resources/templ/r7/@macro/front-end/editors/span.hbs
+1
-1
app-form-group.vue
.../r7/app_{{apps}}/src/components/common/app-form-group.vue
+4
-1
app-modal.vue
...templ/r7/app_{{apps}}/src/components/common/app-modal.vue
+1
-1
app-data-picker.vue
...7/app_{{apps}}/src/components/editors/app-data-picker.vue
+76
-22
app-stepper.vue
...pl/r7/app_{{apps}}/src/components/editors/app-stepper.vue
+4
-4
mpickup-view-state.ts
...src/core/modules/views/mpickup-view/mpickup-view-state.ts
+8
-2
mpickup-view.ts
...pps}}/src/core/modules/views/mpickup-view/mpickup-view.ts
+15
-9
pickup-grid-view-state.ts
.../modules/views/pickup-grid-view/pickup-grid-view-state.ts
+8
-2
pickup-view-state.ts
...}/src/core/modules/views/pickup-view/pickup-view-state.ts
+9
-2
pickup-view.ts
...{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
+26
-21
view-base.ts
...pp_{{apps}}/src/core/modules/views/view-base/view-base.ts
+2
-2
control-base.ts
...s}}/src/core/modules/widgets/control-base/control-base.ts
+12
-2
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+48
-51
list-control.ts
...s}}/src/core/modules/widgets/list-control/list-control.ts
+10
-10
md-control-state.ts
...}/src/core/modules/widgets/md-control/md-control-state.ts
+8
-1
md-control.ts
...{apps}}/src/core/modules/widgets/md-control/md-control.ts
+31
-9
pickup-view-panel-control-state.ts
...kup-view-panel-control/pickup-view-panel-control-state.ts
+1
-1
pickup-view-panel-control.ts
...ts/pickup-view-panel-control/pickup-view-panel-control.ts
+36
-1
{{pages@DEMPICKUPVIEW}}.vue.hbs
...}/{{pages@DEMPICKUPVIEW}}/{{pages@DEMPICKUPVIEW}}.vue.hbs
+3
-2
{{pages@DEPICKUPGRIDVIEW}}-state.ts.hbs
...EPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}-state.ts.hbs
+3
-1
{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
...ges@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
+5
-3
{{pages@DEPICKUPVIEW}}.vue.hbs
...s}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
+2
-2
{{ctrls@GRID}}-grid-state.ts.hbs
...es}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
+1
-0
{{ctrls@GRID}}-grid.vue.hbs
...ntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
+0
-1
{{ctrls@LIST}}-list-state.ts.hbs
...es}}/{{ctrls@LIST}}-list/{{ctrls@LIST}}-list-state.ts.hbs
+1
-0
{{ctrls@LIST}}-list.vue.hbs
...ntities}}/{{ctrls@LIST}}-list/{{ctrls@LIST}}-list.vue.hbs
+0
-1
{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel-state.ts.hbs
.../{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel-state.ts.hbs
+6
-0
{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
...panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
+5
-2
{{ctrls@TREEVIEW}}-tree-state.ts.hbs
...trls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree-state.ts.hbs
+2
-1
{{ctrls@TREEVIEW}}-tree.vue.hbs
...}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree.vue.hbs
+0
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/span.hbs
浏览文件 @
3a8962fe
...
...
@@ -26,7 +26,7 @@
codeListType=
"
{{
item
.
psEditor
.
psAppCodeList
.
codeListType
}}
"
{{/if}}
{{#if
item
.
dataType
}}
dataType=
"
{{
item
.
dataType
}}
"
:
dataType=
"
{{
item
.
dataType
}}
"
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
unitName
}}
unitName=
"
{{
item
.
psEditor
.
editorParams
.
unitName
}}
"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-group.vue
浏览文件 @
3a8962fe
...
...
@@ -130,9 +130,12 @@ const handleContentShowStatusChange = (event: MouseEvent) => {
}
}
.ant-card-body
{
height
:
calc
(
100%
-
38px
)
;
height
:
100%
;
padding-top
:
6px
;
}
.ant-card-head
+
.ant-card-body
{
height
:
calc
(
100%
-
38px
);
}
}
.show-content-icon
{
position
:
absolute
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-modal.vue
浏览文件 @
3a8962fe
...
...
@@ -162,7 +162,7 @@ const handelViewEvent = (actionParam: IActionParam) => {
case
'viewDataChange'
:
viewDataChange
(
data
);
break
;
case
'
c
lose'
:
case
'
viewC
lose'
:
close
(
data
);
break
;
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/app-data-picker.vue
浏览文件 @
3a8962fe
<
script
setup
lang=
"ts"
>
import
{
onBeforeMount
,
Ref
,
ref
}
from
'vue'
;
import
{
SearchOutlined
,
ExportOutlined
}
from
'@ant-design/icons-vue'
;
import
{
deepCopy
,
IParam
,
IActionParam
,
EditorBase
,
IContext
,
PickupView
}
from
'@core'
;
import
{
SearchOutlined
,
ExportOutlined
,
CloseCircleOutlined
}
from
'@ant-design/icons-vue'
;
import
{
deepCopy
,
IParam
,
IActionParam
,
EditorBase
,
IContext
,
PickupView
,
isExistAndNotEmpty
}
from
'@core'
;
interface
DataPickerProps
{
/**
* @description 编辑器名称
...
...
@@ -116,12 +116,12 @@ interface DataPickerProps {
/**
* @description 无AC
*/
noAc
?:
boolean
;
noAc
?:
boolean
;
/**
* @description 显示按钮
*/
showButton
?:
boolean
;
showButton
?:
boolean
;
/**
* @description 是否下拉
...
...
@@ -200,15 +200,18 @@ const onSearch = (value: string) => {
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
'查询参数不存在'
});
}
else
{
const
{
serviceName
,
interfaceName
}
=
props
.
acParams
;
props
.
service
.
getItems
(
serviceName
,
interfaceName
,
_navContext
,
_navViewParam
).
then
((
response
:
any
)
=>
{
if
(
!
response
)
{
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
''
});
return
;
}
items
.
value
=
[...
response
];
}).
catch
((
error
:
any
)
=>
{
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
error
?.
message
});
})
props
.
service
.
getItems
(
serviceName
,
interfaceName
,
_navContext
,
_navViewParam
)
.
then
((
response
:
any
)
=>
{
if
(
!
response
)
{
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
''
});
return
;
}
items
.
value
=
[...
response
];
})
.
catch
((
error
:
any
)
=>
{
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
error
?.
message
});
});
}
};
...
...
@@ -216,6 +219,7 @@ const filterOption = (inputValue: string, option: IParam) => {
return
option
[
props
.
deMajorField
].
toUpperCase
().
indexOf
(
inputValue
.
toUpperCase
())
>=
0
;
};
// 选中
const
onSelect
=
(
value
:
any
)
=>
{
const
selectItem
=
items
.
value
.
find
((
item
:
IParam
)
=>
Object
.
is
(
item
[
props
.
deKeyField
!
],
value
));
emit
(
'editorEvent'
,
{
...
...
@@ -223,17 +227,35 @@ const onSelect = (value: any) => {
action
:
'valueChange'
,
data
:
selectItem
[
props
.
deMajorField
!
],
});
emit
(
'editorEvent'
,
{
tag
:
props
.
valueItem
,
action
:
'valueChange'
,
data
:
selectItem
[
props
.
deKeyField
!
]
});
if
(
props
.
valueItem
)
{
emit
(
'editorEvent'
,
{
tag
:
props
.
valueItem
,
action
:
'valueChange'
,
data
:
selectItem
[
props
.
deKeyField
!
]
});
}
fillPickUpData
(
selectItem
);
};
// 清空值
const
clear
=
(
value
:
any
)
=>
{
emit
(
'editorEvent'
,
{
tag
:
props
.
name
,
action
:
'valueChange'
,
data
:
null
,
});
if
(
props
.
valueItem
)
{
emit
(
'editorEvent'
,
{
tag
:
props
.
valueItem
,
action
:
'valueChange'
,
data
:
null
});
}
};
// 编辑器抛值
const
doEditorEmit
=
(
data
:
any
[]):
any
=>
{
let
majorValue
:
any
=
''
;
let
keyValue
:
any
=
''
;
data
.
forEach
((
item
:
any
)
=>
{
majorValue
=
item
[
props
.
deMajorField
]
?
majorValue
+
(
majorValue
?
props
.
separator
:
''
)
+
item
[
props
.
deMajorField
]
:
majorValue
+
(
majorValue
?
props
.
separator
:
''
)
+
item
[
'srfmajortext'
];
keyValue
=
item
[
props
.
deKeyField
]
?
keyValue
+
(
keyValue
?
props
.
separator
:
''
)
+
item
[
props
.
deKeyField
]
:
keyValue
+
(
keyValue
?
props
.
separator
:
''
)
+
item
[
'srfkey'
];
majorValue
=
item
[
props
.
deMajorField
]
?
majorValue
+
(
majorValue
?
props
.
separator
:
''
)
+
item
[
props
.
deMajorField
]
:
majorValue
+
(
majorValue
?
props
.
separator
:
''
)
+
item
[
'srfmajortext'
];
keyValue
=
item
[
props
.
deKeyField
]
?
keyValue
+
(
keyValue
?
props
.
separator
:
''
)
+
item
[
props
.
deKeyField
]
:
keyValue
+
(
keyValue
?
props
.
separator
:
''
)
+
item
[
'srfkey'
];
});
if
(
props
.
valueItem
)
{
emit
(
'editorEvent'
,
{
tag
:
props
.
valueItem
,
action
:
'valueChange'
,
data
:
keyValue
});
...
...
@@ -252,9 +274,28 @@ const openView = () => {
return
;
}
const
params
:
IParam
=
{};
if
(
!
Object
.
is
(
view
.
openMode
,
'POPOVER'
)
&&
!
Object
.
is
(
view
.
openMode
,
'POPOVER'
))
{
Object
.
assign
(
params
,{
openMode
:
'POPUPMODAL'
})
// 选中数据
const
selectedData
:
IParam
=
{};
// 值项
if
(
props
.
data
&&
props
.
valueItem
&&
isExistAndNotEmpty
(
props
.
data
[
props
.
valueItem
]))
{
Object
.
assign
(
selectedData
,
{
srfkey
:
props
.
data
[
props
.
valueItem
]
});
}
if
(
isExistAndNotEmpty
(
props
.
value
))
{
Object
.
assign
(
selectedData
,
{
srfmajortext
:
props
.
value
});
}
// 导航参数
const
tempViewParams
=
deepCopy
(
navViewParam
);
Object
.
assign
(
tempViewParams
,
{
selectedData
:
[
selectedData
]
});
if
(
!
Object
.
is
(
view
.
openMode
,
'POPOVER'
)
&&
!
Object
.
is
(
view
.
openMode
,
'POPOVER'
))
{
Object
.
assign
(
params
,
{
openMode
:
'POPUPMODAL'
});
}
Object
.
assign
(
params
,
{
context
:
deepCopy
(
navContext
),
viewParams
:
tempViewParams
});
const
subject
=
App
.
getOpenViewService
().
openView
(
view
,
params
);
const
subjectEvent
=
subject
?.
subscribe
((
data
:
any
)
=>
{
if
(
data
?.
ret
==
'OK'
&&
data
.
resultData
)
{
...
...
@@ -267,7 +308,6 @@ const openView = () => {
const
onChange
=
(
date
:
string
,
dateString
:
string
)
=>
{
// todo
};
</
script
>
<
template
>
...
...
@@ -277,7 +317,6 @@ const onChange = (date: string, dateString: string) => {
<
template
v-else-if=
"!isAC && !isDropdown"
>
<a-auto-complete
:class=
"['app-editor-container', 'app-data-picker', `app-data-picker-$
{name}`]"
:allowClear="true"
v-model:value="value"
:placeholder="placeholder"
:options="items"
...
...
@@ -291,6 +330,7 @@ const onChange = (date: string, dateString: string) => {
</
template
>
<a-input
:placeholder=
"placeholder"
>
<
template
#
suffix
>
<CloseCircleOutlined
@
click=
"clear"
/>
<SearchOutlined
v-if=
"pickUpView"
class=
"certain-category-icon"
@
click=
"openView"
/>
<ExportOutlined
v-if=
"linkView"
@
click=
"openLinkView"
/>
</
template
>
...
...
@@ -308,7 +348,6 @@ const onChange = (date: string, dateString: string) => {
<
template
v-else-if=
"isDropdown"
>
<a-select
:class=
"['app-editor-container', 'app-data-picker', `app-data-picker-$
{name}`]"
allowClear
showSearch
v-model:value="value"
:disabled="disabled"
...
...
@@ -318,6 +357,7 @@ const onChange = (date: string, dateString: string) => {
:placeholder="placeholder"
>
<template
#
suffixIcon
>
<CloseCircleOutlined
@
click=
"clear"
/>
<SearchOutlined
v-if=
"pickUpView"
@
click=
"openPickUpView"
/>
<ExportOutlined
v-if=
"linkView"
@
click=
"openLinkView"
/>
</
template
>
...
...
@@ -328,4 +368,18 @@ const onChange = (date: string, dateString: string) => {
</template>
</template>
<
style
scoped
></
style
>
<
style
scoped
lang=
"scss"
>
.app-data-picker
{
.anticon
{
padding
:
0
3px
;
}
.anticon-close-circle
{
display
:
none
;
}
&
:hover
{
.anticon-close-circle
{
display
:
block
;
}
}
}
</
style
>
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/app-stepper.vue
浏览文件 @
3a8962fe
<
template
>
<div
class=
"app-stepper"
>
<a-input
:value=
"result"
:min=
"min"
:max=
"max"
:step=
"step"
:precision=
"precision"
:disabled=
"disabled || readonly
"
>
<a-input
-number
v-model:value=
"result"
:min=
"min"
:max=
"max"
:step=
"step"
:precision=
"precision"
:disabled=
"disabled || readonly"
:controls=
"false
"
>
<template
#
addonBefore
>
<a-button
type=
"text"
:disabled=
"disabled || readonly || result
<
=
min
"
@
click=
"btnReduce"
>
-
</a-button>
</
template
>
<
template
#
addonAfter
>
<a-button
type=
"text"
:disabled=
"disabled || readonly || result >= max"
@
click=
"btnIcrease"
>
+
</a-button>
</
template
>
</a-input>
</a-input
-number
>
</div>
</template>
<
script
setup
lang=
"ts"
>
...
...
@@ -128,10 +128,10 @@ const btnIcrease = () => {
background
:
transparent
;
}
}
.ant-input-group-addon
{
.ant-input-
number-
group-addon
{
padding
:
0
;
}
.ant-input
{
.ant-input
-number-input
{
text-align
:
center
;
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/mpickup-view/mpickup-view-state.ts
浏览文件 @
3a8962fe
import
{
PickupViewState
}
from
'@core'
;
import
{
IParam
,
PickupViewState
}
from
'@core'
;
/**
* @description 多选视图状态
...
...
@@ -7,5 +7,11 @@ import { PickupViewState } from '@core';
* @extends {PickupViewState}
*/
export
interface
MPickupViewState
extends
PickupViewState
{
/**
* 选中数据
*
* @type {IParam[]}
* @memberof MPickupViewState
*/
selections
:
IParam
[];
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/mpickup-view/mpickup-view.ts
浏览文件 @
3a8962fe
import
{
IActionParam
,
IParam
,
PickupView
}
from
"@core"
;
import
{
MainView
}
from
"../main-view"
;
import
{
IParam
,
PickupView
}
from
"@core"
;
import
{
MPickupViewProps
}
from
"./mpickup-view-prop"
;
import
{
MPickupViewState
}
from
"./mpickup-view-state"
;
...
...
@@ -18,18 +17,25 @@ export class MPickupView extends PickupView {
*/
public
declare
state
:
MPickupViewState
;
public
select
:
IParam
=
{};
/**
* @description 视图输入参数
* @type {MPickupViewProps}
* @memberof MPickupView
*/
public
declare
props
:
MPickupViewProps
;
public
useSelections
:
any
[]
=
[]
;
public
select
:
IParam
=
{}
;
public
onMoveRight
()
{
this
.
useSelections
.
push
(
this
.
selectData
);
const
{
selections
,
selectedData
}
=
toRefs
(
this
.
state
);
selections
.
value
.
push
(
selectedData
.
value
);
}
public
onMoveLeft
()
{
const
index
=
this
.
useSelections
.
findIndex
((
selection
:
any
)
=>
Object
.
is
(
this
.
select
.
srfkey
,
selection
.
srfkey
));
const
{
selections
}
=
toRefs
(
this
.
state
);
const
index
=
selections
.
value
.
findIndex
((
selection
:
any
)
=>
Object
.
is
(
this
.
select
.
srfkey
,
selection
.
srfkey
));
if
(
index
!==
-
1
)
{
this
.
useSelections
.
splice
(
index
,
1
);
selections
.
value
.
splice
(
index
,
1
);
}
}
...
...
@@ -38,7 +44,8 @@ export class MPickupView extends PickupView {
}
public
onAllMoveLeft
()
{
this
.
useSelections
=
[];
const
{
selections
}
=
toRefs
(
this
.
state
);
selections
.
value
.
splice
(
0
,
selections
.
value
.
length
);
}
/**
...
...
@@ -50,7 +57,6 @@ export class MPickupView extends PickupView {
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
useSelections
:
this
.
useSelections
,
onMoveRight
:
this
.
onMoveRight
.
bind
(
this
),
onMoveLeft
:
this
.
onMoveLeft
.
bind
(
this
),
onAllMoveRight
:
this
.
onAllMoveRight
.
bind
(
this
),
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-grid-view/pickup-grid-view-state.ts
浏览文件 @
3a8962fe
import
{
GridViewState
}
from
'@core'
;
import
{
GridViewState
,
IParam
}
from
'@core'
;
/**
* @description 选择视图状态
...
...
@@ -7,5 +7,11 @@ import { GridViewState } from '@core';
* @extends {GridViewState}
*/
export
interface
PickupGridViewState
extends
GridViewState
{
/**
* 选中数据
*
* @type {IParam[]}
* @memberof PickupGridViewState
*/
selectedData
:
IParam
[];
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-view/pickup-view-state.ts
浏览文件 @
3a8962fe
import
{
ControlAction
,
MainViewState
}
from
'@core'
;
import
{
MainViewState
,
IParam
}
from
'@core'
;
/**
* @description 选择视图状态
...
...
@@ -7,5 +7,12 @@ import { ControlAction, MainViewState } from '@core';
* @extends {ViewStateBase}
*/
export
interface
PickupViewState
extends
MainViewState
{
/**
* 选中数据
*
* @type {IParam[]}
* @memberof PickupViewState
*/
selectedData
:
IParam
[];
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
浏览文件 @
3a8962fe
...
...
@@ -18,19 +18,22 @@ export class PickupView extends MainView {
*/
public
declare
state
:
PickupViewState
;
public
selectData
:
any
[]
=
[];
/**
* @description 选择视图输入参数
* @type {PickupViewProps}
* @memberof PickupView
*/
public
declare
props
:
PickupViewProps
;
/**
*
@description 使用加载功能
模块
*
@param {PickupViewProps} props 传入的props
*
使用视图初始化
模块
*
* @memberof PickupView
*/
public
useLoad
(
props
:
PickupViewProps
)
{
const
{
viewSubject
}
=
this
.
state
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
'grid'
,
action
:
"load"
,
data
:
{}
})
})
public
useViewInit
()
{
super
.
useViewInit
();
const
{
viewParams
}
=
this
.
state
;
this
.
state
.
selectedData
=
ref
(
viewParams
.
selectedData
)
||
ref
([]);
}
/**
...
...
@@ -38,7 +41,7 @@ export class PickupView extends MainView {
* @memberof PickupView
*/
public
onCancel
()
{
this
.
emit
(
'
close'
,
[]
);
this
.
emit
(
'
viewEvent'
,
{
tag
:
this
.
state
.
viewName
,
action
:
'viewClose'
,
data
:
null
}
);
}
/**
...
...
@@ -46,24 +49,27 @@ export class PickupView extends MainView {
* @memberof PickupView
*/
public
onConfirm
()
{
this
.
emit
(
'viewEvent'
,
{
data
:
this
.
selectData
,
tag
:
''
,
action
:
'close'
})
this
.
emit
(
'viewEvent'
,
{
tag
:
this
.
state
.
viewName
,
action
:
'viewDataChange'
,
data
:
this
.
state
.
selectedData
});
this
.
emit
(
'viewEvent'
,
{
tag
:
this
.
state
.
viewName
,
action
:
'viewClose'
,
data
:
null
});
}
/**
* 处理部件事件
*
* @param {IActionParam} actionParam
* @memberof PickupView
*/
public
onCtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
// TODO
if
(
action
===
'selectionChange'
)
{
this
.
selectData
=
data
;
this
.
emit
(
'viewEvent'
,
{
data
:
this
.
selectData
,
tag
:
''
,
action
:
'viewDataChange'
})
}
if
(
action
===
'close'
)
{
this
.
emit
(
'viewEvent'
,
{
data
:
this
.
selectData
,
tag
:
''
,
action
:
'viewDataChange'
})
const
{
selectedData
}
=
toRefs
(
this
.
state
);
if
(
data
&&
data
.
length
>
0
)
{
selectedData
.
value
=
[...
data
];
}
}
super
.
onCtrlEvent
(
actionParam
);
}
/**
* @description 安装视图所有功能模块的方法
* @return {*}
...
...
@@ -73,7 +79,6 @@ export class PickupView extends MainView {
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
selectData
:
this
.
selectData
,
onCancel
:
this
.
onCancel
.
bind
(
this
),
onConfirm
:
this
.
onConfirm
.
bind
(
this
)
};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/view-base/view-base.ts
浏览文件 @
3a8962fe
...
...
@@ -93,7 +93,7 @@ export class ViewBase {
window
.
history
.
back
();
}
else
{
// 非路由模式继续向外抛关闭视图事件
this
.
emit
(
'viewEvent'
,
{
tag
:
this
.
state
.
viewName
,
action
:
'
closeView
'
,
data
:
this
.
xDataControl
?.
getData
()
});
this
.
emit
(
'viewEvent'
,
{
tag
:
this
.
state
.
viewName
,
action
:
'
viewClose
'
,
data
:
this
.
xDataControl
?.
getData
()
});
}
}
...
...
@@ -228,7 +228,7 @@ export class ViewBase {
*/
public
onCtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
if
(
Object
.
is
(
action
,
'
closeView
'
))
{
if
(
Object
.
is
(
action
,
'
viewClose
'
))
{
this
.
closeView
();
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/control-base/control-base.ts
浏览文件 @
3a8962fe
...
...
@@ -87,6 +87,14 @@ export class ControlBase {
});
}
/**
* 使用部件初始化模块
*
* @protected
* @memberof ControlBase
*/
protected
useCtrlInit
():
void
{};
/**
* 获取当前激活数据
*
...
...
@@ -101,7 +109,7 @@ export class ControlBase {
*
*/
public
closeView
()
{
this
.
emit
(
'ctrlEvent'
,
{
tag
:
this
.
props
.
name
,
action
:
'
closeView
'
,
data
:
undefined
});
this
.
emit
(
'ctrlEvent'
,
{
tag
:
this
.
props
.
name
,
action
:
'
viewClose
'
,
data
:
undefined
});
}
/**
...
...
@@ -124,7 +132,9 @@ export class ControlBase {
// 处理导航参数
this
.
useControlContextParams
();
// 使用计数器服务
this
.
useCounterService
();
this
.
useCounterService
();
// 使用部件初始化模块
this
.
useCtrlInit
();
return
{
state
:
this
.
state
,
name
:
this
.
state
.
controlName
,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
3a8962fe
import
{
DataTypes
,
dateFormat
,
deepCopy
,
GridControlState
,
IActionParam
,
IParam
,
isExistAndNotEmpty
,
MDControl
,
Verify
}
from
"@core"
;
import
{
DataTypes
,
dateFormat
,
deepCopy
,
GridControlState
,
IActionParam
,
IParam
,
isExistAndNotEmpty
,
MDControl
}
from
"@core"
;
import
{
createUUID
}
from
"qx-util"
;
import
schema
,
{
ErrorList
,
FieldErrorList
}
from
'async-validator'
;
import
{
Ref
}
from
"vue"
;
...
...
@@ -25,15 +25,6 @@ export class GridControl extends MDControl {
*/
private
formRef
:
any
;
/**
* @description
* @param {GridControlProps} props
* @memberof GridControl
*/
public
setState
()
{
super
.
setState
();
}
/**
* @description 使用自定义模块(蚂蚁金服UI自定义)
* @memberof GridControl
...
...
@@ -61,48 +52,18 @@ export class GridControl extends MDControl {
return
{
onClick
:
()
=>
{
// 单击激活
if
(
this
.
state
.
rowActiveMode
===
1
)
{
if
(
!
rowEditState
)
{
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
:
[
record
]
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowClick"
,
data
:
[
record
]
});
}
if
(
this
.
state
.
rowActiveMode
===
1
&&
!
rowEditState
)
{
this
.
selectRow
(
record
,
index
);
if
(
!
record
.
children
)
{
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowClick"
,
data
:
[
record
]
});
}
}
},
onDblclick
:
()
=>
{
// 双击激活
if
(
this
.
state
.
rowActiveMode
===
2
)
{
if
(
this
.
state
.
rowActiveMode
===
2
&&
!
rowEditState
)
{
if
(
!
record
.
children
)
{
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
.
selectRow
(
record
,
index
);
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"rowDbClick"
,
data
:
[
record
]
});
}
}
...
...
@@ -116,11 +77,12 @@ export class GridControl extends MDControl {
}
// 表格选择功能配置
const
useRowSelectionOption
=
computed
(()
=>
{
// 作为导航部件或单选时不呈现多选框
if
(
selectFirstDefault
)
{
return
false
;
}
return
{
type
:
isSingleSelect
?
'radio'
:
'checkbox
'
,
type
:
this
.
state
.
isMultiple
?
'checkbox'
:
'radio
'
,
columnWidth
:
selectColumnWidth
,
selectedRowKeys
:
this
.
state
.
selectedRowKeys
,
checkStrictly
:
false
,
...
...
@@ -143,7 +105,7 @@ export class GridControl extends MDControl {
}
})
// 选中赋值
this
.
state
.
select
edData
=
selection
;
this
.
state
.
select
ions
=
selection
;
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
data
:
selection
})
},
};
...
...
@@ -396,16 +358,22 @@ export class GridControl extends MDControl {
* @memberof GridControl
*/
public
handleDefaultSelect
()
{
const
{
selectedData
,
selectFirstDefault
,
controlName
,
items
}
=
this
.
state
;
const
{
selectedRowKeys
}
=
toRefs
(
this
.
state
);
const
{
selectedData
,
selectFirstDefault
,
items
}
=
this
.
state
;
const
{
selectedRowKeys
,
selections
}
=
toRefs
(
this
.
state
);
if
(
selectedData
?.
length
>
0
)
{
const
_selectedRowKeys
:
string
[]
=
[];
const
_selections
:
IParam
[]
=
[];
selectedData
.
forEach
((
selected
:
IParam
)
=>
{
if
(
selected
.
srfkey
)
{
_selectedRowKeys
.
push
(
selected
.
srfkey
);
const
item
=
items
.
find
((
item
:
IParam
)
=>
item
.
srfkey
===
selected
.
srfkey
);
if
(
item
)
{
_selections
.
push
(
item
);
}
}
});
selectedRowKeys
.
value
=
_selectedRowKeys
;
selectedRowKeys
.
value
=
[...
_selectedRowKeys
];
selections
.
value
=
[...
_selections
];
}
else
if
(
selectFirstDefault
)
{
if
(
items
&&
items
.
length
>
0
)
{
this
.
emit
(
"ctrlEvent"
,
{
...
...
@@ -828,6 +796,35 @@ export class GridControl extends MDControl {
return
validateStatus
;
}
/**
* 选中行(手动单击或双击激活行触发)
*
* @private
* @param {IParam} record
* @param {number} index
* @memberof GridControl
*/
private
selectRow
(
record
:
IParam
,
index
:
number
)
{
const
{
isMultiple
}
=
this
.
state
;
const
{
selections
,
selectedRowKeys
}
=
toRefs
(
this
.
state
);
const
_index
=
selections
.
value
.
findIndex
((
selection
:
any
)
=>
selection
.
srfkey
===
record
.
srfkey
);
// 存在选中则删除
if
(
_index
!==
-
1
)
{
selections
.
value
.
splice
(
_index
,
1
);
selectedRowKeys
.
value
.
splice
(
_index
,
1
);
}
else
{
// 单选清空已选中
if
(
!
isMultiple
)
{
selections
.
value
.
splice
(
_index
,
selections
.
value
.
length
);
selectedRowKeys
.
value
.
splice
(
_index
,
selectedRowKeys
.
value
.
length
);
}
selections
.
value
.
push
(
record
);
selectedRowKeys
.
value
.
push
(
record
.
srfkey
);
}
this
.
emit
(
'ctrlEvent'
,
{
tag
:
this
.
props
.
name
,
action
:
'selectionChange'
,
data
:
selections
.
value
});
}
/**
* @description 安装部件所有功能模块的方法
* @return {*}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/list-control/list-control.ts
浏览文件 @
3a8962fe
...
...
@@ -144,10 +144,10 @@ export class ListControl extends MDControl {
*/
private
handleDefaultSelect
()
{
const
{
selectFirstDefault
}
=
this
.
state
;
const
{
select
edData
,
items
}
=
toRefs
(
this
.
state
);
const
{
select
ions
,
items
}
=
toRefs
(
this
.
state
);
if
(
selectFirstDefault
)
{
if
(
items
.
value
&&
items
.
value
.
length
>
0
)
{
select
edData
.
value
.
push
(
items
.
value
[
0
]);
select
ions
.
value
.
push
(
items
.
value
[
0
]);
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selectionChange"
,
...
...
@@ -195,19 +195,19 @@ export class ListControl extends MDControl {
*/
const
onListItemSelected
=
(
item
:
IParam
,
event
:
MouseEvent
)
=>
{
const
{
isMultiple
}
=
this
.
state
;
const
{
select
edData
}
=
toRefs
(
this
.
state
);
const
index
=
select
edData
.
value
.
findIndex
((
selection
:
any
)
=>
selection
.
srfkey
===
item
.
srfkey
);
const
{
select
ions
}
=
toRefs
(
this
.
state
);
const
index
=
select
ions
.
value
.
findIndex
((
selection
:
any
)
=>
selection
.
srfkey
===
item
.
srfkey
);
// 存在选中则删除
if
(
index
!==
-
1
)
{
select
edData
.
value
.
splice
(
index
,
1
);
select
ions
.
value
.
splice
(
index
,
1
);
}
else
{
// 单选清空已选中
if
(
!
isMultiple
)
{
select
edData
.
value
.
splice
(
index
,
selectedData
.
value
.
length
);
select
ions
.
value
.
splice
(
index
,
selections
.
value
.
length
);
}
select
edData
.
value
.
push
(
item
);
select
ions
.
value
.
push
(
item
);
}
this
.
emit
(
'ctrlEvent'
,
{
tag
:
this
.
props
.
name
,
action
:
'selectionChange'
,
data
:
select
edData
.
value
});
this
.
emit
(
'ctrlEvent'
,
{
tag
:
this
.
props
.
name
,
action
:
'selectionChange'
,
data
:
select
ions
.
value
});
}
/**
...
...
@@ -216,8 +216,8 @@ export class ListControl extends MDControl {
* @returns
*/
const
isSelected
=
(
item
:
IParam
):
boolean
=>
{
const
{
select
edData
}
=
toRefs
(
this
.
state
);
return
select
edData
.
value
.
findIndex
((
selection
:
any
)
=>
selection
.
srfkey
===
item
.
srfkey
)
!==
-
1
;
const
{
select
ions
}
=
toRefs
(
this
.
state
);
return
select
ions
.
value
.
findIndex
((
selection
:
any
)
=>
selection
.
srfkey
===
item
.
srfkey
)
!==
-
1
;
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/md-control-state.ts
浏览文件 @
3a8962fe
...
...
@@ -72,12 +72,19 @@ export interface MDControlState extends MainControlState {
rowActiveMode
:
0
|
1
|
2
;
/**
* @description 选中数据
* @description 选中数据
(选择视图传递)
* @type {IParam[]}
* @memberof MDControlState
*/
selectedData
:
IParam
[];
/**
* @description 选中数据
* @type {IParam[]}
* @memberof MDControlState
*/
selections
:
IParam
[];
/**
* @description 选中行keys
* @type {string[]}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/md-control.ts
浏览文件 @
3a8962fe
...
...
@@ -16,23 +16,45 @@ export class MDControl extends MainControl {
public
declare
state
:
MDControlState
;
/**
* @description
* @description
设置多数据部件状态
* @memberof MDControl
*/
public
setState
()
{
super
.
setState
();
// 交联输入Props
this
.
state
.
isMultiple
=
toRef
(
this
.
props
,
'
isM
ultiple'
)
as
any
;
this
.
state
.
isMultiple
=
toRef
(
this
.
props
,
'
m
ultiple'
)
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
;
}
protected
useCtrlInit
()
{
super
.
useCtrlInit
();
this
.
handleSelectedData
();
}
/**
* 处理选中数据
*
* @private
* @memberof MDControl
*/
protected
handleSelectedData
()
{
const
{
viewParams
}
=
this
.
state
;
// 存在该字段则表示在选择视图中
if
(
viewParams
&&
viewParams
.
selectedData
)
{
const
data
=
viewParams
.
selectedData
[
0
];
const
keys
=
data
?.
srfkey
?.
split
(
','
)
||
[];
this
.
state
.
selectedData
=
[];
if
(
keys
.
length
)
{
keys
.
forEach
((
key
:
string
)
=>
{
this
.
state
.
selectedData
.
push
({
srfkey
:
key
});
});
}
else
{
// 无值时给一个空对象,确保清空选中数据
this
.
state
.
selectedData
.
push
({});
}
}
this
.
state
.
selectFirstDefault
=
toRef
(
this
.
props
,
'selectFirstDefault'
)
as
any
;
}
/**
...
...
@@ -626,7 +648,7 @@ export class MDControl extends MainControl {
* @memberof MDControl
*/
public
getData
():
IParam
[]
{
return
this
.
state
.
select
edData
;
return
this
.
state
.
select
ions
;
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/pickup-view-panel-control/pickup-view-panel-control-state.ts
浏览文件 @
3a8962fe
...
...
@@ -27,5 +27,5 @@ export interface PickupViewPanelControlState extends MainControlState {
* @type {string}
* @memberof PickupViewPanelControlState
*/
selectedData
:
string
;
selectedData
:
IParam
[]
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/pickup-view-panel-control/pickup-view-panel-control.ts
浏览文件 @
3a8962fe
import
{
IActionParam
,
MainControl
}
from
'@core'
;
import
{
IParam
}
from
'@core/interface'
;
import
{
PickupViewPanelControlProps
}
from
'./pickup-view-panel-control-prop'
;
import
{
PickupViewPanelControlState
}
from
'./pickup-view-panel-control-state'
;
...
...
@@ -17,6 +18,16 @@ export class PickupViewPanelControl extends MainControl {
*/
public
declare
state
:
PickupViewPanelControlState
;
/**
* 设置部件状态
*
* @memberof PickupViewPanelControl
*/
public
setState
():
void
{
super
.
setState
();
this
.
state
.
selectedData
=
toRef
(
this
.
props
,
'selectedData'
)
as
any
;
}
/**
* @description
* @param {PickupViewPanelControlProps} props
...
...
@@ -49,8 +60,32 @@ export class PickupViewPanelControl extends MainControl {
const
{
tag
,
action
,
data
}
=
actionParam
;
const
{
controlName
}
=
this
.
state
;
if
(
Object
.
is
(
"selectionChange"
,
action
))
{
this
.
emit
(
"onCtrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
action
,
data
:
data
});
this
.
handleSelectionChange
(
data
);
}
}
/**
* 处理数据变化
*
* @private
* @param {IParam[]} items
* @return {*}
* @memberof PickupViewPanelControl
*/
private
handleSelectionChange
(
items
:
IParam
[])
{
if
(
items
&&
items
.
length
)
{
const
{
appDeKeyFieldName
,
appDeMajorFieldName
}
=
this
.
state
;
const
_items
:
IParam
[]
=
[];
items
.
forEach
((
item
:
IParam
,
index
:
number
)
=>
{
_items
.
push
({
srfkey
:
item
.
srfkey
?
item
.
srfkey
:
item
[
appDeKeyFieldName
.
toLowerCase
()],
srfmajortext
:
item
.
srfmajortext
?
item
.
srfmajortext
:
item
[
appDeMajorFieldName
.
toLowerCase
()]
});
});
this
.
emit
(
"onCtrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
'selectionChange'
,
data
:
_items
});
return
;
}
this
.
emit
(
"onCtrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
'selectionChange'
,
data
:
[]
});
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEMPICKUPVIEW}}/{{pages@DEMPICKUPVIEW}}.vue.hbs
浏览文件 @
3a8962fe
...
...
@@ -30,7 +30,7 @@ const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法
const
mpickupView
=
new
MPickupView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
onCancel
,
onConfirm
,
onCtrlEvent
,
useSelections
,
onMoveRight
,
onMoveLeft
,
onAllMoveRight
,
onAllMoveLeft
}
=
mpickupView
;
const
{
state
,
onCancel
,
onConfirm
,
onCtrlEvent
,
onMoveRight
,
onMoveLeft
,
onAllMoveRight
,
onAllMoveLeft
}
=
mpickupView
;
</script>
<template>
...
...
@@ -62,6 +62,7 @@ const { state, onCancel, onConfirm, onCtrlEvent, useSelections, onMoveRight, onM
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
name
}}
.action"
:viewSubject=
"state.viewSubject"
:multiple=
"true"
:parent=
"mpickupView"
@
onCtrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
PickupViewPanel>
...
...
@@ -77,7 +78,7 @@ const { state, onCancel, onConfirm, onCtrlEvent, useSelections, onMoveRight, onM
</a-space>
</a-col>
<a-col
:span=
"5"
class=
"split__right"
>
<div
v-for=
"(item,index) in
useS
elections"
:key=
"index"
>
\{{item.srfmajortext}}
</div>
<div
v-for=
"(item,index) in
state.s
elections"
:key=
"index"
>
\{{item.srfmajortext}}
</div>
</a-col>
</a-row>
<template
v-slot:footer
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}-state.ts.hbs
浏览文件 @
3a8962fe
export const viewState = {
enableQuickSearch:
{{#if
page
.
enableQuickSearch
}}{{
page
.
enableQuickSearch
}}{{else}}
false
{{/if}}
,
expandSearchForm:
{{#if
page
.
expandSearchForm
}}{{
page
.
expandSearchForm
}}{{else}}
false
{{/if}}
,
expandSearchForm:
{{#if
page
.
expandSearchForm
}}{{
page
.
expandSearchForm
}}{{else}}
false
{{/if}}
,
gridRowActiveMode:
{{
page
.
gridRowActiveMode
}}
,
rowEditState:
{{#if
page
.
enableRowEdit
}}{{
page
.
rowEditDefault
}}{{else}}
false
{{/if}}
,
{{>
@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@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
浏览文件 @
3a8962fe
...
...
@@ -22,11 +22,13 @@ interface Props {
viewParams
?:
IParam
;
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
viewSubject
?:
Subject
<
IActionParam
>
;
selectedData
?:
string
;
selectedData
?:
string
;
multiple
?:
boolean
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
openType
:
'ROUTE'
,
openType
:
'ROUTE'
,
multiple
:
false
,
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
...
...
@@ -105,7 +107,7 @@ const { state, grid, onCtrlEvent, onQuickGroupEvent, onQuickSearchEvent } = pick
ref=
"grid"
name=
"
{{
name
}}
"
:context=
"state.context"
:multiple=
"
fals
e"
:multiple=
"
multipl
e"
:rowEditState=
"state.rowEditState"
:rowActiveMode=
"state.gridRowActiveMode"
:showBusyIndicator=
"true"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
浏览文件 @
3a8962fe
...
...
@@ -29,7 +29,7 @@ const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法
const
pickupView
=
new
PickupView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
onCancel
,
onConfirm
,
onCtrlEvent
,
selectData
}
=
pickupView
;
const
{
state
,
onCancel
,
onConfirm
,
onCtrlEvent
}
=
pickupView
;
</script>
<template>
...
...
@@ -57,7 +57,7 @@ const { state, onCancel, onConfirm, onCtrlEvent, selectData } = pickupView;
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
name
}}
.action"
:viewSubject=
"state.viewSubject"
:select
Data=
"select
Data"
:select
edData=
"state.selected
Data"
:parent=
"pickupView"
@
onCtrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
PickupViewPanel>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
浏览文件 @
3a8962fe
...
...
@@ -81,6 +81,7 @@ export const ctrlState = {
],
{{/if}}
items: [],
selections: [],
selectedRowKeys: [],
// 多数据部件分组
mdCtrlGroup: {
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
浏览文件 @
3a8962fe
...
...
@@ -14,7 +14,6 @@ interface Props {
multiple
?:
boolean
;
rowEditState
?:
boolean
;
rowActiveMode
?:
0
|
1
|
2
;
selectedData
?:
IParam
[];
selectFirstDefault
?:
boolean
;
controlAction
:
ControlAction
;
showBusyIndicator
?:
boolean
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@LIST}}-list/{{ctrls@LIST}}-list-state.ts.hbs
浏览文件 @
3a8962fe
...
...
@@ -45,6 +45,7 @@ export const ctrlState = {
appDeKeyFieldName: '
{{#if
ctrl
.
psAppDataEntity
.
keyPSAppDEField
}}{{
ctrl
.
psAppDataEntity
.
keyPSAppDEField
.
codeName
}}{{/if}}
',
appDeMajorFieldName: '
{{#if
ctrl
.
psAppDataEntity
.
majorPSAppDEField
}}{{
ctrl
.
psAppDataEntity
.
majorPSAppDEField
.
codeName
}}{{/if}}
',
controlService: new ListService
<ControlVO>
(ControlVO, new
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service() ),
selections: [],
dataItems: [
{{#if
ctrl
.
psDEListDataItems
}}
{{#
each
ctrl
.
psDEListDataItems
as
|
dataItem
|
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@LIST}}-list/{{ctrls@LIST}}-list.vue.hbs
浏览文件 @
3a8962fe
...
...
@@ -17,7 +17,6 @@ interface Props {
context
:
IContext
;
viewParams
:
IParam
;
multiple
?:
boolean
;
selectedData
?:
IParam
[];
selectFirstDefault
?:
boolean
;
controlAction
:
ControlAction
;
showBusyIndicator
?:
boolean
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel-state.ts.hbs
浏览文件 @
3a8962fe
export const ctrlState = {
appEntityCodeName: '
{{
ctrl
.
psAppDataEntity
.
codeName
}}
',
appDeCodeName:'
{{
ctrl
.
psAppDataEntity
.
codeName
}}
',
appDeLogicName: '
{{
ctrl
.
psAppDataEntity
.
logicName
}}
',
appDeKeyFieldName: '
{{#if
ctrl
.
psAppDataEntity
.
keyPSAppDEField
}}{{
ctrl
.
psAppDataEntity
.
keyPSAppDEField
.
codeName
}}{{/if}}
',
appDeMajorFieldName: '
{{#if
ctrl
.
psAppDataEntity
.
majorPSAppDEField
}}{{
ctrl
.
psAppDataEntity
.
majorPSAppDEField
.
codeName
}}{{/if}}
',
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
selectedData: [],
data: {},
};
\ No newline at end of file
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
浏览文件 @
3a8962fe
...
...
@@ -17,6 +17,7 @@ interface Props {
selectedData
?:
string
;
isShowButton
?:
boolean
;
viewSubject
:
Subject
<
IActionParam
>
;
multiple
?:
boolean
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
...
...
@@ -25,6 +26,7 @@ const props = withDefaults(defineProps < Props > (), {
isSingleSelect
:
false
,
isShowButton
:
true
,
showBusyIndicator
:
true
,
multiple
:
false
})
// emit声明
...
...
@@ -51,10 +53,11 @@ defineExpose({ name, state});
:isShowButton=
"state.isShowButton"
:selectedData=
"state.selectedData"
:viewSubject=
"state.viewSubject"
:multiple=
"multiple"
@
viewEvent=
"onViewEvent"
/>
{{else}}
{{else}}
<div
class=
"app-pickup-view-panel--empty"
>
视图不存在,请配置选择视图
</div>
{{/if}}
{{/if}}
</div>
</template>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree-state.ts.hbs
浏览文件 @
3a8962fe
...
...
@@ -225,5 +225,6 @@ export const ctrlState = {
echoSelectedNodes: [],
expandedKeys: [],
selectedKeys: [],
selectedNodes: []
selectedNodes: [],
selections: []
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree.vue.hbs
浏览文件 @
3a8962fe
...
...
@@ -8,7 +8,6 @@ interface Props {
name
:
string
,
parent
:
IParam
;
context
:
IContext
;
selectedData
?:
IParam
[];
selectFirstDefault
?:
boolean
;
isBranchAvailable
?:
boolean
;
viewParams
?:
IParam
;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录