@ibiz-template/runtime 0.0.3-beta.4 → 0.0.3-beta.5

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 (244) hide show
  1. package/dist/system/index.system.js +1 -1
  2. package/out/command/app/app-func/app-func.d.ts +2 -2
  3. package/out/command/app/app-func/app-func.d.ts.map +1 -1
  4. package/out/command/app/app-func/app-func.js +1 -7
  5. package/out/command/app/open-app-view/open-app-view.d.ts +6 -6
  6. package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
  7. package/out/controller/control/app-menu.d.ts.map +1 -1
  8. package/out/controller/control/app-menu.js +1 -1
  9. package/out/controller/control/dataview.d.ts.map +1 -1
  10. package/out/controller/control/dataview.js +5 -2
  11. package/out/controller/control/form/form-druipart.js +2 -2
  12. package/out/controller/control/grid/grid-field-column.d.ts.map +1 -1
  13. package/out/controller/control/grid/grid-field-column.js +4 -2
  14. package/out/controller/control/tree.d.ts.map +1 -1
  15. package/out/controller/control/tree.js +1 -2
  16. package/out/controller/editor/editor.js +1 -2
  17. package/out/controller/editor/index.d.ts +1 -0
  18. package/out/controller/editor/index.d.ts.map +1 -1
  19. package/out/controller/editor/index.js +1 -0
  20. package/out/controller/editor/number-range.d.ts +12 -0
  21. package/out/controller/editor/number-range.d.ts.map +1 -0
  22. package/out/controller/editor/number-range.js +10 -0
  23. package/out/controller/editor/picker.d.ts.map +1 -1
  24. package/out/controller/editor/picker.js +1 -0
  25. package/out/controller/view/edit-view.d.ts.map +1 -1
  26. package/out/controller/view/edit-view.js +3 -3
  27. package/out/controller/view/edit-view3.d.ts.map +1 -1
  28. package/out/controller/view/edit-view3.js +1 -2
  29. package/out/controller/view/grid-exp-view.d.ts.map +1 -1
  30. package/out/controller/view/grid-exp-view.js +9 -49
  31. package/out/controller/view/list-exp-view.d.ts.map +1 -1
  32. package/out/controller/view/list-exp-view.js +9 -50
  33. package/out/controller/view/tree-exp-view.d.ts.map +1 -1
  34. package/out/controller/view/tree-exp-view.js +28 -25
  35. package/out/controller/view/view.d.ts.map +1 -1
  36. package/out/controller/view/view.js +2 -1
  37. package/out/controller/view/wf-dyna-edit-view.d.ts.map +1 -1
  38. package/out/controller/view/wf-dyna-edit-view.js +5 -4
  39. package/out/controller/view/wf-dyna-edit-view3.d.ts.map +1 -1
  40. package/out/controller/view/wf-dyna-edit-view3.js +1 -2
  41. package/out/controller/view/wf-step-trace-view.js +2 -2
  42. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts +2 -2
  43. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts.map +1 -1
  44. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.js +1 -1
  45. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts +2 -2
  46. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts.map +1 -1
  47. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.js +1 -1
  48. package/out/de-logic/de-logic-link/de-logic-link.d.ts +2 -2
  49. package/out/de-logic/de-logic-link/de-logic-link.d.ts.map +1 -1
  50. package/out/de-logic/de-logic-link/de-logic-link.js +1 -1
  51. package/out/de-logic/de-logic-node/bind-param-node/bind-param-node.d.ts +1 -1
  52. package/out/de-logic/de-logic-node/bind-param-node/bind-param-node.d.ts.map +1 -1
  53. package/out/de-logic/de-logic-node/data-set-node/data-set-node.d.ts +1 -1
  54. package/out/de-logic/de-logic-node/data-set-node/data-set-node.d.ts.map +1 -1
  55. package/out/de-logic/de-logic-node/de-action-node/de-action-node.d.ts +1 -1
  56. package/out/de-logic/de-logic-node/de-action-node/de-action-node.d.ts.map +1 -1
  57. package/out/de-logic/de-logic-node/de-logic-node.d.ts +2 -2
  58. package/out/de-logic/de-logic-node/de-logic-node.d.ts.map +1 -1
  59. package/out/de-logic/de-logic-node/end-node/end-node.d.ts +1 -1
  60. package/out/de-logic/de-logic-node/end-node/end-node.d.ts.map +1 -1
  61. package/out/de-logic/de-logic-node/prepare-param-node/prepare-param-node.d.ts +1 -1
  62. package/out/de-logic/de-logic-node/prepare-param-node/prepare-param-node.d.ts.map +1 -1
  63. package/out/de-logic/de-logic-node/start-node/start-node.d.ts +1 -1
  64. package/out/de-logic/de-logic-node/start-node/start-node.d.ts.map +1 -1
  65. package/out/de-logic/de-logic-node/throw-exception-node/throw-exception-node.d.ts +1 -1
  66. package/out/de-logic/de-logic-node/throw-exception-node/throw-exception-node.d.ts.map +1 -1
  67. package/out/de-logic/de-logic-param/de-logic-param.d.ts +2 -2
  68. package/out/de-logic/de-logic-param/de-logic-param.d.ts.map +1 -1
  69. package/out/de-logic/de-logic-param/de-logic-param.js +1 -1
  70. package/out/de-logic/de-logic.d.ts +6 -6
  71. package/out/de-logic/de-logic.d.ts.map +1 -1
  72. package/out/de-logic/de-logic.js +3 -3
  73. package/out/de-logic/index.d.ts +2 -2
  74. package/out/de-logic/index.d.ts.map +1 -1
  75. package/out/de-logic/index.js +1 -1
  76. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +5 -5
  77. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
  78. package/out/service/dto/method.dto.d.ts +4 -4
  79. package/out/service/dto/method.dto.d.ts.map +1 -1
  80. package/out/service/dto/method.dto.js +2 -2
  81. package/out/service/interface/i-tree-node-data/i-tree-node-data.d.ts +2 -2
  82. package/out/service/interface/i-tree-node-data/i-tree-node-data.d.ts.map +1 -1
  83. package/out/service/service/code-list/code-list.service.d.ts +3 -3
  84. package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
  85. package/out/service/service/code-list/code-list.service.js +1 -1
  86. package/out/service/service/counter/counter.service.d.ts +3 -3
  87. package/out/service/service/counter/counter.service.d.ts.map +1 -1
  88. package/out/service/service/counter/counter.service.js +1 -1
  89. package/out/service/service/entity/entity.service.d.ts +3 -3
  90. package/out/service/service/entity/entity.service.d.ts.map +1 -1
  91. package/out/service/service/entity/entity.service.js +1 -1
  92. package/out/service/service/entity/method/de-action.d.ts +23 -23
  93. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  94. package/out/service/service/entity/method/de-action.js +11 -11
  95. package/out/service/service/entity/method/fetch.d.ts +3 -3
  96. package/out/service/service/entity/method/fetch.d.ts.map +1 -1
  97. package/out/service/service/entity/method/fetch.js +1 -1
  98. package/out/service/service/entity/method/method-input.d.ts +2 -2
  99. package/out/service/service/entity/method/method-input.d.ts.map +1 -1
  100. package/out/service/service/entity/method/method-input.js +1 -1
  101. package/out/service/service/entity/method/method-renturn.d.ts +2 -2
  102. package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
  103. package/out/service/service/entity/method/method-renturn.js +1 -1
  104. package/out/service/service/entity/method/method.d.ts +6 -6
  105. package/out/service/service/entity/method/method.d.ts.map +1 -1
  106. package/out/service/service/entity/method/method.js +2 -2
  107. package/out/service/service/file/file.service.d.ts +2 -2
  108. package/out/service/service/file/file.service.d.ts.map +1 -1
  109. package/out/service/service/file/file.service.js +1 -1
  110. package/out/service/service/widget/control-service.d.ts +3 -3
  111. package/out/service/service/widget/control-service.d.ts.map +1 -1
  112. package/out/service/service/widget/control-service.js +1 -1
  113. package/out/service/service/widget/edit-form-service.d.ts +18 -18
  114. package/out/service/service/widget/edit-form-service.d.ts.map +1 -1
  115. package/out/service/service/widget/edit-form-service.js +9 -9
  116. package/out/service/service/widget/grid-service.d.ts +2 -2
  117. package/out/service/service/widget/grid-service.d.ts.map +1 -1
  118. package/out/service/service/widget/grid-service.js +1 -1
  119. package/out/service/service/widget/md-control-service.d.ts +14 -14
  120. package/out/service/service/widget/md-control-service.d.ts.map +1 -1
  121. package/out/service/service/widget/md-control-service.js +7 -7
  122. package/out/service/service/widget/search-form-service.d.ts +2 -2
  123. package/out/service/service/widget/search-form-service.d.ts.map +1 -1
  124. package/out/service/service/widget/search-form-service.js +1 -1
  125. package/out/service/service/widget/tree-service.d.ts +3 -3
  126. package/out/service/service/widget/tree-service.d.ts.map +1 -1
  127. package/out/service/service/widget/tree-service.js +16 -15
  128. package/out/service/service/widget/wizard-panel-service.d.ts +4 -4
  129. package/out/service/service/widget/wizard-panel-service.d.ts.map +1 -1
  130. package/out/service/service/widget/wizard-panel-service.js +2 -2
  131. package/out/service/service/work-flow/work-flow.service.d.ts +16 -16
  132. package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
  133. package/out/service/service/work-flow/work-flow.service.js +8 -8
  134. package/out/service/service-util.d.ts +3 -3
  135. package/out/service/service-util.d.ts.map +1 -1
  136. package/out/service/service-util.js +2 -2
  137. package/out/service/utils/app-counter/app-counter.d.ts +7 -7
  138. package/out/service/utils/app-counter/app-counter.d.ts.map +1 -1
  139. package/out/service/utils/app-counter/app-counter.js +6 -4
  140. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +4 -4
  141. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
  142. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +2 -2
  143. package/out/service/utils/entity-cache/entity-cache.d.ts +25 -25
  144. package/out/service/utils/entity-cache/entity-cache.d.ts.map +1 -1
  145. package/out/service/utils/entity-cache/entity-cache.js +12 -12
  146. package/out/service/utils/res-path/res-path.d.ts +2 -2
  147. package/out/service/utils/res-path/res-path.d.ts.map +1 -1
  148. package/out/service/utils/res-path/res-path.js +1 -1
  149. package/out/service/utils/route-context/route-context.d.ts +2 -2
  150. package/out/service/utils/route-context/route-context.d.ts.map +1 -1
  151. package/out/service/utils/route-context/route-context.js +1 -1
  152. package/out/service/utils/search-filter/search-filter.d.ts +3 -3
  153. package/out/service/utils/search-filter/search-filter.d.ts.map +1 -1
  154. package/out/service/utils/service-exist-util/service-exist-util.d.ts +2 -2
  155. package/out/service/utils/service-exist-util/service-exist-util.d.ts.map +1 -1
  156. package/out/service/utils/service-exist-util/service-exist-util.js +1 -1
  157. package/out/service/utils/service-path-util/service-path-util.d.ts +1 -1
  158. package/out/service/utils/service-path-util/service-path-util.js +1 -1
  159. package/out/service/vo/tree-node-data/tree-node-data.d.ts +2 -2
  160. package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
  161. package/out/utils/app-de-ui-action-util/handler/ui-action-handler.js +1 -2
  162. package/out/utils/index.d.ts +1 -0
  163. package/out/utils/index.d.ts.map +1 -1
  164. package/out/utils/index.js +1 -0
  165. package/out/utils/nav-params/calc-nav-params.d.ts +29 -0
  166. package/out/utils/nav-params/calc-nav-params.d.ts.map +1 -0
  167. package/out/utils/nav-params/calc-nav-params.js +34 -0
  168. package/out/utils/nav-params/nav-params.d.ts +1 -1
  169. package/out/utils/nav-params/nav-params.d.ts.map +1 -1
  170. package/out/utils/open-redirect-view/open-redirect-view.d.ts +4 -4
  171. package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
  172. package/out/utils/open-redirect-view/open-redirect-view.js +6 -6
  173. package/out/view-logic/view-logic.js +2 -3
  174. package/package.json +5 -5
  175. package/src/command/app/app-func/app-func.ts +3 -7
  176. package/src/command/app/open-app-view/open-app-view.ts +6 -6
  177. package/src/controller/control/app-menu.ts +6 -1
  178. package/src/controller/control/dataview.ts +5 -8
  179. package/src/controller/control/form/form-druipart.ts +2 -2
  180. package/src/controller/control/grid/grid-field-column.ts +4 -2
  181. package/src/controller/control/tree.ts +1 -2
  182. package/src/controller/editor/editor.ts +1 -1
  183. package/src/controller/editor/index.ts +1 -0
  184. package/src/controller/editor/number-range.ts +11 -0
  185. package/src/controller/editor/picker.ts +1 -0
  186. package/src/controller/view/edit-view.ts +4 -7
  187. package/src/controller/view/edit-view3.ts +1 -2
  188. package/src/controller/view/grid-exp-view.ts +14 -51
  189. package/src/controller/view/list-exp-view.ts +14 -52
  190. package/src/controller/view/tree-exp-view.ts +29 -34
  191. package/src/controller/view/view.ts +2 -1
  192. package/src/controller/view/wf-dyna-edit-view.ts +7 -12
  193. package/src/controller/view/wf-dyna-edit-view3.ts +1 -2
  194. package/src/controller/view/wf-step-trace-view.ts +2 -2
  195. package/src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts +2 -2
  196. package/src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts +2 -2
  197. package/src/de-logic/de-logic-link/de-logic-link.ts +2 -2
  198. package/src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts +1 -1
  199. package/src/de-logic/de-logic-node/data-set-node/data-set-node.ts +1 -1
  200. package/src/de-logic/de-logic-node/de-action-node/de-action-node.ts +1 -1
  201. package/src/de-logic/de-logic-node/de-logic-node.ts +2 -2
  202. package/src/de-logic/de-logic-node/end-node/end-node.ts +1 -1
  203. package/src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts +1 -1
  204. package/src/de-logic/de-logic-node/start-node/start-node.ts +1 -1
  205. package/src/de-logic/de-logic-node/throw-exception-node/throw-exception-node.ts +1 -1
  206. package/src/de-logic/de-logic-param/de-logic-param.ts +2 -2
  207. package/src/de-logic/de-logic.ts +6 -6
  208. package/src/de-logic/index.ts +2 -2
  209. package/src/interface/util/i-open-view-util/i-open-view-util.ts +5 -5
  210. package/src/service/dto/method.dto.ts +4 -4
  211. package/src/service/interface/i-tree-node-data/i-tree-node-data.ts +2 -2
  212. package/src/service/service/code-list/code-list.service.ts +3 -3
  213. package/src/service/service/counter/counter.service.ts +3 -3
  214. package/src/service/service/entity/entity.service.ts +3 -3
  215. package/src/service/service/entity/method/de-action.ts +23 -23
  216. package/src/service/service/entity/method/fetch.ts +3 -3
  217. package/src/service/service/entity/method/method-input.ts +2 -2
  218. package/src/service/service/entity/method/method-renturn.ts +2 -2
  219. package/src/service/service/entity/method/method.ts +6 -6
  220. package/src/service/service/file/file.service.ts +2 -2
  221. package/src/service/service/widget/control-service.ts +3 -3
  222. package/src/service/service/widget/edit-form-service.ts +18 -21
  223. package/src/service/service/widget/grid-service.ts +2 -2
  224. package/src/service/service/widget/md-control-service.ts +14 -17
  225. package/src/service/service/widget/search-form-service.ts +2 -2
  226. package/src/service/service/widget/tree-service.ts +27 -19
  227. package/src/service/service/widget/wizard-panel-service.ts +4 -4
  228. package/src/service/service/work-flow/work-flow.service.ts +16 -16
  229. package/src/service/service-util.ts +3 -3
  230. package/src/service/utils/app-counter/app-counter.ts +9 -7
  231. package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +4 -4
  232. package/src/service/utils/entity-cache/entity-cache.ts +26 -26
  233. package/src/service/utils/res-path/res-path.ts +2 -2
  234. package/src/service/utils/route-context/route-context.ts +2 -2
  235. package/src/service/utils/search-filter/search-filter.ts +3 -3
  236. package/src/service/utils/service-exist-util/service-exist-util.ts +2 -2
  237. package/src/service/utils/service-path-util/service-path-util.ts +1 -1
  238. package/src/service/vo/tree-node-data/tree-node-data.ts +2 -2
  239. package/src/utils/app-de-ui-action-util/handler/ui-action-handler.ts +1 -1
  240. package/src/utils/index.ts +1 -0
  241. package/src/utils/nav-params/calc-nav-params.ts +59 -0
  242. package/src/utils/nav-params/nav-params.ts +1 -1
  243. package/src/utils/open-redirect-view/open-redirect-view.ts +5 -5
  244. package/src/view-logic/view-logic.ts +3 -3
