@ibiz-template/runtime 0.4.16 → 0.4.17-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 (355) hide show
  1. package/dist/index.esm.js +1483 -919
  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/control/md-control.controller.d.ts.map +1 -1
  10. package/out/controller/common/control/md-control.controller.js +7 -2
  11. package/out/controller/common/view/view.controller.d.ts.map +1 -1
  12. package/out/controller/common/view/view.controller.js +9 -3
  13. package/out/controller/common/view/wf-step-trace-view.controller.d.ts.map +1 -1
  14. package/out/controller/common/view/wf-step-trace-view.controller.js +3 -2
  15. package/out/controller/control/calendar/calendar.service.d.ts +3 -3
  16. package/out/controller/control/calendar/calendar.service.d.ts.map +1 -1
  17. package/out/controller/control/calendar/calendar.service.js +2 -2
  18. package/out/controller/control/form/edit-form/edit-form.service.d.ts +18 -18
  19. package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
  20. package/out/controller/control/form/edit-form/edit-form.service.js +11 -11
  21. package/out/controller/control/form/form/form.service.d.ts +2 -2
  22. package/out/controller/control/form/form/form.service.d.ts.map +1 -1
  23. package/out/controller/control/form/form/form.service.js +1 -1
  24. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
  25. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +2 -6
  26. package/out/controller/control/form/search-form/search-form.service.d.ts +2 -2
  27. package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
  28. package/out/controller/control/form/search-form/search-form.service.js +1 -1
  29. package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
  30. package/out/controller/control/gantt/gantt.controller.js +1 -0
  31. package/out/controller/control/grid/grid/grid-column.controller.d.ts +2 -1
  32. package/out/controller/control/grid/grid/grid-column.controller.d.ts.map +1 -1
  33. package/out/controller/control/grid/grid/grid.controller.d.ts +17 -1
  34. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  35. package/out/controller/control/grid/grid/grid.controller.js +33 -1
  36. package/out/controller/control/grid/grid/grid.service.d.ts +2 -2
  37. package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
  38. package/out/controller/control/grid/grid/grid.service.js +2 -2
  39. package/out/controller/control/kanban/kanban.service.d.ts +2 -2
  40. package/out/controller/control/kanban/kanban.service.d.ts.map +1 -1
  41. package/out/controller/control/kanban/kanban.service.js +1 -1
  42. package/out/controller/control/map/map.service.d.ts +1 -1
  43. package/out/controller/control/map/map.service.js +1 -1
  44. package/out/controller/control/md-ctrl/md-ctrl.controller.js +1 -1
  45. package/out/controller/control/report-panel/report-panel.service.d.ts +2 -2
  46. package/out/controller/control/report-panel/report-panel.service.d.ts.map +1 -1
  47. package/out/controller/control/report-panel/report-panel.service.js +1 -1
  48. package/out/controller/control/search-bar/search-bar.controller.d.ts +59 -2
  49. package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
  50. package/out/controller/control/search-bar/search-bar.controller.js +142 -9
  51. package/out/controller/control/search-bar/search-bar.service.d.ts +78 -0
  52. package/out/controller/control/search-bar/search-bar.service.d.ts.map +1 -0
  53. package/out/controller/control/search-bar/search-bar.service.js +130 -0
  54. package/out/controller/control/tree/tree.controller.d.ts +27 -1
  55. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  56. package/out/controller/control/tree/tree.controller.js +45 -7
  57. package/out/controller/control/tree/tree.service.d.ts +3 -3
  58. package/out/controller/control/tree/tree.service.d.ts.map +1 -1
  59. package/out/controller/control/tree-grid-ex/index.d.ts +2 -0
  60. package/out/controller/control/tree-grid-ex/index.d.ts.map +1 -1
  61. package/out/controller/control/tree-grid-ex/index.js +2 -0
  62. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts +4 -0
  63. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts.map +1 -0
  64. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.js +3 -0
  65. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts +93 -0
  66. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts.map +1 -0
  67. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.js +89 -0
  68. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts +13 -0
  69. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts.map +1 -0
  70. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.js +11 -0
  71. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts +31 -0
  72. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts.map +1 -0
  73. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +61 -0
  74. package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts +26 -0
  75. package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts.map +1 -0
  76. package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.js +26 -0
  77. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts +48 -46
  78. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
  79. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +85 -114
  80. package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts +8 -58
  81. package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts.map +1 -1
  82. package/out/controller/control/tree-grid-ex/tree-grid-ex.service.js +5 -135
  83. package/out/controller/control/wizard-panel/wizard-panel.service.d.ts +4 -4
  84. package/out/controller/control/wizard-panel/wizard-panel.service.d.ts.map +1 -1
  85. package/out/controller/control/wizard-panel/wizard-panel.service.js +2 -2
  86. package/out/controller/utils/value-default/value-default.d.ts +1 -1
  87. package/out/controller/utils/value-default/value-default.d.ts.map +1 -1
  88. package/out/de-logic/de-logic-context.d.ts +5 -5
  89. package/out/de-logic/de-logic-context.d.ts.map +1 -1
  90. package/out/de-logic/de-logic-context.js +1 -1
  91. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts +2 -2
  92. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts.map +1 -1
  93. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.js +1 -1
  94. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts +2 -2
  95. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts.map +1 -1
  96. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.js +1 -1
  97. package/out/de-logic/de-logic-link/de-logic-link.d.ts +1 -1
  98. package/out/de-logic/de-logic-link/de-logic-link.js +1 -1
  99. package/out/de-logic/de-logic-node/de-logic-node.d.ts +1 -1
  100. package/out/de-logic/de-logic-param/de-logic-param.d.ts +1 -1
  101. package/out/de-logic/de-logic-param/de-logic-param.js +1 -1
  102. package/out/de-logic/de-logic.d.ts +3 -3
  103. package/out/de-logic/de-logic.d.ts.map +1 -1
  104. package/out/de-logic/de-logic.js +2 -2
  105. package/out/de-logic/index.d.ts +8 -8
  106. package/out/de-logic/index.d.ts.map +1 -1
  107. package/out/de-logic/index.js +5 -5
  108. package/out/install.d.ts.map +1 -1
  109. package/out/install.js +3 -0
  110. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +8 -0
  111. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  112. package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts +1 -1
  113. package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts.map +1 -1
  114. package/out/interface/controller/controller/control/i-grid.controller.d.ts +8 -0
  115. package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
  116. package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts +7 -7
  117. package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts.map +1 -1
  118. package/out/interface/controller/controller/control/i-tree.controller.d.ts +1 -1
  119. package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
  120. package/out/interface/controller/controller/control/index.d.ts +1 -0
  121. package/out/interface/controller/controller/control/index.d.ts.map +1 -1
  122. package/out/interface/controller/controller/control/index.js +1 -0
  123. package/out/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.d.ts +12 -0
  124. package/out/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.d.ts.map +1 -0
  125. package/out/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.js +1 -0
  126. package/out/interface/controller/controller/control/tree-grid-ex-column/index.d.ts +2 -0
  127. package/out/interface/controller/controller/control/tree-grid-ex-column/index.d.ts.map +1 -0
  128. package/out/interface/controller/controller/control/tree-grid-ex-column/index.js +1 -0
  129. package/out/interface/controller/controller/i.controller.d.ts +8 -0
  130. package/out/interface/controller/controller/i.controller.d.ts.map +1 -1
  131. package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts +2 -2
  132. package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts.map +1 -1
  133. package/out/interface/controller/state/control/i-search-bar.state.d.ts +64 -0
  134. package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
  135. package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts +31 -23
  136. package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts.map +1 -1
  137. package/out/interface/controller/state/control/i-tree.state.d.ts +8 -1
  138. package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
  139. package/out/interface/provider/i-de-method.provider.d.ts +10 -1
  140. package/out/interface/provider/i-de-method.provider.d.ts.map +1 -1
  141. package/out/interface/provider/i-grid-column.provider.d.ts +2 -2
  142. package/out/interface/provider/i-grid-column.provider.d.ts.map +1 -1
  143. package/out/interface/provider/i-tree-grid-ex-column.provider.d.ts +31 -0
  144. package/out/interface/provider/i-tree-grid-ex-column.provider.d.ts.map +1 -0
  145. package/out/interface/provider/i-tree-grid-ex-column.provider.js +1 -0
  146. package/out/interface/provider/index.d.ts +1 -0
  147. package/out/interface/provider/index.d.ts.map +1 -1
  148. package/out/interface/service/service/i-app-de.service.d.ts +58 -42
  149. package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
  150. package/out/interface/service/service/i-file.service.d.ts +2 -2
  151. package/out/interface/service/service/i-file.service.d.ts.map +1 -1
  152. package/out/interface/service/service/i-wf.service.d.ts +12 -12
  153. package/out/interface/service/service/i-wf.service.d.ts.map +1 -1
  154. package/out/register/helper/grid-column-register.d.ts +2 -2
  155. package/out/register/helper/grid-column-register.d.ts.map +1 -1
  156. package/out/register/helper/grid-column-register.js +0 -14
  157. package/out/register/helper/index.d.ts +1 -0
  158. package/out/register/helper/index.d.ts.map +1 -1
  159. package/out/register/helper/index.js +1 -0
  160. package/out/register/helper/tree-grid-ex-column-register.d.ts +23 -0
  161. package/out/register/helper/tree-grid-ex-column-register.d.ts.map +1 -0
  162. package/out/register/helper/tree-grid-ex-column-register.js +50 -0
  163. package/out/service/de-service-util.d.ts +27 -13
  164. package/out/service/de-service-util.d.ts.map +1 -1
  165. package/out/service/de-service-util.js +56 -26
  166. package/out/service/dto/method.dto.d.ts +21 -10
  167. package/out/service/dto/method.dto.d.ts.map +1 -1
  168. package/out/service/dto/method.dto.js +36 -19
  169. package/out/service/service/authority/authority.service.d.ts +1 -1
  170. package/out/service/service/authority/authority.service.js +1 -1
  171. package/out/service/service/code-list/code-list.service.d.ts +3 -3
  172. package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
  173. package/out/service/service/code-list/code-list.service.js +2 -2
  174. package/out/service/service/control/control.service.d.ts +2 -2
  175. package/out/service/service/control/control.service.d.ts.map +1 -1
  176. package/out/service/service/control/control.service.js +1 -1
  177. package/out/service/service/control/md-control.service.d.ts +13 -13
  178. package/out/service/service/control/md-control.service.d.ts.map +1 -1
  179. package/out/service/service/control/md-control.service.js +7 -7
  180. package/out/service/service/counter/counter.service.d.ts +3 -3
  181. package/out/service/service/counter/counter.service.d.ts.map +1 -1
  182. package/out/service/service/counter/counter.service.js +1 -1
  183. package/out/service/service/entity/de.service.d.ts +56 -28
  184. package/out/service/service/entity/de.service.d.ts.map +1 -1
  185. package/out/service/service/entity/de.service.js +57 -72
  186. package/out/service/service/entity/method/de-action.d.ts +23 -33
  187. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  188. package/out/service/service/entity/method/de-action.js +18 -35
  189. package/out/service/service/entity/method/fetch.d.ts +3 -4
  190. package/out/service/service/entity/method/fetch.d.ts.map +1 -1
  191. package/out/service/service/entity/method/fetch.js +3 -8
  192. package/out/service/service/entity/method/method-input.d.ts +10 -5
  193. package/out/service/service/entity/method/method-input.d.ts.map +1 -1
  194. package/out/service/service/entity/method/method-input.js +9 -8
  195. package/out/service/service/entity/method/method-renturn.d.ts +10 -7
  196. package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
  197. package/out/service/service/entity/method/method-renturn.js +9 -9
  198. package/out/service/service/entity/method/method.d.ts +11 -27
  199. package/out/service/service/entity/method/method.d.ts.map +1 -1
  200. package/out/service/service/entity/method/method.js +10 -33
  201. package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts +2 -2
  202. package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts.map +1 -1
  203. package/out/service/service/entity/method/provider/de-action-de-method.provider.js +2 -2
  204. package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts +2 -2
  205. package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts.map +1 -1
  206. package/out/service/service/entity/method/provider/fetch-de-method.provider.js +3 -3
  207. package/out/service/service/file/file.service.d.ts +2 -2
  208. package/out/service/service/file/file.service.d.ts.map +1 -1
  209. package/out/service/service/file/file.service.js +1 -1
  210. package/out/service/service/work-flow/work-flow.service.d.ts +28 -28
  211. package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
  212. package/out/service/service/work-flow/work-flow.service.js +15 -15
  213. package/out/service/utils/app-counter/app-counter.d.ts +7 -7
  214. package/out/service/utils/app-counter/app-counter.d.ts.map +1 -1
  215. package/out/service/utils/app-counter/app-counter.js +3 -3
  216. package/out/service/utils/app-counter/app-de-counter.d.ts +2 -2
  217. package/out/service/utils/app-counter/app-de-counter.d.ts.map +1 -1
  218. package/out/service/utils/app-counter/app-de-counter.js +1 -1
  219. package/out/service/utils/de-cache/de-cache.d.ts +44 -39
  220. package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
  221. package/out/service/utils/de-cache/de-cache.js +115 -75
  222. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +2 -2
  223. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
  224. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +2 -2
  225. package/out/service/utils/res-path/res-path.d.ts +4 -4
  226. package/out/service/utils/res-path/res-path.d.ts.map +1 -1
  227. package/out/service/utils/res-path/res-path.js +2 -2
  228. package/out/service/utils/search-filter/search-filter.d.ts +2 -2
  229. package/out/service/utils/search-filter/search-filter.d.ts.map +1 -1
  230. package/out/service/utils/service-exist-util/service-exist-util.d.ts +2 -2
  231. package/out/service/utils/service-exist-util/service-exist-util.d.ts.map +1 -1
  232. package/out/service/utils/service-exist-util/service-exist-util.js +1 -1
  233. package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
  234. package/out/service/vo/tree-node-data/tree-data-set-node-data.js +51 -0
  235. package/out/service/vo/tree-node-data/tree-node-data.d.ts +2 -0
  236. package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
  237. package/out/service/vo/tree-node-data/tree-node-data.js +1 -0
  238. package/out/types.d.ts +9 -0
  239. package/out/types.d.ts.map +1 -1
  240. package/out/ui-logic/ui-logic-param/ui-logic-param.js +1 -1
  241. package/out/utils/index.d.ts +2 -0
  242. package/out/utils/index.d.ts.map +1 -1
  243. package/out/utils/index.js +2 -0
  244. package/out/utils/nav-params/calc-nav-params.d.ts +2 -2
  245. package/out/utils/nav-params/calc-nav-params.d.ts.map +1 -1
  246. package/out/utils/nav-params/calc-nav-params.js +1 -1
  247. package/out/utils/open-redirect-view/open-redirect-view.js +1 -1
  248. package/out/utils/ui-domain/ui-domain.d.ts +35 -0
  249. package/out/utils/ui-domain/ui-domain.d.ts.map +1 -0
  250. package/out/utils/ui-domain/ui-domain.js +42 -0
  251. package/out/utils/ui-domain-manager/ui-domain-manager.d.ts +47 -0
  252. package/out/utils/ui-domain-manager/ui-domain-manager.d.ts.map +1 -0
  253. package/out/utils/ui-domain-manager/ui-domain-manager.js +62 -0
  254. package/package.json +3 -3
  255. package/src/app-hub.ts +14 -0
  256. package/src/controller/common/base.controller.ts +3 -0
  257. package/src/controller/common/control/md-control.controller.ts +7 -2
  258. package/src/controller/common/view/view.controller.ts +9 -3
  259. package/src/controller/common/view/wf-step-trace-view.controller.ts +4 -2
  260. package/src/controller/control/calendar/calendar.service.ts +4 -4
  261. package/src/controller/control/form/edit-form/edit-form.service.ts +23 -18
  262. package/src/controller/control/form/form/form.service.ts +2 -2
  263. package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +2 -6
  264. package/src/controller/control/form/search-form/search-form.service.ts +2 -2
  265. package/src/controller/control/gantt/gantt.controller.ts +2 -1
  266. package/src/controller/control/grid/grid/grid-column.controller.ts +4 -1
  267. package/src/controller/control/grid/grid/grid.controller.ts +35 -0
  268. package/src/controller/control/grid/grid/grid.service.ts +3 -2
  269. package/src/controller/control/kanban/kanban.service.ts +2 -2
  270. package/src/controller/control/map/map.service.ts +1 -1
  271. package/src/controller/control/md-ctrl/md-ctrl.controller.ts +1 -1
  272. package/src/controller/control/report-panel/report-panel.service.ts +2 -2
  273. package/src/controller/control/search-bar/search-bar.controller.ts +178 -10
  274. package/src/controller/control/search-bar/search-bar.service.ts +161 -0
  275. package/src/controller/control/tree/tree.controller.ts +58 -11
  276. package/src/controller/control/tree/tree.service.ts +5 -3
  277. package/src/controller/control/tree-grid-ex/index.ts +2 -0
  278. package/src/controller/control/tree-grid-ex/tree-grid-ex-column/index.ts +3 -0
  279. package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts +121 -0
  280. package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts +13 -0
  281. package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts +76 -0
  282. package/src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts +37 -0
  283. package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +115 -138
  284. package/src/controller/control/tree-grid-ex/tree-grid-ex.service.ts +10 -165
  285. package/src/controller/control/wizard-panel/wizard-panel.service.ts +4 -4
  286. package/src/controller/utils/value-default/value-default.ts +1 -1
  287. package/src/de-logic/de-logic-context.ts +5 -5
  288. package/src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts +2 -2
  289. package/src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts +2 -2
  290. package/src/de-logic/de-logic-link/de-logic-link.ts +1 -1
  291. package/src/de-logic/de-logic-node/de-logic-node.ts +1 -1
  292. package/src/de-logic/de-logic-param/de-logic-param.ts +1 -1
  293. package/src/de-logic/de-logic.ts +3 -3
  294. package/src/de-logic/index.ts +10 -10
  295. package/src/install.ts +3 -0
  296. package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +9 -0
  297. package/src/interface/common/i-data-ability-params/i-data-ability-params.ts +1 -1
  298. package/src/interface/controller/controller/control/i-grid.controller.ts +9 -0
  299. package/src/interface/controller/controller/control/i-tree-grid-ex.controller.ts +11 -12
  300. package/src/interface/controller/controller/control/i-tree.controller.ts +5 -2
  301. package/src/interface/controller/controller/control/index.ts +1 -0
  302. package/src/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.ts +12 -0
  303. package/src/interface/controller/controller/control/tree-grid-ex-column/index.ts +1 -0
  304. package/src/interface/controller/controller/i.controller.ts +9 -0
  305. package/src/interface/controller/event/control/i-tree-grid-ex.event.ts +2 -2
  306. package/src/interface/controller/state/control/i-search-bar.state.ts +73 -0
  307. package/src/interface/controller/state/control/i-tree-grid-ex.state.ts +27 -24
  308. package/src/interface/controller/state/control/i-tree.state.ts +9 -1
  309. package/src/interface/provider/i-de-method.provider.ts +10 -0
  310. package/src/interface/provider/i-grid-column.provider.ts +2 -7
  311. package/src/interface/provider/i-tree-grid-ex-column.provider.ts +39 -0
  312. package/src/interface/provider/index.ts +1 -0
  313. package/src/interface/service/service/i-app-de.service.ts +63 -43
  314. package/src/interface/service/service/i-file.service.ts +2 -2
  315. package/src/interface/service/service/i-wf.service.ts +12 -12
  316. package/src/register/helper/grid-column-register.ts +2 -17
  317. package/src/register/helper/index.ts +1 -0
  318. package/src/register/helper/tree-grid-ex-column-register.ts +67 -0
  319. package/src/service/de-service-util.ts +63 -29
  320. package/src/service/dto/method.dto.ts +42 -23
  321. package/src/service/service/authority/authority.service.ts +1 -1
  322. package/src/service/service/code-list/code-list.service.ts +3 -3
  323. package/src/service/service/control/control.service.ts +2 -2
  324. package/src/service/service/control/md-control.service.ts +16 -13
  325. package/src/service/service/counter/counter.service.ts +3 -3
  326. package/src/service/service/entity/de.service.ts +83 -90
  327. package/src/service/service/entity/method/de-action.ts +29 -47
  328. package/src/service/service/entity/method/fetch.ts +5 -11
  329. package/src/service/service/entity/method/method-input.ts +10 -9
  330. package/src/service/service/entity/method/method-renturn.ts +10 -11
  331. package/src/service/service/entity/method/method.ts +13 -48
  332. package/src/service/service/entity/method/provider/de-action-de-method.provider.ts +4 -2
  333. package/src/service/service/entity/method/provider/fetch-de-method.provider.ts +4 -2
  334. package/src/service/service/file/file.service.ts +2 -2
  335. package/src/service/service/work-flow/work-flow.service.ts +30 -30
  336. package/src/service/utils/app-counter/app-counter.ts +7 -7
  337. package/src/service/utils/app-counter/app-de-counter.ts +2 -2
  338. package/src/service/utils/de-cache/de-cache.ts +124 -85
  339. package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +2 -5
  340. package/src/service/utils/res-path/res-path.ts +4 -4
  341. package/src/service/utils/search-filter/search-filter.ts +2 -2
  342. package/src/service/utils/service-exist-util/service-exist-util.ts +2 -2
  343. package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +53 -0
  344. package/src/service/vo/tree-node-data/tree-node-data.ts +6 -0
  345. package/src/types.ts +10 -0
  346. package/src/ui-logic/ui-logic-param/ui-logic-param.ts +1 -1
  347. package/src/utils/index.ts +2 -0
  348. package/src/utils/nav-params/calc-nav-params.ts +2 -2
  349. package/src/utils/open-redirect-view/open-redirect-view.ts +1 -1
  350. package/src/utils/ui-domain/ui-domain.ts +52 -0
  351. package/src/utils/ui-domain-manager/ui-domain-manager.ts +64 -0
  352. package/out/service/service/entity/util/util.d.ts +0 -13
  353. package/out/service/service/entity/util/util.d.ts.map +0 -1
  354. package/out/service/service/entity/util/util.js +0 -14
  355. package/src/service/service/entity/util/util.ts +0 -18
