Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
7cbf7f5f
提交
7cbf7f5f
编写于
12月 30, 2021
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新应用功能
上级
63cac6ad
变更
9
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
166 行增加
和
9 行删除
+166
-9
menu-item.hbs
.../main/resources/templ/r7/@macro/menu-detail/menu-item.hbs
+2
-2
app-func-config.ts.hbs
...ps}}/src/ibiz-core/helper/app-func/app-func-config.ts.hbs
+30
-0
app-func-service.ts
...{apps}}/src/ibiz-core/helper/app-func/app-func-service.ts
+116
-0
index.ts
...pl/r7/app_{{apps}}/src/ibiz-core/helper/app-func/index.ts
+2
-0
index.ts
...urces/templ/r7/app_{{apps}}/src/ibiz-core/helper/index.ts
+1
-0
index.ts
...in/resources/templ/r7/app_{{apps}}/src/ibiz-core/index.ts
+2
-1
menu-control.ts
...rc/ibiz-core/modules/widgets/menu-control/menu-control.ts
+4
-2
app.ts
...in/resources/templ/r7/app_{{apps}}/src/service/app/app.ts
+8
-1
{{ctrls@APPMENU}}-menu-config.ts.hbs
...ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu-config.ts.hbs
+1
-3
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/menu-detail/menu-item.hbs
浏览文件 @
7cbf7f5f
...
...
@@ -4,7 +4,7 @@
itemType: "
{{
item
.
itemType
}}
",
expanded:
{{
item
.
expanded
}}
,
tooltip: "
{{
item
.
tooltip
}}
",
funcTag:
{{#if
item
.
psAppFunc
}}
"
{{
item
.
psAppFunc
.
id
}}
"
{{else}}
''
{{/if}}
,
funcTag:
"
{{
item
.
psAppFunc
.
id
}}
"
,
hidden:
{{#if
item
.
hidden
}}
true
{{else}}
false
{{/if}}
,
disableClose:
{{#if
item
.
disableClose
}}
true
{{else}}
false
{{/if}}
,
{{#if
item
.
counterId
}}
...
...
@@ -18,7 +18,7 @@
iconCls: "
{{
item
.
psSysImage
.
cssClass
}}
",
{{/if}}
{{#if
item
.
psSysImage
.
imagePath
}}
i
con
: "
{{
item
.
psSysImage
.
imagePath
}}
",
i
mgPath
: "
{{
item
.
psSysImage
.
imagePath
}}
",
{{/if}}
{{/if}}
{{#if
item
.
psNavigateContexts
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/helper/app-func/app-func-config.ts.hbs
0 → 100644
浏览文件 @
7cbf7f5f
export const FuncConfig = [
{{#
each
app
.
allPSAppFuncs
as
|
func
|
}}
{
name: "
{{
func
.
name
}}
",
funcTag: "
{{
func
.
codeName
}}
",
appFuncType: "
{{
func
.
appFuncType
}}
",
{{#if
(
eq
func
.
appFuncType
'OPENHTMLPAGE'
)
}}
htmlPageUrl: "
{{
func
.
htmlPageUrl
}}
",
{{/if}}
{{#if
(
eq
func
.
appFuncType
'APPVIEW'
)
}}
openMode: "
{{
func
.
openMode
}}
",
viewCodeName: "
{{
func
.
psAppView
.
codeName
}}
",
{{/if}}
navParam: {
{{#if
func
.
psNavigateParams
}}
{{#
each
func
.
psNavigateParams
as
|
param
|
}}
{{
lowerCase
param
.
key
}}
: "
{{#if
param
.
rawValue
}}{{
param
.
value
}}{{else}}
%
{{
lowerCase
param
.
value
}}
%
{{/if}}
",
{{/
each
}}
{{/if}}
},
navContext: {
{{#if
func
.
psNavigateContexts
}}
{{#
each
func
.
psNavigateContexts
as
|
context
|
}}
{{
lowerCase
context
.
key
}}
: "
{{#if
context
.
rawValue
}}{{
context
.
value
}}{{else}}
%
{{
lowerCase
context
.
value
}}
%
{{/if}}
",
{{/
each
}}
{{/if}}
},
},
{{/
each
}}
]
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/helper/app-func/app-func-service.ts
0 → 100644
浏览文件 @
7cbf7f5f
import
{
IParam
,
FuncConfig
}
from
"@ibiz-core"
;
import
{
App
}
from
"@service"
;
export
class
AppFuncService
{
/**
* @description 唯一实例
* @private
* @static
* @memberof AppFuncService
*/
private
static
readonly
instance
=
new
AppFuncService
();
/**
* @description 获取唯一实例
* @static
* @return {*} {AppFuncService}
* @memberof AppFuncService
*/
public
static
getInstance
():
AppFuncService
{
return
AppFuncService
.
instance
;
}
/**
* @description 执行应用功能
* @param {string} menu 菜单项
* @param {IParam} context 上下文
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
executeAppFunc
(
menu
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
const
appFunc
=
FuncConfig
.
find
((
func
:
IParam
)
=>
Object
.
is
(
func
.
funcTag
,
menu
.
funcTag
));
if
(
appFunc
)
{
switch
(
appFunc
.
appFuncType
)
{
case
'APPVIEW'
:
return
this
.
openAppView
(
appFunc
,
context
,
viewParams
);
case
'OPENHTMLPAGE'
:
return
this
.
openHtmlPage
(
appFunc
,
context
,
viewParams
);
case
'PDTAPPFUNC'
:
return
this
.
executePresetFunc
(
appFunc
,
context
,
viewParams
);
case
'JAVASCRIPT'
:
return
this
.
executeJavaScript
(
appFunc
,
context
,
viewParams
);
case
'CUSTOM'
:
return
this
.
executeCustomFunc
(
appFunc
,
context
,
viewParams
);
default
:
console
.
warn
(
`
${
appFunc
.
appFuncType
}
类型应用功能暂未支持`
);
}
}
else
{
console
.
warn
(
`菜单项
${
menu
.
caption
}
未配置应用功能`
);
}
}
/**
* @description 执行自定义功能
* @param {IParam} appFunc 应用功能
* @param {IParam} context 上下文
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
executeCustomFunc
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
console
.
warn
(
`
${
appFunc
.
appFuncType
}
类型应用功能暂未支持`
);
}
/**
* @description 执行JavaScript
* @param {IParam} appFunc 应用功能
* @param {IParam} context 上下文
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
executeJavaScript
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
console
.
warn
(
`
${
appFunc
.
appFuncType
}
类型应用功能暂未支持`
);
}
/**
* @description 执行预置应用功能
* @static
* @param {IParam} appFunc 应用功能
* @param {IParam} context 上下文
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
executePresetFunc
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
console
.
warn
(
`
${
appFunc
.
appFuncType
}
类型应用功能暂未支持`
);
}
/**
* @description 打开HTML页面
* @param {IParam} appFunc 应用功能
* @param {IParam} context 上下文
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
openHtmlPage
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
window
.
open
(
appFunc
.
htmlPageUrl
,
'_blank'
);
}
/**
* @description 打开应用视图
* @param {IParam} appFunc 应用功能
* @param {IParam} context 上下文
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
openAppView
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
const
view
=
{
codeName
:
appFunc
.
viewCodeName
,
openMode
:
appFunc
.
openMode
,
}
const
params
=
{
context
:
context
,
viewParams
:
viewParams
,
}
App
.
openViewService
.
openView
(
view
,
params
);
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/helper/app-func/index.ts
0 → 100644
浏览文件 @
7cbf7f5f
export
*
from
'./app-func-service'
;
export
*
from
'./app-func-config'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/helper/index.ts
0 → 100644
浏览文件 @
7cbf7f5f
export
*
from
'./app-func'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/index.ts
浏览文件 @
7cbf7f5f
...
...
@@ -2,4 +2,5 @@ export * from './interface';
export
*
from
'./modules'
;
export
*
from
'./runtime'
;
export
*
from
'./service'
;
export
*
from
'./utils'
\ No newline at end of file
export
*
from
'./utils'
;
export
*
from
'./helper'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/menu-control/menu-control.ts
浏览文件 @
7cbf7f5f
import
{
Ref
}
from
'vue'
;
import
{
MenuControlProps
,
MenuControlState
,
IActionParam
,
ControlBase
,
IParam
}
from
'@ibiz-core'
;
import
{
MenuControlProps
,
MenuControlState
,
IActionParam
,
ControlBase
,
IParam
,
AppFuncService
,
deepCopy
}
from
'@ibiz-core'
;
import
{
App
}
from
'@service'
;
/**
* @description 菜单部件
...
...
@@ -163,7 +164,8 @@ export class MenuControl extends ControlBase {
* @memberof MenuControl
*/
public
menuClick
(
item
:
IParam
)
{
console
.
log
(
item
);
const
{
context
,
viewParams
}
=
this
.
controlState
;
App
.
appFuncService
.
executeAppFunc
(
item
,
deepCopy
(
context
),
deepCopy
(
viewParams
));
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/service/app/app.ts
浏览文件 @
7cbf7f5f
import
{
AppModal
}
from
'@/utils'
;
import
{
Http
,
deepCopy
}
from
'@ibiz-core'
;
import
{
OpenViewService
}
from
'@service'
;
import
{
AppFuncService
}
from
'@ibiz-core'
;
export
class
App
{
export
class
App
{
/**
* 打开视图服务
...
...
@@ -10,6 +11,12 @@ export class App{
*/
public
static
openViewService
:
OpenViewService
=
OpenViewService
.
getInstance
();
/**
* 应用功能服务
* @static
*/
public
static
appFuncService
:
AppFuncService
=
AppFuncService
.
getInstance
();
/**
* 打开视图服务
* @static
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu-config.ts.hbs
浏览文件 @
7cbf7f5f
...
...
@@ -9,7 +9,5 @@ export const CtrlConfig = {
{{>
(
lookup
'MENUITEM'
)
item
=
item
}}
{{/
each
}}
],
funcs: [
],
funcs: [],
};
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录