Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
fe3f56b6
提交
fe3f56b6
编写于
1月 09, 2022
作者:
zhangkang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:选择视图
上级
9d1798e6
变更
18
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
327 行增加
和
72 行删除
+327
-72
data-picker.hbs
...src/main/resources/templ/r7/@macro/editor/data-picker.hbs
+5
-1
app-view-config.ts.hbs
...mpl/r7/app_{{apps}}/src/app/config/app-view-config.ts.hbs
+1
-1
IbizDataPicker.vue
...r7/app_{{apps}}/src/components/editors/IbizDataPicker.vue
+30
-8
ibizPickerUpGridViewLayout.vue
...ps}}/src/components/layout/ibizPickerUpGridViewLayout.vue
+31
-0
ibizPickerUpViewLayout.vue
...{{apps}}/src/components/layout/ibizPickerUpViewLayout.vue
+29
-0
app-action-base.ts
..._{{apps}}/src/core/logic/app-ui-action/app-action-base.ts
+1
-1
pickup-grid-view.ts
...c/core/modules/views/pickup-grid-view/pickup-grid-view.ts
+23
-0
pickup-view.ts
...{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
+22
-1
view-base.ts
...pp_{{apps}}/src/core/modules/views/view-base/view-base.ts
+8
-0
pickupviewpanel-control.ts
...idgets/pickupviewpanel-control/pickupviewpanel-control.ts
+21
-23
index.ts.hbs
...ge/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/index.ts.hbs
+3
-0
{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
...ges@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
+21
-24
index.ts.hbs
...c/page/{{appModules}}/{{pages@DEPICKUPVIEW}}/index.ts.hbs
+3
-0
{{pages@DEPICKUPVIEW}}.vue.hbs
...s}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
+51
-7
app-modal.vue
...s/templ/r7/app_{{apps}}/src/utils/app-modal/app-modal.vue
+18
-6
index.ts.hbs
.../{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel/index.ts.hbs
+3
-0
{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel-config.ts.hbs
...{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel-config.ts.hbs
+10
-0
{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
...panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
+47
-0
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/editor/data-picker.hbs
浏览文件 @
fe3f56b6
...
...
@@ -15,6 +15,7 @@
{{/if}}
{{#if
item
.
psEditor
.
psNavigateParams
}}
localParam=
"
{{>
@macro
/
front-end
/
common
/
navparam
.
hbs
appNavParams
=
item
.
psEditor
.
psNavigateParams
}}
"
{{!-- localParam="{{item.psEditor.psNavigateParams}}" --}}
{{/if}}
:context=
"state.context"
:viewParams=
"state.viewParams"
...
...
@@ -26,7 +27,10 @@
{{!-- {{/each}} --}}
{{!-- deKeyField="{{item.psEditor.psAppDataEntity.codeName}}" --}}
{{/if}}
{{!-- :pickupView="getPickupView({{item.psEditor}})" --}}
{{!-- {{#if item.psEditor.pickuppsAppView }} --}}
{{!-- :pickupView="{{item.psEditor.pickuppsAppView}}" --}}
{{!-- {{/if}} --}}
pickUpView=
"ChartDataPickupView"
{{!-- :linkView="getLinkView({{item.psEditor}})" --}}
{{!-- :acParams="getAcParams({{item.psEditor}})" --}}
{{#if
item
.
psEditor
.
psAppDEACMode
.
minorSortDir
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/config/app-view-config.ts.hbs
浏览文件 @
fe3f56b6
...
...
@@ -25,7 +25,7 @@ export const AppViewConfig:IParam = {
"iconCls": "
{{
appView
.
psSysImage
.
cssClass
}}
",
{{/if}}
"viewType": "
{{
appView
.
viewType
}}
",
"fileDir": "@page/
{{
#if
psAppDataEntity
}}{{
spinalCase
psAppDataEntity
.
codeName
}}{{else}}
default
{{/if
}}
/
{{
spinalCase
appView
.
codeName
}}
"
"fileDir": "@page/
{{
lowerCase
app
.
codeName
}}
/
{{
spinalCase
appView
.
codeName
}}
"
}
{{#
unless
@last
}}
,
{{/
unless
}}
{{/
each
}}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/IbizDataPicker.vue
浏览文件 @
fe3f56b6
<
script
setup
lang=
"ts"
>
import
{
onBeforeMount
,
Ref
,
ref
}
from
'vue'
;
import
{
SearchOutlined
,
ExportOutlined
}
from
'@ant-design/icons-vue'
;
import
{
deepCopy
,
IParam
,
IActionParam
,
EditorBase
,
IContext
}
from
'@core'
;
import
{
deepCopy
,
IParam
,
IActionParam
,
EditorBase
,
IContext
,
PickupView
}
from
'@core'
;
interface
DataPickerProps
{
/**
* @description 编辑器名称
...
...
@@ -66,7 +66,7 @@ interface DataPickerProps {
/**
* @description 选择视图
*/
pickUpView
?:
IParam
;
pickUpView
?:
string
;
/**
* @description 链接视图
...
...
@@ -195,13 +195,35 @@ const onSelect = (value: any) => {
fillPickUpData
(
selectItem
);
};
const
initValue
=
(
data
:
any
)
=>
{
// todo
};
// 打开视图
const
openView
=
()
=>
{
if
(
!
props
.
pickUpView
)
{
return
;
}
const
view
=
App
.
getViewInfo
(
props
.
pickUpView
);
if
(
!
view
)
{
return
;
}
const
subject
=
App
.
getOpenViewService
().
openView
(
view
,
{});
const
subjectEvent
=
subject
?.
subscribe
((
data
:
any
)
=>
{
if
(
data
?.
ret
==
'OK'
&&
data
.
resultData
)
{
const
value
=
initValue
(
data
.
resultData
);
emit
(
'editorEvent'
,
{
tag
:
props
.
valueItem
,
action
:
'valueChange'
,
data
:
value
});
}
subjectEvent
?.
unsubscribe
();
});
};
</
script
>
<
template
>
<template
v-if=
"linkOnly"
:class=
"['app-data-picker', `app-data-picker-$
{name}`]">
<a
@
click=
"openLinkView"
>
\
{{
value
}}
</a>
<a
@
click=
"openLinkView"
>
{{
value
}}
</a>
</
template
>
<
template
v-else-if=
"!
noAc
&& !isDropdown"
>
<
template
v-else-if=
"!
isAC
&& !isDropdown"
>
<a-auto-complete
:class=
"['app-data-picker', `app-data-picker-$
{name}`]"
:allowClear="true"
...
...
@@ -214,11 +236,11 @@ const onSelect = (value: any) => {
:defaultOpen="true"
>
<template
#
option=
"option"
>
<div
@
click=
"onSelect(option[deKeyField])"
>
\
{{
option
[
deMajorField
]
}}
</div>
<div
@
click=
"onSelect(option[deKeyField])"
>
{{
option
[
deMajorField
]
}}
</div>
</
template
>
<a-input
:placeholder=
"placeholder"
>
<
template
#
suffix
>
<search-outlined
v-if=
"pickUpView
&& showButton
"
class=
"certain-category-icon"
@
click=
"openView"
/>
<search-outlined
v-if=
"pickUpView"
class=
"certain-category-icon"
@
click=
"openView"
/>
<export-outlined
v-if=
"linkView"
@
click=
"openLinkView"
/>
</
template
>
</a-input>
...
...
@@ -245,11 +267,11 @@ const onSelect = (value: any) => {
:placeholder="placeholder"
>
<template
#
suffixIcon
>
<search-outlined
v-if=
"pickUpView"
@
click=
"openPickUpView"
/>
<search-outlined
v-if=
"pickUpView"
@
click=
"openPickUpView"
/>
<select-outlined
v-if=
"linkView"
@
click=
"openLinkView"
/>
</
template
>
<a-select-option
v-for=
"(item, index) in items"
:key=
"index"
:value=
"item[deKeyField]"
>
\
{{ item[deMajorField] }}
{{ item[deMajorField] }}
</a-select-option>
</a-select>
</template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/ibizPickerUpGridViewLayout.vue
0 → 100644
浏览文件 @
fe3f56b6
<
script
setup
lang=
"ts"
>
</
script
>
<
template
>
<IbizViewBaseLayout>
<template
v-slot:header-left
>
<slot
name=
"caption"
/>
</
template
>
<
template
v-slot:header-right
>
<slot
name=
"toolbar"
/>
</
template
>
<
template
v-slot:header-bottom
>
<slot
name=
"topMessage"
/>
<slot
name=
"searchForm"
/>
</
template
>
<
template
v-slot:body-top
>
<slot
name=
"bodyMessage"
/>
</
template
>
<slot
/>
<
template
v-slot:footer-content
>
<slot
name=
"bottomMessage"
/>
<slot
name=
"footer"
/>
</
template
>
</IbizViewBaseLayout>
</template>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/ibizPickerUpViewLayout.vue
0 → 100644
浏览文件 @
fe3f56b6
<
script
setup
lang=
"ts"
></
script
>
<
template
>
<IbizViewBaseLayout>
<template
v-slot:header-left
>
<slot
name=
"caption"
/>
</
template
>
<
template
v-slot:header-right
>
<slot
name=
"toolbar"
/>
</
template
>
<
template
v-slot:header-bottom
>
<slot
name=
"topMessage"
/>
<slot
name=
"searchForm"
/>
</
template
>
<
template
v-slot:body-top
>
<slot
name=
"bodyMessage"
/>
</
template
>
<slot
/>
<
template
v-slot:footer-content
>
<slot
name=
"bottomMessage"
/>
<slot
name=
"footer"
/>
</
template
>
</IbizViewBaseLayout>
</template>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/logic/app-ui-action/app-action-base.ts
浏览文件 @
fe3f56b6
...
...
@@ -133,7 +133,7 @@ export class AppActionBase {
if
(
Object
.
is
(
uiAction
?.
uILogicAttachMode
,
'AFTER'
))
{
this
.
executeUILogic
(
uiAction
,
params
);
}
// 后续界面行为
todo
// 后续界面行为
if
(
!
uiAction
.
nextActionCodeName
)
{
return
;
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-grid-view/pickup-grid-view.ts
浏览文件 @
fe3f56b6
import
{
IActionParam
}
from
"@core"
;
import
{
PickupView
}
from
"../pickup-view"
;
import
{
PickupGridViewProps
}
from
"./pickup-grid-view-prop"
;
import
{
PickupGridViewState
}
from
"./pickup-grid-view-state"
;
...
...
@@ -17,6 +18,7 @@ export class PickupGridView extends PickupView {
*/
public
declare
viewState
:
PickupGridViewState
;
/**
* @description 使用加载功能模块
* @param {PickupGridViewProps} props 传入的props
...
...
@@ -29,6 +31,25 @@ export class PickupGridView extends PickupView {
})
}
/**
* 部件事件
*
* @param {IActionParam} actionParam
* @memberof PickupGridView
*/
public
handleCtrlEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
if
(
tag
!==
'grid'
)
{
return
;
}
if
(
action
===
'selectionChange'
)
{
this
.
selectData
=
data
;
this
.
emit
(
'viewEvent'
,
actionParam
)
}
}
/**
* @description 安装视图所有功能模块的方法
* @param {PickupGridViewProps} props 传入的Props
...
...
@@ -37,10 +58,12 @@ export class PickupGridView extends PickupView {
* @memberof PickupGridView
*/
public
moduleInstall
(
props
:
PickupGridViewProps
,
emit
?:
Function
)
{
this
.
emit
=
emit
;
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
this
.
useLoad
(
props
);
return
{
...
superParams
,
handleCtrlEvent
:
this
.
handleCtrlEvent
.
bind
(
this
),
state
:
this
.
viewState
,
};
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/pickup-view/pickup-view.ts
浏览文件 @
fe3f56b6
import
{
IActionParam
}
from
"@core"
;
import
{
MainView
}
from
"../main-view"
;
import
{
PickupViewProps
}
from
"./pickup-view-prop"
;
import
{
PickupViewState
}
from
"./pickup-view-state"
;
...
...
@@ -17,6 +18,9 @@ export class PickupView extends MainView {
*/
public
declare
viewState
:
PickupViewState
;
public
selectData
:
any
[]
=
[];
/**
* @description 使用加载功能模块
* @param {PickupViewProps} props 传入的props
...
...
@@ -42,8 +46,24 @@ export class PickupView extends MainView {
* @memberof PickupView
*/
public
confirm
()
{
//todo
this
.
emit
(
'viewEvent'
,
{
data
:
this
.
selectData
,
tag
:
''
,
action
:
'close'
})
}
public
handleCtrlEvent
(
actionParam
:
IActionParam
)
{
debugger
const
{
tag
,
action
,
data
}
=
actionParam
;
// TODO
if
(
action
===
'selectionChange'
)
{
this
.
selectData
=
data
;
this
.
emit
(
'viewEvent'
,
{
data
:
this
.
selectData
,
tag
:
''
,
action
:
'viewDataChange'
})
}
if
(
action
===
'close'
)
{
this
.
emit
(
'viewEvent'
,
{
data
:
this
.
selectData
,
tag
:
''
,
action
:
'viewDataChange'
})
}
}
/**
* @description 安装视图所有功能模块的方法
...
...
@@ -58,6 +78,7 @@ export class PickupView extends MainView {
return
{
...
superParams
,
state
:
this
.
viewState
,
selectData
:
this
.
selectData
,
cancel
:
this
.
cancel
.
bind
(
this
),
confirm
:
this
.
confirm
.
bind
(
this
)
};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/view-base/view-base.ts
浏览文件 @
fe3f56b6
...
...
@@ -25,6 +25,13 @@ export class ViewBase {
this
.
viewState
=
reactive
(
options
);
}
/**
* @description 事件
* @type {*}
* @memberof ViewBase
*/
emit
:
any
;
/**
* @description 根据props调整设置部分视图基类
* @param {ViewPropsBase} props 传入参数
...
...
@@ -124,6 +131,7 @@ export class ViewBase {
* @memberof ViewBase
*/
public
moduleInstall
(
props
:
ViewPropsBase
,
emit
?:
Function
)
{
this
.
emit
=
emit
?.
bind
(
this
);
this
.
setState
(
props
);
this
.
useViewContextParams
(
props
);
this
.
useCounterService
(
props
);
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/pickupviewpanel-control/pickupviewpanel-control.ts
浏览文件 @
fe3f56b6
...
...
@@ -18,16 +18,6 @@ export class PickupViewPanelControl extends MainControl {
*/
public
declare
controlState
:
PickupViewPanelControlState
;
/**
* @description 是否初始化完成
* @type {Ref<boolean>}
* @memberof PickupViewPanelControl
*/
public
inited
:
Ref
<
boolean
>
=
ref
(
false
);
public
viewdata
:
string
=
''
;
public
viewparam
:
string
=
''
;
/**
* @description 根据props设置部件state
...
...
@@ -36,9 +26,6 @@ export class PickupViewPanelControl extends MainControl {
*/
public
setState
(
props
:
PickupViewPanelControlProps
)
{
super
.
setState
(
props
);
this
.
controlState
.
isSingleSelect
=
toRef
(
props
,
'isSingleSelect'
);
this
.
controlState
.
isShowButton
=
toRef
(
props
,
'isShowButton'
);
this
.
controlState
.
selectedData
=
toRef
(
props
,
'selectedData'
);
}
/**
...
...
@@ -49,21 +36,34 @@ export class PickupViewPanelControl extends MainControl {
public
useLoad
(
props
:
PickupViewPanelControlProps
)
{
const
{
viewSubject
,
controlName
,
context
,
viewParams
}
=
this
.
controlState
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
){
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
if
(
Object
.
is
(
controlName
,
tag
)
&&
Object
.
is
(
"load"
,
action
)
){
this
.
viewdata
=
JSON
.
stringify
(
context
);
this
.
viewparam
=
JSON
.
stringify
(
viewParams
);
this
.
inited
.
value
=
true
;
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
if
(
Object
.
is
(
controlName
,
tag
)
&&
Object
.
is
(
"load"
,
action
))
{
}
})
// 部件卸载时退订viewSubject
onUnmounted
(()
=>
{
onUnmounted
(()
=>
{
subscription
.
unsubscribe
();
})
}
}
/**
* 部件事件
*
* @param {IActionParam} actionParam
* @memberof PickupViewPanelControl
*/
public
handleViewEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
const
{
controlName
}
=
this
.
controlState
;
if
(
Object
.
is
(
"selectionChange"
,
action
))
{
this
.
emit
(
'ctrlEvent'
,
{
tag
:
controlName
,
action
:
action
,
data
:
data
});
}
}
/**
* @description 安装部件所有功能模块的方法
* @param {PickupViewPanelControlProps} props 传入的Props
...
...
@@ -75,9 +75,7 @@ export class PickupViewPanelControl extends MainControl {
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
return
{
...
superParams
,
inited
:
this
.
inited
,
viewdata
:
this
.
viewdata
,
viewparam
:
this
.
viewparam
,
handleViewEvent
:
this
.
handleViewEvent
.
bind
(
this
),
state
:
this
.
controlState
};
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/index.ts.hbs
0 → 100644
浏览文件 @
fe3f56b6
import
{{
page
.
codeName
}}
from "./
{{
spinalCase
page
.
codeName
}}
.vue";
export default
{{
page
.
codeName
}}
;
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
浏览文件 @
fe3f56b6
...
...
@@ -2,11 +2,14 @@
import
{
Subject
}
from
'rxjs'
;
import
{
PickupGridView
,
IActionParam
,
IParam
,
IContext
}
from
'@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
}}
// todo 表格部件拿不到目前导入固定表格
import
{
MainGrid
}
from
'@widgets/chart-data/main-grid'
;
{{#
each
page
.
controls
as
|
control
|
}}
{{#if
(
eq
control
.
controlType
'GRID'
)
}}
import
{
{{
control
.
codeName
}}
Grid
}
from
'@widgets/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-grid'
;
{{/if}}
{{/
each
}}
// props声明和默认值处理
interface
Props
{
...
...
@@ -29,11 +32,11 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
}
=
new
PickupGridView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
confirm
,
handleCtrlEvent
}
=
new
PickupGridView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
</script>
<template>
<Ibiz
Default
ViewLayout
class=
"ibiz-pickup-grid-view"
>
<Ibiz
PickerUpGrid
ViewLayout
class=
"ibiz-pickup-grid-view"
>
<template
v-slot:header-left
>
<IbizIconText
class=
"ibiz-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
...
...
@@ -51,21 +54,15 @@ const { state } = new PickupGridView(ViewConfig).moduleInstall(props, emit);
></
{{
codeName
}}
Grid>
{{/
eq
}}
{{/
page
.
ctrls
}}
<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>
<MainGrid
:context=
"state.context"
:rowEditState=
"state.rowEditState"
:rowActiveMode=
"state.gridRowActiveMode"
:showBusyIndicator=
"true"
:viewParams=
"state.viewParams"
:controlAction=
"state.controlsAction.grid"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"handleCtrlEvent"
></MainGrid>
</IbizPickerUpGridViewLayout>
</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@DEPICKUPVIEW}}/index.ts.hbs
0 → 100644
浏览文件 @
fe3f56b6
import
{{
page
.
codeName
}}
from "./
{{
spinalCase
page
.
codeName
}}
.vue";
export default
{{
page
.
codeName
}}
;
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
浏览文件 @
fe3f56b6
...
...
@@ -2,7 +2,11 @@
import
{
Subject
}
from
'rxjs'
;
import
{
PickupView
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
import
{
ViewConfig
}
from
'./
{{
spinalCase
page
.
codeName
}}
-config'
;
{{#
page
.
ctrls
}}
{{#
eq
controlType
"PICKUPVIEWPANEL"
}}
import
{
{{
codeName
}}
PickUpViewPanel
}
from
'@widgets/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-pickup-view-panel'
;
{{/
eq
}}
{{/
page
.
ctrls
}}
// props声明和默认值处理
interface
Props
{
context
:
IContext
;
...
...
@@ -24,13 +28,53 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
}
=
new
PickupView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
cancel
,
confirm
,
handleCtrlEvent
}
=
new
PickupView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
</script>
<template>
<IbizDefaultViewLayout
class=
"ibiz-pickup-view"
>
<template
v-slot:header-left
>
<IbizIconText
class=
"ibiz-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
<IbizPickerUpViewLayout
class=
"ibiz-pickup-view"
>
<template
v-slot:header-left
>
<IbizIconText
class=
"ibiz-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</template>
{{#
page
.
ctrls
}}
{{#
eq
controlType
"TOOLBAR"
}}
<template
v-slot:toolbar
>
<IbizToolbar
mode=
"button"
name=
"
{{
lowerCase
codeName
}}
"
:actionModel=
"state.viewToolbarModel"
@
toolbarEvent=
"handleToolbarEvent"
/>
</template>
{{/
eq
}}
{{#
eq
controlType
"PICKUPVIEWPANEL"
}}
<
{{
codeName
}}
PickUpViewPanel
:context=
"state.context"
:rowEditState=
"state.rowEditState"
:rowActiveMode=
"state.gridRowActiveMode"
:showBusyIndicator=
"true"
:viewParams=
"state.viewParams"
:controlAction=
"state.controlsAction.
{{
name
}}
"
:viewSubject=
"state.viewSubject"
@
ctrlEvent=
"handleCtrlEvent"
></
{{
codeName
}}
PickUpViewPanel>
{{/
eq
}}
{{/
page
.
ctrls
}}
<template
v-slot:footer
>
<a-space
class=
"ibiz-pickup-view--footer"
>
<a-button
@
click=
"cancel"
>
取消
</a-button>
<a-button
@
click=
"confirm"
>
确认
</a-button>
</a-space>
</template>
</IbizDefaultViewLayout>
</template>
\ No newline at end of file
</IbizPickerUpViewLayout>
</template>
<style
lang=
"scss"
>
.ibiz-pickup-view
{
position
:
relative
;
.ibiz-pickup-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/utils/app-modal/app-modal.vue
浏览文件 @
fe3f56b6
<
script
setup
lang=
"ts"
>
import
{
IParam
,
ViewDetail
}
from
'@core'
;
import
{
I
ActionParam
,
I
Param
,
ViewDetail
}
from
'@core'
;
import
{
Subject
}
from
'rxjs'
;
import
{
Ref
,
ref
}
from
'vue'
;
interface
AppModalProps
{
...
...
@@ -31,7 +31,7 @@ interface AppModalProps {
/**
* @description 是否全屏
*/
isFullscreen
:
boolean
;
isFullscreen
:
boolean
;
/**
* @description 模态参数
...
...
@@ -49,7 +49,6 @@ const props = withDefaults(defineProps<AppModalProps>(), {
*/
let
isVisible
:
Ref
<
boolean
>
=
ref
(
false
);
/**
* 临时结果
*/
...
...
@@ -132,8 +131,9 @@ onMounted(() => {
*/
const
close
=
(
result
:
any
)
=>
{
if
(
result
&&
Array
.
isArray
(
result
)
&&
result
.
length
>
0
)
{
Object
.
assign
(
tempResult
,
{
ret
:
'OK'
},
{
datas
:
JSON
.
parse
(
JSON
.
stringify
(
result
))
});
Object
.
assign
(
tempResult
,
{
ret
:
'OK'
},
{
resultData
:
JSON
.
parse
(
JSON
.
stringify
(
result
))
});
}
props
.
subject
?.
next
(
tempResult
);
isVisible
.
value
=
false
;
};
...
...
@@ -143,7 +143,7 @@ const close = (result: any) => {
const
viewDataChange
=
(
result
:
any
)
=>
{
tempResult
=
{
ret
:
''
};
if
(
result
&&
Array
.
isArray
(
result
)
&&
result
.
length
>
0
)
{
Object
.
assign
(
tempResult
,
{
ret
:
'OK'
},
{
datas
:
JSON
.
parse
(
JSON
.
stringify
(
result
))
});
Object
.
assign
(
tempResult
,
{
ret
:
'OK'
},
{
resultData
:
JSON
.
parse
(
JSON
.
stringify
(
result
))
});
}
};
...
...
@@ -156,6 +156,18 @@ const viewDataActivated = (result: any) => {
}
};
const
handelViewEvent
=
(
actionParam
:
IActionParam
)
=>
{
const
{
tag
,
action
,
data
}
=
actionParam
;
switch
(
action
)
{
case
'viewDataChange'
:
viewDataChange
(
data
);
break
;
case
'close'
:
close
(
data
);
break
;
}
};
/**
* 模态显示隐藏切换回调
*/
...
...
@@ -196,7 +208,7 @@ const handleShowState = ($event: any) => {
:viewParams=
"viewParams"
:viewDefaultUsage=
"false"
:noViewCaption=
"true"
@
view
DataChange=
"viewDataChange
($event)"
@
view
Event=
"handelViewEvent
($event)"
@
viewDataActivated=
"viewDataActivated($event)"
@
close=
"close($event)"
:ref=
"viewName"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel/index.ts.hbs
0 → 100644
浏览文件 @
fe3f56b6
import
{{
ctrl
.
codeName
}}
PickUpViewPanel from "./
{{
spinalCase
ctrl
.
codeName
}}
-pickup-view-panel.vue";
export {
{{
ctrl
.
codeName
}}
PickUpViewPanel };
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel-config.ts.hbs
0 → 100644
浏览文件 @
fe3f56b6
export const CtrlConfig = {
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
data: {},
embeddedView: {
{{#if
ctrl
.
embeddedPSAppDEView
}}
viewName: '
{{
ctrl
.
embeddedPSAppDEView
.
codeName
}}
'
{{/if}}
}
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel/{{ctrls@PICKUPVIEWPANEL}}-pickup-view-panel.vue.hbs
0 → 100644
浏览文件 @
fe3f56b6
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
IActionParam
,
IParam
,
ControlAction
,
PickupViewPanelControl
,
IContext
}
from
'@core'
;
import
{
CtrlConfig
}
from
'./
{{
spinalCase
ctrl
.
codeName
}}
-pickup-view-panel-config'
;
import
ChartDataPickUpGridView
from
'../../../page/sample/chart-data-pickup-grid-view'
;
interface
Props
{
context
:
IContext
;
viewParams
?:
IParam
;
controlAction
:
ControlAction
;
showBusyIndicator
?:
boolean
;
isSingleSelect
?:
boolean
;
viewMode
?:
number
;
selectedData
?:
string
;
isShowButton
?:
boolean
;
viewSubject
:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
viewMode
:
0
,
isSingleSelect
:
false
,
isShowButton
:
true
,
showBusyIndicator
:
true
,
})
// emit声明
interface
CtrlEmit
{
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
handleViewEvent
}
=
new
PickupViewPanelControl
(
CtrlConfig
).
moduleInstall
(
props
,
emit
);
</script>
<template>
<div
class=
"ibiz-pickupviewpanel"
>
<ChartDataPickUpGridView
:isSingleSelect=
"state.isSingleSelect"
:isShowButton=
"state.isShowButton"
:selectedData=
"state.selectedData"
@
viewEvent=
"handleViewEvent"
></ChartDataPickUpGridView>
</div>
</template>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录