@ibiz-template/runtime 0.7.5 → 0.7.7-dev.0
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 +540 -64
- package/dist/index.system.min.js +1 -1
- package/out/application.d.ts +1 -9
- package/out/application.d.ts.map +1 -1
- package/out/application.js +1 -2
- package/out/controller/common/view/view.controller.d.ts +11 -0
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +26 -2
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts +80 -6
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.js +109 -14
- package/out/controller/control/dashboard/dashboard.controller.d.ts +8 -0
- package/out/controller/control/dashboard/dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/dashboard.controller.js +17 -0
- package/out/controller/control/dashboard/portlet/chart-portlet/chart-portlet.controller.d.ts +7 -0
- package/out/controller/control/dashboard/portlet/chart-portlet/chart-portlet.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/chart-portlet/chart-portlet.controller.js +11 -0
- package/out/controller/control/dashboard/portlet/list-portlet/list-portlet.controller.d.ts +7 -0
- package/out/controller/control/dashboard/portlet/list-portlet/list-portlet.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/list-portlet/list-portlet.controller.js +11 -0
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts +31 -2
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +62 -15
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.state.d.ts +15 -0
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.state.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/view-portlet/view-portlet.controller.d.ts +7 -0
- package/out/controller/control/dashboard/portlet/view-portlet/view-portlet.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/view-portlet/view-portlet.controller.js +12 -0
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +2 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts +8 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +34 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +1 -1
- package/out/controller/control/wizard-panel/wizard-panel.controller.d.ts +18 -0
- package/out/controller/control/wizard-panel/wizard-panel.controller.d.ts.map +1 -1
- package/out/controller/control/wizard-panel/wizard-panel.controller.js +70 -1
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +4 -1
- package/out/interface/common/i-app-service/i-app-service.d.ts +1 -9
- package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
- package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts +14 -0
- package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/view/i-view.controller.d.ts +8 -0
- package/out/interface/controller/controller/view/i-view.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-dashboard.event.d.ts +15 -1
- package/out/interface/controller/event/control/i-dashboard.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-wizard-panel.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-wizard-panel.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/portlet/i-portlet.state.d.ts +15 -0
- package/out/interface/controller/state/control/portlet/i-portlet.state.d.ts.map +1 -1
- package/out/interface/controller/state/view/i-view.state.d.ts +8 -0
- package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
- package/out/service/de-service-util.d.ts.map +1 -1
- package/out/service/de-service-util.js +11 -2
- package/out/service/service/util/util.service.d.ts +55 -5
- package/out/service/service/util/util.service.d.ts.map +1 -1
- package/out/service/service/util/util.service.js +108 -6
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +7 -1
- package/out/utils/error-handler/default-error-handler.d.ts.map +1 -1
- package/out/utils/error-handler/default-error-handler.js +3 -0
- package/package.json +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventBase } from '../argument';
|
|
1
2
|
import { IControlEvent } from './i-control.event';
|
|
2
3
|
/**
|
|
3
4
|
* 数据看板部件事件
|
|
@@ -8,5 +9,18 @@ import { IControlEvent } from './i-control.event';
|
|
|
8
9
|
* @interface IDashboardEvent
|
|
9
10
|
* @extends {IControlEvent}
|
|
10
11
|
*/
|
|
11
|
-
export
|
|
12
|
+
export interface IDashboardEvent extends IControlEvent {
|
|
13
|
+
/**
|
|
14
|
+
* 配置信息改变
|
|
15
|
+
*
|
|
16
|
+
* @author zzq
|
|
17
|
+
*/
|
|
18
|
+
onConfigChange: {
|
|
19
|
+
event: EventBase;
|
|
20
|
+
emitArgs: {
|
|
21
|
+
name: string;
|
|
22
|
+
config: IData;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
12
26
|
//# sourceMappingURL=i-dashboard.event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-dashboard.event.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/event/control/i-dashboard.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"i-dashboard.event.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/event/control/i-dashboard.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD;;;;OAIG;IACH,cAAc,EAAE;QACd,KAAK,EAAE,SAAS,CAAC;QACjB,QAAQ,EAAE;YACR,IAAI,EAAE,MAAM,CAAC;YACb,MAAM,EAAE,KAAK,CAAC;SACf,CAAC;KACH,CAAC;CACH"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IButtonContainerState } from '../../common';
|
|
1
2
|
import { IControlState } from './i-control.state';
|
|
2
3
|
/**
|
|
3
4
|
* 向导面板状态
|
|
@@ -15,5 +16,11 @@ export interface IWizardPanelState extends IControlState {
|
|
|
15
16
|
* @memberof WizardPanelState
|
|
16
17
|
*/
|
|
17
18
|
activeFormTag: string;
|
|
19
|
+
/**
|
|
20
|
+
* 向导面板按钮状态
|
|
21
|
+
* @type {(IButtonContainerState | null)}
|
|
22
|
+
* @memberof WizardPanelState
|
|
23
|
+
*/
|
|
24
|
+
buttonsState: IButtonContainerState;
|
|
18
25
|
}
|
|
19
26
|
//# sourceMappingURL=i-wizard-panel.state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-wizard-panel.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/control/i-wizard-panel.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD;;;;;;;OAOG;IACH,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"i-wizard-panel.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/control/i-wizard-panel.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD;;;;;;;OAOG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,YAAY,EAAE,qBAAqB,CAAC;CACrC"}
|
|
@@ -15,6 +15,21 @@ export interface IPortletState extends IColState {
|
|
|
15
15
|
* @type {IPortletClass}
|
|
16
16
|
*/
|
|
17
17
|
class: IPortletClass;
|
|
18
|
+
/**
|
|
19
|
+
* 上下文
|
|
20
|
+
*
|
|
21
|
+
* @author zzq
|
|
22
|
+
* @date 2024-04-25 16:04:24
|
|
23
|
+
* @type {IContext}
|
|
24
|
+
*/
|
|
25
|
+
context: IContext;
|
|
26
|
+
/**
|
|
27
|
+
* 门户标题
|
|
28
|
+
*
|
|
29
|
+
* @type {string | undefined}
|
|
30
|
+
* @memberof PortletPartState
|
|
31
|
+
*/
|
|
32
|
+
title: string | undefined;
|
|
18
33
|
}
|
|
19
34
|
export interface IPortletClass {
|
|
20
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-portlet.state.d.ts","sourceRoot":"","sources":["../../../../../../src/interface/controller/state/control/portlet/i-portlet.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;;;OAKG;IACH,gBAAgB,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAE/C;;;;;OAKG;IACH,KAAK,EAAE,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"i-portlet.state.d.ts","sourceRoot":"","sources":["../../../../../../src/interface/controller/state/control/portlet/i-portlet.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;;;OAKG;IACH,gBAAgB,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAE/C;;;;;OAKG;IACH,KAAK,EAAE,aAAa,CAAC;IAErB;;;;;;OAMG;IACH,OAAO,EAAE,QAAQ,CAAC;IAElB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB"}
|
|
@@ -16,6 +16,14 @@ export interface IViewState extends IControllerState, IViewSession {
|
|
|
16
16
|
* @type {boolean}
|
|
17
17
|
*/
|
|
18
18
|
activated: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 当前视图是否出现错误
|
|
21
|
+
*
|
|
22
|
+
* @author tony001
|
|
23
|
+
* @date 2024-04-26 15:04:51
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
*/
|
|
26
|
+
hasError: boolean;
|
|
19
27
|
/**
|
|
20
28
|
* 视图标题
|
|
21
29
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-view.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/view/i-view.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,UAAW,SAAQ,gBAAgB,EAAE,YAAY;IAChE;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,aAAa,EAAE,OAAO,CAAC;IAEvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,YAAY,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE,CAAA;KAAE,CAAC;IAE9C;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"i-view.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/view/i-view.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,UAAW,SAAQ,gBAAgB,EAAE,YAAY;IAChE;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,aAAa,EAAE,OAAO,CAAC;IAEvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,YAAY,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE,CAAA;KAAE,CAAC;IAE9C;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de-service-util.d.ts","sourceRoot":"","sources":["../../src/service/de-service-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"de-service-util.d.ts","sourceRoot":"","sources":["../../src/service/de-service-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAa,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,cAAc,KACxB,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B;;;;;;;GAOG;AACH,qBAAa,aAAa;IA4BZ,SAAS,CAAC,QAAQ,EAAE,YAAY;IA3B5C;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAa;IAErE;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CACxD;IAEZ;;;;;;OAMG;gBACmB,QAAQ,EAAE,YAAY;IAE5C;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,oBAAoB,GAAG,IAAI;IAIpE;;;;;;;;OAQG;IACG,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA0BvE;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI;IAY9B;;;;;;;OAOG;IACH,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI;IAWvC;;;;;;;;;OASG;IACH,kBAAkB,CAChB,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,MAAM,EAChB,aAAa,GAAE,MAAM,EAAO,GAC3B,IAAI;IA6BP;;;;;;;;;;OAUG;IACG,IAAI,CACR,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,GAAG,SAAS,EACpC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,EAC7B,MAAM,CAAC,EAAE,KAAK,GACb,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;CAkBjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RuntimeError } from '@ibiz-template/core';
|
|
1
|
+
import { HttpError, RuntimeError } from '@ibiz-template/core';
|
|
2
2
|
import { DEService } from './service';
|
|
3
3
|
/**
|
|
4
4
|
* 应用服务工具类
|
|
@@ -155,7 +155,16 @@ export class DEServiceUtil {
|
|
|
155
155
|
*/
|
|
156
156
|
async exec(appDataEntityId, methodName, context, params, params2, header) {
|
|
157
157
|
const service = await this.getService(context, appDataEntityId);
|
|
158
|
-
|
|
158
|
+
try {
|
|
159
|
+
const result = await service.exec(methodName, context, params, params2, header);
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
if (error instanceof HttpError) {
|
|
164
|
+
error.tag = context.srfviewid;
|
|
165
|
+
}
|
|
166
|
+
throw error;
|
|
167
|
+
}
|
|
159
168
|
}
|
|
160
169
|
}
|
|
161
170
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAppDataEntity, IAppUtil } from '@ibiz/model-core';
|
|
2
|
+
import { IAppDEService } from '../../../interface';
|
|
2
3
|
/**
|
|
3
4
|
* 应用功能组件服务
|
|
4
5
|
*
|
|
@@ -8,14 +9,41 @@ import { IApplication } from '@ibiz/model-core';
|
|
|
8
9
|
* @class UtilService
|
|
9
10
|
*/
|
|
10
11
|
export declare class UtilService {
|
|
11
|
-
protected
|
|
12
|
+
protected appUtil: IAppUtil;
|
|
13
|
+
/**
|
|
14
|
+
* 存储实体模型
|
|
15
|
+
*
|
|
16
|
+
* @author tony001
|
|
17
|
+
* @date 2024-04-24 15:04:36
|
|
18
|
+
* @type {(IAppDataEntity | null)}
|
|
19
|
+
*/
|
|
20
|
+
protected stoageAppDataEntity: IAppDataEntity | null;
|
|
21
|
+
/**
|
|
22
|
+
* 存储服务
|
|
23
|
+
*
|
|
24
|
+
* @author tony001
|
|
25
|
+
* @date 2024-04-24 14:04:36
|
|
26
|
+
* @type {(IAppDEService | null)}
|
|
27
|
+
*/
|
|
28
|
+
protected appDEService: IAppDEService | null;
|
|
12
29
|
/**
|
|
13
30
|
* Creates an instance of UtilService.
|
|
14
31
|
* @author tony001
|
|
15
|
-
* @date 2024-04-
|
|
16
|
-
* @param {
|
|
32
|
+
* @date 2024-04-24 14:04:41
|
|
33
|
+
* @param {IAppUtil} appUtil
|
|
17
34
|
*/
|
|
18
|
-
constructor(
|
|
35
|
+
constructor(appUtil: IAppUtil);
|
|
36
|
+
/**
|
|
37
|
+
* 获取存储服务
|
|
38
|
+
*
|
|
39
|
+
* @author tony001
|
|
40
|
+
* @date 2024-04-24 14:04:21
|
|
41
|
+
* @private
|
|
42
|
+
* @param {IContext} context
|
|
43
|
+
* @param {IParams} params
|
|
44
|
+
* @return {*} {Promise<IAppDEService>}
|
|
45
|
+
*/
|
|
46
|
+
private getAppDEService;
|
|
19
47
|
/**
|
|
20
48
|
* 加载指定数据
|
|
21
49
|
*
|
|
@@ -39,5 +67,27 @@ export declare class UtilService {
|
|
|
39
67
|
* @return {*} {Promise<IData>}
|
|
40
68
|
*/
|
|
41
69
|
save(tag: string, context: IContext, params: IParams, data: IData): Promise<IData>;
|
|
70
|
+
/**
|
|
71
|
+
* 处理请求数据
|
|
72
|
+
*
|
|
73
|
+
* @author tony001
|
|
74
|
+
* @date 2024-04-24 15:04:02
|
|
75
|
+
* @private
|
|
76
|
+
* @param {IContext} context
|
|
77
|
+
* @param {IParams} params
|
|
78
|
+
* @param {IData} data
|
|
79
|
+
* @return {*} {{ context: IContext; params: IParams; data: IData }}
|
|
80
|
+
*/
|
|
81
|
+
private handleRequestData;
|
|
82
|
+
/**
|
|
83
|
+
* 处理响应数据
|
|
84
|
+
*
|
|
85
|
+
* @author tony001
|
|
86
|
+
* @date 2024-04-24 16:04:45
|
|
87
|
+
* @private
|
|
88
|
+
* @param {IData} response
|
|
89
|
+
* @return {*} {IData}
|
|
90
|
+
*/
|
|
91
|
+
private handleResponse;
|
|
42
92
|
}
|
|
43
93
|
//# sourceMappingURL=util.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/util/util.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"util.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/util/util.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;GAOG;AACH,qBAAa,WAAW;IAyBV,SAAS,CAAC,OAAO,EAAE,QAAQ;IAxBvC;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,EAAE,cAAc,GAAG,IAAI,CAAQ;IAE5D;;;;;;OAMG;IACH,SAAS,CAAC,YAAY,EAAE,aAAa,GAAG,IAAI,CAAQ;IAEpD;;;;;OAKG;gBACmB,OAAO,EAAE,QAAQ;IAEvC;;;;;;;;;OASG;YACW,eAAe;IA6B7B;;;;;;;;;OASG;IACG,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC;IAkB3E;;;;;;;;;;OAUG;IACG,IAAI,CACR,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,KAAK,CAAC;IAUjB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,iBAAiB;IAiCzB;;;;;;;;OAQG;IACH,OAAO,CAAC,cAAc;CAKvB"}
|
|
@@ -10,11 +10,54 @@ export class UtilService {
|
|
|
10
10
|
/**
|
|
11
11
|
* Creates an instance of UtilService.
|
|
12
12
|
* @author tony001
|
|
13
|
-
* @date 2024-04-
|
|
14
|
-
* @param {
|
|
13
|
+
* @date 2024-04-24 14:04:41
|
|
14
|
+
* @param {IAppUtil} appUtil
|
|
15
15
|
*/
|
|
16
|
-
constructor(
|
|
17
|
-
this.
|
|
16
|
+
constructor(appUtil) {
|
|
17
|
+
this.appUtil = appUtil;
|
|
18
|
+
/**
|
|
19
|
+
* 存储实体模型
|
|
20
|
+
*
|
|
21
|
+
* @author tony001
|
|
22
|
+
* @date 2024-04-24 15:04:36
|
|
23
|
+
* @type {(IAppDataEntity | null)}
|
|
24
|
+
*/
|
|
25
|
+
this.stoageAppDataEntity = null;
|
|
26
|
+
/**
|
|
27
|
+
* 存储服务
|
|
28
|
+
*
|
|
29
|
+
* @author tony001
|
|
30
|
+
* @date 2024-04-24 14:04:36
|
|
31
|
+
* @type {(IAppDEService | null)}
|
|
32
|
+
*/
|
|
33
|
+
this.appDEService = null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 获取存储服务
|
|
37
|
+
*
|
|
38
|
+
* @author tony001
|
|
39
|
+
* @date 2024-04-24 14:04:21
|
|
40
|
+
* @private
|
|
41
|
+
* @param {IContext} context
|
|
42
|
+
* @param {IParams} params
|
|
43
|
+
* @return {*} {Promise<IAppDEService>}
|
|
44
|
+
*/
|
|
45
|
+
async getAppDEService(context) {
|
|
46
|
+
if (this.appDEService) {
|
|
47
|
+
return this.appDEService;
|
|
48
|
+
}
|
|
49
|
+
const { appId, name, stoageAppDataEntityId } = this.appUtil;
|
|
50
|
+
if (appId && stoageAppDataEntityId) {
|
|
51
|
+
const app = ibiz.hub.getApp(appId);
|
|
52
|
+
this.stoageAppDataEntity = await ibiz.hub.getAppDataEntity(stoageAppDataEntityId, appId);
|
|
53
|
+
const appDEService = await app.deService.getService(context, stoageAppDataEntityId);
|
|
54
|
+
if (appDEService) {
|
|
55
|
+
this.appDEService = appDEService;
|
|
56
|
+
return appDEService;
|
|
57
|
+
}
|
|
58
|
+
throw new Error(`应用功能[${name}]未找到存储实体[${stoageAppDataEntityId}]`);
|
|
59
|
+
}
|
|
60
|
+
throw new Error(`应用功能[${name}]不存在`);
|
|
18
61
|
}
|
|
19
62
|
/**
|
|
20
63
|
* 加载指定数据
|
|
@@ -27,7 +70,18 @@ export class UtilService {
|
|
|
27
70
|
* @return {*} {Promise<IData>}
|
|
28
71
|
*/
|
|
29
72
|
async load(tag, context, params) {
|
|
30
|
-
|
|
73
|
+
const tempContext = context.clone();
|
|
74
|
+
const dataService = await this.getAppDEService(tempContext);
|
|
75
|
+
// 设置数据主键
|
|
76
|
+
tempContext[this.stoageAppDataEntity.codeName.toLowerCase()] = tag;
|
|
77
|
+
const { getAppDEActionId } = this.appUtil;
|
|
78
|
+
try {
|
|
79
|
+
const res = await dataService.exec(getAppDEActionId || 'get', tempContext, params);
|
|
80
|
+
return this.handleResponse(res);
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
return {};
|
|
84
|
+
}
|
|
31
85
|
}
|
|
32
86
|
/**
|
|
33
87
|
* 保存指定数据
|
|
@@ -41,6 +95,54 @@ export class UtilService {
|
|
|
41
95
|
* @return {*} {Promise<IData>}
|
|
42
96
|
*/
|
|
43
97
|
async save(tag, context, params, data) {
|
|
44
|
-
|
|
98
|
+
const dataService = await this.getAppDEService(context);
|
|
99
|
+
const { context: tempContext, params: tempParams, data: tempData, } = this.handleRequestData(tag, context, params, data);
|
|
100
|
+
return dataService.exec('save', tempContext, tempData, tempParams);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 处理请求数据
|
|
104
|
+
*
|
|
105
|
+
* @author tony001
|
|
106
|
+
* @date 2024-04-24 15:04:02
|
|
107
|
+
* @private
|
|
108
|
+
* @param {IContext} context
|
|
109
|
+
* @param {IParams} params
|
|
110
|
+
* @param {IData} data
|
|
111
|
+
* @return {*} {{ context: IContext; params: IParams; data: IData }}
|
|
112
|
+
*/
|
|
113
|
+
handleRequestData(tag, context, params, data) {
|
|
114
|
+
const { modelIdAppDEFieldId, modelAppDEFieldId, appIdAppDEFieldId, userIdAppDEFieldId, stoageAppDataEntityId, } = this.appUtil;
|
|
115
|
+
if (!this.stoageAppDataEntity) {
|
|
116
|
+
throw new Error(`未找到存储实体[${stoageAppDataEntityId}]`);
|
|
117
|
+
}
|
|
118
|
+
const tempContext = context.clone();
|
|
119
|
+
const tempData = {};
|
|
120
|
+
// 设置数据主键
|
|
121
|
+
tempContext[this.stoageAppDataEntity.codeName.toLowerCase()] = tag;
|
|
122
|
+
const { keyAppDEFieldId } = this.stoageAppDataEntity;
|
|
123
|
+
tempData[keyAppDEFieldId] = tag;
|
|
124
|
+
// 设置数据
|
|
125
|
+
tempData[modelIdAppDEFieldId] = params === null || params === void 0 ? void 0 : params.modelId;
|
|
126
|
+
tempData[modelAppDEFieldId] = JSON.stringify(data);
|
|
127
|
+
tempData[appIdAppDEFieldId] = tempContext.srfappid;
|
|
128
|
+
tempData[userIdAppDEFieldId] = tempContext.srfpersonid;
|
|
129
|
+
tempData.type = params === null || params === void 0 ? void 0 : params.type;
|
|
130
|
+
tempData.owner_type = params === null || params === void 0 ? void 0 : params.ownerType;
|
|
131
|
+
tempData.owner_id = params === null || params === void 0 ? void 0 : params.ownerId;
|
|
132
|
+
return { context: tempContext, params, data: tempData };
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* 处理响应数据
|
|
136
|
+
*
|
|
137
|
+
* @author tony001
|
|
138
|
+
* @date 2024-04-24 16:04:45
|
|
139
|
+
* @private
|
|
140
|
+
* @param {IData} response
|
|
141
|
+
* @return {*} {IData}
|
|
142
|
+
*/
|
|
143
|
+
handleResponse(response) {
|
|
144
|
+
const { data } = response;
|
|
145
|
+
const { modelAppDEFieldId } = this.appUtil;
|
|
146
|
+
return JSON.parse(data[modelAppDEFieldId]);
|
|
45
147
|
}
|
|
46
148
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-node-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/tree-node-data/tree-node-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"tree-node-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/tree-node-data/tree-node-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;;;;GAMG;AACH,8BAAsB,YAAa,YAAW,aAAa;IACzD,KAAK,EAAE,MAAM,CAAgB;IAE7B,SAAS,EAAE,MAAM,CAAC;IAElB,GAAG,EAAG,MAAM,CAAC;IAEb,SAAS,EAAG,MAAM,CAAC;IAEnB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B,KAAK,EAAG,MAAM,CAAC;IAEf,SAAS,CAAC,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IAExC,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAE5B,UAAU,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAE/B,YAAY,EAAE,OAAO,CAAC;IAEtB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,OAAO,EAAE,MAAM,CAAC;IAEhB,KAAK,EAAE,OAAO,CAAS;IAEvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,cAAc,CAAC,EAAE,OAAO,CAAC;gBAGvB,KAAK,EAAE,WAAW,EAClB,cAAc,EAAE,aAAa,GAAG,SAAS,EACzC,IAAI,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE;IAiCpE;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,KAAK,GAAG,SAAS;IAqBzD;;;;;;OAMG;IACH,WAAW,IAAI,KAAK,GAAG,SAAS;CAiBjC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createUUID } from 'qx-util';
|
|
2
|
+
import { isBase64Image } from '@ibiz-template/core';
|
|
2
3
|
/**
|
|
3
4
|
* 树节点数据基类
|
|
4
5
|
*
|
|
@@ -54,7 +55,12 @@ export class TreeNodeData {
|
|
|
54
55
|
icon.imagePath = sysImage.imagePath;
|
|
55
56
|
}
|
|
56
57
|
if (sysImage.rawContent) {
|
|
57
|
-
|
|
58
|
+
if (isBase64Image(sysImage.rawContent)) {
|
|
59
|
+
icon.imagePath = sysImage.rawContent;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
icon.htmlStr = sysImage.rawContent;
|
|
63
|
+
}
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
return Object.values(icon).length > 0 ? icon : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-error-handler.d.ts","sourceRoot":"","sources":["../../../src/utils/error-handler/default-error-handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACvD,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;
|
|
1
|
+
{"version":3,"file":"default-error-handler.d.ts","sourceRoot":"","sources":["../../../src/utils/error-handler/default-error-handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACvD,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;CAuB5C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7-dev.0",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"animejs": "^3.2.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@ibiz-template/core": "^0.7.
|
|
39
|
-
"@ibiz/model-core": "^0.1.
|
|
38
|
+
"@ibiz-template/core": "^0.7.7-dev.0",
|
|
39
|
+
"@ibiz/model-core": "^0.1.22",
|
|
40
40
|
"@types/animejs": "^3.1.12",
|
|
41
41
|
"@types/path-browserify": "^1.0.2",
|
|
42
42
|
"@types/qs": "^6.9.11",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@ibiz-template/core": "^0.6.0",
|
|
57
|
-
"@ibiz/model-core": "^0.1.
|
|
57
|
+
"@ibiz/model-core": "^0.1.22",
|
|
58
58
|
"async-validator": "^4.2.5",
|
|
59
59
|
"dayjs": "^1.11.7",
|
|
60
60
|
"echarts": "^5.4.3",
|