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 @@
...
@@ -23,7 +23,17 @@
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{/if}}
{{#if
item
.
psEditor
.
readOnly
}}
{{#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}}
{{#if
item
.
psEditor
.
psAppCodeList
}}
{{#if
item
.
psEditor
.
psAppCodeList
}}
codeListTag=
"
{{
item
.
psEditor
.
psAppCodeList
.
codeListTag
}}
"
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 @@
...
@@ -31,9 +31,15 @@
{{else
if
(
eq
ctrlType
'panel'
)
}}
{{else
if
(
eq
ctrlType
'panel'
)
}}
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
multiple
}}
{{#
eq
item
.
psEditor
.
editorType
"DROPDOWNLIST"
}}
:multiple=
"
{{
item
.
psEditor
.
editorParams
.
multiple
}}
"
{{#if
item
.
psEditor
.
editorParams
}}
{{#
jsonParse
item
.
psEditor
.
editorParams
}}
{{#if
multiple
}}
:multiple=
"
{{
multiple
}}
"
{{/if}}
{{/
jsonParse
}}
{{/if}}
{{/if}}
{{/
eq
}}
{{#if
item
.
psEditor
.
psNavigateContexts
}}
{{#if
item
.
psEditor
.
psNavigateContexts
}}
:localContext=
"
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
item
.
psEditor
.
psNavigateContexts
}}
"
:localContext=
"
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
item
.
psEditor
.
psNavigateContexts
}}
"
{{/if}}
{{/if}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/editors/list-box.hbs
浏览文件 @
e2d51c27
...
@@ -13,20 +13,24 @@
...
@@ -13,20 +13,24 @@
:deMajorField=
"state.appDeMajorFieldName"
:deMajorField=
"state.appDeMajorFieldName"
:deKeyField=
"state.appDeKeyFieldName"
:deKeyField=
"state.appDeKeyFieldName"
editorType=
'
{{
item
.
psEditor
.
editorType
}}
'
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
}}
{{#
and
item
.
psEditor
.
psAppDataEntity
item
.
psEditor
.
psAppDEDataSet
}}
:acParams=
"{ serviceName: '
{{
item
.
psEditor
.
psAppDataEntity
.
codeName
}}
', interfaceName: '
{{
item
.
psEditor
.
psAppDEDataSet
.
codeName
}}
' }"
:acParams=
"{ serviceName: '
{{
item
.
psEditor
.
psAppDataEntity
.
codeName
}}
', interfaceName: '
{{
item
.
psEditor
.
psAppDEDataSet
.
codeName
}}
' }"
{{/
and
}}
{{/
and
}}
{{#
and
item
.
psEditor
.
psAppDEACMode
item
.
psEditor
.
psAppDEACMode
.
minorSortPSAppDEField
}}
{{#
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}}
"
sort=
"
{{
lowerCase
item
.
psEditor
.
psAppDEACMode
.
minorSortPSAppDEField
}}
,
{{#if
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}{{
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}{{else}}
asc
{{/if}}
"
{{/
and
}}
{{/
and
}}
{{#if
item
.
psEditor
.
editorParams
.
multiple
}}
{{#if
item
.
psEditor
.
editorParams
}}
:multiple=
"
{{
item
.
psEditor
.
editorParams
.
multiple
}}
"
{{#
jsonParse
item
.
psEditor
.
editorParams
}}
{{#if
mode
}}
:mode=
"
{{
mode
}}
"
{{/if}}
{{#if
valueType
}}
:valueType=
"
{{
valueType
}}
"
{{/if}}
{{#if
multiple
}}
:multiple=
"
{{
multiple
}}
"
{{/if}}
{{/
jsonParse
}}
{{/if}}
{{/if}}
{{#if
(
eq
ctrlType
'form'
)
}}
{{#if
(
eq
ctrlType
'form'
)
}}
:disabled=
"state.detailsModel.
{{
item
.
codeName
}}
.disabled"
:disabled=
"state.detailsModel.
{{
item
.
codeName
}}
.disabled"
...
@@ -42,7 +46,7 @@
...
@@ -42,7 +46,7 @@
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{/if}}
{{#if
item
.
psEditor
.
readOnly
}}
{{#if
item
.
psEditor
.
readOnly
}}
:read
o
nly=
"
{{
item
.
psEditor
.
readOnly
}}
"
:read
O
nly=
"
{{
item
.
psEditor
.
readOnly
}}
"
{{/if}}
{{/if}}
{{#if
item
.
psEditor
.
psAppCodeList
}}
{{#if
item
.
psEditor
.
psAppCodeList
}}
codeListTag=
"
{{
item
.
psEditor
.
psAppCodeList
.
codeListTag
}}
"
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 @@
...
@@ -28,7 +28,7 @@
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{/if}}
{{#if
item
.
psEditor
.
readOnly
}}
{{#if
item
.
psEditor
.
readOnly
}}
:read
o
nly=
"
{{
item
.
psEditor
.
readOnly
}}
"
:read
O
nly=
"
{{
item
.
psEditor
.
readOnly
}}
"
{{/if}}
{{/if}}
{{#if
item
.
psEditor
.
psNavigateContexts
}}
{{#if
item
.
psEditor
.
psNavigateContexts
}}
:localContext=
"
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
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 @@
...
@@ -22,16 +22,23 @@
{{else
if
(
eq
ctrlType
'panel'
)
}}
{{else
if
(
eq
ctrlType
'panel'
)
}}
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
:disabled=
"state.detailsModel.
{{
item
.
name
}}
.disabled"
{{/if}}
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
contentType
}}
{{#if
item
.
psEditor
.
editorParams
}}
contentType=
"
{{
item
.
psEditor
.
editorParams
.
contentType
}}
"
{{#
jsonParse
item
.
psEditor
.
editorParams
}}
{{else}}
{{#if
contentType
}}
contentType=
"
{{
contentType
}}
"
{{else}}
contentType=
"RAW"
contentType=
"RAW"
{{/if}}
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
icon
}}
{{#if
iconClass
}}
iconClass=
"
{{
item
.
psEditor
.
editorParams
.
icon
}}
"
iconClass=
"
{{
iconClass
}}
"
{{/if}}
{{/if}}
{{#if
item
.
psEditor
.
editorParams
.
caption
}}
{{#if
imgPath
}}
caption=
"
{{
item
.
psEditor
.
editorParams
.
caption
}}
"
imgPath=
"
{{
imgPath
}}
"
{{/if}}
{{#if
caption
}}
caption=
"
{{
caption
}}
"
{{/if}}
{{/
jsonParse
}}
{{/if}}
{{/if}}
{{#if
(
or
(
eq
ctrlType
'form'
)
(
eq
ctrlType
'panel'
))
}}
{{#if
(
or
(
eq
ctrlType
'form'
)
(
eq
ctrlType
'panel'
))
}}
:value=
"state.data.
{{
item
.
psEditor
.
name
}}
"
: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"
>
<
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'
;
import
{
computed
,
onBeforeMount
,
ref
,
Ref
}
from
'vue'
;
interface
ListBoxProps
{
interface
ListBoxProps
{
/**
/**
...
@@ -26,14 +26,6 @@ interface ListBoxProps {
...
@@ -26,14 +26,6 @@ interface ListBoxProps {
*/
*/
data
:
IParam
;
data
:
IParam
;
/**
* 代码表值分隔符
*
* @type {string}
* @memberof ListBoxProps
*/
valueSeparator
?:
string
;
/**
/**
* 模式(数字或者字符串)
* 模式(数字或者字符串)
*
*
...
@@ -66,6 +58,13 @@ interface ListBoxProps {
...
@@ -66,6 +58,13 @@ interface ListBoxProps {
*/
*/
codeListType
?:
string
;
codeListType
?:
string
;
/**
* 代码表值分隔符
*
* @type {string}
* @memberof ListBoxProps
*/
valueSeparator
?:
string
;
/**
/**
* 表单服务(todo 编辑器应该脱钩)
* 表单服务(todo 编辑器应该脱钩)
*
*
...
@@ -159,7 +158,7 @@ interface ListBoxProps {
...
@@ -159,7 +158,7 @@ interface ListBoxProps {
*
*
* @type {boolean}
* @type {boolean}
*/
*/
read
o
nly
?:
boolean
;
read
O
nly
?:
boolean
;
}
}
interface
EditorEmit
{
interface
EditorEmit
{
...
@@ -168,7 +167,7 @@ interface EditorEmit {
...
@@ -168,7 +167,7 @@ interface EditorEmit {
const
props
=
withDefaults
(
defineProps
<
ListBoxProps
>
(),
{
const
props
=
withDefaults
(
defineProps
<
ListBoxProps
>
(),
{
disabled
:
false
,
disabled
:
false
,
read
o
nly
:
false
,
read
O
nly
:
false
,
multiple
:
false
,
multiple
:
false
,
valueType
:
'string'
,
valueType
:
'string'
,
valueSeparator
:
','
,
valueSeparator
:
','
,
...
@@ -186,7 +185,9 @@ const selectArray: Ref<boolean> = computed(() => {
...
@@ -186,7 +185,9 @@ const selectArray: Ref<boolean> = computed(() => {
if
(
props
.
multiple
)
{
if
(
props
.
multiple
)
{
if
(
Object
.
is
(
'LISTBOX'
,
props
.
editorType
))
{
if
(
Object
.
is
(
'LISTBOX'
,
props
.
editorType
))
{
if
(
Object
.
is
(
props
.
mode
,
'string'
))
{
if
(
Object
.
is
(
props
.
mode
,
'string'
))
{
if
(
props
.
value
)
{
return
props
.
value
.
split
(
props
.
valueSeparator
);
return
props
.
value
.
split
(
props
.
valueSeparator
);
}
}
else
{
}
else
{
let
selectsArray
:
Array
<
any
>
=
[];
let
selectsArray
:
Array
<
any
>
=
[];
let
num
:
number
=
parseInt
(
props
.
value
,
10
);
let
num
:
number
=
parseInt
(
props
.
value
,
10
);
...
@@ -274,22 +275,25 @@ const formatCodeList = (items: Array<any>) => {
...
@@ -274,22 +275,25 @@ const formatCodeList = (items: Array<any>) => {
}
}
};
};
const
loadData
=
()
=>
{
const
loadData
=
()
=>
{
let
_navContext
=
deepCopy
(
navContext
);
let
_navViewParam
=
deepCopy
(
navViewParam
);
if
(
!
props
.
service
)
{
if
(
!
props
.
service
)
{
console
.
warn
(
'部件服务错误'
);
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
'部件服务不存在'
});
}
else
if
(
!
props
.
acParams
?.
serviceName
)
{
}
else
if
(
!
props
.
acParams
)
{
console
.
warn
(
'未拥有serviceName参数'
);
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
'查询参数不存在'
});
}
else
if
(
!
props
.
acParams
?.
interfaceName
)
{
console
.
warn
(
'未拥有interfaceName参数'
);
}
else
{
}
else
{
const
{
serviceName
,
interfaceName
}
=
props
.
acParams
;
props
.
service
props
.
service
.
getItems
(
props
.
acParams
.
serviceName
,
props
.
acParams
.
interfaceName
,
navContext
,
navViewParam
)
.
getItems
(
serviceName
,
interfaceName
,
_navContext
,
_
navViewParam
)
.
then
((
response
:
any
)
=>
{
.
then
((
response
:
any
)
=>
{
if
(
response
)
{
if
(
!
response
)
{
items
.
value
=
[...
response
];
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
''
});
return
;
}
}
items
.
value
=
[...
response
];
})
})
.
catch
((
response
:
any
)
=>
{
.
catch
((
error
:
any
)
=>
{
console
.
error
(
'加载数据失败'
);
App
.
getNotificationService
().
warning
({
message
:
'获取数据失败'
,
desription
:
error
?.
message
}
);
});
});
}
}
};
};
...
@@ -307,10 +311,10 @@ onBeforeMount(() => {
...
@@ -307,10 +311,10 @@ onBeforeMount(() => {
<
template
>
<
template
>
<div
:class=
"['app-editor-container', 'app-list-box', `app-list-box-$
{name}`]">
<div
:class=
"['app-editor-container', 'app-list-box', `app-list-box-$
{name}`]">
<template
v-if=
"multiple"
>
<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
>
<
template
v-else
>
<
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
>
</
template
>
</div>
</div>
</template>
</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 {
...
@@ -87,7 +87,7 @@ interface RadioGroupProps {
*
*
* @type {boolean}
* @type {boolean}
*/
*/
read
o
nly
?:
boolean
;
read
O
nly
?:
boolean
;
}
}
interface
EditorEmit
{
interface
EditorEmit
{
...
@@ -96,7 +96,7 @@ interface EditorEmit {
...
@@ -96,7 +96,7 @@ interface EditorEmit {
const
props
=
withDefaults
(
defineProps
<
RadioGroupProps
>
(),
{
const
props
=
withDefaults
(
defineProps
<
RadioGroupProps
>
(),
{
disabled
:
false
,
disabled
:
false
,
read
o
nly
:
false
,
read
O
nly
:
false
,
});
});
const
emit
=
defineEmits
<
EditorEmit
>
();
const
emit
=
defineEmits
<
EditorEmit
>
();
const
{
handleEditorNavParams
,
loadCodeListData
}
=
new
EditorBase
();
const
{
handleEditorNavParams
,
loadCodeListData
}
=
new
EditorBase
();
...
@@ -120,7 +120,7 @@ onBeforeMount(() => {
...
@@ -120,7 +120,7 @@ onBeforeMount(() => {
<
template
>
<
template
>
<div
:class=
"['app-editor-container', 'app-radio-group', `app-radio-group-$
{name}`]">
<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>
</div>
</
template
>
</
template
>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录