Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
56be7c6c
提交
56be7c6c
编写于
1月 14, 2022
作者:
RedPig97
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:命名标准---u1
上级
8bcb839d
变更
15
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
55 行增加
和
56 行删除
+55
-56
app-grid-view-layout.vue
...p_{{apps}}/src/components/layout/app-grid-view-layout.vue
+7
-2
app-toolbar.vue
...mpl/r7/app_{{apps}}/src/components/render/app-toolbar.vue
+2
-2
md-view.ts
...r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
+2
-2
form-control.ts
...s}}/src/core/modules/widgets/form-control/form-control.ts
+4
-4
grid-control.ts
...s}}/src/core/modules/widgets/grid-control/grid-control.ts
+15
-15
quick-search-form-control.ts
...ts/quick-search-form-control/quick-search-form-control.ts
+1
-3
search-form-control.ts
...odules/widgets/search-form-control/search-form-control.ts
+1
-4
app-view-base-layout.scss
...s}}/src/style/components/layout/app-view-base-layout.scss
+2
-1
view-base.scss
...rces/templ/r7/app_{{apps}}/src/style/views/view-base.scss
+3
-5
{{pages@DEEDITVIEW}}.vue.hbs
...dules}}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}.vue.hbs
+2
-2
{{pages@DEGRIDVIEW}}.vue.hbs
...dules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
+8
-8
{{ctrls@FORM}}-form.vue.hbs
...ntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
+1
-1
{{ctrls@GRID}}-grid.vue.hbs
...ntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
+5
-5
{{ctrls@QUICKSEARCHFORM}}-quick-search-form.vue.hbs
...-form/{{ctrls@QUICKSEARCHFORM}}-quick-search-form.vue.hbs
+1
-1
{{ctrls@SEARCHFORM}}-search-form.vue.hbs
...RM}}-search-form/{{ctrls@SEARCHFORM}}-search-form.vue.hbs
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/app-grid-view-layout.vue
浏览文件 @
56be7c6c
...
...
@@ -4,15 +4,20 @@
<
template
>
<AppViewBaseLayout>
<template
v-slot:header-top
>
<slot
name=
"topMessage"
/>
</
template
>
<
template
v-slot:header-left
>
<slot
name=
"caption"
/>
</
template
>
<
template
v-slot:header-
righ
t
>
<
template
v-slot:header-
conten
t
>
<slot
name=
"quickSearch"
/>
</
template
>
<
template
v-slot:header-right
>
<slot
name=
"toolbar"
/>
</
template
>
<
template
v-slot:header-bottom
>
<slot
name=
"
topMessage
"
/>
<slot
name=
"
quickGroupSearch
"
/>
<slot
name=
"quickSearchForm"
/>
<slot
name=
"searchForm"
/>
</
template
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/app-toolbar.vue
浏览文件 @
56be7c6c
...
...
@@ -18,7 +18,7 @@ interface ToolbarProps {
actionModel
:
IParam
[];
}
interface
toolbarEmit
{
(
name
:
"
t
oolbarEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"
onT
oolbarEvent"
,
value
:
IActionParam
):
void
;
}
const
props
=
withDefaults
(
defineProps
<
ToolbarProps
>
(),
{
mode
:
'button'
,
...
...
@@ -26,7 +26,7 @@ const props = withDefaults(defineProps<ToolbarProps>(), {
const
emit
=
defineEmits
<
toolbarEmit
>
();
const
items
:
Ref
<
IParam
[]
>
=
ref
(
props
.
actionModel
||
[]);
const
itemClick
=
(
item
:
IParam
)
=>
{
emit
(
"
t
oolbarEvent"
,
{
emit
(
"
onT
oolbarEvent"
,
{
tag
:
props
.
name
,
action
:
"toolbarEvent"
,
data
:
item
,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
浏览文件 @
56be7c6c
...
...
@@ -69,7 +69,7 @@ export class MDView extends MainView {
public
handleCtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
if
(
Object
.
is
(
tag
,
'searchform'
))
{
this
.
s
earchFormEvent
(
action
,
data
);
this
.
handleS
earchFormEvent
(
action
,
data
);
}
}
...
...
@@ -80,7 +80,7 @@ export class MDView extends MainView {
* @param {*} [args={}]
* @memberof MDView
*/
public
s
earchFormEvent
(
eventName
:
string
,
args
:
any
=
{}):
void
{
public
handleS
earchFormEvent
(
eventName
:
string
,
args
:
any
=
{}):
void
{
if
(
Object
.
is
(
eventName
,
'load'
))
{
this
.
onSearchFormLoad
(
args
);
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/form-control/form-control.ts
浏览文件 @
56be7c6c
...
...
@@ -54,7 +54,7 @@ export class FormControl extends MainControl {
* @param {*} value 表单项值
* @memberof FormControl
*/
public
f
ormDataChange
(
name
:
string
,
value
:
any
)
{
public
handleF
ormDataChange
(
name
:
string
,
value
:
any
)
{
const
{
enableAutoSave
}
=
this
.
state
;
const
{
data
}
=
toRefs
(
this
.
state
);
data
.
value
[
name
]
=
value
;
...
...
@@ -75,9 +75,9 @@ export class FormControl extends MainControl {
const
{
detailsModel
}
=
this
.
state
;
Object
.
values
(
detailsModel
).
forEach
((
item
:
IParam
)
=>
{
if
(
item
.
resetItemName
&&
Object
.
is
(
name
,
item
.
resetItemName
))
{
this
.
f
ormDataChange
(
item
.
name
,
null
);
this
.
handleF
ormDataChange
(
item
.
name
,
null
);
if
(
item
.
valueItemName
)
{
this
.
f
ormDataChange
(
item
.
valueItemName
,
null
);
this
.
handleF
ormDataChange
(
item
.
valueItemName
,
null
);
}
}
})
...
...
@@ -609,7 +609,7 @@ export class FormControl extends MainControl {
const
{
tag
,
action
,
data
}
=
actionParam
;
switch
(
action
)
{
case
'valueChange'
:
this
.
f
ormDataChange
(
tag
,
data
);
this
.
handleF
ormDataChange
(
tag
,
data
);
break
;
default
:
break
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
56be7c6c
...
...
@@ -33,7 +33,7 @@ export class GridControl extends MDControl {
const
{
controlName
,
selectFirstDefault
,
rowEditState
,
rowActiveMode
}
=
this
.
state
;
const
{
selectedRowKeys
}
=
toRefs
(
this
.
state
);
// 滚动条配置
const
s
crollOption
=
computed
(()
=>
{
const
useS
crollOption
=
computed
(()
=>
{
return
{
scrollToFirstRowOnChange
:
true
,
x
:
'110%'
,
...
...
@@ -41,15 +41,15 @@ export class GridControl extends MDControl {
}
});
// 指定表格行key
const
r
owKey
=
(
record
:
IParam
)
=>
{
const
useR
owKey
=
(
record
:
IParam
)
=>
{
return
record
.
srfkey
;
}
// 表格行样式
const
r
owClassName
=
(
record
:
IParam
,
index
:
number
)
=>
{
const
useR
owClassName
=
(
record
:
IParam
,
index
:
number
)
=>
{
return
index
%
2
===
1
?
"table-striped"
:
null
;
}
// 表格行自定义
const
c
ustomRow
=
(
record
:
IParam
,
index
:
number
)
=>
{
const
useC
ustomRow
=
(
record
:
IParam
,
index
:
number
)
=>
{
return
{
onClick
:
()
=>
{
if
(
!
rowEditState
)
{
...
...
@@ -70,7 +70,7 @@ export class GridControl extends MDControl {
};
}
// 表格选择功能配置
const
r
owSelectionOption
=
computed
(()
=>
{
const
useR
owSelectionOption
=
computed
(()
=>
{
if
(
selectFirstDefault
)
{
return
false
;
}
...
...
@@ -91,23 +91,23 @@ export class GridControl extends MDControl {
};
});
// 列拖动
const
r
esizeColumn
=
(
width
:
number
,
column
:
IParam
)
=>
{
const
handleR
esizeColumn
=
(
width
:
number
,
column
:
IParam
)
=>
{
column
.
width
=
width
;
}
// 处理表格变化(分页,过滤,排序)
const
on
GridChange
=
(
pagination
:
IParam
,
filters
:
IParam
,
sorter
:
IParam
,
data
:
IParam
)
=>
{
const
handle
GridChange
=
(
pagination
:
IParam
,
filters
:
IParam
,
sorter
:
IParam
,
data
:
IParam
)
=>
{
if
(
pagination
)
{
this
.
useLoad
().
load
();
}
}
return
{
s
crollOption
,
r
owKey
,
r
owClassName
,
c
ustomRow
,
r
owSelectionOption
,
r
esizeColumn
,
on
GridChange
useS
crollOption
,
useR
owKey
,
useR
owClassName
,
useC
ustomRow
,
useR
owSelectionOption
,
handleR
esizeColumn
,
handle
GridChange
}
}
...
...
@@ -431,7 +431,7 @@ export class GridControl extends MDControl {
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
c
ustom
:
this
.
useCustom
()
useC
ustom
:
this
.
useCustom
()
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/quick-search-form-control/quick-search-form-control.ts
浏览文件 @
56be7c6c
...
...
@@ -21,7 +21,7 @@ export class QuickSearchFormControl extends FormControl {
*/
public
handleEditorEvent
(
actionParam
:
IActionParam
)
{
super
.
handleEditorEvent
(
actionParam
);
this
.
emit
(
"
c
trlEvent"
,
{
this
.
emit
(
"
onC
trlEvent"
,
{
tag
:
this
.
state
.
controlName
,
action
:
"selectionChange"
,
data
:
this
.
state
.
data
,
...
...
@@ -39,8 +39,6 @@ export class QuickSearchFormControl extends FormControl {
const
{
loadDraft
}
=
this
.
useLoadDraft
();
return
{
...
superParams
,
loadDraft
,
handleEditorEvent
:
this
.
handleEditorEvent
.
bind
(
this
),
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/search-form-control/search-form-control.ts
浏览文件 @
56be7c6c
...
...
@@ -20,7 +20,7 @@ export class SearchFormControl extends FormControl {
*/
public
onSearch
()
{
const
{
controlName
}
=
this
.
state
;
this
.
emit
(
"
c
trlEvent"
,
{
this
.
emit
(
"
onC
trlEvent"
,
{
tag
:
controlName
,
action
:
"selectionChange"
,
data
:
this
.
state
.
data
,
...
...
@@ -78,13 +78,10 @@ export class SearchFormControl extends FormControl {
const
{
loadDraft
}
=
this
.
useLoadDraft
();
return
{
...
superParams
,
loadDraft
,
onSearch
:
this
.
onSearch
.
bind
(
this
),
onCancel
:
this
.
onCancel
.
bind
(
this
),
addHistoryItem
:
this
.
addHistoryItem
.
bind
(
this
),
removeHistoryItem
:
this
.
removeHistoryItem
.
bind
(
this
),
handleEditorEvent
:
this
.
handleEditorEvent
.
bind
(
this
),
handleComponentEvent
:
this
.
handleComponentEvent
.
bind
(
this
),
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/components/layout/app-view-base-layout.scss
浏览文件 @
56be7c6c
...
...
@@ -12,14 +12,15 @@
flex-direction
:
column
;
padding
:
0
10px
;
background-color
:
var
(
--
app-view-layout-header-bg-color
);
border-bottom
:
1px
solid
var
(
--
app-view-layout-header-border-bottom
);
}
.app-view-layout__header-content
{
display
:
flex
;
justify-content
:
space-between
;
height
:
var
(
--
app-view-layout-header-height
);
border-bottom
:
1px
solid
var
(
--
app-view-layout-header-border-bottom
);
margin
:
--
app-view-layout-header-padding
;
.app-view__caption
{
white-space
:
nowrap
;
font-size
:
var
(
--
app-view-caption-font-size
);
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/views/view-base.scss
浏览文件 @
56be7c6c
.app-view-layout--default
{
.app-view-layout__header
{
.app-view-layout__header-content
{
white-space
:
nowrap
;
}
}
.app-quick-search
{
display
:
flex
;
align-items
:
center
;
}
.app-quick-search-form
{
padding-top
:
12px
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}.vue.hbs
浏览文件 @
56be7c6c
...
...
@@ -23,7 +23,7 @@ const props = withDefaults(defineProps<Props>(), {
// emit声明
interface
ViewEmit
{
(
name
:
"
v
iewEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"
onV
iewEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
ViewEmit
>
();
...
...
@@ -51,7 +51,7 @@ const { state, form, handleToolbarEvent } = new EditView(viewState, props, emit)
mode=
"button"
name=
"
{{
lowerCase
codeName
}}
"
:actionModel=
"state.toolbar"
@
t
oolbarEvent=
"handleToolbarEvent"
/>
@
onT
oolbarEvent=
"handleToolbarEvent"
/>
</template>
{{/
eq
}}
{{#
eq
controlType
"FORM"
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
浏览文件 @
56be7c6c
...
...
@@ -30,13 +30,13 @@ const props = withDefaults(defineProps<Props>(), {
// emit声明
interface
ViewEmit
{
(
name
:
"
v
iewEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"
onV
iewEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
grid
,
handleCtrlEvent
,
handleToolbarEvent
,
onSearchFormSearch
}
=
new
GridView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
grid
,
handleCtrlEvent
,
handleToolbarEvent
}
=
new
GridView
(
viewState
,
props
,
emit
).
moduleInstall
();
</script>
...
...
@@ -52,14 +52,14 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, onSearchFormSearch } =
mode=
"button"
name=
"
{{
lowerCase
codeName
}}
"
:actionModel=
"state.toolbar"
@
t
oolbarEvent=
"handleToolbarEvent"
/>
@
onT
oolbarEvent=
"handleToolbarEvent"
/>
</template>
{{/
eq
}}
{{#if
(
and
(
eq
controlType
"SEARCHFORM"
)
(
eq
name
'searchform'
))
}}
{{#if
page
.
enableFilter
}}
<template
v-slot:quickSearch
>
<div
class=
'app-quick-search'
>
<a-input
@
click=
"onSearchFormSearch"
/>
<a-input/>
<a-popover
trigger=
"click"
:overlayStyle=
"{width: '50%'}"
>
<template
#
content
>
<
{{
codeName
}}
SearchForm
...
...
@@ -67,7 +67,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, onSearchFormSearch } =
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
c
trlEvent=
"handleCtrlEvent"
@
onC
trlEvent=
"handleCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
<a-button><filter-outlined
/></a-button>
...
...
@@ -81,7 +81,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, onSearchFormSearch } =
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
c
trlEvent=
"handleCtrlEvent"
@
onC
trlEvent=
"handleCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
{{/if}}
...
...
@@ -93,7 +93,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, onSearchFormSearch } =
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
camelCase
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
c
trlEvent=
"handleCtrlEvent"
@
onC
trlEvent=
"handleCtrlEvent"
></
{{
codeName
}}
QuickSearchForm>
</template>
{{/if}}
...
...
@@ -107,7 +107,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, onSearchFormSearch } =
:viewParams=
"state.viewParams"
:controlAction=
"state.
{{
name
}}
.action"
:viewSubject=
"state.viewSubject"
@
c
trlEvent=
"handleCtrlEvent"
@
onC
trlEvent=
"handleCtrlEvent"
></
{{
codeName
}}
Grid>
{{/
eq
}}
{{/
page
.
ctrls
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
浏览文件 @
56be7c6c
...
...
@@ -19,7 +19,7 @@ const props = withDefaults(defineProps < Props > (), {
// emit声明
interface
CtrlEmit
{
(
name
:
"
c
trlEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"
onC
trlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
浏览文件 @
56be7c6c
...
...
@@ -27,11 +27,11 @@ const props = withDefaults(defineProps < Props > (), {
})
// emit声明
const
emit
=
defineEmits
<
{(
event
:
'
c
trlevent'
,
value
:
IActionParam
):
void
;}
>
();
const
emit
=
defineEmits
<
{(
event
:
'
onC
trlevent'
,
value
:
IActionParam
):
void
;}
>
();
// 安装功能模块,提供状态和能力
const
{
state
,
c
ustom
}
=
new
GridControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
scrollOption
,
rowKey
,
rowClassName
,
customRow
,
rowSelectionOption
,
resizeColumn
,
onGridChange
}
=
c
ustom
;
const
{
state
,
useC
ustom
}
=
new
GridControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
useScrollOption
,
useRowKey
,
useRowClassName
,
useCustomRow
,
useRowSelectionOption
,
handleResizeColumn
,
handleGridChange
}
=
useC
ustom
;
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
...
...
@@ -51,8 +51,8 @@ defineExpose({ state, name: '{{ctrl.name}}' });
:pagination=
"state.mdCtrlPaging.pagination"
:customRow=
"customRow"
:rowClassName=
"rowClassName"
@
change=
"
on
GridChange"
@
resizeColumn=
"
r
esizeColumn"
@
change=
"
handle
GridChange"
@
resizeColumn=
"
handleR
esizeColumn"
>
<template
#
emptyText
>
<div
class=
"not-data"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@QUICKSEARCHFORM}}-quick-search-form/{{ctrls@QUICKSEARCHFORM}}-quick-search-form.vue.hbs
浏览文件 @
56be7c6c
...
...
@@ -20,7 +20,7 @@ const props = withDefaults(defineProps<Props>(), {
// emit声明
interface
CtrlEmit
{
(
name
:
"
c
trlEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"
onC
trlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@SEARCHFORM}}-search-form/{{ctrls@SEARCHFORM}}-search-form.vue.hbs
浏览文件 @
56be7c6c
...
...
@@ -20,7 +20,7 @@ const props = withDefaults(defineProps<Props>(), {
// emit声明
interface
CtrlEmit
{
(
name
:
"
c
trlEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"
onC
trlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录