@ibiz-template/runtime 0.4.16 → 0.4.17-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/dist/index.esm.js +477 -355
  2. package/dist/index.system.min.js +2 -2
  3. package/out/app-hub.d.ts +8 -0
  4. package/out/app-hub.d.ts.map +1 -1
  5. package/out/app-hub.js +13 -0
  6. package/out/controller/common/base.controller.d.ts +1 -0
  7. package/out/controller/common/base.controller.d.ts.map +1 -1
  8. package/out/controller/common/base.controller.js +2 -0
  9. package/out/controller/common/view/view.controller.d.ts.map +1 -1
  10. package/out/controller/common/view/view.controller.js +9 -3
  11. package/out/controller/common/view/wf-step-trace-view.controller.d.ts.map +1 -1
  12. package/out/controller/common/view/wf-step-trace-view.controller.js +3 -2
  13. package/out/controller/control/calendar/calendar.service.d.ts +3 -3
  14. package/out/controller/control/calendar/calendar.service.d.ts.map +1 -1
  15. package/out/controller/control/calendar/calendar.service.js +2 -2
  16. package/out/controller/control/form/edit-form/edit-form.service.d.ts +18 -18
  17. package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
  18. package/out/controller/control/form/edit-form/edit-form.service.js +11 -11
  19. package/out/controller/control/form/form/form.service.d.ts +2 -2
  20. package/out/controller/control/form/form/form.service.d.ts.map +1 -1
  21. package/out/controller/control/form/form/form.service.js +1 -1
  22. package/out/controller/control/form/search-form/search-form.service.d.ts +2 -2
  23. package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
  24. package/out/controller/control/form/search-form/search-form.service.js +1 -1
  25. package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
  26. package/out/controller/control/gantt/gantt.controller.js +1 -0
  27. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  28. package/out/controller/control/grid/grid/grid.controller.js +1 -1
  29. package/out/controller/control/grid/grid/grid.service.d.ts +2 -2
  30. package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
  31. package/out/controller/control/grid/grid/grid.service.js +2 -2
  32. package/out/controller/control/kanban/kanban.service.d.ts +2 -2
  33. package/out/controller/control/kanban/kanban.service.d.ts.map +1 -1
  34. package/out/controller/control/kanban/kanban.service.js +1 -1
  35. package/out/controller/control/map/map.service.d.ts +1 -1
  36. package/out/controller/control/map/map.service.js +1 -1
  37. package/out/controller/control/report-panel/report-panel.service.d.ts +2 -2
  38. package/out/controller/control/report-panel/report-panel.service.d.ts.map +1 -1
  39. package/out/controller/control/report-panel/report-panel.service.js +1 -1
  40. package/out/controller/control/tree/tree.service.d.ts +2 -2
  41. package/out/controller/control/tree/tree.service.d.ts.map +1 -1
  42. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
  43. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +1 -0
  44. package/out/controller/control/wizard-panel/wizard-panel.service.d.ts +4 -4
  45. package/out/controller/control/wizard-panel/wizard-panel.service.d.ts.map +1 -1
  46. package/out/controller/control/wizard-panel/wizard-panel.service.js +2 -2
  47. package/out/controller/utils/value-default/value-default.d.ts +1 -1
  48. package/out/controller/utils/value-default/value-default.d.ts.map +1 -1
  49. package/out/de-logic/de-logic-context.d.ts +5 -5
  50. package/out/de-logic/de-logic-context.d.ts.map +1 -1
  51. package/out/de-logic/de-logic-context.js +1 -1
  52. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts +2 -2
  53. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts.map +1 -1
  54. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.js +1 -1
  55. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts +2 -2
  56. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts.map +1 -1
  57. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.js +1 -1
  58. package/out/de-logic/de-logic-link/de-logic-link.d.ts +1 -1
  59. package/out/de-logic/de-logic-link/de-logic-link.js +1 -1
  60. package/out/de-logic/de-logic-node/de-logic-node.d.ts +1 -1
  61. package/out/de-logic/de-logic-param/de-logic-param.d.ts +1 -1
  62. package/out/de-logic/de-logic-param/de-logic-param.js +1 -1
  63. package/out/de-logic/de-logic.d.ts +3 -3
  64. package/out/de-logic/de-logic.d.ts.map +1 -1
  65. package/out/de-logic/de-logic.js +2 -2
  66. package/out/de-logic/index.d.ts +8 -8
  67. package/out/de-logic/index.d.ts.map +1 -1
  68. package/out/de-logic/index.js +5 -5
  69. package/out/install.d.ts.map +1 -1
  70. package/out/install.js +3 -0
  71. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +8 -0
  72. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  73. package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts +1 -1
  74. package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts.map +1 -1
  75. package/out/interface/controller/controller/i.controller.d.ts +8 -0
  76. package/out/interface/controller/controller/i.controller.d.ts.map +1 -1
  77. package/out/interface/provider/i-de-method.provider.d.ts +10 -1
  78. package/out/interface/provider/i-de-method.provider.d.ts.map +1 -1
  79. package/out/interface/provider/i-grid-column.provider.d.ts +2 -2
  80. package/out/interface/provider/i-grid-column.provider.d.ts.map +1 -1
  81. package/out/interface/service/service/i-app-de.service.d.ts +49 -43
  82. package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
  83. package/out/interface/service/service/i-file.service.d.ts +2 -2
  84. package/out/interface/service/service/i-file.service.d.ts.map +1 -1
  85. package/out/interface/service/service/i-wf.service.d.ts +12 -12
  86. package/out/interface/service/service/i-wf.service.d.ts.map +1 -1
  87. package/out/register/helper/grid-column-register.d.ts +2 -2
  88. package/out/register/helper/grid-column-register.d.ts.map +1 -1
  89. package/out/register/helper/grid-column-register.js +0 -14
  90. package/out/service/de-service-util.d.ts +26 -13
  91. package/out/service/de-service-util.d.ts.map +1 -1
  92. package/out/service/de-service-util.js +45 -16
  93. package/out/service/dto/method.dto.d.ts +20 -8
  94. package/out/service/dto/method.dto.d.ts.map +1 -1
  95. package/out/service/dto/method.dto.js +33 -15
  96. package/out/service/service/authority/authority.service.d.ts +1 -1
  97. package/out/service/service/authority/authority.service.js +1 -1
  98. package/out/service/service/code-list/code-list.service.d.ts +3 -3
  99. package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
  100. package/out/service/service/code-list/code-list.service.js +2 -2
  101. package/out/service/service/control/control.service.d.ts +2 -2
  102. package/out/service/service/control/control.service.d.ts.map +1 -1
  103. package/out/service/service/control/control.service.js +1 -1
  104. package/out/service/service/control/md-control.service.d.ts +13 -13
  105. package/out/service/service/control/md-control.service.d.ts.map +1 -1
  106. package/out/service/service/control/md-control.service.js +7 -7
  107. package/out/service/service/counter/counter.service.d.ts +3 -3
  108. package/out/service/service/counter/counter.service.d.ts.map +1 -1
  109. package/out/service/service/counter/counter.service.js +1 -1
  110. package/out/service/service/entity/de.service.d.ts +46 -28
  111. package/out/service/service/entity/de.service.d.ts.map +1 -1
  112. package/out/service/service/entity/de.service.js +35 -71
  113. package/out/service/service/entity/method/de-action.d.ts +23 -33
  114. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  115. package/out/service/service/entity/method/de-action.js +18 -35
  116. package/out/service/service/entity/method/fetch.d.ts +3 -4
  117. package/out/service/service/entity/method/fetch.d.ts.map +1 -1
  118. package/out/service/service/entity/method/fetch.js +3 -8
  119. package/out/service/service/entity/method/method-input.d.ts +10 -5
  120. package/out/service/service/entity/method/method-input.d.ts.map +1 -1
  121. package/out/service/service/entity/method/method-input.js +9 -8
  122. package/out/service/service/entity/method/method-renturn.d.ts +10 -7
  123. package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
  124. package/out/service/service/entity/method/method-renturn.js +9 -9
  125. package/out/service/service/entity/method/method.d.ts +11 -27
  126. package/out/service/service/entity/method/method.d.ts.map +1 -1
  127. package/out/service/service/entity/method/method.js +9 -21
  128. package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts +2 -2
  129. package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts.map +1 -1
  130. package/out/service/service/entity/method/provider/de-action-de-method.provider.js +2 -2
  131. package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts +2 -2
  132. package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts.map +1 -1
  133. package/out/service/service/entity/method/provider/fetch-de-method.provider.js +3 -3
  134. package/out/service/service/file/file.service.d.ts +2 -2
  135. package/out/service/service/file/file.service.d.ts.map +1 -1
  136. package/out/service/service/file/file.service.js +1 -1
  137. package/out/service/service/work-flow/work-flow.service.d.ts +28 -28
  138. package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
  139. package/out/service/service/work-flow/work-flow.service.js +15 -15
  140. package/out/service/utils/app-counter/app-counter.d.ts +7 -7
  141. package/out/service/utils/app-counter/app-counter.d.ts.map +1 -1
  142. package/out/service/utils/app-counter/app-counter.js +3 -3
  143. package/out/service/utils/app-counter/app-de-counter.d.ts +2 -2
  144. package/out/service/utils/app-counter/app-de-counter.d.ts.map +1 -1
  145. package/out/service/utils/app-counter/app-de-counter.js +1 -1
  146. package/out/service/utils/de-cache/de-cache.d.ts +44 -39
  147. package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
  148. package/out/service/utils/de-cache/de-cache.js +115 -75
  149. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +2 -2
  150. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
  151. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +2 -2
  152. package/out/service/utils/res-path/res-path.d.ts +4 -4
  153. package/out/service/utils/res-path/res-path.d.ts.map +1 -1
  154. package/out/service/utils/res-path/res-path.js +2 -2
  155. package/out/service/utils/search-filter/search-filter.d.ts +2 -2
  156. package/out/service/utils/search-filter/search-filter.d.ts.map +1 -1
  157. package/out/service/utils/service-exist-util/service-exist-util.d.ts +2 -2
  158. package/out/service/utils/service-exist-util/service-exist-util.d.ts.map +1 -1
  159. package/out/service/utils/service-exist-util/service-exist-util.js +1 -1
  160. package/out/types.d.ts +9 -0
  161. package/out/types.d.ts.map +1 -1
  162. package/out/ui-logic/ui-logic-param/ui-logic-param.js +1 -1
  163. package/out/utils/index.d.ts +2 -0
  164. package/out/utils/index.d.ts.map +1 -1
  165. package/out/utils/index.js +2 -0
  166. package/out/utils/nav-params/calc-nav-params.d.ts +2 -2
  167. package/out/utils/nav-params/calc-nav-params.d.ts.map +1 -1
  168. package/out/utils/nav-params/calc-nav-params.js +1 -1
  169. package/out/utils/open-redirect-view/open-redirect-view.js +1 -1
  170. package/out/utils/ui-domain/ui-domain.d.ts +35 -0
  171. package/out/utils/ui-domain/ui-domain.d.ts.map +1 -0
  172. package/out/utils/ui-domain/ui-domain.js +42 -0
  173. package/out/utils/ui-domain-manager/ui-domain-manager.d.ts +47 -0
  174. package/out/utils/ui-domain-manager/ui-domain-manager.d.ts.map +1 -0
  175. package/out/utils/ui-domain-manager/ui-domain-manager.js +62 -0
  176. package/package.json +3 -3
  177. package/src/app-hub.ts +14 -0
  178. package/src/controller/common/base.controller.ts +3 -0
  179. package/src/controller/common/view/view.controller.ts +9 -3
  180. package/src/controller/common/view/wf-step-trace-view.controller.ts +4 -2
  181. package/src/controller/control/calendar/calendar.service.ts +4 -4
  182. package/src/controller/control/form/edit-form/edit-form.service.ts +23 -18
  183. package/src/controller/control/form/form/form.service.ts +2 -2
  184. package/src/controller/control/form/search-form/search-form.service.ts +2 -2
  185. package/src/controller/control/gantt/gantt.controller.ts +2 -1
  186. package/src/controller/control/grid/grid/grid.controller.ts +1 -0
  187. package/src/controller/control/grid/grid/grid.service.ts +3 -2
  188. package/src/controller/control/kanban/kanban.service.ts +2 -2
  189. package/src/controller/control/map/map.service.ts +1 -1
  190. package/src/controller/control/report-panel/report-panel.service.ts +2 -2
  191. package/src/controller/control/tree/tree.service.ts +2 -2
  192. package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +2 -1
  193. package/src/controller/control/wizard-panel/wizard-panel.service.ts +4 -4
  194. package/src/controller/utils/value-default/value-default.ts +1 -1
  195. package/src/de-logic/de-logic-context.ts +5 -5
  196. package/src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts +2 -2
  197. package/src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts +2 -2
  198. package/src/de-logic/de-logic-link/de-logic-link.ts +1 -1
  199. package/src/de-logic/de-logic-node/de-logic-node.ts +1 -1
  200. package/src/de-logic/de-logic-param/de-logic-param.ts +1 -1
  201. package/src/de-logic/de-logic.ts +3 -3
  202. package/src/de-logic/index.ts +10 -10
  203. package/src/install.ts +3 -0
  204. package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +9 -0
  205. package/src/interface/common/i-data-ability-params/i-data-ability-params.ts +1 -1
  206. package/src/interface/controller/controller/i.controller.ts +9 -0
  207. package/src/interface/provider/i-de-method.provider.ts +10 -0
  208. package/src/interface/provider/i-grid-column.provider.ts +2 -7
  209. package/src/interface/service/service/i-app-de.service.ts +51 -44
  210. package/src/interface/service/service/i-file.service.ts +2 -2
  211. package/src/interface/service/service/i-wf.service.ts +12 -12
  212. package/src/register/helper/grid-column-register.ts +2 -17
  213. package/src/service/de-service-util.ts +59 -27
  214. package/src/service/dto/method.dto.ts +39 -19
  215. package/src/service/service/authority/authority.service.ts +1 -1
  216. package/src/service/service/code-list/code-list.service.ts +3 -3
  217. package/src/service/service/control/control.service.ts +2 -2
  218. package/src/service/service/control/md-control.service.ts +16 -13
  219. package/src/service/service/counter/counter.service.ts +3 -3
  220. package/src/service/service/entity/de.service.ts +57 -89
  221. package/src/service/service/entity/method/de-action.ts +29 -47
  222. package/src/service/service/entity/method/fetch.ts +5 -11
  223. package/src/service/service/entity/method/method-input.ts +10 -9
  224. package/src/service/service/entity/method/method-renturn.ts +10 -11
  225. package/src/service/service/entity/method/method.ts +12 -35
  226. package/src/service/service/entity/method/provider/de-action-de-method.provider.ts +4 -2
  227. package/src/service/service/entity/method/provider/fetch-de-method.provider.ts +4 -2
  228. package/src/service/service/file/file.service.ts +2 -2
  229. package/src/service/service/work-flow/work-flow.service.ts +30 -30
  230. package/src/service/utils/app-counter/app-counter.ts +7 -7
  231. package/src/service/utils/app-counter/app-de-counter.ts +2 -2
  232. package/src/service/utils/de-cache/de-cache.ts +124 -85
  233. package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +2 -5
  234. package/src/service/utils/res-path/res-path.ts +4 -4
  235. package/src/service/utils/search-filter/search-filter.ts +2 -2
  236. package/src/service/utils/service-exist-util/service-exist-util.ts +2 -2
  237. package/src/types.ts +10 -0
  238. package/src/ui-logic/ui-logic-param/ui-logic-param.ts +1 -1
  239. package/src/utils/index.ts +2 -0
  240. package/src/utils/nav-params/calc-nav-params.ts +2 -2
  241. package/src/utils/open-redirect-view/open-redirect-view.ts +1 -1
  242. package/src/utils/ui-domain/ui-domain.ts +52 -0
  243. package/src/utils/ui-domain-manager/ui-domain-manager.ts +64 -0
  244. package/out/service/service/entity/util/util.d.ts +0 -13
  245. package/out/service/service/entity/util/util.d.ts.map +0 -1
  246. package/out/service/service/entity/util/util.js +0 -14
  247. package/src/service/service/entity/util/util.ts +0 -18
