@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.
Files changed (212) hide show
  1. package/dist/system/index.system.js +1 -1
  2. package/out/application.d.ts +55 -0
  3. package/out/application.d.ts.map +1 -0
  4. package/out/application.js +35 -0
  5. package/out/constant/index.d.ts +1 -1
  6. package/out/constant/index.d.ts.map +1 -1
  7. package/out/constant/index.js +1 -1
  8. package/out/controller/control/app-menu.d.ts +5 -3
  9. package/out/controller/control/app-menu.d.ts.map +1 -1
  10. package/out/controller/control/app-menu.js +10 -6
  11. package/out/controller/control/grid/grid-column.d.ts +3 -1
  12. package/out/controller/control/grid/grid-column.d.ts.map +1 -1
  13. package/out/controller/control/grid/grid-column.js +1 -0
  14. package/out/controller/control/grid/grid-field-column.js +1 -1
  15. package/out/controller/control/index.d.ts +1 -0
  16. package/out/controller/control/index.d.ts.map +1 -1
  17. package/out/controller/control/index.js +1 -0
  18. package/out/controller/control/tree.d.ts +34 -0
  19. package/out/controller/control/tree.d.ts.map +1 -0
  20. package/out/controller/control/tree.js +32 -0
  21. package/out/controller/editor/code-list-editor.js +1 -1
  22. package/out/controller/editor/editor.d.ts +9 -0
  23. package/out/controller/editor/editor.d.ts.map +1 -1
  24. package/out/controller/editor/editor.js +1 -0
  25. package/out/controller/editor/picker.js +1 -1
  26. package/out/controller/editor/upload.js +1 -1
  27. package/out/controller/interface/ability/control/i-tree-ability.d.ts +12 -0
  28. package/out/controller/interface/ability/control/i-tree-ability.d.ts.map +1 -0
  29. package/out/controller/interface/ability/control/i-tree-ability.js +1 -0
  30. package/out/controller/interface/ability/control/index.d.ts +1 -0
  31. package/out/controller/interface/ability/control/index.d.ts.map +1 -1
  32. package/out/controller/interface/ability/control/index.js +1 -0
  33. package/out/controller/interface/ability/view/i-tree-exp-view-ability.d.ts +12 -0
  34. package/out/controller/interface/ability/view/i-tree-exp-view-ability.d.ts.map +1 -0
  35. package/out/controller/interface/ability/view/i-tree-exp-view-ability.js +1 -0
  36. package/out/controller/interface/ability/view/index.d.ts +1 -0
  37. package/out/controller/interface/ability/view/index.d.ts.map +1 -1
  38. package/out/controller/interface/ability/view/index.js +1 -0
  39. package/out/controller/interface/event/control/i-tree-event.d.ts +11 -0
  40. package/out/controller/interface/event/control/i-tree-event.d.ts.map +1 -0
  41. package/out/controller/interface/event/control/i-tree-event.js +1 -0
  42. package/out/controller/interface/event/control/index.d.ts +1 -0
  43. package/out/controller/interface/event/control/index.d.ts.map +1 -1
  44. package/out/controller/interface/event/control/index.js +1 -0
  45. package/out/controller/interface/event/view/i-tree-exp-view-event.d.ts +12 -0
  46. package/out/controller/interface/event/view/i-tree-exp-view-event.d.ts.map +1 -0
  47. package/out/controller/interface/event/view/i-tree-exp-view-event.js +1 -0
  48. package/out/controller/interface/event/view/index.d.ts +1 -0
  49. package/out/controller/interface/event/view/index.d.ts.map +1 -1
  50. package/out/controller/interface/event/view/index.js +1 -0
  51. package/out/controller/interface/provider/i-control-provider.d.ts +1 -1
  52. package/out/controller/interface/provider/i-editor-provider.d.ts +2 -2
  53. package/out/controller/interface/provider/i-editor-provider.d.ts.map +1 -1
  54. package/out/controller/interface/provider/i-form-detail-provider.d.ts +1 -1
  55. package/out/controller/interface/provider/i-form-detail-provider.d.ts.map +1 -1
  56. package/out/controller/interface/provider/i-grid-column-provider.d.ts +1 -1
  57. package/out/controller/interface/provider/i-grid-column-provider.d.ts.map +1 -1
  58. package/out/controller/interface/provider/i-portlet-part-provider.d.ts +1 -1
  59. package/out/controller/interface/provider/i-view-provider.d.ts +1 -1
  60. package/out/controller/neuron/nerve/control/index.d.ts +1 -0
  61. package/out/controller/neuron/nerve/control/index.d.ts.map +1 -1
  62. package/out/controller/neuron/nerve/control/index.js +1 -0
  63. package/out/controller/neuron/nerve/control/tree-nerve.d.ts +16 -0
  64. package/out/controller/neuron/nerve/control/tree-nerve.d.ts.map +1 -0
  65. package/out/controller/neuron/nerve/control/tree-nerve.js +16 -0
  66. package/out/controller/neuron/nerve/view/index.d.ts +1 -0
  67. package/out/controller/neuron/nerve/view/index.d.ts.map +1 -1
  68. package/out/controller/neuron/nerve/view/index.js +1 -0
  69. package/out/controller/neuron/nerve/view/tree-exp-view-nerve.d.ts +19 -0
  70. package/out/controller/neuron/nerve/view/tree-exp-view-nerve.d.ts.map +1 -0
  71. package/out/controller/neuron/nerve/view/tree-exp-view-nerve.js +28 -0
  72. package/out/controller/neuron/neuron/view.d.ts +4 -2
  73. package/out/controller/neuron/neuron/view.d.ts.map +1 -1
  74. package/out/controller/neuron/neuron/view.js +3 -0
  75. package/out/controller/neuron/neuron/widget.d.ts +4 -2
  76. package/out/controller/neuron/neuron/widget.d.ts.map +1 -1
  77. package/out/controller/neuron/neuron/widget.js +2 -0
  78. package/out/controller/utils/button-state/button-state.d.ts +2 -0
  79. package/out/controller/utils/button-state/button-state.d.ts.map +1 -1
  80. package/out/controller/utils/button-state/button-state.js +2 -1
  81. package/out/controller/view/edit-view.js +1 -1
  82. package/out/controller/view/index.d.ts +1 -0
  83. package/out/controller/view/index.d.ts.map +1 -1
  84. package/out/controller/view/index.js +1 -0
  85. package/out/controller/view/tree-exp-view.d.ts +25 -0
  86. package/out/controller/view/tree-exp-view.d.ts.map +1 -0
  87. package/out/controller/view/tree-exp-view.js +41 -0
  88. package/out/controller/view/view.d.ts +9 -0
  89. package/out/controller/view/view.d.ts.map +1 -1
  90. package/out/controller/view/view.js +3 -2
  91. package/out/controller/view/wf-step-trace-view.js +1 -1
  92. package/out/install.d.ts.map +1 -1
  93. package/out/install.js +6 -7
  94. package/out/interface/i-plugin-factory/i-plugin-factory.d.ts +1 -1
  95. package/out/model.d.ts +88 -0
  96. package/out/model.d.ts.map +1 -0
  97. package/out/model.js +166 -0
  98. package/out/runtime-hub.d.ts +35 -0
  99. package/out/runtime-hub.d.ts.map +1 -0
  100. package/out/runtime-hub.js +66 -0
  101. package/out/service/authority/authority.service.d.ts +4 -1
  102. package/out/service/authority/authority.service.d.ts.map +1 -1
  103. package/out/service/authority/authority.service.js +7 -3
  104. package/out/service/dto/method.dto.d.ts +2 -0
  105. package/out/service/dto/method.dto.d.ts.map +1 -1
  106. package/out/service/dto/method.dto.js +9 -3
  107. package/out/service/index.d.ts +1 -0
  108. package/out/service/index.d.ts.map +1 -1
  109. package/out/service/index.js +1 -0
  110. package/out/service/service/code-list/code-list.service.d.ts +4 -3
  111. package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
  112. package/out/service/service/code-list/code-list.service.js +5 -7
  113. package/out/service/service/entity/method/de-action.js +5 -5
  114. package/out/service/service/entity/method/method-renturn.d.ts +2 -0
  115. package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
  116. package/out/service/service/entity/method/method-renturn.js +2 -1
  117. package/out/service/service/entity/method/method.d.ts +2 -0
  118. package/out/service/service/entity/method/method.d.ts.map +1 -1
  119. package/out/service/service/entity/method/method.js +6 -5
  120. package/out/service/service/widget/control-service.d.ts +2 -0
  121. package/out/service/service/widget/control-service.d.ts.map +1 -1
  122. package/out/service/service/widget/control-service.js +2 -1
  123. package/out/service/service/widget/index.d.ts +2 -1
  124. package/out/service/service/widget/index.d.ts.map +1 -1
  125. package/out/service/service/widget/index.js +2 -1
  126. package/out/service/service/widget/tree-service.d.ts +51 -0
  127. package/out/service/service/widget/tree-service.d.ts.map +1 -0
  128. package/out/service/service/widget/tree-service.js +100 -0
  129. package/out/service/service/work-flow/work-flow.service.d.ts +0 -8
  130. package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
  131. package/out/service/service/work-flow/work-flow.service.js +10 -10
  132. package/out/service/service-util.d.ts +13 -5
  133. package/out/service/service-util.d.ts.map +1 -1
  134. package/out/service/service-util.js +15 -9
  135. package/out/service/utils/app-counter/app-counter.d.ts +2 -0
  136. package/out/service/utils/app-counter/app-counter.d.ts.map +1 -1
  137. package/out/service/utils/app-counter/app-counter.js +2 -1
  138. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +2 -0
  139. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
  140. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +3 -2
  141. package/out/service/utils/service-path-util/service-path-util.d.ts.map +1 -1
  142. package/out/service/utils/service-path-util/service-path-util.js +1 -2
  143. package/out/service/vo/tree-node-data.d.ts +44 -0
  144. package/out/service/vo/tree-node-data.d.ts.map +1 -0
  145. package/out/service/vo/tree-node-data.js +1 -0
  146. package/out/types.d.ts +19 -25
  147. package/out/types.d.ts.map +1 -1
  148. package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.d.ts.map +1 -1
  149. package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.js +2 -1
  150. package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
  151. package/out/utils/open-redirect-view/open-redirect-view.js +2 -1
  152. package/package.json +4 -4
  153. package/src/application.ts +73 -0
  154. package/src/constant/index.ts +1 -1
  155. package/src/controller/control/app-menu.ts +11 -7
  156. package/src/controller/control/grid/grid-column.ts +5 -1
  157. package/src/controller/control/grid/grid-field-column.ts +1 -1
  158. package/src/controller/control/index.ts +1 -0
  159. package/src/controller/control/tree.ts +47 -0
  160. package/src/controller/editor/code-list-editor.ts +1 -1
  161. package/src/controller/editor/editor.ts +11 -0
  162. package/src/controller/editor/picker.ts +1 -1
  163. package/src/controller/editor/upload.ts +1 -1
  164. package/src/controller/interface/ability/control/i-tree-ability.ts +12 -0
  165. package/src/controller/interface/ability/control/index.ts +1 -0
  166. package/src/controller/interface/ability/view/i-tree-exp-view-ability.ts +12 -0
  167. package/src/controller/interface/ability/view/index.ts +1 -0
  168. package/src/controller/interface/event/control/i-tree-event.ts +11 -0
  169. package/src/controller/interface/event/control/index.ts +1 -0
  170. package/src/controller/interface/event/view/i-tree-exp-view-event.ts +12 -0
  171. package/src/controller/interface/event/view/index.ts +1 -0
  172. package/src/controller/interface/provider/i-control-provider.ts +1 -1
  173. package/src/controller/interface/provider/i-editor-provider.ts +4 -3
  174. package/src/controller/interface/provider/i-form-detail-provider.ts +1 -2
  175. package/src/controller/interface/provider/i-grid-column-provider.ts +1 -2
  176. package/src/controller/interface/provider/i-portlet-part-provider.ts +1 -1
  177. package/src/controller/interface/provider/i-view-provider.ts +1 -1
  178. package/src/controller/neuron/nerve/control/index.ts +1 -0
  179. package/src/controller/neuron/nerve/control/tree-nerve.ts +18 -0
  180. package/src/controller/neuron/nerve/view/index.ts +1 -0
  181. package/src/controller/neuron/nerve/view/tree-exp-view-nerve.ts +38 -0
  182. package/src/controller/neuron/neuron/view.ts +8 -0
  183. package/src/controller/neuron/neuron/widget.ts +3 -0
  184. package/src/controller/utils/button-state/button-state.ts +5 -1
  185. package/src/controller/view/edit-view.ts +1 -1
  186. package/src/controller/view/index.ts +1 -0
  187. package/src/controller/view/tree-exp-view.ts +49 -0
  188. package/src/controller/view/view.ts +12 -5
  189. package/src/controller/view/wf-step-trace-view.ts +1 -1
  190. package/src/install.ts +6 -12
  191. package/src/interface/i-plugin-factory/i-plugin-factory.ts +1 -1
  192. package/src/model.ts +188 -0
  193. package/src/runtime-hub.ts +76 -0
  194. package/src/service/authority/authority.service.ts +9 -2
  195. package/src/service/dto/method.dto.ts +11 -3
  196. package/src/service/index.ts +1 -0
  197. package/src/service/service/code-list/code-list.service.ts +6 -6
  198. package/src/service/service/entity/method/de-action.ts +5 -5
  199. package/src/service/service/entity/method/method-renturn.ts +5 -1
  200. package/src/service/service/entity/method/method.ts +9 -5
  201. package/src/service/service/widget/control-service.ts +5 -1
  202. package/src/service/service/widget/index.ts +2 -1
  203. package/src/service/service/widget/tree-service.ts +143 -0
  204. package/src/service/service/work-flow/work-flow.service.ts +13 -20
  205. package/src/service/service-util.ts +15 -8
  206. package/src/service/utils/app-counter/app-counter.ts +7 -2
  207. package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +6 -2
  208. package/src/service/utils/service-path-util/service-path-util.ts +2 -2
  209. package/src/service/vo/tree-node-data.ts +47 -0
  210. package/src/types.ts +27 -33
  211. package/src/utils/app-de-ui-action-util/handler/backend-ui-action-handler.ts +2 -1
  212. 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;IAIpB;;;;;;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"}
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 ibiz.entityService.getService(this.appEntity.source.codeName, context);
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,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,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,EAAkB,MAAM,sBAAsB,CAAC;AAEtE;;;;;;;GAOG;AACH,qBAAa,eAAe;IA2Bd,SAAS,CAAC,KAAK,EAAE,cAAc;IA1B3C;;;;;;;OAOG;IACH,OAAO,CAAC,GAAG,CAAiB;IAE5B;;;;;;;OAOG;IACH,OAAO,CAAC,aAAa,CAAS;IAE9B;;;;;OAKG;gBACmB,KAAK,EAAE,cAAc;IAQ3C;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IAIlB;;;;;;;OAOG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAOjE;;;;;;;;OAQG;IACG,SAAS,CACb,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC;IASlC;;;;;;;OAOG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAOpE;;;;;;;OAOG;IACG,mBAAmB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAY3E;;;;;;OAMG;IACG,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAInD;;;;;;;;;OASG;IACG,OAAO,CACX,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAUhC;;;;;;;;;OASG;IACG,QAAQ,CACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAYhC;;;;;;;;;OASG;IACG,UAAU,CACd,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAYhC;;;;;;;;;;OAUG;IACG,IAAI,CACR,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,EACpB,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;CAWjC"}
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,cAAc;IAlB3C,OAAO,CAAC,GAAG,CAAc;IAEzB;;;;;;;OAOG;IACH,OAAO,CAAC,aAAa,CAAS;IAE9B;;;;;OAKG;gBACmB,KAAK,EAAE,cAAc;IAQ3C;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IAIlB;;;;;;;OAOG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAOjE;;;;;;;;OAQG;IACG,SAAS,CACb,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC;IASlC;;;;;;;OAOG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAOpE;;;;;;;OAOG;IACG,mBAAmB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAY3E;;;;;;OAMG;IACG,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAInD;;;;;;;;;OASG;IACG,OAAO,CACX,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAUhC;;;;;;;;;OASG;IACG,QAAQ,CACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAYhC;;;;;;;;;OASG;IACG,UAAU,CACd,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAYhC;;;;;;;;;;OAUG;IACG,IAAI,CACR,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,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 = model.source.getPSModelService().app;
19
+ this.app = ibiz.hub.getApp(model.modelService.app);
20
20
  const appContext = ibiz.appData.context;
