Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
cdaa4b8e
提交
cdaa4b8e
编写于
2月 09, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新表格部件及多数据部件基类
上级
ffffd796
变更
5
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
63 行增加
和
26 行删除
+63
-26
app-form-item.vue
...l/r7/app_{{apps}}/src/components/common/app-form-item.vue
+3
-1
app-sys-action.ts
...p_{{apps}}/src/core/logic/app-ui-action/app-sys-action.ts
+2
-2
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+4
-4
md-control.ts
...{apps}}/src/core/modules/widgets/md-control/md-control.ts
+41
-16
{{ctrls@GRID}}-grid-state.ts.hbs
...es}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
+13
-3
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-form-item.vue
浏览文件 @
cdaa4b8e
...
...
@@ -5,6 +5,7 @@ interface FormGroupProps {
name
:
string
;
layoutOpts
?:
ILayoutOpts
;
label
?:
string
;
showLabel
?:
boolean
,
required
?:
boolean
;
visible
?:
boolean
;
labelWidth
?:
number
;
...
...
@@ -18,6 +19,7 @@ interface FormGroupEmit {
const
props
=
withDefaults
(
defineProps
<
FormGroupProps
>
(),
{
required
:
false
,
visible
:
true
,
showLabel
:
true
});
const
emit
=
defineEmits
<
FormGroupEmit
>
();
...
...
@@ -54,7 +56,7 @@ const initRules = () => {
:labelCol=
"
{ style: { width: `${labelWidth}px` } }"
:validateStatus="error ? 'error' : 'validating'"
>
<template
#
label
>
<template
#
label
v-if=
"showLabel"
>
<label
:class=
"labelClass"
>
<div
class=
"label-title"
>
{{
label
}}
</div>
</label>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/logic/app-ui-action/app-sys-action.ts
浏览文件 @
cdaa4b8e
...
...
@@ -212,10 +212,10 @@ export class AppSysAction {
* @return {*}
*/
public
static
remove
(
params
:
IUIActionParams
)
{
const
{
actionEnvironment
}
=
params
;
const
{
actionEnvironment
,
data
}
=
params
;
// 视图里获取多数据部件
if
(
hasFunction
(
actionEnvironment
.
xDataControl
,
"remove"
))
{
actionEnvironment
.
xDataControl
.
remove
();
actionEnvironment
.
xDataControl
.
remove
(
data
);
}
else
if
(
isExist
(
actionEnvironment
.
remove
))
{
actionEnvironment
.
remove
();
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
cdaa4b8e
...
...
@@ -507,7 +507,7 @@ export class GridControl extends MDControl {
}
createDefaultItems
.
forEach
((
item
:
IParam
)
=>
{
const
{
createDVT
,
createDV
,
property
,
valueFormat
,
fieldType
}
=
item
;
if
(
createDVT
&&
row
.
hasOwnProperty
(
property
))
{
if
(
createDVT
&&
(
row
.
hasOwnProperty
(
property
)
||
property
in
row
))
{
switch
(
createDVT
)
{
case
"CONTEXT"
:
if
(
createDV
)
{
...
...
@@ -527,7 +527,7 @@ export class GridControl extends MDControl {
row
[
property
]
=
context
[
"srfuserid"
];
break
;
case
"CURTIME"
:
row
[
property
]
=
valueFormat
?
dateFormat
(
new
Date
(),
valueFormat
)
:
new
Date
();
row
[
property
]
=
valueFormat
?
dateFormat
(
new
Date
(),
valueFormat
)
:
(
new
Date
()).
toDateString
();
break
;
case
"PARAM"
:
if
(
item
.
createDV
)
{
...
...
@@ -556,7 +556,7 @@ export class GridControl extends MDControl {
const
setDefault
=
(
row
:
IParam
=
{})
=>
{
updateDefaultItems
.
forEach
((
item
:
IParam
)
=>
{
const
{
updateDV
,
updateDVT
,
property
,
valueFormat
,
fieldType
}
=
item
;
if
(
updateDVT
&&
row
.
hasOwnProperty
(
property
))
{
if
(
updateDVT
&&
(
row
.
hasOwnProperty
(
property
)
||
property
in
row
))
{
switch
(
updateDVT
)
{
case
"CONTEXT"
:
if
(
updateDV
)
{
...
...
@@ -576,7 +576,7 @@ export class GridControl extends MDControl {
row
[
property
]
=
context
[
"srfuserid"
];
break
;
case
"CURTIME"
:
row
[
property
]
=
valueFormat
?
dateFormat
(
new
Date
(),
valueFormat
)
:
new
Date
();
row
[
property
]
=
valueFormat
?
dateFormat
(
new
Date
(),
valueFormat
)
:
(
new
Date
()).
toDateString
();
break
;
case
"PARAM"
:
if
(
item
.
createDV
)
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/md-control.ts
浏览文件 @
cdaa4b8e
...
...
@@ -195,7 +195,7 @@ export class MDControl extends MainControl {
const
{
viewSubject
,
controlName
}
=
this
.
state
;
const
remove
=
async
(
opt
:
IParam
[]
=
[])
=>
{
try
{
const
{
controlService
,
context
,
viewParams
,
showBusyIndicator
,
controlAction
,
appDeCodeName
}
=
this
.
state
;
const
{
controlService
,
context
,
viewParams
,
showBusyIndicator
,
controlAction
,
appDeCodeName
,
appDeMajorFieldName
}
=
this
.
state
;
const
{
items
}
=
toRefs
(
this
.
state
);
if
(
!
controlAction
.
removeAction
)
{
return
;
...
...
@@ -215,15 +215,28 @@ export class MDControl extends MainControl {
});
if
(
_data
.
length
>
0
)
{
const
keys
:
string
[]
=
[];
_data
.
forEach
((
item
:
IParam
)
=>
{
// 删除确认信息
let
confirmInfo
:
string
=
''
;
_data
.
forEach
((
item
:
IParam
,
index
:
number
)
=>
{
keys
.
push
(
item
.
srfkey
);
const
text
=
item
[
appDeMajorFieldName
.
toLowerCase
()]
||
item
.
srfmajortext
;
if
(
index
<
5
)
{
if
(
index
!==
0
&&
isExistAndNotEmpty
(
text
))
{
confirmInfo
+=
'、'
;
}
confirmInfo
+=
text
;
}
});
confirmInfo
+=
`
${
_data
.
length
<
5
?
' '
:
' ... '
}
共
${
_data
.
length
}
条数据`
;
// 移除空白主键信息
confirmInfo
=
confirmInfo
.
replace
(
/
[
null
]
/g
,
''
).
replace
(
/
[
undefined
]
/g
,
''
);
const
removeData
=
async
()
=>
{
const
_removeAction
=
keys
.
length
>
1
?
'removeBatch'
:
controlAction
.
removeAction
;
let
_context
=
deepCopy
(
context
);
Object
.
assign
(
_context
,
{
[
appDeCodeName
]:
keys
});
Object
.
assign
(
_context
,
{
[
appDeCodeName
.
toLowerCase
()
]:
keys
});
let
_viewParams
=
deepCopy
(
viewParams
);
const
arg
:
IParam
=
{
[
appDeCodeName
]:
keys
,
[
appDeCodeName
.
toLowerCase
()
]:
keys
,
};
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
});
const
response
=
await
controlService
.
remove
(
_context
,
arg
,
{
...
...
@@ -233,6 +246,18 @@ export class MDControl extends MainControl {
if
(
response
.
status
||
response
.
status
==
200
)
{
}
}
// 弹出提示模态
Modal
.
confirm
({
title
:
'删除警告'
,
content
:
`确认删除
${
confirmInfo
}
吗?删除操作将不可恢复`
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onOk
:
()
=>
{
removeData
();
},
onCancel
:
()
=>
{
}
});
}
}
catch
(
error
)
{
// TODO 错误异常处理
console
.
log
(
error
);
...
...
@@ -290,7 +315,7 @@ export class MDControl extends MainControl {
});
this
.
setCreateDefault
(
response
.
data
);
if
(
response
.
status
||
response
.
status
==
200
)
{
items
.
value
=
[...
items
.
value
,
[
response
.
data
]]
;
items
.
value
.
push
(
response
.
data
)
;
}
}
catch
(
error
)
{
// TODO 错误异常处理
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
浏览文件 @
cdaa4b8e
...
...
@@ -22,7 +22,9 @@ export class ControlVO extends ControlVOBase {
export const ctrlState = {
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
appEntityCodeName:'
{{
ctrl
.
appEntity
.
codeName
}}
',
appDeCodeName:'
{{
ctrl
.
appEntity
.
codeName
}}
',
appDeKeyFieldName: '
{{#if
ctrl
.
appEntity
.
keyPSAppDEField
}}{{
ctrl
.
appEntity
.
keyPSAppDEField
.
codeName
}}{{/if}}
',
appDeMajorFieldName: '
{{#if
ctrl
.
appEntity
.
majorPSAppDEField
}}{{
ctrl
.
appEntity
.
majorPSAppDEField
.
codeName
}}{{/if}}
',
controlService: new GridService
<ControlVO>
(ControlVO, new
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service() ),
// 新建默认值
createDefaultItems: [
...
...
@@ -32,8 +34,12 @@ export const ctrlState = {
createDV: "
{{
editItem
.
createDV
}}
",
createDVT: "
{{
editItem
.
createDVT
}}
",
property: "
{{
lowerCase
editItem
.
codeName
}}
",
{{#if
editItem
.
psAppDEField
}}
{{#if
(
and
editItem
.
psEditor
editItem
.
psEditor
.
dateTimeFormat
)
}}
valueFormat: "
{{
editItem
.
psEditor
.
dateTimeFormat
}}
",
{{else
if
editItem
.
psAppDEField
}}
valueFormat: "
{{
editItem
.
psAppDEField
.
valueFormat
}}
",
{{/if}}
{{#if
editItem
.
psAppDEField
}}
fieldType: "
{{
editItem
.
psAppDEField
.
stdDataType
}}
"
{{/if}}
}
{{#
unless
@last
}}
,
{{/
unless
}}
...
...
@@ -121,8 +127,12 @@ export const ctrlState = {
updateDV: "
{{
editItem
.
updateDV
}}
",
updateDVT: "
{{
editItem
.
updateDVT
}}
",
property: "
{{
lowerCase
editItem
.
codeName
}}
",
{{#if
editItem
.
psAppDEField
}}
{{#if
(
and
editItem
.
psEditor
editItem
.
psEditor
.
dateTimeFormat
)
}}
valueFormat: "
{{
editItem
.
psEditor
.
dateTimeFormat
}}
",
{{else
if
editItem
.
psAppDEField
}}
valueFormat: "
{{
editItem
.
psAppDEField
.
valueFormat
}}
",
{{/if}}
{{#if
editItem
.
psAppDEField
}}
fieldType: "
{{
editItem
.
psAppDEField
.
stdDataType
}}
"
{{/if}}
}
{{#
unless
@last
}}
,
{{/
unless
}}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录