@@ -12,12 +12,12 @@ export class MDControlService<
12
12
  *
13
13
  * @author lxm
14
14
  * @date 2022-08-31 17:08:41
15
- * @param {IContext} context 上下文
15
+ * @param {IParams} context 上下文
16
16
  * @param {IParams} [params={}] 视图参数
17
17
  * @returns {*} {Promise<IHttpResponse>}
18
18
  */
19
19
  async fetch(
20
- context: IContext,
20
+ context: IParams,
21
21
  params: IParams = {},
22
22
  ): Promise<IHttpResponse<ControlVO[]>> {
23
23
  let res = await this.exec(this.model.fetchAction, context, params);
@@ -30,12 +30,12 @@ export class MDControlService<
30
30
  *
31
31
  * @author lxm
32
32
  * @date 2022-08-31 17:08:41
33
- * @param {IContext} context 上下文
33
+ * @param {IParams} context 上下文
34
34
  * @param {IParams} [params={}] 视图参数
35
35
  * @returns {*} {Promise<IHttpResponse>}
36
36
  */
37
37
  async get(
38
- context: IContext,
38
+ context: IParams,
39
39
  params: IParams = {},
40
40
  ): Promise<IHttpResponse<ControlVO>> {
41
41
  let res = await this.exec(this.model.getAction, context, undefined, params);
@@ -48,12 +48,12 @@ export class MDControlService<
48
48
  *
49
49
  * @author lxm
50
50
  * @date 2022-08-31 17:08:41
51
- * @param {IContext} context 上下文
51
+ * @param {IParams} context 上下文
52
52
  * @param {IParams} [params={}] 视图参数
53
53
  * @returns {*} {Promise<IHttpResponse>}
54
54
  */
55
55
  async getDraft(
56
- context: IContext,
56
+ context: IParams,
57
57
  params: IParams = {},
58
58
  ): Promise<IHttpResponse<ControlVO>> {
59
59
  let res = await this.exec(
@@ -71,14 +71,11 @@ export class MDControlService<
71
71
  *
72
72
  * @author lxm
73
73
  * @date 2022-09-07 19:09:48
74
- * @param {IContext} context 上下文
74
+ * @param {IParams} context 上下文
75
75
  * @param {IParams} [params={}] 视图参数
76
76
  * @returns {*}
77
77
  */
78
- async remove(
79
- context: IContext,
80
- params: IParams = {},
81
- ): Promise<IHttpResponse> {
78
+ async remove(context: IParams, params: IParams = {}): Promise<IHttpResponse> {
82
79
  const res = await this.exec(
83
80
  this.model.removeAction,
84
81
  context,
@@ -93,12 +90,12 @@ export class MDControlService<
93
90
  *
94
91
  * @author lxm
95
92
  * @date 2022-09-07 19:09:11
96
- * @param {IContext} context 上下文
93
+ * @param {IParams} context 上下文
97
94
  * @param {ControlVO} data 数据
98
95
  * @returns {*}
99
96
  */
100
97
  async create(
101
- context: IContext,
98
+ context: IParams,
102
99
  data: ControlVO,
103
100
  ): Promise<IHttpResponse<ControlVO>> {
104
101
  let res = await this.exec(
@@ -115,12 +112,12 @@ export class MDControlService<
115
112
  *
116
113
  * @author lxm
117
114
  * @date 2022-09-07 19:09:11
118
- * @param {IContext} context 上下文
115
+ * @param {IParams} context 上下文
119
116
  * @param {ControlVO} data 数据
120
117
  * @returns {*}
121
118
  */
122
119
  async update(
123
- context: IContext,
120
+ context: IParams,
124
121
  data: ControlVO,
125
122
  ): Promise<IHttpResponse<ControlVO>> {
126
123
  let res = await this.exec(
@@ -138,13 +135,13 @@ export class MDControlService<
138
135
  * @author lxm
139
136
  * @date 2022-11-25 14:11:09
140
137
  * @param {IPSDEDataExport} dataExport 导出模型
141
- * @param {IContext} context 上下文
138
+ * @param {IParams} context 上下文
142
139
  * @param {IParams} [params={}] 请求参数
143
140
  * @returns {*} {Promise<IHttpResponse>}
144
141
  */
145
142
  async exportData(
146
143
  dataExport: IPSDEDataExport,
147
- context: IContext,
144
+ context: IParams,
148
145
  params: IParams = {},
149
146
  ): Promise<IHttpResponse<Blob>> {
150
147
  return this.entityService.file.exportData(
@@ -22,12 +22,12 @@ export class SearchFormService<
22
22
  *
23
23
  * @author lxm
24
24
  * @date 2022-08-31 17:08:41
25
- * @param {IContext} context 上下文
25
+ * @param {IParams} context 上下文
26
26
  * @param {IParams} [params={}] 视图参数
27
27
  * @returns {*} {Promise<IHttpResponse>}
28
28
  */
29
29
  async getDraft(
30
- _context: IContext,
30
+ _context: IParams,
31
31
  _params: IParams = {},
32
32
  ): Promise<IHttpResponse<ControlVO>> {
33
33
  // let res = await this.exec(this.model.getDraftAction, context, params);
@@ -4,7 +4,7 @@ import {
4
4
  TreeNodeRSModel,
5
5
  TreeStaticNodeModel,
6
6
  } from '@ibiz-template/model';
7
- import { convertNavData } from '../../../utils';
7
+ import { calcNavParams } from '../../../utils';
8
8
  import { ITreeNodeData } from '../../interface/i-tree-node-data/i-tree-node-data';
9
9
  import { TreeDataSetNodeData, TreeStaticNodeData } from '../../vo';
10
10
  import { MDControlService } from './md-control-service';
@@ -20,10 +20,10 @@ export interface TreeFetchOpts {
20
20
  /**
21
21
  * 上下文
22
22
  *
23
- * @type {IContext}
23
+ * @type {IParams}
24
24
  * @memberof TreeFetchOpts
25
25
  */
26
- context: IContext;
26
+ context: IParams;
27
27
  /**
28
28
  * 视图参数
29
29
  *
@@ -150,9 +150,15 @@ export class TreeService extends MDControlService<TreeModel> {
150
150
  nodeRS: TreeNodeRSModel,
151
151
  parentNodeData: ITreeNodeData | undefined,
152
152
  opts: TreeFetchOpts,
153
- ): { context: IContext; params: IParams } {
153
+ ): { context: IParams; params: IParams } {
154
154
  // 处理父值过滤项
155
- const { parentValueLevel, navContexts, navParams, pickupDEFName } = nodeRS;
155
+ const {
156
+ parentValueLevel,
157
+ navContexts,
158
+ navParams,
159
+ parentFilter: navFilter,
160
+ pickupDEFName,
161
+ } = nodeRS;
156
162
 
157
163
  const params = { ...opts.params };
158
164
 
@@ -163,29 +169,31 @@ export class TreeService extends MDControlService<TreeModel> {
163
169
  };
164
170
 
165
171
  // 计算关系过滤用到的实体数据
166
- let data: IData = {};
172
+ let datum: IDatum = {};
167
173
  let parentData: ITreeNodeData | undefined;
174
+ // 根据父值级别查找父数据
168
175
  if (parentNodeData) {
169
- // 根据父值级别查找父数据
170
176
  parentData = parentNodeData;
171
177
  for (let index = 1; index < parentValueLevel; index++) {
172
178
  parentData = parentData?.parent;
173
179
  }
174
- if (parentData?.deData) {
175
- data = parentData.deData;
176
- }
177
180
  }
178
-
179
- // 处理父值关系过滤参数
180
- if (parentData && pickupDEFName) {
181
- params[`n_${pickupDEFName}_eq`] = parentData.value;
181
+ let derValue;
182
+ let deName;
183
+ if (parentData) {
184
+ datum = parentData.deData || {};
185
+ const parentNodeModel = this.model.getNodeById(parentData.nodeId);
186
+ deName = (parentNodeModel as TreeDataSetNodeModel).appEntity?.deName;
187
+ derValue = parentData.value;
182
188
  }
183
189
 
184
- // 处理自定义关系过滤参数
185
- const tempContext = convertNavData(navContexts, context, params, data);
186
- const tempParams = convertNavData(navParams, context, params, data);
187
- Object.assign(context, tempContext);
188
- Object.assign(params, tempParams);
190
+ // 导航相关参数处理
191
+ const { resultContext, resultParams } = calcNavParams(
192
+ { deName, navFilter, pickupDEFName, navParams, navContexts },
193
+ { derValue, context, params, datum },
194
+ );
195
+ Object.assign(context, resultContext);
196
+ Object.assign(params, resultParams);
189
197
 
190
198
  return { context, params };
191
199
  }
@@ -21,12 +21,12 @@ export class WizardPanelService<
21
21
  *
22
22
  * @author lxm
23
23
  * @date 2022-08-31 17:08:41
24
- * @param {IContext} context 上下文
24
+ * @param {IParams} context 上下文
25
25
  * @param {IParams} [params={}] 视图参数
26
26
  * @returns {*} {Promise<IHttpResponse>}
27
27
  */
28
28
  async initialize(
29
- context: IContext,
29
+ context: IParams,
30
30
  data: IData = {},
31
31
  params: IParams = {},
32
32
  ): Promise<IHttpResponse<IData>> {
@@ -40,12 +40,12 @@ export class WizardPanelService<
40
40
  *
41
41
  * @author lxm
42
42
  * @date 2022-08-31 17:08:41
43
- * @param {IContext} context 上下文
43
+ * @param {IParams} context 上下文
44
44
  * @param {IParams} [params={}] 视图参数
45
45
  * @returns {*} {Promise<IHttpResponse>}
46
46
  */
47
47
  async finish(
48
- context: IContext,
48
+ context: IParams,
49
49
  data: IData = {},
50
50
  params: IParams = {},
51
51
  ): Promise<IHttpResponse<IData>> {
@@ -54,10 +54,10 @@ export class WorkFlowService {
54
54
  *
55
55
  * @author lxm
56
56
  * @date 2022-09-29 14:09:45
57
- * @param {IContext} context
57
+ * @param {IParams} context
58
58
  * @returns {*} {Promise<IHttpResponse<IData>>}
59
59
  */
60
- async getWFStep(context: IContext): Promise<IHttpResponse<IData>> {
60
+ async getWFStep(context: IParams): Promise<IHttpResponse<IData>> {
61
61
  const { processDefinitionKey, taskDefinitionKey } = context;
62
62
  return this.app.net.get(
63
63
  `${this.getBaseUrl()}/process-definitions/${processDefinitionKey}/usertasks/${taskDefinitionKey}`,
@@ -69,12 +69,12 @@ export class WorkFlowService {
69
69
  *
70
70
  * @author lxm
71
71
  * @date 2022-09-29 14:09:52
72
- * @param {IContext} context 路径参数
72
+ * @param {IParams} context 路径参数
73
73
  * @param {IData} data 数据
74
74
  * @returns {*} {Promise<IHttpResponse<IData>>}
75
75
  */
76
76
  async getWFLink(
77
- context: IContext,
77
+ context: IParams,
78
78
  data: IData,
79
79
  ): Promise<IHttpResponse<IData[]>> {
80
80
  const deKeyValue = context[this.model.deName];
@@ -90,10 +90,10 @@ export class WorkFlowService {
90
90
  *
91
91
  * @author lxm
92
92
  * @date 2022-09-29 14:09:45
93
- * @param {IContext} context
93
+ * @param {IParams} context
94
94
  * @returns {*} {Promise<IHttpResponse<IData>>}
95
95
  */
96
- async getWFHistory(context: IContext): Promise<IHttpResponse<IData>> {
96
+ async getWFHistory(context: IParams): Promise<IHttpResponse<IData>> {
97
97
  const deKeyValue = context[this.model.deName];
98
98
  return this.app.net.get(
99
99
  `${this.getBaseUrl()}/${deKeyValue}/process-instances/alls/history`,
@@ -105,10 +105,10 @@ export class WorkFlowService {
105
105
  *
106
106
  * @author lxm
107
107
  * @date 2022-10-27 16:10:13
108
- * @param {IContext} context
108
+ * @param {IParams} context
109
109
  * @returns {*} {Promise<IHttpResponse<IData>>}
110
110
  */
111
- async getWFProcessDiagram(context: IContext): Promise<IHttpResponse<IData>> {
111
+ async getWFProcessDiagram(context: IParams): Promise<IHttpResponse<IData>> {
112
112
  const deKeyValue = context[this.model.deName];
113
113
  return this.app.net.request(
114
114
  `${this.getBaseUrl()}/${deKeyValue}/process-instances/alls/processdiagram`,
@@ -136,13 +136,13 @@ export class WorkFlowService {
136
136
  *
137
137
  * @author lxm
138
138
  * @date 2022-09-30 17:09:51
139
- * @param {IContext} context 路径参数
139
+ * @param {IParams} context 路径参数
140
140
  * @param {IParams} params 请求参数
141
141
  * @param {IData} data 数据
142
142
  * @returns {*} {Promise<IHttpResponse<IData>>}
143
143
  */
144
144
  async wfStart(
145
- context: IContext,
145
+ context: IParams,
146
146
  params: IParams,
147
147
  data: IData,
148
148
  ): Promise<IHttpResponse<IData>> {
@@ -160,13 +160,13 @@ export class WorkFlowService {
160
160
  *
161
161
  * @author lxm
162
162
  * @date 2022-09-30 17:09:51
163
- * @param {IContext} context 路径参数
163
+ * @param {IParams} context 路径参数
164
164
  * @param {IParams} params 请求参数
165
165
  * @param {IData} data 数据
166
166
  * @returns {*} {Promise<IHttpResponse<IData>>}
167
167
  */
168
168
  async wfSubmit(
169
- context: IContext,
169
+ context: IParams,
170
170
  params: IParams,
171
171
  data: IData,
172
172
  ): Promise<IHttpResponse<IData>> {
@@ -186,13 +186,13 @@ export class WorkFlowService {
186
186
  *
187
187
  * @author lxm
188
188
  * @date 2022-09-30 17:09:51
189
- * @param {IContext} context 路径参数
189
+ * @param {IParams} context 路径参数
190
190
  * @param {IParams} params 请求参数
191
191
  * @param {IData} data 数据
192
192
  * @returns {*} {Promise<IHttpResponse<IData>>}
193
193
  */
194
194
  async wfWithdraw(
195
- context: IContext,
195
+ context: IParams,
196
196
  params: IParams,
197
197
  data: IData,
198
198
  ): Promise<IHttpResponse<IData>> {
@@ -213,14 +213,14 @@ export class WorkFlowService {
213
213
  * @author lxm
214
214
  * @date 2022-09-30 17:09:38
215
215
  * @param {string} methodName 接口名称
216
- * @param {IContext} context 路径参数
216
+ * @param {IParams} context 路径参数
217
217
  * @param {IParams} [params={}] 查询参数
218
218
  * @param {IData} [data={}] 主数据数据
219
219
  * @returns {*} {Promise<IHttpResponse<IData>>}
220
220
  */
221
221
  async exec(
222
222
  methodName: string,
223
- context: IContext,
223
+ context: IParams,
224
224
  params: IParams = {},
225
225
  data: IData = {},
226
226
  ): Promise<IHttpResponse<IData>> {
@@ -68,7 +68,7 @@ export class ServiceUtil {
68
68
  * @author chitanda
69
69
  * @date 2022-12-23 10:12:24
70
70
  * @param {string} entityCodeName 实体标识
71
- * @param {IContext} [context] 上下文,用于计算模型所属沙箱环境
71
+ * @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
72
72
  * @return {*} {Promise<EntityService>}
73
73
  */
74
74
  async getService(entityCodeName: string): Promise<EntityService> {
@@ -95,9 +95,9 @@ export class ServiceUtil {
95
95
  * @description 根据 srfsessionid 作为临时数据域
96
96
  * @author chitanda
97
97
  * @date 2022-08-18 14:08:48
98
- * @param {IContext} context
98
+ * @param {IParams} context
99
99
  */
100
- clearTempCache(context: IContext): void {
100
+ clearTempCache(context: IParams): void {
101
101
  this.cache.forEach(service => {
102
102
  service.local.clear(context);
103
103
  });
@@ -1,3 +1,4 @@
1
+ import { IBizContext } from '@ibiz-template/core';
1
2
  import {
2
3
  DefectModelError,
3
4
  IPSAppCounter,
@@ -41,7 +42,7 @@ export class AppCounter {
41
42
  return this.destroyed;
42
43
  }
43
44
 
44
- protected context: IContext = {};
45
+ protected context: IParams = IBizContext.create();
45
46
 
46
47
  protected params: IParams = {};
47
48
 
@@ -73,10 +74,10 @@ export class AppCounter {
73
74
  *
74
75
  * @author chitanda
75
76
  * @date 2022-10-26 19:10:24
76
- * @param {IContext} [context]
77
+ * @param {IParams} [context]
77
78
  * @param {IParams} [params]
78
79
  */
79
- async init(context?: IContext, params?: IParams) {
80
+ async init(context?: IParams, params?: IParams) {
80
81
  this.setParams(context, params);
81
82
  this.entity = this.model.getPSAppDataEntity()!;
82
83
  await this.entity.fill(true);
@@ -96,10 +97,10 @@ export class AppCounter {
96
97
  * @author chitanda
97
98
  * @date 2022-10-26 19:10:58
98
99
  * @protected
99
- * @param {IContext} [context]
100
+ * @param {IParams} [context]
100
101
  * @param {IParams} [params]
101
102
  */
102
- protected setParams(context?: IContext, params?: IParams): void {
103
+ protected setParams(context?: IParams, params?: IParams): void {
103
104
  if (context) {
104
105
  this.context = clone(context);
105
106
  }
@@ -161,11 +162,11 @@ export class AppCounter {
161
162
  *
162
163
  * @author chitanda
163
164
  * @date 2022-10-26 19:10:46
164
- * @param {IContext} [context]
165
+ * @param {IParams} [context]
165
166
  * @param {IParams} [params]
166
167
  * @return {*} {Promise<IData>}
167
168
  */
168
- refresh(context?: IContext, params?: IParams): Promise<IData> {
169
+ refresh(context?: IParams, params?: IParams): Promise<IData> {
169
170
  this.setParams(context, params);
170
171
  return this.load();
171
172
  }
@@ -216,6 +217,7 @@ export class AppCounter {
216
217
  */
217
218
  destroy(): void {
218
219
  this.destroyed = true;
220
+ this.context.destroy();
219
221
  this.destroyInterval();
220
222
  this.evt.reset();
221
223
  }
@@ -195,12 +195,12 @@ export class DynamicCodeListCache {
195
195
  * @author lxm
196
196
  * @date 2022-08-26 14:08:08
197
197
  * @protected
198
- * @param {IContext} [context={}]
198
+ * @param {IParams} [context={}]
199
199
  * @param {IParams} [params={}]
200
200
  * @returns {*} {Promise<CodeListItem[]>}
201
201
  */
202
202
  protected async load(
203
- context: IContext = {},
203
+ context: IParams = {},
204
204
  params: IParams = {},
205
205
  ): Promise<CodeListItem[]> {
206
206
  // *预定义加载
@@ -236,12 +236,12 @@ export class DynamicCodeListCache {
236
236
  *
237
237
  * @author lxm
238
238
  * @date 2022-08-26 14:08:44
239
- * @param {IContext} [context={}]
239
+ * @param {IParams} [context={}]
240
240
  * @param {IParams} [params={}]
241
241
  * @returns {*} {Promise<IData[]>}
242
242
  */
243
243
  async get(
244
- context: IContext = {},
244
+ context: IParams = {},
245
245
  params: IParams = {},
246
246
  ): Promise<CodeListItem[]> {
247
247
  // 初始化还未完成时被调用
@@ -29,10 +29,10 @@ export class EntityCache {
29
29
  *
30
30
  * @author chitanda
31
31
  * @date 2022-05-10 17:05:45
32
- * @param {IContext} context
32
+ * @param {IParams} context
33
33
  * @param {Entity} entity
34
34
  */
35
- forceAdd(context: IContext, entity: Entity): void {
35
+ forceAdd(context: IParams, entity: Entity): void {
36
36
  const map = this.getCacheByTag(context);
37
37
  const data = map.get(entity.srfkey!);
38
38
  if (data) {
@@ -46,10 +46,10 @@ export class EntityCache {
46
46
  *
47
47
  * @author chitanda
48
48
  * @date 2022-05-10 17:05:27
49
- * @param {IContext} context
49
+ * @param {IParams} context
50
50
  * @param {Entity} entity
51
51
  */
52
- forceUpdate(context: IContext, entity: Entity): void {
52
+ forceUpdate(context: IParams, entity: Entity): void {
53
53
  const map = this.getCacheByTag(context);
54
54
  map.set(entity.srfkey!, clone(entity));
55
55
  ibiz.log.warn('forceUpdate', entity.srfkey, entity);
@@ -60,10 +60,10 @@ export class EntityCache {
60
60
  *
61
61
  * @author chitanda
62
62
  * @date 2022-05-10 17:05:08
63
- * @param {IContext} context
63
+ * @param {IParams} context
64
64
  * @param {string} srfKey
65
65
  */
66
- forceDelete(context: IContext, srfKey: string): void {
66
+ forceDelete(context: IParams, srfKey: string): void {
67
67
  const map = this.getCacheByTag(context);
68
68
  map.delete(srfKey);
69
69
  ibiz.log.warn('forceDelete', srfKey);
@@ -77,7 +77,7 @@ export class EntityCache {
77
77
  * @return {*} {boolean}
78
78
  * @memberof EntityCache
79
79
  */
80
- add(context: IContext, entity: Entity): Entity | null {
80
+ add(context: IParams, entity: Entity): Entity | null {
81
81
  try {
82
82
  isExistSessionId('add', context);
83
83
  if (isNil(entity.srfkey) || isEmpty(entity.srfkey)) {
@@ -102,7 +102,7 @@ export class EntityCache {
102
102
  * @return {*} {Entity}
103
103
  * @memberof EntityCache
104
104
  */
105
- get(context: IContext, srfKey: string): Entity | null {
105
+ get(context: IParams, srfKey: string): Entity | null {
106
106
  try {
107
107
  isExistSessionId('get', context);
108
108
  const map = this.getCacheByTag(context);
@@ -118,12 +118,12 @@ export class EntityCache {
118
118
  /**
119
119
  * 更新数据
120
120
  *
121
- * @param {IContext} context
121
+ * @param {IParams} context
122
122
  * @param {Entity} entity
123
123
  * @return {*} {Entity}
124
124
  * @memberof EntityCache
125
125
  */
126
- update(context: IContext, entity: Entity): Entity | null {
126
+ update(context: IParams, entity: Entity): Entity | null {
127
127
  try {
128
128
  isExistSessionId('update', context);
129
129
  isExistSrfKey('update', entity);
@@ -146,12 +146,12 @@ export class EntityCache {
146
146
  /**
147
147
  * 删除数据
148
148
  *
149
- * @param {IContext} context
149
+ * @param {IParams} context
150
150
  * @param {string} srfKey
151
151
  * @return {*} {(Entity | null)}
152
152
  * @memberof EntityCache
153
153
  */
154
- delete(context: IContext, srfKey: string): Entity | null {
154
+ delete(context: IParams, srfKey: string): Entity | null {
155
155
  try {
156
156
  isExistSessionId('delete', context);
157
157
  const map = this.getCacheByTag(context);
@@ -175,11 +175,11 @@ export class EntityCache {
175
175
  *
176
176
  * @author chitanda
177
177
  * @date 2022-03-23 11:03:52
178
- * @param {IContext} context
178
+ * @param {IParams} context
179
179
  * @param {Entity[]} entities
180
180
  * @return {*} {Entity[]}
181
181
  */
182
- createBatch(context: IContext, entities: Entity[]): Entity[] {
182
+ createBatch(context: IParams, entities: Entity[]): Entity[] {
183
183
  try {
184
184
  isExistSessionId('add', context);
185
185
  const map = this.getCacheByTag(context);
@@ -206,11 +206,11 @@ export class EntityCache {
206
206
  *
207
207
  * @author chitanda
208
208
  * @date 2022-03-23 10:03:17
209
- * @param {IContext} context
209
+ * @param {IParams} context
210
210
  * @param {Entity[]} entities
211
211
  * @return {*} {Entity[]}
212
212
  */
213
- updateBatch(context: IContext, entities: Entity[]): Entity[] {
213
+ updateBatch(context: IParams, entities: Entity[]): Entity[] {
214
214
  try {
215
215
  isExistSessionId('update', context);
216
216
  const map = this.getCacheByTag(context);
@@ -242,11 +242,11 @@ export class EntityCache {
242
242
  *
243
243
  * @author chitanda
244
244
  * @date 2022-03-23 10:03:40
245
- * @param {IContext} context 上下文
245
+ * @param {IParams} context 上下文
246
246
  * @param {string[]} srfKeys 需要删除的数据主键
247
247
  * @return {*} {string[]} 未能删除的数据主键
248
248
  */
249
- deleteBatch(context: IContext, srfKeys: string[]): string[] {
249
+ deleteBatch(context: IParams, srfKeys: string[]): string[] {
250
250
  try {
251
251
  isExistSessionId('delete', context);
252
252
  } catch (err) {
@@ -279,11 +279,11 @@ export class EntityCache {
279
279
  *
280
280
  * @author chitanda
281
281
  * @date 2022-08-17 23:08:06
282
- * @param {IContext} context
282
+ * @param {IParams} context
283
283
  * @param {string} srfkey
284
284
  * @return {*} {boolean}
285
285
  */
286
- checkData(context: IContext, srfkey: string): boolean {
286
+ checkData(context: IParams, srfkey: string): boolean {
287
287
  const list = this.getList(context);
288
288
  const i = list.findIndex(item => item.srfkey === srfkey);
289
289
  return i !== -1;
@@ -294,10 +294,10 @@ export class EntityCache {
294
294
  *
295
295
  * @author chitanda
296
296
  * @date 2022-08-17 23:08:56
297
- * @param {IContext} context
297
+ * @param {IParams} context
298
298
  * @return {*} {Entity[]}
299
299
  */
300
- getList(context: IContext): Entity[] {
300
+ getList(context: IParams): Entity[] {
301
301
  try {
302
302
  isExistSessionId('getList', context);
303
303
  const map = this.getCacheByTag(context);
@@ -341,9 +341,9 @@ export class EntityCache {
341
341
  *
342
342
  * @author chitanda
343
343
  * @date 2022-08-17 23:08:54
344
- * @param {IContext} context
344
+ * @param {IParams} context
345
345
  */
346
- clear(context: IContext): void {
346
+ clear(context: IParams): void {
347
347
  const tag: string = context.srfsessionid;
348
348
  if (this.cacheMap.size > 0) {
349
349
  this.cacheMap.delete(tag);
@@ -356,10 +356,10 @@ export class EntityCache {
356
356
  * @author chitanda
357
357
  * @date 2022-08-17 23:08:47
358
358
  * @private
359
- * @param {IContext} context
359
+ * @param {IParams} context
360
360
  * @return {*} {Map<string, Entity>}
361
361
  */
362
- private getCacheByTag(context: IContext): Map<string, Entity> {
362
+ private getCacheByTag(context: IParams): Map<string, Entity> {
363
363
  const tag: string = context.srfsessionid;
364
364
  if (!this.cacheMap.has(tag)) {
365
365
  this.cacheMap.set(tag, new Map());
@@ -6,12 +6,12 @@ import { ServicePathItem } from '../service-path-util/service-path-util';
6
6
  * @author lxm
7
7
  * @date 2022-11-25 13:11:53
8
8
  * @export
9
- * @param {IContext} context 上下文对象
9
+ * @param {IParams} context 上下文对象
10
10
  * @param {ServicePathItem[][]} pathItems 计算出的资源关系路径
11
11
  * @returns {*} {string}
12
12
  */
13
13
  export function calcResPath(
14
- context: IContext,
14
+ context: IParams,
15
15
  pathItems: ServicePathItem[][],
16
16
  ): string {
17
17
  let paths: string[][] = [];
@@ -27,12 +27,12 @@ export const excludeViewTypes: string[] = [
27
27
  * @author chitanda
28
28
  * @date 2023-01-10 14:01:51
29
29
  * @export
30
- * @param {IContext} context
30
+ * @param {IParams} context
31
31
  * @param {ServicePathItem[][]} pathItems
32
32
  * @return {*} {Record<string, unknown>}
33
33
  */
34
34
  export function calcRouteContext(
35
- context: IContext,
35
+ context: IParams,
36
36
  pathItems: ServicePathItem[][],
37
37
  appView?: IPSAppView,
38
38
  ): Record<string, unknown> {