Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
d9e87a5a
提交
d9e87a5a
编写于
12月 28, 2021
作者:
RedPig97
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 更新
上级
d6df1d22
变更
16
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
476 行增加
和
42 行删除
+476
-42
data-picker-view.hbs
...ain/resources/templ/r7/@macro/editor/data-picker-view.hbs
+28
-0
data-picker.hbs
...src/main/resources/templ/r7/@macro/editor/data-picker.hbs
+9
-22
include-editor.hbs
.../main/resources/templ/r7/@macro/editor/include-editor.hbs
+5
-1
IbizDataPickerView.vue
...pp_{{apps}}/src/components/editors/IbizDataPickerView.vue
+222
-0
index.ts
...empl/r7/app_{{apps}}/src/ibiz-core/modules/views/index.ts
+2
-1
index.ts
...s}}/src/ibiz-core/modules/views/pickup-grid-view/index.ts
+3
-0
pickup-grid-view-prop.ts
...e/modules/views/pickup-grid-view/pickup-grid-view-prop.ts
+9
-0
pickup-grid-view-state.ts
.../modules/views/pickup-grid-view/pickup-grid-view-state.ts
+11
-0
pickup-grid-view.ts
...z-core/modules/views/pickup-grid-view/pickup-grid-view.ts
+47
-0
index.ts
...{{apps}}/src/ibiz-core/modules/views/pickup-view/index.ts
+3
-3
pickup-view.ts
...}}/src/ibiz-core/modules/views/pickup-view/pickup-view.ts
+18
-0
index.ts
...biz-core/modules/widgets/pickupviewpanel-control/index.ts
+3
-3
{{pages@DEPICKUPGRIDVIEW}}-config.ts.hbs
...PICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}-config.ts.hbs
+16
-0
{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
...ges@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
+83
-0
{{pages@DEPICKUPVIEW}}-config.ts.hbs
...pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}-config.ts.hbs
+16
-0
{{pages@DEPICKUPVIEW}}.vue.hbs
...s}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
+1
-12
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/editor/data-picker-view.hbs
0 → 100644
浏览文件 @
d9e87a5a
<IbizDataPickerView
name=
"
{{
item
.
codeName
}}
"
:value=
"state.data.
{{
item
.
psEditor
.
name
}}
"
:data=
"state.data"
{{#if
item
.
valueItemName
}}
valueItem=
"
{{
item
.
valueItemName
}}
"
{{/if}}
{{#if
item
.
psEditor
.
placeHolder
}}
placeholder=
"
{{
item
.
psEditor
.
placeHolder
}}
"
{{/if}}
{{#if
item
.
psEditor
.
disabled
}}
disabled=
"
{{
item
.
psEditor
.
disabled
}}
"
{{/if}}
{{#if
item
.
psEditor
.
psNavigateContexts
}}
localContext=
"
{{
item
.
psEditor
.
psNavigateContexts
}}
"
{{/if}}
{{#if
item
.
psEditor
.
psNavigateParams
}}
localParam=
"
{{
item
.
psEditor
.
psNavigateParams
}}
"
{{/if}}
:contextProp=
"state.context"
:viewParamsProp=
"state.viewParams"
{{#if
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}
sort=
"
{{
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}
"
{{/if}}
{{#if
item
.
psEditor
.
pickUpData
}}
pickUpData=
"
{{
item
.
psEditor
.
pickUpData
}}
"
{{/if}}
@
editorEvent=
"handleEditorEvent"
/>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/editor/data-picker.hbs
浏览文件 @
d9e87a5a
...
@@ -36,29 +36,16 @@
...
@@ -36,29 +36,16 @@
{{#if
item
.
psEditor
.
pickUpData
}}
{{#if
item
.
psEditor
.
pickUpData
}}
pickUpData=
"
{{
item
.
psEditor
.
pickUpData
}}
"
pickUpData=
"
{{
item
.
psEditor
.
pickUpData
}}
"
{{/if}}
{{/if}}
{{#
eq
item
.
psEditor
.
editorType
"PICKEREX_LINKONLY"
}}
{{#
if
(
or
(
eq
item
.
psEditor
.
editorType
"PICKEREX_LINKONLY"
)
(
eq
item
.
psEditor
.
editorType
"PICKEREX_LINK"
))
}}
:linkOnly=
"true"
:linkOnly=
"true"
{{/
eq
}}
{{/if}}
{{#
eq
item
.
psEditor
.
editorType
"PICKEREX_LINK"
}}
{{#if
(
or
(
eq
item
.
psEditor
.
editorType
"PICKEREX_NOAC"
)
(
eq
item
.
psEditor
.
editorType
"PICKEREX_NOAC_LINK"
))
}}
:linkOnly=
"true"
{{/
eq
}}
{{#
eq
item
.
psEditor
.
editorType
"PICKEREX_NOAC"
}}
:noAC=
"true"
{{/
eq
}}
{{#
eq
item
.
psEditor
.
editorType
"PICKEREX_NOAC_LINK"
}}
:noAC=
"true"
:noAC=
"true"
{{/
eq
}}
{{/if}}
{{#
eq
item
.
psEditor
.
editorType
"PICKEREX_TRIGGER"
}}
{{#if
(
or
(
eq
item
.
psEditor
.
editorType
"PICKEREX_TRIGGER"
)
(
eq
item
.
psEditor
.
editorType
"PICKEREX_TRIGGER_LINK"
))
}}
:isDropdown=
"true"
{{/
eq
}}
{{#
eq
item
.
psEditor
.
editorType
"PICKEREX_TRIGGER_LINK"
}}
:isDropdown=
"true"
:isDropdown=
"true"
{{/
eq
}}
{{/if}}
{{!-- {{#if (or (eq item.psEditor.editorType "PICKEREX_LINKONLY") (eq item.psEditor.editorType "PICKEREX_LINK"))}} --}}
{{#if
(
or
(
eq
item
.
psEditor
.
editorType
"ADDRESSPICKUP"
)
(
eq
item
.
psEditor
.
editorType
"ADDRESSPICKUP_AC"
))
}}
{{!-- :linkOnly="true" --}}
:multiple=
"true"
{{!-- {{else (or (eq item.psEditor.editorType "PICKEREX_NOAC") (eq item.psEditor.editorType "PICKEREX_NOAC_LINK"))}} --}}
{{/if}}
{{!-- :noAC="true" --}}
{{!-- {{else (or (eq item.psEditor.editorType "PICKEREX_TRIGGER") (eq item.psEditor.editorType "PICKEREX_TRIGGER_LINK"))}} --}}
{{!-- :isDropdown="true" --}}
{{!-- {{/if}} --}}
@
editorEvent=
"handleEditorEvent"
/>
@
editorEvent=
"handleEditorEvent"
/>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/editor/include-editor.hbs
浏览文件 @
d9e87a5a
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
{{#
*
inline
"PICKEREX_LINK"
}}{{>
@macro
/
editor
/
data-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICKEREX_LINK"
}}{{>
@macro
/
editor
/
data-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICKEREX_DROPDOWNVIEW"
}}{{>
@macro
/
editor
/
data-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICKEREX_DROPDOWNVIEW"
}}{{>
@macro
/
editor
/
data-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICKEREX_DROPDOWNVIEW_LINK"
}}{{>
@macro
/
editor
/
data-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICKEREX_DROPDOWNVIEW_LINK"
}}{{>
@macro
/
editor
/
data-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"ADDRESSPICKUP"
}}{{>
@macro
/
editor
/
data-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"ADDRESSPICKUP_AC"
}}{{>
@macro
/
editor
/
data-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"DATEPICKEREX"
}}{{>
@macro
/
editor
/
date-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"DATEPICKEREX"
}}{{>
@macro
/
editor
/
date-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"DATEPICKEREX_NOTIME"
}}{{>
@macro
/
editor
/
date-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"DATEPICKEREX_NOTIME"
}}{{>
@macro
/
editor
/
date-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"DATEPICKER"
}}{{>
@macro
/
editor
/
date-picker
.
hbs
}}{{/
inline
}}
{{#
*
inline
"DATEPICKER"
}}{{>
@macro
/
editor
/
date-picker
.
hbs
}}{{/
inline
}}
...
@@ -44,3 +46,5 @@
...
@@ -44,3 +46,5 @@
{{#
*
inline
"FILEUPLOADER_ONE"
}}{{>
@macro
/
editor
/
upload
.
hbs
}}{{/
inline
}}
{{#
*
inline
"FILEUPLOADER_ONE"
}}{{>
@macro
/
editor
/
upload
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICTURE"
}}{{>
@macro
/
editor
/
upload
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICTURE"
}}{{>
@macro
/
editor
/
upload
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICTURE_ONE"
}}{{>
@macro
/
editor
/
upload
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICTURE_ONE"
}}{{>
@macro
/
editor
/
upload
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICKEREX_DROPDOWNVIEW"
}}{{>
@macro
/
editor
/
data-picker-view
.
hbs
}}{{/
inline
}}
{{#
*
inline
"PICKEREX_DROPDOWNVIEW_LINK"
}}{{>
@macro
/
editor
/
data-picker-view
.
hbs
}}{{/
inline
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/IbizDataPickerView.vue
0 → 100644
浏览文件 @
d9e87a5a
<
script
setup
lang=
"ts"
>
import
{
onBeforeMount
,
Ref
,
ref
}
from
'vue'
;
import
{
SearchOutlined
,
ExportOutlined
}
from
'@ant-design/icons-vue'
;
import
{
deepCopy
,
IParam
,
IActionParam
,
EditorBase
}
from
'@ibiz-core'
;
interface
DataPickerViewProps
{
/**
* @description 编辑器名称
*/
name
:
string
;
/**
* @description 值项
*/
valueItem
:
string
;
/**
* @description 编辑器值
*/
value
:
any
;
/**
* @description 禁用
*/
disabled
?:
boolean
;
/**
* @description 占位提示信息
*/
placeholder
?:
string
;
/**
* @description 表单数据或表格行数据
*/
data
?:
any
;
/**
* @description 上下文
*/
contextProp
?:
any
;
/**
* @description 视图参数
*/
viewParamsProp
?:
any
;
/**
* @description 局部上下文
*/
localContext
?:
any
;
/**
* @description 局部视图参数
*/
localParam
?:
any
;
/**
* @description 主信息属性
*/
deMajorField
?:
string
;
/**
* @description 主键属性
*/
deKeyField
?:
string
;
/**
* @description 选择视图
*/
pickUpView
?:
any
;
/**
* @description 链接视图
*/
linkView
?:
any
;
/**
* @description ac参数
*/
acParams
?:
any
;
/**
* @description 排序
*/
sort
?:
string
;
/**
* @description 外键值附加数据
*/
pickUpData
?:
string
;
linkOnly
:
boolean
;
isAC
:
boolean
;
isDropdown
:
boolean
;
}
interface
EditorEmit
{
(
name
:
'editorEvent'
,
value
:
IActionParam
):
void
;
}
const
props
=
withDefaults
(
defineProps
<
DataPickerViewProps
>
(),
{
deMajorField
:
'srfmajortext'
,
deKeyField
:
'srfkey'
,
linkOnly
:
false
,
isAC
:
false
,
isDropdown
:
false
,
});
const
emit
=
defineEmits
<
EditorEmit
>
();
const
{
handleEditorNavParams
,
openLinkView
,
openPickUpView
}
=
new
EditorBase
();
const
{
navContext
,
navViewParam
}
=
handleEditorNavParams
(
props
);
let
items
:
Ref
<
any
[]
>
=
ref
([]);
/**
* @description 初始化items
*/
const
initItems
=
()
=>
{
if
(
props
.
valueItem
&&
props
.
data
)
{
items
.
value
.
push
({
[
props
.
deMajorField
]:
props
.
value
,
[
props
.
deKeyField
]:
props
.
data
[
props
.
valueItem
],
});
}
};
/**
* @description 填充外键值附加数据
* @param item 选中数据
*/
const
fillPickUpData
=
(
item
:
IParam
)
=>
{
if
(
props
.
pickUpData
)
{
let
pickUpDataArray
:
string
[]
=
props
.
pickUpData
.
split
(
';'
);
if
(
pickUpDataArray
&&
pickUpDataArray
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
pickUpDataArray
.
length
;
i
++
)
{
if
(
item
)
{
emit
(
'editorEvent'
,
{
tag
:
pickUpDataArray
[
i
],
action
:
'valueChange'
,
data
:
item
[
pickUpDataArray
[
i
]],
});
}
else
{
emit
(
'editorEvent'
,
{
tag
:
pickUpDataArray
[
i
],
action
:
'valueChange'
,
data
:
null
,
});
}
}
}
}
};
/**
* @description 搜索
* @param value 搜索值
*/
const
onSearch
=
(
value
:
string
)
=>
{
let
_navContext
=
deepCopy
(
navContext
);
let
_navViewParam
=
deepCopy
(
navViewParam
);
Object
.
assign
(
_navViewParam
,
{
query
:
value
,
size
:
1000
});
if
(
props
.
sort
)
{
Object
.
assign
(
_navViewParam
,
{
sort
:
props
.
sort
});
}
// TODO数据服务请求数据
items
.
value
=
[
{
srfkey
:
'4646'
,
srfmajortext
:
'Jack'
,
},
{
srfkey
:
'49897'
,
srfmajortext
:
'Lucy'
,
},
{
srfkey
:
'164646'
,
srfmajortext
:
'Disabled'
,
},
{
srfkey
:
'4646'
,
srfmajortext
:
'Yiminghe'
,
},
];
};
const
filterOption
=
(
inputValue
:
string
,
option
:
IParam
)
=>
{
return
option
[
props
.
deMajorField
].
toUpperCase
().
indexOf
(
inputValue
.
toUpperCase
())
>=
0
;
};
const
onSelect
=
(
value
:
any
)
=>
{
const
selectItem
=
items
.
value
.
find
((
item
:
IParam
)
=>
Object
.
is
(
item
[
props
.
deKeyField
],
value
));
emit
(
'editorEvent'
,
{
tag
:
props
.
name
,
action
:
'valueChange'
,
data
:
selectItem
[
props
.
deMajorField
],
});
emit
(
'editorEvent'
,
{
tag
:
props
.
valueItem
,
action
:
'valueChange'
,
data
:
selectItem
[
props
.
deKeyField
]
});
fillPickUpData
(
selectItem
);
};
</
script
>
<
template
>
<a-select
:class=
"['app-data-picker', `app-data-picker-$
{name}`]"
allowClear
showSearch
v-model:value="value"
:disabled="disabled"
:filterOption="false"
:options="items"
@change="onChange"
@search="onSearch"
:placeholder="placeholder"
>
<template
#
suffixIcon
>
<select-outlined
v-if=
"linkView"
@
click=
"openLinkView"
/>
</
template
>
<
template
#
option=
"item"
>
</
template
>
</a-select>
</template>
<
style
scoped
></
style
>
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/index.ts
浏览文件 @
d9e87a5a
...
@@ -4,3 +4,4 @@ export * from './edit-view'
...
@@ -4,3 +4,4 @@ export * from './edit-view'
export
*
from
'./index-view'
export
*
from
'./index-view'
export
*
from
'./grid-view'
export
*
from
'./grid-view'
export
*
from
'./pickup-view'
export
*
from
'./pickup-view'
export
*
from
'./pickup-grid-view'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/pickup-grid-view/index.ts
0 → 100644
浏览文件 @
d9e87a5a
export
*
from
'./pickup-grid-view-prop'
export
*
from
'./pickup-grid-view-state'
export
*
from
'./pickup-grid-view'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/pickup-grid-view/pickup-grid-view-prop.ts
0 → 100644
浏览文件 @
d9e87a5a
import
{
MainViewProps
}
from
"@ibiz-core"
;
/**
* @description 选择视图props
* @export
* @interface PickupGridViewProps
* @extends {MainViewProps}
*/
export
interface
PickupGridViewProps
extends
MainViewProps
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/pickup-grid-view/pickup-grid-view-state.ts
0 → 100644
浏览文件 @
d9e87a5a
import
{
ControlAction
,
MainViewState
}
from
'@ibiz-core'
;
/**
* @description 选择视图状态
* @export
* @interface PickupGridViewState
* @extends {ViewStateBase}
*/
export
interface
PickupGridViewState
extends
MainViewState
{
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/pickup-grid-view/pickup-grid-view.ts
0 → 100644
浏览文件 @
d9e87a5a
import
{
PickupView
}
from
"../pickup-view"
;
import
{
PickupGridViewProps
}
from
"./pickup-grid-view-prop"
;
import
{
PickupGridViewState
}
from
"./pickup-grid-view-state"
;
/**
* @description 选择视图
* @export
* @class PickupGridView
* @extends {MainView}
*/
export
class
PickupGridView
extends
PickupView
{
/**
* @description 视图状态
* @type {PickupGridViewState}
* @memberof PickupGridView
*/
public
declare
viewState
:
PickupGridViewState
;
/**
* @description 使用加载功能模块
* @param {PickupGridViewProps} props 传入的props
* @memberof PickupGridView
*/
public
useLoad
(
props
:
PickupGridViewProps
)
{
const
{
viewSubject
}
=
this
.
viewState
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
'grid'
,
action
:
"load"
,
data
:
{}
})
})
}
/**
* @description 安装视图所有功能模块的方法
* @param {PickupGridViewProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof PickupGridView
*/
public
moduleInstall
(
props
:
PickupGridViewProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
this
.
useLoad
(
props
);
return
{
...
superParams
,
state
:
this
.
viewState
,
};
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/pickup-view/index.ts
浏览文件 @
d9e87a5a
export
{
PickupView
}
from
'./pickup-view'
;
export
*
from
'./pickup-view-prop'
export
{
PickupViewProps
}
from
'./pickup-view-prop'
;
export
*
from
'./pickup-view-state'
export
{
PickupViewState
}
from
'./pickup-view-state'
;
export
*
from
'./pickup-view'
\ No newline at end of file
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/pickup-view/pickup-view.ts
浏览文件 @
d9e87a5a
...
@@ -29,6 +29,22 @@ export class PickupView extends MainView {
...
@@ -29,6 +29,22 @@ export class PickupView extends MainView {
})
})
}
}
/**
* @description 取消
* @memberof PickupView
*/
public
cancel
()
{
//todo
}
/**
* @description 确认
* @memberof PickupView
*/
public
confirm
()
{
//todo
}
/**
/**
* @description 安装视图所有功能模块的方法
* @description 安装视图所有功能模块的方法
* @param {PickupViewProps} props 传入的Props
* @param {PickupViewProps} props 传入的Props
...
@@ -42,6 +58,8 @@ export class PickupView extends MainView {
...
@@ -42,6 +58,8 @@ export class PickupView extends MainView {
return
{
return
{
...
superParams
,
...
superParams
,
state
:
this
.
viewState
,
state
:
this
.
viewState
,
cancel
:
this
.
cancel
.
bind
(
this
),
confirm
:
this
.
confirm
.
bind
(
this
)
};
};
}
}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/pickupviewpanel-control/index.ts
浏览文件 @
d9e87a5a
export
{
PickupViewPanelControlProps
}
from
'./pickupviewpanel-control-prop'
;
export
*
from
'./pickupviewpanel-control-prop'
export
{
PickupViewPanelControlState
}
from
'./pickupviewpanel-control-state'
;
export
*
from
'./pickupviewpanel-control-state'
export
{
PickupViewPanelControl
}
from
'./pickupviewpanel-control'
;
export
*
from
'./pickupviewpanel-control'
\ No newline at end of file
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}-config.ts.hbs
0 → 100644
浏览文件 @
d9e87a5a
export const ViewConfig = {
viewCodeName: '
{{
page
.
codeName
}}
',
viewName: '
{{
page
.
name
}}
',
viewCaption: '
{{
page
.
caption
}}
',
{{#
page
.
ctrls
}}
{{#
eq
controlType
"GRID"
}}
{{
lowerCase
codeName
}}
:{
name:'
{{
name
}}
',
codeName:'
{{
codeName
}}
',
action:{
'createAction': 'Create'
}
},
{{/
eq
}}
{{/
page
.
ctrls
}}
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
0 → 100644
浏览文件 @
d9e87a5a
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
PickupGridView
,
IActionParam
,
IParam
}
from
'@ibiz-core'
;
import
{
ViewConfig
}
from
'./
{{
spinalCase
page
.
codeName
}}
-config'
;
{{#
page
.
ctrls
}}
{{#
eq
controlType
"GRID"
}}
import
{
{{
codeName
}}
Grid
}
from
'@widgets/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-grid'
;
{{/
eq
}}
{{/
page
.
ctrls
}}
import
{
MainGrid
}
from
'@widgets/example/main-grid'
;
// props声明和默认值处理
interface
Props
{
context
:
IParam
;
viewParams
?:
IParam
;
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
viewSubject
?:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
// 设定默认值,可选属性可以在这初始化
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
// emit声明
interface
ViewEmit
{
(
name
:
"viewEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
}
=
new
PickupGridView
(
ViewConfig
).
moduleInstall
(
props
);
</script>
<template>
<IbizDefaultViewLayout
class=
"ibiz-pickup-grid-view"
>
<template
v-slot:header-left
>
<IbizIconText
class=
"ibiz-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
{{#
page
.
ctrls
}}
{{
controlType
}}
{{#
eq
controlType
"GRID"
}}
<
{{
codeName
}}
Grid
:context=
"state.context"
:multiple=
"false"
:rowEditState=
"state.rowEditState"
:rowActiveMode=
"state.gridRowActiveMode"
:showBusyIndicator=
"true"
:viewParams=
"state.viewParams"
:controlAction=
"state.controlsAction"
:viewSubject=
"state.viewSubject"
></
{{
codeName
}}
Grid>
{{/
eq
}}
{{/
page
.
ctrls
}}
<MainGrid
:context=
"state.context"
:multiple=
"false"
:rowEditState=
"state.rowEditState"
:rowActiveMode=
"state.gridRowActiveMode"
:showBusyIndicator=
"true"
:viewParams=
"state.viewParams"
:controlAction=
"state.controlsAction"
:viewSubject=
"state.viewSubject"
></MainGrid>
<template
v-slot:footer
>
<a-space
class=
"ibiz-pickup-grid-view--footer"
>
<a-button
@
click=
"cancel"
>
取消
</a-button>
<a-button
@
click=
"confirm"
>
确认
</a-button>
</a-space>
</template>
</IbizDefaultViewLayout>
</template>
<style
lang=
"scss"
>
.ibiz-pickup-grid-view
{
position
:
relative
;
.ibiz-pickup-grid-view--footer
{
position
:
absolute
;
bottom
:
20px
;
right
:
35px
;
}
}
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages}}/{{pages@DEPICKUPVIEW}}-config.ts.hbs
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages
@DEPICKUPVIEW
}}/{{pages@DEPICKUPVIEW}}-config.ts.hbs
浏览文件 @
d9e87a5a
...
@@ -3,16 +3,6 @@ export const ViewConfig = {
...
@@ -3,16 +3,6 @@ export const ViewConfig = {
viewName: '
{{
page
.
name
}}
',
viewName: '
{{
page
.
name
}}
',
viewCaption: '
{{
page
.
caption
}}
',
viewCaption: '
{{
page
.
caption
}}
',
{{#
page
.
ctrls
}}
{{#
page
.
ctrls
}}
{{#
eq
controlType
"TOOLBAR"
}}
{{
lowerCase
codeName
}}
:{
name:'
{{
name
}}
',
items:[
{{#
pSDEToolbarItems
}}
{ name:'
{{
name
}}
',caption:'
{{
caption
}}
',groupExtractMode:'
{{
groupExtractMode
}}
',itemType:'
{{
itemType
}}
',noPrivDisplayMode:'
{{
noPrivDisplayMode
}}
',showIcon:
{{
showIcon
}}
,showCaption:
{{
showCaption
}}
,tooltip:'
{{
tooltip
}}
' },
{{/
pSDEToolbarItems
}}
]
},
{{/
eq
}}
{{#
eq
controlType
"PICKUPVIEWPANEL"
}}
{{#
eq
controlType
"PICKUPVIEWPANEL"
}}
{{
lowerCase
codeName
}}
:{
{{
lowerCase
codeName
}}
:{
name:'
{{
name
}}
',
name:'
{{
name
}}
',
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages}}/{{pages@DEPICKUPVIEW}}.vue.hbs
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages
@DEPICKUPVIEW
}}/{{pages@DEPICKUPVIEW}}.vue.hbs
浏览文件 @
d9e87a5a
<script
setup
lang=
"ts"
>
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
Subject
}
from
'rxjs'
;
import
{
PickupView
,
IActionParam
,
IParam
}
from
'@ibiz-core'
;
import
{
PickupView
,
IActionParam
,
IParam
}
from
'@ibiz-core'
;
import
{
ViewConfig
}
from
'./
{{
page
.
codeName
.
spinalCas
e
}}
-config'
;
import
{
ViewConfig
}
from
'./
{{
spinalCase
page
.
codeNam
e
}}
-config'
;
// props声明和默认值处理
// props声明和默认值处理
interface
Props
{
interface
Props
{
...
@@ -32,16 +32,5 @@ const { state } = new PickupView(ViewConfig).moduleInstall(props);
...
@@ -32,16 +32,5 @@ const { state } = new PickupView(ViewConfig).moduleInstall(props);
<template
v-slot:header-left
>
<template
v-slot:header-left
>
<IbizIconText
class=
"ibiz-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
<IbizIconText
class=
"ibiz-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
</template>
<template
v-slot:header-right
>
{{#
page
.
ctrls
}}
{{#
eq
controlType
"TOOLBAR"
}}
<IbizToolbar
:toolbarModel=
"state.
{{
lowerCase
codeName
}}
"
@
toolbarEvent=
"handleToolbarEvent"
:context=
"state.context"
:viewParams=
"state.viewParams"
/>
{{/
eq
}}
{{/
page
.
ctrls
}}
</template>
</IbizDefaultViewLayout>
</IbizDefaultViewLayout>
</template>
</template>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录