@ibiz-template/runtime 0.7.9 → 0.7.11
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 +658 -257
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts +8 -0
- package/out/app-hub.d.ts.map +1 -1
- package/out/application.d.ts +2 -2
- package/out/application.d.ts.map +1 -1
- package/out/application.js +11 -4
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +23 -13
- package/out/controller/control/app-menu/custom-app-menu.controller.d.ts +124 -0
- package/out/controller/control/app-menu/custom-app-menu.controller.d.ts.map +1 -0
- package/out/controller/control/app-menu/custom-app-menu.controller.js +136 -0
- package/out/controller/control/app-menu/index.d.ts +1 -0
- package/out/controller/control/app-menu/index.d.ts.map +1 -1
- package/out/controller/control/app-menu/index.js +1 -0
- package/out/controller/control/chart/generator/chart-options-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/chart-options-generator.js +27 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts +8 -13
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.js +7 -6
- package/out/controller/control/gantt/gantt.controller.d.ts +28 -0
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +82 -1
- package/out/controller/notification/async-action.controller.d.ts.map +1 -1
- package/out/controller/notification/async-action.controller.js +5 -0
- package/out/controller/utils/index.d.ts +1 -0
- package/out/controller/utils/index.d.ts.map +1 -1
- package/out/controller/utils/index.js +1 -0
- package/out/controller/utils/view-msg/view-msg-controller.d.ts +39 -0
- package/out/controller/utils/view-msg/view-msg-controller.d.ts.map +1 -1
- package/out/controller/utils/view-msg/view-msg-controller.js +108 -8
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +8 -0
- 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 +5 -4
- package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
- package/out/interface/controller/common/custom-design/i-custom-design.d.ts +37 -0
- package/out/interface/controller/common/custom-design/i-custom-design.d.ts.map +1 -0
- package/out/interface/controller/common/custom-design/i-custom-design.js +1 -0
- package/out/interface/controller/common/index.d.ts +1 -0
- package/out/interface/controller/common/index.d.ts.map +1 -1
- package/out/interface/controller/common/index.js +1 -0
- package/out/interface/controller/common/view-message/i-view-message.d.ts +33 -1
- package/out/interface/controller/common/view-message/i-view-message.d.ts.map +1 -1
- package/out/interface/controller/controller/view/i-view.controller.d.ts +9 -1
- package/out/interface/controller/controller/view/i-view.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-gantt.event.d.ts +9 -1
- package/out/interface/controller/event/control/i-gantt.event.d.ts.map +1 -1
- package/out/interface/util/i-render-util/i-render-util.d.ts +44 -0
- package/out/interface/util/i-render-util/i-render-util.d.ts.map +1 -0
- package/out/interface/util/i-render-util/i-render-util.js +1 -0
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/types.d.ts +10 -1
- package/out/types.d.ts.map +1 -1
- package/package.json +1 -1
package/out/app-hub.d.ts
CHANGED
|
@@ -114,6 +114,14 @@ export declare class AppHub implements IAppHubService {
|
|
|
114
114
|
* @type {string}
|
|
115
115
|
*/
|
|
116
116
|
defaultAppIndexViewName: string;
|
|
117
|
+
/**
|
|
118
|
+
* 默认页面
|
|
119
|
+
*
|
|
120
|
+
* @author tony001
|
|
121
|
+
* @date 2024-05-09 13:05:58
|
|
122
|
+
* @type {(IModel | undefined)}
|
|
123
|
+
*/
|
|
124
|
+
defaultPage: IModel | undefined;
|
|
117
125
|
/**
|
|
118
126
|
* 计算应用视图 标识
|
|
119
127
|
*
|
package/out/app-hub.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-hub.d.ts","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,OAAO,EAAE,QAAQ,GAChB,OAAO,CAAC,aAAa,CAAC;IAKzB,KAAK,IAAI,IAAI;IAMb;;;;;OAKG;IACH,OAAO,IAAI,IAAI;CAKhB"}
|
package/out/application.d.ts
CHANGED
|
@@ -117,9 +117,9 @@ export declare class Application implements IAppService {
|
|
|
117
117
|
* @author tony001
|
|
118
118
|
* @date 2024-04-23 11:04:27
|
|
119
119
|
* @param {string} id
|
|
120
|
-
* @return {*} {(IAppUtil |
|
|
120
|
+
* @return {*} {(IAppUtil | undefined)}
|
|
121
121
|
*/
|
|
122
|
-
getAppUtil(id: string): IAppUtil |
|
|
122
|
+
getAppUtil(id: string, type?: 'CUSTOM' | 'DEFAULT'): IAppUtil | undefined;
|
|
123
123
|
/**
|
|
124
124
|
* 获取界面行为模型
|
|
125
125
|
* @author lxm
|
package/out/application.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAY,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,UAAU,EACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,aAAa,EACb,WAAW,EACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;;;;GAQG;AACH,qBAAa,WAAY,YAAW,WAAW;aAkFjB,KAAK,EAAE,YAAY;IAjF/C;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAa;IAE5D;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAElB;;;;;;OAMG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;;OAMG;IACH,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC;IAEpC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAElC;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IAEnC;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;IAErC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;;;;OAMG;gBACyB,KAAK,EAAE,YAAY;IAc/C;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAM3B;;;;;;;OAOG;cACa,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAWlD;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI;IAMvC;;;;;;;OAOG;IACH,UAAU,CACR,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,QAAQ,GAAG,SAAqB,GACrC,QAAQ,GAAG,SAAS;IAavB;;;;;;;OAOG;IACG,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAqBxE;;;;;;;OAOG;IACG,SAAS,CACb,EAAE,EAAE,MAAM,EACV,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAajC;;;;;;;OAOG;IACG,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAUlC;;;;;OAKG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAwB/B;;;;;OAKG;IACH,OAAO,IAAI,IAAI;CAGhB"}
|
package/out/application.js
CHANGED
|
@@ -95,12 +95,19 @@ export class Application {
|
|
|
95
95
|
* @author tony001
|
|
96
96
|
* @date 2024-04-23 11:04:27
|
|
97
97
|
* @param {string} id
|
|
98
|
-
* @return {*} {(IAppUtil |
|
|
98
|
+
* @return {*} {(IAppUtil | undefined)}
|
|
99
99
|
*/
|
|
100
|
-
getAppUtil(id) {
|
|
100
|
+
getAppUtil(id, type = 'DEFAULT') {
|
|
101
101
|
const appUtils = this.model.appUtils || [];
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
let appUtil;
|
|
103
|
+
// 自定义类型使用应用功能组件功能标记识别,反之使用使用应用功能组件标识识别
|
|
104
|
+
if (type === 'CUSTOM') {
|
|
105
|
+
appUtil = appUtils.find(item => item.utilTag === id);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
appUtil = appUtils.find(item => item.id === id);
|
|
109
|
+
}
|
|
110
|
+
return appUtil;
|
|
104
111
|
}
|
|
105
112
|
/**
|
|
106
113
|
* 获取界面行为模型
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/common/view/view.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,cAAc,
|
|
1
|
+
{"version":3,"file":"view.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/common/view/view.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,cAAc,EAGf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAU,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EACL,eAAe,EACf,UAAU,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,eAAe,EACf,cAAc,EACd,WAAW,EACX,YAAY,EAEb,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,E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C;;;;;;;OAOG;IACH,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;CAOrD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { notNilEmpty } from 'qx-util';
|
|
3
|
-
import { HttpError, IBizContext, RuntimeError, } from '@ibiz-template/core';
|
|
3
|
+
import { HttpError, IBizContext, Namespace, RuntimeError, } from '@ibiz-template/core';
|
|
4
4
|
import { isEmpty, isNil, isNotNil } from 'ramda';
|
|
5
5
|
import { LoadingState } from '../../utils/loading/loading.state';
|
|
6
6
|
import { SysUIActionTag } from '../../../constant';
|
|
@@ -397,6 +397,7 @@ export class ViewController extends BaseController {
|
|
|
397
397
|
* @return {*} {Promise<void>}
|
|
398
398
|
*/
|
|
399
399
|
async alertViewMessage(messages) {
|
|
400
|
+
var _a, _b;
|
|
400
401
|
const [message, ...rest] = messages;
|
|
401
402
|
const modalParams = {
|
|
402
403
|
title: message.title,
|
|
@@ -404,27 +405,36 @@ export class ViewController extends BaseController {
|
|
|
404
405
|
options: {
|
|
405
406
|
showClose: message.removeMode !== 0,
|
|
406
407
|
showConfirmButton: message.removeMode !== 0,
|
|
407
|
-
|
|
408
|
-
if (message.removeMode === 1) {
|
|
409
|
-
localStorage.setItem(message.key, '1');
|
|
410
|
-
}
|
|
411
|
-
},
|
|
408
|
+
customClass: ((_a = message.sysCss) === null || _a === void 0 ? void 0 : _a.cssName) || '',
|
|
412
409
|
},
|
|
413
410
|
};
|
|
411
|
+
if (message.layoutPanel && modalParams.options) {
|
|
412
|
+
const alertClass = new Namespace('view-message').m('alert');
|
|
413
|
+
modalParams.options.customClass = `${modalParams.options.customClass || ''} ${alertClass}`;
|
|
414
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
415
|
+
modalParams.options.message = () => {
|
|
416
|
+
return ibiz.render.renderCtrlShell(message.layoutPanel, this.context, this.params, { data: message.data });
|
|
417
|
+
};
|
|
418
|
+
}
|
|
414
419
|
// userTag为确认按钮文本
|
|
415
420
|
if (message.extraParams.userTag) {
|
|
416
421
|
Object.assign(modalParams, {
|
|
417
422
|
confirmButtonText: message.extraParams.userTag,
|
|
418
423
|
});
|
|
419
424
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
+
try {
|
|
426
|
+
if (message.messageType === 'WARN') {
|
|
427
|
+
await ibiz.modal.warning(modalParams);
|
|
428
|
+
}
|
|
429
|
+
else if (message.messageType === 'ERROR') {
|
|
430
|
+
await ibiz.modal.error(modalParams);
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
await ibiz.modal.info(modalParams);
|
|
434
|
+
}
|
|
425
435
|
}
|
|
426
|
-
|
|
427
|
-
|
|
436
|
+
finally {
|
|
437
|
+
(_b = this.viewMsgController) === null || _b === void 0 ? void 0 : _b.setMsgRemoveModeStorage(message);
|
|
428
438
|
}
|
|
429
439
|
if (rest.length) {
|
|
430
440
|
this.alertViewMessage(rest);
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { IAppMenu } from '@ibiz/model-core';
|
|
2
|
+
import { ConfigService, UtilService } from '../../../service';
|
|
3
|
+
import { AppMenuController } from './app-menu.controller';
|
|
4
|
+
import { ICustomDesign } from '../../../interface';
|
|
5
|
+
/**
|
|
6
|
+
* 自定义菜单控制器
|
|
7
|
+
*
|
|
8
|
+
* @author tony001
|
|
9
|
+
* @date 2024-05-09 15:05:50
|
|
10
|
+
* @export
|
|
11
|
+
* @class CustomAppMenuController
|
|
12
|
+
*/
|
|
13
|
+
export declare class CustomAppMenuController implements ICustomDesign {
|
|
14
|
+
protected model: IAppMenu;
|
|
15
|
+
protected menu: AppMenuController;
|
|
16
|
+
/**
|
|
17
|
+
* 应用配置存储服务
|
|
18
|
+
*
|
|
19
|
+
* @author tony001
|
|
20
|
+
* @date 2024-05-09 15:05:49
|
|
21
|
+
* @type {(ConfigService | undefined)}
|
|
22
|
+
*/
|
|
23
|
+
config: ConfigService | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* 应用功能组件服务
|
|
26
|
+
*
|
|
27
|
+
* @author tony001
|
|
28
|
+
* @date 2024-05-09 15:05:33
|
|
29
|
+
* @type {(UtilService | undefined)}
|
|
30
|
+
*/
|
|
31
|
+
util: UtilService | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* 上下文对象
|
|
34
|
+
*
|
|
35
|
+
* @author tony001
|
|
36
|
+
* @date 2024-05-09 15:05:43
|
|
37
|
+
* @type {IContext}
|
|
38
|
+
*/
|
|
39
|
+
context: IContext;
|
|
40
|
+
/**
|
|
41
|
+
* 视图参数
|
|
42
|
+
*
|
|
43
|
+
* @author tony001
|
|
44
|
+
* @date 2024-05-09 15:05:54
|
|
45
|
+
* @type {IParams}
|
|
46
|
+
*/
|
|
47
|
+
params: IParams;
|
|
48
|
+
/**
|
|
49
|
+
*自定义定制范围类型(public:公开,personal:个人,data:数据,默认是按照个人区分,配置了应用功能组件才生效)
|
|
50
|
+
*
|
|
51
|
+
* @author tony001
|
|
52
|
+
* @date 2024-05-09 17:05:43
|
|
53
|
+
* @type {('public' | 'personal' | 'data')}
|
|
54
|
+
*/
|
|
55
|
+
type: 'public' | 'personal' | 'data';
|
|
56
|
+
/**
|
|
57
|
+
*所属数据类型(仅限自定义定制为data类型时生效,配置了应用功能组件才生效)
|
|
58
|
+
*
|
|
59
|
+
* @author tony001
|
|
60
|
+
* @date 2024-05-09 17:05:55
|
|
61
|
+
* @type {string}
|
|
62
|
+
*/
|
|
63
|
+
ownerType: string;
|
|
64
|
+
/**
|
|
65
|
+
*所属数据标识(仅限自定义定制为data类型时生效,配置了应用功能组件才生效)
|
|
66
|
+
*
|
|
67
|
+
* @author tony001
|
|
68
|
+
* @date 2024-05-09 17:05:10
|
|
69
|
+
* @type {string}
|
|
70
|
+
*/
|
|
71
|
+
ownerId: string;
|
|
72
|
+
/**
|
|
73
|
+
* Creates an instance of CustomAppMenuController.
|
|
74
|
+
* @author tony001
|
|
75
|
+
* @date 2024-05-09 15:05:33
|
|
76
|
+
* @param {IAppMenu} model
|
|
77
|
+
* @param {AppMenuController} menu
|
|
78
|
+
*/
|
|
79
|
+
constructor(model: IAppMenu, menu: AppMenuController);
|
|
80
|
+
/**
|
|
81
|
+
* 初始化
|
|
82
|
+
*
|
|
83
|
+
* @author tony001
|
|
84
|
+
* @date 2024-05-09 15:05:40
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
private init;
|
|
88
|
+
/**
|
|
89
|
+
* 获取资源标识(仅用于功能组件服务)
|
|
90
|
+
*
|
|
91
|
+
* @author tony001
|
|
92
|
+
* @date 2024-05-09 16:05:48
|
|
93
|
+
* @private
|
|
94
|
+
* @return {*} {string}
|
|
95
|
+
*/
|
|
96
|
+
private getResourceTag;
|
|
97
|
+
/**
|
|
98
|
+
* 加载自定义模型
|
|
99
|
+
*
|
|
100
|
+
* @author tony001
|
|
101
|
+
* @date 2024-05-09 17:05:57
|
|
102
|
+
* @return {*} {Promise<IData>}
|
|
103
|
+
*/
|
|
104
|
+
loadCustomModelData(): Promise<IData>;
|
|
105
|
+
/**
|
|
106
|
+
* 重置自定义模型
|
|
107
|
+
*
|
|
108
|
+
* @author tony001
|
|
109
|
+
* @date 2024-05-09 17:05:14
|
|
110
|
+
* @return {*} {Promise<IData>}
|
|
111
|
+
*/
|
|
112
|
+
resetCustomModelData(): Promise<IData>;
|
|
113
|
+
/**
|
|
114
|
+
* 保存自定义模型
|
|
115
|
+
*
|
|
116
|
+
* @author tony001
|
|
117
|
+
* @date 2024-05-09 17:05:51
|
|
118
|
+
* @param {IData[]} model
|
|
119
|
+
* @param {IData} [opts={}]
|
|
120
|
+
* @return {*} {Promise<IData>}
|
|
121
|
+
*/
|
|
122
|
+
saveCustomModelData(model: IData[], opts?: IData): Promise<IData>;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=custom-app-menu.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-app-menu.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/app-menu/custom-app-menu.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAY,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;GAOG;AACH,qBAAa,uBAAwB,YAAW,aAAa;IAwEzD,SAAS,CAAC,KAAK,EAAE,QAAQ;IACzB,SAAS,CAAC,IAAI,EAAE,iBAAiB;IAxEnC;;;;;;OAMG;IACH,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAElC;;;;;;OAMG;IACH,IAAI,EAAE,WAAW,GAAG,SAAS,CAAC;IAE9B;;;;;;OAMG;IACH,OAAO,EAAE,QAAQ,CAAC;IAElB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;OAMG;IACH,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAc;IAElD;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAM;IAEvB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAM;IAErB;;;;;;OAMG;gBAES,KAAK,EAAE,QAAQ,EACf,IAAI,EAAE,iBAAiB;IAOnC;;;;;;OAMG;IACH,OAAO,CAAC,IAAI;IAkBZ;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IActB;;;;;;OAMG;IACG,mBAAmB,IAAI,OAAO,CAAC,KAAK,CAAC;IAc3C;;;;;;OAMG;IACG,oBAAoB,IAAI,OAAO,CAAC,KAAK,CAAC;IAI5C;;;;;;;;OAQG;IACG,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,GAAE,KAAU,GAAG,OAAO,CAAC,KAAK,CAAC;CAmB5E"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { ConfigService, UtilService } from '../../../service';
|
|
2
|
+
/**
|
|
3
|
+
* 自定义菜单控制器
|
|
4
|
+
*
|
|
5
|
+
* @author tony001
|
|
6
|
+
* @date 2024-05-09 15:05:50
|
|
7
|
+
* @export
|
|
8
|
+
* @class CustomAppMenuController
|
|
9
|
+
*/
|
|
10
|
+
export class CustomAppMenuController {
|
|
11
|
+
/**
|
|
12
|
+
* Creates an instance of CustomAppMenuController.
|
|
13
|
+
* @author tony001
|
|
14
|
+
* @date 2024-05-09 15:05:33
|
|
15
|
+
* @param {IAppMenu} model
|
|
16
|
+
* @param {AppMenuController} menu
|
|
17
|
+
*/
|
|
18
|
+
constructor(model, menu) {
|
|
19
|
+
this.model = model;
|
|
20
|
+
this.menu = menu;
|
|
21
|
+
/**
|
|
22
|
+
*自定义定制范围类型(public:公开,personal:个人,data:数据,默认是按照个人区分,配置了应用功能组件才生效)
|
|
23
|
+
*
|
|
24
|
+
* @author tony001
|
|
25
|
+
* @date 2024-05-09 17:05:43
|
|
26
|
+
* @type {('public' | 'personal' | 'data')}
|
|
27
|
+
*/
|
|
28
|
+
this.type = 'personal';
|
|
29
|
+
/**
|
|
30
|
+
*所属数据类型(仅限自定义定制为data类型时生效,配置了应用功能组件才生效)
|
|
31
|
+
*
|
|
32
|
+
* @author tony001
|
|
33
|
+
* @date 2024-05-09 17:05:55
|
|
34
|
+
* @type {string}
|
|
35
|
+
*/
|
|
36
|
+
this.ownerType = '';
|
|
37
|
+
/**
|
|
38
|
+
*所属数据标识(仅限自定义定制为data类型时生效,配置了应用功能组件才生效)
|
|
39
|
+
*
|
|
40
|
+
* @author tony001
|
|
41
|
+
* @date 2024-05-09 17:05:10
|
|
42
|
+
* @type {string}
|
|
43
|
+
*/
|
|
44
|
+
this.ownerId = '';
|
|
45
|
+
this.context = menu.context;
|
|
46
|
+
this.params = menu.params;
|
|
47
|
+
this.init();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 初始化
|
|
51
|
+
*
|
|
52
|
+
* @author tony001
|
|
53
|
+
* @date 2024-05-09 15:05:40
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
init() {
|
|
57
|
+
var _a;
|
|
58
|
+
// 默认走个人
|
|
59
|
+
this.type = 'personal';
|
|
60
|
+
this.ownerId = this.context.srfpersonid;
|
|
61
|
+
// 初始化服务
|
|
62
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
63
|
+
const menuUtil = app.getAppUtil('DYNAMENU', 'CUSTOM');
|
|
64
|
+
if (menuUtil) {
|
|
65
|
+
this.util = new UtilService(menuUtil);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.config = new ConfigService(this.model.appId, 'menu', `menu_${this.menu.view.name.toLowerCase()}_${(_a = this.model.codeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 获取资源标识(仅用于功能组件服务)
|
|
73
|
+
*
|
|
74
|
+
* @author tony001
|
|
75
|
+
* @date 2024-05-09 16:05:48
|
|
76
|
+
* @private
|
|
77
|
+
* @return {*} {string}
|
|
78
|
+
*/
|
|
79
|
+
getResourceTag() {
|
|
80
|
+
var _a;
|
|
81
|
+
const base = `${this.context.srfappid}_menu_${this.menu.view.name.toLowerCase()}_${(_a = this.model.codeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`;
|
|
82
|
+
switch (this.type) {
|
|
83
|
+
case 'personal':
|
|
84
|
+
return `${base}_${this.context.srfpersonid}`;
|
|
85
|
+
case 'data':
|
|
86
|
+
return `${base}_${this.ownerType}_${this.ownerId}`;
|
|
87
|
+
default:
|
|
88
|
+
return base;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 加载自定义模型
|
|
93
|
+
*
|
|
94
|
+
* @author tony001
|
|
95
|
+
* @date 2024-05-09 17:05:57
|
|
96
|
+
* @return {*} {Promise<IData>}
|
|
97
|
+
*/
|
|
98
|
+
async loadCustomModelData() {
|
|
99
|
+
let res;
|
|
100
|
+
if (this.util) {
|
|
101
|
+
res = await this.util.load(this.getResourceTag(), this.context, this.params);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
res = await this.config.load();
|
|
105
|
+
}
|
|
106
|
+
return res;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* 重置自定义模型
|
|
110
|
+
*
|
|
111
|
+
* @author tony001
|
|
112
|
+
* @date 2024-05-09 17:05:14
|
|
113
|
+
* @return {*} {Promise<IData>}
|
|
114
|
+
*/
|
|
115
|
+
async resetCustomModelData() {
|
|
116
|
+
return {};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* 保存自定义模型
|
|
120
|
+
*
|
|
121
|
+
* @author tony001
|
|
122
|
+
* @date 2024-05-09 17:05:51
|
|
123
|
+
* @param {IData[]} model
|
|
124
|
+
* @param {IData} [opts={}]
|
|
125
|
+
* @return {*} {Promise<IData>}
|
|
126
|
+
*/
|
|
127
|
+
async saveCustomModelData(model, opts = {}) {
|
|
128
|
+
if (this.util) {
|
|
129
|
+
await this.util.save(this.getResourceTag(), this.context, Object.assign(Object.assign({}, this.params), { type: this.type, ownerType: this.ownerType, ownerId: this.ownerId, modelId: this.model.id }), model);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
await this.config.save(model);
|
|
133
|
+
}
|
|
134
|
+
return model;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/app-menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/app-menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-options-generator.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/chart/generator/chart-options-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EAEf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,cAAc,EACd,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,aAAa,EACd,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-options-generator.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/chart/generator/chart-options-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EAEf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,cAAc,EACd,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,aAAa,EACd,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAM9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA2BrD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAmBzE;AAED,qBAAa,qBAAqB;IAoEpB,OAAO,CAAC,KAAK;IAnEzB;;;;;OAKG;IACH,MAAM,EAAG,cAAc,CAAC;IAExB;;;;;OAKG;IACH,aAAa,EAAE,aAAa,CAI1B;IAEF;;;;;OAKG;IACH,OAAO,EAAE,aAAa,CAAM;IAE5B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC;IAE/B;;;;;OAKG;IACH,gBAAgB,EAAE,mBAAmB,EAAE,CAAM;IAE7C;;;;;OAKG;IACH,QAAQ,gCAAuC;IAE/C;;;;OAIG;IACH,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,CAAa;IAE/D;;;;;OAKG;IACH,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAa;gBAElD,KAAK,EAAE,QAAQ;IAoCnC,SAAS,CAAC,oBAAoB,IAAI,IAAI;IAoCtC,SAAS,CAAC,eAAe,CAAC,UAAU,EAAE,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC;IAmB5E,SAAS,CAAC,gBAAgB,CACxB,WAAW,EAAE,cAAc,GAC1B,aAAa,CAAC,QAAQ,CAAC;IAe1B,SAAS,CAAC,gBAAgB,CACxB,WAAW,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,GACzC,oBAAoB,EAAE,GAAG,oBAAoB,EAAE;IA2ClD;;;;;;;OAOG;IACG,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAS7D;;;;;;OAMG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAKtC;;;;;;;;;OASG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBrE;;;;;;OAMG;IACH,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,aAAa;IAoE/C;;;;;;OAMG;IACH,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,KAAK,GAAG,SAAS;CAkEhE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { mergeDeepRight } from 'ramda';
|
|
2
|
+
import { isObject, isString } from 'qx-util';
|
|
2
3
|
import { RuntimeError } from '@ibiz-template/core';
|
|
3
4
|
import { LineSeriesGenerator } from './line-series-generator';
|
|
4
5
|
import { BarSeriesGenerator } from './bar-series-generator';
|
|
@@ -6,6 +7,31 @@ import { FunnelSeriesGenerator } from './funnel-series-generator';
|
|
|
6
7
|
import { PieSeriesGenerator } from './pie-series-generator';
|
|
7
8
|
import { ScatterSeriesGenerator } from './scatter-series-generator';
|
|
8
9
|
import { RadarSeriesGenerator } from './radar-series-generator';
|
|
10
|
+
/**
|
|
11
|
+
* 递归地检查对象中的字符串,如果字符串表示一个函数,则将其转换为实际的函数。
|
|
12
|
+
* @author ljx
|
|
13
|
+
* @date 2024-05-08 18:03:07
|
|
14
|
+
* @param {object} option - 要处理的对象。
|
|
15
|
+
* @return {*} {IData}
|
|
16
|
+
*/
|
|
17
|
+
const convertStringFunc = (option) => {
|
|
18
|
+
const regex = /function\s*\(\s*|\s*function\s*\(\s*/;
|
|
19
|
+
const result = {};
|
|
20
|
+
Object.keys(option).forEach(key => {
|
|
21
|
+
if (isString(option[key]) && regex.test(option[key])) {
|
|
22
|
+
const strFunction = `return ${option[key]}`;
|
|
23
|
+
// eslint-disable-next-line no-new-func
|
|
24
|
+
result[key] = new Function(strFunction)();
|
|
25
|
+
}
|
|
26
|
+
else if (isObject(option[key])) {
|
|
27
|
+
result[key] = convertStringFunc(option[key]);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
result[key] = option[key];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
9
35
|
/**
|
|
10
36
|
* 解析userParams
|
|
11
37
|
* @author lxm
|
|
@@ -33,7 +59,7 @@ export function parseUserParams(userParams) {
|
|
|
33
59
|
}
|
|
34
60
|
});
|
|
35
61
|
}
|
|
36
|
-
return option;
|
|
62
|
+
return convertStringFunc(option);
|
|
37
63
|
}
|
|
38
64
|
export class ChartOptionsGenerator {
|
|
39
65
|
constructor(model) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IDashboard } from '@ibiz/model-core';
|
|
2
|
-
import { IBizParams } from '@ibiz-template/core';
|
|
3
2
|
import { ConfigService, UtilService } from '../../../service';
|
|
4
3
|
import { DashboardController } from './dashboard.controller';
|
|
4
|
+
import { ICustomDesign } from '../../../interface';
|
|
5
5
|
/**
|
|
6
6
|
* 自定义数据看板部件控制器
|
|
7
7
|
* @author lxm
|
|
@@ -9,7 +9,9 @@ import { DashboardController } from './dashboard.controller';
|
|
|
9
9
|
* @export
|
|
10
10
|
* @class CustomDashboardController
|
|
11
11
|
*/
|
|
12
|
-
export declare class CustomDashboardController {
|
|
12
|
+
export declare class CustomDashboardController implements ICustomDesign {
|
|
13
|
+
protected model: IDashboard;
|
|
14
|
+
protected dashboard: DashboardController;
|
|
13
15
|
/**
|
|
14
16
|
* 自定义布局模型数据
|
|
15
17
|
*
|
|
@@ -38,13 +40,6 @@ export declare class CustomDashboardController {
|
|
|
38
40
|
* @memberof CustomDashboardController
|
|
39
41
|
*/
|
|
40
42
|
portletConfig: IData;
|
|
41
|
-
/**
|
|
42
|
-
* 看板模型
|
|
43
|
-
*
|
|
44
|
-
* @author: zhujiamin
|
|
45
|
-
* @Date: 2023-09-20 16:43:39
|
|
46
|
-
*/
|
|
47
|
-
model: IDashboard;
|
|
48
43
|
/**
|
|
49
44
|
* 应用配置存储服务
|
|
50
45
|
*
|
|
@@ -74,9 +69,9 @@ export declare class CustomDashboardController {
|
|
|
74
69
|
*
|
|
75
70
|
* @author tony001
|
|
76
71
|
* @date 2024-04-24 14:04:42
|
|
77
|
-
* @type {
|
|
72
|
+
* @type {IParams}
|
|
78
73
|
*/
|
|
79
|
-
params:
|
|
74
|
+
params: IParams;
|
|
80
75
|
/**
|
|
81
76
|
* 自定义定制范围类型(public:公开,personal:个人,data:数据,默认是按照个人区分,配置了应用功能组件才生效)
|
|
82
77
|
*
|
|
@@ -117,7 +112,7 @@ export declare class CustomDashboardController {
|
|
|
117
112
|
*/
|
|
118
113
|
private init;
|
|
119
114
|
/**
|
|
120
|
-
*
|
|
115
|
+
* 获取资源标识(仅用于功能组件服务)
|
|
121
116
|
*
|
|
122
117
|
* @author tony001
|
|
123
118
|
* @date 2024-04-24 14:04:55
|
|
@@ -144,6 +139,6 @@ export declare class CustomDashboardController {
|
|
|
144
139
|
* @author: zhujiamin
|
|
145
140
|
* @Date: 2023-09-20 16:22:49
|
|
146
141
|
*/
|
|
147
|
-
saveCustomModelData(model: IData[],
|
|
142
|
+
saveCustomModelData(model: IData[], opts?: IData): Promise<IData>;
|
|
148
143
|
}
|
|
149
144
|
//# sourceMappingURL=custom-dashboard.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-dashboard.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/dashboard/custom-dashboard.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"custom-dashboard.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/dashboard/custom-dashboard.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;GAMG;AACH,qBAAa,yBAA0B,YAAW,aAAa;IAuG3D,SAAS,CAAC,KAAK,EAAE,UAAU;IAC3B,SAAS,CAAC,SAAS,EAAE,mBAAmB;IAvG1C;;;;;OAKG;IACH,eAAe,EAAE,KAAK,EAAE,CAAM;IAE9B;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAM;IAE1B;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAM;IAExB;;;;;OAKG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;;OAMG;IACH,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAElC;;;;;;OAMG;IACH,IAAI,EAAE,WAAW,GAAG,SAAS,CAAC;IAE9B;;;;;;OAMG;IACH,OAAO,EAAE,QAAQ,CAAC;IAElB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;OAMG;IACH,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAc;IAElD;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAM;IAEvB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAM;IAErB;;;;;OAKG;gBAES,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,mBAAmB;IAO1C;;;;;;OAMG;IACH,OAAO,CAAC,IAAI;IA+BZ;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IActB;;;;;OAKG;IACG,mBAAmB,IAAI,OAAO,CAAC,KAAK,CAAC;IA0B3C;;;;OAIG;IACG,oBAAoB,IAAI,OAAO,CAAC,KAAK,CAAC;IAK5C;;;;;OAKG;IACG,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,GAAE,KAAU,GAAG,OAAO,CAAC,KAAK,CAAC;CA8B5E"}
|
|
@@ -14,6 +14,8 @@ export class CustomDashboardController {
|
|
|
14
14
|
* @param {CTX} ctx 跨组件上下文环境,内部机制不暴露
|
|
15
15
|
*/
|
|
16
16
|
constructor(model, dashboard) {
|
|
17
|
+
this.model = model;
|
|
18
|
+
this.dashboard = dashboard;
|
|
17
19
|
/**
|
|
18
20
|
* 自定义布局模型数据
|
|
19
21
|
*
|
|
@@ -66,7 +68,6 @@ export class CustomDashboardController {
|
|
|
66
68
|
* @type {string}
|
|
67
69
|
*/
|
|
68
70
|
this.ownerId = '';
|
|
69
|
-
this.model = model;
|
|
70
71
|
this.context = dashboard.context;
|
|
71
72
|
this.params = dashboard.params;
|
|
72
73
|
this.init(dashboard.controlParams);
|
|
@@ -103,7 +104,7 @@ export class CustomDashboardController {
|
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
/**
|
|
106
|
-
*
|
|
107
|
+
* 获取资源标识(仅用于功能组件服务)
|
|
107
108
|
*
|
|
108
109
|
* @author tony001
|
|
109
110
|
* @date 2024-04-24 14:04:55
|
|
@@ -130,7 +131,7 @@ export class CustomDashboardController {
|
|
|
130
131
|
*/
|
|
131
132
|
async loadCustomModelData() {
|
|
132
133
|
let res;
|
|
133
|
-
if (this.
|
|
134
|
+
if (this.util) {
|
|
134
135
|
res = await this.util.load(this.getResourceTag(), this.context, this.params);
|
|
135
136
|
}
|
|
136
137
|
else {
|
|
@@ -165,8 +166,8 @@ export class CustomDashboardController {
|
|
|
165
166
|
* @author: zhujiamin
|
|
166
167
|
* @Date: 2023-09-20 16:22:49
|
|
167
168
|
*/
|
|
168
|
-
async saveCustomModelData(model,
|
|
169
|
-
Object.assign(this.portletConfig,
|
|
169
|
+
async saveCustomModelData(model, opts = {}) {
|
|
170
|
+
Object.assign(this.portletConfig, opts);
|
|
170
171
|
let res;
|
|
171
172
|
const data = {
|
|
172
173
|
model,
|
|
@@ -174,7 +175,7 @@ export class CustomDashboardController {
|
|
|
174
175
|
rowH: this.layoutRowH,
|
|
175
176
|
config: this.portletConfig,
|
|
176
177
|
};
|
|
177
|
-
if (this.
|
|
178
|
+
if (this.util) {
|
|
178
179
|
res = await this.util.save(this.getResourceTag(), this.context, Object.assign(Object.assign({}, this.params), { type: this.type, ownerType: this.ownerType, ownerId: this.ownerId, modelId: this.model.id }), data);
|
|
179
180
|
}
|
|
180
181
|
else {
|