21
- this.commonBaseUrl = `/wfcore/${appContext.srfsystemid}-app-${this.app.codeName.toLowerCase()}/${this.model.source.name.toLowerCase()}`;
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 ibiz.net.get(`${this.getBaseUrl()}/process-definitions/${processDefinitionKey}/usertasks/${taskDefinitionKey}`);
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 ibiz.net.post(`${this.getBaseUrl()}/${deKeyValue}/usertasks/${taskDefinitionKey}/ways`, { activedata: data });
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 ibiz.net.get(`${this.getBaseUrl()}/${deKeyValue}/process-instances/alls/history`);
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 ibiz.net.request(`${this.getBaseUrl()}/${deKeyValue}/process-instances/alls/processdiagram`, {
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 ibiz.net.get(`${this.getBaseUrl()}/process-definitions2`);
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 ibiz.net.post(`${this.getBaseUrl()}/${context[this.model.deName]}/process-instances`, Object.assign(Object.assign({}, params), { activedata: data }));
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 ibiz.net.post(`${this.getBaseUrl()}/${context[this.model.deName]}/tasks/${params.taskId}`, Object.assign(Object.assign({}, params), { activedata: data }));
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 ibiz.net.post(`${this.getBaseUrl()}/${context[this.model.deName]}/tasks/${params.taskId}/withdraw`, Object.assign(Object.assign({}, params), { activedata: data }));
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-08-18 22:08:56
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(context?: IContext): Promise<void>;
47
+ protected initAllEntities(): Promise<void>;
40
48
  /**
41
49
  * 根据实体标识获取实体服务
42
50
  *
43
51
  * @author chitanda
44
- * @date 2022-08-17 23:08:20
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,EAGL,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C;;;;;;;GAOG;AACH,qBAAa,WAAW;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+1,4 @@
1
- import { AppEntityModel, getModelService, } from '@ibiz-template/model';
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
- constructor() {
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-08-18 22:08:56
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(context) {
49
+ async initAllEntities() {
43
50
  if (this.allEntities.size !== 0) {
44
51
  return;
45
52
  }
46
- const modelService = await getModelService(context);
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-08-17 23:08:20
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(context);
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;IA8CF,KAAK,EAAE,aAAa;IA7CvC,SAAS,CAAC,MAAM,EAAG,gBAAgB,CAAC;IAEpC,SAAS,CAAC,OAAO,EAAG,aAAa,CAAC;IAElC,SAAS,CAAC,MAAM,EAAG,MAAM,CAAC;IAE1B,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC;IAEjC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAS;IAErC;;;;;;;OAOG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAM;IAEjC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAM;IAE/B,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAA;KAAE,CAAC,CAAiB;IAE1E;;;;;;;OAOG;IACH,SAAS,CAAC,IAAI,EAAE,K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,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 ibiz.entityService.getService(this.entity.codeName);
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;IAIpC;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAmC3B;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK;IAwBjC;;;;;;;;;OASG;cACa,IAAI,CAClB,OAAO,GAAE,QAAa,EACtB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC;IA6B1B;;;;;;;;OAQG;IACG,GAAG,CACP,OAAO,GAAE,QAAa,EACtB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC;CAoC3B"}
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;AACnD,OAAO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;
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 ibiz.net.get(`/dictionaries/codelist/${this.codeList.codeName}`, params);
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 ibiz.entityService.getService(this.entity.source.codeName);
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,EAAmB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;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
+ {"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 {};