Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
7172ae9a
提交
7172ae9a
编写于
3月 07, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
1、快速分组搜索调整 2、搜索表单按钮位置、按钮样式支持
上级
eea3989e
变更
11
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
80 行增加
和
32 行删除
+80
-32
app-code-list-config.ts.hbs
...7/app_{{apps}}/src/app/config/app-code-list-config.ts.hbs
+1
-1
app-quick-group.vue
...r7/app_{{apps}}/src/components/common/app-quick-group.vue
+15
-5
md-view.ts
...r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
+9
-14
search-form-control-state.ts
.../widgets/search-form-control/search-form-control-state.ts
+6
-1
search-form.scss
.../templ/r7/app_{{apps}}/src/style/widgets/search-form.scss
+11
-0
{{pages@DEGRIDVIEW}}.vue.hbs
...dules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
+5
-2
{{pages@DELISTVIEW}}.vue.hbs
...dules}}/{{pages@DELISTVIEW}}/{{pages@DELISTVIEW}}.vue.hbs
+5
-2
{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
...ges@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
+1
-1
{{pages@DETREEVIEW}}.vue.hbs
...dules}}/{{pages@DETREEVIEW}}/{{pages@DETREEVIEW}}.vue.hbs
+10
-3
{{ctrls@SEARCHFORM}}-search-form-state.ts.hbs
...search-form/{{ctrls@SEARCHFORM}}-search-form-state.ts.hbs
+1
-0
{{ctrls@SEARCHFORM}}-search-form.vue.hbs
...RM}}-search-form/{{ctrls@SEARCHFORM}}-search-form.vue.hbs
+16
-3
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/config/app-code-list-config.ts.hbs
浏览文件 @
7172ae9a
...
...
@@ -25,7 +25,7 @@ export const AppCodeListConfig:IParam = {
'items':[
{{#
each
appCodeList
.
psCodeItems
as
|
codeItem
|
}}
{{#
codeItem
}}
{'value':
{{#if
appCodeList
.
codeItemValueNumber
}}{{
value
}}{{else}}
'
{{
value
}}
'
{{/if}}
, 'text': '
{{
text
}}
','codeName': '
{{
codeName
}}
','textClass': '
{{#if
textCls
}}{{
textCls
}}{{else
if
psSysCss
}}{{
psSysCss
.
cssName
}}{{/if}}
',
{{#if
psSysImage
}}{{#if
psSysImage
.
cssClass
}}
'cssClass': '
{{
psSysImage
.
cssClass
}}
',
{{/if}}{{#if
psSysImage
.
imagePath
}}
'imagePath': '
{{
psSysImage
.
imagePath
}}
'
{{/if}}{{/if}}
}
{{#
unless
@last
}}
,
{{/
unless
}}
{'value':
{{#if
appCodeList
.
codeItemValueNumber
}}{{
value
}}{{else}}
'
{{
value
}}
'
{{/if}}
, 'text': '
{{
text
}}
','codeName': '
{{
codeName
}}
',
{{#if
data
}}
'data': `
{{
data
}}
`,
{{/if}}
'textClass': '
{{#if
textCls
}}{{
textCls
}}{{else
if
psSysCss
}}{{
psSysCss
.
cssName
}}{{/if}}
',
{{#if
psSysImage
}}{{#if
psSysImage
.
cssClass
}}
'cssClass': '
{{
psSysImage
.
cssClass
}}
',
{{/if}}{{#if
psSysImage
.
imagePath
}}
'imagePath': '
{{
psSysImage
.
imagePath
}}
'
{{/if}}{{/if}}
}
{{#
unless
@last
}}
,
{{/
unless
}}
{{/
codeItem
}}
{{/
each
}}
]
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-quick-group.vue
浏览文件 @
7172ae9a
<
script
setup
lang=
"ts"
>
import
{
IActionParam
,
IParam
}
from
'@core'
;
import
{
IActionParam
,
I
Context
,
I
Param
}
from
'@core'
;
import
{
Ref
,
onBeforeMount
}
from
'vue'
;
interface
QuickGroupProps
{
quickGroupModel
:
IParam
;
context
:
IContext
;
viewParams
:
IParam
;
}
interface
FormGroupEmit
{
(
name
:
'onQuickGroupEvent'
,
value
:
IActionParam
):
void
;
...
...
@@ -24,11 +26,19 @@ const handleClick = ($event: any) => {
});
};
// 代码表服务
const
codeListService
=
App
.
getCodeListService
();
onBeforeMount
(()
=>
{
items
.
value
=
props
.
quickGroupModel
.
codeItems
;
//todo
// let res: any = await this.codeListService.getDataItems({ tag: this.quickGroupCodeList.codeName, type: this.quickGroupCodeList.codeListType, data: this.quickGroupCodeList, context: this.context });
// this.quickGroupModel = this.handleDynamicData(JSON.parse(JSON.stringify(res)));
if
(
codeListService
)
{
codeListService
.
getCodeListItems
({
tag
:
props
.
quickGroupModel
.
codeListTag
,
context
:
props
.
context
,
viewParams
:
props
.
viewParams
}).
then
((
codeListItems
:
any
[])
=>
{
items
.
value
=
codeListItems
;
// 默认选中第一项
if
(
codeListItems
.
length
)
{
handleClick
(
items
.
value
[
0
]);
}
})
}
});
</
script
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/md-view/md-view.ts
浏览文件 @
7172ae9a
import
{
deepCopy
,
IActionParam
,
IParam
,
isExistAndNotEmpty
,
MainView
,
MDViewState
,
ViewUtil
}
from
'@core'
;
import
{
IActionParam
,
IParam
,
MainView
,
MDViewState
,
ViewUtil
}
from
'@core'
;
/**
* 多数据视图
...
...
@@ -131,13 +131,9 @@ export class MDView extends MainView {
* @memberof MDView
*/
public
handleQuickGroupSearch
(
args
:
any
=
{}):
void
{
const
{
viewParams
}
=
this
.
state
;
const
tempViewParams
=
deepCopy
(
viewParams
);
if
(
args
&&
isExistAndNotEmpty
(
args
.
data
)
&&
typeof
args
.
data
===
'string'
)
{
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
args
.
data
));
}
this
.
state
.
quickGroupData
=
JSON
.
parse
(
args
.
data
);
const
tag
=
this
.
getMDCtrl
().
name
;
this
.
next
({
tag
:
tag
,
action
:
'load'
,
data
:
tempViewParams
});
this
.
next
({
tag
:
tag
,
action
:
'load'
,
data
:
null
});
}
/**
...
...
@@ -215,16 +211,15 @@ export class MDView extends MainView {
if
(
searchBar
)
{
Object
.
assign
(
args
,
searchBar
.
getData
());
}
// 快速搜索
// if (this.view && !this.view.isExpandSearchForm) {
// Object.assign(args, { query: this.view.query });
// }
// 快速分组和快速搜索栏
// if (this.view && this.view.quickGroupData) {
// Object.assign(args, this.view.quickGroupData);
// }
// if (this.view && this.view.quickFormData) {
// Object.assign(args, this.view.quickFormData);
// }
// 快速分组
const
{
quickGroupData
}
=
this
.
state
;
if
(
quickGroupData
&&
Object
.
keys
(
quickGroupData
).
length
)
{
Object
.
assign
(
args
,
quickGroupData
);
}
// 自定义查询条件
// const mdCtrl: any = this.getMDCtrl();
// if (mdCtrl && mdCtrl.controlInstance && mdCtrl.controlInstance.customCond) {
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/search-form-control/search-form-control-state.ts
浏览文件 @
7172ae9a
...
...
@@ -8,5 +8,10 @@ import { FormControlState, IParam } from '@core';
*/
export
interface
SearchFormControlState
extends
FormControlState
{
/**
* @description 自动搜索
* @type {boolean}
* @memberof SearchFormControlState
*/
autoSearch
:
boolean
;
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/search-form.scss
浏览文件 @
7172ae9a
...
...
@@ -24,6 +24,17 @@
}
}
}
&
.right-button
.search-form-footer
{
button
{
width
:
64px
;
}
.reset-button
{
margin-top
:
8px
;
}
.filter-save-button
{
margin-top
:
8px
;
}
}
}
//搜索表单气泡
.search-form-popover
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
浏览文件 @
7172ae9a
...
...
@@ -60,7 +60,7 @@ const counterData = computed(() => {
</template>
{{#if
page
.
enableQuickGroup
}}
<template
v-slot:quickGroupSearch
>
<AppQuickGroup
v-if=
"state.enableQuickGroup"
:quickGroupModel=
"state.quickGroupPSCodeList"
@
onQuickGroupEvent=
"onQuickGroupEvent"
/>
<AppQuickGroup
v-if=
"state.enableQuickGroup"
:quickGroupModel=
"state.quickGroupPSCodeList"
:context=
"state.context"
:viewParams=
"state.viewParams"
@
onQuickGroupEvent=
"onQuickGroupEvent"
/>
</template>
{{/if}}
{{#
page
.
ctrls
}}
...
...
@@ -93,7 +93,7 @@ const counterData = computed(() => {
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
<a-button><filter-outlined
/></a-button>
<a-button
class=
"app-search-form__filter-button"
><filter-outlined
/></a-button>
</a-popover>
</div>
</template>
...
...
@@ -155,5 +155,8 @@ const counterData = computed(() => {
.app-grid-view
{
height
:
100%
;
width
:
100%
;
.app-search-form__filter-button
{
transform
:
translateX
(
-2px
);
}
}
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DELISTVIEW}}/{{pages@DELISTVIEW}}.vue.hbs
浏览文件 @
7172ae9a
...
...
@@ -60,7 +60,7 @@ const counterData = computed(() => {
</template>
{{#if
page
.
enableQuickGroup
}}
<template
v-slot:quickGroupSearch
>
<AppQuickGroup
v-if=
"state.enableQuickGroup"
:quickGroupModel=
"state.quickGroupPSCodeList"
@
onQuickGroupEvent=
"onQuickGroupEvent"
/>
<AppQuickGroup
v-if=
"state.enableQuickGroup"
:quickGroupModel=
"state.quickGroupPSCodeList"
:context=
"state.context"
:viewParams=
"state.viewParams"
@
onQuickGroupEvent=
"onQuickGroupEvent"
/>
</template>
{{/if}}
{{#
page
.
ctrls
}}
...
...
@@ -93,7 +93,7 @@ const counterData = computed(() => {
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
<a-button><filter-outlined
/></a-button>
<a-button
class=
"app-search-form__filter-button"
><filter-outlined
/></a-button>
</a-popover>
</div>
</template>
...
...
@@ -153,5 +153,8 @@ const counterData = computed(() => {
.app-list-view
{
height
:
100%
;
width
:
100%
;
.app-search-form__filter-button
{
transform
:
translateX
(
-2px
);
}
}
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
浏览文件 @
7172ae9a
...
...
@@ -49,7 +49,7 @@ const { state, grid, onCtrlEvent, onQuickGroupEvent, onQuickSearchEvent } = pick
</template>
{{#if
page
.
enableQuickGroup
}}
<template
v-slot:quickGroupSearch
>
<AppQuickGroup
v-if=
"state.enableQuickGroup"
:quickGroupModel=
"state.quickGroupPSCodeList"
@
onQuickGroupEvent=
"onQuickGroupEvent"
/>
<AppQuickGroup
v-if=
"state.enableQuickGroup"
:quickGroupModel=
"state.quickGroupPSCodeList"
:context=
"state.context"
:viewParams=
"state.viewParams"
@
onQuickGroupEvent=
"onQuickGroupEvent"
/>
</template>
{{/if}}
{{#
page
.
ctrls
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DETREEVIEW}}/{{pages@DETREEVIEW}}.vue.hbs
浏览文件 @
7172ae9a
...
...
@@ -59,7 +59,7 @@ const counterData = computed(() => {
</template>
{{#if
page
.
enableQuickGroup
}}
<template
v-slot:quickGroupSearch
>
<AppQuickGroup
v-if=
"state.enableQuickGroup"
:quickGroupModel=
"state.quickGroupPSCodeList"
@
onQuickGroupEvent=
"onQuickGroupEvent"
/>
<AppQuickGroup
v-if=
"state.enableQuickGroup"
:quickGroupModel=
"state.quickGroupPSCodeList"
:context=
"state.context"
:viewParams=
"state.viewParams"
@
onQuickGroupEvent=
"onQuickGroupEvent"
/>
</template>
{{/if}}
{{#
page
.
ctrls
}}
...
...
@@ -92,7 +92,7 @@ const counterData = computed(() => {
@
ctrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
SearchForm>
</template>
<a-button><filter-outlined
/></a-button>
<a-button
class=
"app-search-form__filter-button"
><filter-outlined
/></a-button>
</a-popover>
</div>
</template>
...
...
@@ -146,3 +146,10 @@ const counterData = computed(() => {
{{/
page
.
ctrls
}}
</AppTreeViewLayout>
</template>
<style
lang=
"scss"
>
.app-tree-view
{
.app-search-form__filter-button
{
transform
:
translateX
(
-2px
);
}
}
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@SEARCHFORM}}-search-form/{{ctrls@SEARCHFORM}}-search-form-state.ts.hbs
浏览文件 @
7172ae9a
...
...
@@ -49,6 +49,7 @@ export class ControlVO extends ControlVOBase {
// 部件配置对象
export const ctrlState = {
autoSearch:
{{
ctrl
.
enableAutoSearch
}}
,
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
controlService: new EditFormService
<ControlVO>
(ControlVO, new
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service() ),
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@SEARCHFORM}}-search-form/{{ctrls@SEARCHFORM}}-search-form.vue.hbs
浏览文件 @
7172ae9a
...
...
@@ -33,7 +33,7 @@ defineExpose({ name, state, getData });
<template>
<a-form
name=
"
{{
ctrl
.
codeName
}}
"
class=
"app-search-form
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}{{#if
ctrl
.
searchButtonPos
}}
{{
ctrl
.
searchButtonPos
}}
-button
{{/if}}
"
class=
"app-search-form
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}{{#if
ctrl
.
searchButtonPos
}}
{{
lowerCase
ctrl
.
searchButtonPos
}}
-button
{{/if}}
"
style=
"
{{#if
ctrl
.
formWidth
}}
width:
{{
ctrl
.
formWidth
}}
px;
{{/if}}
"
:model=
"state.data"
:rules=
"state.rules"
>
...
...
@@ -56,7 +56,8 @@ defineExpose({ name, state, getData });
</a-row>
</a-col>
<a-col
class=
'search-form-footer'
>
{{#if
(
eq
ctrl
.
searchButtonStyle
'DEFAULT'
)
}}
{{#if
ctrl
.
enableFilterSave
}}
{{#
eq
ctrl
.
searchButtonStyle
'DEFAULT'
}}
<a-select
allowClear
class=
"search-form-history"
...
...
@@ -67,6 +68,7 @@ defineExpose({ name, state, getData });
</a-select>
<a-button
class=
'search-button'
@
click=
"onSearch"
type=
"primary"
>
搜索
</a-button>
<a-button
class=
'reset-button'
@
click=
'loadDraft'
>
重置
</a-button>
{{#if
ctrl
.
enableFilterSave
}}
<a-popover
title=
"存储自定义查询"
v-model:visible=
'state.showPopover'
overlayClassName=
"search-form-popover"
>
<template
#
content
>
<a-input
/>
...
...
@@ -77,8 +79,19 @@ defineExpose({ name, state, getData });
</template>
<a-button><save-outlined
/></a-button>
</a-popover>
{{else
if
(
eq
ctrl
.
searchButtonStyle
'SEARCHONLY'
)
}}
{{/if}}
{{/
eq
}}
{{#
eq
ctrl
.
searchButtonStyle
'SEARCHONLY'
}}
<a-button
class=
'search-button'
type=
"primary"
>
搜索
</a-button>
{{/
eq
}}
{{else}}
{{#
eq
ctrl
.
searchButtonStyle
'DEFAULT'
}}
<a-button
class=
'search-button'
@
click=
"onSearch"
type=
"primary"
>
搜索
</a-button>
<a-button
class=
'reset-button'
@
click=
'loadDraft'
>
重置
</a-button>
{{/
eq
}}
{{#
eq
ctrl
.
searchButtonStyle
'SEARCHONLY'
}}
<a-button
class=
'search-button'
type=
"primary"
>
搜索
</a-button>
{{/
eq
}}
{{/if}}
</a-col>
</a-row>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录