@ibiz-template/runtime 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +603 -278
- package/dist/index.system.min.js +2 -2
- package/dist/index.system.min.js.map +1 -1
- package/out/app-hub.d.ts +5 -5
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +2 -2
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +1 -0
- package/out/constant/sys-uiaction-tag.d.ts +4 -0
- package/out/constant/sys-uiaction-tag.d.ts.map +1 -1
- package/out/constant/sys-uiaction-tag.js +4 -0
- package/out/controller/common/control/control.controller.js +2 -2
- package/out/controller/control/app-menu/app-menu.controller.d.ts +2 -3
- package/out/controller/control/app-menu/app-menu.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.service.js +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +1 -1
- package/out/controller/control/form/search-form/search-form.controller.d.ts +9 -0
- package/out/controller/control/form/search-form/search-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.controller.js +59 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts +31 -2
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +83 -21
- package/out/controller/control/panel/panel/panel.controller.d.ts +4 -1
- package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel.controller.js +17 -16
- package/out/controller/utils/data-file-util/data-file-util.d.ts +3 -3
- package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -1
- package/out/controller/utils/data-file-util/data-file-util.js +10 -4
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +8 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +5 -5
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/common/i-app-service/i-app-service.d.ts +53 -0
- package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
- package/out/interface/common/i-global-config/i-global-grid-config.d.ts +9 -0
- package/out/interface/common/i-global-config/i-global-grid-config.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-grid.controller.d.ts +27 -1
- package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-panel.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-panel.controller.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +66 -0
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/model/utils/util.d.ts +5 -5
- package/out/model/utils/util.d.ts.map +1 -1
- package/out/model/utils/util.js +16 -8
- package/out/service/dto/method.dto.d.ts +2 -2
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +3 -1
- package/out/service/service/config/config.service.d.ts.map +1 -1
- package/out/service/service/control/control.service.d.ts +2 -2
- package/out/service/service/control/control.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.d.ts +6 -0
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +18 -0
- package/out/service/service/entity/method/method.d.ts +2 -3
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +5 -0
- package/out/ui-action/provider/front-ui-action-provider.d.ts +24 -0
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +128 -1
- package/out/ui-action/provider/sys-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/sys-ui-action-provider.js +2 -0
- package/package.json +3 -3
- package/src/app-hub.ts +5 -5
- package/src/config/global-config.ts +1 -0
- package/src/constant/sys-uiaction-tag.ts +4 -0
- package/src/controller/common/control/control.controller.ts +2 -2
- package/src/controller/control/app-menu/app-menu.controller.ts +2 -2
- package/src/controller/control/form/edit-form/edit-form.service.ts +1 -1
- package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +1 -1
- package/src/controller/control/form/search-form/search-form.controller.ts +64 -0
- package/src/controller/control/grid/grid/grid.controller.ts +121 -27
- package/src/controller/control/panel/panel/panel.controller.ts +15 -0
- package/src/controller/utils/data-file-util/data-file-util.ts +11 -3
- package/src/engine/md-view.engine.ts +8 -0
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +5 -5
- package/src/interface/common/i-app-service/i-app-service.ts +71 -0
- package/src/interface/common/i-global-config/i-global-grid-config.ts +10 -0
- package/src/interface/controller/controller/control/i-grid.controller.ts +30 -1
- package/src/interface/controller/controller/control/i-panel.controller.ts +9 -0
- package/src/interface/service/service/i-app-de.service.ts +96 -0
- package/src/model/utils/util.ts +18 -8
- package/src/service/dto/method.dto.ts +5 -3
- package/src/service/service/config/config.service.ts +2 -3
- package/src/service/service/control/control.service.ts +2 -2
- package/src/service/service/entity/de.service.ts +48 -0
- package/src/service/service/entity/method/method.ts +2 -3
- package/src/service/service/work-flow/work-flow.service.ts +2 -3
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +7 -1
- package/src/ui-action/provider/front-ui-action-provider.ts +153 -1
- package/src/ui-action/provider/sys-ui-action-provider.ts +2 -0
|
@@ -187,6 +187,14 @@ export class MDViewEngine extends ViewEngineBase {
|
|
|
187
187
|
await this.exportData(args);
|
|
188
188
|
return null;
|
|
189
189
|
}
|
|
190
|
+
if (key === SysUIActionTag.SEARCH) {
|
|
191
|
+
await this.searchForm.search();
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
if (key === SysUIActionTag.RESET) {
|
|
195
|
+
await this.searchForm.reset();
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
190
198
|
if (key === SysUIActionTag.COPY) {
|
|
191
199
|
this.copy(args);
|
|
192
200
|
return null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { IAppDataEntity, IAppView, IApplication } from '@ibiz/model-core';
|
|
2
|
-
import { Application } from '../../../application';
|
|
3
2
|
import { Convert } from '../../../hub';
|
|
4
3
|
import { ModelLoaderProvider } from '../../provider';
|
|
5
4
|
import { IAppConfigService } from '../i-app-config-service/i-app-config-service';
|
|
6
5
|
import { IHubController } from '../../controller';
|
|
7
6
|
import { IConfigService } from '../../service';
|
|
7
|
+
import { IAppService } from '../i-app-service/i-app-service';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* 应用 hub 服务
|
|
@@ -152,9 +152,9 @@ export interface IAppHubService {
|
|
|
152
152
|
* @author chitanda
|
|
153
153
|
* @date 2023-04-23 15:04:46
|
|
154
154
|
* @param {string} [appId=ibiz.env.appId]
|
|
155
|
-
* @return {*} {Promise<
|
|
155
|
+
* @return {*} {Promise<IAppService>}
|
|
156
156
|
*/
|
|
157
|
-
getAppAsync(appId?: string): Promise<
|
|
157
|
+
getAppAsync(appId?: string): Promise<IAppService>;
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* 获取应用实例
|
|
@@ -162,7 +162,7 @@ export interface IAppHubService {
|
|
|
162
162
|
* @author chitanda
|
|
163
163
|
* @date 2023-04-23 15:04:24
|
|
164
164
|
* @param {(string | IApplication)} [app]
|
|
165
|
-
* @return {*} {
|
|
165
|
+
* @return {*} {IAppService}
|
|
166
166
|
*/
|
|
167
|
-
getApp(app?: string | IApplication):
|
|
167
|
+
getApp(app?: string | IApplication): IAppService;
|
|
168
168
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { Net } from '@ibiz-template/core';
|
|
2
|
+
import {
|
|
3
|
+
IAppDEUIAction,
|
|
4
|
+
IAppFunc,
|
|
5
|
+
IApplication,
|
|
6
|
+
IDEOPPriv,
|
|
7
|
+
IDEUILogic,
|
|
8
|
+
} from '@ibiz/model-core';
|
|
2
9
|
import {
|
|
3
10
|
AuthorityService,
|
|
4
11
|
CodeListService,
|
|
@@ -24,6 +31,15 @@ export interface IAppService {
|
|
|
24
31
|
*/
|
|
25
32
|
readonly appId: string;
|
|
26
33
|
|
|
34
|
+
/**
|
|
35
|
+
* 应用模型
|
|
36
|
+
*
|
|
37
|
+
* @author chitanda
|
|
38
|
+
* @date 2023-11-21 15:11:33
|
|
39
|
+
* @type {IApplication}
|
|
40
|
+
*/
|
|
41
|
+
readonly model: IApplication;
|
|
42
|
+
|
|
27
43
|
/**
|
|
28
44
|
* 请求服务
|
|
29
45
|
*
|
|
@@ -68,4 +84,59 @@ export interface IAppService {
|
|
|
68
84
|
* @type {AuthorityService}
|
|
69
85
|
*/
|
|
70
86
|
readonly authority: AuthorityService;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 应用实体名称到应用实体代码名称的映射
|
|
90
|
+
*
|
|
91
|
+
* @author chitanda
|
|
92
|
+
* @date 2023-11-21 15:11:18
|
|
93
|
+
* @type {Map<string, string>}
|
|
94
|
+
*/
|
|
95
|
+
readonly deName2DeCodeName: Map<string, string>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 根据 id 查找应用功能
|
|
99
|
+
*
|
|
100
|
+
* @author chitanda
|
|
101
|
+
* @date 2023-04-20 17:04:24
|
|
102
|
+
* @param {string} id
|
|
103
|
+
* @return {*} {(IAppFunc | null)}
|
|
104
|
+
*/
|
|
105
|
+
getAppFunc(id: string): IAppFunc | null;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 获取界面行为模型
|
|
109
|
+
* @author lxm
|
|
110
|
+
* @date 2023-04-28 05:44:14
|
|
111
|
+
* @param {string} actionId
|
|
112
|
+
* @param {string} [_appDataEntityId]
|
|
113
|
+
* @return {*}
|
|
114
|
+
*/
|
|
115
|
+
getUIAction(actionId: string): Promise<IAppDEUIAction | undefined>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 获取操作标识模型
|
|
119
|
+
* @author lxm
|
|
120
|
+
* @date 2023-05-10 11:24:17
|
|
121
|
+
* @param {string} id
|
|
122
|
+
* @param {string} [appDataEntityId]
|
|
123
|
+
* @return {*} {(Promise<IDEOPPriv | undefined>)}
|
|
124
|
+
*/
|
|
125
|
+
getOPPriv(
|
|
126
|
+
id: string,
|
|
127
|
+
appDataEntityId?: string,
|
|
128
|
+
): Promise<IDEOPPriv | undefined>;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 查找实体的界面逻辑模型
|
|
132
|
+
* @author lxm
|
|
133
|
+
* @date 2023-06-14 07:20:30
|
|
134
|
+
* @param {string} deUILogicId
|
|
135
|
+
* @param {string} appDataEntityId
|
|
136
|
+
* @return {*} {(Promise<IDEUILogic | undefined>)}
|
|
137
|
+
*/
|
|
138
|
+
getDEUILogic(
|
|
139
|
+
deUILogicId: string,
|
|
140
|
+
appDataEntityId: string,
|
|
141
|
+
): Promise<IDEUILogic | undefined>;
|
|
71
142
|
}
|
|
@@ -34,4 +34,14 @@ export interface IGlobalGridConfig {
|
|
|
34
34
|
* @memberof IGlobalConfig
|
|
35
35
|
*/
|
|
36
36
|
editSaveMode: 'cell-blur' | 'auto' | 'manual';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 单元格超出呈现模式
|
|
40
|
+
* - wrap 换行,高度自动增高
|
|
41
|
+
* - ellipsis 省略,出...,悬浮出tooltip
|
|
42
|
+
* @author lxm
|
|
43
|
+
* @date 2023-11-17 11:17:39
|
|
44
|
+
* @type {('wrap' | 'ellipsis')}
|
|
45
|
+
*/
|
|
46
|
+
overflowMode: 'wrap' | 'ellipsis';
|
|
37
47
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { IDEGrid } from '@ibiz/model-core';
|
|
1
|
+
import { IDEGrid, IAppCodeList, IDEDataExportItem } from '@ibiz/model-core';
|
|
2
2
|
import { ControlVO } from '../../../../service';
|
|
3
3
|
import { IGridEvent } from '../../event';
|
|
4
4
|
import { IGridRowState, IGridState } from '../../state';
|
|
5
5
|
import { IMDControlController } from './i-md-control.controller';
|
|
6
|
+
import { CodeListItem } from '../../../service';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* 表格控制器
|
|
@@ -67,3 +68,31 @@ export interface IGridController
|
|
|
67
68
|
*/
|
|
68
69
|
validate(row: IGridRowState): Promise<boolean>;
|
|
69
70
|
}
|
|
71
|
+
|
|
72
|
+
interface AdditionalProperties {
|
|
73
|
+
/**
|
|
74
|
+
* 代码表模型
|
|
75
|
+
* @return {*}
|
|
76
|
+
* @author: zhujiamin
|
|
77
|
+
* @Date: 2023-11-21 14:13:45
|
|
78
|
+
*/
|
|
79
|
+
codeList?: IAppCodeList;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 代码表项
|
|
83
|
+
* @return {*}
|
|
84
|
+
* @author: zhujiamin
|
|
85
|
+
* @Date: 2023-11-21 14:13:45
|
|
86
|
+
*/
|
|
87
|
+
codeListItems?: readonly CodeListItem[];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 封装的导出列模型
|
|
92
|
+
* @return {*}
|
|
93
|
+
* @author: zhujiamin
|
|
94
|
+
* @Date: 2023-11-21 19:04:27
|
|
95
|
+
*/
|
|
96
|
+
export interface IExportColumn
|
|
97
|
+
extends IDEDataExportItem,
|
|
98
|
+
AdditionalProperties {}
|
|
@@ -3,6 +3,7 @@ import { IPanelEvent } from '../../event';
|
|
|
3
3
|
import { IPanelState } from '../../state';
|
|
4
4
|
import { IControlController } from './i-control.controller';
|
|
5
5
|
import { IPanelItemController } from './panel-item';
|
|
6
|
+
import { IController } from '../i.controller';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* 面板控制器
|
|
@@ -34,6 +35,14 @@ export interface IPanelController<
|
|
|
34
35
|
*/
|
|
35
36
|
data: IData;
|
|
36
37
|
|
|
38
|
+
/**
|
|
39
|
+
* 容器控制器(可能是视图控制器,也可能是部件控制器)
|
|
40
|
+
* @author lxm
|
|
41
|
+
* @date 2023-11-21 07:41:31
|
|
42
|
+
* @type {(IController)}
|
|
43
|
+
*/
|
|
44
|
+
container?: IController;
|
|
45
|
+
|
|
37
46
|
/**
|
|
38
47
|
* 部件加载
|
|
39
48
|
*
|
|
@@ -67,6 +67,102 @@ export interface IAppDEService {
|
|
|
67
67
|
params2?: IParams,
|
|
68
68
|
): Promise<IHttpResponse>;
|
|
69
69
|
|
|
70
|
+
/**
|
|
71
|
+
* 获取草稿数据[系统预置]
|
|
72
|
+
*
|
|
73
|
+
* @author chitanda
|
|
74
|
+
* @date 2023-11-21 16:11:34
|
|
75
|
+
* @param {IParams} context
|
|
76
|
+
* @param {(IData | IData[])} [params]
|
|
77
|
+
* @param {IParams} [params2]
|
|
78
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
79
|
+
*/
|
|
80
|
+
getDraft(
|
|
81
|
+
context: IParams,
|
|
82
|
+
params?: IData | IData[],
|
|
83
|
+
params2?: IParams,
|
|
84
|
+
): Promise<IHttpResponse>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 创建数据[系统预置]
|
|
88
|
+
*
|
|
89
|
+
* @author chitanda
|
|
90
|
+
* @date 2023-11-21 16:11:50
|
|
91
|
+
* @param {IParams} context
|
|
92
|
+
* @param {(IData | IData[])} [params]
|
|
93
|
+
* @param {IParams} [params2]
|
|
94
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
95
|
+
*/
|
|
96
|
+
create(
|
|
97
|
+
context: IParams,
|
|
98
|
+
params?: IData | IData[],
|
|
99
|
+
params2?: IParams,
|
|
100
|
+
): Promise<IHttpResponse>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 获取数据[系统预置]
|
|
104
|
+
*
|
|
105
|
+
* @author chitanda
|
|
106
|
+
* @date 2023-11-21 16:11:00
|
|
107
|
+
* @param {IParams} context
|
|
108
|
+
* @param {(IData | IData[])} [params]
|
|
109
|
+
* @param {IParams} [params2]
|
|
110
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
111
|
+
*/
|
|
112
|
+
get(
|
|
113
|
+
context: IParams,
|
|
114
|
+
params?: IData | IData[],
|
|
115
|
+
params2?: IParams,
|
|
116
|
+
): Promise<IHttpResponse>;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 更新数据[系统预置]
|
|
120
|
+
*
|
|
121
|
+
* @author chitanda
|
|
122
|
+
* @date 2023-11-21 16:11:09
|
|
123
|
+
* @param {IParams} context
|
|
124
|
+
* @param {(IData | IData[])} [params]
|
|
125
|
+
* @param {IParams} [params2]
|
|
126
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
127
|
+
*/
|
|
128
|
+
update(
|
|
129
|
+
context: IParams,
|
|
130
|
+
params?: IData | IData[],
|
|
131
|
+
params2?: IParams,
|
|
132
|
+
): Promise<IHttpResponse>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* 删除数据[系统预置]
|
|
136
|
+
*
|
|
137
|
+
* @author chitanda
|
|
138
|
+
* @date 2023-11-21 16:11:12
|
|
139
|
+
* @param {IParams} context
|
|
140
|
+
* @param {(IData | IData[])} [params]
|
|
141
|
+
* @param {IParams} [params2]
|
|
142
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
143
|
+
*/
|
|
144
|
+
remove(
|
|
145
|
+
context: IParams,
|
|
146
|
+
params?: IData | IData[],
|
|
147
|
+
params2?: IParams,
|
|
148
|
+
): Promise<IHttpResponse>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* 获取默认数据集[系统预置]
|
|
152
|
+
*
|
|
153
|
+
* @author chitanda
|
|
154
|
+
* @date 2023-11-21 16:11:06
|
|
155
|
+
* @param {IParams} context
|
|
156
|
+
* @param {(IData | IData[])} [params]
|
|
157
|
+
* @param {IParams} [params2]
|
|
158
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
159
|
+
*/
|
|
160
|
+
fetchDefault(
|
|
161
|
+
context: IParams,
|
|
162
|
+
params?: IData | IData[],
|
|
163
|
+
params2?: IParams,
|
|
164
|
+
): Promise<IHttpResponse>;
|
|
165
|
+
|
|
70
166
|
/**
|
|
71
167
|
* 触发实体服务方法 ac 模式
|
|
72
168
|
*
|
package/src/model/utils/util.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { RuntimeModelError } from '@ibiz-template/core';
|
|
1
2
|
import {
|
|
2
3
|
IAppView,
|
|
3
4
|
IAppViewRef,
|
|
4
|
-
IApplication,
|
|
5
5
|
IControl,
|
|
6
6
|
IModelObject,
|
|
7
7
|
ISysPFPlugin,
|
|
@@ -98,10 +98,10 @@ export function parseUserParams(userParams: Record<string, string>): {
|
|
|
98
98
|
const splitArr: Array<string> = key.split('.');
|
|
99
99
|
switch (splitArr[0]) {
|
|
100
100
|
case 'SRFNAVPARAM':
|
|
101
|
-
Object.assign(
|
|
101
|
+
Object.assign(navigateParams, { [splitArr[1]]: param });
|
|
102
102
|
break;
|
|
103
103
|
case 'SRFNAVCTX':
|
|
104
|
-
Object.assign(
|
|
104
|
+
Object.assign(navigateContexts, { [splitArr[1]]: param });
|
|
105
105
|
break;
|
|
106
106
|
default:
|
|
107
107
|
Object.assign(other, { key: param });
|
|
@@ -118,14 +118,24 @@ export function parseUserParams(userParams: Record<string, string>): {
|
|
|
118
118
|
* 从应用里面获取插件配置参数
|
|
119
119
|
*
|
|
120
120
|
* @author chitanda
|
|
121
|
-
* @date 2023-11-
|
|
121
|
+
* @date 2023-11-21 14:11:06
|
|
122
122
|
* @export
|
|
123
|
-
* @param {
|
|
124
|
-
* @param {string}
|
|
123
|
+
* @param {string} id 插件标识
|
|
124
|
+
* @param {string} [appId] 当前所在应用标识
|
|
125
125
|
* @return {*} {ISysPFPlugin}
|
|
126
126
|
*/
|
|
127
|
-
export function getPFPlugin(
|
|
128
|
-
const
|
|
127
|
+
export function getPFPlugin(id: string, appId?: string): ISysPFPlugin {
|
|
128
|
+
const app = ibiz.hub.getApp(appId);
|
|
129
|
+
if (!app) {
|
|
130
|
+
throw new RuntimeModelError(app, '未找到应用');
|
|
131
|
+
}
|
|
132
|
+
const { model } = app;
|
|
133
|
+
if (!model.appPFPluginRefs) {
|
|
134
|
+
throw new RuntimeModelError(model, '应用未配置插件');
|
|
135
|
+
}
|
|
136
|
+
const plugin = model.appPFPluginRefs.find(
|
|
137
|
+
item => item.pluginCode!.toLowerCase() === id.toLowerCase(),
|
|
138
|
+
);
|
|
129
139
|
if (!plugin) {
|
|
130
140
|
throw new Error(`未找到插件${id}`);
|
|
131
141
|
}
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
IAppDEMethodDTOField,
|
|
6
6
|
} from '@ibiz/model-core';
|
|
7
7
|
import { ModelError } from '@ibiz-template/core';
|
|
8
|
-
import { Application } from '../../application';
|
|
9
8
|
import { AppDataEntity } from '../app-data-entity/app-data-entity';
|
|
10
9
|
import { findModelChild } from '../../model';
|
|
10
|
+
import { IAppService } from '../../interface';
|
|
11
11
|
|
|
12
12
|
interface listMap {
|
|
13
13
|
[key: number]: IData;
|
|
@@ -22,7 +22,7 @@ interface listMap {
|
|
|
22
22
|
* @class MethodDto
|
|
23
23
|
*/
|
|
24
24
|
export class MethodDto {
|
|
25
|
-
protected app?:
|
|
25
|
+
protected app?: IAppService;
|
|
26
26
|
|
|
27
27
|
protected fields!: IAppDEMethodDTOField[];
|
|
28
28
|
|
|
@@ -86,7 +86,9 @@ export class MethodDto {
|
|
|
86
86
|
const field = this.fields[i];
|
|
87
87
|
const key = field.codeName!.toLowerCase();
|
|
88
88
|
switch (field.type) {
|
|
89
|
-
case 'SIMPLE':
|
|
89
|
+
case 'SIMPLE':
|
|
90
|
+
case 'SIMPLES':
|
|
91
|
+
case 'DTO': {
|
|
90
92
|
break;
|
|
91
93
|
}
|
|
92
94
|
case 'DTOS': {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IConfigService } from '../../../interface';
|
|
1
|
+
import { IAppService, IConfigService } from '../../../interface';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* 应用配置存储服务
|
|
@@ -10,7 +9,7 @@ import { IConfigService } from '../../../interface';
|
|
|
10
9
|
* @class ConfigService
|
|
11
10
|
*/
|
|
12
11
|
export class ConfigService implements IConfigService {
|
|
13
|
-
private app:
|
|
12
|
+
private app: IAppService;
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* Creates an instance of ConfigService.
|
|
@@ -2,10 +2,10 @@ import { IHttpResponse, clone } from '@ibiz-template/core';
|
|
|
2
2
|
import { IControl } from '@ibiz/model-core';
|
|
3
3
|
import { ControlVO } from '../../vo/control.vo';
|
|
4
4
|
import { UIMapField } from '../../vo/ui-map-field';
|
|
5
|
-
import {
|
|
5
|
+
import { IAppService } from '../../../interface';
|
|
6
6
|
|
|
7
7
|
export class ControlService<T extends IControl = IControl> {
|
|
8
|
-
app!:
|
|
8
|
+
app!: IAppService;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* 部件模型
|
|
@@ -151,6 +151,54 @@ export class DEService implements IAppDEService {
|
|
|
151
151
|
throw new RuntimeError(`${this.model.codeName}未支持「${id}」方法`);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
getDraft(
|
|
155
|
+
context: IParams,
|
|
156
|
+
params?: IData | IData[],
|
|
157
|
+
params2?: IParams,
|
|
158
|
+
): Promise<IHttpResponse<IData>> {
|
|
159
|
+
return this.exec('GetDraft', context, params, params2);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
create(
|
|
163
|
+
context: IParams,
|
|
164
|
+
params?: IData | IData[],
|
|
165
|
+
params2?: IParams,
|
|
166
|
+
): Promise<IHttpResponse<IData>> {
|
|
167
|
+
return this.exec('Create', context, params, params2);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
get(
|
|
171
|
+
context: IParams,
|
|
172
|
+
params?: IData | IData[],
|
|
173
|
+
params2?: IParams,
|
|
174
|
+
): Promise<IHttpResponse<IData>> {
|
|
175
|
+
return this.exec('Get', context, params, params2);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
update(
|
|
179
|
+
context: IParams,
|
|
180
|
+
params?: IData | IData[],
|
|
181
|
+
params2?: IParams,
|
|
182
|
+
): Promise<IHttpResponse<IData>> {
|
|
183
|
+
return this.exec('Update', context, params, params2);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
remove(
|
|
187
|
+
context: IParams,
|
|
188
|
+
params?: IData | IData[],
|
|
189
|
+
params2?: IParams,
|
|
190
|
+
): Promise<IHttpResponse<IData>> {
|
|
191
|
+
return this.exec('Remove', context, params, params2);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
fetchDefault(
|
|
195
|
+
context: IParams,
|
|
196
|
+
params?: IData | IData[],
|
|
197
|
+
params2?: IParams,
|
|
198
|
+
): Promise<IHttpResponse<IData>> {
|
|
199
|
+
return this.exec('FetchDefault', context, params, params2);
|
|
200
|
+
}
|
|
201
|
+
|
|
154
202
|
/**
|
|
155
203
|
* 执行服务方法 ac 模式
|
|
156
204
|
*
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
import { HttpResponse, RuntimeModelError } from '@ibiz-template/core';
|
|
3
3
|
import { IAppDataEntity, IAppDEMethod } from '@ibiz/model-core';
|
|
4
4
|
import { isArray } from 'lodash-es';
|
|
5
|
-
import { Application } from '../../../../application';
|
|
6
5
|
import { AppDataEntity } from '../../../app-data-entity/app-data-entity';
|
|
7
6
|
import { calcResPath } from '../../../utils';
|
|
8
7
|
import { MethodInput } from './method-input';
|
|
9
8
|
import { MethodReturn } from './method-renturn';
|
|
10
|
-
import { IAppDEService, IDataEntity } from '../../../../interface';
|
|
9
|
+
import { IAppDEService, IAppService, IDataEntity } from '../../../../interface';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* 应用实体方法
|
|
@@ -18,7 +17,7 @@ import { IAppDEService, IDataEntity } from '../../../../interface';
|
|
|
18
17
|
* @class Method
|
|
19
18
|
*/
|
|
20
19
|
export abstract class Method {
|
|
21
|
-
protected app!:
|
|
20
|
+
protected app!: IAppService;
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* 输入 DTO
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IHttpResponse, RuntimeError } from '@ibiz-template/core';
|
|
2
2
|
import { IAppDataEntity } from '@ibiz/model-core';
|
|
3
|
-
import {
|
|
4
|
-
import { IWorkFlowService } from '../../../interface';
|
|
3
|
+
import { IAppService, IWorkFlowService } from '../../../interface';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* 工作流服务
|
|
@@ -12,7 +11,7 @@ import { IWorkFlowService } from '../../../interface';
|
|
|
12
11
|
* @class WorkFlowService
|
|
13
12
|
*/
|
|
14
13
|
export class WorkFlowService implements IWorkFlowService {
|
|
15
|
-
private app!:
|
|
14
|
+
private app!: IAppService;
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* 常规基础路径
|
|
@@ -26,7 +26,7 @@ export class TreeDataSetNodeData extends TreeNodeData implements ITreeNodeData {
|
|
|
26
26
|
parentNodeData: ITreeNodeData | undefined,
|
|
27
27
|
opts: {
|
|
28
28
|
data: IData;
|
|
29
|
-
leaf: boolean;
|
|
29
|
+
leaf: boolean; // 是否有子节点关系
|
|
30
30
|
navContext?: IParams;
|
|
31
31
|
navParams?: IParams;
|
|
32
32
|
},
|
|
@@ -59,6 +59,12 @@ export class TreeDataSetNodeData extends TreeNodeData implements ITreeNodeData {
|
|
|
59
59
|
|
|
60
60
|
this.icon = this.calcIcon(model);
|
|
61
61
|
this.textHtml = this.calcTextHtml(model);
|
|
62
|
+
|
|
63
|
+
// 识别叶子节点标识属性,根据后台数据赋值leaf
|
|
64
|
+
if (model.leafFlagAppDEFieldId) {
|
|
65
|
+
const value = data[model.leafFlagAppDEFieldId];
|
|
66
|
+
this.leaf = [1, '1', true, 'true'].includes(value);
|
|
67
|
+
}
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
protected calcIcon(model: IDETreeDataSetNode): IIcon | undefined {
|