Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
e2d51c27
提交
e2d51c27
编写于
3月 22, 2022
作者:
邱定凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 更新模板
上级
a3955eaa
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
81 行增加
和
50 行删除
+81
-50
checkbox-list.hbs
...urces/templ/r7/@macro/front-end/editors/checkbox-list.hbs
+11
-1
dropdown-list.hbs
...urces/templ/r7/@macro/front-end/editors/dropdown-list.hbs
+8
-2
list-box.hbs
.../resources/templ/r7/@macro/front-end/editors/list-box.hbs
+13
-9
radio-group.hbs
...sources/templ/r7/@macro/front-end/editors/radio-group.hbs
+1
-1
raw.hbs
.../main/resources/templ/r7/@macro/front-end/editors/raw.hbs
+16
-9
app-list-box.vue
...l/r7/app_{{apps}}/src/components/editors/app-list-box.vue
+29
-25
app-radio-group.vue
...7/app_{{apps}}/src/components/editors/app-radio-group.vue
+3
-3
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/checkbox-list.hbs
浏览文件 @
e2d51c27
...
...
@@ -23,7 +23,17 @@
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{#if
item
.
psEditor
.
readOnly
}}
:readonly=
"
{{
item
.
psEditor
.
readOnly
}}
"
:readOnly=
"
{{
item
.
psEditor
.
readOnly
}}
"
{{/if}}
{{#if
item
.
psEditor
.
editorParams
}}
{{#
jsonParse
item
.
psEditor
.
editorParams
}}
{{#if
mode
}}
:mode=
"
{{
mode
}}
"
{{/if}}
{{#if
valueType
}}
:valueType=
"
{{
valueType
}}
"
{{/if}}
{{/
jsonParse
}}
{{/if}}
{{#if
item
.
psEditor
.
psAppCodeList
}}
codeListTag=
"
{{
item
.
psEditor
.
psAppCodeList
.
codeListTag
}}
"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/dropdown-list.hbs
浏览文件 @
e2d51c27
...
...
@@ -31,9 +31,15 @@
{{else
if
(
eq
ctrlType
'panel'
)
}}
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
multiple
}}
:multiple=
"
{{
item
.
psEditor
.
editorParams
.
multiple
}}
"
{{#
eq
item
.
psEditor
.
editorType
"DROPDOWNLIST"
}}
{{#if
item
.
psEditor
.
editorParams
}}
{{#
jsonParse
item
.
psEditor
.
editorParams
}}
{{#if
multiple
}}
:multiple=
"
{{
multiple
}}
"
{{/if}}
{{/
jsonParse
}}
{{/if}}
{{/
eq
}}
{{#if
item
.
psEditor
.
psNavigateContexts
}}
:localContext=
"
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
item
.
psEditor
.
psNavigateContexts
}}
"
{{/if}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/list-box.hbs
浏览文件 @
e2d51c27
...
...
@@ -13,20 +13,24 @@
:deMajorField=
"state.appDeMajorFieldName"
:deKeyField=
"state.appDeKeyFieldName"
editorType=
'
{{
item
.
psEditor
.
editorType
}}
'
{{#if
item
.
psEditor
.
editorParams
.
mode
}}
:mode=
"
{{
item
.
psEditor
.
editorParams
.
mode
}}
"
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
valueType
}}
:valueType=
"
{{
item
.
psEditor
.
editorParams
.
valueType
}}
"
{{/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
item
.
psEditor
.
editorParams
}}
{{#
jsonParse
item
.
psEditor
.
editorParams
}}
{{#if
mode
}}
:mode=
"
{{
mode
}}
"
{{/if}}
{{#if
valueType
}}
:valueType=
"
{{
valueType
}}
"
{{/if}}
{{#if
multiple
}}
:multiple=
"
{{
multiple
}}
"
{{/if}}
{{/
jsonParse
}}
{{/if}}
{{#if
(
eq
ctrlType
'form'
)
}}
:disabled=
"state.detailsModel.
{{
item
.
codeName
}}
.disabled"
...
...
@@ -42,7 +46,7 @@
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{#if
item
.
psEditor
.
readOnly
}}
:read
o
nly=
"
{{
item
.
psEditor
.
readOnly
}}
"
:read
O
nly=
"
{{
item
.
psEditor
.
readOnly
}}
"
{{/if}}
{{#if
item
.
psEditor
.
psAppCodeList
}}
codeListTag=
"
{{
item
.
psEditor
.
psAppCodeList
.
codeListTag
}}
"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/radio-group.hbs
浏览文件 @
e2d51c27
...
...
@@ -28,7 +28,7 @@
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{#if
item
.
psEditor
.
readOnly
}}
:read
o
nly=
"
{{
item
.
psEditor
.
readOnly
}}
"
:read
O
nly=
"
{{
item
.
psEditor
.
readOnly
}}
"
{{/if}}
{{#if
item
.
psEditor
.
psNavigateContexts
}}
:localContext=
"
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
item
.
psEditor
.
psNavigateContexts
}}
"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/raw.hbs
浏览文件 @
e2d51c27
...
...
@@ -22,16 +22,23 @@
{{else
if
(
eq
ctrlType
'panel'
)
}}
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
contentType
}}
contentType=
"
{{
item
.
psEditor
.
editorParams
.
contentType
}}
"
{{else}}
{{#if
item
.
psEditor
.
editorParams
}}
{{#
jsonParse
item
.
psEditor
.
editorParams
}}
{{#if
contentType
}}
contentType=
"
{{
contentType
}}
"
{{else}}
contentType=
"RAW"
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
icon
}}
iconClass=
"
{{
item
.
psEditor
.
editorParams
.
icon
}}
"
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
caption
}}
caption=
"
{{
item
.
psEditor
.
editorParams
.
caption
}}
"
{{/if}}
{{#if
iconClass
}}
iconClass=
"
{{
iconClass
}}
"
{{/if}}
{{#if
imgPath
}}
imgPath=
"
{{
imgPath
}}
"
{{/if}}
{{#if
caption
}}
caption=
"
{{
caption
}}
"
{{/if}}
{{/
jsonParse
}}
{{/if}}
{{#if
(
or
(
eq
ctrlType
'form'
)
(
eq
ctrlType
'panel'
))
}}
:value=
"state.data.
{{
item
.
psEditor
.
name
}}
"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/app-list-box.vue
浏览文件 @
e2d51c27
<
script
setup
lang=
"ts"
>
import
{
EditorBase
,
IActionParam
,
IParam
,
IContext
,
typeOf
}
from
'@core'
;
import
{
EditorBase
,
IActionParam
,
IParam
,
IContext
,
typeOf
,
deepCopy
}
from
'@core'
;
import
{
computed
,
onBeforeMount
,
ref
,
Ref
}
from
'vue'
;
interface
ListBoxProps
{
/**
...
...
@@ -26,14 +26,6 @@ interface ListBoxProps {
*/
data
:
IParam
;
/**
* 代码表值分隔符
*
* @type {string}
* @memberof ListBoxProps
*/
valueSeparator
?:
string
;
/**
* 模式(数字或者字符串)
*
...
...
@@ -65,7 +57,14 @@ interface ListBoxProps {
* @memberof ListBoxProps
*/
codeListType
?:
string
;
/**
* 代码表值分隔符
*
* @type {string}
* @memberof ListBoxProps
*/
valueSeparator
?:
string
;
/**
* 表单服务(todo 编辑器应该脱钩)
*
...
...
@@ -159,7 +158,7 @@ interface ListBoxProps {
*
* @type {boolean}
*/
read
o
nly
?:
boolean
;
read
O
nly
?:
boolean
;
}
interface
EditorEmit
{
...
...
@@ -168,7 +167,7 @@ interface EditorEmit {
const
props
=
withDefaults
(
defineProps
<
ListBoxProps
>
(),
{
disabled
:
false
,
read
o
nly
:
false
,
read
O
nly
:
false
,
multiple
:
false
,
valueType
:
'string'
,
valueSeparator
:
','
,
...
...
@@ -186,7 +185,9 @@ const selectArray: Ref<boolean> = computed(() => {
if
(
props
.
multiple
)
{
if
(
Object
.
is
(
'LISTBOX'
,
props
.
editorType
))
{
if
(
Object
.
is
(
props
.
mode
,
'string'
))
{
return
props
.
value
.
split
(
props
.
valueSeparator
);
if
(
props
.
value
)
{
return
props
.
value
.
split
(
props
.
valueSeparator
);
}
}
else
{
let
selectsArray
:
Array
<
any
>
=
[];
let
num
:
number
=
parseInt
(
props
.
value
,
10
);
...
...
@@ -274,22 +275,25 @@ const formatCodeList = (items: Array<any>) => {
}
};
const
loadData
=
()
=>
{
let
_navContext
=
deepCopy
(
navContext
);
let
_navViewParam
=
deepCopy
(
navViewParam
);
if
(
!
props
.
service
)
{
console
.
warn
(
'部件服务错误'
);
}
else
if
(
!
props
.
acParams
?.
serviceName
)
{
console
.
warn
(
'未拥有serviceName参数'
);
}
else
if
(
!
props
.
acParams
?.
interfaceName
)
{
console
.
warn
(
'未拥有interfaceName参数'
);
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
'部件服务不存在'
});
}
else
if
(
!
props
.
acParams
)
{
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
'查询参数不存在'
});
}
else
{
const
{
serviceName
,
interfaceName
}
=
props
.
acParams
;
props
.
service
.
getItems
(
props
.
acParams
.
serviceName
,
props
.
acParams
.
interfaceName
,
navContext
,
navViewParam
)
.
getItems
(
serviceName
,
interfaceName
,
_navContext
,
_
navViewParam
)
.
then
((
response
:
any
)
=>
{
if
(
response
)
{
items
.
value
=
[...
response
];
if
(
!
response
)
{
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
''
});
return
;
}
items
.
value
=
[...
response
];
})
.
catch
((
response
:
any
)
=>
{
console
.
error
(
'加载数据失败'
);
.
catch
((
error
:
any
)
=>
{
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
error
?.
message
}
);
});
}
};
...
...
@@ -307,10 +311,10 @@ onBeforeMount(() => {
<
template
>
<div
:class=
"['app-editor-container', 'app-list-box', `app-list-box-$
{name}`]">
<template
v-if=
"multiple"
>
<a-checkbox-group
@
change=
"onChange"
:value=
"selectArray"
:options=
"items"
:disabled=
"disabled || read
o
nly"
/>
<a-checkbox-group
@
change=
"onChange"
:value=
"selectArray"
:options=
"items"
:disabled=
"disabled || read
O
nly"
/>
</
template
>
<
template
v-else
>
<a-radio-group
@
change=
"onChange"
:value=
"value"
:options=
"items"
:disabled=
"disabled || read
o
nly"
/>
<a-radio-group
@
change=
"onChange"
:value=
"value"
:options=
"items"
:disabled=
"disabled || read
O
nly"
/>
</
template
>
</div>
</template>
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/app-radio-group.vue
浏览文件 @
e2d51c27
...
...
@@ -87,7 +87,7 @@ interface RadioGroupProps {
*
* @type {boolean}
*/
read
o
nly
?:
boolean
;
read
O
nly
?:
boolean
;
}
interface
EditorEmit
{
...
...
@@ -96,7 +96,7 @@ interface EditorEmit {
const
props
=
withDefaults
(
defineProps
<
RadioGroupProps
>
(),
{
disabled
:
false
,
read
o
nly
:
false
,
read
O
nly
:
false
,
});
const
emit
=
defineEmits
<
EditorEmit
>
();
const
{
handleEditorNavParams
,
loadCodeListData
}
=
new
EditorBase
();
...
...
@@ -120,7 +120,7 @@ onBeforeMount(() => {
<
template
>
<div
:class=
"['app-editor-container', 'app-radio-group', `app-radio-group-$
{name}`]">
<a-radio-group
@
change=
"onChange"
:value=
"value"
:options=
"items"
:disabled=
"disabled || read
o
nly"
></a-radio-group>
<a-radio-group
@
change=
"onChange"
:value=
"value"
:options=
"items"
:disabled=
"disabled || read
O
nly"
></a-radio-group>
</div>
</
template
>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录