Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
0ec874ff
提交
0ec874ff
编写于
3月 16, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
1、新增选择树视图支持 2、新增表单部件服务获取跨实体数据集方法 3、调整多数据视图部件事件处理逻辑 4、调整数据选择、自动填充编辑器数据记载逻辑 5、调整编辑器acParams和sort属性获取逻辑
上级
ef7c98ba
变更
27
隐藏空白字符变更
内嵌
并排
正在显示
27 个修改的文件
包含
469 行增加
和
229 行删除
+469
-229
auto-complete.hbs
...urces/templ/r7/@macro/front-end/editors/auto-complete.hbs
+7
-6
data-picker.hbs
...sources/templ/r7/@macro/front-end/editors/data-picker.hbs
+7
-6
list-box.hbs
.../resources/templ/r7/@macro/front-end/editors/list-box.hbs
+7
-3
app-auto-complete.vue
...app_{{apps}}/src/components/editors/app-auto-complete.vue
+26
-24
app-data-picker.vue
...7/app_{{apps}}/src/components/editors/app-data-picker.vue
+38
-21
app-stepper.vue
...pl/r7/app_{{apps}}/src/components/editors/app-stepper.vue
+83
-50
app-pickup-tree-view-layout.vue
...s}}/src/components/layout/app-pickup-tree-view-layout.vue
+33
-0
grid-view.ts
...pp_{{apps}}/src/core/modules/views/grid-view/grid-view.ts
+0
-14
index.ts
...ces/templ/r7/app_{{apps}}/src/core/modules/views/index.ts
+2
-1
md-view.ts
...r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
+7
-0
pickup-grid-view-prop.ts
...e/modules/views/pickup-grid-view/pickup-grid-view-prop.ts
+4
-4
pickup-grid-view-state.ts
.../modules/views/pickup-grid-view/pickup-grid-view-state.ts
+3
-3
pickup-grid-view.ts
...c/core/modules/views/pickup-grid-view/pickup-grid-view.ts
+5
-70
index.ts
...{{apps}}/src/core/modules/views/pickup-tree-view/index.ts
+3
-0
pickup-tree-view-prop.ts
...e/modules/views/pickup-tree-view/pickup-tree-view-prop.ts
+12
-0
pickup-tree-view-state.ts
.../modules/views/pickup-tree-view/pickup-tree-view-state.ts
+12
-0
pickup-tree-view.ts
...c/core/modules/views/pickup-tree-view/pickup-tree-view.ts
+29
-0
tree-view.ts
...pp_{{apps}}/src/core/modules/views/tree-view/tree-view.ts
+1
-17
exp-bar-control.ts
...c/core/modules/widgets/exp-bar-control/exp-bar-control.ts
+1
-1
list-control.ts
...s}}/src/core/modules/widgets/list-control/list-control.ts
+1
-1
tree-control.ts
...s}}/src/core/modules/widgets/tree-control/tree-control.ts
+6
-6
tree-exp-bar-control.ts
...ules/widgets/tree-exp-bar-control/tree-exp-bar-control.ts
+1
-1
edit-form-service.ts
...s}}/src/core/service/control-service/edit-form-service.ts
+53
-0
index.ts.hbs
...ws/{{appModules}}/{{pages@DEPICKUPTREEVIEW}}/index.ts.hbs
+3
-0
{{pages@DEPICKUPTREEVIEW}}-state.ts.hbs
...EPICKUPTREEVIEW}}/{{pages@DEPICKUPTREEVIEW}}-state.ts.hbs
+5
-0
{{pages@DEPICKUPTREEVIEW}}.vue.hbs
...ges@DEPICKUPTREEVIEW}}/{{pages@DEPICKUPTREEVIEW}}.vue.hbs
+119
-0
vite.config.ts
...e/src/main/resources/templ/r7/app_{{apps}}/vite.config.ts
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/auto-complete.hbs
浏览文件 @
0ec874ff
...
...
@@ -40,12 +40,12 @@
deMajorField=
"
{{
lowerCase
item
.
psEditor
.
psAppDataEntity
.
majorPSAppDEField
.
codeName
}}
"
deKeyField=
"
{{
lowerCase
item
.
psEditor
.
psAppDataEntity
.
keyPSAppDEField
.
codeName
}}
"
{{/if}}
{{#
if
item
.
psEditor
.
editorParams
.
acParams
}}
:acParams=
"
{
{
item
.
psEditor
.
editorParams
.
acParams
}
}
"
{{/
if
}}
{{#
if
item
.
psEditor
.
editorParams
.
sort
}}
sort=
"
{{
item
.
psEditor
.
editorParams
.
sort
}}
"
{{/
if
}}
{{#
and
item
.
psEditor
.
psAppDataEntity
item
.
psEditor
.
psAppDEDataSet
}}
:acParams=
"{
serviceName: '
{{
item
.
psEditor
.
psAppDataEntity
.
codeName
}}
', interfaceName: '
{{
item
.
psEditor
.
psAppDEDataSet
.
codeName
}}
'
}"
{{/
and
}}
{{#
and
item
.
psEditor
.
psAppDEACMode
item
.
psEditor
.
psAppDEACMode
.
minorSortPSAppDEField
}}
sort=
"
{{
lowerCase
item
.
psEditor
.
psAppDEACMode
.
minorSortPSAppDEField
}}
,
{{#if
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}{{
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}{{else}}
asc
{{/if
}}
"
{{/
and
}}
{{#if
item
.
psEditor
.
editorParams
.
defaultOpen
}}
:defaultOpen=
"
{{
item
.
psEditor
.
editorParams
.
defaultOpen
}}
"
{{/if}}
...
...
@@ -64,6 +64,7 @@
{{#
eq
item
.
psEditor
.
editorType
"AC_FS_NOBUTTON"
}}
:showButton=
"false"
{{/
eq
}}
:service=
"state.controlService"
{{#if
(
or
(
eq
ctrlType
'form'
)
(
eq
ctrlType
'panel'
))
}}
:value=
"state.data.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"onEditorEvent"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/data-picker.hbs
浏览文件 @
0ec874ff
...
...
@@ -44,12 +44,12 @@
pickUpView=
"
{{
item
.
psEditor
.
pickupPSAppView
.
codeName
}}
"
{{/if}}
{{!-- :linkView="getLinkView({{item.psEditor}})" --}}
{{#
if
item
.
psEditor
.
editorParams
.
acParams
}}
:acParams=
"
{
{
item
.
psEditor
.
editorParams
.
acParams
}
}
"
{{/
if
}}
{{#
if
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}
sort=
"
{{
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}
"
{{/
if
}}
{{#
and
item
.
psEditor
.
psAppDataEntity
item
.
psEditor
.
psAppDEDataSet
}}
:acParams=
"{
serviceName: '
{{
item
.
psEditor
.
psAppDataEntity
.
codeName
}}
', interfaceName: '
{{
item
.
psEditor
.
psAppDEDataSet
.
codeName
}}
'
}"
{{/
and
}}
{{#
and
item
.
psEditor
.
psAppDEACMode
item
.
psEditor
.
psAppDEACMode
.
minorSortPSAppDEField
}}
sort=
"
{{
lowerCase
item
.
psEditor
.
psAppDEACMode
.
minorSortPSAppDEField
}}
,
{{#if
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}{{
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}{{else}}
asc
{{/if
}}
"
{{/
and
}}
{{#if
item
.
psEditor
.
editorParams
.
pickUpData
}}
pickUpData=
"
{{
item
.
psEditor
.
editorParams
.
pickUpData
}}
"
{{/if}}
...
...
@@ -65,6 +65,7 @@
{{#if
(
or
(
eq
item
.
psEditor
.
editorType
"ADDRESSPICKUP"
)
(
eq
item
.
psEditor
.
editorType
"ADDRESSPICKUP_AC"
))
}}
:multiple=
"true"
{{/if}}
:service=
"state.controlService"
{{#if
(
or
(
eq
ctrlType
'form'
)
(
eq
ctrlType
'panel'
))
}}
:value=
"state.data.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"onEditorEvent"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/list-box.hbs
浏览文件 @
0ec874ff
...
...
@@ -19,9 +19,12 @@
{{#if
item
.
psEditor
.
editorParams
.
valueType
}}
:valueType=
"
{{
item
.
psEditor
.
editorParams
.
valueType
}}
"
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
acParams
}}
:acParams=
"
{{
item
.
psEditor
.
editorParams
.
acParams
}}
"
{{/if}}
{{#
and
item
.
psEditor
.
psAppDataEntity
item
.
psEditor
.
psAppDEDataSet
}}
:acParams=
"{ serviceName: '
{{
item
.
psEditor
.
psAppDataEntity
.
codeName
}}
', interfaceName: '
{{
item
.
psEditor
.
psAppDEDataSet
.
codeName
}}
' }"
{{/
and
}}
{{#
and
item
.
psEditor
.
psAppDEACMode
item
.
psEditor
.
psAppDEACMode
.
minorSortPSAppDEField
}}
sort=
"
{{
lowerCase
item
.
psEditor
.
psAppDEACMode
.
minorSortPSAppDEField
}}
,
{{#if
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}{{
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}{{else}}
asc
{{/if}}
"
{{/
and
}}
{{#if
item
.
psEditor
.
editorParams
.
multiple
}}
:multiple=
"
{{
item
.
psEditor
.
editorParams
.
multiple
}}
"
{{/if}}
...
...
@@ -54,6 +57,7 @@
{{/if}}
:context=
"state.context"
:viewParams=
"state.viewParams"
:service=
"state.controlService"
{{#if
(
or
(
eq
ctrlType
'form'
)
(
eq
ctrlType
'panel'
))
}}
:value=
"state.data.
{{
item
.
psEditor
.
name
}}
"
@
editorEvent=
"onEditorEvent"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/app-auto-complete.vue
浏览文件 @
0ec874ff
...
...
@@ -45,12 +45,12 @@ interface AutoCompleteProps {
/**
* @description 主信息属性
*/
deMajorField
?
:
string
;
deMajorField
:
string
;
/**
* @description 主键属性
*/
deKeyField
?
:
string
;
deKeyField
:
string
;
/**
* @description ac参数
...
...
@@ -86,6 +86,11 @@ interface AutoCompleteProps {
* @description 只读
*/
readonly
?:
boolean
;
/**
* @description 部件服务
*/
service
?:
any
;
}
interface
EditorEmit
{
(
name
:
"editorEvent"
,
value
:
IActionParam
):
void
;
...
...
@@ -108,31 +113,28 @@ let items: Ref<any[]> = ref([]);
* @param value 搜索值
*/
const
onSearch
=
(
value
:
string
)
=>
{
le
t
_navContext
=
deepCopy
(
navContext
);
le
t
_navViewParam
=
deepCopy
(
navViewParam
);
cons
t
_navContext
=
deepCopy
(
navContext
);
cons
t
_navViewParam
=
deepCopy
(
navViewParam
);
Object
.
assign
(
_navViewParam
,
{
query
:
value
,
size
:
1000
});
if
(
props
.
sort
)
{
Object
.
assign
(
_navViewParam
,
{
sort
:
props
.
sort
});
}
// TODO数据服务请求数据
items
.
value
=
[
{
srfkey
:
"4646"
,
srfmajortext
:
"Jack"
,
},
{
srfkey
:
"49897"
,
srfmajortext
:
"Lucy"
,
},
{
srfkey
:
"164646"
,
srfmajortext
:
"Disabled"
,
},
{
srfkey
:
"4646"
,
srfmajortext
:
"Yiminghe"
,
},
];
if
(
!
props
.
service
)
{
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
'部件服务不存在'
});
}
else
if
(
!
props
.
acParams
)
{
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
});
})
}
};
const
filterOption
=
(
inputValue
:
string
,
option
:
IParam
)
=>
{
...
...
@@ -165,7 +167,7 @@ const onSelect = (value: any) => {
:defaultOpen="true"
>
<template
#
option=
"option"
>
<div
@
click=
"onSelect(option[deKeyField!])"
>
\
{{
option
[
deMajorField
!
]
}}
</div>
<div
@
click=
"onSelect(option[deKeyField!])"
>
{{
option
[
deMajorField
!
]
}}
</div>
</
template
>
<a-input
:placeholder=
"placeholder"
>
<
template
#
suffix
><search-outlined
v-if=
"showButton"
class=
"certain-category-icon"
/></
template
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/app-data-picker.vue
浏览文件 @
0ec874ff
...
...
@@ -61,12 +61,12 @@ interface DataPickerProps {
/**
* @description 主信息属性
*/
deMajorField
?
:
string
;
deMajorField
:
string
;
/**
* @description 主键属性
*/
deKeyField
?
:
string
;
deKeyField
:
string
;
/**
* @description 选择视图
...
...
@@ -93,19 +93,39 @@ interface DataPickerProps {
*/
separator
?:
string
;
/**
* @description 部件服务
*/
service
?:
any
;
/**
* @description 外键值附加数据
*/
pickUpData
?:
string
;
/**
* @description 仅链接
*/
linkOnly
?:
boolean
;
/**
* @description 支持AC
*/
isAC
?:
boolean
;
/**
* @description 无AC
*/
noAc
?:
boolean
;
/**
* @description 显示按钮
*/
showButton
?:
boolean
;
/**
* @description 是否下拉
*/
isDropdown
?:
boolean
;
}
interface
EditorEmit
{
...
...
@@ -174,25 +194,22 @@ const onSearch = (value: string) => {
if
(
props
.
sort
)
{
Object
.
assign
(
_navViewParam
,
{
sort
:
props
.
sort
});
}
// TODO数据服务请求数据
items
.
value
=
[
{
[
props
.
deKeyField
]:
'4646'
,
[
props
.
deMajorField
]:
'Jack'
,
},
{
[
props
.
deKeyField
]:
'49897'
,
[
props
.
deMajorField
]:
'Lucy'
,
},
{
[
props
.
deKeyField
]:
'164646'
,
[
props
.
deMajorField
]:
'Disabled'
,
},
{
[
props
.
deKeyField
]:
'4646'
,
[
props
.
deMajorField
]:
'Yiminghe'
,
},
];
if
(
!
props
.
service
)
{
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
'部件服务不存在'
});
}
else
if
(
!
props
.
acParams
)
{
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
});
})
}
};
const
filterOption
=
(
inputValue
:
string
,
option
:
IParam
)
=>
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/app-stepper.vue
浏览文件 @
0ec874ff
<
template
>
<div
class=
"app-stepper"
>
<a-input
:value=
"result"
:min=
"min"
:max=
"max"
:step=
"step"
:precision=
"precision"
:disabled=
"disabled || readonly"
>
<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>
</div>
</template>
<
script
setup
lang=
"ts"
>
import
{
IActionParam
}
from
"@core"
;
interface
StepperProps
{
import
{
IContext
,
IParam
,
IActionParam
}
from
'@core'
;
interface
IStepProps
{
/**
* 传入值
* @type {
any
}
* @memberof AppS
lid
er
* @type {
number
}
* @memberof AppS
tepp
er
*/
value
?
:
number
;
value
:
number
;
/**
* 是否禁用
* @type {Boolean}
* @memberof AppStepper
*/
disabled
?:
Boolean
;
/**
* 属性项名称
*
...
...
@@ -19,87 +38,101 @@ interface StepperProps {
/**
* 数值精度
* @type {number}
* @memberof AppS
lid
er
* @memberof AppS
tepp
er
*/
precision
?:
number
;
/**
* 步长
* @type {number}
* @memberof AppS
lid
er
* @memberof AppS
tepp
er
*/
step
?:
number
;
/**
* 最小值
* @type {number}
* @memberof AppS
lid
er
* @memberof AppS
tepp
er
*/
min
?:
number
;
/**
* 最大值
* @type {number}
* @memberof AppS
lid
er
* @memberof AppS
tepp
er
*/
max
?:
number
;
/**
*
只读模式
*
* @
type {boolean}
*
应用上下文
*
@type {IContext}
* @
memberof AppStepper
*/
readonly
?:
boolean
;
context
:
IContext
;
/**
*
是否禁用
* @type {
boolean
}
* @memberof AppS
lid
er
*
视图导航参数
* @type {
IParam
}
* @memberof AppS
tepp
er
*/
disabled
?:
boolean
;
}
interface
EditorEmit
{
(
name
:
"editorEvent"
,
value
:
IActionParam
):
void
;
viewParams
:
IParam
;
}
const
props
=
withDefaults
(
defineProps
<
StepperProps
>
(),
{
const
props
=
withDefaults
(
defineProps
<
IStepProps
>
(),
{
step
:
1
,
disabled
:
false
,
readonly
:
false
,
precision
:
0
min
:
0
,
max
:
100
,
});
interface
EditorEmit
{
(
name
:
'editorEvent'
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
EditorEmit
>
();
const
onChange
=
(
value
:
number
)
=>
{
emit
(
"editorEvent"
,
{
emit
(
'editorEvent'
,
{
tag
:
props
.
name
,
action
:
"valueChange"
,
action
:
'valueChange'
,
data
:
value
,
});
};
</
script
>
const
result
=
computed
({
get
:
()
=>
(
props
.
value
?
props
.
value
:
0
),
set
:
val
=>
{
if
(
val
>
props
.
max
)
{
onChange
(
props
.
max
);
}
else
if
(
val
<
props
.
min
)
{
onChange
(
props
.
min
);
}
else
{
onChange
(
val
);
}
},
});
<
template
>
<div
:class=
"['app-editor-container', 'app-stepper', `app-stepper-$
{name}`]">
<a-input-number
:value=
"value"
:min=
"min"
:max=
"max"
:step=
"step"
:precision=
"precision"
:disabled=
"disabled || readonly"
@
change=
"onChange"
/>
</div>
</
template
>
// 减少
const
btnReduce
=
()
=>
{
result
.
value
-=
props
.
step
;
};
// 增加
const
btnIcrease
=
()
=>
{
result
.
value
+=
props
.
step
;
};
</
script
>
<
style
scoped
>
.app-editor-container
{
width
:
100%
;
height
:
100%
;
}
.app-editor-container
.ant-input-number
{
width
:
100%
;
<
style
lang=
"scss"
>
.app-stepper
{
.ant-btn
{
width
:
30px
;
height
:
28px
;
padding
:
0
;
&
:hover
,
&
:focus
{
background
:
transparent
;
}
}
.ant-input-group-addon
{
padding
:
0
;
}
.ant-input
{
text-align
:
center
;
}
}
</
style
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/app-pickup-tree-view-layout.vue
0 → 100644
浏览文件 @
0ec874ff
<
script
setup
lang=
"ts"
>
</
script
>
<
template
>
<AppViewBaseLayout>
<template
v-slot:header-top
>
<slot
name=
"topMessage"
/>
</
template
>
<
template
v-slot:header-left
>
<slot
name=
"caption"
/>
</
template
>
<
template
v-slot:header-content
>
<slot
name=
"quickGroupSearch"
/>
<slot
name=
"quickSearch"
/>
</
template
>
<
template
v-slot:header-right
>
<slot
name=
"toolbar"
/>
</
template
>
<
template
v-slot:header-bottom
>
<slot
name=
"quickSearchForm"
/>
<slot
name=
"searchForm"
/>
</
template
>
<
template
v-slot:body-top
>
<slot
name=
"bodyMessage"
/>
</
template
>
<slot
/>
<
template
v-slot:footer-content
>
<slot
name=
"bottomMessage"
/>
<slot
name=
"footer"
/>
</
template
>
</AppViewBaseLayout>
</template>
\ 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
浏览文件 @
0ec874ff
...
...
@@ -35,20 +35,6 @@ public declare state: GridViewState;
this
.
grid
=
ref
(
null
);
}
/**
* 处理部件事件
*
* @param {IActionParam} actionParam
* @memberof MDView
*/
public
onCtrlEvent
(
actionParam
:
IActionParam
)
{
super
.
onCtrlEvent
(
actionParam
);
const
{
tag
,
action
,
data
}
=
actionParam
;
if
(
Object
.
is
(
tag
,
'grid'
))
{
this
.
MDCtrlEvent
(
action
,
data
);
}
}
/**
* 获取多数据部件
*
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/index.ts
浏览文件 @
0ec874ff
...
...
@@ -13,4 +13,5 @@ export * from './tree-view'
export
*
from
'./portal-view'
export
*
from
'./tab-exp-view'
export
*
from
'./list-view'
export
*
from
'./panel-view'
\ No newline at end of file
export
*
from
'./panel-view'
export
*
from
'./pickup-tree-view'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
浏览文件 @
0ec874ff
...
...
@@ -96,6 +96,13 @@ export class MDView extends MainView {
if
(
Object
.
is
(
tag
,
'searchform'
)
||
Object
.
is
(
tag
,
'quicksearchform'
))
{
this
.
handleSearchFormEvent
(
action
,
data
);
}
if
(
Object
.
is
(
tag
,
this
.
state
.
xDataControlName
))
{
this
.
MDCtrlEvent
(
action
,
data
);
// selectionChange视图抛出(用于适配选择面板)
if
(
action
===
'selectionChange'
)
{
this
.
emit
(
'viewEvent'
,
actionParam
)
}
}
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-grid-view/pickup-grid-view-prop.ts
浏览文件 @
0ec874ff
import
{
Main
ViewProps
}
from
"@core"
;
import
{
Grid
ViewProps
}
from
"@core"
;
/**
* @description 选择视图props
* @description 选择
表格
视图props
* @export
* @interface PickupGridViewProps
* @extends {
Main
ViewProps}
* @extends {
Grid
ViewProps}
*/
export
interface
PickupGridViewProps
extends
MainViewProps
{
}
\ No newline at end of file
export
interface
PickupGridViewProps
extends
GridViewProps
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-grid-view/pickup-grid-view-state.ts
浏览文件 @
0ec874ff
import
{
ControlAction
,
Main
ViewState
}
from
'@core'
;
import
{
Grid
ViewState
}
from
'@core'
;
/**
* @description 选择视图状态
* @export
* @interface PickupGridViewState
* @extends {
ViewStateBas
e}
* @extends {
GridViewStat
e}
*/
export
interface
PickupGridViewState
extends
Main
ViewState
{
export
interface
PickupGridViewState
extends
Grid
ViewState
{
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-grid-view/pickup-grid-view.ts
浏览文件 @
0ec874ff
import
{
IActionParam
,
IParam
}
from
"@core"
;
import
{
MDView
}
from
"../md-view"
;
import
{
GridView
}
from
"../grid-view"
;
import
{
PickupGridViewProps
}
from
"./pickup-grid-view-prop"
;
import
{
PickupGridViewState
}
from
"./pickup-grid-view-state"
;
...
...
@@ -9,7 +8,7 @@ import { PickupGridViewState } from "./pickup-grid-view-state";
* @class PickupGridView
* @extends {MainView}
*/
export
class
PickupGridView
extends
MD
View
{
export
class
PickupGridView
extends
Grid
View
{
/**
* @description 视图状态
...
...
@@ -19,74 +18,10 @@ export class PickupGridView extends MDView {
public
declare
state
:
PickupGridViewState
;
/**
* 当前视图表格部件
*
* @type {IParam}
* @description 视图输入参数
* @type {PickupGridViewProps}
* @memberof PickupGridView
*/
public
declare
grid
:
IParam
;
public
declare
props
:
PickupGridViewProps
;
/**
* @description 处理视图初始化
*
* @memberof PickupGridView
*/
public
useViewInit
()
{
super
.
useViewInit
();
// 初始化搜索表格引用
this
.
grid
=
ref
(
null
);
}
/**
* @description 使用加载功能模块
* @param {PickupGridViewProps} props 传入的props
* @memberof PickupGridView
*/
public
useLoad
(
props
:
PickupGridViewProps
)
{
const
{
viewSubject
}
=
this
.
state
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
'grid'
,
action
:
"load"
,
data
:
{}
})
})
}
/**
* 部件事件
*
* @param {IActionParam} actionParam
* @memberof PickupGridView
*/
public
onCtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
if
(
tag
!==
'grid'
)
{
return
;
}
if
(
action
===
'selectionChange'
)
{
this
.
emit
(
'viewEvent'
,
actionParam
)
}
}
/**
* 获取多数据部件
*
* @return {*} {*}
* @memberof PickupGridView
*/
public
getMDCtrl
():
any
{
return
unref
(
this
.
grid
);
}
/**
* @description 安装视图所有功能模块的方法
* @param {PickupGridViewProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof PickupGridView
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
grid
:
this
.
grid
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-tree-view/index.ts
0 → 100644
浏览文件 @
0ec874ff
export
*
from
'./pickup-tree-view-prop'
export
*
from
'./pickup-tree-view-state'
export
*
from
'./pickup-tree-view'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-tree-view/pickup-tree-view-prop.ts
0 → 100644
浏览文件 @
0ec874ff
import
{
TreeViewProps
}
from
"../tree-view"
;
/**
* 选择树视图输入参数
*
* @export
* @interface PickupTreeViewProps
* @extends {TreeViewProps}
*/
export
interface
PickupTreeViewProps
extends
TreeViewProps
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-tree-view/pickup-tree-view-state.ts
0 → 100644
浏览文件 @
0ec874ff
import
{
TreeViewState
}
from
"../tree-view"
;
/**
* 选择树视图状态
*
* @export
* @interface PickupTreeViewState
* @extends {TreeViewState}
*/
export
interface
PickupTreeViewState
extends
TreeViewState
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-tree-view/pickup-tree-view.ts
0 → 100644
浏览文件 @
0ec874ff
import
{
TreeView
}
from
"../tree-view"
;
import
{
PickupTreeViewProps
}
from
"./pickup-tree-view-prop"
;
import
{
PickupTreeViewState
}
from
"./pickup-tree-view-state"
;
/**
* 选择树视图
*
* @export
* @class PickupTreeView
* @extends {TreeView}
*/
export
class
PickupTreeView
extends
TreeView
{
/**
* 选择树视图状态
*
* @type {PickupTreeViewState}
* @memberof PickupTreeView
*/
public
declare
state
:
PickupTreeViewState
;
/**
* 选择树视图输入参数
*
* @type {PickupTreeViewProps}
* @memberof PickupTreeView
*/
public
declare
props
:
PickupTreeViewProps
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/tree-view/tree-view.ts
浏览文件 @
0ec874ff
import
{
I
ActionParam
,
I
Param
,
MDView
}
from
"@core"
;
import
{
IParam
,
MDView
}
from
"@core"
;
import
{
TreeViewState
}
from
"./tree-view-state"
;
/**
...
...
@@ -31,22 +31,6 @@ export class TreeView extends MDView {
this
.
tree
=
ref
(
null
);
}
/**
* 处理部件事件
*
* @param {IActionParam} actionParam
* @memberof TreeView
*/
public
onCtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
const
{
xDataControlName
}
=
this
.
state
;
if
(
Object
.
is
(
tag
,
xDataControlName
))
{
this
.
MDCtrlEvent
(
action
,
data
);
return
;
}
super
.
onCtrlEvent
(
actionParam
);
}
/**
* 获取多数据部件
*
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/exp-bar-control/exp-bar-control.ts
浏览文件 @
0ec874ff
...
...
@@ -48,7 +48,7 @@ export class ExpBarControl extends MainControl {
public
onCtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
switch
(
action
)
{
case
'selection
c
hange'
:
case
'selection
C
hange'
:
this
.
onSelectionChange
(
data
);
break
;
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/list-control/list-control.ts
浏览文件 @
0ec874ff
...
...
@@ -207,7 +207,7 @@ export class ListControl extends MDControl {
}
selectedData
.
value
.
push
(
item
);
}
this
.
emit
(
'ctrlEvent'
,
{
tag
:
this
.
props
.
name
,
action
:
'selection
change'
,
data
:
selectedData
});
this
.
emit
(
'ctrlEvent'
,
{
tag
:
this
.
props
.
name
,
action
:
'selection
Change'
,
data
:
selectedData
.
value
});
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tree-control/tree-control.ts
浏览文件 @
0ec874ff
...
...
@@ -38,7 +38,7 @@ export class TreeControl extends MDControl {
}
const
{
isBranchAvailable
,
currentSelectedNode
,
isMultiple
}
=
this
.
state
;
let
{
selectedNodes
}
=
this
.
state
;
if
(
isBranchAvailable
&&
e
.
node
.
isLeaf
)
{
if
(
isBranchAvailable
||
e
.
node
.
isLeaf
)
{
if
(
currentSelectedNode
.
value
&&
Object
.
keys
(
currentSelectedNode
.
value
).
length
>
0
)
{
currentSelectedNode
.
value
.
srfchecked
=
0
;
}
...
...
@@ -47,7 +47,7 @@ export class TreeControl extends MDControl {
// 多选树树选中不识别,使用checkbox多选
if
(
!
isMultiple
)
{
selectedNodes
=
[
currentSelectedNode
.
value
];
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
'selection
c
hange'
,
data
:
deepCopy
(
selectedNodes
)
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
'selection
C
hange'
,
data
:
deepCopy
(
selectedNodes
)
});
}
}
}
...
...
@@ -359,7 +359,7 @@ export class TreeControl extends MDControl {
if
(
isBranchAvailable
||
defaultData
.
isLeaf
)
{
selectedNodes
.
splice
(
0
,
selectedNodes
.
length
);
selectedNodes
.
push
(
currentSelectedNode
.
value
);
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selection
c
hange"
,
data
:
selectedNodes
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selection
C
hange"
,
data
:
selectedNodes
});
}
}
}
...
...
@@ -378,7 +378,7 @@ export class TreeControl extends MDControl {
selectedKeys
.
splice
(
0
,
selectedKeys
.
length
);
selectedKeys
.
push
(
defualtSelect
.
id
);
}
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selection
c
hange"
,
data
:
selectedNodes
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selection
C
hange"
,
data
:
selectedNodes
});
}
// 回显已选数据
if
(
echoSelectedNodes
&&
echoSelectedNodes
.
length
>
0
)
{
...
...
@@ -388,7 +388,7 @@ export class TreeControl extends MDControl {
val
.
used
=
true
;
selectedNodes
.
push
(
val
);
selectedKeys
.
push
(
val
.
id
);
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selection
c
hange"
,
data
:
selectedNodes
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"selection
C
hange"
,
data
:
selectedNodes
});
return
true
;
}
})
...
...
@@ -421,7 +421,7 @@ export class TreeControl extends MDControl {
selectedNodes
.
push
(
node
);
selectedKeys
.
push
(
node
.
id
);
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
'selection
c
hange'
,
data
:
selectedNodes
});
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
'selection
C
hange'
,
data
:
selectedNodes
});
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tree-exp-bar-control/tree-exp-bar-control.ts
浏览文件 @
0ec874ff
...
...
@@ -111,7 +111,7 @@ export class TreeExpBarControl extends ExpBarControl {
* @description 计算导航参数
* @protected
* @param {*} arg
* @return {*}
\
{{ tempContext: any, tempViewParams: any }}
* @return {*} {{ tempContext: any, tempViewParams: any }}
* @memberof TreeExpBarControl
*/
protected
computeNavParams
(
arg
:
any
):
{
tempContext
:
any
,
tempViewParams
:
any
}
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/service/control-service/edit-form-service.ts
浏览文件 @
0ec874ff
...
...
@@ -125,4 +125,57 @@ export class EditFormService<T extends ControlVOBase> extends ControlServiceBase
public
getRemoteCopyData
()
{
// return this.remoteCopyData;
}
/**
* 获取跨实体数据集合
*
* @param {string} entityKey 实体标识
* @param {string} interfaceName 行为标识
* @param {*} [context={}] 应用上下文
* @param {*} [data={}] 参数
* @return {*} {Promise<any>}
* @memberof EditFormService
*/
getItems
(
entityKey
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
=
{}):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
App
.
getDataService
(
entityKey
.
toLowerCase
(),
context
).
then
((
service
:
any
)
=>
{
if
(
service
&&
hasFunction
(
service
,
interfaceName
))
{
resolve
(
this
.
doItems
(
service
[
interfaceName
](
context
,
data
),
service
.
appEntityKeyCodeName
,
service
.
appEntityCodeName
));
}
else
{
resolve
([]);
}
}).
catch
((
error
:
any
)
=>
{
resolve
([]);
});
})
}
/**
* 处理跨实体数据
*
* @param {Promise<any>} promise
* @param {string} deKeyField 实体主键
* @param {string} deName 实体标识
* @return {*}
* @memberof EditFormService
*/
doItems
(
promise
:
Promise
<
any
>
,
deKeyField
:
string
,
deName
:
string
)
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
promise
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
items
:
any
[]
=
[];
response
.
data
.
forEach
((
item
:
any
)
=>
{
item
=
this
.
newControlVO
(
item
);
item
[
deName
]
=
item
[
deKeyField
];
items
.
push
(
item
);
});
resolve
(
items
);
}
else
{
resolve
([]);
}
}).
catch
((
error
:
any
)
=>
{
resolve
([]);
});
});
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPTREEVIEW}}/index.ts.hbs
0 → 100644
浏览文件 @
0ec874ff
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@DEPICKUPTREEVIEW}}/{{pages@DEPICKUPTREEVIEW}}-state.ts.hbs
0 → 100644
浏览文件 @
0ec874ff
export const viewState = {
enableQuickSearch:
{{#if
page
.
enableQuickSearch
}}{{
page
.
enableQuickSearch
}}{{else}}
false
{{/if}}
,
expandSearchForm:
{{#if
page
.
expandSearchForm
}}{{
page
.
expandSearchForm
}}{{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@DEPICKUPTREEVIEW}}/{{pages@DEPICKUPTREEVIEW}}.vue.hbs
0 → 100644
浏览文件 @
0ec874ff
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
FilterOutlined
}
from
'@ant-design/icons-vue'
;
import
{
PickupTreeView
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
import
{
viewState
}
from
'./
{{
spinalCase
page
.
codeName
}}
-state'
;
{{#
each
page
.
ctrls
as
|
control
|
}}
{{#if
(
eq
control
.
controlType
'TREEVIEW'
)
}}
import
{
{{
control
.
codeName
}}
Tree
}
from
'@widgets/
{{
spinalCase
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-tree'
;
{{/if}}
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'searchform'
))
}}
import
{
{{
codeName
}}
SearchForm
}
from
'@widgets/
{{
spinalCase
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-search-form'
;
{{/if}}
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'quicksearchform'
))
}}
import
{
{{
codeName
}}
QuickSearchForm
}
from
'@widgets/
{{
spinalCase
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-quick-search-form'
;
{{/if}}
{{/
each
}}
// props声明和默认值处理
interface
Props
{
context
?:
IContext
;
viewParams
?:
IParam
;
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
viewSubject
?:
Subject
<
IActionParam
>
;
selectedData
?:
string
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
openType
:
'ROUTE'
,
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
// emit声明
interface
ViewEmit
{
(
name
:
"viewEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
pickupTreeView
=
new
PickupTreeView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
tree
,
onCtrlEvent
,
onQuickGroupEvent
,
onQuickSearchEvent
}
=
pickupTreeView
;
</script>
<template>
<AppPickupTreeViewLayout
:class=
"['app-pickup-tree-view', state.viewSysCss]"
>
<template
v-slot:header-left
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
{{#if
page
.
enableQuickGroup
}}
<template
v-slot:quickGroupSearch
>
<AppQuickGroup
v-if=
"state.enableQuickGroup"
:quickGroupModel=
"state.quickGroupPSCodeList"
:context=
"state.context"
:viewParams=
"state.viewParams"
@
onQuickGroupEvent=
"onQuickGroupEvent"
/>
</template>
{{/if}}
{{#
page
.
ctrls
}}
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'searchform'
))
}}
{{#if
page
.
enableFilter
}}
<template
v-slot:quickSearch
>
<div
class=
'app-quick-search'
>
<a-input
v-if=
"state.enableQuickSearch"
@
pressEnter=
"onQuickSearchEvent($event)"
allowClear
/>
<a-popover
trigger=
"click"
:overlayStyle=
"{width: '50%'}"
>
<template
#
content
>
<
{{
codeName
}}
SearchForm
v-if=
"state.expandSearchForm"
name=
"
{{
name
}}
"
:context=
"state.context"
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
<a-button><filter-outlined
/></a-button>
</a-popover>
</div>
</template>
{{else}}
<template
v-slot:searchForm
>
<
{{
codeName
}}
SearchForm
v-if=
"state.expandSearchForm"
name=
"
{{
name
}}
"
:context=
"state.context"
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
{{/if}}
{{/if}}
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'quicksearchform'
))
}}
<template
v-slot:quickSearchForm
>
<
{{
codeName
}}
QuickSearchForm
name=
"
{{
name
}}
"
:context=
"state.context"
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
QuickSearchForm>
</template>
{{/if}}
{{#
eq
controlType
"TREEVIEW"
}}
<
{{
codeName
}}
Tree
ref=
"tree"
name=
"
{{
name
}}
"
:multiple=
"false"
:context=
"state.context"
:showBusyIndicator=
"true"
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
name
}}
.action"
:viewSubject=
"state.viewSubject"
:parent=
"pickupTreeView"
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
Tree>
{{/
eq
}}
{{/
page
.
ctrls
}}
</AppPickupTreeViewLayout>
</template>
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/vite.config.ts
浏览文件 @
0ec874ff
...
...
@@ -27,7 +27,7 @@ export default defineConfig({
server
:
{
proxy
:
{
'/api'
:
{
target
:
'http://1
0.19.1.128
:8080'
,
target
:
'http://1
72.16.100.209
:8080'
,
changeOrigin
:
true
,
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
api/
,
''
)
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录