Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
d9b94e91
提交
d9b94e91
编写于
1月 04, 2022
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
d09c3c44
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
101 行增加
和
17 行删除
+101
-17
form-button.hbs
...ain/resources/templ/r7/@macro/form-detail/form-button.hbs
+34
-0
form-tabpanel.hbs
...n/resources/templ/r7/@macro/form-detail/form-tabpanel.hbs
+18
-0
include-form.hbs
...in/resources/templ/r7/@macro/form-detail/include-form.hbs
+2
-0
grid-control.ts
...rc/ibiz-core/modules/widgets/grid-control/grid-control.ts
+39
-16
main-control-state.ts
...z-core/modules/widgets/main-control/main-control-state.ts
+7
-0
{{ctrls@FORM}}-form.vue.hbs
...ntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/form-button.hbs
0 → 100644
浏览文件 @
d9b94e91
{{#
eq
item
.
psLayoutPos
'FLEX'
}}
<div
style=
"flex-grow:
{{#if
item
.
psLayoutPos
.
grow
}}{{
item
.
psLayoutPos
.
grow
}}{{else}}
0
{{/if}}
;"
>
<a-button
type=
"primary"
class=
"ibiz-form-button
{{#if
item
.
psSysCss
}}{{
item
.
psSysCss
.
cssName
}}{{/if}}
"
style=
"
{{#if
item
.
width
}}
width:
{{
item
.
width
}}
px;
{{/if}}{{#if
item
.
height
}}
height:
{{
item
.
height
}}
px;
{{/if}}
"
>
{{#if
item
.
psSysImage
}}
<template
#
icon
>
<IbizIconText
{{#if
item
.
psSysImage
.
cssClass
}}
:iconClass=
"
{{
item
.
psSysImage
.
cssClass
}}
"
{{/if}}
{{#if
item
.
psSysImage
.
imagePath
}}
:imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
{{/if}}
/>
</template>
{{/if}}
{{#if
item
.
showCaption
}}
{{
item
.
caption
}}
{{/if}}
</a-button>
</div>
{{else}}
<a-col
{{>
@macro
/
front-end
/
ctrl
/
common
/
layoutPos
.
hbs
item
=
item
.
psLayoutPos
}}
>
<a-button
type=
"primary"
class=
"ibiz-form-button
{{#if
item
.
psSysCss
}}{{
item
.
psSysCss
.
cssName
}}{{/if}}
"
style=
"
{{#if
item
.
width
}}
width:
{{
item
.
width
}}
px;
{{/if}}{{#if
item
.
height
}}
height:
{{
item
.
height
}}
px;
{{/if}}
"
>
{{#if
item
.
psSysImage
}}
<template
#
icon
>
<IbizIconText
{{#if
item
.
psSysImage
.
cssClass
}}
:iconClass=
"
{{
item
.
psSysImage
.
cssClass
}}
"
{{/if}}
{{#if
item
.
psSysImage
.
imagePath
}}
:imgPath=
"
{{
item
.
psSysImage
.
imagePath
}}
"
{{/if}}
/>
</template>
{{/if}}
{{#if
item
.
showCaption
}}
{{
item
.
caption
}}
{{/if}}
</a-button>
</a-col>
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/form-tabpanel.hbs
0 → 100644
浏览文件 @
d9b94e91
{{#
eq
item
.
psLayoutPos
'FLEX'
}}
<div
style=
"flex-grow:
{{#if
item
.
psLayoutPos
.
grow
}}{{
item
.
psLayoutPos
.
grow
}}{{else}}
0
{{/if}}
;"
>
<a-tabs
class=
"ibiz-form-page"
>
{{#
each
item
.
psDEFormPages
as
|
formPage
|
}}
{{>
(
lookup
.
'formPage.detailType'
)
item
=
formPage
}}
{{/
each
}}
</a-tabs>
</div>
{{else}}
<a-col
{{>
@macro
/
front-end
/
ctrl
/
common
/
layoutPos
.
hbs
item
=
item
.
psLayoutPos
}}
>
<a-tabs
class=
"ibiz-form-page"
>
{{#
each
item
.
psDEFormPages
as
|
formPage
|
}}
{{>
(
lookup
.
'formPage.detailType'
)
item
=
formPage
}}
{{/
each
}}
</a-tabs>
</a-col>
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/include-form.hbs
浏览文件 @
d9b94e91
{{#
*
inline
"FORMPAGE"
}}{{>
@macro
/
form-detail
/
form-page
.
hbs
}}{{/
inline
}}
{{#
*
inline
"GROUPPANEL"
}}{{>
@macro
/
form-detail
/
form-group
.
hbs
}}{{/
inline
}}
{{#
*
inline
"FORMITEM"
}}{{>
@macro
/
form-detail
/
form-item
.
hbs
}}{{/
inline
}}
{{#
*
inline
"TABPANEL"
}}{{>
@macro
/
form-detail
/
form-tabpanel
.
hbs
}}{{/
inline
}}
{{#
*
inline
"BUTTON"
}}{{>
@macro
/
form-detail
/
form-button
.
hbs
}}{{/
inline
}}
{{#
*
inline
"FORMDETAILSMODEL"
}}{{>
@macro
/
form-detail
/
form-details-model
.
hbs
}}{{/
inline
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
d9b94e91
...
...
@@ -424,7 +424,7 @@ export class GridControl extends MainControl {
for
(
const
item
of
items
)
{
const
{
updateAction
,
createAction
}
=
controlAction
;
const
saveAction
:
any
=
item
.
rowDataState
==
"update"
?
updateAction
:
item
.
rowDataState
==
"create"
?
createAction
:
"
create
"
;
const
saveAction
:
any
=
item
.
rowDataState
==
"update"
?
updateAction
:
item
.
rowDataState
==
"create"
?
createAction
:
""
;
const
saveFunName
=
item
.
rowDataState
;
if
(
!
saveAction
||
!
saveFunName
)
{
return
;
...
...
@@ -474,24 +474,47 @@ export class GridControl extends MainControl {
*/
public
useRemove
(
props
:
GridControlProps
)
{
const
{
viewSubject
,
controlName
}
=
this
.
controlState
;
const
remove
=
async
(
opt
:
any
=
{}
)
=>
{
const
remove
=
async
(
opt
:
IParam
[]
=
[]
)
=>
{
try
{
const
{
controlService
,
context
,
viewParams
,
showBusyIndicator
,
controlAction
}
=
this
.
controlState
;
const
{
controlService
,
context
,
viewParams
,
showBusyIndicator
,
controlAction
,
appDeCodeName
}
=
this
.
controlState
;
if
(
!
controlAction
.
removeAction
)
{
return
;
}
let
_context
=
deepCopy
(
context
);
let
_viewParams
=
deepCopy
(
viewParams
);
const
arg
:
any
=
opt
[
0
];
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
});
const
response
=
await
controlService
.
remove
(
_context
,
arg
,
{
action
:
controlAction
.
removeAction
,
isLoading
:
showBusyIndicator
},
);
if
(
response
.
status
||
response
.
status
==
200
)
{
const
dataRef
=
toRef
(
this
.
controlState
,
"items"
);
const
data
:
IParam
[]
=
[];
opt
.
forEach
((
item
:
IParam
,
index
:
number
)
=>
{
if
(
Object
.
is
(
item
.
srfuf
,
"0"
))
{
dataRef
.
value
.
some
((
val
:
any
,
num
:
number
)
=>
{
if
(
JSON
.
stringify
(
val
)
==
JSON
.
stringify
(
item
))
{
dataRef
.
value
.
splice
(
num
,
1
);
return
true
;
}
});
}
else
{
data
.
push
(
opt
[
index
]);
}
});
if
(
data
.
length
>
0
)
{
const
keys
:
string
[]
=
[];
data
.
forEach
((
item
:
IParam
)
=>
{
keys
.
push
(
item
.
srfkey
);
});
const
_removeAction
=
keys
.
length
>
1
?
"removeBatch"
:
controlAction
.
removeAction
;
let
_context
=
deepCopy
(
context
);
Object
.
assign
(
_context
,
{[
appDeCodeName
]:
keys
});
let
_viewParams
=
deepCopy
(
viewParams
);
const
arg
:
IParam
=
{
[
appDeCodeName
]:
keys
,
};
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
});
const
response
=
await
controlService
.
remove
(
_context
,
arg
,
{
action
:
_removeAction
,
isLoading
:
showBusyIndicator
},
);
if
(
response
.
status
||
response
.
status
==
200
)
{
}
}
}
catch
(
error
)
{
// TODO 错误异常处理
...
...
@@ -585,7 +608,7 @@ export class GridControl extends MainControl {
}
/**
* @description 处理
工具栏
事件
* @description 处理
表格操作列
事件
* @param {IActionParam} actionParam 行为参数
* @param {IParam} [row] 表格行数据
* @memberof GridControl
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/main-control/main-control-state.ts
浏览文件 @
d9b94e91
...
...
@@ -35,4 +35,11 @@ export interface MainControlState extends ControlStateBase {
* @memberof MainControlState
*/
UIService
:
IParam
;
/**
* @description 应用实体codeName
* @type {string}
* @memberof MainControlState
*/
appDeCodeName
:
string
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
浏览文件 @
d9b94e91
...
...
@@ -42,7 +42,7 @@ const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(p
{{/
each
}}
{{/
each
}}
{{else}}
<a-tabs
class=
"
app
-form-page"
>
<a-tabs
class=
"
ibiz
-form-page"
>
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{>
(
lookup
.
'ctrlPage.detailType'
)
item
=
ctrlPage
}}
{{/
each
}}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录