Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
19a9d975
提交
19a9d975
编写于
12月 28, 2021
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add:新增选择视图支持
上级
2349b784
变更
15
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
340 行增加
和
2 行删除
+340
-2
index.ts
...empl/r7/app_{{apps}}/src/ibiz-core/modules/views/index.ts
+2
-1
index.ts
...{{apps}}/src/ibiz-core/modules/views/pickup-view/index.ts
+3
-0
pickup-view-prop.ts
...c/ibiz-core/modules/views/pickup-view/pickup-view-prop.ts
+9
-0
pickup-view-state.ts
.../ibiz-core/modules/views/pickup-view/pickup-view-state.ts
+11
-0
pickup-view.ts
...}}/src/ibiz-core/modules/views/pickup-view/pickup-view.ts
+47
-0
index.ts
...pl/r7/app_{{apps}}/src/ibiz-core/modules/widgets/index.ts
+2
-1
index.ts
...biz-core/modules/widgets/pickupviewpanel-control/index.ts
+3
-0
pickupviewpanel-control-prop.ts
...s/pickupviewpanel-control/pickupviewpanel-control-prop.ts
+11
-0
pickupviewpanel-control-state.ts
.../pickupviewpanel-control/pickupviewpanel-control-state.ts
+31
-0
pickupviewpanel-control.ts
...idgets/pickupviewpanel-control/pickupviewpanel-control.ts
+84
-0
{{pages@DEPICKUPVIEW}}-config.ts.hbs
...pModules}}/{{pages}}/{{pages@DEPICKUPVIEW}}-config.ts.hbs
+26
-0
{{pages@DEPICKUPVIEW}}.vue.hbs
...e/{{appModules}}/{{pages}}/{{pages@DEPICKUPVIEW}}.vue.hbs
+47
-0
index.ts.hbs
...}}/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel/index.ts.hbs
+3
-0
{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel-config.ts.hbs
...l/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel-config.ts.hbs
+10
-0
{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel.vue.hbs
...ewpanel/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel.vue.hbs
+51
-0
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/index.ts
浏览文件 @
19a9d975
...
...
@@ -3,3 +3,4 @@ export * from './main-view'
export
*
from
'./edit-view'
export
*
from
'./index-view'
export
*
from
'./grid-view'
export
*
from
'./pickup-view'
\ 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
0 → 100644
浏览文件 @
19a9d975
export
{
PickupView
}
from
'./pickup-view'
;
export
{
PickupViewProps
}
from
'./pickup-view-prop'
;
export
{
PickupViewState
}
from
'./pickup-view-state'
;
\ 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-prop.ts
0 → 100644
浏览文件 @
19a9d975
import
{
MainViewProps
}
from
"@ibiz-core"
;
/**
* @description 选择视图props
* @export
* @interface PickupViewProps
* @extends {MainViewProps}
*/
export
interface
PickupViewProps
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-view/pickup-view-state.ts
0 → 100644
浏览文件 @
19a9d975
import
{
ControlAction
,
MainViewState
}
from
'@ibiz-core'
;
/**
* @description 选择视图状态
* @export
* @interface MainViewState
* @extends {ViewStateBase}
*/
export
interface
PickupViewState
extends
MainViewState
{
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/pickup-view/pickup-view.ts
0 → 100644
浏览文件 @
19a9d975
import
{
MainView
}
from
"../main-view"
;
import
{
PickupViewProps
}
from
"./pickup-view-prop"
;
import
{
PickupViewState
}
from
"./pickup-view-state"
;
/**
* @description 选择视图
* @export
* @class PickupView
* @extends {MainView}
*/
export
class
PickupView
extends
MainView
{
/**
* @description 视图状态
* @type {PickupViewState}
* @memberof PickupView
*/
public
declare
viewState
:
PickupViewState
;
/**
* @description 使用加载功能模块
* @param {PickupViewProps} props 传入的props
* @memberof PickupView
*/
public
useLoad
(
props
:
PickupViewProps
)
{
const
{
viewSubject
}
=
this
.
viewState
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
'grid'
,
action
:
"load"
,
data
:
{}
})
})
}
/**
* @description 安装视图所有功能模块的方法
* @param {PickupViewProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof PickupView
*/
public
moduleInstall
(
props
:
PickupViewProps
,
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/widgets/index.ts
浏览文件 @
19a9d975
...
...
@@ -3,3 +3,4 @@ export * from './main-control'
export
*
from
'./form-control'
export
*
from
'./menu-control'
export
*
from
'./grid-control'
export
*
from
'./pickupviewpanel-control'
\ 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
0 → 100644
浏览文件 @
19a9d975
export
{
PickupViewPanelControlProps
}
from
'./pickupviewpanel-control-prop'
;
export
{
PickupViewPanelControlState
}
from
'./pickupviewpanel-control-state'
;
export
{
PickupViewPanelControl
}
from
'./pickupviewpanel-control'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/pickupviewpanel-control/pickupviewpanel-control-prop.ts
0 → 100644
浏览文件 @
19a9d975
import
{
MainControlProps
}
from
"@ibiz-core"
;
/**
* @description 选择视图面板部件参数
* @export
* @interface PickupViewPanelControlProps
* @extends {MainControlProps}
*/
export
interface
PickupViewPanelControlProps
extends
MainControlProps
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/pickupviewpanel-control/pickupviewpanel-control-state.ts
0 → 100644
浏览文件 @
19a9d975
import
{
IParam
,
MainControlState
}
from
'@ibiz-core'
;
/**
* @description 选择视图面板通讯对象
* @export
* @interface PickupViewPanelControlState
* @extends {MainControlState}
*/
export
interface
PickupViewPanelControlState
extends
MainControlState
{
/**
* @description 是否单选
* @type {boolean}
* @memberof PickupViewPanelControlState
*/
isSingleSelect
:
boolean
;
/**
* @description 是否显示按钮
* @type {boolean}
* @memberof PickupViewPanelControlState
*/
isShowButton
:
boolean
;
/**
* @description 选中数据字符
* @type {string}
* @memberof PickupViewPanelControlState
*/
selectedData
:
string
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/pickupviewpanel-control/pickupviewpanel-control.ts
0 → 100644
浏览文件 @
19a9d975
import
{
Ref
,
ref
}
from
'vue'
;
import
{
IActionParam
,
MainControl
}
from
'@ibiz-core'
;
import
{
PickupViewPanelControlProps
}
from
'./pickupviewpanel-control-prop'
;
import
{
PickupViewPanelControlState
}
from
'./pickupviewpanel-control-state'
;
/**
* @description 选择视图面板部件
* @export
* @class PickupViewPanelControl
* @extends {MainControl}
*/
export
class
PickupViewPanelControl
extends
MainControl
{
/**
* @description 部件状态
* @type {FormControlState}
* @memberof FormControl
*/
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
* @param {PickupViewPanelControlProps} props
* @memberof PickupViewPanelControl
*/
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'
);
}
/**
* @description
* @param {PickupViewPanelControlProps} props
* @memberof PickupViewPanelControl
*/
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
;
}
})
// 部件卸载时退订viewSubject
onUnmounted
(()
=>
{
subscription
.
unsubscribe
();
})
}
}
/**
* @description 安装部件所有功能模块的方法
* @param {PickupViewPanelControlProps} props 传入的Props
* @param {Function} [emit]
* @return {*}
* @memberof FormControl [emit] 事件
*/
public
moduleInstall
(
props
:
PickupViewPanelControlProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
return
{
...
superParams
,
inited
:
this
.
inited
,
viewdata
:
this
.
viewdata
,
viewparam
:
this
.
viewparam
,
state
:
this
.
controlState
};
}
}
\ 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
0 → 100644
浏览文件 @
19a9d975
export const ViewConfig = {
viewCodeName: '
{{
page
.
codeName
}}
',
viewName: '
{{
page
.
name
}}
',
viewCaption: '
{{
page
.
caption
}}
',
{{#
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"
}}
{{
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}}/{{pages@DEPICKUPVIEW}}.vue.hbs
0 → 100644
浏览文件 @
19a9d975
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
PickupView
,
IActionParam
,
IParam
}
from
'@ibiz-core'
;
import
{
ViewConfig
}
from
'./
{{
page
.
codeName
.
spinalCase
}}
-config'
;
// 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
PickupView
(
ViewConfig
).
moduleInstall
(
props
);
</script>
<template>
<IbizDefaultViewLayout
class=
"ibiz-pickup-view"
>
<template
v-slot:header-left
>
<IbizIconText
class=
"ibiz-view__caption"
size=
"large"
:text=
"state.viewCaption"
/>
</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>
</template>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel/index.ts.hbs
0 → 100644
浏览文件 @
19a9d975
import
{{
ctrl
.
codeName
}}
PickupViewPanel from "./
{{
ctrl
.
codeName
.
spinalCase
}}
-pickupviewpanel.vue";
export {
{{
ctrl
.
codeName
}}
PickupViewPanel };
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel-config.ts.hbs
0 → 100644
浏览文件 @
19a9d975
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}}-pickupviewpanel/{{ctrls@PICKUPVIEWPANEL}}-pickupviewpanel.vue.hbs
0 → 100644
浏览文件 @
19a9d975
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
IActionParam
,
IParam
,
ControlAction
,
PickupViewPanelControl
}
from
'@ibiz-core'
;
import
{
CtrlConfig
}
from
'./
{{
ctrl
.
codeName
.
spinalCase
}}
-pickupviewpanel-config'
;
interface
Props
{
context
:
IParam
;
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
,
inited
,
viewdata
,
viewparam
}
=
new
PickupViewPanelControl
(
CtrlConfig
).
moduleInstall
(
props
);
</script>
<template>
<div
class=
"ibiz-pickupviewpanel"
>
<component
v-if=
"inited && state.embeddedView && state.embeddedView.viewName"
:if=
"state.embeddedView.viewName"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:isSingleSelect=
"state.isSingleSelect"
:isShowButton=
"state.isShowButton"
:selectedData=
"state.selectedData"
></component>
</div>
</template>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录