Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
ed79749d
提交
ed79749d
编写于
1月 18, 2022
作者:
WodahsOrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:修复写法错误
上级
84a53d55
变更
13
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
442 行增加
和
352 行删除
+442
-352
view-base-config.hbs
...rces/templ/r7/@macro/front-end/views/view-base-config.hbs
+3
-3
app-view-config.ts.hbs
...mpl/r7/app_{{apps}}/src/app/config/app-view-config.ts.hbs
+6
-0
form-control.ts
...s}}/src/core/modules/widgets/form-control/form-control.ts
+89
-43
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+1
-1
md-control.ts
...{apps}}/src/core/modules/widgets/md-control/md-control.ts
+335
-291
search-form-control.ts
...odules/widgets/search-form-control/search-form-control.ts
+0
-1
tree-control.ts
...s}}/src/core/modules/widgets/tree-control/tree-control.ts
+2
-6
app-modal.vue
...s/templ/r7/app_{{apps}}/src/utils/app-modal/app-modal.vue
+1
-2
{{pages@APPINDEXVIEW}}.vue.hbs
...s}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
+1
-1
{{pages@DEGRIDVIEW}}.vue.hbs
...dules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
+1
-1
{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
...ges@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
+1
-1
{{pages@DEPICKUPVIEW}}.vue.hbs
...s}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
+1
-1
{{pages@DETREEEXPVIEW}}.vue.hbs
...}/{{pages@DETREEEXPVIEW}}/{{pages@DETREEEXPVIEW}}.vue.hbs
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/views/view-base-config.hbs
浏览文件 @
ed79749d
...
...
@@ -18,16 +18,16 @@
},
{{/if}}
appEntityName: '
{{
page
.
appEntity
.
codeName
}}
',
isLoadDefault:
true
,
isLoadDefault:
{{#if
(
or
page
.
loadDefault
(
eq
page
.
loadDefault
false
))
}}{{
page
.
loadDefault
}}{{else}}
true
{{/if}}
,
keyPSDEField: '
{{
lowerCase
page
.
appEntity
.
codeName
}}
',
{{!-- viewMsgGroup: '{{page.psAppViewMsgGroup}}', --}}
{{!-- viewUIActions: '{{page.psAppViewUIActions}}', --}}
viewSysCss: '
{{
page
.
psSysCss
}}
',
viewSysCss: '
{{
page
.
psSysCss
.
cssName
}}
',
{{!-- viewSysImage: '{{page.psSysImage}}', --}}
subCaption: '
{{
page
.
subCaption
}}
',
viewType: '
{{
page
.
viewType
}}
',
viewStyle: '
{{
page
.
viewStyle
}}
',
showCaptionBar:
'
{{
page
.
viewStyle
}}
'
,
showCaptionBar:
{{
page
.
showCaptionBar
}}
,
xDataControlName:'
{{
page
.
xDataControlName
}}
',
openDataViewName: 'ExampleEditorEditView',
appViewNavContexts:
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
page
.
psAppViewNavContexts
}}
,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/config/app-view-config.ts.hbs
浏览文件 @
ed79749d
...
...
@@ -16,6 +16,12 @@ export const AppViewConfig:IParam = {
"parameters": [
{ "pathName": "views", "parameterName": "
{{
lowerCase
appView
.
codeName
}}
" }
],
{{#if
(
gt
appView
.
height
0
)
}}
"height":
{{
appView
.
height
}}
,
{{/if}}
{{#if
(
gt
appView
.
width
0
)
}}
"width":
{{
appView
.
width
}}
,
{{/if}}
{{#if
appView
.
capPSLanguageRes
}}
"captionTag": "
{{
appView
.
capPSLanguageRes
.
lanResTag
}}
",
{{/if}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/form-control/form-control.ts
浏览文件 @
ed79749d
import
{
DataTypes
,
dateFormat
,
deepCopy
,
FormControlProps
,
FormControlState
,
IActionParam
,
IParam
,
MainControl
,
UIUtil
,
verifyValue
}
from
'@core'
;
import
{
DataTypes
,
dateFormat
,
deepCopy
,
FormControlProps
,
FormControlState
,
IActionParam
,
IParam
,
MainControl
,
UIUtil
,
verifyValue
,
}
from
'@core'
;
/**
* @description 表单部件
...
...
@@ -19,7 +30,7 @@ export class FormControl extends MainControl {
* @description 检验表单动态逻辑
* @param {IParam} data 表单数据
* @param {IParam} logic 动态逻辑
* @return {*}
* @return {*}
* @memberof FormControl
*/
public
verifyGroupLogic
(
data
:
IParam
,
logic
:
IParam
)
{
...
...
@@ -28,12 +39,12 @@ export class FormControl extends MainControl {
if
(
logic
.
groupOP
==
'AND'
)
{
const
falseItem
=
logic
.
logics
.
find
((
childLogic
:
IParam
)
=>
{
return
!
this
.
verifyGroupLogic
(
data
,
childLogic
);
})
})
;
result
=
falseItem
?
false
:
true
;
}
else
if
(
logic
.
groupOP
==
'OR'
)
{
const
trueItem
=
logic
.
logics
.
find
((
childLogic
:
IParam
)
=>
{
return
this
.
verifyGroupLogic
(
data
,
childLogic
);
})
})
;
result
=
trueItem
?
true
:
false
;
}
// 是否取反
...
...
@@ -62,7 +73,7 @@ export class FormControl extends MainControl {
this
.
formItemUpdate
(
name
);
this
.
formDynamicLogic
(
name
);
if
(
enableAutoSave
)
{
this
.
useSave
().
save
();
this
.
save
();
}
}
...
...
@@ -80,7 +91,7 @@ export class FormControl extends MainControl {
this
.
handleFormDataChange
(
item
.
valueItemName
,
null
);
}
}
})
})
;
}
/**
...
...
@@ -110,7 +121,7 @@ export class FormControl extends MainControl {
if
(
data
.
value
.
hasOwnProperty
(
detailsName
))
{
data
.
value
[
detailsName
]
=
response
.
data
[
detailsName
];
}
})
})
;
this
.
afterFormAction
(
'formItemUpdate'
);
}
}
...
...
@@ -188,11 +199,11 @@ export class FormControl extends MainControl {
if
(
Object
.
is
(
item
.
detailType
,
'FORMITEM'
))
{
switch
(
item
.
enableCond
)
{
case
0
:
// 不启用
// 不启用
item
.
disabled
=
false
;
break
;
case
1
:
// 新建
// 新建
item
.
disabled
=
data
.
srfuf
!=
0
;
break
;
case
2
:
...
...
@@ -284,12 +295,14 @@ export class FormControl extends MainControl {
data
.
value
[
detail
.
codeName
]
=
controlService
.
getRemoteCopyData
()?.[
detail
.
codeName
]
||
null
;
break
;
default
:
data
.
value
[
detail
.
codeName
]
=
DataTypes
.
isNumber
(
detail
.
dataType
)
?
Number
(
detail
?.
createDV
)
:
detail
?.
createDV
;
data
.
value
[
detail
.
codeName
]
=
DataTypes
.
isNumber
(
detail
.
dataType
)
?
Number
(
detail
?.
createDV
)
:
detail
?.
createDV
;
break
;
}
}
}
})
})
;
}
/**
...
...
@@ -325,18 +338,28 @@ export class FormControl extends MainControl {
data
.
value
[
detail
.
codeName
]
=
controlService
.
getRemoteCopyData
()?.[
detail
.
codeName
]
||
null
;
break
;
default
:
data
.
value
[
detail
.
codeName
]
=
DataTypes
.
isNumber
(
detail
.
dataType
)
?
Number
(
detail
.
updateDV
)
:
detail
.
updateDV
;
data
.
value
[
detail
.
codeName
]
=
DataTypes
.
isNumber
(
detail
.
dataType
)
?
Number
(
detail
.
updateDV
)
:
detail
.
updateDV
;
break
;
}
}
}
})
})
;
}
/**
* 加载草稿行为
*
* @protected
* @param [opt={}]
*/
protected
async
loadDraft
(
opt
:
any
=
{})
{}
/**
* @description 使用加载草稿功能模块
* @param {FormControlProps} props 传入的props
* @return {*}
* @return {*}
* @memberof FormControl
*/
public
useLoadDraft
()
{
...
...
@@ -371,6 +394,10 @@ export class FormControl extends MainControl {
console
.
log
(
error
);
}
};
// 在类里绑定能力方法
this
.
loadDraft
=
loadDraft
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
@@ -378,14 +405,23 @@ export class FormControl extends MainControl {
loadDraft
(
data
);
}
});
// 部件卸载时退订viewSubject
onUnmounted
(()
=>
{
subscription
.
unsubscribe
();
});
}
return
{
loadDraft
}
;
return
loadDraft
;
}
/**
* 加载行为
*
* @protected
* @param [opt={}]
*/
protected
async
load
(
opt
:
any
=
{})
{}
/**
* @description 使用加载功能模块
* @return {*}
...
...
@@ -427,6 +463,9 @@ export class FormControl extends MainControl {
}
};
// 在类里绑定能力方法
this
.
load
=
load
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
@@ -441,11 +480,17 @@ export class FormControl extends MainControl {
});
}
return
{
load
:
load
,
};
return
load
;
}
/**
* 保存行为
*
* @protected
* @param [opt={}]
*/
protected
async
save
(
opt
:
any
=
{})
{}
/**
* @description 使用加载功能模块
* @return {*}
...
...
@@ -482,19 +527,14 @@ export class FormControl extends MainControl {
Object
.
assign
(
arg
,
data
.
getDo
());
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
});
// TODO 关系界面保存通知处理,做成异步。
// TODO 拷贝相关。
// 发起请求处理与解析请求
const
response
=
await
controlService
[
saveFunName
](
_context
,
arg
,
{
action
:
saveAction
,
isLoading
:
showBusyIndicator
,
},
);
const
response
=
await
controlService
[
saveFunName
](
_context
,
arg
,
{
action
:
saveAction
,
isLoading
:
showBusyIndicator
,
});
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
// TODO 统一Error格式
return
;
...
...
@@ -510,6 +550,9 @@ export class FormControl extends MainControl {
}
};
// 在类里绑定能力方法
this
.
save
=
save
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
@@ -523,11 +566,17 @@ export class FormControl extends MainControl {
});
}
return
{
save
:
save
,
};
return
save
;
}
/**
* 删除行为
*
* @protected
* @param [opt={}]
*/
protected
async
remove
(
opt
:
any
=
{})
{}
/**
* @description 使用加载功能模块
* @param {FormControlProps} props 传入的props
...
...
@@ -558,17 +607,13 @@ export class FormControl extends MainControl {
let
_context
=
deepCopy
(
context
);
let
_viewParams
=
deepCopy
(
viewParams
);
const
arg
:
any
=
opt
[
0
];
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
}
,
);
Object
.
assign
(
arg
,
{
viewParams
:
_viewParams
});
// 发起请求处理与解析请求
const
response
=
await
controlService
.
remove
(
_context
,
arg
,
{
action
:
removeAction
,
isLoading
:
showBusyIndicator
},
);
const
response
=
await
controlService
.
remove
(
_context
,
arg
,
{
action
:
removeAction
,
isLoading
:
showBusyIndicator
,
});
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
return
;
}
...
...
@@ -581,6 +626,9 @@ export class FormControl extends MainControl {
}
};
// 在类里绑定能力方法
this
.
remove
=
remove
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
@@ -595,9 +643,7 @@ export class FormControl extends MainControl {
});
}
return
{
remove
:
remove
,
};
return
remove
;
}
/**
...
...
@@ -639,7 +685,7 @@ export class FormControl extends MainControl {
* @memberof FormControl
*/
public
handleFormGroupAction
(
tag
:
string
,
data
:
any
)
{
console
.
log
(
tag
,
data
)
console
.
log
(
tag
,
data
)
;
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
ed79749d
...
...
@@ -97,7 +97,7 @@ export class GridControl extends MDControl {
// 处理表格变化(分页,过滤,排序)
const
onGridChange
=
(
pagination
:
IParam
,
filters
:
IParam
,
sorter
:
IParam
,
data
:
IParam
)
=>
{
if
(
pagination
)
{
this
.
useLoad
().
load
();
this
.
load
();
}
}
return
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/md-control/md-control.ts
浏览文件 @
ed79749d
此差异已折叠。
点击以展开。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/search-form-control/search-form-control.ts
浏览文件 @
ed79749d
...
...
@@ -75,7 +75,6 @@ export class SearchFormControl extends FormControl {
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
// 表单行为能力启用
const
{
loadDraft
}
=
this
.
useLoadDraft
();
return
{
...
superParams
,
onSearch
:
this
.
onSearch
.
bind
(
this
),
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tree-control/tree-control.ts
浏览文件 @
ed79749d
import
{
toRef
}
from
"vue"
;
import
{
deepCopy
,
deepObjectMerge
,
IActionParam
,
MainControl
}
from
"@core"
;
import
{
TreeControlProps
}
from
"./tree-control-prop"
;
import
{
TreeControlState
}
from
"./tree-control-state"
;
...
...
@@ -143,9 +142,7 @@ export class TreeControl extends MainControl {
subscription
.
unsubscribe
();
})
}
return
{
load
};
return
load
;
}
/**
...
...
@@ -155,11 +152,10 @@ export class TreeControl extends MainControl {
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
const
{
load
}
=
this
.
useLoad
();
return
{
...
superParams
,
treeNodeSelect
:
this
.
treeNodeSelect
.
bind
(
this
),
load
load
:
this
.
useLoad
(),
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/utils/app-modal/app-modal.vue
浏览文件 @
ed79749d
...
...
@@ -196,14 +196,13 @@ const handleShowState = ($event: any) => {
:maskClosable=
"true"
:destroyOnClose=
"true"
:width=
"width"
:height=
"height"
:bodyStyle=
"style"
@
cancel=
"onVisibleChange($event)"
>
<component
:is=
"viewName"
class=
"app-modal-view-component"
:width=
"width"
:height=
"height"
:context=
"context"
:viewParams=
"viewParams"
:viewDefaultUsage=
"false"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
浏览文件 @
ed79749d
...
...
@@ -39,7 +39,7 @@ const collapsedChange = () => {
</script>
<template>
<AppDefaultIndexViewLayout
class=
"app-index-view
"
:menuAlign=
"state.menuAlign"
:collapsed=
"collapsed"
>
<AppDefaultIndexViewLayout
:class=
"['app-index-view', state.viewSysCss]
"
:menuAlign=
"state.menuAlign"
:collapsed=
"collapsed"
>
<template
#
caption
>
<div
class=
"index-view-header"
>
\{{state.viewCaption}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
浏览文件 @
ed79749d
...
...
@@ -44,7 +44,7 @@ const { state, grid, onCtrlEvent, onToolbarEvent, onQuickGroupEvent } = new Grid
</script>
<template>
<AppGridViewLayout
class=
"app-grid-view
"
>
<AppGridViewLayout
:class=
"['app-grid-view', state.viewSysCss]
"
>
<template
v-slot:caption
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
浏览文件 @
ed79749d
...
...
@@ -36,7 +36,7 @@ const { state, confirm, handleCtrlEvent } = new PickupGridView(viewState, props,
</script>
<template>
<AppPickerUpGridViewLayout
class=
"app-pickup-grid-view
"
>
<AppPickerUpGridViewLayout
:class=
"['app-pickup-grid-view', state.viewSysCss]
"
>
<template
v-slot:header-left
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
浏览文件 @
ed79749d
...
...
@@ -32,7 +32,7 @@ const { state, cancel, confirm,handleCtrlEvent } = new PickupView(viewState, pro
</script>
<template>
<AppPickerUpViewLayout
class=
"app-pickup-view
"
>
<AppPickerUpViewLayout
:class=
"['app-pickup-view', state.viewSysCss]
"
>
<template
v-slot:header-left
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DETREEEXPVIEW}}/{{pages@DETREEEXPVIEW}}.vue.hbs
浏览文件 @
ed79749d
...
...
@@ -29,7 +29,7 @@ const { state, handleCtrlEvent, onToolbarEvent } = new TreeExpView(viewState, pr
</script>
<template>
<AppTreeExpViewLayout
class=
"app-tree-exp-view
"
>
<AppTreeExpViewLayout
:class=
"['app-tree-exp-view', state.viewSysCss]
"
>
<template
v-slot:caption
>
<AppIconText
class=
"app-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录