@@ -3,7 +3,6 @@ import { DECache } from '../../../service/utils';
3
3
  import { IFileService } from './i-file.service';
4
4
  import { IWorkFlowService } from './i-wf.service';
5
5
  import { IConfigService } from './i-config.service';
6
- import { IDataEntity } from '../i-data-entity/i-data-entity';
7
6
 
8
7
  /**
9
8
  * 实体服务
@@ -14,6 +13,16 @@ import { IDataEntity } from '../i-data-entity/i-data-entity';
14
13
  * @interface IAppDEService
15
14
  */
16
15
  export interface IAppDEService {
16
+ /**
17
+ * 是否本地模式(临时数据模式)
18
+ *
19
+ * @description 由 method.dto.ts 在 DTO 填充,根据是否为子嵌套数据进行设置
20
+ * @author chitanda
21
+ * @date 2023-12-22 16:12:57
22
+ * @type {boolean}
23
+ */
24
+ isLocalMode: boolean;
25
+
17
26
  /**
18
27
  * 实体本地缓存工具
19
28
  *
@@ -56,14 +65,14 @@ export interface IAppDEService {
56
65
  * @author chitanda
57
66
  * @date 2023-04-23 09:04:16
58
67
  * @param {string} id 执行标识
59
- * @param {IParams} context 上下文
68
+ * @param {IContext} context 上下文
60
69
  * @param {IData} [params] 参数
61
70
  * @param {IParams} [params2] 参数2
62
71
  * @return {*} {Promise<IHttpResponse>}
63
72
  */
64
73
  exec(
65
74
  id: string,
66
- context: IParams,
75
+ context: IContext,
67
76
  params?: IData | IData[],
68
77
  params2?: IParams,
69
78
  ): Promise<IHttpResponse>;
@@ -73,13 +82,13 @@ export interface IAppDEService {
73
82
  *
74
83
  * @author chitanda
75
84
  * @date 2023-11-21 16:11:34
76
- * @param {IParams} context
85
+ * @param {IContext} context
77
86
  * @param {(IData | IData[])} [params]
78
87
  * @param {IParams} [params2]
79
88
  * @return {*} {Promise<IHttpResponse>}
80
89
  */
81
90
  getDraft(
82
- context: IParams,
91
+ context: IContext,
83
92
  params?: IData | IData[],
84
93
  params2?: IParams,
85
94
  ): Promise<IHttpResponse>;
@@ -89,13 +98,13 @@ export interface IAppDEService {
89
98
  *
90
99
  * @author chitanda
91
100
  * @date 2023-11-21 16:11:34
92
- * @param {IParams} context
101
+ * @param {IContext} context
93
102
  * @param {(IData | IData[])} [params]
94
103
  * @param {IParams} [params2]
95
104
  * @return {*} {Promise<IHttpResponse>}
96
105
  */
97
106
  getDraftTemp(
98
- context: IParams,
107
+ context: IContext,
99
108
  params?: IData | IData[],
100
109
  params2?: IParams,
101
110
  ): Promise<IHttpResponse>;
@@ -105,13 +114,13 @@ export interface IAppDEService {
105
114
  *
106
115
  * @author chitanda
107
116
  * @date 2023-11-21 16:11:50
108
- * @param {IParams} context
117
+ * @param {IContext} context
109
118
  * @param {(IData | IData[])} [params]
110
119
  * @param {IParams} [params2]
111
120
  * @return {*} {Promise<IHttpResponse>}
112
121
  */
113
122
  create(
114
- context: IParams,
123
+ context: IContext,
115
124
  params?: IData | IData[],
116
125
  params2?: IParams,
117
126
  ): Promise<IHttpResponse>;
@@ -121,13 +130,13 @@ export interface IAppDEService {
121
130
  *
122
131
  * @author chitanda
123
132
  * @date 2023-11-21 16:11:50
124
- * @param {IParams} context
133
+ * @param {IContext} context
125
134
  * @param {(IData | IData[])} [params]
126
135
  * @param {IParams} [params2]
127
136
  * @return {*} {Promise<IHttpResponse>}
128
137
  */
129
138
  createTemp(
130
- context: IParams,
139
+ context: IContext,
131
140
  params?: IData | IData[],
132
141
  params2?: IParams,
133
142
  ): Promise<IHttpResponse>;
@@ -137,13 +146,13 @@ export interface IAppDEService {
137
146
  *
138
147
  * @author chitanda
139
148
  * @date 2023-11-21 16:11:00
140
- * @param {IParams} context
149
+ * @param {IContext} context
141
150
  * @param {(IData | IData[])} [params]
142
151
  * @param {IParams} [params2]
143
152
  * @return {*} {Promise<IHttpResponse>}
144
153
  */
145
154
  get(
146
- context: IParams,
155
+ context: IContext,
147
156
  params?: IData | IData[],
148
157
  params2?: IParams,
149
158
  ): Promise<IHttpResponse>;
@@ -153,13 +162,13 @@ export interface IAppDEService {
153
162
  *
154
163
  * @author chitanda
155
164
  * @date 2023-11-21 16:11:00
156
- * @param {IParams} context
165
+ * @param {IContext} context
157
166
  * @param {(IData | IData[])} [params]
158
167
  * @param {IParams} [params2]
159
168
  * @return {*} {Promise<IHttpResponse>}
160
169
  */
161
170
  getTemp(
162
- context: IParams,
171
+ context: IContext,
163
172
  params?: IData | IData[],
164
173
  params2?: IParams,
165
174
  ): Promise<IHttpResponse>;
@@ -169,13 +178,13 @@ export interface IAppDEService {
169
178
  *
170
179
  * @author chitanda
171
180
  * @date 2023-11-21 16:11:09
172
- * @param {IParams} context
181
+ * @param {IContext} context
173
182
  * @param {(IData | IData[])} [params]
174
183
  * @param {IParams} [params2]
175
184
  * @return {*} {Promise<IHttpResponse>}
176
185
  */
177
186
  update(
178
- context: IParams,
187
+ context: IContext,
179
188
  params?: IData | IData[],
180
189
  params2?: IParams,
181
190
  ): Promise<IHttpResponse>;
@@ -185,13 +194,13 @@ export interface IAppDEService {
185
194
  *
186
195
  * @author chitanda
187
196
  * @date 2023-11-21 16:11:09
188
- * @param {IParams} context
197
+ * @param {IContext} context
189
198
  * @param {(IData | IData[])} [params]
190
199
  * @param {IParams} [params2]
191
200
  * @return {*} {Promise<IHttpResponse>}
192
201
  */
193
202
  updateTemp(
194
- context: IParams,
203
+ context: IContext,
195
204
  params?: IData | IData[],
196
205
  params2?: IParams,
197
206
  ): Promise<IHttpResponse>;
@@ -201,13 +210,13 @@ export interface IAppDEService {
201
210
  *
202
211
  * @author chitanda
203
212
  * @date 2023-11-21 16:11:12
204
- * @param {IParams} context
213
+ * @param {IContext} context
205
214
  * @param {(IData | IData[])} [params]
206
215
  * @param {IParams} [params2]
207
216
  * @return {*} {Promise<IHttpResponse>}
208
217
  */
209
218
  remove(
210
- context: IParams,
219
+ context: IContext,
211
220
  params?: IData | IData[],
212
221
  params2?: IParams,
213
222
  ): Promise<IHttpResponse>;
@@ -217,13 +226,13 @@ export interface IAppDEService {
217
226
  *
218
227
  * @author chitanda
219
228
  * @date 2023-11-21 16:11:12
220
- * @param {IParams} context
229
+ * @param {IContext} context
221
230
  * @param {(IData | IData[])} [params]
222
231
  * @param {IParams} [params2]
223
232
  * @return {*} {Promise<IHttpResponse>}
224
233
  */
225
234
  removeTemp(
226
- context: IParams,
235
+ context: IContext,
227
236
  params?: IData | IData[],
228
237
  params2?: IParams,
229
238
  ): Promise<IHttpResponse>;
@@ -233,40 +242,29 @@ export interface IAppDEService {
233
242
  *
234
243
  * @author chitanda
235
244
  * @date 2023-11-21 16:11:06
236
- * @param {IParams} context
245
+ * @param {IContext} context
237
246
  * @param {(IData | IData[])} [params]
238
247
  * @param {IParams} [params2]
239
248
  * @return {*} {Promise<IHttpResponse>}
240
249
  */
241
250
  fetchDefault(
242
- context: IParams,
251
+ context: IContext,
243
252
  params?: IData | IData[],
244
253
  params2?: IParams,
245
254
  ): Promise<IHttpResponse>;
246
255
 
247
- /**
248
- * 查询临时数据本地缓存
249
- *
250
- * @author chitanda
251
- * @date 2023-12-18 11:12:11
252
- * @param {IParams} context
253
- * @param {IParams} [params]
254
- * @return {*} {Promise<IDataEntity[]>}
255
- */
256
- selectLocal(context: IParams, params?: IParams): Promise<IDataEntity[]>;
257
-
258
256
  /**
259
257
  * 获取默认数据集[系统预置](临时数据)
260
258
  *
261
259
  * @author chitanda
262
260
  * @date 2023-11-21 16:11:06
263
- * @param {IParams} context
261
+ * @param {IContext} context
264
262
  * @param {(IData | IData[])} [params]
265
263
  * @param {IParams} [params2]
266
264
  * @return {*} {Promise<IHttpResponse>}
267
265
  */
268
266
  fetchTempDefault(
269
- context: IParams,
267
+ context: IContext,
270
268
  params?: IData | IData[],
271
269
  params2?: IParams,
272
270
  ): Promise<IHttpResponse>;
@@ -277,14 +275,14 @@ export interface IAppDEService {
277
275
  * @author chitanda
278
276
  * @date 2023-10-12 17:10:27
279
277
  * @param {string} id
280
- * @param {IParams} context
278
+ * @param {IContext} context
281
279
  * @param {(IData | IData[])} [params]
282
280
  * @param {IParams} [params2]
283
281
  * @return {*} {Promise<IHttpResponse>}
284
282
  */
285
283
  execAc(
286
284
  id: string,
287
- context: IParams,
285
+ context: IContext,
288
286
  params?: IData | IData[],
289
287
  params2?: IParams,
290
288
  ): Promise<IHttpResponse>;
@@ -295,14 +293,14 @@ export interface IAppDEService {
295
293
  * @author chitanda
296
294
  * @date 2023-10-12 16:10:03
297
295
  * @param {(data: IPortalAsyncAction) => void} onmessage
298
- * @param {IParams} context
296
+ * @param {IContext} context
299
297
  * @param {IParams} [params]
300
298
  * @param {IData} [data]
301
299
  * @return {*} {Promise<void>}
302
300
  */
303
301
  aiChatSse(
304
302
  onmessage: (data: IPortalAsyncAction) => void,
305
- context: IParams,
303
+ context: IContext,
306
304
  params?: IParams,
307
305
  data?: IData,
308
306
  ): Promise<void>;
@@ -312,14 +310,23 @@ export interface IAppDEService {
312
310
  *
313
311
  * @author chitanda
314
312
  * @date 2023-10-26 14:10:40
315
- * @param {IParams} context
313
+ * @param {IContext} context
316
314
  * @param {IParams} [params]
317
315
  * @param {IData} [data]
318
316
  * @return {*} {Promise<IHttpResponse>}
319
317
  */
320
318
  aiChatHistory(
321
- context: IParams,
319
+ context: IContext,
322
320
  params?: IParams,
323
321
  data?: IData,
324
322
  ): Promise<IHttpResponse>;
323
+
324
+ /**
325
+ * 当前实体服务销毁时调用
326
+ *
327
+ * @author chitanda
328
+ * @date 2023-12-22 13:12:42
329
+ * @return {*} {void}
330
+ */
331
+ destroy(): void;
325
332
  }
@@ -16,14 +16,14 @@ export interface IFileService {
16
16
  * @date 2022-11-25 14:11:53
17
17
  * @param {IDEDataExport} dataExport 导出模型
18
18
  * @param {string} fetchAction 查询方法
19
- * @param {IParams} context 上下文
19
+ * @param {IContext} context 上下文
20
20
  * @param {IParams} params 请求参数
21
21
  * @returns {*} {Promise<IHttpResponse<Blob>>}
22
22
  */
23
23
  exportData(
24
24
  dataExport: IDEDataExport,
25
25
  fetchAction: string,
26
- context: IParams,
26
+ context: IContext,
27
27
  params: IParams,
28
28
  ): Promise<IHttpResponse<Blob>>;
29
29
  }
@@ -6,41 +6,41 @@ export interface IWorkFlowService {
6
6
  *
7
7
  * @author lxm
8
8
  * @date 2022-09-29 14:09:45
9
- * @param {IParams} context
9
+ * @param {IContext} context
10
10
  * @returns {*} {Promise<IHttpResponse<IData>>}
11
11
  */
12
- getWFStep(context: IParams): Promise<IHttpResponse<IData>>;
12
+ getWFStep(context: IContext): Promise<IHttpResponse<IData>>;
13
13
 
14
14
  /**
15
15
  * 根据业务主键和当前步骤获取操作路径
16
16
  *
17
17
  * @author lxm
18
18
  * @date 2022-09-29 14:09:52
19
- * @param {IParams} context 路径参数
19
+ * @param {IContext} context 路径参数
20
20
  * @param {IData} data 数据
21
21
  * @returns {*} {Promise<IHttpResponse<IData>>}
22
22
  */
23
- getWFLink(context: IParams, data: IData): Promise<IHttpResponse<IData[]>>;
23
+ getWFLink(context: IContext, data: IData): Promise<IHttpResponse<IData[]>>;
24
24
 
25
25
  /**
26
26
  * 根据业务主键获取工作流程进度
27
27
  *
28
28
  * @author lxm
29
29
  * @date 2022-09-29 14:09:45
30
- * @param {IParams} context
30
+ * @param {IContext} context
31
31
  * @returns {*} {Promise<IHttpResponse<IData>>}
32
32
  */
33
- getWFHistory(context: IParams): Promise<IHttpResponse<IData>>;
33
+ getWFHistory(context: IContext): Promise<IHttpResponse<IData>>;
34
34
 
35
35
  /**
36
36
  * 根据业务主键获取工作流流程图片
37
37
  *
38
38
  * @author lxm
39
39
  * @date 2022-10-27 16:10:13
40
- * @param {IParams} context
40
+ * @param {IContext} context
41
41
  * @returns {*} {Promise<IHttpResponse<IData>>}
42
42
  */
43
- getWFProcessDiagram(context: IParams): Promise<IHttpResponse<IData>>;
43
+ getWFProcessDiagram(context: IContext): Promise<IHttpResponse<IData>>;
44
44
 
45
45
  /**
46
46
  * 获取标准工作流版本信息
@@ -56,13 +56,13 @@ export interface IWorkFlowService {
56
56
  *
57
57
  * @author lxm
58
58
  * @date 2022-09-30 17:09:51
59
- * @param {IParams} context 路径参数
59
+ * @param {IContext} context 路径参数
60
60
  * @param {IParams} params 请求参数
61
61
  * @param {IData} data 数据
62
62
  * @returns {*} {Promise<IHttpResponse<IData>>}
63
63
  */
64
64
  wfWithdraw(
65
- context: IParams,
65
+ context: IContext,
66
66
  params: IParams,
67
67
  data: IData,
68
68
  ): Promise<IHttpResponse<IData>>;
@@ -73,14 +73,14 @@ export interface IWorkFlowService {
73
73
  * @author lxm
74
74
  * @date 2022-09-30 17:09:38
75
75
  * @param {string} methodName 接口名称
76
- * @param {IParams} context 路径参数
76
+ * @param {IContext} context 路径参数
77
77
  * @param {IParams} [params={}] 查询参数
78
78
  * @param {IData} [data={}] 主数据数据
79
79
  * @returns {*} {Promise<IHttpResponse<IData>>}
80
80
  */
81
81
  exec(
82
82
  methodName: string,
83
- context: IParams,
83
+ context: IContext,
84
84
  params?: IParams,
85
85
  data?: IData,
86
86
  ): Promise<IHttpResponse<IData>>;
@@ -1,4 +1,4 @@
1
- import { IDEGridColumn, IDETreeColumn } from '@ibiz/model-core';
1
+ import { IDEGridColumn } from '@ibiz/model-core';
2
2
  import { IGridColumnProvider } from '../../interface';
3
3
  import { getPluginRegisterKey } from './common-register';
4
4
 
@@ -35,14 +35,12 @@ function getProvider(key: string): IGridColumnProvider | undefined {
35
35
  * @return {*} {Promise<IGridColumnProvider>}
36
36
  */
37
37
  export async function getGridColumnProvider(
38
- model: IDEGridColumn | IDETreeColumn,
38
+ model: IDEGridColumn,
39
39
  ): Promise<IGridColumnProvider | undefined> {
40
40
  let provider: IGridColumnProvider | undefined;
41
41
  const { columnType, enableRowEdit, sysPFPluginId, appId } =
42
42
  model as Required<IDEGridColumn>;
43
43
 
44
- const { renderSysPFPluginId } = model as Required<IDETreeColumn>;
45
-
46
44
  // 找插件适配器
47
45
  if (sysPFPluginId) {
48
46
  const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
@@ -56,19 +54,6 @@ export async function getGridColumnProvider(
56
54
  }
57
55
  }
58
56
 
59
- // 树表格列插件
60
- if (renderSysPFPluginId) {
61
- const pluginKey = await getPluginRegisterKey(renderSysPFPluginId, appId);
62
- if (pluginKey) {
63
- provider = getProvider(pluginKey);
64
- }
65
- if (!provider) {
66
- ibiz.log.error(`找不到树表格列插件${pluginKey}对应的适配器`);
67
- } else {
68
- return provider;
69
- }
70
- }
71
-
72
57
  const key = enableRowEdit ? `${columnType!}_EDIT` : columnType!;
73
58
  // 找表格列类型
74
59
  provider = getProvider(key);
@@ -3,6 +3,14 @@ import { IHttpResponse, RuntimeError } from '@ibiz-template/core';
3
3
  import { IAppDEService } from '../interface';
4
4
  import { DEService } from './service';
5
5
 
6
+ /**
7
+ * 实体服务构造方法
8
+ */
9
+ export type DEServiceConstructor = (
10
+ srfSessionId: string,
11
+ entityModel: IAppDataEntity,
12
+ ) => Promise<IAppDEService>;
13
+
6
14
  /**
7
15
  * 应用服务工具类
8
16
  *
@@ -18,9 +26,9 @@ export class DEServiceUtil {
18
26
  * @author chitanda
19
27
  * @date 2022-08-17 23:08:36
20
28
  * @protected
21
- * @type {Map<string, IAppDEService>}
29
+ * @type {Map<string, Map<string, IAppDEService>>} Map<域标识, Map<实体标识, 实体服务>>
22
30
  */
23
- protected cache: Map<string, IAppDEService> = new Map();
31
+ protected cache: Map<string, Map<string, IAppDEService>> = new Map();
24
32
 
25
33
  /**
26
34
  * 实体服务构造方法缓存
@@ -28,10 +36,7 @@ export class DEServiceUtil {
28
36
  * @date 2023-05-15 08:37:13
29
37
  * @protected
30
38
  */
31
- protected constructorCache: Map<
32
- string,
33
- (entityModel: IAppDataEntity) => Promise<IAppDEService>
34
- > = new Map();
39
+ protected constructorCache: Map<string, DEServiceConstructor> = new Map();
35
40
 
36
41
  /**
37
42
  * Creates an instance of DEServiceUtil.
@@ -47,13 +52,10 @@ export class DEServiceUtil {
47
52
  *
48
53
  * @author chitanda
49
54
  * @date 2023-06-14 10:06:31
50
- * @param {string} id
51
- * @param {(entityModel: IAppDataEntity) => Promise<IAppDEService>} constructor
55
+ * @param {string} id 实体标识
56
+ * @param {DEServiceConstructor} constructor
52
57
  */
53
- register(
54
- id: string,
55
- constructor: (entityModel: IAppDataEntity) => Promise<IAppDEService>,
56
- ): void {
58
+ register(id: string, constructor: DEServiceConstructor): void {
57
59
  this.constructorCache.set(id, constructor);
58
60
  }
59
61
 
@@ -61,13 +63,18 @@ export class DEServiceUtil {
61
63
  * 根据实体标识获取实体服务
62
64
  *
63
65
  * @author chitanda
64
- * @date 2022-12-23 10:12:24
66
+ * @date 2023-12-22 10:12:47
67
+ * @param {IContext} context 上下文,用于计算模型所属沙箱环境
65
68
  * @param {string} id 实体标识
66
- * @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
67
69
  * @return {*} {Promise<IAppDEService>}
68
70
  */
69
- async getService(id: string): Promise<IAppDEService> {
70
- if (!this.cache.has(id)) {
71
+ async getService(context: IContext, id: string): Promise<IAppDEService> {
72
+ const sandboxId = context.srfsessionid;
73
+ if (!this.cache.has(sandboxId)) {
74
+ this.cache.set(sandboxId, new Map());
75
+ }
76
+ const map = this.cache.get(sandboxId)!;
77
+ if (!map.has(id)) {
71
78
  const entityModel = await ibiz.hub.getAppDataEntity(
72
79
  id,
73
80
  this.appModel.appId,
@@ -78,13 +85,33 @@ export class DEServiceUtil {
78
85
  const constructor = this.constructorCache.get(id);
79
86
  let service: IAppDEService;
80
87
  if (constructor) {
81
- service = await constructor(entityModel);
88
+ service = await constructor(sandboxId, entityModel);
82
89
  } else {
83
- service = new DEService(entityModel);
90
+ service = new DEService(sandboxId, entityModel);
84
91
  }
85
- this.cache.set(id, service);
92
+ map.set(id, service);
93
+ }
94
+ return map.get(id)!;
95
+ }
96
+
97
+ /**
98
+ * 重置服务, 删除指定域下的所有服务缓存
99
+ *
100
+ * @author chitanda
101
+ * @date 2023-12-22 13:12:47
102
+ * @param {IContext} context
103
+ * @return {*} {void}
104
+ */
105
+ reset(context: IContext): void {
106
+ const sandboxId = context.srfsessionid;
107
+ if (!this.cache.has(sandboxId)) {
108
+ return;
86
109
  }
87
- return this.cache.get(id)!;
110
+ const map = this.cache.get(sandboxId)!;
111
+ map.forEach(service => {
112
+ service.destroy();
113
+ });
114
+ this.cache.delete(sandboxId);
88
115
  }
89
116
 
90
117
  /**
@@ -93,11 +120,16 @@ export class DEServiceUtil {
93
120
  * @description 根据 srfsessionid 作为临时数据域
94
121
  * @author chitanda
95
122
  * @date 2022-08-18 14:08:48
96
- * @param {IParams} context
123
+ * @param {IContext} context
97
124
  */
98
- clearTempCache(context: IParams): void {
99
- this.cache.forEach(service => {
100
- service.local.clear(context);
125
+ clearTempCache(context: IContext): void {
126
+ const sandboxId = context.srfsessionid;
127
+ if (!this.cache.has(sandboxId)) {
128
+ return;
129
+ }
130
+ const map = this.cache.get(sandboxId)!;
131
+ map.forEach(service => {
132
+ service.local.clear();
101
133
  });
102
134
  }
103
135
 
@@ -107,7 +139,7 @@ export class DEServiceUtil {
107
139
  * @date 2023-04-26 02:02:43
108
140
  * @param {string} appDataEntityId 实体名称
109
141
  * @param {string} methodName 方法名
110
- * @param {IParams} context 上下文
142
+ * @param {IContext} context 上下文
111
143
  * @param {(IData | undefined)} [params] 数据
112
144
  * @param {(IParams | undefined)} [params2] 视图参数
113
145
  * @return {*} {Promise<IHttpResponse<IData>>}
@@ -115,11 +147,11 @@ export class DEServiceUtil {
115
147
  async exec(
116
148
  appDataEntityId: string,
117
149
  methodName: string,
118
- context: IParams,
150
+ context: IContext,
119
151
  params?: IData | IData[] | undefined,
120
152
  params2?: IParams | undefined,
121
153
  ): Promise<IHttpResponse<IData>> {
122
- const service = await this.getService(appDataEntityId);
154
+ const service = await this.getService(context, appDataEntityId);
123
155
  return service.exec(methodName, context, params, params2);
124
156
  }
125
157
  }