Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
3523d739
提交
3523d739
编写于
1月 06, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
e0cc3ec1
变更
16
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
277 行增加
和
11 行删除
+277
-11
app.ts
...e/src/main/resources/templ/r7/app_{{apps}}/src/app/app.ts
+27
-3
app-func-config.ts.hbs
...mpl/r7/app_{{apps}}/src/app/config/app-func-config.ts.hbs
+0
-0
app-view-config.ts.hbs
...mpl/r7/app_{{apps}}/src/app/config/app-view-config.ts.hbs
+0
-0
index.ts
...n/resources/templ/r7/app_{{apps}}/src/app/config/index.ts
+2
-0
data-service-register.ts.hbs
...pp_{{apps}}/src/app/register/data-service-register.ts.hbs
+79
-0
index.ts
...resources/templ/r7/app_{{apps}}/src/app/register/index.ts
+2
-0
ui-service-register.ts.hbs
.../app_{{apps}}/src/app/register/ui-service-register.ts.hbs
+79
-0
i-app.ts
...ces/templ/r7/app_{{apps}}/src/core/interface/app/i-app.ts
+24
-4
index.ts
...sources/templ/r7/app_{{apps}}/src/core/interface/index.ts
+1
-1
index.ts
...s/templ/r7/app_{{apps}}/src/core/interface/logic/index.ts
+0
-2
i-app-func-service.ts
...{{apps}}/src/core/interface/service/i-app-func-service.ts
+0
-0
i-data-service-register.ts
...s}}/src/core/interface/service/i-data-service-register.ts
+17
-0
i-open-view-service.ts
...{apps}}/src/core/interface/service/i-open-view-service.ts
+0
-0
i-ui-service-register.ts
...pps}}/src/core/interface/service/i-ui-service-register.ts
+17
-0
index.ts
...templ/r7/app_{{apps}}/src/core/interface/service/index.ts
+4
-0
app-base.ts
...es/templ/r7/app_{{apps}}/src/core/modules/app/app-base.ts
+25
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/app.ts
浏览文件 @
3523d739
import
{
OpenViewService
}
from
"@/utils"
;
import
{
AppBase
,
IParam
,
ViewDetail
,
IApp
,
IOpenViewService
,
deepCopy
}
from
"@core"
;
import
{
AppFuncConfig
}
from
'./app-func-
config'
;
import
{
AppViewConfig
}
from
'./app-view-config'
;
import
{
AppBase
,
IParam
,
ViewDetail
,
IApp
,
IOpenViewService
,
deepCopy
,
IUIServiceRegister
,
IDataServiceRegister
}
from
"@core"
;
import
{
AppFuncConfig
,
AppViewConfig
}
from
'./
config'
;
import
{
DataServiceRegister
,
UIServiceRegister
}
from
"./register"
;
export
class
App
extends
AppBase
implements
IApp
{
...
...
@@ -45,6 +45,30 @@ export class App extends AppBase implements IApp {
return
OpenViewService
.
getInstance
();
}
/**
* 获取UI服务
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {Promise<any>}
* @memberof App
*/
public
getUIService
(
entityKey
:
string
,
context
?:
IParam
):
Promise
<
any
>
{
return
UIServiceRegister
.
getInstance
().
getService
(
entityKey
,
context
);
}
/**
* 获取数据服务
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {Promise<any>}
* @memberof App
*/
public
getDataService
(
entityKey
:
string
,
context
?:
IParam
):
Promise
<
any
>
{
return
DataServiceRegister
.
getInstance
().
getService
(
entityKey
,
context
);
}
/**
* 获取视图信息
*
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/app-func-config.ts.hbs
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/
config/
app-func-config.ts.hbs
浏览文件 @
3523d739
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/app-view-config.ts.hbs
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/
config/
app-view-config.ts.hbs
浏览文件 @
3523d739
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/config/index.ts
0 → 100644
浏览文件 @
3523d739
export
{
AppFuncConfig
}
from
'./app-func-config'
;
export
{
AppViewConfig
}
from
'./app-view-config'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/register/data-service-register.ts.hbs
0 → 100644
浏览文件 @
3523d739
import { IDataServiceRegister, IParam } from '@core';
/**
* 数据服务注册中心
*
* @export
* @class DataServiceRegister
*/
export class DataServiceRegister implements IDataServiceRegister {
/**
* DataServiceRegister 单例对象
*
* @private
* @static
* @memberof DataServiceRegister
*/
private static DataServiceRegister: DataServiceRegister;
/**
* 所有数据服务 Map对象
*
* @private
* @static
* @memberof DataServiceRegister
*/
private static allDataServiceMap: Map
<string
,
any
>
= new Map();
/**
* Creates an instance of DataServiceRegister.
* @memberof DataServiceRegister
*/
constructor() {
this.init();
}
/**
* 获取DataServiceRegister 单例对象
*
* @public
* @static
* @memberof DataServiceRegister
*/
public static getInstance() {
if (!this.DataServiceRegister) {
this.DataServiceRegister = new DataServiceRegister();
}
return this.DataServiceRegister;
}
/**
* 初始化
*
* @protected
* @memberof DataServiceRegister
*/
protected init(): void {
{{#
each
app
.
appEntities
as
|
appEntity
|
}}
DataServiceRegister.allDataServiceMap.set('
{{
lowerCase
appEntity
.
codeName
}}
', () => import('@api/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
appEntity
.
codeName
}}
-service'));
{{/
each
}}
}
/**
* 获取指定数据服务
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {*}
* @memberof DataServiceRegister
*/
public async getService(entityKey: string, context: IParam = {}) {
const importService = DataServiceRegister.allDataServiceMap.get(entityKey);
if (importService) {
const importModule = await importService();
return importModule.default.getInstance(context);
}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/register/index.ts
0 → 100644
浏览文件 @
3523d739
export
{
DataServiceRegister
}
from
'./data-service-register'
;
export
{
UIServiceRegister
}
from
'./ui-service-register'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/register/ui-service-register.ts.hbs
0 → 100644
浏览文件 @
3523d739
import { IParam, IUIServiceRegister } from '@core';
/**
* UI服务注册中心
*
* @export
* @class UIServiceRegister
*/
export class UIServiceRegister implements IUIServiceRegister {
/**
* UIServiceRegister 单例对象
*
* @private
* @static
* @memberof UIServiceRegister
*/
private static UIServiceRegister: UIServiceRegister;
/**
* 所有UIService Map对象
*
* @private
* @static
* @memberof UIServiceRegister
*/
private static allUIServiceMap: Map
<string
,
any
>
= new Map();
/**
* Creates an instance of UIServiceRegister.
* @memberof UIServiceRegister
*/
constructor() {
this.init();
}
/**
* 获取UIServiceRegister 单例对象
*
* @public
* @static
* @memberof UIServiceRegister
*/
public static getInstance() {
if (!this.UIServiceRegister) {
this.UIServiceRegister = new UIServiceRegister();
}
return this.UIServiceRegister;
}
/**
* 初始化
*
* @protected
* @memberof UIServiceRegister
*/
protected init(): void {
{{#
each
app
.
appEntities
as
|
appEntity
|
}}
UIServiceRegister.allUIServiceMap.set('
{{
lowerCase
appEntity
.
codeName
}}
', () => import('@ui-service/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
appEntity
.
codeName
}}
-ui-service'));
{{/
each
}}
}
/**
* 获取指定UIService
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {*}
* @memberof UIServiceRegister
*/
public async getService(entityKey: string, context: IParam = {}) {
const importService = UIServiceRegister.allUIServiceMap.get(entityKey);
if (importService) {
const importModule = await importService();
return importModule.default.getInstance(context);
}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/app/i-app.ts
浏览文件 @
3523d739
import
{
IParam
,
ViewDetail
}
from
"../common"
;
import
{
IAppFuncService
,
I
OpenViewService
}
from
"../logic
"
;
import
{
IAppFuncService
,
I
DataServiceRegister
,
IOpenViewService
,
IUIServiceRegister
}
from
"../service
"
;
/**
...
...
@@ -21,7 +21,7 @@ export interface IApp {
/**
* 获取应用功能服务
*
* @return {*} {AppFuncService}
* @return {*} {
I
AppFuncService}
* @memberof IApp
*/
getAppFuncService
():
IAppFuncService
;
...
...
@@ -29,11 +29,31 @@ export interface IApp {
/**
* 获取打开视图服务
*
* @return {*} {I
Param
}
* @return {*} {I
OpenViewService
}
* @memberof IApp
*/
getOpenViewService
():
IOpenViewService
;
/**
* 获取UI服务
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {Promise<any>}
* @memberof IApp
*/
getUIService
(
entityKey
:
string
,
context
?:
IParam
):
Promise
<
any
>
;
/**
* 获取全局数据服务
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {Promise<any>}
* @memberof IApp
*/
getDataService
(
entityKey
:
string
,
context
?:
IParam
):
Promise
<
any
>
;
/**
* 获取指定视图信息
*
...
...
@@ -41,6 +61,6 @@ export interface IApp {
* @return {*} {(ViewDetail | undefined)}
* @memberof IApp
*/
getViewInfo
(
codeName
:
string
):
ViewDetail
|
undefined
getViewInfo
(
codeName
:
string
):
ViewDetail
|
undefined
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/index.ts
浏览文件 @
3523d739
export
*
from
'./app'
;
export
*
from
'./common'
;
export
*
from
'./logic'
;
\ No newline at end of file
export
*
from
'./service'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/logic/index.ts
已删除
100644 → 0
浏览文件 @
e0cc3ec1
export
*
from
'./i-app-func-service'
;
export
*
from
'./i-open-view-service'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/
logic
/i-app-func-service.ts
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/
service
/i-app-func-service.ts
浏览文件 @
3523d739
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/service/i-data-service-register.ts
0 → 100644
浏览文件 @
3523d739
/**
* @description 数据服务注册中心
* @export
* @interface IDataServiceRegister
*/
export
interface
IDataServiceRegister
{
/**
* 获取指定数据服务
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {*}
* @memberof DataServiceRegister
*/
getService
(
entityKey
:
string
,
context
?:
any
):
Promise
<
any
>
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/
logic
/i-open-view-service.ts
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/
service
/i-open-view-service.ts
浏览文件 @
3523d739
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/service/i-ui-service-register.ts
0 → 100644
浏览文件 @
3523d739
/**
* @description UI服务注册中心
* @export
* @interface IUIServiceRegister
*/
export
interface
IUIServiceRegister
{
/**
* 获取指定UI服务
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {*}
* @memberof IUIServiceRegister
*/
getService
(
entityKey
:
string
,
context
:
any
):
Promise
<
any
>
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/service/index.ts
0 → 100644
浏览文件 @
3523d739
export
*
from
'./i-app-func-service'
;
export
*
from
'./i-open-view-service'
;
export
*
from
'./i-data-service-register'
;
export
*
from
'./i-ui-service-register'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/app/app-base.ts
浏览文件 @
3523d739
import
{
AppFuncService
,
IApp
,
IAppFuncService
,
IOpenViewService
,
ViewDetail
}
from
"@core"
;
import
{
I
Param
}
from
"@core/interface"
;
import
{
I
DataServiceRegister
,
IParam
,
IUIServiceRegister
}
from
"@core/interface"
;
/**
* 应用基类
...
...
@@ -38,6 +38,30 @@ export abstract class AppBase implements IApp {
throw
new
Error
(
"Method not implemented."
);
}
/**
* 获取UI服务
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {Promise<any>}
* @memberof AppBase
*/
public
getUIService
(
entityKey
:
string
,
context
?:
IParam
):
Promise
<
any
>
{
throw
new
Error
(
"Method not implemented."
);
}
/**
* 获取数据服务
*
* @param {string} entityKey 应用实体名小写
* @param {*} context 应用上下文
* @return {Promise<any>}
* @memberof AppBase
*/
public
getDataService
(
entityKey
:
string
,
context
?:
IParam
):
Promise
<
any
>
{
throw
new
Error
(
"Method not implemented."
);
}
/**
* 获取所有应用功能
*
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录