@ibiz-template/runtime 0.0.1-beta.17 → 0.0.2-beta.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/system/index.system.js +1 -1
- package/out/application.d.ts +55 -0
- package/out/application.d.ts.map +1 -0
- package/out/application.js +35 -0
- package/out/constant/index.d.ts +1 -1
- package/out/constant/index.d.ts.map +1 -1
- package/out/constant/index.js +1 -1
- package/out/controller/control/app-menu.d.ts +5 -3
- package/out/controller/control/app-menu.d.ts.map +1 -1
- package/out/controller/control/app-menu.js +10 -6
- package/out/controller/control/grid/grid-column.d.ts +3 -1
- package/out/controller/control/grid/grid-column.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column.js +1 -0
- package/out/controller/control/grid/grid-field-column.js +1 -1
- package/out/controller/control/index.d.ts +1 -0
- package/out/controller/control/index.d.ts.map +1 -1
- package/out/controller/control/index.js +1 -0
- package/out/controller/control/tree.d.ts +34 -0
- package/out/controller/control/tree.d.ts.map +1 -0
- package/out/controller/control/tree.js +32 -0
- package/out/controller/editor/code-list-editor.js +1 -1
- package/out/controller/editor/editor.d.ts +9 -0
- package/out/controller/editor/editor.d.ts.map +1 -1
- package/out/controller/editor/editor.js +1 -0
- package/out/controller/editor/picker.js +1 -1
- package/out/controller/editor/upload.js +1 -1
- package/out/controller/interface/ability/control/i-tree-ability.d.ts +12 -0
- package/out/controller/interface/ability/control/i-tree-ability.d.ts.map +1 -0
- package/out/controller/interface/ability/control/i-tree-ability.js +1 -0
- package/out/controller/interface/ability/control/index.d.ts +1 -0
- package/out/controller/interface/ability/control/index.d.ts.map +1 -1
- package/out/controller/interface/ability/control/index.js +1 -0
- package/out/controller/interface/ability/view/i-tree-exp-view-ability.d.ts +12 -0
- package/out/controller/interface/ability/view/i-tree-exp-view-ability.d.ts.map +1 -0
- package/out/controller/interface/ability/view/i-tree-exp-view-ability.js +1 -0
- package/out/controller/interface/ability/view/index.d.ts +1 -0
- package/out/controller/interface/ability/view/index.d.ts.map +1 -1
- package/out/controller/interface/ability/view/index.js +1 -0
- package/out/controller/interface/event/control/i-tree-event.d.ts +11 -0
- package/out/controller/interface/event/control/i-tree-event.d.ts.map +1 -0
- package/out/controller/interface/event/control/i-tree-event.js +1 -0
- package/out/controller/interface/event/control/index.d.ts +1 -0
- package/out/controller/interface/event/control/index.d.ts.map +1 -1
- package/out/controller/interface/event/control/index.js +1 -0
- package/out/controller/interface/event/view/i-tree-exp-view-event.d.ts +12 -0
- package/out/controller/interface/event/view/i-tree-exp-view-event.d.ts.map +1 -0
- package/out/controller/interface/event/view/i-tree-exp-view-event.js +1 -0
- package/out/controller/interface/event/view/index.d.ts +1 -0
- package/out/controller/interface/event/view/index.d.ts.map +1 -1
- package/out/controller/interface/event/view/index.js +1 -0
- package/out/controller/interface/provider/i-control-provider.d.ts +1 -1
- package/out/controller/interface/provider/i-editor-provider.d.ts +2 -2
- package/out/controller/interface/provider/i-editor-provider.d.ts.map +1 -1
- package/out/controller/interface/provider/i-form-detail-provider.d.ts +1 -1
- package/out/controller/interface/provider/i-form-detail-provider.d.ts.map +1 -1
- package/out/controller/interface/provider/i-grid-column-provider.d.ts +1 -1
- package/out/controller/interface/provider/i-grid-column-provider.d.ts.map +1 -1
- package/out/controller/interface/provider/i-portlet-part-provider.d.ts +1 -1
- package/out/controller/interface/provider/i-view-provider.d.ts +1 -1
- package/out/controller/neuron/nerve/control/index.d.ts +1 -0
- package/out/controller/neuron/nerve/control/index.d.ts.map +1 -1
- package/out/controller/neuron/nerve/control/index.js +1 -0
- package/out/controller/neuron/nerve/control/tree-nerve.d.ts +16 -0
- package/out/controller/neuron/nerve/control/tree-nerve.d.ts.map +1 -0
- package/out/controller/neuron/nerve/control/tree-nerve.js +16 -0
- package/out/controller/neuron/nerve/view/index.d.ts +1 -0
- package/out/controller/neuron/nerve/view/index.d.ts.map +1 -1
- package/out/controller/neuron/nerve/view/index.js +1 -0
- package/out/controller/neuron/nerve/view/tree-exp-view-nerve.d.ts +19 -0
- package/out/controller/neuron/nerve/view/tree-exp-view-nerve.d.ts.map +1 -0
- package/out/controller/neuron/nerve/view/tree-exp-view-nerve.js +28 -0
- package/out/controller/neuron/neuron/view.d.ts +4 -2
- package/out/controller/neuron/neuron/view.d.ts.map +1 -1
- package/out/controller/neuron/neuron/view.js +3 -0
- package/out/controller/neuron/neuron/widget.d.ts +4 -2
- package/out/controller/neuron/neuron/widget.d.ts.map +1 -1
- package/out/controller/neuron/neuron/widget.js +2 -0
- package/out/controller/utils/button-state/button-state.d.ts +2 -0
- package/out/controller/utils/button-state/button-state.d.ts.map +1 -1
- package/out/controller/utils/button-state/button-state.js +2 -1
- package/out/controller/view/edit-view.js +1 -1
- package/out/controller/view/index.d.ts +1 -0
- package/out/controller/view/index.d.ts.map +1 -1
- package/out/controller/view/index.js +1 -0
- package/out/controller/view/tree-exp-view.d.ts +25 -0
- package/out/controller/view/tree-exp-view.d.ts.map +1 -0
- package/out/controller/view/tree-exp-view.js +41 -0
- package/out/controller/view/view.d.ts +9 -0
- package/out/controller/view/view.d.ts.map +1 -1
- package/out/controller/view/view.js +3 -2
- package/out/controller/view/wf-step-trace-view.js +1 -1
- package/out/install.d.ts.map +1 -1
- package/out/install.js +6 -7
- package/out/interface/i-plugin-factory/i-plugin-factory.d.ts +1 -1
- package/out/model.d.ts +88 -0
- package/out/model.d.ts.map +1 -0
- package/out/model.js +166 -0
- package/out/runtime-hub.d.ts +35 -0
- package/out/runtime-hub.d.ts.map +1 -0
- package/out/runtime-hub.js +66 -0
- package/out/service/authority/authority.service.d.ts +4 -1
- package/out/service/authority/authority.service.d.ts.map +1 -1
- package/out/service/authority/authority.service.js +7 -3
- package/out/service/dto/method.dto.d.ts +2 -0
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +9 -3
- package/out/service/index.d.ts +1 -0
- package/out/service/index.d.ts.map +1 -1
- package/out/service/index.js +1 -0
- package/out/service/service/code-list/code-list.service.d.ts +4 -3
- package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +5 -7
- package/out/service/service/entity/method/de-action.js +5 -5
- package/out/service/service/entity/method/method-renturn.d.ts +2 -0
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +2 -1
- package/out/service/service/entity/method/method.d.ts +2 -0
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +6 -5
- package/out/service/service/widget/control-service.d.ts +2 -0
- package/out/service/service/widget/control-service.d.ts.map +1 -1
- package/out/service/service/widget/control-service.js +2 -1
- package/out/service/service/widget/index.d.ts +2 -1
- package/out/service/service/widget/index.d.ts.map +1 -1
- package/out/service/service/widget/index.js +2 -1
- package/out/service/service/widget/tree-service.d.ts +51 -0
- package/out/service/service/widget/tree-service.d.ts.map +1 -0
- package/out/service/service/widget/tree-service.js +100 -0
- package/out/service/service/work-flow/work-flow.service.d.ts +0 -8
- package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
- package/out/service/service/work-flow/work-flow.service.js +10 -10
- package/out/service/service-util.d.ts +13 -5
- package/out/service/service-util.d.ts.map +1 -1
- package/out/service/service-util.js +15 -9
- package/out/service/utils/app-counter/app-counter.d.ts +2 -0
- package/out/service/utils/app-counter/app-counter.d.ts.map +1 -1
- package/out/service/utils/app-counter/app-counter.js +2 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +2 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +3 -2
- package/out/service/utils/service-path-util/service-path-util.d.ts.map +1 -1
- package/out/service/utils/service-path-util/service-path-util.js +1 -2
- package/out/service/vo/tree-node-data.d.ts +44 -0
- package/out/service/vo/tree-node-data.d.ts.map +1 -0
- package/out/service/vo/tree-node-data.js +1 -0
- package/out/types.d.ts +19 -25
- package/out/types.d.ts.map +1 -1
- package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.d.ts.map +1 -1
- package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.js +2 -1
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +2 -1
- package/package.json +4 -4
- package/src/application.ts +73 -0
- package/src/constant/index.ts +1 -1
- package/src/controller/control/app-menu.ts +11 -7
- package/src/controller/control/grid/grid-column.ts +5 -1
- package/src/controller/control/grid/grid-field-column.ts +1 -1
- package/src/controller/control/index.ts +1 -0
- package/src/controller/control/tree.ts +47 -0
- package/src/controller/editor/code-list-editor.ts +1 -1
- package/src/controller/editor/editor.ts +11 -0
- package/src/controller/editor/picker.ts +1 -1
- package/src/controller/editor/upload.ts +1 -1
- package/src/controller/interface/ability/control/i-tree-ability.ts +12 -0
- package/src/controller/interface/ability/control/index.ts +1 -0
- package/src/controller/interface/ability/view/i-tree-exp-view-ability.ts +12 -0
- package/src/controller/interface/ability/view/index.ts +1 -0
- package/src/controller/interface/event/control/i-tree-event.ts +11 -0
- package/src/controller/interface/event/control/index.ts +1 -0
- package/src/controller/interface/event/view/i-tree-exp-view-event.ts +12 -0
- package/src/controller/interface/event/view/index.ts +1 -0
- package/src/controller/interface/provider/i-control-provider.ts +1 -1
- package/src/controller/interface/provider/i-editor-provider.ts +4 -3
- package/src/controller/interface/provider/i-form-detail-provider.ts +1 -2
- package/src/controller/interface/provider/i-grid-column-provider.ts +1 -2
- package/src/controller/interface/provider/i-portlet-part-provider.ts +1 -1
- package/src/controller/interface/provider/i-view-provider.ts +1 -1
- package/src/controller/neuron/nerve/control/index.ts +1 -0
- package/src/controller/neuron/nerve/control/tree-nerve.ts +18 -0
- package/src/controller/neuron/nerve/view/index.ts +1 -0
- package/src/controller/neuron/nerve/view/tree-exp-view-nerve.ts +38 -0
- package/src/controller/neuron/neuron/view.ts +8 -0
- package/src/controller/neuron/neuron/widget.ts +3 -0
- package/src/controller/utils/button-state/button-state.ts +5 -1
- package/src/controller/view/edit-view.ts +1 -1
- package/src/controller/view/index.ts +1 -0
- package/src/controller/view/tree-exp-view.ts +49 -0
- package/src/controller/view/view.ts +12 -5
- package/src/controller/view/wf-step-trace-view.ts +1 -1
- package/src/install.ts +6 -12
- package/src/interface/i-plugin-factory/i-plugin-factory.ts +1 -1
- package/src/model.ts +188 -0
- package/src/runtime-hub.ts +76 -0
- package/src/service/authority/authority.service.ts +9 -2
- package/src/service/dto/method.dto.ts +11 -3
- package/src/service/index.ts +1 -0
- package/src/service/service/code-list/code-list.service.ts +6 -6
- package/src/service/service/entity/method/de-action.ts +5 -5
- package/src/service/service/entity/method/method-renturn.ts +5 -1
- package/src/service/service/entity/method/method.ts +9 -5
- package/src/service/service/widget/control-service.ts +5 -1
- package/src/service/service/widget/index.ts +2 -1
- package/src/service/service/widget/tree-service.ts +143 -0
- package/src/service/service/work-flow/work-flow.service.ts +13 -20
- package/src/service/service-util.ts +15 -8
- package/src/service/utils/app-counter/app-counter.ts +7 -2
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +6 -2
- package/src/service/utils/service-path-util/service-path-util.ts +2 -2
- package/src/service/vo/tree-node-data.ts +47 -0
- package/src/types.ts +27 -33
- package/src/utils/app-de-ui-action-util/handler/backend-ui-action-handler.ts +2 -1
- package/src/utils/open-redirect-view/open-redirect-view.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/widget/control-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,qBAAa,cAAc,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IAC/D;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAElB;;;;;;OAMG;IACH,IAAI,SAAS,IAAI,cAAc,CAE9B;IAED;;;;;;OAMG;IACH,aAAa,EAAG,aAAa,CAAC;IAE9B;;;;;;;OAOG;IACH,SAAS,0BAAiC;IAE1C;;;;;OAKG;gBACS,KAAK,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"control-service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/widget/control-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,qBAAa,cAAc,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IAC/D,QAAQ,CAAC,GAAG,EAAG,WAAW,CAAC;IAE3B;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAElB;;;;;;OAMG;IACH,IAAI,SAAS,IAAI,cAAc,CAE9B;IAED;;;;;;OAMG;IACH,aAAa,EAAG,aAAa,CAAC;IAE9B;;;;;;;OAOG;IACH,SAAS,0BAAiC;IAE1C;;;;;OAKG;gBACS,KAAK,EAAE,CAAC;IAKpB;;;;;;OAMG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ7C;;;;;OAKG;IACH,SAAS,CAAC,aAAa;IAiBvB;;;;;;;;;OASG;IACG,IAAI,CACR,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC;IAKzB;;;;;;;OAOG;IACH,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa;IAKjD;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,EAAE,KAAK,GAAG,SAAS;CAGvC"}
|
|
@@ -27,6 +27,7 @@ export class ControlService {
|
|
|
27
27
|
* @date 2022-08-31 17:08:35
|
|
28
28
|
*/
|
|
29
29
|
this.dataUIMap = new Map();
|
|
30
|
+
this.app = ibiz.hub.getApp(model.modelService.app);
|
|
30
31
|
this.model = model;
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
@@ -37,7 +38,7 @@ export class ControlService {
|
|
|
37
38
|
* @returns {*} {Promise<void>}
|
|
38
39
|
*/
|
|
39
40
|
async init(context) {
|
|
40
|
-
this.entityService = await
|
|
41
|
+
this.entityService = await this.app.es.getService(this.appEntity.source.codeName, context);
|
|
41
42
|
this.initUIDataMap();
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './control-service';
|
|
2
|
+
export * from './md-control-service';
|
|
2
3
|
export * from './grid-service';
|
|
3
4
|
export * from './list-service';
|
|
5
|
+
export * from './tree-service';
|
|
4
6
|
export * from './edit-form-service';
|
|
5
7
|
export * from './search-form-service';
|
|
6
|
-
export * from './md-control-service';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/service/service/widget/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/service/service/widget/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './control-service';
|
|
2
|
+
export * from './md-control-service';
|
|
2
3
|
export * from './grid-service';
|
|
3
4
|
export * from './list-service';
|
|
5
|
+
export * from './tree-service';
|
|
4
6
|
export * from './edit-form-service';
|
|
5
7
|
export * from './search-form-service';
|
|
6
|
-
export * from './md-control-service';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { IPSDETreeCodeListNode, IPSDETreeDataSetNode, IPSDETreeStaticNode, TreeModel } from '@ibiz-template/model';
|
|
2
|
+
import { TreeNodeData } from '../../vo/tree-node-data';
|
|
3
|
+
import { MDControlService } from './md-control-service';
|
|
4
|
+
/**
|
|
5
|
+
* 树部件服务
|
|
6
|
+
*
|
|
7
|
+
* @author lxm
|
|
8
|
+
* @date 2022-10-21 14:10:58
|
|
9
|
+
* @export
|
|
10
|
+
* @class TreeService
|
|
11
|
+
* @extends {MDControlService<TreeModel>}
|
|
12
|
+
*/
|
|
13
|
+
export declare class TreeService extends MDControlService<TreeModel> {
|
|
14
|
+
/**
|
|
15
|
+
* 初始化属性映射
|
|
16
|
+
*
|
|
17
|
+
* @author lxm
|
|
18
|
+
* @date 2022-08-31 18:08:37
|
|
19
|
+
*/
|
|
20
|
+
initUIDataMap(): void;
|
|
21
|
+
/**
|
|
22
|
+
* 获取子节点数据
|
|
23
|
+
*
|
|
24
|
+
* @param {TreeNodeData} [parentNode] 父节点数据
|
|
25
|
+
* @param {boolean} [hasQuery=false] 是否搜索
|
|
26
|
+
* @returns {*}
|
|
27
|
+
* @memberof TreeService
|
|
28
|
+
*/
|
|
29
|
+
fetchChildNodes(parentNode?: TreeNodeData, hasQuery?: boolean): Promise<TreeNodeData[] | undefined>;
|
|
30
|
+
/**
|
|
31
|
+
* 获取静态节点数据
|
|
32
|
+
*
|
|
33
|
+
* @protected
|
|
34
|
+
* @param {IPSDETreeStaticNode} nodeModel
|
|
35
|
+
* @param {boolean} [hasQuery=false]
|
|
36
|
+
* @returns {*}
|
|
37
|
+
* @memberof TreeService
|
|
38
|
+
*/
|
|
39
|
+
protected getStaticNodeData(nodeModel: IPSDETreeStaticNode, hasQuery?: boolean): Promise<TreeNodeData>;
|
|
40
|
+
/**
|
|
41
|
+
* 获取实体数据集数据
|
|
42
|
+
*
|
|
43
|
+
* @protected
|
|
44
|
+
* @param {IPSDETreeDataSetNode} nodeModel
|
|
45
|
+
* @param {boolean} [_hasQuery=false]
|
|
46
|
+
* @memberof TreeService
|
|
47
|
+
*/
|
|
48
|
+
protected getDENodeDatas(nodeModel: IPSDETreeDataSetNode, _hasQuery?: boolean): Promise<void>;
|
|
49
|
+
protected getCodeListNodeDatas(_nodeModel: IPSDETreeCodeListNode, _hasQuery?: boolean): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=tree-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/widget/tree-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,gBAAgB,CAAC,SAAS,CAAC;IAC1D;;;;;OAKG;IACH,aAAa;IAKb;;;;;;;OAOG;IACG,eAAe,CAAC,UAAU,CAAC,EAAE,YAAY,EAAE,QAAQ,GAAE,OAAe;IA8C1E;;;;;;;;OAQG;cACa,iBAAiB,CAC/B,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,GAAE,OAAe,GACxB,OAAO,CAAC,YAAY,CAAC;IAmBxB;;;;;;;OAOG;cACa,cAAc,CAC5B,SAAS,EAAE,oBAAoB,EAC/B,SAAS,GAAE,OAAe;cAWZ,oBAAoB,CAClC,UAAU,EAAE,qBAAqB,EACjC,SAAS,GAAE,OAAe;CAI7B"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { MDControlService } from './md-control-service';
|
|
2
|
+
/**
|
|
3
|
+
* 树部件服务
|
|
4
|
+
*
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2022-10-21 14:10:58
|
|
7
|
+
* @export
|
|
8
|
+
* @class TreeService
|
|
9
|
+
* @extends {MDControlService<TreeModel>}
|
|
10
|
+
*/
|
|
11
|
+
export class TreeService extends MDControlService {
|
|
12
|
+
/**
|
|
13
|
+
* 初始化属性映射
|
|
14
|
+
*
|
|
15
|
+
* @author lxm
|
|
16
|
+
* @date 2022-08-31 18:08:37
|
|
17
|
+
*/
|
|
18
|
+
initUIDataMap() {
|
|
19
|
+
super.initUIDataMap();
|
|
20
|
+
// todo
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 获取子节点数据
|
|
24
|
+
*
|
|
25
|
+
* @param {TreeNodeData} [parentNode] 父节点数据
|
|
26
|
+
* @param {boolean} [hasQuery=false] 是否搜索
|
|
27
|
+
* @returns {*}
|
|
28
|
+
* @memberof TreeService
|
|
29
|
+
*/
|
|
30
|
+
async fetchChildNodes(parentNode, hasQuery = false) {
|
|
31
|
+
const childNodeModels = this.model.getChildNodes((parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeId) || this.model.rootNode.id, hasQuery);
|
|
32
|
+
if (childNodeModels.length === 0) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const results = await Promise.allSettled(childNodeModels.map(async (childNode) => {
|
|
36
|
+
if (childNode.treeNodeType === 'STATIC') {
|
|
37
|
+
const nodeData = await this.getStaticNodeData(childNode);
|
|
38
|
+
return [nodeData];
|
|
39
|
+
}
|
|
40
|
+
if (childNode.treeNodeType === 'DE') {
|
|
41
|
+
return this.getDENodeDatas(childNode, hasQuery);
|
|
42
|
+
}
|
|
43
|
+
if (childNode.treeNodeType === 'CODELIST') {
|
|
44
|
+
return this.getCodeListNodeDatas(childNode, hasQuery);
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}));
|
|
48
|
+
const childrenNodes = [];
|
|
49
|
+
results.forEach(result => {
|
|
50
|
+
if (result.status === 'fulfilled' && result.value) {
|
|
51
|
+
childrenNodes.push(...result.value);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return childrenNodes;
|
|
55
|
+
// todo 查询回来之后,看是否默认打开,默认展开继续递归加载子节点。
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 获取静态节点数据
|
|
59
|
+
*
|
|
60
|
+
* @protected
|
|
61
|
+
* @param {IPSDETreeStaticNode} nodeModel
|
|
62
|
+
* @param {boolean} [hasQuery=false]
|
|
63
|
+
* @returns {*}
|
|
64
|
+
* @memberof TreeService
|
|
65
|
+
*/
|
|
66
|
+
async getStaticNodeData(nodeModel, hasQuery = false) {
|
|
67
|
+
const treeData = {
|
|
68
|
+
nodeId: nodeModel.nodeType,
|
|
69
|
+
id: nodeModel.nodeType,
|
|
70
|
+
text: nodeModel.text,
|
|
71
|
+
leaf: true,
|
|
72
|
+
};
|
|
73
|
+
treeData.leaf =
|
|
74
|
+
this.model.getChildNodes(treeData.nodeId, hasQuery).length === 0;
|
|
75
|
+
// todo 仅展开首节点
|
|
76
|
+
if (nodeModel.expanded) {
|
|
77
|
+
treeData.children = await this.fetchChildNodes(treeData, hasQuery);
|
|
78
|
+
}
|
|
79
|
+
return treeData;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 获取实体数据集数据
|
|
83
|
+
*
|
|
84
|
+
* @protected
|
|
85
|
+
* @param {IPSDETreeDataSetNode} nodeModel
|
|
86
|
+
* @param {boolean} [_hasQuery=false]
|
|
87
|
+
* @memberof TreeService
|
|
88
|
+
*/
|
|
89
|
+
async getDENodeDatas(nodeModel, _hasQuery = false) {
|
|
90
|
+
const appde = nodeModel.getPSAppDataEntity();
|
|
91
|
+
await appde.fill();
|
|
92
|
+
const methodName = nodeModel.getPSAppDEDataSet().codeName;
|
|
93
|
+
const service = await this.app.es.getService(appde.codeName);
|
|
94
|
+
const response = await service.exec(methodName, {});
|
|
95
|
+
console.log(response);
|
|
96
|
+
}
|
|
97
|
+
async getCodeListNodeDatas(_nodeModel, _hasQuery = false) {
|
|
98
|
+
// todo 代码表查询
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -10,14 +10,6 @@ import { AppEntityModel } from '@ibiz-template/model';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class WorkFlowService {
|
|
12
12
|
protected model: AppEntityModel;
|
|
13
|
-
/**
|
|
14
|
-
* 应用的模型
|
|
15
|
-
*
|
|
16
|
-
* @author lxm
|
|
17
|
-
* @date 2022-09-29 14:09:39
|
|
18
|
-
* @private
|
|
19
|
-
* @type {IPSApplication}
|
|
20
|
-
*/
|
|
21
13
|
private app;
|
|
22
14
|
/**
|
|
23
15
|
* 常规基础路径
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-flow.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/work-flow/work-flow.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"work-flow.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/work-flow/work-flow.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD;;;;;;;GAOG;AACH,qBAAa,eAAe;IAmBd,SAAS,CAAC,KAAK,EAAE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QAAQ,EACjB,MAAM,GAAE,OAAY,EACpB,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;CAWjC"}
|
|
@@ -16,9 +16,9 @@ export class WorkFlowService {
|
|
|
16
16
|
*/
|
|
17
17
|
constructor(model) {
|
|
18
18
|
this.model = model;
|
|
19
|
-
this.app =
|
|
19
|
+
this.app = ibiz.hub.getApp(model.modelService.app);
|
|
20
20
|
const appContext = ibiz.appData.context;
|
|
21
|
-
this.commonBaseUrl = `/wfcore/${appContext.srfsystemid}-app-${
|
|
21
|
+
this.commonBaseUrl = `/wfcore/${appContext.srfsystemid}-app-${model.modelService.app.codeName.toLowerCase()}/${this.model.source.name.toLowerCase()}`;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* 获取基础路径
|
|
@@ -41,7 +41,7 @@ export class WorkFlowService {
|
|
|
41
41
|
*/
|
|
42
42
|
async getWFStep(context) {
|
|
43
43
|
const { processDefinitionKey, taskDefinitionKey } = context;
|
|
44
|
-
return
|
|
44
|
+
return this.app.net.get(`${this.getBaseUrl()}/process-definitions/${processDefinitionKey}/usertasks/${taskDefinitionKey}`);
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* 根据业务主键和当前步骤获取操作路径
|
|
@@ -55,7 +55,7 @@ export class WorkFlowService {
|
|
|
55
55
|
async getWFLink(context, data) {
|
|
56
56
|
const deKeyValue = context[this.model.deName];
|
|
57
57
|
const { taskDefinitionKey } = context;
|
|
58
|
-
return
|
|
58
|
+
return this.app.net.post(`${this.getBaseUrl()}/${deKeyValue}/usertasks/${taskDefinitionKey}/ways`, { activedata: data });
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* 根据业务主键获取工作流程进度
|
|
@@ -67,7 +67,7 @@ export class WorkFlowService {
|
|
|
67
67
|
*/
|
|
68
68
|
async getWFHistory(context) {
|
|
69
69
|
const deKeyValue = context[this.model.deName];
|
|
70
|
-
return
|
|
70
|
+
return this.app.net.get(`${this.getBaseUrl()}/${deKeyValue}/process-instances/alls/history`);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* 根据业务主键获取工作流流程图片
|
|
@@ -79,7 +79,7 @@ export class WorkFlowService {
|
|
|
79
79
|
*/
|
|
80
80
|
async getWFProcessDiagram(context) {
|
|
81
81
|
const deKeyValue = context[this.model.deName];
|
|
82
|
-
return
|
|
82
|
+
return this.app.net.request(`${this.getBaseUrl()}/${deKeyValue}/process-instances/alls/processdiagram`, {
|
|
83
83
|
method: 'post',
|
|
84
84
|
data: {},
|
|
85
85
|
responseType: 'blob',
|
|
@@ -93,7 +93,7 @@ export class WorkFlowService {
|
|
|
93
93
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
94
94
|
*/
|
|
95
95
|
async getWFVersion() {
|
|
96
|
-
return
|
|
96
|
+
return this.app.net.get(`${this.getBaseUrl()}/process-definitions2`);
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* 启动工作流
|
|
@@ -106,7 +106,7 @@ export class WorkFlowService {
|
|
|
106
106
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
107
107
|
*/
|
|
108
108
|
async wfStart(context, params, data) {
|
|
109
|
-
return
|
|
109
|
+
return this.app.net.post(`${this.getBaseUrl()}/${context[this.model.deName]}/process-instances`, Object.assign(Object.assign({}, params), { activedata: data }));
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* 提交工作流
|
|
@@ -119,7 +119,7 @@ export class WorkFlowService {
|
|
|
119
119
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
120
120
|
*/
|
|
121
121
|
async wfSubmit(context, params, data) {
|
|
122
|
-
return
|
|
122
|
+
return this.app.net.post(`${this.getBaseUrl()}/${context[this.model.deName]}/tasks/${params.taskId}`, Object.assign(Object.assign({}, params), { activedata: data }));
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* 提交工作流
|
|
@@ -132,7 +132,7 @@ export class WorkFlowService {
|
|
|
132
132
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
133
133
|
*/
|
|
134
134
|
async wfWithdraw(context, params, data) {
|
|
135
|
-
return
|
|
135
|
+
return this.app.net.post(`${this.getBaseUrl()}/${context[this.model.deName]}/tasks/${params.taskId}/withdraw`, Object.assign(Object.assign({}, params), { activedata: data }));
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
138
|
* 调用工作流接口
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPSAppDataEntity } from '@ibiz-template/model';
|
|
1
|
+
import { IPSAppDataEntity, ModelService } from '@ibiz-template/model';
|
|
2
2
|
import { EntityService } from './service';
|
|
3
3
|
/**
|
|
4
4
|
* 应用服务工具类
|
|
@@ -9,6 +9,7 @@ import { EntityService } from './service';
|
|
|
9
9
|
* @class ServiceUtil
|
|
10
10
|
*/
|
|
11
11
|
export declare class ServiceUtil {
|
|
12
|
+
protected modelService: ModelService;
|
|
12
13
|
/**
|
|
13
14
|
* 实体服务缓存
|
|
14
15
|
*
|
|
@@ -27,21 +28,28 @@ export declare class ServiceUtil {
|
|
|
27
28
|
* @type {Map<string, IPSAppDataEntity>}
|
|
28
29
|
*/
|
|
29
30
|
protected allEntities: Map<string, IPSAppDataEntity>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates an instance of ServiceUtil.
|
|
33
|
+
*
|
|
34
|
+
* @author chitanda
|
|
35
|
+
* @date 2022-12-23 10:12:24
|
|
36
|
+
* @param {ModelService} modelService 应用模型服务
|
|
37
|
+
*/
|
|
38
|
+
constructor(modelService: ModelService);
|
|
30
39
|
/**
|
|
31
40
|
* 初始化实体缓存
|
|
32
41
|
*
|
|
33
42
|
* @author chitanda
|
|
34
|
-
* @date 2022-
|
|
43
|
+
* @date 2022-12-23 10:12:57
|
|
35
44
|
* @protected
|
|
36
|
-
* @param {IContext} [context]
|
|
37
45
|
* @return {*} {Promise<void>}
|
|
38
46
|
*/
|
|
39
|
-
protected initAllEntities(
|
|
47
|
+
protected initAllEntities(): Promise<void>;
|
|
40
48
|
/**
|
|
41
49
|
* 根据实体标识获取实体服务
|
|
42
50
|
*
|
|
43
51
|
* @author chitanda
|
|
44
|
-
* @date 2022-
|
|
52
|
+
* @date 2022-12-23 10:12:24
|
|
45
53
|
* @param {string} entityCodeName 实体标识
|
|
46
54
|
* @param {IContext} [context] 上下文,用于计算模型所属沙箱环境
|
|
47
55
|
* @return {*} {Promise<EntityService>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-util.d.ts","sourceRoot":"","sources":["../../src/service/service-util.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"service-util.d.ts","sourceRoot":"","sources":["../../src/service/service-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,YAAY,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C;;;;;;;GAOG;AACH,qBAAa,WAAW;IA4BV,SAAS,CAAC,YAAY,EAAE,YAAY;IA3BhD;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAa;IAExD;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAa;IAEjE;;;;;;OAMG;gBACmB,YAAY,EAAE,YAAY;IAEhD;;;;;;;OAOG;cACa,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAWhD;;;;;;;;OAQG;IACG,UAAU,CACd,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,QAAQ,GACjB,OAAO,CAAC,aAAa,CAAC;IAoBzB;;;;;;;OAOG;IACH,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI;CAKxC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppEntityModel,
|
|
1
|
+
import { AppEntityModel, } from '@ibiz-template/model';
|
|
2
2
|
import { EntityService } from './service';
|
|
3
3
|
import { ServicePathUtil } from './utils';
|
|
4
4
|
/**
|
|
@@ -10,7 +10,15 @@ import { ServicePathUtil } from './utils';
|
|
|
10
10
|
* @class ServiceUtil
|
|
11
11
|
*/
|
|
12
12
|
export class ServiceUtil {
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Creates an instance of ServiceUtil.
|
|
15
|
+
*
|
|
16
|
+
* @author chitanda
|
|
17
|
+
* @date 2022-12-23 10:12:24
|
|
18
|
+
* @param {ModelService} modelService 应用模型服务
|
|
19
|
+
*/
|
|
20
|
+
constructor(modelService) {
|
|
21
|
+
this.modelService = modelService;
|
|
14
22
|
/**
|
|
15
23
|
* 实体服务缓存
|
|
16
24
|
*
|
|
@@ -34,17 +42,15 @@ export class ServiceUtil {
|
|
|
34
42
|
* 初始化实体缓存
|
|
35
43
|
*
|
|
36
44
|
* @author chitanda
|
|
37
|
-
* @date 2022-
|
|
45
|
+
* @date 2022-12-23 10:12:57
|
|
38
46
|
* @protected
|
|
39
|
-
* @param {IContext} [context]
|
|
40
47
|
* @return {*} {Promise<void>}
|
|
41
48
|
*/
|
|
42
|
-
async initAllEntities(
|
|
49
|
+
async initAllEntities() {
|
|
43
50
|
if (this.allEntities.size !== 0) {
|
|
44
51
|
return;
|
|
45
52
|
}
|
|
46
|
-
const
|
|
47
|
-
const items = modelService.app.getAllPSAppDataEntities() || [];
|
|
53
|
+
const items = this.modelService.app.getAllPSAppDataEntities() || [];
|
|
48
54
|
items.forEach(item => {
|
|
49
55
|
const codeName = item.isFill ? item.codeName : item.refM.codeName;
|
|
50
56
|
this.allEntities.set(codeName, item);
|
|
@@ -54,14 +60,14 @@ export class ServiceUtil {
|
|
|
54
60
|
* 根据实体标识获取实体服务
|
|
55
61
|
*
|
|
56
62
|
* @author chitanda
|
|
57
|
-
* @date 2022-
|
|
63
|
+
* @date 2022-12-23 10:12:24
|
|
58
64
|
* @param {string} entityCodeName 实体标识
|
|
59
65
|
* @param {IContext} [context] 上下文,用于计算模型所属沙箱环境
|
|
60
66
|
* @return {*} {Promise<EntityService>}
|
|
61
67
|
*/
|
|
62
68
|
async getService(entityCodeName, context) {
|
|
63
69
|
if (!this.cache.has(entityCodeName)) {
|
|
64
|
-
await this.initAllEntities(
|
|
70
|
+
await this.initAllEntities();
|
|
65
71
|
const entity = this.allEntities.get(entityCodeName);
|
|
66
72
|
if (!entity) {
|
|
67
73
|
throw new Error(`找不到实体[${entityCodeName}]模型`);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IPSAppCounter, IPSAppDataEntity } from '@ibiz-template/model';
|
|
2
2
|
import { QXEvent } from 'qx-util';
|
|
3
|
+
import { Application } from '../../../application';
|
|
3
4
|
import { EntityService } from '../../service';
|
|
4
5
|
/**
|
|
5
6
|
* 应用实体计数器
|
|
@@ -11,6 +12,7 @@ import { EntityService } from '../../service';
|
|
|
11
12
|
*/
|
|
12
13
|
export declare class AppCounter {
|
|
13
14
|
model: IPSAppCounter;
|
|
15
|
+
protected app: Application;
|
|
14
16
|
protected entity: IPSAppDataEntity;
|
|
15
17
|
protected service: EntityService;
|
|
16
18
|
protected action: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-counter.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/app-counter/app-counter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAe,OAAO,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C;;;;;;;GAOG;AACH,qBAAa,UAAU;
|
|
1
|
+
{"version":3,"file":"app-counter.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/app-counter/app-counter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,gBAAgB,EACjB,MAAM,sBAAsB,CAAC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;;;;;;;;OAQG;IACH,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC;IAK7D;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,EAAE,SAAS,GAAE,OAAc,GAAG,IAAI;IAOpE;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI;IAI1C;;;;;;;OAOG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAI/B;;;;;OAKG;IACH,OAAO,IAAI,IAAI;CAKhB"}
|
|
@@ -43,6 +43,7 @@ export class AppCounter {
|
|
|
43
43
|
* @type {IData}
|
|
44
44
|
*/
|
|
45
45
|
this.data = {};
|
|
46
|
+
this.app = ibiz.hub.getApp(model.getPSModelService().app);
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
49
|
* 计数器初始化
|
|
@@ -56,7 +57,7 @@ export class AppCounter {
|
|
|
56
57
|
this.setParams(context, params);
|
|
57
58
|
this.entity = this.model.getPSAppDataEntity();
|
|
58
59
|
await this.entity.fill(true);
|
|
59
|
-
this.service = await
|
|
60
|
+
this.service = await this.app.es.getService(this.entity.codeName);
|
|
60
61
|
const action = this.model.getGetPSAppDEAction();
|
|
61
62
|
if (!action) {
|
|
62
63
|
throw new DefectModelError(this.model, `未找到获取计数器行为!`);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppEntityModel, IPSAppCodeList } from '@ibiz-template/model';
|
|
2
|
+
import { Application } from '../../../application';
|
|
2
3
|
import { CodeListItem } from '../../interface';
|
|
3
4
|
/**
|
|
4
5
|
* 实际缓存对象
|
|
@@ -42,6 +43,7 @@ type CacheData = {
|
|
|
42
43
|
* @class DynamicCodeListCache
|
|
43
44
|
*/
|
|
44
45
|
export declare class DynamicCodeListCache {
|
|
46
|
+
protected app: Application;
|
|
45
47
|
/**
|
|
46
48
|
* 代码表对象
|
|
47
49
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-code-list.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/dynamic-code-list/dynamic-code-list.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,cAAc,EAEf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;GAMG;AACH,KAAK,SAAS,GAAG;IACf;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAE,cAAc,CAAC;IAEnC;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IAElC;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,yBAAgC;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,EAAE,OAAO,CAAS;IAExC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE1B,QAAQ,EAAE,cAAc;
|
|
1
|
+
{"version":3,"file":"dynamic-code-list.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/dynamic-code-list/dynamic-code-list.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,cAAc,EAEf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;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
this.isPredefined = false;
|
|
29
29
|
this.codeList = codeList;
|
|
30
|
+
this.app = ibiz.hub.getApp(codeList.getPSModelService().app);
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
33
|
* 初始化
|
|
@@ -112,14 +113,14 @@ export class DynamicCodeListCache {
|
|
|
112
113
|
async load(context = {}, params = {}) {
|
|
113
114
|
// *预定义加载
|
|
114
115
|
if (this.isPredefined) {
|
|
115
|
-
const res = await
|
|
116
|
+
const res = await this.app.net.get(`/dictionaries/codelist/${this.codeList.codeName}`, params);
|
|
116
117
|
return Object.freeze(res.data.items);
|
|
117
118
|
}
|
|
118
119
|
// *加载实体服务数据
|
|
119
120
|
if (!this.entity || !this.methodName) {
|
|
120
121
|
new Error('动态代码表找不到实体或数据集');
|
|
121
122
|
}
|
|
122
|
-
const deService = await
|
|
123
|
+
const deService = await this.app.es.getService(this.entity.source.codeName);
|
|
123
124
|
const res = await deService.exec(this.methodName, context, params);
|
|
124
125
|
let resultItems = [];
|
|
125
126
|
if (res.data.length) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-path-util.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/service-path-util/service-path-util.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"service-path-util.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/service-path-util/service-path-util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,eAAe,EAAE,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,eAAe;IAC1B,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAM;IAE7C;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAa;IAEpE;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,EAAE,CAAC,CACtD;IAEZ;;;;;;;;OAQG;qBACoB,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB7D;;;;;;;;OAQG;WACU,SAAS,CACpB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;IAqB/B;;;;;;;;OAQG;IACH,SAAS,CAAC,MAAM,CAAC,YAAY,CAC3B,KAAK,EAAE,UAAU,EAAE,EACnB,GAAG,GAAE,MAAU,GACd,eAAe,EAAE;IAapB;;;;;;;;;OASG;IACH,SAAS,CAAC,MAAM,CAAC,YAAY,CAC3B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,eAAe,EAAE,GACvB,IAAI;IA+BP;;;;;;;;OAQG;IACH,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,GAAG,eAAe,EAAE,EAAE;CAK3E"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { pluralLower } from '@ibiz-template/core';
|
|
2
|
-
import { getModelService } from '@ibiz-template/model';
|
|
3
2
|
/**
|
|
4
3
|
* 服务路径拼接工具
|
|
5
4
|
*
|
|
@@ -22,7 +21,7 @@ export class ServicePathUtil {
|
|
|
22
21
|
if (this.allDERss.length > 0) {
|
|
23
22
|
return;
|
|
24
23
|
}
|
|
25
|
-
const service = await getModelService(context);
|
|
24
|
+
const service = await ibiz.model.getModelService(context);
|
|
26
25
|
const { app } = service;
|
|
27
26
|
const allPSAppEntities = app.getAllPSAppDataEntities() || [];
|
|
28
27
|
this.allDERss = app.getAllPSAppDERSs() || [];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 树节点数据格式
|
|
3
|
+
*
|
|
4
|
+
* @export
|
|
5
|
+
* @class TreeNodeData
|
|
6
|
+
*/
|
|
7
|
+
export interface TreeNodeData {
|
|
8
|
+
/**
|
|
9
|
+
* 节点标识(节点模型的标识)
|
|
10
|
+
*
|
|
11
|
+
* @type {string}
|
|
12
|
+
* @memberof TreeNodeData
|
|
13
|
+
*/
|
|
14
|
+
nodeId: string;
|
|
15
|
+
/**
|
|
16
|
+
* 节点数据主键
|
|
17
|
+
*
|
|
18
|
+
* @type {string}
|
|
19
|
+
* @memberof TreeNodeData
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
/**
|
|
23
|
+
* 节点显示名称
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof TreeNodeData
|
|
27
|
+
*/
|
|
28
|
+
text: string;
|
|
29
|
+
/**
|
|
30
|
+
* 是否没有子节点
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof TreeNodeData
|
|
34
|
+
*/
|
|
35
|
+
leaf: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 子节点集合(没有子节点则不存在)
|
|
38
|
+
*
|
|
39
|
+
* @type {TreeNodeData[]}
|
|
40
|
+
* @memberof TreeNodeData
|
|
41
|
+
*/
|
|
42
|
+
children?: TreeNodeData[];
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=tree-node-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-node-data.d.ts","sourceRoot":"","sources":["../../../src/service/vo/tree-node-data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|