package/dist/index.esm.js CHANGED
@@ -1113,7 +1113,7 @@ async function openDERedirectView(appView, context, params = {}, opts = {}) {
1113
1113
  context[key] = curData[key] || context[key] || params[key];
1114
1114
  const actionId = appView.getDataAppDEActionId;
1115
1115
  const app = ibiz.hub.getApp(appView.appId);
1116
- const service = await app.deService.getService(entityId);
1116
+ const service = await app.deService.getService(context, entityId);
1117
1117
  ibiz.loading.showRedirect();
1118
1118
  try {
1119
1119
  const res = await service.exec(actionId || "get", context, params);
@@ -2697,6 +2697,96 @@ var ThemeUtil = class {
2697
2697
  }
2698
2698
  };
2699
2699
 
2700
+ // src/utils/ui-domain/ui-domain.ts
2701
+ import { createUUID } from "qx-util";
2702
+ var UIDomain = class {
2703
+ /**
2704
+ * Creates an instance of UIDomain.
2705
+ *
2706
+ * @author chitanda
2707
+ * @date 2023-12-22 16:12:03
2708
+ * @param {string} appId
2709
+ * @param {string} [id]
2710
+ */
2711
+ constructor(id) {
2712
+ if (id) {
2713
+ this.id = id;
2714
+ } else {
2715
+ this.id = createUUID();
2716
+ }
2717
+ }
2718
+ /**
2719
+ * 界面域销毁
2720
+ *
2721
+ * @author chitanda
2722
+ * @date 2023-12-22 15:12:49
2723
+ */
2724
+ destroy() {
2725
+ const apps = ibiz.hub.getAllApps();
2726
+ apps.forEach((app) => {
2727
+ app.deService.reset({
2728
+ srfappid: app.appId,
2729
+ srfsessionid: this.id
2730
+ });
2731
+ });
2732
+ }
2733
+ };
2734
+
2735
+ // src/utils/ui-domain-manager/ui-domain-manager.ts
2736
+ var UIDomainManager = class {
2737
+ constructor() {
2738
+ /**
2739
+ * 界面域实例缓存
2740
+ *
2741
+ * @author chitanda
2742
+ * @date 2023-12-22 15:12:53
2743
+ * @protected
2744
+ * @type {Map<string, UIDomain>}
2745
+ */
2746
+ this.domainMap = /* @__PURE__ */ new Map();
2747
+ }
2748
+ /**
2749
+ * 创建域
2750
+ *
2751
+ * @author chitanda
2752
+ * @date 2023-12-22 16:12:44
2753
+ * @param {string} [id] 可选,不传则自动生成
2754
+ * @return {*} {UIDomain}
2755
+ */
2756
+ create(id) {
2757
+ const domain = new UIDomain(id);
2758
+ this.domainMap.set(domain.id, domain);
2759
+ return domain;
2760
+ }
2761
+ /**
2762
+ * 获取域
2763
+ *
2764
+ * @author chitanda
2765
+ * @date 2023-12-22 15:12:17
2766
+ * @param {string} id
2767
+ * @return {*} {UIDomain}
2768
+ */
2769
+ get(id) {
2770
+ if (this.domainMap.has(id)) {
2771
+ return this.domainMap.get(id);
2772
+ }
2773
+ throw new Error("\u65E0\u6548\u7684\u754C\u9762\u57DF\u6807\u8BC6[".concat(id, "]"));
2774
+ }
2775
+ /**
2776
+ * 销毁域
2777
+ *
2778
+ * @author chitanda
2779
+ * @date 2023-12-22 15:12:03
2780
+ * @param {string} id
2781
+ */
2782
+ destroy(id) {
2783
+ if (this.domainMap.has(id)) {
2784
+ this.domainMap.get(id).destroy();
2785
+ this.domainMap.delete(id);
2786
+ }
2787
+ }
2788
+ };
2789
+
2700
2790
  // src/utils/raw-value-util/raw-value-util.ts
2701
2791
  var RawValueUtil = class {
2702
2792
  /**
@@ -3340,7 +3430,6 @@ function getProvider5(key) {
3340
3430
  async function getGridColumnProvider(model) {
3341
3431
  let provider;
3342
3432
  const { columnType, enableRowEdit, sysPFPluginId, appId } = model;
3343
- const { renderSysPFPluginId } = model;
3344
3433
  if (sysPFPluginId) {
3345
3434
  const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
3346
3435
  if (pluginKey) {
@@ -3352,17 +3441,6 @@ async function getGridColumnProvider(model) {
3352
3441
  return provider;
3353
3442
  }
3354
3443
  }
3355
- if (renderSysPFPluginId) {
3356
- const pluginKey = await getPluginRegisterKey(renderSysPFPluginId, appId);
3357
- if (pluginKey) {
3358
- provider = getProvider5(pluginKey);
3359
- }
3360
- if (!provider) {
3361
- ibiz.log.error("\u627E\u4E0D\u5230\u6811\u8868\u683C\u5217\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3362
- } else {
3363
- return provider;
3364
- }
3365
- }
3366
3444
  const key = enableRowEdit ? "".concat(columnType, "_EDIT") : columnType;
3367
3445
  provider = getProvider5(key);
3368
3446
  if (!provider) {
@@ -3726,6 +3804,41 @@ async function getDEMethodProvider(model) {
3726
3804
  }
3727
3805
  }
3728
3806
 
3807
+ // src/register/helper/tree-grid-ex-column-register.ts
3808
+ var TREEGRIDEX_COLUMN_PROVIDER_PREFIX = "TREEGRIDEX_COLUMN";
3809
+ function registerTreeGridExColumnProvider(key, callback) {
3810
+ ibiz.register.register(
3811
+ "".concat(TREEGRIDEX_COLUMN_PROVIDER_PREFIX, "_").concat(key),
3812
+ callback
3813
+ );
3814
+ }
3815
+ function getProvider13(key) {
3816
+ return ibiz.register.get(
3817
+ "".concat(TREEGRIDEX_COLUMN_PROVIDER_PREFIX, "_").concat(key)
3818
+ );
3819
+ }
3820
+ async function getTreeGridExColumnProvider(model) {
3821
+ let provider;
3822
+ const { columnType, appId, renderSysPFPluginId } = model;
3823
+ if (renderSysPFPluginId) {
3824
+ const pluginKey = await getPluginRegisterKey(renderSysPFPluginId, appId);
3825
+ if (pluginKey) {
3826
+ provider = getProvider13(pluginKey);
3827
+ }
3828
+ if (!provider) {
3829
+ ibiz.log.error("\u627E\u4E0D\u5230\u6811\u8868\u683C\u5217\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3830
+ } else {
3831
+ return provider;
3832
+ }
3833
+ }
3834
+ provider = getProvider13(columnType);
3835
+ if (!provider) {
3836
+ ibiz.log.error("\u627E\u4E0D\u5230\u8868\u683C\u5217\u7C7B\u578B".concat(columnType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3837
+ } else {
3838
+ return provider;
3839
+ }
3840
+ }
3841
+
3729
3842
  // src/service/utils/app-counter/app-counter.ts
3730
3843
  import { IBizContext, RuntimeError as RuntimeError11 } from "@ibiz-template/core";
3731
3844
  import { notNilEmpty as notNilEmpty5, QXEvent } from "qx-util";
@@ -3770,7 +3883,7 @@ var AppCounter = class {
3770
3883
  *
3771
3884
  * @author chitanda
3772
3885
  * @date 2022-10-26 19:10:24
3773
- * @param {IParams} [context]
3886
+ * @param {IContext} [context]
3774
3887
  * @param {IParams} [params]
3775
3888
  */
3776
3889
  async init(context, params) {
@@ -3784,7 +3897,7 @@ var AppCounter = class {
3784
3897
  * @author chitanda
3785
3898
  * @date 2022-10-26 19:10:58
3786
3899
  * @protected
3787
- * @param {IParams} [context]
3900
+ * @param {IContext} [context]
3788
3901
  * @param {IParams} [params]
3789
3902
  */
3790
3903
  setParams(context, params) {
@@ -3839,7 +3952,7 @@ var AppCounter = class {
3839
3952
  *
3840
3953
  * @author chitanda
3841
3954
  * @date 2022-10-26 19:10:46
3842
- * @param {IParams} [context]
3955
+ * @param {IContext} [context]
3843
3956
  * @param {IParams} [params]
3844
3957
  * @return {*} {Promise<IData>}
3845
3958
  */
@@ -3904,7 +4017,7 @@ var AppDECounter = class extends AppCounter {
3904
4017
  *
3905
4018
  * @author chitanda
3906
4019
  * @date 2022-10-26 19:10:24
3907
- * @param {IParams} [context]
4020
+ * @param {IContext} [context]
3908
4021
  * @param {IParams} [params]
3909
4022
  */
3910
4023
  async init(context, params) {
@@ -4142,7 +4255,7 @@ var DynamicCodeListCache = class {
4142
4255
  * @param {IParams} [params={}]
4143
4256
  * @returns {*} {Promise<CodeListItem[]>}
4144
4257
  */
4145
- async load(context = {}, params = {}) {
4258
+ async load(context, params = {}) {
4146
4259
  const app = ibiz.hub.getApp(context.srfappid);
4147
4260
  const {
4148
4261
  appDataEntityId,
@@ -4236,7 +4349,7 @@ var DynamicCodeListCache = class {
4236
4349
  * @param {IParams} [params={}]
4237
4350
  * @returns {*} {Promise<IData[]>}
4238
4351
  */
4239
- async get(context = {}, params = {}) {
4352
+ async get(context, params = {}) {
4240
4353
  if (this.initPromise) {
4241
4354
  await this.initPromise;
4242
4355
  }
@@ -4268,7 +4381,7 @@ var DynamicCodeListCache = class {
4268
4381
 
4269
4382
  // src/service/utils/de-cache/de-cache.ts
4270
4383
  import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
4271
- import { createUUID } from "qx-util";
4384
+ import { ascSort, createUUID as createUUID2 } from "qx-util";
4272
4385
  import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
4273
4386
 
4274
4387
  // src/service/utils/service-exist-util/service-exist-util.ts
@@ -4293,6 +4406,13 @@ function isExistSessionId(funcName, context) {
4293
4406
 
4294
4407
  // src/service/utils/de-cache/de-cache.ts
4295
4408
  var DECache = class {
4409
+ /**
4410
+ * Creates an instance of DECache.
4411
+ *
4412
+ * @author chitanda
4413
+ * @date 2023-12-22 13:12:40
4414
+ * @param {IAppDataEntity} entity 应用实体模型
4415
+ */
4296
4416
  constructor(entity) {
4297
4417
  this.entity = entity;
4298
4418
  /**
@@ -4300,7 +4420,7 @@ var DECache = class {
4300
4420
  *
4301
4421
  * @author chitanda
4302
4422
  * @date 2022-08-17 23:08:08
4303
- * @type {Map<string, Map<string, IDataEntity>>}
4423
+ * @type {Map<string, IDataEntity>}
4304
4424
  */
4305
4425
  this.cacheMap = /* @__PURE__ */ new Map();
4306
4426
  }
@@ -4321,12 +4441,11 @@ var DECache = class {
4321
4441
  *
4322
4442
  * @author chitanda
4323
4443
  * @date 2022-05-10 17:05:45
4324
- * @param {IParams} context
4444
+ * @param {IContext} context
4325
4445
  * @param {IDataEntity} entity
4326
4446
  */
4327
- forceAdd(context, entity) {
4328
- const map = this.getCacheByTag(context);
4329
- const data = map.get(entity.srfkey);
4447
+ forceAdd(_context, entity) {
4448
+ const data = this.cacheMap.get(entity.srfkey);
4330
4449
  if (data) {
4331
4450
  data.assign(entity);
4332
4451
  ibiz.log.warn("forceAdd", entity.srfkey, entity);
@@ -4337,12 +4456,11 @@ var DECache = class {
4337
4456
  *
4338
4457
  * @author chitanda
4339
4458
  * @date 2022-05-10 17:05:27
4340
- * @param {IParams} context
4459
+ * @param {IContext} context
4341
4460
  * @param {IDataEntity} entity
4342
4461
  */
4343
- forceUpdate(context, entity) {
4344
- const map = this.getCacheByTag(context);
4345
- map.set(entity.srfkey, clone4(entity));
4462
+ forceUpdate(_context, entity) {
4463
+ this.cacheMap.set(entity.srfkey, clone4(entity));
4346
4464
  ibiz.log.warn("forceUpdate", entity.srfkey, entity);
4347
4465
  }
4348
4466
  /**
@@ -4350,12 +4468,11 @@ var DECache = class {
4350
4468
  *
4351
4469
  * @author chitanda
4352
4470
  * @date 2022-05-10 17:05:08
4353
- * @param {IParams} context
4471
+ * @param {IContext} context
4354
4472
  * @param {string} srfKey
4355
4473
  */
4356
- forceDelete(context, srfKey) {
4357
- const map = this.getCacheByTag(context);
4358
- map.delete(srfKey);
4474
+ forceDelete(_context, srfKey) {
4475
+ this.cacheMap.delete(srfKey);
4359
4476
  ibiz.log.warn("forceDelete", srfKey);
4360
4477
  }
4361
4478
  /**
@@ -4378,11 +4495,10 @@ var DECache = class {
4378
4495
  try {
4379
4496
  isExistSessionId("add", context);
4380
4497
  if (isNil5(entity.srfkey) || isEmpty5(entity.srfkey)) {
4381
- entity.srfkey = createUUID();
4498
+ entity.srfkey = createUUID2();
4382
4499
  }
4383
4500
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4384
- const map = this.getCacheByTag(context);
4385
- map.set(entity.srfkey, clone4(entity));
4501
+ this.cacheMap.set(entity.srfkey, clone4(entity));
4386
4502
  ibiz.log.warn("add", entity.srfkey, entity);
4387
4503
  return entity;
4388
4504
  } catch (err) {
@@ -4401,8 +4517,7 @@ var DECache = class {
4401
4517
  get(context, srfKey) {
4402
4518
  try {
4403
4519
  isExistSessionId("get", context);
4404
- const map = this.getCacheByTag(context);
4405
- const data = map.get(srfKey);
4520
+ const data = this.cacheMap.get(srfKey);
4406
4521
  ibiz.log.warn("get", srfKey, data);
4407
4522
  return clone4(data);
4408
4523
  } catch (err) {
@@ -4413,7 +4528,7 @@ var DECache = class {
4413
4528
  /**
4414
4529
  * 更新数据
4415
4530
  *
4416
- * @param {IParams} context
4531
+ * @param {IContext} context
4417
4532
  * @param {IDataEntity} entity
4418
4533
  * @return {*} {IDataEntity}
4419
4534
  * @memberof EntityCache
@@ -4432,11 +4547,10 @@ var DECache = class {
4432
4547
  isExistSessionId("update", context);
4433
4548
  isExistSrfKey("update", entity);
4434
4549
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4435
- const map = this.getCacheByTag(context);
4436
- const data = map.get(oldKey);
4550
+ const data = this.cacheMap.get(oldKey);
4437
4551
  if (data) {
4438
4552
  data.assign(entity);
4439
- map.set(oldKey, data);
4553
+ this.cacheMap.set(oldKey, data);
4440
4554
  ibiz.log.warn("update", oldKey, entity);
4441
4555
  return clone4(data);
4442
4556
  }
@@ -4449,7 +4563,7 @@ var DECache = class {
4449
4563
  /**
4450
4564
  * 删除数据
4451
4565
  *
4452
- * @param {IParams} context
4566
+ * @param {IContext} context
4453
4567
  * @param {string} srfKey
4454
4568
  * @return {*} {(IDataEntity | null)}
4455
4569
  * @memberof EntityCache
@@ -4457,12 +4571,11 @@ var DECache = class {
4457
4571
  delete(context, srfKey) {
4458
4572
  try {
4459
4573
  isExistSessionId("delete", context);
4460
- const map = this.getCacheByTag(context);
4461
4574
  const key = srfKey;
4462
- if (map.has(key)) {
4463
- const data = map.get(key);
4575
+ if (this.cacheMap.has(key)) {
4576
+ const data = this.cacheMap.get(key);
4464
4577
  data.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4465
- map.delete(key);
4578
+ this.cacheMap.delete(key);
4466
4579
  ibiz.log.warn("delete", key);
4467
4580
  return data;
4468
4581
  }
@@ -4477,22 +4590,21 @@ var DECache = class {
4477
4590
  *
4478
4591
  * @author chitanda
4479
4592
  * @date 2022-03-23 11:03:52
4480
- * @param {IParams} context
4593
+ * @param {IContext} context
4481
4594
  * @param {IDataEntity[]} entities
4482
4595
  * @return {*} {IDataEntity[]}
4483
4596
  */
4484
4597
  createBatch(context, entities) {
4485
4598
  try {
4486
4599
  isExistSessionId("add", context);
4487
- const map = this.getCacheByTag(context);
4488
4600
  for (let i = 0; i < entities.length; i++) {
4489
4601
  const entity = entities[i];
4490
4602
  if (isNil5(entity.srfkey) || isEmpty5(entity.srfkey)) {
4491
- entity.srfkey = createUUID();
4603
+ entity.srfkey = createUUID2();
4492
4604
  }
4493
4605
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4494
4606
  const data = clone4(entity);
4495
- map.set(entity.srfkey, data);
4607
+ this.cacheMap.set(entity.srfkey, data);
4496
4608
  entities[i] = data;
4497
4609
  ibiz.log.warn("add", entity.srfkey, entity);
4498
4610
  }
@@ -4507,22 +4619,21 @@ var DECache = class {
4507
4619
  *
4508
4620
  * @author chitanda
4509
4621
  * @date 2022-03-23 10:03:17
4510
- * @param {IParams} context
4622
+ * @param {IContext} context
4511
4623
  * @param {IDataEntity[]} entities
4512
4624
  * @return {*} {IDataEntity[]}
4513
4625
  */
4514
4626
  updateBatch(context, entities) {
4515
4627
  try {
4516
4628
  isExistSessionId("update", context);
4517
- const map = this.getCacheByTag(context);
4518
4629
  for (let i = 0; i < entities.length; i++) {
4519
4630
  const entity = entities[i];
4520
4631
  isExistSrfKey("update", entity);
4521
4632
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4522
- const data = map.get(entity.srfkey);
4633
+ const data = this.cacheMap.get(entity.srfkey);
4523
4634
  if (data) {
4524
4635
  data.assign(entity);
4525
- map.set(entity.srfkey, data);
4636
+ this.cacheMap.set(entity.srfkey, data);
4526
4637
  ibiz.log.warn("update", entity.srfkey, entity);
4527
4638
  entities[i] = clone4(data);
4528
4639
  } else {
@@ -4542,7 +4653,7 @@ var DECache = class {
4542
4653
  *
4543
4654
  * @author chitanda
4544
4655
  * @date 2022-03-23 10:03:40
4545
- * @param {IParams} context 上下文
4656
+ * @param {IContext} context 上下文
4546
4657
  * @param {string[]} srfKeys 需要删除的数据主键
4547
4658
  * @return {*} {string[]} 未能删除的数据主键
4548
4659
  */
@@ -4553,11 +4664,10 @@ var DECache = class {
4553
4664
  ibiz.log.error(err);
4554
4665
  return srfKeys;
4555
4666
  }
4556
- const map = this.getCacheByTag(context);
4557
4667
  const notRemoveKeys = [];
4558
4668
  for (let i = 0; i < srfKeys.length; i++) {
4559
4669
  const key = srfKeys[i];
4560
- if (!map.has(key)) {
4670
+ if (!this.cacheMap.has(key)) {
4561
4671
  notRemoveKeys.push(key);
4562
4672
  }
4563
4673
  }
@@ -4568,7 +4678,7 @@ var DECache = class {
4568
4678
  }
4569
4679
  for (let i = 0; i < srfKeys.length; i++) {
4570
4680
  const key = srfKeys[i];
4571
- map.delete(key);
4681
+ this.cacheMap.delete(key);
4572
4682
  ibiz.log.warn("delete", key);
4573
4683
  }
4574
4684
  return [];
@@ -4578,32 +4688,77 @@ var DECache = class {
4578
4688
  *
4579
4689
  * @author chitanda
4580
4690
  * @date 2022-08-17 23:08:06
4581
- * @param {IParams} context
4691
+ * @param {IContext} context
4582
4692
  * @param {string} srfkey
4583
4693
  * @return {*} {boolean}
4584
4694
  */
4585
- checkData(context, srfkey) {
4586
- const list = this.getList(context);
4587
- const i = list.findIndex((item) => item.srfkey === srfkey);
4588
- return i !== -1;
4695
+ checkData(_context, srfkey) {
4696
+ return !!this.cacheMap.get(srfkey);
4697
+ }
4698
+ /**
4699
+ * 获取当前已经缓存的数据
4700
+ *
4701
+ * @author chitanda
4702
+ * @date 2023-12-22 14:12:57
4703
+ * @return {*} {IDataEntity[]}
4704
+ */
4705
+ getList() {
4706
+ const values = this.cacheMap.values();
4707
+ return Array.from(values);
4589
4708
  }
4590
4709
  /**
4591
4710
  * 根据条件查找数据,未设置条件默认返回全部
4592
4711
  *
4593
4712
  * @author chitanda
4594
- * @date 2022-08-17 23:08:56
4595
- * @param {IParams} context
4713
+ * @date 2023-12-22 13:12:28
4714
+ * @param {IContext} context
4715
+ * @param {IParams} [params={}]
4596
4716
  * @return {*} {IDataEntity[]}
4597
4717
  */
4598
- getList(context) {
4718
+ select(context, params = {}) {
4599
4719
  try {
4600
4720
  isExistSessionId("getList", context);
4601
- const map = this.getCacheByTag(context);
4602
- if (!map) {
4603
- return [];
4721
+ const values = this.cacheMap.values();
4722
+ let items = Array.from(values);
4723
+ items = ascSort(items, "srfordervalue");
4724
+ const data = {};
4725
+ const nullData = {};
4726
+ const undefinedData = {};
4727
+ const emptyData = {};
4728
+ if (params.srfkey) {
4729
+ data.srfkey = equals(params.srfkey);
4730
+ delete params.srfkey;
4731
+ }
4732
+ for (const key in params) {
4733
+ if (Object.prototype.hasOwnProperty.call(params, key)) {
4734
+ const val = params[key];
4735
+ if (val == null) {
4736
+ nullData[key] = equals(null);
4737
+ undefinedData[key] = equals(void 0);
4738
+ emptyData[key] = equals("");
4739
+ } else {
4740
+ data[key] = equals(val);
4741
+ }
4742
+ }
4604
4743
  }
4605
- const values = map.values();
4606
- return Array.from(values);
4744
+ if (!isEmpty5(data)) {
4745
+ const pred = where(data);
4746
+ const nullPred = where(nullData);
4747
+ const undefinedPred = where(undefinedData);
4748
+ const emptyPred = where(emptyData);
4749
+ items = items.filter((obj) => {
4750
+ if (isEmpty5(nullData)) {
4751
+ if (pred(obj)) {
4752
+ return true;
4753
+ }
4754
+ } else if (pred(obj) && (nullPred(obj) || undefinedPred(obj) || emptyPred(obj))) {
4755
+ return true;
4756
+ }
4757
+ return false;
4758
+ });
4759
+ }
4760
+ const list = items.map((obj) => obj.clone());
4761
+ return list;
4607
4762
  } catch (err) {
4608
4763
  ibiz.log.error(err);
4609
4764
  return [];
@@ -4632,33 +4787,13 @@ var DECache = class {
4632
4787
  return where(data);
4633
4788
  }
4634
4789
  /**
4635
- * 清除缓存
4636
- *
4637
- * @author chitanda
4638
- * @date 2022-08-17 23:08:54
4639
- * @param {IParams} context
4640
- */
4641
- clear(context) {
4642
- const tag = context.srfsessionid;
4643
- if (this.cacheMap.size > 0) {
4644
- this.cacheMap.delete(tag);
4645
- }
4646
- }
4647
- /**
4648
- * 根据标识获取map组
4790
+ * 清空缓存
4649
4791
  *
4650
4792
  * @author chitanda
4651
- * @date 2022-08-17 23:08:47
4652
- * @private
4653
- * @param {IParams} context
4654
- * @return {*} {Map<string, IDataEntity>}
4793
+ * @date 2023-12-22 13:12:17
4655
4794
  */
4656
- getCacheByTag(context) {
4657
- const tag = context.srfsessionid;
4658
- if (!this.cacheMap.has(tag)) {
4659
- this.cacheMap.set(tag, /* @__PURE__ */ new Map());
4660
- }
4661
- return this.cacheMap.get(tag);
4795
+ clear() {
4796
+ this.cacheMap.clear();
4662
4797
  }
4663
4798
  /**
4664
4799
  * 根据联合键值计算主键并赋值
@@ -4957,7 +5092,7 @@ var CodeListService = class {
4957
5092
  * @param {IAppCodeList} codeList
4958
5093
  * @returns {*} {IData[]}
4959
5094
  */
4960
- async getDynamicCodeList(codeList, context = {}, params = {}) {
5095
+ async getDynamicCodeList(codeList, context, params = {}) {
4961
5096
  let dynamicCache;
4962
5097
  const codeName = codeList.codeName;
4963
5098
  if (this.cache.has(codeName)) {
@@ -4975,7 +5110,7 @@ var CodeListService = class {
4975
5110
  * @author chitanda
4976
5111
  * @date 2022-08-25 15:08:45
4977
5112
  * @param {string} tag
4978
- * @param {IParams} [context]
5113
+ * @param {IContext} [context]
4979
5114
  * @param {IParams} [params]
4980
5115
  * @return {*} {Promise<CodeListItem[]>}
4981
5116
  */
@@ -5078,7 +5213,7 @@ var CounterService = class {
5078
5213
  * @date 2022-10-26 20:10:20
5079
5214
  * @static
5080
5215
  * @param {IAppCounterRef} model
5081
- * @param {IParams} context
5216
+ * @param {IContext} context
5082
5217
  * @param {IParams} params
5083
5218
  * @return {*} {Promise<AppCounter>}
5084
5219
  */
@@ -5106,8 +5241,6 @@ import {
5106
5241
  ModelError as ModelError5,
5107
5242
  RuntimeError as RuntimeError16
5108
5243
  } from "@ibiz-template/core";
5109
- import { equals as equals2, isEmpty as isEmpty7, where as where2 } from "ramda";
5110
- import { ascSort } from "qx-util";
5111
5244
 
5112
5245
  // src/service/service/work-flow/work-flow.service.ts
5113
5246
  import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
@@ -5149,7 +5282,7 @@ var WorkFlowService = class {
5149
5282
  *
5150
5283
  * @private
5151
5284
  * @param {IData} data
5152
- * @param {IParams} context
5285
+ * @param {IContext} context
5153
5286
  * @returns {*}
5154
5287
  * @memberof WorkFlowService
5155
5288
  */
@@ -5165,7 +5298,7 @@ var WorkFlowService = class {
5165
5298
  * @author zk
5166
5299
  * @date 2023-11-06 06:11:07
5167
5300
  * @private
5168
- * @param {IParams} context
5301
+ * @param {IContext} context
5169
5302
  * @return {*} {string}
5170
5303
  * @memberof WorkFlowService
5171
5304
  */
@@ -5177,7 +5310,7 @@ var WorkFlowService = class {
5177
5310
  *
5178
5311
  * @author lxm
5179
5312
  * @date 2022-09-29 14:09:45
5180
- * @param {IParams} context
5313
+ * @param {IContext} context
5181
5314
  * @returns {*} {Promise<IHttpResponse<IData>>}
5182
5315
  */
5183
5316
  async getWFStep(context) {
@@ -5191,7 +5324,7 @@ var WorkFlowService = class {
5191
5324
  *
5192
5325
  * @author lxm
5193
5326
  * @date 2022-09-29 14:09:52
5194
- * @param {IParams} context 路径参数
5327
+ * @param {IContext} context 路径参数
5195
5328
  * @param {IData} data 数据
5196
5329
  * @returns {*} {Promise<IHttpResponse<IData>>}
5197
5330
  */
@@ -5208,7 +5341,7 @@ var WorkFlowService = class {
5208
5341
  *
5209
5342
  * @author lxm
5210
5343
  * @date 2022-09-29 14:09:45
5211
- * @param {IParams} context
5344
+ * @param {IContext} context
5212
5345
  * @returns {*} {Promise<IHttpResponse<IData>>}
5213
5346
  */
5214
5347
  async getWFHistory(context) {
@@ -5224,7 +5357,7 @@ var WorkFlowService = class {
5224
5357
  *
5225
5358
  * @author lxm
5226
5359
  * @date 2022-10-27 16:10:13
5227
- * @param {IParams} context
5360
+ * @param {IContext} context
5228
5361
  * @returns {*} {Promise<IHttpResponse<IData>>}
5229
5362
  */
5230
5363
  async getWFProcessDiagram(context) {
@@ -5255,7 +5388,7 @@ var WorkFlowService = class {
5255
5388
  *
5256
5389
  * @author lxm
5257
5390
  * @date 2022-09-30 17:09:51
5258
- * @param {IParams} context 路径参数
5391
+ * @param {IContext} context 路径参数
5259
5392
  * @param {IParams} params 请求参数
5260
5393
  * @param {IData} data 数据
5261
5394
  * @returns {*} {Promise<IHttpResponse<IData>>}
@@ -5274,7 +5407,7 @@ var WorkFlowService = class {
5274
5407
  *
5275
5408
  * @author lxm
5276
5409
  * @date 2022-09-30 17:09:51
5277
- * @param {IParams} context 路径参数
5410
+ * @param {IContext} context 路径参数
5278
5411
  * @param {IParams} params 请求参数
5279
5412
  * @param {IData} data 数据
5280
5413
  * @returns {*} {Promise<IHttpResponse<IData>>}
@@ -5293,7 +5426,7 @@ var WorkFlowService = class {
5293
5426
  *
5294
5427
  * @author lxm
5295
5428
  * @date 2022-09-30 17:09:51
5296
- * @param {IParams} context 路径参数
5429
+ * @param {IContext} context 路径参数
5297
5430
  * @param {IParams} params 请求参数
5298
5431
  * @param {IData} data 数据
5299
5432
  * @returns {*} {Promise<IHttpResponse<IData>>}
@@ -5312,7 +5445,7 @@ var WorkFlowService = class {
5312
5445
  *
5313
5446
  * @author lxm
5314
5447
  * @date 2022-09-30 17:09:51
5315
- * @param {IParams} context 路径参数
5448
+ * @param {IContext} context 路径参数
5316
5449
  * @param {IParams} params 请求参数
5317
5450
  * @param {IData} data 数据
5318
5451
  * @returns {*} {Promise<IHttpResponse<IData>>}
@@ -5331,7 +5464,7 @@ var WorkFlowService = class {
5331
5464
  *
5332
5465
  * @author lxm
5333
5466
  * @date 2022-09-30 17:09:51
5334
- * @param {IParams} context 路径参数
5467
+ * @param {IContext} context 路径参数
5335
5468
  * @param {IParams} params 请求参数
5336
5469
  * @param {IData} data 数据
5337
5470
  * @returns {*} {Promise<IHttpResponse<IData>>}
@@ -5350,7 +5483,7 @@ var WorkFlowService = class {
5350
5483
  *
5351
5484
  * @author lxm
5352
5485
  * @date 2022-09-30 17:09:51
5353
- * @param {IParams} context 路径参数
5486
+ * @param {IContext} context 路径参数
5354
5487
  * @param {IParams} params 请求参数
5355
5488
  * @param {IData} data 数据
5356
5489
  * @returns {*} {Promise<IHttpResponse<IData>>}
@@ -5369,7 +5502,7 @@ var WorkFlowService = class {
5369
5502
  *
5370
5503
  * @author lxm
5371
5504
  * @date 2022-09-30 17:09:51
5372
- * @param {IParams} context 路径参数
5505
+ * @param {IContext} context 路径参数
5373
5506
  * @param {IParams} params 请求参数
5374
5507
  * @param {IData} data 数据
5375
5508
  * @returns {*} {Promise<IHttpResponse<IData>>}
@@ -5388,7 +5521,7 @@ var WorkFlowService = class {
5388
5521
  *
5389
5522
  * @author lxm
5390
5523
  * @date 2022-09-30 17:09:51
5391
- * @param {IParams} context 路径参数
5524
+ * @param {IContext} context 路径参数
5392
5525
  * @param {IParams} params 请求参数
5393
5526
  * @param {IData} data 数据
5394
5527
  * @returns {*} {Promise<IHttpResponse<IData>>}
@@ -5408,7 +5541,7 @@ var WorkFlowService = class {
5408
5541
  * @author lxm
5409
5542
  * @date 2022-09-30 17:09:38
5410
5543
  * @param {string} methodName 接口名称
5411
- * @param {IParams} context 路径参数
5544
+ * @param {IContext} context 路径参数
5412
5545
  * @param {IParams} [params={}] 查询参数
5413
5546
  * @param {IData} [data={}] 主数据数据
5414
5547
  * @returns {*} {Promise<IHttpResponse<IData>>}
@@ -5454,7 +5587,7 @@ var FileService = class {
5454
5587
  * @date 2022-11-25 14:11:53
5455
5588
  * @param {IDEDataExport} dataExport 导出模型
5456
5589
  * @param {string} fetchAction 查询方法
5457
- * @param {IParams} context 上下文
5590
+ * @param {IContext} context 上下文
5458
5591
  * @param {IParams} params 请求参数
5459
5592
  * @returns {*} {Promise<IHttpResponse<Blob>>}
5460
5593
  */
@@ -5469,56 +5602,268 @@ var FileService = class {
5469
5602
  }
5470
5603
  };
5471
5604
 
5472
- // src/service/service/entity/de.service.ts
5473
- var DEService = class {
5605
+ // src/service/app-data-entity/app-data-entity.ts
5606
+ import { clone as clone5, isNil as isNil7 } from "ramda";
5607
+ import { DataTypes } from "@ibiz-template/core";
5608
+ import { createUUID as createUUID3 } from "qx-util";
5609
+
5610
+ // src/service/constant/srfuf.ts
5611
+ var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
5612
+ Srfuf2[Srfuf2["CREATE"] = 0] = "CREATE";
5613
+ Srfuf2[Srfuf2["UPDATE"] = 1] = "UPDATE";
5614
+ return Srfuf2;
5615
+ })(Srfuf || {});
5616
+
5617
+ // src/service/app-data-entity/app-data-entity.ts
5618
+ var AppDataEntity = class _AppDataEntity {
5619
+ get srfuf() {
5620
+ return this.srfkey === this.tempsrfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
5621
+ }
5474
5622
  /**
5475
- * Creates an instance of EntityService.
5623
+ * Creates an instance of AppDataEntity.
5476
5624
  *
5477
5625
  * @author chitanda
5478
- * @date 2022-08-24 18:08:44
5479
- * @param {IAppDataEntity} model 应用实体模型
5626
+ * @date 2023-11-16 15:11:08
5627
+ * @param {IAppDataEntity} entity
5628
+ * @param {(IData | AppDataEntity)} [data={}]
5480
5629
  */
5481
- constructor(model) {
5482
- this.model = model;
5483
- /**
5484
- * 请求方法实例
5485
- *
5486
- * @author chitanda
5487
- * @date 2022-10-10 12:10:13
5488
- * @protected
5489
- * @type {Map<string, Method>}
5490
- */
5491
- this.methodMap = /* @__PURE__ */ new Map();
5492
- this.local = new DECache(model);
5493
- this.configCache = new ConfigService(
5494
- model.appId,
5495
- "PSAppDataEntity",
5496
- model.codeName
5630
+ constructor(entity, data = {}) {
5631
+ Object.defineProperty(this, "_entity", {
5632
+ enumerable: false,
5633
+ configurable: true,
5634
+ value: entity
5635
+ });
5636
+ Object.defineProperty(this, "_data", {
5637
+ enumerable: false,
5638
+ configurable: true,
5639
+ value: data instanceof _AppDataEntity ? clone5(data._data) : clone5(data)
5640
+ });
5641
+ Object.defineProperty(this, "srfdeid", {
5642
+ get() {
5643
+ return entity.id;
5644
+ }
5645
+ });
5646
+ Object.defineProperty(this, "srfdecodename", {
5647
+ get() {
5648
+ return entity.codeName;
5649
+ }
5650
+ });
5651
+ const keyAppField = findModelChild(
5652
+ entity.appDEFields || [],
5653
+ entity.keyAppDEFieldId
5497
5654
  );
5498
- this.wf = new WorkFlowService(model);
5499
- this.file = new FileService(model);
5655
+ if (keyAppField) {
5656
+ const key = keyAppField.codeName.toLowerCase();
5657
+ Object.defineProperty(this, "srfkeyfield", {
5658
+ get() {
5659
+ return key;
5660
+ }
5661
+ });
5662
+ Object.defineProperty(this, "srfkey", {
5663
+ set(val) {
5664
+ this._data[key] = val;
5665
+ },
5666
+ get() {
5667
+ return this._data[key];
5668
+ }
5669
+ });
5670
+ } else {
5671
+ ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u952E\u5B57\u6BB5"));
5672
+ }
5673
+ const majorAppField = findModelChild(
5674
+ entity.appDEFields || [],
5675
+ entity.majorAppDEFieldId
5676
+ );
5677
+ if (majorAppField) {
5678
+ const major = majorAppField.codeName.toLowerCase();
5679
+ Object.defineProperty(this, "srfmajorfield", {
5680
+ get() {
5681
+ return major;
5682
+ }
5683
+ });
5684
+ Object.defineProperty(this, "srfmajortext", {
5685
+ set(val) {
5686
+ this._data[major] = val;
5687
+ },
5688
+ get() {
5689
+ return this._data[major];
5690
+ }
5691
+ });
5692
+ } else {
5693
+ ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u6587\u672C\u5B57\u6BB5"));
5694
+ }
5695
+ Object.defineProperty(this, "tempsrfkey", {
5696
+ enumerable: false,
5697
+ configurable: true,
5698
+ writable: true,
5699
+ value: isNil7(this.srfkey) ? createUUID3() : this.srfkey
5700
+ });
5701
+ this.defineProperties();
5500
5702
  }
5501
5703
  /**
5502
- * 获取实体服务方法实例
5704
+ * 代理实际数据
5503
5705
  *
5504
5706
  * @author chitanda
5505
- * @date 2023-10-12 17:10:10
5707
+ * @date 2022-10-11 22:10:55
5506
5708
  * @protected
5507
- * @param {string} id
5508
- * @param {boolean} [acMode=false]
5509
- * @return {*} {Method}
5510
5709
  */
5511
- async getMethod(id, acMode = false) {
5512
- const cacheId = acMode ? "ac-".concat(id) : id;
5513
- if (this.methodMap.has(cacheId)) {
5514
- return this.methodMap.get(cacheId);
5710
+ defineProperties() {
5711
+ var _a;
5712
+ const { _data, convertVal } = this;
5713
+ const properties = {};
5714
+ const keys = Object.keys(_data);
5715
+ keys.forEach((key) => {
5716
+ properties[key] = {
5717
+ enumerable: true,
5718
+ set(val) {
5719
+ _data[key] = val;
5720
+ },
5721
+ get() {
5722
+ return _data[key];
5723
+ }
5724
+ };
5725
+ });
5726
+ (_a = this._entity.appDEFields) == null ? void 0 : _a.forEach((field) => {
5727
+ const key = field.codeName.toLowerCase();
5728
+ properties[key] = {
5729
+ enumerable: true,
5730
+ set(val) {
5731
+ _data[key] = convertVal(val, field.stdDataType);
5732
+ },
5733
+ get() {
5734
+ return _data[key];
5735
+ }
5736
+ };
5737
+ _data[key] = convertVal(_data[key], field.stdDataType);
5738
+ });
5739
+ Object.defineProperties(this, properties);
5740
+ }
5741
+ /**
5742
+ * 克隆数据
5743
+ *
5744
+ * @author chitanda
5745
+ * @date 2022-10-11 00:10:15
5746
+ * @return {*} {AppDataEntity}
5747
+ */
5748
+ clone() {
5749
+ const entity = new _AppDataEntity(this._entity, this._data);
5750
+ entity.srfkey = this.srfkey;
5751
+ return entity;
5752
+ }
5753
+ /**
5754
+ * 合并参数
5755
+ *
5756
+ * @author chitanda
5757
+ * @date 2022-10-19 11:10:25
5758
+ * @param {(IData | AppDataEntity)} data
5759
+ * @return {*} {AppDataEntity}
5760
+ */
5761
+ assign(data) {
5762
+ let _data = {};
5763
+ if (data instanceof _AppDataEntity) {
5764
+ _data = data._data;
5765
+ } else {
5766
+ _data = data;
5767
+ }
5768
+ Object.keys(_data).forEach((key) => {
5769
+ if (_data[key] === void 0) {
5770
+ delete _data[key];
5771
+ }
5772
+ });
5773
+ Object.assign(this._data, _data);
5774
+ return this;
5775
+ }
5776
+ /**
5777
+ * 根据属性的数据类型转换值
5778
+ * @author lxm
5779
+ * @date 2023-09-25 03:37:28
5780
+ * @protected
5781
+ * @param {unknown} value
5782
+ * @param {(number | undefined)} dataType
5783
+ * @return {*} {unknown}
5784
+ */
5785
+ convertVal(value, dataType) {
5786
+ if (value == null) {
5787
+ return value;
5788
+ }
5789
+ if (isNil7(dataType)) {
5790
+ return value;
5791
+ }
5792
+ if (DataTypes.isNumber(dataType)) {
5793
+ const numVal = !isNil7(value) && value !== "" ? Number(value) : value;
5794
+ if (Number.isNaN(numVal)) {
5795
+ ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
5796
+ return value;
5797
+ }
5798
+ return numVal;
5799
+ }
5800
+ return value;
5801
+ }
5802
+ };
5803
+
5804
+ // src/service/service/entity/de.service.ts
5805
+ var DEService = class {
5806
+ /**
5807
+ * Creates an instance of DEService.
5808
+ *
5809
+ * @author chitanda
5810
+ * @date 2023-12-22 13:12:21
5811
+ * @param {string} srfSessionId 当前实体会话标识
5812
+ * @param {IAppDataEntity} model 实体模型
5813
+ */
5814
+ constructor(srfSessionId, model) {
5815
+ this.srfSessionId = srfSessionId;
5816
+ this.model = model;
5817
+ /**
5818
+ * 请求方法实例
5819
+ *
5820
+ * @author chitanda
5821
+ * @date 2022-10-10 12:10:13
5822
+ * @protected
5823
+ * @type {Map<string, Method>}
5824
+ */
5825
+ this.methodMap = /* @__PURE__ */ new Map();
5826
+ /**
5827
+ * 是否为本地模式(临时数据模式)服务
5828
+ *
5829
+ * @author chitanda
5830
+ * @date 2023-12-22 16:12:13
5831
+ * @type {boolean}
5832
+ */
5833
+ this.isLocalMode = false;
5834
+ this.local = new DECache(model);
5835
+ this.configCache = new ConfigService(
5836
+ model.appId,
5837
+ "PSAppDataEntity",
5838
+ model.codeName
5839
+ );
5840
+ this.wf = new WorkFlowService(model);
5841
+ this.file = new FileService(model);
5842
+ }
5843
+ /**
5844
+ * 获取实体服务方法实例
5845
+ *
5846
+ * @author chitanda
5847
+ * @date 2023-10-12 17:10:10
5848
+ * @protected
5849
+ * @param {string} id
5850
+ * @param {boolean} [acMode=false]
5851
+ * @return {*} {Method}
5852
+ */
5853
+ async getMethod(id, acMode = false) {
5854
+ const cacheId = acMode ? "ac-".concat(id) : id;
5855
+ if (this.methodMap.has(cacheId)) {
5856
+ return this.methodMap.get(cacheId);
5515
5857
  }
5516
5858
  const model = findModelChild(this.model.appDEMethods, id);
5517
5859
  const provider = await getDEMethodProvider(model);
5518
5860
  if (!provider) {
5519
5861
  throw new ModelError5(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
5520
5862
  }
5521
- const method = provider.create(this.model, model, { acMode });
5863
+ const method = provider.create(this, this.model, model, {
5864
+ acMode,
5865
+ localMode: this.isLocalMode
5866
+ });
5522
5867
  this.methodMap.set(cacheId, method);
5523
5868
  return method;
5524
5869
  }
@@ -5528,7 +5873,7 @@ var DEService = class {
5528
5873
  * @author chitanda
5529
5874
  * @date 2022-09-13 19:09:55
5530
5875
  * @param {string} id 执行服务方法标识
5531
- * @param {IParams} context
5876
+ * @param {IContext} context
5532
5877
  * @param {IData} [params={}] 请求参数
5533
5878
  * @param {IParams} [params2={}] 查询参数
5534
5879
  * @return {*} {Promise<IHttpResponse>}
@@ -5579,51 +5924,12 @@ var DEService = class {
5579
5924
  /**
5580
5925
  * 查询本地数据,根据属性
5581
5926
  *
5582
- * @param {IParams} context
5927
+ * @param {IContext} context
5583
5928
  * @param {IParams} params 根据多实体属性查找,例:{ name: '张三', age: 18, parent: null }
5584
5929
  * @return {*} {Promise<IDataEntity[]>}
5585
5930
  */
5586
5931
  async selectLocal(context, params = {}) {
5587
- let items = this.local.getList(context);
5588
- items = ascSort(items, "srfordervalue");
5589
- const data = {};
5590
- const nullData = {};
5591
- const undefinedData = {};
5592
- const emptyData = {};
5593
- if (params.srfkey) {
5594
- data.srfkey = equals2(params.srfkey);
5595
- delete params.srfkey;
5596
- }
5597
- for (const key in params) {
5598
- if (Object.prototype.hasOwnProperty.call(params, key)) {
5599
- const val = params[key];
5600
- if (val == null) {
5601
- nullData[key] = equals2(null);
5602
- undefinedData[key] = equals2(void 0);
5603
- emptyData[key] = equals2("");
5604
- } else {
5605
- data[key] = equals2(val);
5606
- }
5607
- }
5608
- }
5609
- if (!isEmpty7(data)) {
5610
- const pred = where2(data);
5611
- const nullPred = where2(nullData);
5612
- const undefinedPred = where2(undefinedData);
5613
- const emptyPred = where2(emptyData);
5614
- items = items.filter((obj) => {
5615
- if (isEmpty7(nullData)) {
5616
- if (pred(obj)) {
5617
- return true;
5618
- }
5619
- } else if (pred(obj) && (nullPred(obj) || undefinedPred(obj) || emptyPred(obj))) {
5620
- return true;
5621
- }
5622
- return false;
5623
- });
5624
- }
5625
- const list = items.map((obj) => obj.clone());
5626
- return list;
5932
+ return this.local.select(context, params);
5627
5933
  }
5628
5934
  /**
5629
5935
  * 执行服务方法 ac 模式
@@ -5631,7 +5937,7 @@ var DEService = class {
5631
5937
  * @author chitanda
5632
5938
  * @date 2022-09-13 19:09:55
5633
5939
  * @param {string} id 执行服务方法标识
5634
- * @param {IParams} context
5940
+ * @param {IContext} context
5635
5941
  * @param {IData} [params={}] 请求参数
5636
5942
  * @param {IParams} [params2={}] 查询参数
5637
5943
  * @return {*} {Promise<IHttpResponse>}
@@ -5649,7 +5955,7 @@ var DEService = class {
5649
5955
  * @author chitanda
5650
5956
  * @date 2023-10-16 16:10:16
5651
5957
  * @param {(data: IPortalAsyncAction) => void} onmessage
5652
- * @param {IParams} context
5958
+ * @param {IContext} context
5653
5959
  * @param {IParams} [params={}]
5654
5960
  * @param {IData} [data={}]
5655
5961
  * @return {*} {Promise<void>}
@@ -5687,7 +5993,7 @@ var DEService = class {
5687
5993
  *
5688
5994
  * @author chitanda
5689
5995
  * @date 2023-10-26 14:10:58
5690
- * @param {IParams} context
5996
+ * @param {IContext} context
5691
5997
  * @param {IParams} [params={}]
5692
5998
  * @param {IData} [data={}]
5693
5999
  * @return {*} {Promise<IHttpResponse>}
@@ -5703,7 +6009,7 @@ var DEService = class {
5703
6009
  * @author chitanda
5704
6010
  * @date 2023-10-26 14:10:25
5705
6011
  * @protected
5706
- * @param {IParams} context
6012
+ * @param {IContext} context
5707
6013
  * @param {boolean} [isHistories=false]
5708
6014
  * @return {*} {string}
5709
6015
  */
@@ -5713,23 +6019,44 @@ var DEService = class {
5713
6019
  const resPath = calcResPath(context, this.model);
5714
6020
  return resPath + curPath;
5715
6021
  }
6022
+ newEntity(data) {
6023
+ if (data instanceof AppDataEntity) {
6024
+ return data.clone();
6025
+ }
6026
+ return new AppDataEntity(this.model, data);
6027
+ }
6028
+ /**
6029
+ * 创建数据对象实例
6030
+ *
6031
+ * @author chitanda
6032
+ * @date 2023-12-23 19:12:57
6033
+ * @param {(IData[] | IDataEntity[] | IData | IDataEntity)} data
6034
+ * @return {*} {(IDataEntity | IDataEntity[])}
6035
+ */
6036
+ createEntity(data) {
6037
+ if (Array.isArray(data)) {
6038
+ return data.map((item) => this.newEntity(item));
6039
+ }
6040
+ return this.newEntity(data);
6041
+ }
6042
+ /**
6043
+ * 服务实例销毁
6044
+ *
6045
+ * @author chitanda
6046
+ * @date 2023-12-22 14:12:11
6047
+ * @return {*} {Promise<void>}
6048
+ */
6049
+ async destroy() {
6050
+ this.local.clear();
6051
+ }
5716
6052
  };
5717
6053
 
5718
6054
  // src/service/service/control/control.service.ts
5719
- import { clone as clone6 } from "@ibiz-template/core";
5720
-
5721
- // src/service/vo/control.vo.ts
5722
- import { createUUID as createUUID2 } from "qx-util";
5723
- import { clone as clone5, isNil as isNil7 } from "ramda";
5724
-
5725
- // src/service/constant/srfuf.ts
5726
- var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
5727
- Srfuf2[Srfuf2["CREATE"] = 0] = "CREATE";
5728
- Srfuf2[Srfuf2["UPDATE"] = 1] = "UPDATE";
5729
- return Srfuf2;
5730
- })(Srfuf || {});
6055
+ import { clone as clone7 } from "@ibiz-template/core";
5731
6056
 
5732
6057
  // src/service/vo/control.vo.ts
6058
+ import { createUUID as createUUID4 } from "qx-util";
6059
+ import { clone as clone6, isNil as isNil8 } from "ramda";
5733
6060
  var BuildInKeys = [
5734
6061
  "srfkey",
5735
6062
  "srfmajortext",
@@ -5818,7 +6145,7 @@ var ControlVO = class _ControlVO {
5818
6145
  enumerable: false,
5819
6146
  configurable: true,
5820
6147
  writable: true,
5821
- value: isNil7(this.srfkey) ? createUUID2() : this.srfkey
6148
+ value: isNil8(this.srfkey) ? createUUID4() : this.srfkey
5822
6149
  });
5823
6150
  }
5824
6151
  Object.defineProperty(this, "srfuf", {
@@ -5917,7 +6244,7 @@ var ControlVO = class _ControlVO {
5917
6244
  * @return {*} {ControlVO}
5918
6245
  */
5919
6246
  clone() {
5920
- const cloneOrigin = clone5(this.$origin);
6247
+ const cloneOrigin = clone6(this.$origin);
5921
6248
  const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
5922
6249
  Object.keys(this).forEach((key) => {
5923
6250
  newVal[key] = this[key];
@@ -5971,7 +6298,7 @@ var ControlService = class {
5971
6298
  * @author lxm
5972
6299
  * @date 2022-08-31 17:08:41
5973
6300
  * @param {string} methodName 方法名
5974
- * @param {IParams} context 上下文
6301
+ * @param {IContext} context 上下文
5975
6302
  * @param {IParams} [params={}] 视图参数或数据
5976
6303
  * @returns {*} {Promise<IHttpResponse>}
5977
6304
  */
@@ -5994,7 +6321,7 @@ var ControlService = class {
5994
6321
  * @returns {*} {IHttpResponse}
5995
6322
  */
5996
6323
  handleResponse(res) {
5997
- return clone6(res);
6324
+ return clone7(res);
5998
6325
  }
5999
6326
  /**
6000
6327
  * 实体数据转ui数据
@@ -6018,7 +6345,7 @@ var MDControlService = class extends ControlService {
6018
6345
  *
6019
6346
  * @author lxm
6020
6347
  * @date 2022-08-31 17:08:41
6021
- * @param {IParams} context 上下文
6348
+ * @param {IContext} context 上下文
6022
6349
  * @param {IParams} [params={}] 视图参数
6023
6350
  * @returns {*} {Promise<IHttpResponse>}
6024
6351
  */
@@ -6034,7 +6361,7 @@ var MDControlService = class extends ControlService {
6034
6361
  *
6035
6362
  * @author lxm
6036
6363
  * @date 2022-08-31 17:08:41
6037
- * @param {IParams} context 上下文
6364
+ * @param {IContext} context 上下文
6038
6365
  * @param {IParams} [params={}] 视图参数
6039
6366
  * @returns {*} {Promise<IHttpResponse>}
6040
6367
  */
@@ -6050,7 +6377,7 @@ var MDControlService = class extends ControlService {
6050
6377
  *
6051
6378
  * @author lxm
6052
6379
  * @date 2022-08-31 17:08:41
6053
- * @param {IParams} context 上下文
6380
+ * @param {IContext} context 上下文
6054
6381
  * @param {IParams} [params={}] 视图参数
6055
6382
  * @returns {*} {Promise<IHttpResponse>}
6056
6383
  */
@@ -6066,7 +6393,7 @@ var MDControlService = class extends ControlService {
6066
6393
  *
6067
6394
  * @author lxm
6068
6395
  * @date 2022-09-07 19:09:48
6069
- * @param {IParams} context 上下文
6396
+ * @param {IContext} context 上下文
6070
6397
  * @param {IParams} [params={}] 视图参数
6071
6398
  * @returns {*}
6072
6399
  */
@@ -6081,7 +6408,7 @@ var MDControlService = class extends ControlService {
6081
6408
  *
6082
6409
  * @author lxm
6083
6410
  * @date 2022-09-07 19:09:11
6084
- * @param {IParams} context 上下文
6411
+ * @param {IContext} context 上下文
6085
6412
  * @param {ControlVO} data 数据
6086
6413
  * @returns {*}
6087
6414
  */
@@ -6097,7 +6424,7 @@ var MDControlService = class extends ControlService {
6097
6424
  *
6098
6425
  * @author lxm
6099
6426
  * @date 2022-09-07 19:09:11
6100
- * @param {IParams} context 上下文
6427
+ * @param {IContext} context 上下文
6101
6428
  * @param {ControlVO} data 数据
6102
6429
  * @returns {*}
6103
6430
  */
@@ -6134,7 +6461,7 @@ var MDControlService = class extends ControlService {
6134
6461
  * @author lxm
6135
6462
  * @date 2022-11-25 14:11:09
6136
6463
  * @param {IPSDEDataExport} dataExport 导出模型
6137
- * @param {IParams} context 上下文
6464
+ * @param {IContext} context 上下文
6138
6465
  * @param {IParams} [params={}] 请求参数
6139
6466
  * @returns {*} {Promise<IHttpResponse>}
6140
6467
  */
@@ -6300,7 +6627,7 @@ var AuthorityService = class {
6300
6627
  * @author chitanda
6301
6628
  * @date 2022-12-23 10:12:24
6302
6629
  * @param {string} id 实体标识
6303
- * @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
6630
+ * @param {IContext} [context] 上下文,用于计算模型所属沙箱环境
6304
6631
  * @return {*} {Promise<IAppDEService>}
6305
6632
  */
6306
6633
  async getService(id) {
@@ -6453,7 +6780,7 @@ var V7AuthService = class {
6453
6780
  };
6454
6781
 
6455
6782
  // src/service/service/async-action/async-action.service.ts
6456
- import { isNil as isNil8 } from "ramda";
6783
+ import { isNil as isNil9 } from "ramda";
6457
6784
  var AsyncActionService = class {
6458
6785
  /**
6459
6786
  * 获取异步操作的集合
@@ -6464,7 +6791,7 @@ var AsyncActionService = class {
6464
6791
  */
6465
6792
  async fetch(params = {}) {
6466
6793
  const res = await ibiz.net.post("/portal/asyncaction/all", params);
6467
- if (isNil8(res.data)) {
6794
+ if (isNil9(res.data)) {
6468
6795
  res.data = [];
6469
6796
  }
6470
6797
  return res;
@@ -6489,208 +6816,18 @@ import {
6489
6816
  RuntimeError as RuntimeError20,
6490
6817
  RuntimeModelError as RuntimeModelError19
6491
6818
  } from "@ibiz-template/core";
6492
- import { isArray as isArray7, isNil as isNil10 } from "lodash-es";
6819
+ import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
6493
6820
 
6494
6821
  // src/service/service/entity/method/method.ts
6495
6822
  import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
6496
- import { isArray as isArray4 } from "lodash-es";
6497
-
6498
- // src/service/app-data-entity/app-data-entity.ts
6499
- import { clone as clone7, isNil as isNil9 } from "ramda";
6500
- import { DataTypes } from "@ibiz-template/core";
6501
- import { createUUID as createUUID3 } from "qx-util";
6502
- var AppDataEntity = class _AppDataEntity {
6503
- get srfuf() {
6504
- return this.srfkey === this.tempsrfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
6505
- }
6506
- /**
6507
- * Creates an instance of AppDataEntity.
6508
- *
6509
- * @author chitanda
6510
- * @date 2023-11-16 15:11:08
6511
- * @param {IAppDataEntity} entity
6512
- * @param {(IData | AppDataEntity)} [data={}]
6513
- */
6514
- constructor(entity, data = {}) {
6515
- Object.defineProperty(this, "_entity", {
6516
- enumerable: false,
6517
- configurable: true,
6518
- value: entity
6519
- });
6520
- Object.defineProperty(this, "_data", {
6521
- enumerable: false,
6522
- configurable: true,
6523
- value: data instanceof _AppDataEntity ? clone7(data._data) : clone7(data)
6524
- });
6525
- Object.defineProperty(this, "srfdeid", {
6526
- get() {
6527
- return entity.id;
6528
- }
6529
- });
6530
- Object.defineProperty(this, "srfdecodename", {
6531
- get() {
6532
- return entity.codeName;
6533
- }
6534
- });
6535
- const keyAppField = findModelChild(
6536
- entity.appDEFields || [],
6537
- entity.keyAppDEFieldId
6538
- );
6539
- if (keyAppField) {
6540
- const key = keyAppField.codeName.toLowerCase();
6541
- Object.defineProperty(this, "srfkeyfield", {
6542
- get() {
6543
- return key;
6544
- }
6545
- });
6546
- Object.defineProperty(this, "srfkey", {
6547
- set(val) {
6548
- this._data[key] = val;
6549
- },
6550
- get() {
6551
- return this._data[key];
6552
- }
6553
- });
6554
- } else {
6555
- ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u952E\u5B57\u6BB5"));
6556
- }
6557
- const majorAppField = findModelChild(
6558
- entity.appDEFields || [],
6559
- entity.majorAppDEFieldId
6560
- );
6561
- if (majorAppField) {
6562
- const major = majorAppField.codeName.toLowerCase();
6563
- Object.defineProperty(this, "srfmajorfield", {
6564
- get() {
6565
- return major;
6566
- }
6567
- });
6568
- Object.defineProperty(this, "srfmajortext", {
6569
- set(val) {
6570
- this._data[major] = val;
6571
- },
6572
- get() {
6573
- return this._data[major];
6574
- }
6575
- });
6576
- } else {
6577
- ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u6587\u672C\u5B57\u6BB5"));
6578
- }
6579
- Object.defineProperty(this, "tempsrfkey", {
6580
- enumerable: false,
6581
- configurable: true,
6582
- writable: true,
6583
- value: isNil9(this.srfkey) ? createUUID3() : this.srfkey
6584
- });
6585
- this.defineProperties();
6586
- }
6587
- /**
6588
- * 代理实际数据
6589
- *
6590
- * @author chitanda
6591
- * @date 2022-10-11 22:10:55
6592
- * @protected
6593
- */
6594
- defineProperties() {
6595
- var _a;
6596
- const { _data, convertVal } = this;
6597
- const properties = {};
6598
- const keys = Object.keys(_data);
6599
- keys.forEach((key) => {
6600
- properties[key] = {
6601
- enumerable: true,
6602
- set(val) {
6603
- _data[key] = val;
6604
- },
6605
- get() {
6606
- return _data[key];
6607
- }
6608
- };
6609
- });
6610
- (_a = this._entity.appDEFields) == null ? void 0 : _a.forEach((field) => {
6611
- const key = field.codeName.toLowerCase();
6612
- properties[key] = {
6613
- enumerable: true,
6614
- set(val) {
6615
- _data[key] = convertVal(val, field.stdDataType);
6616
- },
6617
- get() {
6618
- return _data[key];
6619
- }
6620
- };
6621
- _data[key] = convertVal(_data[key], field.stdDataType);
6622
- });
6623
- Object.defineProperties(this, properties);
6624
- }
6625
- /**
6626
- * 克隆数据
6627
- *
6628
- * @author chitanda
6629
- * @date 2022-10-11 00:10:15
6630
- * @return {*} {AppDataEntity}
6631
- */
6632
- clone() {
6633
- const entity = new _AppDataEntity(this._entity, this._data);
6634
- entity.srfkey = this.srfkey;
6635
- return entity;
6636
- }
6637
- /**
6638
- * 合并参数
6639
- *
6640
- * @author chitanda
6641
- * @date 2022-10-19 11:10:25
6642
- * @param {(IData | AppDataEntity)} data
6643
- * @return {*} {AppDataEntity}
6644
- */
6645
- assign(data) {
6646
- let _data = {};
6647
- if (data instanceof _AppDataEntity) {
6648
- _data = data._data;
6649
- } else {
6650
- _data = data;
6651
- }
6652
- Object.keys(_data).forEach((key) => {
6653
- if (_data[key] === void 0) {
6654
- delete _data[key];
6655
- }
6656
- });
6657
- Object.assign(this._data, _data);
6658
- return this;
6659
- }
6660
- /**
6661
- * 根据属性的数据类型转换值
6662
- * @author lxm
6663
- * @date 2023-09-25 03:37:28
6664
- * @protected
6665
- * @param {unknown} value
6666
- * @param {(number | undefined)} dataType
6667
- * @return {*} {unknown}
6668
- */
6669
- convertVal(value, dataType) {
6670
- if (value == null) {
6671
- return value;
6672
- }
6673
- if (isNil9(dataType)) {
6674
- return value;
6675
- }
6676
- if (DataTypes.isNumber(dataType)) {
6677
- const numVal = !isNil9(value) && value !== "" ? Number(value) : value;
6678
- if (Number.isNaN(numVal)) {
6679
- ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
6680
- return value;
6681
- }
6682
- return numVal;
6683
- }
6684
- return value;
6685
- }
6686
- };
6687
6823
 
6688
6824
  // src/service/dto/method.dto.ts
6689
6825
  import { ModelError as ModelError6 } from "@ibiz-template/core";
6690
6826
  var MethodDto = class _MethodDto {
6691
- constructor(entity, isLocalMode2, dto) {
6827
+ constructor(service, entity, isLocalMode, dto) {
6828
+ this.service = service;
6692
6829
  this.entity = entity;
6693
- this.isLocalMode = isLocalMode2;
6830
+ this.isLocalMode = isLocalMode;
6694
6831
  this.dto = dto;
6695
6832
  this.dtoMap = /* @__PURE__ */ new Map();
6696
6833
  if (dto) {
@@ -6700,6 +6837,18 @@ var MethodDto = class _MethodDto {
6700
6837
  this.fields = [];
6701
6838
  }
6702
6839
  }
6840
+ /**
6841
+ * 查找本地 DTO 存储数据
6842
+ *
6843
+ * @author chitanda
6844
+ * @date 2023-12-22 14:12:19
6845
+ * @param {IContext} context
6846
+ * @param {IParams} [params]
6847
+ * @return {*} {IDataEntity[]}
6848
+ */
6849
+ select(context, params) {
6850
+ return this.service.local.select(context, params);
6851
+ }
6703
6852
  /**
6704
6853
  * 转换数组成ListMap
6705
6854
  *
@@ -6732,7 +6881,7 @@ var MethodDto = class _MethodDto {
6732
6881
  *
6733
6882
  * @author chitanda
6734
6883
  * @date 2022-10-10 23:10:33
6735
- * @param {IParams} context
6884
+ * @param {IContext} context
6736
6885
  * @param {IData} data
6737
6886
  * @return {*} {Promise<IData>}
6738
6887
  */
@@ -6759,13 +6908,12 @@ var MethodDto = class _MethodDto {
6759
6908
  if (!field.refAppDataEntityId) {
6760
6909
  break;
6761
6910
  }
6762
- const dto = await this.getFieldDto(field);
6763
- const service = await this.app.deService.getService(
6764
- field.refAppDataEntityId
6765
- );
6766
- const items = await service.selectLocal(context, {
6767
- // srfpkey: data[this.entity.keyAppDEFieldId!],
6768
- });
6911
+ const dto = await this.getFieldDto(context, field);
6912
+ const filterParams = {};
6913
+ if (field.refPickupAppDEFieldId) {
6914
+ filterParams[field.refPickupAppDEFieldId] = data.srfkey;
6915
+ }
6916
+ const items = await dto.select(context, filterParams);
6769
6917
  if (items) {
6770
6918
  const arr = [];
6771
6919
  for (let j = 0; j < items.length; j++) {
@@ -6790,14 +6938,13 @@ var MethodDto = class _MethodDto {
6790
6938
  *
6791
6939
  * @author chitanda
6792
6940
  * @date 2022-10-10 23:10:50
6793
- * @param {IParams} context
6941
+ * @param {IContext} context
6794
6942
  * @param {IData[]} data
6795
- * @return {*} {Promise<AppDataEntity[]>}
6943
+ * @return {*} {Promise<IDataEntity[]>}
6796
6944
  */
6797
6945
  async sets(context, data) {
6798
- const service = await this.app.deService.getService(this.entity.id);
6799
6946
  if (this.isLocalMode) {
6800
- service.local.clear(context);
6947
+ this.service.local.clear();
6801
6948
  }
6802
6949
  return Promise.all(
6803
6950
  data.map(async (datum) => {
@@ -6809,14 +6956,15 @@ var MethodDto = class _MethodDto {
6809
6956
  if (!field.refAppDataEntityId) {
6810
6957
  return;
6811
6958
  }
6812
- const dto = await this.getFieldDto(field);
6959
+ const dto = await this.getFieldDto(context, field);
6813
6960
  const items = datum[key];
6814
6961
  if (items) {
6815
6962
  const pKey = datum[this.entity.keyAppDEFieldId];
6816
6963
  items.forEach((item) => {
6817
- item.srfpkey = pKey;
6964
+ item[field.refPickupAppDEFieldId] = pKey;
6818
6965
  });
6819
6966
  await dto.sets(context, items);
6967
+ delete datum[key];
6820
6968
  } else {
6821
6969
  await dto.sets(context, []);
6822
6970
  }
@@ -6825,9 +6973,9 @@ var MethodDto = class _MethodDto {
6825
6973
  for (let i = 0; i < all.length; i++) {
6826
6974
  await all[i];
6827
6975
  }
6828
- const entityData = new AppDataEntity(this.entity, datum);
6976
+ const entityData = this.service.createEntity(datum);
6829
6977
  if (this.isLocalMode) {
6830
- await service.local.add(context, entityData);
6978
+ await this.service.local.add(context, entityData);
6831
6979
  }
6832
6980
  return entityData;
6833
6981
  })
@@ -6837,12 +6985,13 @@ var MethodDto = class _MethodDto {
6837
6985
  * 获取子属性 DTO
6838
6986
  *
6839
6987
  * @author chitanda
6840
- * @date 2022-10-17 16:10:47
6988
+ * @date 2023-12-22 13:12:06
6841
6989
  * @protected
6990
+ * @param {IContext} context
6842
6991
  * @param {IAppDEMethodDTOField} field
6843
6992
  * @return {*} {Promise<MethodDto>}
6844
6993
  */
6845
- async getFieldDto(field) {
6994
+ async getFieldDto(context, field) {
6846
6995
  if (this.dtoMap.has(field.codeName)) {
6847
6996
  return this.dtoMap.get(field.codeName);
6848
6997
  }
@@ -6854,29 +7003,31 @@ var MethodDto = class _MethodDto {
6854
7003
  entity.appDEMethodDTOs || [],
6855
7004
  field.refAppDEMethodDTOId
6856
7005
  );
6857
- const dto = new _MethodDto(entity, true, methodDto);
7006
+ const service = await this.app.deService.getService(context, entity.id);
7007
+ service.isLocalMode = true;
7008
+ const dto = new _MethodDto(service, entity, true, methodDto);
6858
7009
  this.dtoMap.set(field.codeName, dto);
6859
7010
  return dto;
6860
7011
  }
6861
7012
  };
6862
7013
 
6863
- // src/service/service/entity/util/util.ts
6864
- function isLocalMode(method) {
6865
- return method.actionType === "BUILTIN" || method.dataSetType === "DATAQUERY";
6866
- }
6867
-
6868
7014
  // src/service/service/entity/method/method-input.ts
6869
7015
  var MethodInput = class {
6870
7016
  /**
6871
7017
  * Creates an instance of MethodInput.
7018
+ *
6872
7019
  * @author chitanda
6873
- * @date 2023-09-06 16:09:26
7020
+ * @date 2023-12-22 13:12:57
7021
+ * @param {IAppDEService} service
6874
7022
  * @param {IAppDataEntity} entity
6875
7023
  * @param {IAppDEMethod} method
7024
+ * @param {boolean} [isLocalMode=false]
6876
7025
  */
6877
- constructor(entity, method) {
7026
+ constructor(service, entity, method, isLocalMode = false) {
7027
+ this.service = service;
6878
7028
  this.entity = entity;
6879
7029
  this.method = method;
7030
+ this.isLocalMode = isLocalMode;
6880
7031
  const input = method.appDEMethodInput;
6881
7032
  if (input) {
6882
7033
  const methodDto = findModelChild(
@@ -6884,19 +7035,16 @@ var MethodInput = class {
6884
7035
  input.appDEMethodDTOId
6885
7036
  );
6886
7037
  if (methodDto) {
6887
- this.dto = new MethodDto(entity, this.isLocalMode, methodDto);
7038
+ this.dto = new MethodDto(service, entity, this.isLocalMode, methodDto);
6888
7039
  }
6889
7040
  }
6890
7041
  }
6891
- get isLocalMode() {
6892
- return isLocalMode(this.method);
6893
- }
6894
7042
  /**
6895
7043
  * 处理请求发送参数
6896
7044
  *
6897
7045
  * @author chitanda
6898
7046
  * @date 2022-10-11 14:10:22
6899
- * @param {IParams} context
7047
+ * @param {IContext} context
6900
7048
  * @param {IData} data
6901
7049
  * @return {*} {Promise<IData>}
6902
7050
  */
@@ -6913,15 +7061,19 @@ import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
6913
7061
  var MethodReturn = class {
6914
7062
  /**
6915
7063
  * Creates an instance of MethodReturn.
7064
+ *
6916
7065
  * @author chitanda
6917
- * @date 2023-09-06 16:09:45
7066
+ * @date 2023-12-22 13:12:24
7067
+ * @param {IAppDEService} service
6918
7068
  * @param {IAppDataEntity} entity
6919
7069
  * @param {IAppDEMethod} method
6920
- * @param {IAppDEMethodReturn} [output]
7070
+ * @param {boolean} [isLocalMode=false]
6921
7071
  */
6922
- constructor(entity, method) {
7072
+ constructor(service, entity, method, isLocalMode = false) {
7073
+ this.service = service;
6923
7074
  this.entity = entity;
6924
7075
  this.method = method;
7076
+ this.isLocalMode = isLocalMode;
6925
7077
  const output = method.appDEMethodReturn;
6926
7078
  if (output) {
6927
7079
  const methodDto = findModelChild(
@@ -6929,19 +7081,16 @@ var MethodReturn = class {
6929
7081
  output.appDEMethodDTOId
6930
7082
  );
6931
7083
  if (methodDto) {
6932
- this.dto = new MethodDto(entity, this.isLocalMode, methodDto);
7084
+ this.dto = new MethodDto(service, entity, this.isLocalMode, methodDto);
6933
7085
  }
6934
7086
  }
6935
7087
  }
6936
- get isLocalMode() {
6937
- return isLocalMode(this.method);
6938
- }
6939
7088
  /**
6940
7089
  * 处理请求返回参数
6941
7090
  *
6942
7091
  * @author chitanda
6943
7092
  * @date 2022-10-19 21:10:06
6944
- * @param {IParams} context
7093
+ * @param {IContext} context
6945
7094
  * @param {IData} data
6946
7095
  * @return {*} {Promise<IDataEntity>}
6947
7096
  */
@@ -6963,17 +7112,19 @@ var Method = class {
6963
7112
  * Creates an instance of Method.
6964
7113
  *
6965
7114
  * @author chitanda
6966
- * @date 2022-10-10 14:10:19
7115
+ * @date 2023-12-22 12:12:06
7116
+ * @param {IAppDEService} service 当前服务实例
6967
7117
  * @param {IAppDataEntity} entity
6968
7118
  * @param {IAppDEMethod} method
6969
- * @param {ServicePathItem[][]} paths
6970
7119
  */
6971
- constructor(entity, method) {
7120
+ constructor(service, entity, method, isLocalMode = false) {
7121
+ this.service = service;
6972
7122
  this.entity = entity;
6973
7123
  this.method = method;
7124
+ this.isLocalMode = isLocalMode;
6974
7125
  this.app = ibiz.hub.getApp(entity.appId);
6975
- this.input = new MethodInput(entity, method);
6976
- this.result = new MethodReturn(entity, method);
7126
+ this.input = new MethodInput(service, entity, method);
7127
+ this.result = new MethodReturn(service, entity, method);
6977
7128
  }
6978
7129
  /**
6979
7130
  * 发送请求
@@ -6982,7 +7133,7 @@ var Method = class {
6982
7133
  * @date 2022-10-10 17:10:44
6983
7134
  * @protected
6984
7135
  * @param {string} path
6985
- * @param {IParams} context
7136
+ * @param {IContext} context
6986
7137
  * @param {IData} data
6987
7138
  * @param {IParams} params
6988
7139
  * @return {*} {Promise<HttpResponse<any>>}
@@ -7041,7 +7192,7 @@ var Method = class {
7041
7192
  * @author chitanda
7042
7193
  * @date 2022-08-24 18:08:46
7043
7194
  * @protected
7044
- * @param {IParams} context
7195
+ * @param {IContext} context
7045
7196
  * @return {*} {string} 拼接结果说明: /祖父实体/祖父实体主键/爷爷实体/爷爷实体主键/父实体/父实体主键/当前实体
7046
7197
  */
7047
7198
  calcPath(context) {
@@ -7049,20 +7200,6 @@ var Method = class {
7049
7200
  const resPath = calcResPath(context, this.entity);
7050
7201
  return resPath + curPath;
7051
7202
  }
7052
- /**
7053
- * 获取当前实体服务
7054
- *
7055
- * @author chitanda
7056
- * @date 2022-10-11 21:10:12
7057
- * @protected
7058
- * @return {*} {Promise<IAppDEService>}
7059
- */
7060
- async getService() {
7061
- if (!this.service) {
7062
- this.service = await this.app.deService.getService(this.entity.id);
7063
- }
7064
- return this.service;
7065
- }
7066
7203
  /**
7067
7204
  * 创建实体
7068
7205
  * @author lxm
@@ -7072,36 +7209,27 @@ var Method = class {
7072
7209
  * @return {*} {(IDataEntity | IDataEntity[])}
7073
7210
  */
7074
7211
  createEntity(data) {
7075
- const toEntity = (single) => {
7076
- if (single instanceof AppDataEntity) {
7077
- return single.clone();
7078
- }
7079
- return new AppDataEntity(this.entity, single);
7080
- };
7081
- if (isArray4(data)) {
7082
- return data.map((item) => toEntity(item));
7083
- }
7084
- return toEntity(data);
7212
+ return this.service.createEntity(data);
7085
7213
  }
7086
7214
  };
7087
7215
 
7088
7216
  // src/de-logic/index.ts
7089
7217
  import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as RuntimeError19 } from "@ibiz-template/core";
7090
- import { isArray as isArray6 } from "lodash-es";
7218
+ import { isArray as isArray5 } from "lodash-es";
7091
7219
  import { clone as clone12 } from "ramda";
7092
7220
 
7093
7221
  // src/de-logic/de-logic.ts
7094
7222
  import { ModelError as ModelError12, RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
7095
7223
 
7096
7224
  // src/de-logic/de-logic-context.ts
7097
- import { isArray as isArray5 } from "lodash-es";
7225
+ import { isArray as isArray4 } from "lodash-es";
7098
7226
  var DELogicContext = class {
7099
7227
  /**
7100
7228
  * Creates an instance of DELogicContext.
7101
7229
  * @author lxm
7102
7230
  * @date 2023-03-24 09:15:14
7103
7231
  * @param {Map<string, DELogicParam>} deLogicParams 实体逻辑参数集合
7104
- * @param {IParams} context 上下文
7232
+ * @param {IContext} context 上下文
7105
7233
  * @param {IData} data 数据对象
7106
7234
  * @param {IParams} params 视图参数
7107
7235
  */
@@ -7141,7 +7269,7 @@ var DELogicContext = class {
7141
7269
  * @type {string}
7142
7270
  */
7143
7271
  this.defaultParamName = "Default";
7144
- this.parameters = { context, data: isArray5(data) ? data : [data], params };
7272
+ this.parameters = { context, data: isArray4(data) ? data : [data], params };
7145
7273
  }
7146
7274
  /**
7147
7275
  * 上下文
@@ -7271,7 +7399,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
7271
7399
  * @author lxm
7272
7400
  * @date 2023-02-15 18:02:05
7273
7401
  * @param {DELogicContext} ctx
7274
- * @param {IParams} context
7402
+ * @param {IContext} context
7275
7403
  * @param {IData} data
7276
7404
  * @return {*} {boolean}
7277
7405
  */
@@ -7346,7 +7474,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
7346
7474
  * @author lxm
7347
7475
  * @date 2023-02-15 17:02:19
7348
7476
  * @param {DELogicContext} ctx
7349
- * @param {IParams} context
7477
+ * @param {IContext} context
7350
7478
  * @param {IData} data
7351
7479
  * @return {*} {boolean}
7352
7480
  */
@@ -7417,7 +7545,7 @@ var DELogicLink = class {
7417
7545
  * @author lxm
7418
7546
  * @date 2023-02-08 22:02:18
7419
7547
  * @param {DELogicContext} ctx
7420
- * @param {IParams} context
7548
+ * @param {IContext} context
7421
7549
  * @param {IData} data
7422
7550
  * @return {*} {Promise<boolean>} 是否连接成功
7423
7551
  */
@@ -7879,7 +8007,7 @@ var DELogicParam = class {
7879
8007
  * @author lxm
7880
8008
  * @date 2023-02-08 20:02:33
7881
8009
  * @param {DELogicContext} ctx
7882
- * @param {IParams} context
8010
+ * @param {IContext} context
7883
8011
  * @param {IData} data
7884
8012
  * @param {IParams} [opt]
7885
8013
  */
@@ -8050,7 +8178,7 @@ var DELogic = class {
8050
8178
  * @date 2023-02-08 21:02:58
8051
8179
  * @protected
8052
8180
  * @param {DELogicContext} ctx
8053
- * @param {IParams} context
8181
+ * @param {IContext} context
8054
8182
  * @param {IData} data
8055
8183
  * @param {IParams} [opt]
8056
8184
  */
@@ -8067,7 +8195,7 @@ var DELogic = class {
8067
8195
  *
8068
8196
  * @author lxm
8069
8197
  * @date 2023-02-08 21:02:09
8070
- * @param {IParams} context
8198
+ * @param {IContext} context
8071
8199
  * @param {IData} data
8072
8200
  * @param {IParams} [opt]
8073
8201
  * @return {*} {Promise<IData>}
@@ -8174,7 +8302,7 @@ async function execFieldLogics(entity, type, context, data, params = {}) {
8174
8302
  if (!data) {
8175
8303
  return;
8176
8304
  }
8177
- if (isArray6(data)) {
8305
+ if (isArray5(data)) {
8178
8306
  await Promise.all(
8179
8307
  data.map(
8180
8308
  (item) => execSingleFieldLogics(entity, type, context, item, params)
@@ -8187,28 +8315,16 @@ async function execFieldLogics(entity, type, context, data, params = {}) {
8187
8315
 
8188
8316
  // src/service/service/entity/method/de-action.ts
8189
8317
  var DEActionMethod = class extends Method {
8190
- /**
8191
- * 是否为本地模式
8192
- *
8193
- * @author chitanda
8194
- * @date 2023-04-19 16:04:46
8195
- * @readonly
8196
- * @protected
8197
- * @type {boolean}
8198
- */
8199
- get isLocalMode() {
8200
- return isLocalMode(this.method);
8201
- }
8202
8318
  /**
8203
8319
  * 处理请求发送参数
8204
8320
  * @author lxm
8205
8321
  * @date 2023-10-19 02:50:36
8206
- * @param {IParams} context 上下文
8322
+ * @param {IContext} context 上下文
8207
8323
  * @param {(IData | IData[])} data 数据对象
8208
8324
  * @return {*} {(Promise<IData | IData[]>)}
8209
8325
  */
8210
8326
  async inputHandle(context, data) {
8211
- if (isArray7(data)) {
8327
+ if (isArray6(data)) {
8212
8328
  return data;
8213
8329
  }
8214
8330
  return this.input.handle(context, data);
@@ -8267,7 +8383,7 @@ var DEActionMethod = class extends Method {
8267
8383
  if (this.method.needResourceKey) {
8268
8384
  let srfkey = context[this.entity.codeName.toLowerCase()];
8269
8385
  if (isNil10(srfkey)) {
8270
- srfkey = isArray7(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
8386
+ srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
8271
8387
  }
8272
8388
  path2 = "".concat(path2, "/").concat(srfkey);
8273
8389
  }
@@ -8292,7 +8408,7 @@ var DEActionMethod = class extends Method {
8292
8408
  *
8293
8409
  * @author chitanda
8294
8410
  * @date 2022-08-24 20:08:01
8295
- * @param {IParams} context
8411
+ * @param {IContext} context
8296
8412
  * @param {IData} data
8297
8413
  * @return {*} {Promise<IHttpResponse<IData>>}
8298
8414
  */
@@ -8313,7 +8429,7 @@ var DEActionMethod = class extends Method {
8313
8429
  *
8314
8430
  * @author chitanda
8315
8431
  * @date 2022-08-24 20:08:56
8316
- * @param {IParams} context
8432
+ * @param {IContext} context
8317
8433
  * @param {IParams} [params]
8318
8434
  * @return {*} {Promise<IHttpResponse<IDataEntity>>}
8319
8435
  */
@@ -8333,7 +8449,7 @@ var DEActionMethod = class extends Method {
8333
8449
  *
8334
8450
  * @author chitanda
8335
8451
  * @date 2022-09-13 19:09:39
8336
- * @param {IParams} context
8452
+ * @param {IContext} context
8337
8453
  * @param {(IData | IDataEntity)} data
8338
8454
  * @param {IParams} [params={}]
8339
8455
  * @return {*} {Promise<IHttpResponse<IDataEntity>>}
@@ -8359,7 +8475,7 @@ var DEActionMethod = class extends Method {
8359
8475
  *
8360
8476
  * @author chitanda
8361
8477
  * @date 2022-08-24 20:08:07
8362
- * @param {IParams} context
8478
+ * @param {IContext} context
8363
8479
  * @param {IParams} [params]
8364
8480
  * @return {*} {Promise<IHttpResponse<IDataEntity>>}
8365
8481
  */
@@ -8380,7 +8496,7 @@ var DEActionMethod = class extends Method {
8380
8496
  *
8381
8497
  * @author chitanda
8382
8498
  * @date 2022-08-24 20:08:26
8383
- * @param {IParams} context
8499
+ * @param {IContext} context
8384
8500
  * @param {IParams} [params]
8385
8501
  * @return {*} {Promise<IHttpResponse<IData>>}
8386
8502
  */
@@ -8398,21 +8514,20 @@ var DEActionMethod = class extends Method {
8398
8514
  *
8399
8515
  * @author chitanda
8400
8516
  * @date 2022-08-21 17:08:45
8401
- * @param {IParams} context
8517
+ * @param {IContext} context
8402
8518
  * @param {IData} entity
8403
8519
  * @return {*} {Promise<IHttpResponse<IDataEntity>>}
8404
8520
  */
8405
8521
  async createTemp(context, entity) {
8406
8522
  try {
8407
- const s = await this.getService();
8408
8523
  const addData = this.createEntity(entity);
8409
8524
  let resultData;
8410
- if (isArray7(addData)) {
8525
+ if (isArray6(addData)) {
8411
8526
  resultData = await Promise.all(
8412
- addData.map((item) => s.local.add(context, item))
8527
+ addData.map((item) => this.service.local.add(context, item))
8413
8528
  );
8414
8529
  } else {
8415
- resultData = await s.local.add(context, addData);
8530
+ resultData = await this.service.local.add(context, addData);
8416
8531
  }
8417
8532
  return new HttpResponse3(resultData);
8418
8533
  } catch (err) {
@@ -8424,7 +8539,7 @@ var DEActionMethod = class extends Method {
8424
8539
  *
8425
8540
  * @author chitanda
8426
8541
  * @date 2022-08-21 17:08:56
8427
- * @param {IParams} context
8542
+ * @param {IContext} context
8428
8543
  * @param {IParams} [params]
8429
8544
  * @return {*} {Promise<IHttpResponse<IDataEntity>>}
8430
8545
  */
@@ -8444,7 +8559,7 @@ var DEActionMethod = class extends Method {
8444
8559
  *
8445
8560
  * @author chitanda
8446
8561
  * @date 2022-08-21 17:08:11
8447
- * @param {IParams} context
8562
+ * @param {IContext} context
8448
8563
  * @param {IParams} [params]
8449
8564
  * @return {*} {Promise<IHttpResponse<IDataEntity>>}
8450
8565
  */
@@ -8456,8 +8571,7 @@ var DEActionMethod = class extends Method {
8456
8571
  if (!key && context) {
8457
8572
  key = context[this.entity.codeName.toLowerCase()];
8458
8573
  }
8459
- const s = await this.getService();
8460
- const data = s.local.delete(context, key);
8574
+ const data = this.service.local.delete(context, key);
8461
8575
  if (data) {
8462
8576
  return new HttpResponse3(data);
8463
8577
  }
@@ -8471,21 +8585,20 @@ var DEActionMethod = class extends Method {
8471
8585
  *
8472
8586
  * @author chitanda
8473
8587
  * @date 2022-08-21 17:08:17
8474
- * @param {IParams} context
8588
+ * @param {IContext} context
8475
8589
  * @param {IData} entity
8476
8590
  * @return {*} {Promise<IHttpResponse<IDataEntity>>}
8477
8591
  */
8478
8592
  async updateTemp(context, entity) {
8479
8593
  try {
8480
- const s = await this.getService();
8481
8594
  const updateData = this.createEntity(entity);
8482
8595
  let resultData;
8483
- if (isArray7(updateData)) {
8596
+ if (isArray6(updateData)) {
8484
8597
  resultData = await Promise.all(
8485
- updateData.map((item) => s.local.update(context, item))
8598
+ updateData.map((item) => this.service.local.update(context, item))
8486
8599
  );
8487
8600
  } else {
8488
- resultData = await s.local.update(context, updateData);
8601
+ resultData = await this.service.local.update(context, updateData);
8489
8602
  }
8490
8603
  if (resultData) {
8491
8604
  return new HttpResponse3(resultData);
@@ -8500,7 +8613,7 @@ var DEActionMethod = class extends Method {
8500
8613
  *
8501
8614
  * @author chitanda
8502
8615
  * @date 2022-08-21 17:08:23
8503
- * @param {IParams} context
8616
+ * @param {IContext} context
8504
8617
  * @param {IParams} [params]
8505
8618
  * @return {*} {Promise<IHttpResponse<IDataEntity>>}
8506
8619
  */
@@ -8512,8 +8625,7 @@ var DEActionMethod = class extends Method {
8512
8625
  if (!key && context) {
8513
8626
  key = context[this.entity.codeName.toLowerCase()];
8514
8627
  }
8515
- const s = await this.getService();
8516
- const data = s.local.get(context, key);
8628
+ const data = this.service.local.get(context, key);
8517
8629
  if (data) {
8518
8630
  return new HttpResponse3(data);
8519
8631
  }
@@ -8525,7 +8637,7 @@ var DEActionMethod = class extends Method {
8525
8637
  /**
8526
8638
  * 批量删除本地数据
8527
8639
  *
8528
- * @param {IParams} context
8640
+ * @param {IContext} context
8529
8641
  * @param {IParams} [params]
8530
8642
  * @return {*} {Promise<IHttpResponse>}
8531
8643
  */
@@ -8536,8 +8648,8 @@ var DEActionMethod = class extends Method {
8536
8648
 
8537
8649
  // src/service/service/entity/method/provider/de-action-de-method.provider.ts
8538
8650
  var DeActionDeMethodProvider = class {
8539
- create(entity, method, _opts) {
8540
- return new DEActionMethod(entity, method);
8651
+ create(service, entity, method, opts) {
8652
+ return new DEActionMethod(service, entity, method, opts.localMode);
8541
8653
  }
8542
8654
  };
8543
8655
 
@@ -8547,15 +8659,12 @@ import {
8547
8659
  ModelError as ModelError13,
8548
8660
  RuntimeModelError as RuntimeModelError20
8549
8661
  } from "@ibiz-template/core";
8550
- import { isArray as isArray8 } from "lodash-es";
8551
- import { clone as clone13, isEmpty as isEmpty8, isNil as isNil11 } from "ramda";
8662
+ import { isArray as isArray7 } from "lodash-es";
8663
+ import { clone as clone13, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
8552
8664
  import { ascSort as ascSort2, descSort } from "qx-util";
8553
8665
  var FetchMethod = class extends Method {
8554
- get isLocalMode() {
8555
- return isLocalMode(this.method);
8556
- }
8557
8666
  async exec(context, params, params2) {
8558
- const searchParams = params && !isArray8(params) ? params : params2 || {};
8667
+ const searchParams = params && !isArray7(params) ? params : params2 || {};
8559
8668
  if (this.isLocalMode) {
8560
8669
  const items2 = await this.searchLocal(
8561
8670
  null,
@@ -8606,15 +8715,14 @@ var FetchMethod = class extends Method {
8606
8715
  * @return {*} {Promise<IDataEntity[]>}
8607
8716
  */
8608
8717
  async searchLocal(cond, filter, queryParamKeys = this.entity.quickSearchAppDEFieldIds) {
8609
- const service = await this.getService();
8610
8718
  let list = [];
8611
8719
  if (cond) {
8612
- list = service.local.getList(filter.context);
8720
+ list = this.service.local.getList();
8613
8721
  if (list.length > 0) {
8614
8722
  list = list.filter((obj) => cond.test(obj, filter));
8615
8723
  }
8616
8724
  } else {
8617
- list = await service.selectLocal(filter.context, filter.data);
8725
+ list = await this.service.local.select(filter.context, filter.data);
8618
8726
  if (list.length > 0) {
8619
8727
  if (filter.query && filter.query !== "") {
8620
8728
  if (queryParamKeys) {
@@ -8633,7 +8741,7 @@ var FetchMethod = class extends Method {
8633
8741
  }
8634
8742
  }
8635
8743
  }
8636
- if (!isNil11(filter.sortField) && !isEmpty8(filter.sortField)) {
8744
+ if (!isNil11(filter.sortField) && !isEmpty7(filter.sortField)) {
8637
8745
  if (filter.sortMode === "DESC") {
8638
8746
  list = descSort(list, filter.sortField);
8639
8747
  } else {
@@ -8650,7 +8758,7 @@ var FetchMethod = class extends Method {
8650
8758
  * 获取代码表数据来源的集合
8651
8759
  * @author lxm
8652
8760
  * @date 2023-08-03 02:55:00
8653
- * @param {IParams} context
8761
+ * @param {IContext} context
8654
8762
  * @param {IParams} params
8655
8763
  * @return {*} {Promise<HttpResponse<IData[]>>}
8656
8764
  */
@@ -8682,11 +8790,11 @@ var AcFetchMethod = class extends FetchMethod {
8682
8790
 
8683
8791
  // src/service/service/entity/method/provider/fetch-de-method.provider.ts
8684
8792
  var FetchDeMethodProvider = class {
8685
- create(entity, method, opts) {
8793
+ create(service, entity, method, opts) {
8686
8794
  if (opts.acMode) {
8687
- return new AcFetchMethod(entity, method);
8795
+ return new AcFetchMethod(service, entity, method, opts.localMode);
8688
8796
  }
8689
- return new FetchMethod(entity, method);
8797
+ return new FetchMethod(service, entity, method, opts.localMode);
8690
8798
  }
8691
8799
  };
8692
8800
 
@@ -8700,13 +8808,14 @@ function presetDEMethodProvider() {
8700
8808
  }
8701
8809
 
8702
8810
  // src/service/vo/tree-node-data/tree-node-data.ts
8703
- import { createUUID as createUUID4 } from "qx-util";
8811
+ import { createUUID as createUUID5 } from "qx-util";
8704
8812
  var TreeNodeData = class {
8705
8813
  constructor(model, parentNodeData, opts) {
8706
- this._uuid = createUUID4();
8814
+ this._uuid = createUUID5();
8707
8815
  this.leaf = false;
8708
8816
  this.leaf = opts.leaf === true;
8709
8817
  this.parent = parentNodeData;
8818
+ this._nodeType = model.treeNodeType;
8710
8819
  if (this.parent) {
8711
8820
  this.context = { ...this.parent.context };
8712
8821
  }
@@ -8769,8 +8878,10 @@ var TreeCodeListNodeData = class extends TreeNodeData {
8769
8878
  };
8770
8879
 
8771
8880
  // src/service/vo/tree-node-data/tree-data-set-node-data.ts
8881
+ import { updateKeyDefine } from "@ibiz-template/core";
8772
8882
  var TreeDataSetNodeData = class extends TreeNodeData {
8773
8883
  constructor(model, parentNodeData, opts) {
8884
+ var _a;
8774
8885
  super(model, parentNodeData, opts);
8775
8886
  const { data } = opts;
8776
8887
  this.deData = data;
@@ -8797,6 +8908,50 @@ var TreeDataSetNodeData = class extends TreeNodeData {
8797
8908
  if (model.leafFlagAppDEFieldId) {
8798
8909
  this.leaf = fieldValueToBoolean(data[model.leafFlagAppDEFieldId]);
8799
8910
  }
8911
+ const dataItemkeyMap = /* @__PURE__ */ new Map();
8912
+ const dataItemDefaults = {};
8913
+ (_a = model.detreeNodeDataItems) == null ? void 0 : _a.forEach((dataItem) => {
8914
+ const uiKey = dataItem.id.toLowerCase();
8915
+ const deFieldKey = dataItem.appDEFieldId.toLowerCase();
8916
+ dataItemkeyMap.set(uiKey, deFieldKey);
8917
+ if (dataItem.defaultValue) {
8918
+ dataItemDefaults[uiKey] = dataItem.defaultValue;
8919
+ }
8920
+ });
8921
+ return new Proxy(this, {
8922
+ set(target, p, value) {
8923
+ if (Object.prototype.hasOwnProperty.call(target.deData, p)) {
8924
+ target.deData[p] = value;
8925
+ } else if (dataItemkeyMap.has(p)) {
8926
+ target.deData[dataItemkeyMap.get(p)] = value;
8927
+ } else {
8928
+ target[p] = value;
8929
+ }
8930
+ return true;
8931
+ },
8932
+ get(target, p, _receiver) {
8933
+ if (target[p] !== void 0) {
8934
+ return target[p];
8935
+ }
8936
+ if (dataItemkeyMap.has(p)) {
8937
+ return target.deData[dataItemkeyMap.get(p)] || dataItemDefaults[p];
8938
+ }
8939
+ if (target.deData[p] !== void 0) {
8940
+ return target.deData[p];
8941
+ }
8942
+ },
8943
+ ownKeys(target) {
8944
+ const allKeys = [
8945
+ .../* @__PURE__ */ new Set([
8946
+ ...Object.keys(target),
8947
+ ...dataItemkeyMap.keys(),
8948
+ ...Object.keys(target.deData)
8949
+ ])
8950
+ ];
8951
+ updateKeyDefine(target, allKeys);
8952
+ return allKeys;
8953
+ }
8954
+ });
8800
8955
  }
8801
8956
  calcIcon(model) {
8802
8957
  const icon = super.calcIcon(model) || {};
@@ -9001,7 +9156,7 @@ var CalendarItemData = class {
9001
9156
  };
9002
9157
 
9003
9158
  // src/service/vo/map-data/map-data.ts
9004
- function updateKeyDefine(target, keys) {
9159
+ function updateKeyDefine2(target, keys) {
9005
9160
  keys.forEach((key) => {
9006
9161
  if (!Object.prototype.hasOwnProperty.call(target, key)) {
9007
9162
  Object.defineProperty(target, key, {
@@ -9087,7 +9242,7 @@ var MapData = class {
9087
9242
  const allKeys = [
9088
9243
  .../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
9089
9244
  ];
9090
- updateKeyDefine(target, allKeys);
9245
+ updateKeyDefine2(target, allKeys);
9091
9246
  return allKeys;
9092
9247
  }
9093
9248
  });
@@ -9096,7 +9251,7 @@ var MapData = class {
9096
9251
 
9097
9252
  // src/service/vo/panel-data/panel-data.ts
9098
9253
  import { QXEvent as QXEvent2 } from "qx-util";
9099
- function updateKeyDefine2(target, keys) {
9254
+ function updateKeyDefine3(target, keys) {
9100
9255
  keys.forEach((key) => {
9101
9256
  if (!Object.prototype.hasOwnProperty.call(target, key)) {
9102
9257
  Object.defineProperty(target, key, {
@@ -9154,7 +9309,7 @@ var PanelData = class {
9154
9309
  },
9155
9310
  ownKeys(target) {
9156
9311
  const allKeys = Object.keys(origin);
9157
- updateKeyDefine2(target, allKeys);
9312
+ updateKeyDefine3(target, allKeys);
9158
9313
  return allKeys;
9159
9314
  }
9160
9315
  });
@@ -9165,8 +9320,8 @@ var PanelData = class {
9165
9320
  };
9166
9321
 
9167
9322
  // src/service/vo/chart-data/chart-data.ts
9168
- import { createUUID as createUUID5 } from "qx-util";
9169
- function updateKeyDefine3(target, keys) {
9323
+ import { createUUID as createUUID6 } from "qx-util";
9324
+ function updateKeyDefine4(target, keys) {
9170
9325
  keys.forEach((key) => {
9171
9326
  if (!Object.prototype.hasOwnProperty.call(target, key)) {
9172
9327
  Object.defineProperty(target, key, {
@@ -9183,7 +9338,7 @@ var ChartData = class {
9183
9338
  this._seriesModelId = seriesModel == null ? void 0 : seriesModel.id;
9184
9339
  this._catalog = catalog;
9185
9340
  this._groupName = groupName;
9186
- this._uuid = createUUID5();
9341
+ this._uuid = createUUID6();
9187
9342
  return new Proxy(this, {
9188
9343
  set(target, p, value) {
9189
9344
  if (Object.prototype.hasOwnProperty.call(deData, p)) {
@@ -9205,7 +9360,7 @@ var ChartData = class {
9205
9360
  const allKeys = [
9206
9361
  .../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
9207
9362
  ];
9208
- updateKeyDefine3(target, allKeys);
9363
+ updateKeyDefine4(target, allKeys);
9209
9364
  return allKeys;
9210
9365
  }
9211
9366
  });
@@ -9342,7 +9497,7 @@ var GanttCodeListNodeData = class extends TreeCodeListNodeData {
9342
9497
  };
9343
9498
 
9344
9499
  // src/service/mqtt/mqtt.service.ts
9345
- import { QXEvent as QXEvent3, createUUID as createUUID6, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
9500
+ import { QXEvent as QXEvent3, createUUID as createUUID7, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
9346
9501
  var MqttService = class {
9347
9502
  /**
9348
9503
  * Creates an instance of MqttService.
@@ -9376,7 +9531,7 @@ var MqttService = class {
9376
9531
  // 超时时间
9377
9532
  connectTimeout: 6e3,
9378
9533
  // 认证信息
9379
- clientId: createUUID6(),
9534
+ clientId: createUUID7(),
9380
9535
  username: "",
9381
9536
  password: "",
9382
9537
  // 心跳时间
@@ -9436,7 +9591,7 @@ var MqttService = class {
9436
9591
 
9437
9592
  // src/service/de-service-util.ts
9438
9593
  import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
9439
- var DEServiceUtil = class {
9594
+ var _DEServiceUtil = class _DEServiceUtil {
9440
9595
  /**
9441
9596
  * Creates an instance of DEServiceUtil.
9442
9597
  *
@@ -9452,39 +9607,37 @@ var DEServiceUtil = class {
9452
9607
  * @author chitanda
9453
9608
  * @date 2022-08-17 23:08:36
9454
9609
  * @protected
9455
- * @type {Map<string, IAppDEService>}
9610
+ * @type {Map<string, Map<string, IAppDEService>>} Map<域标识, Map<实体标识, 实体服务>>
9456
9611
  */
9457
9612
  this.cache = /* @__PURE__ */ new Map();
9458
- /**
9459
- * 实体服务构造方法缓存
9460
- * @author lxm
9461
- * @date 2023-05-15 08:37:13
9462
- * @protected
9463
- */
9464
- this.constructorCache = /* @__PURE__ */ new Map();
9465
9613
  }
9466
9614
  /**
9467
9615
  * 注册服务工厂方法
9468
9616
  *
9469
9617
  * @author chitanda
9470
9618
  * @date 2023-06-14 10:06:31
9471
- * @param {string} id
9472
- * @param {(entityModel: IAppDataEntity) => Promise<IAppDEService>} constructor
9619
+ * @param {string} id 实体标识
9620
+ * @param {DEServiceConstructor} constructor
9473
9621
  */
9474
- register(id, constructor) {
9475
- this.constructorCache.set(id, constructor);
9622
+ static register(id, constructor) {
9623
+ this.constructorCache.set(id.toUpperCase(), constructor);
9476
9624
  }
9477
9625
  /**
9478
9626
  * 根据实体标识获取实体服务
9479
9627
  *
9480
9628
  * @author chitanda
9481
- * @date 2022-12-23 10:12:24
9629
+ * @date 2023-12-22 10:12:47
9630
+ * @param {IContext} context 上下文,用于计算模型所属沙箱环境
9482
9631
  * @param {string} id 实体标识
9483
- * @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
9484
9632
  * @return {*} {Promise<IAppDEService>}
9485
9633
  */
9486
- async getService(id) {
9487
- if (!this.cache.has(id)) {
9634
+ async getService(context, id) {
9635
+ const sandboxId = context.srfsessionid;
9636
+ if (!this.cache.has(sandboxId)) {
9637
+ this.cache.set(sandboxId, /* @__PURE__ */ new Map());
9638
+ }
9639
+ const map = this.cache.get(sandboxId);
9640
+ if (!map.has(id)) {
9488
9641
  const entityModel = await ibiz.hub.getAppDataEntity(
9489
9642
  id,
9490
9643
  this.appModel.appId
@@ -9492,16 +9645,35 @@ var DEServiceUtil = class {
9492
9645
  if (!entityModel) {
9493
9646
  throw new RuntimeError21("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
9494
9647
  }
9495
- const constructor = this.constructorCache.get(id);
9648
+ const constructor = _DEServiceUtil.constructorCache.get(id.toUpperCase());
9496
9649
  let service;
9497
9650
  if (constructor) {
9498
- service = await constructor(entityModel);
9651
+ service = await constructor(sandboxId, entityModel);
9499
9652
  } else {
9500
- service = new DEService(entityModel);
9653
+ service = new DEService(sandboxId, entityModel);
9501
9654
  }
9502
- this.cache.set(id, service);
9655
+ map.set(id, service);
9503
9656
  }
9504
- return this.cache.get(id);
9657
+ return map.get(id);
9658
+ }
9659
+ /**
9660
+ * 重置服务, 删除指定域下的所有服务缓存
9661
+ *
9662
+ * @author chitanda
9663
+ * @date 2023-12-22 13:12:47
9664
+ * @param {IContext} context
9665
+ * @return {*} {void}
9666
+ */
9667
+ reset(context) {
9668
+ const sandboxId = context.srfsessionid;
9669
+ if (!this.cache.has(sandboxId)) {
9670
+ return;
9671
+ }
9672
+ const map = this.cache.get(sandboxId);
9673
+ map.forEach((service) => {
9674
+ service.destroy();
9675
+ });
9676
+ this.cache.delete(sandboxId);
9505
9677
  }
9506
9678
  /**
9507
9679
  * 清理所有服务, 当前临时域下的所有临时数据缓存
@@ -9509,11 +9681,16 @@ var DEServiceUtil = class {
9509
9681
  * @description 根据 srfsessionid 作为临时数据域
9510
9682
  * @author chitanda
9511
9683
  * @date 2022-08-18 14:08:48
9512
- * @param {IParams} context
9684
+ * @param {IContext} context
9513
9685
  */
9514
9686
  clearTempCache(context) {
9515
- this.cache.forEach((service) => {
9516
- service.local.clear(context);
9687
+ const sandboxId = context.srfsessionid;
9688
+ if (!this.cache.has(sandboxId)) {
9689
+ return;
9690
+ }
9691
+ const map = this.cache.get(sandboxId);
9692
+ map.forEach((service) => {
9693
+ service.local.clear();
9517
9694
  });
9518
9695
  }
9519
9696
  /**
@@ -9522,16 +9699,25 @@ var DEServiceUtil = class {
9522
9699
  * @date 2023-04-26 02:02:43
9523
9700
  * @param {string} appDataEntityId 实体名称
9524
9701
  * @param {string} methodName 方法名
9525
- * @param {IParams} context 上下文
9702
+ * @param {IContext} context 上下文
9526
9703
  * @param {(IData | undefined)} [params] 数据
9527
9704
  * @param {(IParams | undefined)} [params2] 视图参数
9528
9705
  * @return {*} {Promise<IHttpResponse<IData>>}
9529
9706
  */
9530
9707
  async exec(appDataEntityId, methodName, context, params, params2) {
9531
- const service = await this.getService(appDataEntityId);
9708
+ const service = await this.getService(context, appDataEntityId);
9532
9709
  return service.exec(methodName, context, params, params2);
9533
9710
  }
9534
9711
  };
9712
+ /**
9713
+ * 实体服务构造方法缓存
9714
+ *
9715
+ * @author lxm
9716
+ * @date 2023-05-15 08:37:13
9717
+ * @protected
9718
+ */
9719
+ _DEServiceUtil.constructorCache = /* @__PURE__ */ new Map();
9720
+ var DEServiceUtil = _DEServiceUtil;
9535
9721
 
9536
9722
  // src/command/app/open-app-view/open-app-view.ts
9537
9723
  var _OpenAppViewCommand = class _OpenAppViewCommand {
@@ -10105,9 +10291,9 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
10105
10291
  })(PanelNotifyState || {});
10106
10292
 
10107
10293
  // src/controller/common/view/view.controller.ts
10108
- import { createUUID as createUUID8, notNilEmpty as notNilEmpty6 } from "qx-util";
10294
+ import { notNilEmpty as notNilEmpty6 } from "qx-util";
10109
10295
  import { IBizContext as IBizContext2, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
10110
- import { isEmpty as isEmpty9, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
10296
+ import { isEmpty as isEmpty8, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
10111
10297
 
10112
10298
  // src/controller/utils/loading/loading.state.ts
10113
10299
  import { NOOP } from "@ibiz-template/core";
@@ -10382,6 +10568,9 @@ var CTX = class {
10382
10568
  }
10383
10569
  };
10384
10570
 
10571
+ // src/controller/common/base.controller.ts
10572
+ import { createUUID as createUUID9 } from "qx-util";
10573
+
10385
10574
  // src/controller/utils/counter/mounted-counter.ts
10386
10575
  var ActivityCounter = class extends Counter {
10387
10576
  constructor() {
@@ -10922,7 +11111,7 @@ var ValueExUtil = class {
10922
11111
  // src/controller/utils/value-default/value-default.ts
10923
11112
  import { RuntimeError as RuntimeError28, ModelError as ModelError16 } from "@ibiz-template/core";
10924
11113
  import dayjs from "dayjs";
10925
- import { createUUID as createUUID7 } from "qx-util";
11114
+ import { createUUID as createUUID8 } from "qx-util";
10926
11115
  import { isNil as isNil16, isNotNil } from "ramda";
10927
11116
  function getDefaultValue(opts, origins) {
10928
11117
  var _a;
@@ -10967,7 +11156,7 @@ function getDefaultValue(opts, origins) {
10967
11156
  case "CONTEXT":
10968
11157
  return params[defaultValue];
10969
11158
  case "UNIQUEID":
10970
- return createUUID7();
11159
+ return createUUID8();
10971
11160
  default:
10972
11161
  throw new ModelError16({}, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
10973
11162
  }
@@ -11066,6 +11255,7 @@ var BaseController = class {
11066
11255
  this.context = context;
11067
11256
  this.params = params;
11068
11257
  this.ctx = ctx;
11258
+ this.id = createUUID9();
11069
11259
  this.state = {};
11070
11260
  /**
11071
11261
  * 控制器名称,作为检索控制器的唯一标识
@@ -11684,11 +11874,14 @@ var ViewController = class extends BaseController {
11684
11874
  await Promise.all(this.engines.map((engine) => engine.onDestroyed()));
11685
11875
  }
11686
11876
  this.ctx.destroy();
11687
- this.context.destroy();
11688
11877
  this.engines = [];
11689
11878
  if (this.scheduler) {
11690
11879
  this.scheduler.destroy();
11691
11880
  }
11881
+ if (this.id === this.context.srfsessionid) {
11882
+ ibiz.uiDomainManager.destroy(this.context.srfsessionid);
11883
+ }
11884
+ this.context.destroy();
11692
11885
  ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u9500\u6BC1"));
11693
11886
  }
11694
11887
  /**
@@ -11700,8 +11893,9 @@ var ViewController = class extends BaseController {
11700
11893
  */
11701
11894
  handleContextParams() {
11702
11895
  this.context.srfappid = this.model.appId;
11703
- if (isNil18(this.context.srfsessionid) || isEmpty9(this.context.srfsessionid)) {
11704
- this.context.srfsessionid = createUUID8();
11896
+ if (isNil18(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
11897
+ const domain = ibiz.uiDomainManager.create(this.id);
11898
+ this.context.srfsessionid = domain.id;
11705
11899
  }
11706
11900
  const navContexts = this.model.appViewNavContexts;
11707
11901
  let context = {};
@@ -11857,9 +12051,11 @@ var WFStepTraceViewController = class extends ViewController {
11857
12051
  var _a;
11858
12052
  await super.onCreated();
11859
12053
  const app = ibiz.hub.getApp(this.context.srfappid);
11860
- if ((_a = this.ctx.parent) == null ? void 0 : _a.view.model.appDataEntityId) {
12054
+ const view = (_a = this.ctx.parent) == null ? void 0 : _a.view;
12055
+ if (view && view.model.appDataEntityId) {
11861
12056
  const entityService = await app.deService.getService(
11862
- this.ctx.parent.view.model.appDataEntityId
12057
+ view.context,
12058
+ view.model.appDataEntityId
11863
12059
  );
11864
12060
  const params = Object.assign(this.context.clone(), this.params);
11865
12061
  const res = await entityService.wf.getWFHistory(params);
@@ -12503,7 +12699,10 @@ var MDControlController = class extends ControlController {
12503
12699
  if (this.state.isSimple) {
12504
12700
  return [];
12505
12701
  }
12506
- await this.startLoading();
12702
+ const silent = args.silent === true;
12703
+ if (!silent) {
12704
+ await this.startLoading();
12705
+ }
12507
12706
  try {
12508
12707
  const isInitialLoad = args.isInitialLoad === true;
12509
12708
  const isLoadMore = args.isLoadMore === true;
@@ -12535,7 +12734,9 @@ var MDControlController = class extends ControlController {
12535
12734
  });
12536
12735
  throw error;
12537
12736
  } finally {
12538
- await this.endLoading();
12737
+ if (!silent) {
12738
+ await this.endLoading();
12739
+ }
12539
12740
  }
12540
12741
  this.state.items.forEach((item, index) => {
12541
12742
  item.srfserialnum = index + 1;
@@ -12947,7 +13148,7 @@ var CalendarService = class extends MDControlService {
12947
13148
  *
12948
13149
  * @author zk
12949
13150
  * @date 2023-08-08 10:08:47
12950
- * @param {IParams} context
13151
+ * @param {IContext} context
12951
13152
  * @param {IParams} [params={}]
12952
13153
  * @return {*} Promise<ICalendarItemData[]>
12953
13154
  * @memberof CalendarService
@@ -13006,7 +13207,7 @@ var CalendarService = class extends MDControlService {
13006
13207
  * @author zk
13007
13208
  * @date 2023-08-08 06:08:49
13008
13209
  * @param {string} methodName
13009
- * @param {IParams} context
13210
+ * @param {IContext} context
13010
13211
  * @param {IData} [data={}]
13011
13212
  * @param {IParams} [params={}]
13012
13213
  * @param {string} [appDataEntityId=this.model.appDataEntityId!]
@@ -14379,7 +14580,7 @@ import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError46 }
14379
14580
 
14380
14581
  // src/ui-action/provider/backend-ui-action-provider.ts
14381
14582
  import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
14382
- import { isArray as isArray9 } from "qx-util";
14583
+ import { isArray as isArray8 } from "qx-util";
14383
14584
 
14384
14585
  // src/ui-action/provider/ui-action-provider-base.ts
14385
14586
  import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
@@ -15466,7 +15667,7 @@ var UILogicParam = class {
15466
15667
  const m = this.model;
15467
15668
  const { parameters } = ctx;
15468
15669
  const { context, params, data } = parameters;
15469
- const app = ibiz.hub.getApp(context.srfappid);
15670
+ const app = ibiz.hub.getApp(m.appId);
15470
15671
  if (m.codeName === "layoutPanel") {
15471
15672
  ctx.params[tag] = parameters.view.layoutPanel.panelItems;
15472
15673
  return;
@@ -16106,7 +16307,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
16106
16307
  }
16107
16308
  }
16108
16309
  Object.assign(actionResult, {
16109
- data: isArray9(res.data) ? res.data : [res.data],
16310
+ data: isArray8(res.data) ? res.data : [res.data],
16110
16311
  nextContext: resultContext,
16111
16312
  nextParams: tempParams
16112
16313
  });
@@ -18543,7 +18744,7 @@ var FormService = class extends ControlService {
18543
18744
  * @author lxm
18544
18745
  * @date 2023-12-13 03:16:19
18545
18746
  * @param {IData} data 表单数据
18546
- * @param {IParams} context 上下文
18747
+ * @param {IContext} context 上下文
18547
18748
  * @param {IParams} params 视图参数
18548
18749
  * @param {('create' | 'update')} type 新建还是更新
18549
18750
  */
@@ -18584,7 +18785,7 @@ var SearchFormService = class extends FormService {
18584
18785
  *
18585
18786
  * @author lxm
18586
18787
  * @date 2022-08-31 17:08:41
18587
- * @param {IParams} context 上下文
18788
+ * @param {IContext} context 上下文
18588
18789
  * @param {IParams} [params={}] 视图参数
18589
18790
  * @returns {*} {Promise<IHttpResponse>}
18590
18791
  */
@@ -19185,15 +19386,11 @@ var FormDetailController = class {
19185
19386
  calcDynaClass(data) {
19186
19387
  if (this.model.dynaClass) {
19187
19388
  const dynaClass = calcDynaClass(this.model.dynaClass, data);
19188
- if (dynaClass.length) {
19189
- this.state.class.containerDyna = dynaClass;
19190
- }
19389
+ this.state.class.containerDyna = dynaClass;
19191
19390
  }
19192
19391
  if (this.model.labelDynaClass) {
19193
19392
  const dynaClass = calcDynaClass(this.model.labelDynaClass, data);
19194
- if (dynaClass.length) {
19195
- this.state.class.labelDyna = dynaClass;
19196
- }
19393
+ this.state.class.labelDyna = dynaClass;
19197
19394
  }
19198
19395
  }
19199
19396
  /**
@@ -19354,7 +19551,7 @@ var FormButtonController = class extends FormDetailController {
19354
19551
 
19355
19552
  // src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
19356
19553
  import { isOverlap as isOverlap2 } from "@ibiz-template/core";
19357
- import { createUUID as createUUID9, notNilEmpty as notNilEmpty8 } from "qx-util";
19554
+ import { createUUID as createUUID10, notNilEmpty as notNilEmpty8 } from "qx-util";
19358
19555
 
19359
19556
  // src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
19360
19557
  var FormDruipartState = class extends FormDetailState {
@@ -19467,7 +19664,7 @@ var FormDRUIPartController = class extends FormDetailController {
19467
19664
  this.form.context
19468
19665
  );
19469
19666
  if (!this.state.viewComponentKey) {
19470
- this.state.viewComponentKey = createUUID9();
19667
+ this.state.viewComponentKey = createUUID10();
19471
19668
  this.navContext = newContext;
19472
19669
  this.navParams = newParams;
19473
19670
  } else if (JSON.stringify(this.navContext) !== JSON.stringify(newContext) || JSON.stringify(this.navParams) !== JSON.stringify(newParams)) {
@@ -20194,7 +20391,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
20194
20391
 
20195
20392
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
20196
20393
  import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
20197
- import { createUUID as createUUID10 } from "qx-util";
20394
+ import { createUUID as createUUID11 } from "qx-util";
20198
20395
 
20199
20396
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
20200
20397
  var FormMDCtrlFormState = class extends FormDetailState {
@@ -20330,7 +20527,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
20330
20527
  this.state.items = [];
20331
20528
  }
20332
20529
  const item = {
20333
- id: createUUID10(),
20530
+ id: createUUID11(),
20334
20531
  context,
20335
20532
  params
20336
20533
  };
@@ -20581,7 +20778,7 @@ import {
20581
20778
  RuntimeError as RuntimeError51
20582
20779
  } from "@ibiz-template/core";
20583
20780
  import { debounce as debounce2 } from "lodash-es";
20584
- import { createUUID as createUUID11 } from "qx-util";
20781
+ import { createUUID as createUUID12 } from "qx-util";
20585
20782
  import { clone as clone21 } from "ramda";
20586
20783
 
20587
20784
  // src/controller/control/form/edit-form/edit-form.service.ts
@@ -20595,7 +20792,7 @@ var EditFormService = class extends FormService {
20595
20792
  *
20596
20793
  * @author lxm
20597
20794
  * @date 2022-08-31 17:08:41
20598
- * @param {IParams} context 上下文
20795
+ * @param {IContext} context 上下文
20599
20796
  * @param {IParams} [params={}] 视图参数
20600
20797
  * @returns {*} {Promise<IHttpResponse>}
20601
20798
  */
@@ -20618,7 +20815,7 @@ var EditFormService = class extends FormService {
20618
20815
  *
20619
20816
  * @author lxm
20620
20817
  * @date 2022-08-31 17:08:41
20621
- * @param {IParams} context 上下文
20818
+ * @param {IContext} context 上下文
20622
20819
  * @param {IParams} [params={}] 视图参数
20623
20820
  * @returns {*} {Promise<IHttpResponse>}
20624
20821
  */
@@ -20641,7 +20838,7 @@ var EditFormService = class extends FormService {
20641
20838
  *
20642
20839
  * @author lxm
20643
20840
  * @date 2022-09-07 19:09:48
20644
- * @param {IParams} context 上下文
20841
+ * @param {IContext} context 上下文
20645
20842
  * @param {IParams} [params={}] 视图参数
20646
20843
  * @returns {*}
20647
20844
  */
@@ -20660,7 +20857,7 @@ var EditFormService = class extends FormService {
20660
20857
  *
20661
20858
  * @author lxm
20662
20859
  * @date 2022-09-07 19:09:11
20663
- * @param {IParams} context 上下文
20860
+ * @param {IContext} context 上下文
20664
20861
  * @param {IData} data 数据
20665
20862
  * @returns {*}
20666
20863
  */
@@ -20681,7 +20878,7 @@ var EditFormService = class extends FormService {
20681
20878
  *
20682
20879
  * @author lxm
20683
20880
  * @date 2022-09-07 19:09:11
20684
- * @param {IParams} context 上下文
20881
+ * @param {IContext} context 上下文
20685
20882
  * @param {IData} data 数据
20686
20883
  * @returns {*}
20687
20884
  */
@@ -20702,7 +20899,7 @@ var EditFormService = class extends FormService {
20702
20899
  *
20703
20900
  * @author lxm
20704
20901
  * @date 2022-09-07 19:09:11
20705
- * @param {IParams} context 上下文
20902
+ * @param {IContext} context 上下文
20706
20903
  * @param {IData} data 数据
20707
20904
  * @returns {*}
20708
20905
  */
@@ -20727,7 +20924,7 @@ var EditFormService = class extends FormService {
20727
20924
  * @author lxm
20728
20925
  * @date 2022-09-15 21:09:34
20729
20926
  * @param {string} methodName
20730
- * @param {IParams} context
20927
+ * @param {IContext} context
20731
20928
  * @param {IParams} [params={}]
20732
20929
  * @returns {*} {Promise<IHttpResponse<ControlVO>>}
20733
20930
  */
@@ -20741,7 +20938,7 @@ var EditFormService = class extends FormService {
20741
20938
  *
20742
20939
  * @author lxm
20743
20940
  * @date 2022-09-07 19:09:11
20744
- * @param {IParams} context 上下文
20941
+ * @param {IContext} context 上下文
20745
20942
  * @param {IData} data 数据
20746
20943
  * @param {IParams} [params={}] 视图参数
20747
20944
  * @returns {*}
@@ -20751,6 +20948,7 @@ var EditFormService = class extends FormService {
20751
20948
  const wfForm = this.model;
20752
20949
  const methodName = ((_a = wfForm.wfstartControlAction) == null ? void 0 : _a.appDEMethodId) || "wfstart";
20753
20950
  const entityService = await this.app.deService.getService(
20951
+ context,
20754
20952
  this.model.appDataEntityId
20755
20953
  );
20756
20954
  return entityService.wf.exec(
@@ -20765,7 +20963,7 @@ var EditFormService = class extends FormService {
20765
20963
  *
20766
20964
  * @author lxm
20767
20965
  * @date 2022-09-07 19:09:11
20768
- * @param {IParams} context 上下文
20966
+ * @param {IContext} context 上下文
20769
20967
  * @param {IData} data 数据
20770
20968
  * @param {IParams} [params={}] 视图参数
20771
20969
  * @returns {*}
@@ -20780,6 +20978,7 @@ var EditFormService = class extends FormService {
20780
20978
  methodName = ((_a = wfForm.wfsubmitControlAction) == null ? void 0 : _a.appDEMethodId) || "wfsubmit";
20781
20979
  }
20782
20980
  const entityService = await this.app.deService.getService(
20981
+ context,
20783
20982
  this.model.appDataEntityId
20784
20983
  );
20785
20984
  return entityService.wf.exec(
@@ -20962,7 +21161,7 @@ var EditFormController = class extends FormController {
20962
21161
  await this.endLoading();
20963
21162
  }
20964
21163
  res.data.srfkey = void 0;
20965
- res.data.tempsrfkey = createUUID11();
21164
+ res.data.tempsrfkey = createUUID12();
20966
21165
  this.state.modified = false;
20967
21166
  this.state.data = res.data;
20968
21167
  this.formStateNotify("LOAD" /* LOAD */);
@@ -21579,12 +21778,13 @@ var GridService = class extends MDControlService {
21579
21778
  * @author lxm
21580
21779
  * @date 2022-09-15 21:09:34
21581
21780
  * @param {string} methodName
21582
- * @param {IParams} context
21781
+ * @param {IContext} context
21583
21782
  * @param {IParams} [params={}]
21584
21783
  * @returns {*} {Promise<IHttpResponse<ControlVO>>}
21585
21784
  */
21586
21785
  async updateGridEditItem(methodName, context, params = {}) {
21587
21786
  const entityService = await this.app.deService.getService(
21787
+ context,
21588
21788
  this.model.appDataEntityId
21589
21789
  );
21590
21790
  let res = await entityService.exec(methodName, context, params);
@@ -22331,7 +22531,8 @@ var GridController = class extends MDControlController {
22331
22531
  if (item.codeListId) {
22332
22532
  tempExportColumn.codeList = app.codeList.getCodeList(item.codeListId);
22333
22533
  tempExportColumn.codeListItems = await app.codeList.get(
22334
- item.codeListId
22534
+ item.codeListId,
22535
+ this.context
22335
22536
  );
22336
22537
  }
22337
22538
  return tempExportColumn;
@@ -22541,6 +22742,36 @@ var GridController = class extends MDControlController {
22541
22742
  convertColumnCaption(this.model.degridColumns);
22542
22743
  }
22543
22744
  }
22745
+ /**
22746
+ * 控制列显示
22747
+ * @param {IColumnState} columnState
22748
+ * @return {*}
22749
+ * @author: zhujiamin
22750
+ * @Date: 2023-12-19 16:02:14
22751
+ */
22752
+ setColumnVisible(columnState) {
22753
+ columnState.hidden = !columnState.hidden;
22754
+ }
22755
+ /**
22756
+ * 设置点击分组后回显相关参数
22757
+ * @param {IData} data
22758
+ * @return {*}
22759
+ * @author: zhujiamin
22760
+ * @Date: 2023-12-21 10:54:45
22761
+ */
22762
+ setGroupParams(data) {
22763
+ if (data.sort) {
22764
+ this.state.sortQuery = data.sort;
22765
+ } else {
22766
+ this.state.sortQuery = "";
22767
+ }
22768
+ if (data.columnstates) {
22769
+ this.state.columnStates = data.columnstates;
22770
+ } else {
22771
+ this.state.columnStates = [];
22772
+ this.initColumnStates();
22773
+ }
22774
+ }
22544
22775
  };
22545
22776
 
22546
22777
  // src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
@@ -24131,7 +24362,7 @@ var PickupViewPanelController = class extends ControlController {
24131
24362
  };
24132
24363
 
24133
24364
  // src/controller/control/search-bar/search-bar.controller.ts
24134
- import { recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
24365
+ import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
24135
24366
  import { isNil as isNil23 } from "ramda";
24136
24367
 
24137
24368
  // src/controller/control/search-bar/search-bar-filter.controller.ts
@@ -24145,33 +24376,159 @@ var SearchBarFilterController = class {
24145
24376
  if (model.appDEFieldId) {
24146
24377
  field = findFieldById(searchBar.appDataEntity, model.appDEFieldId);
24147
24378
  }
24148
- this.fieldName = field ? field.codeName.toLowerCase() : model.id;
24149
- this.label = model.caption || (field == null ? void 0 : field.logicName) || model.id;
24150
- this.valueOP = (_a = model.defsearchMode) == null ? void 0 : _a.valueOP;
24379
+ this.fieldName = field ? field.codeName.toLowerCase() : model.id;
24380
+ this.label = model.caption || (field == null ? void 0 : field.logicName) || model.id;
24381
+ this.valueOP = (_a = model.defsearchMode) == null ? void 0 : _a.valueOP;
24382
+ }
24383
+ get context() {
24384
+ return this.searchBar.context;
24385
+ }
24386
+ get params() {
24387
+ return this.searchBar.params;
24388
+ }
24389
+ /**
24390
+ * 初始化
24391
+ * @author lxm
24392
+ * @date 2023-10-12 05:47:19
24393
+ * @return {*} {Promise<void>}
24394
+ */
24395
+ async init() {
24396
+ if (!this.model.editor) {
24397
+ throw new RuntimeModelError59(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
24398
+ }
24399
+ this.editorProvider = await getEditorProvider(this.model.editor);
24400
+ if (this.editorProvider) {
24401
+ this.editor = await this.editorProvider.createController(
24402
+ this.model.editor,
24403
+ this
24404
+ );
24405
+ }
24406
+ }
24407
+ };
24408
+
24409
+ // src/controller/control/search-bar/search-bar.service.ts
24410
+ var SearchBarService = class {
24411
+ /**
24412
+ * Creates an instance of ControlService.
24413
+ *
24414
+ */
24415
+ constructor(model, viewTag) {
24416
+ /**
24417
+ * 主题管理URL
24418
+ * @return {*}
24419
+ * @author: zhujiamin
24420
+ * @Date: 2023-12-22 10:51:49
24421
+ */
24422
+ this.themeUrl = "/extension/app_view_themes";
24423
+ this.model = model;
24424
+ this.viewTag = viewTag;
24425
+ }
24426
+ async init(_context) {
24427
+ this.app = ibiz.hub.getApp(this.model.appId);
24428
+ }
24429
+ /**
24430
+ * 执行查询多条数据的方法
24431
+ *
24432
+ */
24433
+ async fetch() {
24434
+ const res = await this.app.net.post("".concat(this.themeUrl, "/fetch_default"), {
24435
+ app_view_tag: this.viewTag,
24436
+ sort: "create_time,asc"
24437
+ });
24438
+ if (res.ok) {
24439
+ res.data = this.convertBackDataToFront(res.data);
24440
+ }
24441
+ return res;
24442
+ }
24443
+ /**
24444
+ * 执行获取单条数据方法
24445
+ *
24446
+ */
24447
+ async get(id) {
24448
+ const res = await this.app.net.get("".concat(this.themeUrl, "/").concat(id), {
24449
+ app_view_tag: this.viewTag
24450
+ });
24451
+ if (res.ok) {
24452
+ [res.data] = this.convertBackDataToFront([res.data]);
24453
+ }
24454
+ return res;
24151
24455
  }
24152
- get context() {
24153
- return this.searchBar.context;
24456
+ /**
24457
+ * 删除单条数据
24458
+ *
24459
+ */
24460
+ async remove(id) {
24461
+ const res = await this.app.net.delete("".concat(this.themeUrl, "/").concat(id), {
24462
+ app_view_tag: this.viewTag
24463
+ });
24464
+ return res;
24154
24465
  }
24155
- get params() {
24156
- return this.searchBar.params;
24466
+ /**
24467
+ * 新建数据
24468
+ *
24469
+ */
24470
+ async create(caption) {
24471
+ const res = await this.app.net.post("".concat(this.themeUrl), {
24472
+ name: caption,
24473
+ app_view_tag: this.viewTag
24474
+ });
24475
+ return res;
24157
24476
  }
24158
24477
  /**
24159
- * 初始化
24160
- * @author lxm
24161
- * @date 2023-10-12 05:47:19
24162
- * @return {*} {Promise<void>}
24478
+ * 新建数据(带参数,给平台配置建立的分组用)
24479
+ *
24163
24480
  */
24164
- async init() {
24165
- if (!this.model.editor) {
24166
- throw new RuntimeModelError59(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
24481
+ async createWithParams(id, data) {
24482
+ const res = await this.app.net.post("".concat(this.themeUrl), {
24483
+ id,
24484
+ theme_model: JSON.stringify(data),
24485
+ app_view_tag: this.viewTag,
24486
+ show: data.show
24487
+ });
24488
+ return res;
24489
+ }
24490
+ /**
24491
+ * 更新数据
24492
+ *
24493
+ */
24494
+ async update(id, data) {
24495
+ const updateParams = { app_view_tag: this.viewTag };
24496
+ if (data.theme_model) {
24497
+ Object.assign(updateParams, {
24498
+ theme_model: JSON.stringify(data.theme_model)
24499
+ });
24167
24500
  }
24168
- this.editorProvider = await getEditorProvider(this.model.editor);
24169
- if (this.editorProvider) {
24170
- this.editor = await this.editorProvider.createController(
24171
- this.model.editor,
24172
- this
24173
- );
24501
+ if (data.caption) {
24502
+ Object.assign(updateParams, {
24503
+ name: data.caption
24504
+ });
24505
+ }
24506
+ if (typeof data.show === "boolean") {
24507
+ Object.assign(updateParams, {
24508
+ show: data.show
24509
+ });
24174
24510
  }
24511
+ const res = await this.app.net.put("".concat(this.themeUrl, "/").concat(id), updateParams);
24512
+ return res;
24513
+ }
24514
+ /**
24515
+ * 转换后台数据成前端需要的格式
24516
+ * @param {IData} data
24517
+ * @return {*}
24518
+ * @author: zhujiamin
24519
+ * @Date: 2023-12-22 11:19:50
24520
+ */
24521
+ convertBackDataToFront(data) {
24522
+ return data.map((item) => {
24523
+ const tempItem = { ...item };
24524
+ if (item.name) {
24525
+ tempItem.caption = item.name;
24526
+ }
24527
+ if (item.theme_model) {
24528
+ tempItem.searchGroupData = JSON.parse(item.theme_model);
24529
+ }
24530
+ return tempItem;
24531
+ });
24175
24532
  }
24176
24533
  };
24177
24534
 
@@ -24193,6 +24550,29 @@ var SearchBarController = class extends ControlController {
24193
24550
  * @type {SearchBarFilterController[]}
24194
24551
  */
24195
24552
  this.filterControllers = [];
24553
+ /**
24554
+ * 当前编辑的分组
24555
+ * @return {*}
24556
+ * @author: zhujiamin
24557
+ * @Date: 2023-12-20 18:06:37
24558
+ */
24559
+ this.currentEditGroup = null;
24560
+ /**
24561
+ * 是否为后台分组
24562
+ * @return {*}
24563
+ * @author: zhujiamin
24564
+ * @Date: 2023-12-21 10:17:43
24565
+ */
24566
+ this.isBackendSearchGroup = true;
24567
+ }
24568
+ /**
24569
+ * 表格控制器
24570
+ * @return {*}
24571
+ * @author: zhujiamin
24572
+ * @Date: 2023-12-22 13:50:16
24573
+ */
24574
+ get grid() {
24575
+ return this.ctx.getController("grid");
24196
24576
  }
24197
24577
  initState() {
24198
24578
  super.initState();
@@ -24202,6 +24582,8 @@ var SearchBarController = class extends ControlController {
24202
24582
  if (this.model.enableFilter) {
24203
24583
  this.resetFilter();
24204
24584
  }
24585
+ this.state.searchBarGroups = [];
24586
+ this.state.selectedSearchGroupItem = null;
24205
24587
  }
24206
24588
  async onCreated() {
24207
24589
  await super.onCreated();
@@ -24213,7 +24595,12 @@ var SearchBarController = class extends ControlController {
24213
24595
  this.appDataEntity = appDataEntity;
24214
24596
  this.calcQuickSearchPlaceholder();
24215
24597
  }
24598
+ if (this.isBackendSearchGroup && this.view.model.codeName) {
24599
+ this.service = new SearchBarService(this.model, this.view.model.codeName);
24600
+ await this.service.init(this.context);
24601
+ }
24216
24602
  await this.initSearchBarFilters();
24603
+ await this.initSearBarGroups();
24217
24604
  }
24218
24605
  /**
24219
24606
  * 计算快速搜索的占位
@@ -24279,7 +24666,7 @@ var SearchBarController = class extends ControlController {
24279
24666
  if (this.state.query) {
24280
24667
  params.query = this.state.query;
24281
24668
  }
24282
- if ((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) {
24669
+ if (((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) && typeof this.state.selectedGroupItem.data === "string") {
24283
24670
  const navParams = ScriptFactory.execSingleLine(
24284
24671
  this.state.selectedGroupItem.data
24285
24672
  );
@@ -24298,13 +24685,7 @@ var SearchBarController = class extends ControlController {
24298
24685
  * @date 2023-10-16 03:52:44
24299
24686
  */
24300
24687
  resetFilter() {
24301
- this.state.filterNodes = [
24302
- {
24303
- leaf: false,
24304
- logicType: "AND",
24305
- children: [{ leaf: true, field: null, valueOP: null, value: null }]
24306
- }
24307
- ];
24688
+ this.state.filterNodes = this.getOriginFilterNodes();
24308
24689
  this.evt.emit("onSearch", void 0);
24309
24690
  }
24310
24691
  /**
@@ -24375,6 +24756,123 @@ var SearchBarController = class extends ControlController {
24375
24756
  value: node.value
24376
24757
  };
24377
24758
  }
24759
+ /**
24760
+ * 获取初始过滤项树节点数据集合
24761
+ * @return {*}
24762
+ * @author: zhujiamin
24763
+ * @Date: 2023-12-21 17:29:47
24764
+ */
24765
+ getOriginFilterNodes() {
24766
+ return [
24767
+ {
24768
+ leaf: false,
24769
+ logicType: "AND",
24770
+ children: [{ leaf: true, field: null, valueOP: null, value: null }]
24771
+ }
24772
+ ];
24773
+ }
24774
+ /**
24775
+ * 初始化搜索栏分组项(获取后台分组清单并合并模型)
24776
+ * @return {*}
24777
+ * @author: zhujiamin
24778
+ * @Date: 2023-12-19 14:43:46
24779
+ */
24780
+ async initSearBarGroups() {
24781
+ this.state.searchBarGroups = [];
24782
+ if (this.isBackendSearchGroup) {
24783
+ if (this.model.searchBarGroups && this.model.searchBarGroups.length > 0) {
24784
+ this.state.searchBarGroups = this.model.searchBarGroups.map((item) => ({
24785
+ ...item,
24786
+ show: true,
24787
+ saved: false,
24788
+ searchGroupData: {}
24789
+ }));
24790
+ }
24791
+ const res = await this.service.fetch();
24792
+ if (res.ok) {
24793
+ res.data.forEach((group) => {
24794
+ const existGroup = this.state.searchBarGroups.find(
24795
+ (item) => item.id === group.id
24796
+ );
24797
+ if (existGroup) {
24798
+ mergeInLeft3(existGroup, group);
24799
+ existGroup.saved = true;
24800
+ } else {
24801
+ this.state.searchBarGroups.push({
24802
+ ...group,
24803
+ appId: this.context.srfappid,
24804
+ show: true,
24805
+ saved: true,
24806
+ searchGroupData: {}
24807
+ });
24808
+ }
24809
+ });
24810
+ }
24811
+ }
24812
+ }
24813
+ /**
24814
+ * 处理保存
24815
+ * @return {*}
24816
+ * @author: zhujiamin
24817
+ * @Date: 2023-12-19 16:17:15
24818
+ */
24819
+ async handleSave() {
24820
+ if (this.grid && this.state.selectedSearchGroupItem) {
24821
+ const filters = this.calcFilters();
24822
+ const saveParams = {
24823
+ filternodes: this.state.filterNodes,
24824
+ searchconds: filters,
24825
+ sort: this.grid.state.sortQuery,
24826
+ columnstates: this.grid.state.columnStates,
24827
+ show: this.state.selectedSearchGroupItem.show
24828
+ };
24829
+ if (this.state.selectedSearchGroupItem.saved) {
24830
+ await this.service.update(this.state.selectedSearchGroupItem.id, {
24831
+ theme_model: saveParams,
24832
+ show: this.state.selectedSearchGroupItem.show
24833
+ });
24834
+ ibiz.message.success("\u4FDD\u5B58\u6210\u529F");
24835
+ } else {
24836
+ const res = await this.service.createWithParams(
24837
+ this.state.selectedSearchGroupItem.id,
24838
+ saveParams
24839
+ );
24840
+ if (res.ok) {
24841
+ const savedGroup = this.state.searchBarGroups.find(
24842
+ (group) => group.id === res.data.id
24843
+ );
24844
+ if (savedGroup) {
24845
+ savedGroup.saved = true;
24846
+ }
24847
+ ibiz.message.success("\u4FDD\u5B58\u6210\u529F");
24848
+ }
24849
+ }
24850
+ }
24851
+ }
24852
+ /**
24853
+ * 处理点击后台分组
24854
+ * @return {*}
24855
+ * @author: zhujiamin
24856
+ * @Date: 2023-12-21 10:29:24
24857
+ */
24858
+ async handleGroupClick(groupItem) {
24859
+ this.state.selectedSearchGroupItem = groupItem;
24860
+ if (groupItem.saved) {
24861
+ const res = await this.service.get(groupItem.id);
24862
+ if (res.ok) {
24863
+ mergeInLeft3(groupItem, res.data);
24864
+ }
24865
+ }
24866
+ if (groupItem.searchGroupData && groupItem.searchGroupData.filternodes) {
24867
+ this.state.filterNodes = groupItem.searchGroupData.filternodes;
24868
+ } else {
24869
+ this.state.filterNodes = this.getOriginFilterNodes();
24870
+ }
24871
+ if (this.grid && groupItem && groupItem.searchGroupData) {
24872
+ this.grid.setGroupParams(groupItem.searchGroupData);
24873
+ await this.grid.load({ isInitialLoad: true });
24874
+ }
24875
+ }
24378
24876
  };
24379
24877
 
24380
24878
  // src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts
@@ -24927,6 +25425,9 @@ var TreeController = class extends MDControlController {
24927
25425
  */
24928
25426
  this.nodeClickTBUIActionItem = /* @__PURE__ */ new Map();
24929
25427
  }
25428
+ get _evt() {
25429
+ return this.evt;
25430
+ }
24930
25431
  initState() {
24931
25432
  super.initState();
24932
25433
  this.state.defaultExpandedKeys = [];
@@ -24965,8 +25466,7 @@ var TreeController = class extends MDControlController {
24965
25466
  }
24966
25467
  this.initDropNodeRss();
24967
25468
  this.initNodeClickTBUIActionItem();
24968
- this.service = new TreeService(this.model);
24969
- await this.service.init(this.context);
25469
+ await this.initService();
24970
25470
  this.model.detreeNodes.forEach((node) => {
24971
25471
  var _a2, _b2;
24972
25472
  if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
@@ -24982,6 +25482,17 @@ var TreeController = class extends MDControlController {
24982
25482
  Object.values(this.contextMenus).map((menu) => menu.created())
24983
25483
  );
24984
25484
  }
25485
+ /**
25486
+ * 初始化对应类型的部件服务
25487
+ * @author lxm
25488
+ * @date 2023-12-21 11:25:33
25489
+ * @protected
25490
+ * @return {*} {Promise<void>}
25491
+ */
25492
+ async initService() {
25493
+ this.service = new TreeService(this.model);
25494
+ await this.service.init(this.context);
25495
+ }
24985
25496
  /**
24986
25497
  * 初始化节点拖入关系处理
24987
25498
  * @author lxm
@@ -25056,7 +25567,7 @@ var TreeController = class extends MDControlController {
25056
25567
  }
25057
25568
  await this.afterLoad(args, nodes);
25058
25569
  this.state.isLoaded = true;
25059
- await this.evt.emit("onLoadSuccess", {
25570
+ await this._evt.emit("onLoadSuccess", {
25060
25571
  isInitialLoad
25061
25572
  });
25062
25573
  return nodes;
@@ -25095,6 +25606,17 @@ var TreeController = class extends MDControlController {
25095
25606
  } else {
25096
25607
  this.state.rootNodes = nodes;
25097
25608
  }
25609
+ await this.afterLoadNodes(nodes);
25610
+ return nodes;
25611
+ }
25612
+ /**
25613
+ * loadNodes加载完子数据之后的处理
25614
+ * @author lxm
25615
+ * @date 2023-12-22 02:37:50
25616
+ * @param {ITreeNodeData[]} nodes 加载回来的子数据
25617
+ * @return {*} {Promise<void>}
25618
+ */
25619
+ async afterLoadNodes(nodes) {
25098
25620
  this.state.items = [];
25099
25621
  recursiveIterate10(
25100
25622
  { children: this.state.rootNodes },
@@ -25103,7 +25625,6 @@ var TreeController = class extends MDControlController {
25103
25625
  }
25104
25626
  );
25105
25627
  this.state.expandedKeys = this.calcExpandedKeys(nodes);
25106
- return nodes;
25107
25628
  }
25108
25629
  /**
25109
25630
  * 树节点点击事件
@@ -25170,7 +25691,7 @@ var TreeController = class extends MDControlController {
25170
25691
  }
25171
25692
  setActive(item) {
25172
25693
  const nodeParams = this.parseTreeNodeData(item);
25173
- return this.evt.emit("onActive", { ...nodeParams, nodeData: item });
25694
+ return this._evt.emit("onActive", { ...nodeParams, nodeData: item });
25174
25695
  }
25175
25696
  setSelection(selection) {
25176
25697
  const selectionIds = selection.map((item) => item.id);
@@ -25190,6 +25711,20 @@ var TreeController = class extends MDControlController {
25190
25711
  var _a;
25191
25712
  return (_a = this.model.detreeNodes) == null ? void 0 : _a.find((item) => item.id === id);
25192
25713
  }
25714
+ /**
25715
+ * 通过标识获取节点数据
25716
+ * @author lxm
25717
+ * @date 2023-12-22 02:21:38
25718
+ * @param {string} id 可以是节点id也可以是_uuid
25719
+ * @return {*} {(ITreeNodeData | undefined)}
25720
+ */
25721
+ getNodeData(key) {
25722
+ const find = this.state.items.find((item) => item.id === key);
25723
+ if (find) {
25724
+ return find;
25725
+ }
25726
+ return this.state.items.find((item) => item._uuid === key);
25727
+ }
25193
25728
  /**
25194
25729
  * 执行界面行为
25195
25730
  *
@@ -25289,7 +25824,7 @@ var TreeController = class extends MDControlController {
25289
25824
  }
25290
25825
  const targetNode = refreshParent ? currentNode.parent : currentNode;
25291
25826
  const nodes = await this.loadNodes(targetNode);
25292
- this.evt.emit("onAfterRefreshParent", {
25827
+ this._evt.emit("onAfterRefreshParent", {
25293
25828
  parentNode: targetNode,
25294
25829
  children: nodes
25295
25830
  });
@@ -25459,7 +25994,7 @@ var TreeController = class extends MDControlController {
25459
25994
  });
25460
25995
  }
25461
25996
  await this.updateDeNodeData(modifiedNodeDatas);
25462
- this.evt.emit("onAfterNodeDrop", { isChangedParent });
25997
+ this._evt.emit("onAfterNodeDrop", { isChangedParent });
25463
25998
  }
25464
25999
  /**
25465
26000
  * 更新实体节点数据
@@ -25523,7 +26058,7 @@ var WizardPanelService = class extends ControlService {
25523
26058
  *
25524
26059
  * @author lxm
25525
26060
  * @date 2022-08-31 17:08:41
25526
- * @param {IParams} context 上下文
26061
+ * @param {IContext} context 上下文
25527
26062
  * @param {IParams} [params={}] 视图参数
25528
26063
  * @returns {*} {Promise<IHttpResponse>}
25529
26064
  */
@@ -25539,7 +26074,7 @@ var WizardPanelService = class extends ControlService {
25539
26074
  *
25540
26075
  * @author lxm
25541
26076
  * @date 2022-08-31 17:08:41
25542
- * @param {IParams} context 上下文
26077
+ * @param {IContext} context 上下文
25543
26078
  * @param {IParams} [params={}] 视图参数
25544
26079
  * @returns {*} {Promise<IHttpResponse>}
25545
26080
  */
@@ -25964,7 +26499,7 @@ var MDCtrlController = class extends MDControlController {
25964
26499
  */
25965
26500
  async loadMore() {
25966
26501
  if (this.state.total > this.state.items.length && !this.state.isLoading) {
25967
- await this.load({ isLoadMore: true });
26502
+ await this.load({ isLoadMore: true, silent: true });
25968
26503
  }
25969
26504
  }
25970
26505
  /**
@@ -26199,7 +26734,7 @@ var KanbanService = class extends DataViewControlService {
26199
26734
  *
26200
26735
  * @author lxm
26201
26736
  * @date 2022-09-07 19:09:11
26202
- * @param {IParams} context 上下文
26737
+ * @param {IContext} context 上下文
26203
26738
  * @param {ControlVO} data 数据
26204
26739
  * @returns {*}
26205
26740
  */
@@ -26711,194 +27246,103 @@ var KanbanController = class extends DataViewControlController {
26711
27246
  import { recursiveIterate as recursiveIterate11 } from "@ibiz-template/core";
26712
27247
 
26713
27248
  // src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
26714
- import { isArray as isArray10 } from "qx-util";
26715
27249
  var TreeGridExService = class extends TreeService {
26716
- constructor() {
26717
- super(...arguments);
27250
+ };
27251
+
27252
+ // src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts
27253
+ var TreeGridExRowState = class {
27254
+ constructor(data, treeGrid) {
26718
27255
  /**
26719
- * 表格列映射关系
27256
+ * 操作列状态(p是操作列的标识)
26720
27257
  *
26721
- * @author zk
26722
- * @date 2023-09-25 05:09:11
26723
- * @type {Map<string, Map<string, UIMapField>>}
26724
- * @memberof TreeGridService
27258
+ * @author lxm
27259
+ * @date 2022-09-07 22:09:38
27260
+ * @type {({ [p: string]: IButtonContainerState })}
26725
27261
  */
26726
- this.multipleUiMap = /* @__PURE__ */ new Map();
26727
- }
26728
- /**
26729
- * 初始化节点属性映射
26730
- *
26731
- * @author lxm
26732
- * @date 2022-08-31 18:08:37
26733
- */
26734
- initUIDataMap() {
26735
- var _a;
26736
- super.initUIDataMap();
26737
- (_a = this.model.detreeNodes) == null ? void 0 : _a.forEach((item) => {
26738
- var _a2;
26739
- const dataMap = /* @__PURE__ */ new Map();
26740
- (_a2 = item.detreeNodeDataItems) == null ? void 0 : _a2.forEach((dataItem) => {
26741
- const uiKey = dataItem.id.toLowerCase();
26742
- const deField = dataItem.appDEFieldId;
26743
- const deFieldKey = deField.toLowerCase();
26744
- const mapField = new UIMapField(uiKey, deFieldKey, {
26745
- isOriginField: true,
26746
- dataType: dataItem.dataType
26747
- });
26748
- dataMap.set(uiKey, mapField);
26749
- });
26750
- this.multipleUiMap.set(item.id, dataMap);
27262
+ this.uaColStates = {};
27263
+ this.data = data;
27264
+ Object.values(treeGrid.uaColumns).forEach((column) => {
27265
+ column.initActionStates(this);
26751
27266
  });
26752
27267
  }
26753
- /**
26754
- * 获取实体数据集数据
26755
- *
26756
- * @protected
26757
- * @param {TreeNodeRSModel} nodeRS
26758
- * @param {TreeFetchOpts} opts
26759
- * @returns {*}
26760
- * @memberof TreeService
26761
- */
26762
- async getDENodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
26763
- const { appDEDataSetId, appDataEntityId } = nodeModel;
26764
- const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
26765
- context: opts.context,
26766
- params: opts.params,
26767
- navContext: {},
26768
- navParams: {}
26769
- };
26770
- params.size = nodeModel.maxSize || 1e3;
26771
- if (nodeModel.sortAppDEFieldId && nodeModel.sortDir) {
26772
- Object.assign(params, {
26773
- sort: "".concat(nodeModel.sortAppDEFieldId.toLowerCase(), ",").concat(nodeModel.sortDir.toLowerCase())
26774
- });
26775
- }
26776
- const response = await this.app.deService.exec(
26777
- appDataEntityId,
26778
- appDEDataSetId,
26779
- context,
26780
- params
26781
- );
26782
- if (response.data.length) {
26783
- const { data } = this.handleResponseForMultiple(response, nodeModel.id);
26784
- const nodeDatas = data.map((item) => {
26785
- return new TreeDataSetNodeData(nodeModel, parentNodeData, {
26786
- data: item,
26787
- leaf: !!opts.leaf,
26788
- navContext,
26789
- navParams
26790
- });
26791
- });
26792
- return nodeDatas;
26793
- }
26794
- return [];
26795
- }
26796
- /**
26797
- * 处理多数据源响应
26798
- *
26799
- * @author zk
26800
- * @date 2023-09-21 04:09:06
26801
- * @param {IHttpResponse} response
26802
- * @param {string} tag 多数据源dataUIMap标识
26803
- * @return {*} {IHttpResponse}
26804
- * @memberof TreeGridService
26805
- */
26806
- handleResponseForMultiple(response, tag) {
26807
- const res = super.handleResponse(response);
26808
- if (res.headers) {
26809
- if (res.headers["x-page"]) {
26810
- res.page = Number(res.headers["x-page"]);
26811
- }
26812
- if (res.headers["x-per-page"]) {
26813
- res.size = Number(res.headers["x-per-page"]);
26814
- }
26815
- if (res.headers["x-total"]) {
26816
- res.total = Number(res.headers["x-total"]);
26817
- }
26818
- }
26819
- if (res.ok) {
26820
- if (isArray10(res.data)) {
26821
- res.data = res.data.map(
26822
- (item) => this.toUIDataForMultiple(item, tag)
26823
- );
26824
- } else {
26825
- res.data = this.toUIDataForMultiple(res.data, tag);
26826
- }
26827
- }
26828
- return res;
26829
- }
26830
- /**
26831
- * 实体数据转ui数据
26832
- *
26833
- * @author zk
26834
- * @date 2023-09-21 06:09:06
26835
- * @param {IData} entityData 实体数据
26836
- * @param {string} tag 多数据源dataUIMap标识
26837
- * @return {*} {ControlVO}
26838
- * @memberof TreeGridService
26839
- */
26840
- toUIDataForMultiple(entityData, tag) {
26841
- const dataUIMap = this.multipleUiMap.get(tag);
26842
- return new ControlVO(entityData, dataUIMap);
26843
- }
26844
27268
  };
26845
27269
 
26846
27270
  // src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
26847
- var TreeGridExController = class extends MDControlController {
27271
+ var TreeGridExController = class extends TreeController {
26848
27272
  constructor() {
26849
27273
  super(...arguments);
26850
27274
  /**
26851
- * 表格列的适配器
27275
+ * 树表格(增强)列的适配器
26852
27276
  *
26853
27277
  * @author zk
26854
27278
  * @date 2023-09-21 06:09:04
26855
- * @type {{ [key: string]: IGridColumnProvider }}
27279
+ * @type {{ [key: string]: ITreeGridExColumnProvider }}
26856
27280
  * @memberof TreeGridExController
26857
27281
  */
26858
27282
  this.providers = {};
26859
27283
  /**
26860
- * 所有表格列控制器集合
27284
+ * 所有树表格(增强)列控制器集合
26861
27285
  *
26862
27286
  * @author zk
26863
27287
  * @date 2023-09-21 06:09:10
26864
- * @type {{ [key: string]: GridColumnController }}
27288
+ * @type {{ [key: string]: TreeGridExColumnController }}
26865
27289
  * @memberof TreeGridExController
26866
27290
  */
26867
27291
  this.columns = {};
26868
27292
  /**
26869
- * 所有表格属性列的控制器
27293
+ * 所有树表格(增强)属性列的控制器
26870
27294
  *
26871
27295
  * @author zk
26872
27296
  * @date 2023-09-21 06:09:16
26873
- * @type {{ [key: string]: GridFieldColumnController }}
27297
+ * @type {{ [key: string]: TreeGridExFieldColumnController }}
26874
27298
  * @memberof TreeGridExController
26875
27299
  */
26876
27300
  this.fieldColumns = {};
26877
27301
  /**
26878
- * 所有表格操作列的控制器
27302
+ * 所有树表格(增强)操作列的控制器
26879
27303
  *
26880
27304
  * @author zk
26881
27305
  * @date 2023-09-21 06:09:21
26882
- * @type {{ [key: string]: GridUAColumnController }}
27306
+ * @type {{ [key: string]: TreeGridExUAColumnController }}
26883
27307
  * @memberof TreeGridExController
26884
27308
  */
26885
27309
  this.uaColumns = {};
26886
27310
  }
27311
+ /**
27312
+ * 是否有配置宽度自适应列
27313
+ *
27314
+ * @type {boolean}
27315
+ * @memberof GridController
27316
+ */
27317
+ get hasAdaptiveColumn() {
27318
+ return !!Object.values(this.columns).find((item) => item.isAdaptiveColumn);
27319
+ }
27320
+ /**
27321
+ * 单元格超出呈现模式
27322
+ * @author lxm
27323
+ * @date 2023-11-17 01:56:26
27324
+ * @readonly
27325
+ * @type {('wrap' | 'ellipsis')}
27326
+ */
27327
+ get overflowMode() {
27328
+ return ibiz.config.grid.overflowMode;
27329
+ }
26887
27330
  initState() {
26888
27331
  super.initState();
26889
- this.state.size = 0;
26890
27332
  this.state.columnStates = [];
26891
- this.state.defaultExpandedKeys = [];
27333
+ this.state.rows = {};
26892
27334
  }
26893
27335
  async onCreated() {
26894
27336
  await super.onCreated();
26895
- this.service = new TreeGridExService(this.model);
26896
- await this.service.init(this.context);
26897
27337
  this.initColumnStates();
26898
27338
  await this.initGridColumns();
26899
27339
  }
27340
+ async initService() {
27341
+ this.service = new TreeGridExService(this.model);
27342
+ await this.service.init(this.context);
27343
+ }
26900
27344
  /**
26901
- * 初始化表格属性列,操作列,编辑项控制器
27345
+ * 初始化树表格(增强)属性列,操作列,编辑项控制器
26902
27346
  *
26903
27347
  * @author zk
26904
27348
  * @date 2023-09-21 06:09:28
@@ -26916,7 +27360,7 @@ var TreeGridExController = class extends MDControlController {
26916
27360
  }
26917
27361
  }
26918
27362
  /**
26919
- * 初始化表格属性列,操作列,编辑项控制器
27363
+ * 初始化树表格(增强)属性列,操作列,编辑项控制器
26920
27364
  *
26921
27365
  * @author zk
26922
27366
  * @date 2023-09-21 06:09:37
@@ -26926,7 +27370,7 @@ var TreeGridExController = class extends MDControlController {
26926
27370
  * @memberof TreeGridExController
26927
27371
  */
26928
27372
  async initColumnsController(column) {
26929
- const provider = await getGridColumnProvider(column);
27373
+ const provider = await getTreeGridExColumnProvider(column);
26930
27374
  if (!provider) {
26931
27375
  return;
26932
27376
  }
@@ -26940,7 +27384,7 @@ var TreeGridExController = class extends MDControlController {
26940
27384
  }
26941
27385
  }
26942
27386
  /**
26943
- * 初始化表格列状态
27387
+ * 初始化树表格(增强)列状态
26944
27388
  *
26945
27389
  * @author zk
26946
27390
  * @date 2023-09-21 06:09:43
@@ -26948,20 +27392,15 @@ var TreeGridExController = class extends MDControlController {
26948
27392
  * @memberof TreeGridExController
26949
27393
  */
26950
27394
  initColumnStates() {
26951
- recursiveIterate11(
26952
- this.model,
26953
- (column) => {
26954
- if (column.columnType !== "GROUPGRIDCOLUMN") {
26955
- this.state.columnStates.push({
26956
- key: column.codeName,
26957
- caption: column.caption,
26958
- hidden: !!column.hideDefault,
26959
- uaColumn: column.columnType === "UAGRIDCOLUMN"
26960
- });
26961
- }
26962
- },
26963
- { childrenFields: ["detreeColumns"] }
26964
- );
27395
+ var _a;
27396
+ (_a = this.model.detreeColumns) == null ? void 0 : _a.forEach((column) => {
27397
+ this.state.columnStates.push({
27398
+ key: column.codeName,
27399
+ caption: column.caption,
27400
+ hidden: !!column.hideDefault,
27401
+ uaColumn: column.columnType === "UAGRIDCOLUMN"
27402
+ });
27403
+ });
26965
27404
  this.calcColumnFixed();
26966
27405
  }
26967
27406
  /**
@@ -26980,92 +27419,194 @@ var TreeGridExController = class extends MDControlController {
26980
27419
  showColumns.forEach((column, index) => {
26981
27420
  if (column.uaColumn) {
26982
27421
  column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
26983
- } else {
26984
- column.fixed = "right";
26985
27422
  }
26986
27423
  });
26987
27424
  }
26988
27425
  /**
26989
- * 树部件加载,从根节点开始重新加载
26990
- *
26991
- * @author zk
26992
- * @date 2023-09-21 06:09:56
26993
- * @param {MDCtrlLoadParams} [args={}]
26994
- * @return {*} {Promise<ITreeNodeData[]>}
26995
- * @memberof TreeGridExController
27426
+ * 获取树表格行数据
27427
+ * @author lxm
27428
+ * @date 2023-12-22 02:23:44
27429
+ * @param {string} key 可以是节点id也可以是_uuid
27430
+ * @return {*} {(ITreeGridExRowState | undefined)}
26996
27431
  */
26997
- async load(args = {}) {
26998
- const isInitialLoad = args.isInitialLoad === true;
26999
- const nodes = await this.loadNodes();
27000
- this.state.expandedKeys = this.calcExpandedKeys(nodes);
27001
- await this.afterLoad(args, nodes);
27002
- this.state.isLoaded = true;
27003
- await this.evt.emit("onLoadSuccess", {
27004
- isInitialLoad
27432
+ getRowState(key) {
27433
+ const nodeData = this.getNodeData(key);
27434
+ if (nodeData) {
27435
+ return this.state.rows[nodeData._uuid];
27436
+ }
27437
+ }
27438
+ async afterLoadNodes(nodes) {
27439
+ await super.afterLoadNodes(nodes);
27440
+ recursiveIterate11({ children: nodes }, (node) => {
27441
+ this.state.rows[node._uuid] = new TreeGridExRowState(node, this);
27005
27442
  });
27006
- return nodes;
27007
27443
  }
27008
27444
  /**
27009
- * 加载子节点数据
27445
+ * 转换各类多语言
27010
27446
  *
27011
- * @author zk
27012
- * @date 2023-09-21 06:09:02
27013
- * @param {ITreeNodeData} [parentNode]
27014
- * @return {*} {Promise<ITreeNodeData[]>}
27015
- * @memberof TreeGridExController
27447
+ * @date 2023-05-18 02:57:00
27448
+ * @protected
27016
27449
  */
27017
- async loadNodes(parentNode) {
27018
- const params = await this.getFetchParams();
27019
- const hasQuery = !!params.query;
27020
- const defaultExpandedKeys = !parentNode ? this.state.defaultExpandedKeys : void 0;
27021
- await this.startLoading();
27022
- let nodes;
27023
- try {
27024
- nodes = await this.service.fetchChildNodes(parentNode, {
27025
- context: this.context.clone(),
27026
- params,
27027
- hasQuery,
27028
- defaultExpandedKeys
27029
- }) || [];
27030
- } finally {
27031
- await this.endLoading();
27032
- }
27033
- if (parentNode) {
27034
- parentNode.children = nodes;
27035
- } else {
27036
- this.state.rootNodes = nodes;
27450
+ convertMultipleLanguages() {
27451
+ const convertColumnCaption = (columns) => {
27452
+ columns.forEach((column) => {
27453
+ if (column.capLanguageRes && column.capLanguageRes.lanResTag) {
27454
+ column.caption = ibiz.i18n.t(
27455
+ column.capLanguageRes.lanResTag,
27456
+ column.caption
27457
+ );
27458
+ }
27459
+ });
27460
+ };
27461
+ if (this.model.detreeColumns && this.model.detreeColumns.length > 0) {
27462
+ convertColumnCaption(this.model.detreeColumns);
27037
27463
  }
27038
- this.state.items = [];
27039
- recursiveIterate11(
27040
- { children: this.state.rootNodes },
27041
- (node) => {
27042
- this.state.items.push(node);
27043
- }
27464
+ }
27465
+ };
27466
+
27467
+ // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts
27468
+ var TreeGridExColumnController = class {
27469
+ /**
27470
+ * Creates an instance of GridFieldColumnController.
27471
+ * @author lxm
27472
+ * @date 2022-08-24 20:08:22
27473
+ * @param {T} model
27474
+ */
27475
+ constructor(model, treeGrid) {
27476
+ /**
27477
+ * 是否是自适应列
27478
+ * @author lxm
27479
+ * @date 2023-07-07 11:20:16
27480
+ * @type {boolean}
27481
+ */
27482
+ this.isAdaptiveColumn = false;
27483
+ /**
27484
+ * 是否是脚本代码
27485
+ * @return {*}
27486
+ * @author: zhujiamin
27487
+ * @Date: 2023-08-15 10:51:25
27488
+ */
27489
+ this.isCustomCode = false;
27490
+ this.model = model;
27491
+ this.treeGrid = treeGrid;
27492
+ this.isAdaptiveColumn = model.widthUnit === "STAR";
27493
+ }
27494
+ /**
27495
+ * 上下文
27496
+ *
27497
+ * @author lxm
27498
+ * @date 2022-09-05 19:09:24
27499
+ * @readonly
27500
+ * @type {IContext}
27501
+ */
27502
+ get context() {
27503
+ return this.treeGrid.context;
27504
+ }
27505
+ /**
27506
+ * 视图参数
27507
+ *
27508
+ * @author lxm
27509
+ * @date 2022-09-05 19:09:00
27510
+ * @readonly
27511
+ * @type {IParams}
27512
+ */
27513
+ get params() {
27514
+ return this.treeGrid.params;
27515
+ }
27516
+ /**
27517
+ * 是否是第一个显示的树表格列
27518
+ * @author lxm
27519
+ * @date 2023-12-22 03:28:10
27520
+ * @readonly
27521
+ * @type {boolean}
27522
+ */
27523
+ get isFirstShowColumn() {
27524
+ const firstColumn = this.treeGrid.state.columnStates.find(
27525
+ (item) => !item.hidden
27044
27526
  );
27045
- return nodes;
27527
+ return (firstColumn == null ? void 0 : firstColumn.key) === this.model.codeName;
27046
27528
  }
27047
27529
  /**
27048
- * 计算展开节点集合
27530
+ * 子类不可覆盖或重写此方法,在 init 时需要重写的使用 onInit 方法。
27049
27531
  *
27050
- * @author zk
27051
- * @date 2023-09-21 06:09:07
27052
- * @param {ITreeNodeData[]} nodes
27053
- * @return {*} {string[]}
27054
- * @memberof TreeGridExController
27532
+ * @author lxm
27533
+ * @date 2022-08-18 22:08:30
27534
+ * @returns {*} {Promise<void>}
27055
27535
  */
27056
- calcExpandedKeys(nodes) {
27057
- let expandedKeys = [];
27058
- recursiveIterate11({ children: nodes }, (node) => {
27059
- var _a;
27060
- if ((_a = node.children) == null ? void 0 : _a.length) {
27061
- expandedKeys.push(node.id);
27536
+ async init() {
27537
+ await this.onInit();
27538
+ }
27539
+ /**
27540
+ * 初始化方法
27541
+ *
27542
+ * @author lxm
27543
+ * @date 2022-09-28 15:09:15
27544
+ * @protected
27545
+ * @returns {*} {Promise<void>}
27546
+ */
27547
+ async onInit() {
27548
+ }
27549
+ };
27550
+
27551
+ // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts
27552
+ var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
27553
+ };
27554
+
27555
+ // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
27556
+ import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
27557
+ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
27558
+ /**
27559
+ * 给rowController初始化操作列的状态
27560
+ *
27561
+ * @author lxm
27562
+ * @date 2022-09-07 21:09:43
27563
+ * @param {ITreeGridExRowState} row
27564
+ */
27565
+ initActionStates(row) {
27566
+ var _a;
27567
+ const { deuiactionGroup } = this.model;
27568
+ if (!deuiactionGroup) {
27569
+ throw new RuntimeModelError63(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
27570
+ }
27571
+ if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
27572
+ ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
27573
+ return;
27574
+ }
27575
+ const containerState = new ButtonContainerState();
27576
+ deuiactionGroup.uiactionGroupDetails.forEach((detail) => {
27577
+ const actionid = detail.uiactionId;
27578
+ if (actionid) {
27579
+ const buttonState = new UIActionButtonState(
27580
+ detail.id,
27581
+ this.treeGrid.context.srfappid,
27582
+ actionid
27583
+ );
27584
+ containerState.addState(detail.id, buttonState);
27062
27585
  }
27063
27586
  });
27064
- if (this.state.defaultExpandedKeys.length) {
27065
- expandedKeys.push(...this.state.defaultExpandedKeys);
27066
- expandedKeys = Array.from(new Set(expandedKeys));
27067
- }
27068
- return expandedKeys;
27587
+ row.uaColStates[this.model.codeName] = containerState;
27588
+ }
27589
+ /**
27590
+ * 触发操作列点击事件
27591
+ *
27592
+ * @author lxm
27593
+ * @date 2022-09-07 22:09:46
27594
+ * @param {IPSUIActionGroupDetail} detail
27595
+ * @param {MouseEvent} event
27596
+ */
27597
+ async onActionClick(detail, row, event) {
27598
+ const actionId = detail.uiactionId;
27599
+ await UIActionUtil.execAndResolved(
27600
+ actionId,
27601
+ {
27602
+ context: this.context,
27603
+ params: this.params,
27604
+ data: [row.data],
27605
+ view: this.treeGrid.view,
27606
+ event
27607
+ },
27608
+ detail.appId
27609
+ );
27069
27610
  }
27070
27611
  };
27071
27612
 
@@ -27079,7 +27620,7 @@ var TreeGridService = class extends GridService {
27079
27620
 
27080
27621
  // src/controller/control/medit-view-panel/medit-view-panel.controller.ts
27081
27622
  import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
27082
- import { createUUID as createUUID12 } from "qx-util";
27623
+ import { createUUID as createUUID13 } from "qx-util";
27083
27624
 
27084
27625
  // src/controller/control/medit-view-panel/medit-view-panel.service.ts
27085
27626
  var MEditViewPanelService = class extends MDControlService {
@@ -27166,7 +27707,7 @@ var MEditViewPanelController = class extends MDControlController {
27166
27707
  */
27167
27708
  handlePanelItemParams(arg) {
27168
27709
  const [{ parameterName }] = this.parameters;
27169
- const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID12());
27710
+ const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID13());
27170
27711
  const item = {
27171
27712
  id,
27172
27713
  context: this.context.clone(),
@@ -27318,7 +27859,7 @@ var MapService = class extends MDControlService {
27318
27859
  * 加载所有地图项的数据
27319
27860
  * @author lxm
27320
27861
  * @date 2023-10-30 06:27:32
27321
- * @param {IParams} context
27862
+ * @param {IContext} context
27322
27863
  * @param {IParams} [params={}]
27323
27864
  * @return {*} {Promise<IHttpResponse<IMapData[]>>}
27324
27865
  */
@@ -27499,7 +28040,7 @@ var ReportPanelService = class extends ControlService {
27499
28040
  /**
27500
28041
  * 执行查询报表数据的方法
27501
28042
  *
27502
- * @param {IParams} context 上下文
28043
+ * @param {IContext} context 上下文
27503
28044
  * @param {IParams} [params={}] 视图参数
27504
28045
  * @returns {*} {Promise<IHttpResponse>}
27505
28046
  */
@@ -28851,6 +29392,19 @@ var AppHub = class {
28851
29392
  }
28852
29393
  return this.appMap.get(key);
28853
29394
  }
29395
+ /**
29396
+ * 获取所有应用实例
29397
+ *
29398
+ * @author chitanda
29399
+ * @date 2023-12-22 16:12:28
29400
+ * @return {*} {IAppService[]}
29401
+ */
29402
+ getAllApps() {
29403
+ if (this.appMap.size > 0) {
29404
+ return Array.from(this.appMap.values());
29405
+ }
29406
+ return [];
29407
+ }
28854
29408
  };
28855
29409
 
28856
29410
  // src/engine/engine-factory.ts
@@ -29112,7 +29666,7 @@ var ViewEngineBase = class {
29112
29666
  };
29113
29667
 
29114
29668
  // src/engine/md-view.engine.ts
29115
- import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
29669
+ import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
29116
29670
  import { clone as clone24 } from "ramda";
29117
29671
  var MDViewEngine = class extends ViewEngineBase {
29118
29672
  /**
@@ -29296,7 +29850,7 @@ var MDViewEngine = class extends ViewEngineBase {
29296
29850
  view: this.view
29297
29851
  }));
29298
29852
  if (result === -1) {
29299
- throw new RuntimeModelError63(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29853
+ throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29300
29854
  } else {
29301
29855
  return {
29302
29856
  cancel: !result.ok
@@ -29319,7 +29873,7 @@ var MDViewEngine = class extends ViewEngineBase {
29319
29873
  (item) => item.id === "newdata"
29320
29874
  );
29321
29875
  if (!openAppViewLogic) {
29322
- throw new RuntimeModelError63(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29876
+ throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29323
29877
  }
29324
29878
  const params = clone24(this.view.params);
29325
29879
  if (copyMode) {
@@ -29333,7 +29887,7 @@ var MDViewEngine = class extends ViewEngineBase {
29333
29887
  view: this.view
29334
29888
  }));
29335
29889
  if (result === -1) {
29336
- throw new RuntimeModelError63(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29890
+ throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29337
29891
  } else {
29338
29892
  return {
29339
29893
  cancel: !result.ok
@@ -29452,7 +30006,7 @@ var MDViewEngine = class extends ViewEngineBase {
29452
30006
 
29453
30007
  // src/utils/error-handler/default-error-handler.ts
29454
30008
  import {
29455
- RuntimeModelError as RuntimeModelError64,
30009
+ RuntimeModelError as RuntimeModelError65,
29456
30010
  ModelError as ModelError31,
29457
30011
  HttpError as HttpError5,
29458
30012
  NoticeError as NoticeError2,
@@ -29460,7 +30014,7 @@ import {
29460
30014
  } from "@ibiz-template/core";
29461
30015
  var DefaultErrorHandler = class {
29462
30016
  handle(error) {
29463
- if (error instanceof RuntimeModelError64 || error instanceof ModelError31) {
30017
+ if (error instanceof RuntimeModelError65 || error instanceof ModelError31) {
29464
30018
  ibiz.message.error(error.message, 10, true);
29465
30019
  } else if (error instanceof HttpError5) {
29466
30020
  if (error.status === 401) {
@@ -29728,13 +30282,13 @@ var ScriptExecutor = class extends LogicExecutor {
29728
30282
  };
29729
30283
 
29730
30284
  // src/logic-scheduler/executor/app-de-ui-logic-executor.ts
29731
- import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
30285
+ import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
29732
30286
  var AppDEUILogicExecutor = class extends LogicExecutor {
29733
30287
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
29734
30288
  execute(executeParams) {
29735
30289
  const { appDEUILogicId, appDataEntityId } = this.logic;
29736
30290
  if (!appDEUILogicId) {
29737
- throw new RuntimeModelError65(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
30291
+ throw new RuntimeModelError66(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
29738
30292
  }
29739
30293
  execUILogic(appDEUILogicId, appDataEntityId, executeParams);
29740
30294
  }
@@ -30192,7 +30746,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
30192
30746
  };
30193
30747
 
30194
30748
  // src/logic-scheduler/trigger/timer-trigger.ts
30195
- import { RuntimeError as RuntimeError65, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
30749
+ import { RuntimeError as RuntimeError65, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
30196
30750
  var TimerTrigger = class extends LogicTrigger {
30197
30751
  constructor() {
30198
30752
  super(...arguments);
@@ -30200,7 +30754,7 @@ var TimerTrigger = class extends LogicTrigger {
30200
30754
  }
30201
30755
  start() {
30202
30756
  if (!this.logic.timer) {
30203
- throw new RuntimeModelError66(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
30757
+ throw new RuntimeModelError67(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
30204
30758
  }
30205
30759
  this.timer = setInterval(() => {
30206
30760
  if (!this.scheduler.defaultParamsCb) {
@@ -30222,7 +30776,7 @@ var TimerTrigger = class extends LogicTrigger {
30222
30776
  import {
30223
30777
  ModelError as ModelError34,
30224
30778
  RuntimeError as RuntimeError66,
30225
- RuntimeModelError as RuntimeModelError67
30779
+ RuntimeModelError as RuntimeModelError68
30226
30780
  } from "@ibiz-template/core";
30227
30781
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
30228
30782
  var AppUILogicExecutor = class extends LogicExecutor {
@@ -30268,7 +30822,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30268
30822
  } else {
30269
30823
  openViewRef = appUILogic.openDataAppView;
30270
30824
  if (!openViewRef) {
30271
- throw new RuntimeModelError67(
30825
+ throw new RuntimeModelError68(
30272
30826
  appUILogic,
30273
30827
  "opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
30274
30828
  );
@@ -30276,7 +30830,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30276
30830
  }
30277
30831
  const openView = openViewRef.refAppViewId;
30278
30832
  if (!openView) {
30279
- throw new RuntimeModelError67(
30833
+ throw new RuntimeModelError68(
30280
30834
  appUILogic,
30281
30835
  "opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
30282
30836
  );
@@ -30306,7 +30860,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30306
30860
  );
30307
30861
  const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
30308
30862
  if (!typeFileName) {
30309
- throw new RuntimeModelError67(
30863
+ throw new RuntimeModelError68(
30310
30864
  appUILogic,
30311
30865
  "".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
30312
30866
  );
@@ -30314,7 +30868,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30314
30868
  const { data } = parameters;
30315
30869
  const formTypeValue = data[0][typeFileName];
30316
30870
  if (!formTypeValue) {
30317
- throw new RuntimeModelError67(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
30871
+ throw new RuntimeModelError68(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
30318
30872
  }
30319
30873
  const openViewRefs = appUILogic.openDataAppViews;
30320
30874
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
@@ -30356,7 +30910,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30356
30910
  return viewRef.refMode.toLowerCase() !== parentDeName;
30357
30911
  });
30358
30912
  if (!newViewRef) {
30359
- throw new RuntimeModelError67(
30913
+ throw new RuntimeModelError68(
30360
30914
  appUILogic,
30361
30915
  "\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
30362
30916
  );
@@ -30366,7 +30920,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30366
30920
  } else {
30367
30921
  newViewRef = newDataAppView;
30368
30922
  if (!newViewRef || !newViewRef.refAppViewId) {
30369
- throw new RuntimeModelError67(
30923
+ throw new RuntimeModelError68(
30370
30924
  appUILogic,
30371
30925
  "newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
30372
30926
  );
@@ -30424,7 +30978,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30424
30978
  const { wizardAppView, newDataAppViews } = appUILogic;
30425
30979
  const { context, params, ...rest } = parameters;
30426
30980
  if (!wizardAppView || !wizardAppView.refAppViewId) {
30427
- throw new RuntimeModelError67(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
30981
+ throw new RuntimeModelError68(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
30428
30982
  }
30429
30983
  const result = await ibiz.commands.execute(
30430
30984
  OpenAppViewCommand.TAG,
@@ -30475,7 +31029,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30475
31029
  const minorDERs = selfDe.minorAppDERSs;
30476
31030
  const pickParentDeName = newViewRef.refMode.toLowerCase();
30477
31031
  if (!minorDERs) {
30478
- throw new RuntimeModelError67(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
31032
+ throw new RuntimeModelError68(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
30479
31033
  }
30480
31034
  let pickParentFieldName;
30481
31035
  minorDERs == null ? void 0 : minorDERs.forEach((item) => {
@@ -30574,12 +31128,12 @@ var ControlEventTrigger = class extends LogicTrigger {
30574
31128
  };
30575
31129
 
30576
31130
  // src/logic-scheduler/executor/app-ui-action-executor.ts
30577
- import { RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
31131
+ import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
30578
31132
  var AppDEUIActionExecutor = class extends LogicExecutor {
30579
31133
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30580
31134
  execute(executeParams) {
30581
31135
  if (!this.logic.appDEUIActionId) {
30582
- throw new RuntimeModelError68(
31136
+ throw new RuntimeModelError69(
30583
31137
  this.logic,
30584
31138
  "\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
30585
31139
  );
@@ -30655,6 +31209,7 @@ function install2() {
30655
31209
  ibiz2.auth = new V7AuthService();
30656
31210
  ibiz2.asyncAction = new AsyncActionService();
30657
31211
  ibiz2.engine = new EngineFactory();
31212
+ ibiz2.uiDomainManager = new UIDomainManager();
30658
31213
  installCommand();
30659
31214
  presetUIActionProvider();
30660
31215
  presetDEMethodProvider();
@@ -30919,6 +31474,7 @@ export {
30919
31474
  StudioViewEvents,
30920
31475
  SysUIActionProvider,
30921
31476
  SysUIActionTag,
31477
+ TREEGRIDEX_COLUMN_PROVIDER_PREFIX,
30922
31478
  TabExpPanelController,
30923
31479
  TextUtil,
30924
31480
  ThemeUtil,
@@ -30928,8 +31484,12 @@ export {
30928
31484
  TreeDataSetNodeData,
30929
31485
  TreeExpBarController,
30930
31486
  TreeGridController,
31487
+ TreeGridExColumnController,
30931
31488
  TreeGridExController,
31489
+ TreeGridExFieldColumnController,
31490
+ TreeGridExRowState,
30932
31491
  TreeGridExService,
31492
+ TreeGridExUAColumnController,
30933
31493
  TreeGridService,
30934
31494
  TreeNodeData,
30935
31495
  TreeService,
@@ -30938,6 +31498,8 @@ export {
30938
31498
  UIActionButtonState,
30939
31499
  UIActionProviderBase,
30940
31500
  UIActionUtil,
31501
+ UIDomain,
31502
+ UIDomainManager,
30941
31503
  UILOGINNODE_PROVIDER_PREFIX,
30942
31504
  UIMapField,
30943
31505
  V7AuthService,
@@ -31011,6 +31573,7 @@ export {
31011
31573
  getPlatformType,
31012
31574
  getPortletProvider,
31013
31575
  getRootNode,
31576
+ getTreeGridExColumnProvider,
31014
31577
  getTreeNode,
31015
31578
  getUIActionById,
31016
31579
  getUIActionItemsByActionLevel,
@@ -31046,6 +31609,7 @@ export {
31046
31609
  registerPanelItemProvider,
31047
31610
  registerPlatformProvider,
31048
31611
  registerPortletProvider,
31612
+ registerTreeGridExColumnProvider,
31049
31613
  registerUIActionProvider,
31050
31614
  registerUILogicNodeProvider,
31051
31615
  registerViewProvider,