@ibiz-template/runtime 0.1.27 → 0.1.29-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/dist/index.esm.js +1352 -304
  2. package/dist/index.system.min.js +1 -1
  3. package/dist/index.system.min.js.map +1 -1
  4. package/out/app-hub.d.ts +9 -0
  5. package/out/app-hub.d.ts.map +1 -1
  6. package/out/app-hub.js +4 -0
  7. package/out/application.d.ts +9 -1
  8. package/out/application.d.ts.map +1 -1
  9. package/out/application.js +2 -1
  10. package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
  11. package/out/controller/common/control/md-control.controller.js +3 -0
  12. package/out/controller/common/view/view.controller.d.ts +23 -1
  13. package/out/controller/common/view/view.controller.d.ts.map +1 -1
  14. package/out/controller/common/view/view.controller.js +52 -0
  15. package/out/controller/control/dashboard/custom-dashboard.controller.d.ts +69 -0
  16. package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -0
  17. package/out/controller/control/dashboard/custom-dashboard.controller.js +85 -0
  18. package/out/controller/control/dashboard/index.d.ts +1 -0
  19. package/out/controller/control/dashboard/index.d.ts.map +1 -1
  20. package/out/controller/control/dashboard/index.js +1 -0
  21. package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts +15 -1
  22. package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
  23. package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +26 -9
  24. package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
  25. package/out/controller/control/data-view/data-view.controller.js +5 -4
  26. package/out/controller/control/index.d.ts +2 -0
  27. package/out/controller/control/index.d.ts.map +1 -1
  28. package/out/controller/control/index.js +2 -0
  29. package/out/controller/control/panel/panel/panel-item.controller.d.ts +34 -2
  30. package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
  31. package/out/controller/control/panel/panel/panel-item.controller.js +84 -5
  32. package/out/controller/control/panel/panel/panel.controller.d.ts +2 -1
  33. package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
  34. package/out/controller/control/panel/panel/panel.controller.js +11 -1
  35. package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
  36. package/out/controller/control/toolbar/toolbar.controllerr.js +33 -21
  37. package/out/controller/control/tree-grid/index.d.ts +3 -0
  38. package/out/controller/control/tree-grid/index.d.ts.map +1 -0
  39. package/out/controller/control/tree-grid/index.js +2 -0
  40. package/out/controller/control/tree-grid/tree-grid.controller.d.ts +5 -0
  41. package/out/controller/control/tree-grid/tree-grid.controller.d.ts.map +1 -0
  42. package/out/controller/control/tree-grid/tree-grid.controller.js +3 -0
  43. package/out/controller/control/tree-grid/tree-grid.service.d.ts +13 -0
  44. package/out/controller/control/tree-grid/tree-grid.service.d.ts.map +1 -0
  45. package/out/controller/control/tree-grid/tree-grid.service.js +12 -0
  46. package/out/controller/control/tree-grid-ex/index.d.ts +3 -0
  47. package/out/controller/control/tree-grid-ex/index.d.ts.map +1 -0
  48. package/out/controller/control/tree-grid-ex/index.js +2 -0
  49. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts +134 -0
  50. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -0
  51. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +240 -0
  52. package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts +65 -0
  53. package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts.map +1 -0
  54. package/out/controller/control/tree-grid-ex/tree-grid-ex.service.js +143 -0
  55. package/out/controller/utils/event/controller-event.d.ts +7 -0
  56. package/out/controller/utils/event/controller-event.d.ts.map +1 -1
  57. package/out/controller/utils/event/controller-event.js +12 -0
  58. package/out/controller/utils/view-msg/index.d.ts +2 -0
  59. package/out/controller/utils/view-msg/index.d.ts.map +1 -0
  60. package/out/controller/utils/view-msg/index.js +1 -0
  61. package/out/controller/utils/view-msg/view-msg-controller.d.ts +69 -0
  62. package/out/controller/utils/view-msg/view-msg-controller.d.ts.map +1 -0
  63. package/out/controller/utils/view-msg/view-msg-controller.js +176 -0
  64. package/out/de-logic/de-logic-context.d.ts +8 -0
  65. package/out/de-logic/de-logic-context.d.ts.map +1 -1
  66. package/out/de-logic/de-logic-context.js +11 -0
  67. package/out/de-logic/de-logic-node/prepare-param-node/prepare-param-node.d.ts.map +1 -1
  68. package/out/de-logic/de-logic-node/prepare-param-node/prepare-param-node.js +5 -1
  69. package/out/de-logic/utils/handle-src-val.d.ts.map +1 -1
  70. package/out/de-logic/utils/handle-src-val.js +19 -8
  71. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +9 -0
  72. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  73. package/out/interface/common/i-app-service/i-app-service.d.ts +9 -0
  74. package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
  75. package/out/interface/controller/common/index.d.ts +1 -0
  76. package/out/interface/controller/common/index.d.ts.map +1 -1
  77. package/out/interface/controller/common/index.js +1 -0
  78. package/out/interface/controller/common/view-message/i-view-message.d.ts +39 -0
  79. package/out/interface/controller/common/view-message/i-view-message.d.ts.map +1 -0
  80. package/out/interface/controller/common/view-message/i-view-message.js +1 -0
  81. package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts +16 -0
  82. package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts.map +1 -0
  83. package/out/interface/controller/controller/control/i-tree-grid-ex.controller.js +1 -0
  84. package/out/interface/controller/controller/control/i-tree-grid.controller.d.ts +13 -0
  85. package/out/interface/controller/controller/control/i-tree-grid.controller.d.ts.map +1 -0
  86. package/out/interface/controller/controller/control/i-tree-grid.controller.js +1 -0
  87. package/out/interface/controller/controller/control/index.d.ts +2 -0
  88. package/out/interface/controller/controller/control/index.d.ts.map +1 -1
  89. package/out/interface/controller/controller/control/index.js +2 -0
  90. package/out/interface/controller/controller/control/panel-item/i-panel-item.controller.d.ts +2 -2
  91. package/out/interface/controller/controller/control/panel-item/i-panel-item.controller.d.ts.map +1 -1
  92. package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts +7 -0
  93. package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts.map +1 -1
  94. package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts +13 -0
  95. package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts.map +1 -0
  96. package/out/interface/controller/event/control/i-tree-grid-ex.event.js +1 -0
  97. package/out/interface/controller/event/control/i-tree-grid.event.d.ts +13 -0
  98. package/out/interface/controller/event/control/i-tree-grid.event.d.ts.map +1 -0
  99. package/out/interface/controller/event/control/i-tree-grid.event.js +1 -0
  100. package/out/interface/controller/event/control/index.d.ts +2 -0
  101. package/out/interface/controller/event/control/index.d.ts.map +1 -1
  102. package/out/interface/controller/event/control/index.js +2 -0
  103. package/out/interface/controller/event/view/i-tree-grid-ex-view.event.d.ts +12 -0
  104. package/out/interface/controller/event/view/i-tree-grid-ex-view.event.d.ts.map +1 -0
  105. package/out/interface/controller/event/view/i-tree-grid-ex-view.event.js +1 -0
  106. package/out/interface/controller/event/view/i-tree-grid-view.event.d.ts +12 -0
  107. package/out/interface/controller/event/view/i-tree-grid-view.event.d.ts.map +1 -0
  108. package/out/interface/controller/event/view/i-tree-grid-view.event.js +1 -0
  109. package/out/interface/controller/event/view/index.d.ts +2 -0
  110. package/out/interface/controller/event/view/index.d.ts.map +1 -1
  111. package/out/interface/controller/event/view/index.js +2 -0
  112. package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts +52 -0
  113. package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts.map +1 -0
  114. package/out/interface/controller/state/control/i-tree-grid-ex.state.js +1 -0
  115. package/out/interface/controller/state/control/i-tree-grid.state.d.ts +13 -0
  116. package/out/interface/controller/state/control/i-tree-grid.state.d.ts.map +1 -0
  117. package/out/interface/controller/state/control/i-tree-grid.state.js +1 -0
  118. package/out/interface/controller/state/control/index.d.ts +2 -0
  119. package/out/interface/controller/state/control/index.d.ts.map +1 -1
  120. package/out/interface/controller/state/control/index.js +2 -0
  121. package/out/interface/controller/state/view/i-tree-grid-ex-view.state.d.ts +13 -0
  122. package/out/interface/controller/state/view/i-tree-grid-ex-view.state.d.ts.map +1 -0
  123. package/out/interface/controller/state/view/i-tree-grid-ex-view.state.js +1 -0
  124. package/out/interface/controller/state/view/i-tree-grid-view.state.d.ts +13 -0
  125. package/out/interface/controller/state/view/i-tree-grid-view.state.d.ts.map +1 -0
  126. package/out/interface/controller/state/view/i-tree-grid-view.state.js +1 -0
  127. package/out/interface/controller/state/view/i-view.state.d.ts +10 -0
  128. package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
  129. package/out/interface/controller/state/view/index.d.ts +2 -0
  130. package/out/interface/controller/state/view/index.d.ts.map +1 -1
  131. package/out/interface/controller/state/view/index.js +2 -0
  132. package/out/interface/provider/i-grid-column.provider.d.ts +2 -1
  133. package/out/interface/provider/i-grid-column.provider.d.ts.map +1 -1
  134. package/out/interface/service/service/i-app-de.service.d.ts +9 -0
  135. package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
  136. package/out/interface/service/service/i-config.service.d.ts +20 -0
  137. package/out/interface/service/service/i-config.service.d.ts.map +1 -0
  138. package/out/interface/service/service/i-config.service.js +1 -0
  139. package/out/interface/service/service/index.d.ts +1 -0
  140. package/out/interface/service/service/index.d.ts.map +1 -1
  141. package/out/logic-scheduler/trigger/item-dyna-logic-trigger.d.ts.map +1 -1
  142. package/out/logic-scheduler/trigger/item-dyna-logic-trigger.js +4 -1
  143. package/out/service/app-data-entity/app-data-entity.d.ts +10 -0
  144. package/out/service/app-data-entity/app-data-entity.d.ts.map +1 -1
  145. package/out/service/app-data-entity/app-data-entity.js +40 -13
  146. package/out/service/service/config/config.service.d.ts +43 -0
  147. package/out/service/service/config/config.service.d.ts.map +1 -0
  148. package/out/service/service/config/config.service.js +54 -0
  149. package/out/service/service/entity/de.service.d.ts +9 -0
  150. package/out/service/service/entity/de.service.d.ts.map +1 -1
  151. package/out/service/service/entity/de.service.js +2 -0
  152. package/out/service/service/entity/method/method.d.ts.map +1 -1
  153. package/out/service/service/entity/method/method.js +2 -2
  154. package/out/service/service/index.d.ts +1 -0
  155. package/out/service/service/index.d.ts.map +1 -1
  156. package/out/service/service/index.js +1 -0
  157. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +4 -4
  158. package/out/service/vo/control.vo.d.ts.map +1 -1
  159. package/out/service/vo/control.vo.js +1 -5
  160. package/out/ui-action/provider/backend-ui-action-provider.d.ts.map +1 -1
  161. package/out/ui-action/provider/backend-ui-action-provider.js +5 -2
  162. package/out/ui-action/provider/ui-action-provider-base.d.ts +12 -1
  163. package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
  164. package/out/ui-action/provider/ui-action-provider-base.js +55 -5
  165. package/out/ui-logic/ui-logic-context.d.ts +8 -0
  166. package/out/ui-logic/ui-logic-context.d.ts.map +1 -1
  167. package/out/ui-logic/ui-logic-context.js +11 -0
  168. package/out/ui-logic/ui-logic-link/ui-logic-link.js +1 -1
  169. package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.d.ts.map +1 -1
  170. package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.js +5 -1
  171. package/out/ui-logic/utils/handle-src-val.d.ts.map +1 -1
  172. package/out/ui-logic/utils/handle-src-val.js +17 -4
  173. package/out/utils/wf-helper/wf-helper.js +2 -2
  174. package/package.json +3 -3
  175. package/src/app-hub.ts +17 -0
  176. package/src/application.ts +20 -1
  177. package/src/controller/common/control/md-control.controller.ts +3 -0
  178. package/src/controller/common/view/view.controller.ts +67 -0
  179. package/src/controller/control/dashboard/custom-dashboard.controller.ts +107 -0
  180. package/src/controller/control/dashboard/index.ts +1 -0
  181. package/src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts +32 -9
  182. package/src/controller/control/data-view/data-view.controller.ts +5 -4
  183. package/src/controller/control/index.ts +2 -0
  184. package/src/controller/control/panel/panel/panel-item.controller.ts +105 -5
  185. package/src/controller/control/panel/panel/panel.controller.ts +17 -1
  186. package/src/controller/control/toolbar/toolbar.controllerr.ts +40 -24
  187. package/src/controller/control/tree-grid/index.ts +2 -0
  188. package/src/controller/control/tree-grid/tree-grid.controller.ts +6 -0
  189. package/src/controller/control/tree-grid/tree-grid.service.ts +12 -0
  190. package/src/controller/control/tree-grid-ex/index.ts +2 -0
  191. package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +283 -0
  192. package/src/controller/control/tree-grid-ex/tree-grid-ex.service.ts +171 -0
  193. package/src/controller/utils/event/controller-event.ts +16 -0
  194. package/src/controller/utils/view-msg/index.ts +1 -0
  195. package/src/controller/utils/view-msg/view-msg-controller.ts +250 -0
  196. package/src/de-logic/de-logic-context.ts +12 -0
  197. package/src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts +7 -1
  198. package/src/de-logic/utils/handle-src-val.ts +23 -10
  199. package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +10 -0
  200. package/src/interface/common/i-app-service/i-app-service.ts +10 -0
  201. package/src/interface/controller/common/index.ts +1 -0
  202. package/src/interface/controller/common/view-message/i-view-message.ts +42 -0
  203. package/src/interface/controller/controller/control/i-tree-grid-ex.controller.ts +20 -0
  204. package/src/interface/controller/controller/control/i-tree-grid.controller.ts +12 -0
  205. package/src/interface/controller/controller/control/index.ts +2 -0
  206. package/src/interface/controller/controller/control/panel-item/i-panel-item.controller.ts +2 -2
  207. package/src/interface/controller/controller/control/portlet/i-portlet.controller.ts +8 -0
  208. package/src/interface/controller/event/control/i-tree-grid-ex.event.ts +12 -0
  209. package/src/interface/controller/event/control/i-tree-grid.event.ts +12 -0
  210. package/src/interface/controller/event/control/index.ts +2 -0
  211. package/src/interface/controller/event/view/i-tree-grid-ex-view.event.ts +12 -0
  212. package/src/interface/controller/event/view/i-tree-grid-view.event.ts +12 -0
  213. package/src/interface/controller/event/view/index.ts +2 -0
  214. package/src/interface/controller/state/control/i-tree-grid-ex.state.ts +56 -0
  215. package/src/interface/controller/state/control/i-tree-grid.state.ts +12 -0
  216. package/src/interface/controller/state/control/index.ts +2 -0
  217. package/src/interface/controller/state/view/i-tree-grid-ex-view.state.ts +12 -0
  218. package/src/interface/controller/state/view/i-tree-grid-view.state.ts +12 -0
  219. package/src/interface/controller/state/view/i-view.state.ts +9 -0
  220. package/src/interface/controller/state/view/index.ts +2 -0
  221. package/src/interface/provider/i-grid-column.provider.ts +2 -1
  222. package/src/interface/service/service/i-app-de.service.ts +10 -0
  223. package/src/interface/service/service/i-config.service.ts +20 -0
  224. package/src/interface/service/service/index.ts +1 -0
  225. package/src/logic-scheduler/trigger/item-dyna-logic-trigger.ts +5 -1
  226. package/src/service/app-data-entity/app-data-entity.ts +44 -13
  227. package/src/service/service/config/config.service.ts +65 -0
  228. package/src/service/service/entity/de.service.ts +15 -0
  229. package/src/service/service/entity/method/method.ts +5 -2
  230. package/src/service/service/index.ts +1 -0
  231. package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +4 -4
  232. package/src/service/vo/control.vo.ts +1 -6
  233. package/src/ui-action/provider/backend-ui-action-provider.ts +5 -2
  234. package/src/ui-action/provider/ui-action-provider-base.ts +68 -6
  235. package/src/ui-logic/ui-logic-context.ts +12 -0
  236. package/src/ui-logic/ui-logic-link/ui-logic-link.ts +1 -1
  237. package/src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts +7 -1
  238. package/src/ui-logic/utils/handle-src-val.ts +20 -4
  239. package/src/utils/wf-helper/wf-helper.ts +2 -2
package/dist/index.esm.js CHANGED
@@ -71,10 +71,10 @@ var require_utils = __commonJS({
71
71
  };
72
72
  }
73
73
  exports.isFunction = isFunction2;
74
- var isArray6 = Array.isArray || function(value) {
74
+ var isArray7 = Array.isArray || function(value) {
75
75
  return value && typeof value === "object" ? toString.call(value) === "[object Array]" : false;
76
76
  };
77
- exports.isArray = isArray6;
77
+ exports.isArray = isArray7;
78
78
  function indexOf(array, value) {
79
79
  for (var i = 0, len = array.length; i < len; i++) {
80
80
  if (array[i] === value) {
@@ -102,7 +102,7 @@ var require_utils = __commonJS({
102
102
  function isEmpty9(value) {
103
103
  if (!value && value !== 0) {
104
104
  return true;
105
- } else if (isArray6(value) && value.length === 0) {
105
+ } else if (isArray7(value) && value.length === 0) {
106
106
  return true;
107
107
  } else {
108
108
  return false;
@@ -8103,8 +8103,8 @@ function getWFSubmitViewId(view, link) {
8103
8103
  const { type, sequenceflowview, sequenceflowmobview } = link;
8104
8104
  const appViewRefs = ((_a = view.viewLayoutPanel) == null ? void 0 : _a.appViewRefs) || view.appViewRefs;
8105
8105
  const key = type ? "WFUTILACTION@".concat(type.toUpperCase()) : "WFACTION@".concat(ibiz.env.isMob ? sequenceflowmobview : sequenceflowview);
8106
- const submitViewRef = appViewRefs.find((viewRef) => {
8107
- return viewRef.name === key;
8106
+ const submitViewRef = appViewRefs == null ? void 0 : appViewRefs.find((viewRef) => {
8107
+ return viewRef.name.indexOf(key) !== -1;
8108
8108
  });
8109
8109
  return submitViewRef == null ? void 0 : submitViewRef.refAppViewId;
8110
8110
  }
@@ -10042,10 +10042,10 @@ var DynamicCodeListCache = class {
10042
10042
  */
10043
10043
  async load(context = {}, params = {}) {
10044
10044
  const app = ibiz.hub.getApp(context.srfappid);
10045
+ if (!params.size) {
10046
+ params = { ...params, size: 1e4 };
10047
+ }
10045
10048
  if (this.isPredefined) {
10046
- if (!params.size) {
10047
- params = { ...params, size: 1e4 };
10048
- }
10049
10049
  const res2 = await app.net.get(
10050
10050
  "/dictionaries/codelist/".concat(this.codeList.codeName),
10051
10051
  params
@@ -10770,6 +10770,57 @@ var CodeListService = class {
10770
10770
  }
10771
10771
  };
10772
10772
 
10773
+ // src/service/service/config/config.service.ts
10774
+ var ConfigService = class {
10775
+ /**
10776
+ * Creates an instance of ConfigService.
10777
+ *
10778
+ * @author chitanda
10779
+ * @date 2023-09-22 10:09:16
10780
+ * @param {string} appId 应用标识
10781
+ * @param {string} folder 定义文件夹
10782
+ * @param {string} tag 存储标识
10783
+ */
10784
+ constructor(appId, folder, tag) {
10785
+ this.appId = appId;
10786
+ this.folder = folder;
10787
+ this.tag = tag;
10788
+ this.app = ibiz.hub.getApp(appId);
10789
+ }
10790
+ /**
10791
+ * 保存配置
10792
+ *
10793
+ * @author chitanda
10794
+ * @date 2023-09-22 10:09:05
10795
+ * @param {IData} data
10796
+ * @return {*} {Promise<boolean>}
10797
+ */
10798
+ async save(data) {
10799
+ const res = await this.app.net.put(
10800
+ "/configs/".concat(this.folder, "/").concat(this.tag),
10801
+ data
10802
+ );
10803
+ if (res.ok) {
10804
+ return res.data;
10805
+ }
10806
+ return false;
10807
+ }
10808
+ /**
10809
+ * 加载配置
10810
+ *
10811
+ * @author chitanda
10812
+ * @date 2023-09-22 10:09:10
10813
+ * @return {*} {Promise<IData>}
10814
+ */
10815
+ async load() {
10816
+ const res = await this.app.net.get("/configs/".concat(this.folder, "/").concat(this.tag));
10817
+ if (res.ok) {
10818
+ return res.data;
10819
+ }
10820
+ return {};
10821
+ }
10822
+ };
10823
+
10773
10824
  // src/service/service/counter/counter.service.ts
10774
10825
  import { RuntimeModelError as RuntimeModelError6 } from "@ibiz-template/core";
10775
10826
  var CounterService = class {
@@ -11183,7 +11234,8 @@ import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
11183
11234
  import { notNilEmpty as notNilEmpty5 } from "qx-util";
11184
11235
 
11185
11236
  // src/service/app-data-entity/app-data-entity.ts
11186
- import { clone as clone4 } from "ramda";
11237
+ import { clone as clone4, isNil as isNil7 } from "ramda";
11238
+ import { DataTypes } from "@ibiz-template/core";
11187
11239
 
11188
11240
  // src/service/constant/srfuf.ts
11189
11241
  var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
@@ -11290,7 +11342,7 @@ var AppDataEntity = class _AppDataEntity {
11290
11342
  */
11291
11343
  defineProperties() {
11292
11344
  var _a;
11293
- const { _data } = this;
11345
+ const { _data, convertVal } = this;
11294
11346
  const properties = {};
11295
11347
  const keys = Object.keys(_data);
11296
11348
  keys.forEach((key) => {
@@ -11306,17 +11358,16 @@ var AppDataEntity = class _AppDataEntity {
11306
11358
  });
11307
11359
  (_a = this._entity.appDEFields) == null ? void 0 : _a.forEach((field) => {
11308
11360
  const key = field.codeName.toLowerCase();
11309
- if (!keys.includes(key)) {
11310
- properties[key] = {
11311
- enumerable: true,
11312
- set(val) {
11313
- _data[key] = val;
11314
- },
11315
- get() {
11316
- return _data[key];
11317
- }
11318
- };
11319
- }
11361
+ properties[key] = {
11362
+ enumerable: true,
11363
+ set(val) {
11364
+ _data[key] = convertVal(val, field.stdDataType);
11365
+ },
11366
+ get() {
11367
+ return _data[key];
11368
+ }
11369
+ };
11370
+ _data[key] = convertVal(_data[key], field.stdDataType);
11320
11371
  });
11321
11372
  Object.defineProperties(this, properties);
11322
11373
  }
@@ -11348,6 +11399,29 @@ var AppDataEntity = class _AppDataEntity {
11348
11399
  }
11349
11400
  return this;
11350
11401
  }
11402
+ /**
11403
+ * 根据属性的数据类型转换值
11404
+ * @author lxm
11405
+ * @date 2023-09-25 03:37:28
11406
+ * @protected
11407
+ * @param {unknown} value
11408
+ * @param {(number | undefined)} dataType
11409
+ * @return {*} {unknown}
11410
+ */
11411
+ convertVal(value, dataType) {
11412
+ if (isNil7(dataType)) {
11413
+ return value;
11414
+ }
11415
+ if (DataTypes.isNumber(dataType)) {
11416
+ const numVal = !isNil7(value) && value !== "" ? Number(value) : value;
11417
+ if (Number.isNaN(numVal)) {
11418
+ ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
11419
+ return value;
11420
+ }
11421
+ return numVal;
11422
+ }
11423
+ return value;
11424
+ }
11351
11425
  };
11352
11426
 
11353
11427
  // src/service/dto/method.dto.ts
@@ -11616,7 +11690,7 @@ var Method = class {
11616
11690
  );
11617
11691
  break;
11618
11692
  case "GET":
11619
- res = await this.app.net.get("".concat(path2, "/").concat(methodName), data);
11693
+ res = await this.app.net.get("".concat(path2, "/").concat(methodName), data || params);
11620
11694
  break;
11621
11695
  case "PUT": {
11622
11696
  res = await this.app.net.put(
@@ -11626,7 +11700,10 @@ var Method = class {
11626
11700
  break;
11627
11701
  }
11628
11702
  case "DELETE":
11629
- res = await this.app.net.delete("".concat(path2, "/").concat(methodName), data);
11703
+ res = await this.app.net.delete(
11704
+ "".concat(path2, "/").concat(methodName),
11705
+ data || params
11706
+ );
11630
11707
  break;
11631
11708
  default:
11632
11709
  if (requestMethod) {
@@ -11786,6 +11863,17 @@ var DELogicContext = class {
11786
11863
  get: () => this.lastReturn
11787
11864
  });
11788
11865
  }
11866
+ /**
11867
+ * 是否是实体参数变量(即后台数据对象)
11868
+ * @author lxm
11869
+ * @date 2023-09-22 03:40:30
11870
+ * @param {string} paramId
11871
+ * @return {*} {boolean}
11872
+ */
11873
+ isEntityParam(paramId) {
11874
+ const deLogicParams = this.deLogicParams.get(paramId);
11875
+ return !!(deLogicParams && deLogicParams.model.entityParam);
11876
+ }
11789
11877
  };
11790
11878
 
11791
11879
  // src/de-logic/de-logic-node/de-action-node/de-action-node.ts
@@ -12089,14 +12177,16 @@ import { clone as clone6 } from "ramda";
12089
12177
  import { ModelError as ModelError10 } from "@ibiz-template/core";
12090
12178
  import { clone as clone5 } from "ramda";
12091
12179
  function handleSrcVal(ctx, srcValParams) {
12092
- const { srcDELogicParamId, srcValueType, srcFieldName, srcValue } = srcValParams;
12093
- if (!srcValParams.srcValueType) {
12094
- srcValParams.srcValueType = "SRCDLPARAM";
12095
- }
12180
+ const { srcDELogicParamId, srcFieldName, srcValue } = srcValParams;
12181
+ const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
12182
+ let srcField = srcFieldName;
12096
12183
  let value;
12097
12184
  switch (srcValueType) {
12098
12185
  case "SRCDLPARAM":
12099
12186
  value = ctx.params[srcDELogicParamId];
12187
+ if (ctx.isEntityParam(srcDELogicParamId)) {
12188
+ srcField = srcField == null ? void 0 : srcField.toLowerCase();
12189
+ }
12100
12190
  break;
12101
12191
  case "NULLVALUE":
12102
12192
  return null;
@@ -12120,9 +12210,20 @@ function handleSrcVal(ctx, srcValParams) {
12120
12210
  default:
12121
12211
  throw new ModelError10(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
12122
12212
  }
12123
- const srcField = srcFieldName == null ? void 0 : srcFieldName.toLowerCase();
12124
12213
  if (value && srcField) {
12125
- value = value[srcField];
12214
+ try {
12215
+ value = ScriptFactory.execScriptFn(
12216
+ { srcValue: value },
12217
+ "srcValue.".concat(srcField),
12218
+ {
12219
+ singleRowReturn: true,
12220
+ isAsync: false
12221
+ }
12222
+ );
12223
+ } catch (error) {
12224
+ ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
12225
+ throw error;
12226
+ }
12126
12227
  }
12127
12228
  return value;
12128
12229
  }
@@ -12195,7 +12296,10 @@ var PrepareParamNode = class extends DELogicNode {
12195
12296
  */
12196
12297
  setParamValue(nodeParam, ctx) {
12197
12298
  const { dstFieldName, dstDELogicParamId } = nodeParam;
12198
- const dstField = dstFieldName == null ? void 0 : dstFieldName.toLowerCase();
12299
+ let dstField = dstFieldName;
12300
+ if (ctx.isEntityParam(dstDELogicParamId)) {
12301
+ dstField = dstField == null ? void 0 : dstField.toLowerCase();
12302
+ }
12199
12303
  const srcVal = handleSrcVal(ctx, nodeParam);
12200
12304
  if (dstField) {
12201
12305
  ctx.params[dstDELogicParamId][dstField] = srcVal;
@@ -13022,7 +13126,7 @@ import {
13022
13126
  RuntimeModelError as RuntimeModelError19
13023
13127
  } from "@ibiz-template/core";
13024
13128
  import { ascSort, descSort } from "qx-util";
13025
- import { clone as clone9, equals as equals2, isEmpty as isEmpty7, isNil as isNil7, where as where2 } from "ramda";
13129
+ import { clone as clone9, equals as equals2, isEmpty as isEmpty7, isNil as isNil8, where as where2 } from "ramda";
13026
13130
  var FetchMethod = class extends Method {
13027
13131
  get isLocalMode() {
13028
13132
  return isLocalMode(this.method);
@@ -13152,7 +13256,7 @@ var FetchMethod = class extends Method {
13152
13256
  }
13153
13257
  }
13154
13258
  }
13155
- if (!isNil7(filter.sortField) && !isEmpty7(filter.sortField)) {
13259
+ if (!isNil8(filter.sortField) && !isEmpty7(filter.sortField)) {
13156
13260
  if (filter.sortMode === "DESC") {
13157
13261
  list = descSort(list, filter.sortField);
13158
13262
  } else {
@@ -13220,6 +13324,11 @@ var DEService = class {
13220
13324
  * @type {DECache}
13221
13325
  */
13222
13326
  this.local = new DECache();
13327
+ this.configCache = new ConfigService(
13328
+ model.appId,
13329
+ "PSAppDataEntity",
13330
+ model.codeName
13331
+ );
13223
13332
  this.wf = new WorkFlowService(model);
13224
13333
  this.file = new FileService(model);
13225
13334
  }
@@ -13276,7 +13385,7 @@ var DEService = class {
13276
13385
  };
13277
13386
 
13278
13387
  // src/service/vo/control.vo.ts
13279
- import { clone as clone10, isNil as isNil8 } from "ramda";
13388
+ import { clone as clone10, isNil as isNil9 } from "ramda";
13280
13389
  var ControlVO = class _ControlVO {
13281
13390
  /**
13282
13391
  * 是否是新建数据,0为新建
@@ -13286,7 +13395,7 @@ var ControlVO = class _ControlVO {
13286
13395
  * @type {Srfuf}
13287
13396
  */
13288
13397
  get srfuf() {
13289
- if (isNil8(this.$origin.srfuf)) {
13398
+ if (isNil9(this.$origin.srfuf)) {
13290
13399
  return this.srfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
13291
13400
  }
13292
13401
  return this.$origin.srfuf;
@@ -13404,12 +13513,9 @@ var ControlVO = class _ControlVO {
13404
13513
  return uiKey === "srfkey" ? this.$origin[dataKey] || this.$origin[uiKey] : this.$origin[dataKey];
13405
13514
  },
13406
13515
  set(val) {
13407
- this.$origin[dataKey] = mapField ? mapField.convertVal(val) : val;
13516
+ this.$origin[dataKey] = val;
13408
13517
  }
13409
13518
  });
13410
- if (mapField) {
13411
- this[uiKey] = mapField.convertVal(this.$origin[dataKey]);
13412
- }
13413
13519
  } else {
13414
13520
  Object.defineProperty(this, uiKey, {
13415
13521
  enumerable: true,
@@ -14088,8 +14194,8 @@ var TreeStaticNodeData = class extends TreeNodeData {
14088
14194
  };
14089
14195
 
14090
14196
  // src/service/vo/ui-map-field.ts
14091
- import { DataTypes } from "@ibiz-template/core";
14092
- import { isNil as isNil9 } from "ramda";
14197
+ import { DataTypes as DataTypes2 } from "@ibiz-template/core";
14198
+ import { isNil as isNil10 } from "ramda";
14093
14199
  var UIMapField = class {
14094
14200
  constructor(uiKey, dataKey, opts = {}) {
14095
14201
  /**
@@ -14110,10 +14216,10 @@ var UIMapField = class {
14110
14216
  this.isRequestNeed = true;
14111
14217
  this.uiKey = uiKey;
14112
14218
  this.dataKey = dataKey;
14113
- if (!isNil9(opts.isOriginField)) {
14219
+ if (!isNil10(opts.isOriginField)) {
14114
14220
  this.isOriginField = opts.isOriginField;
14115
14221
  }
14116
- if (!isNil9(opts.dataType)) {
14222
+ if (!isNil10(opts.dataType)) {
14117
14223
  this.dataType = opts.dataType;
14118
14224
  }
14119
14225
  }
@@ -14127,8 +14233,8 @@ var UIMapField = class {
14127
14233
  if (!this.dataType) {
14128
14234
  return value;
14129
14235
  }
14130
- if (DataTypes.isNumber(this.dataType)) {
14131
- const numVal = !isNil9(value) && value !== "" ? Number(value) : value;
14236
+ if (DataTypes2.isNumber(this.dataType)) {
14237
+ const numVal = !isNil10(value) && value !== "" ? Number(value) : value;
14132
14238
  if (Number.isNaN(numVal)) {
14133
14239
  ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
14134
14240
  return value;
@@ -14304,7 +14410,7 @@ var DEServiceUtil = class {
14304
14410
  };
14305
14411
 
14306
14412
  // src/app-hub.ts
14307
- import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
14413
+ import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
14308
14414
 
14309
14415
  // src/application.ts
14310
14416
  import { Net } from "@ibiz-template/core";
@@ -14329,6 +14435,11 @@ var Application = class {
14329
14435
  this.net = new Net({
14330
14436
  baseURL: "".concat(ibiz.env.baseUrl, "/").concat(model.appId)
14331
14437
  });
14438
+ this.configCache = new ConfigService(
14439
+ model.appId,
14440
+ "PSSysApp",
14441
+ model.codeName
14442
+ );
14332
14443
  this.deService = new DEServiceUtil(model);
14333
14444
  this.codeList = new CodeListService(model);
14334
14445
  this.authority = new AuthorityService(model);
@@ -14547,8 +14658,8 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
14547
14658
 
14548
14659
  // src/controller/common/view/view.controller.ts
14549
14660
  import { createUUID as createUUID3, notNilEmpty as notNilEmpty6 } from "qx-util";
14550
- import { IBizContext as IBizContext2, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
14551
- import { isEmpty as isEmpty8, isNil as isNil13, isNotNil as isNotNil3 } from "ramda";
14661
+ import { IBizContext as IBizContext2, RuntimeError as RuntimeError24 } from "@ibiz-template/core";
14662
+ import { isEmpty as isEmpty8, isNil as isNil15, isNotNil as isNotNil3 } from "ramda";
14552
14663
 
14553
14664
  // src/controller/utils/loading/loading.state.ts
14554
14665
  import { NOOP } from "@ibiz-template/core";
@@ -15117,6 +15228,18 @@ var ControllerEvent = class {
15117
15228
  }
15118
15229
  this.evt.on(name, fn);
15119
15230
  }
15231
+ /**
15232
+ * 取消订阅指定事件
15233
+ * @return {*}
15234
+ * @author: zhujiamin
15235
+ * @Date: 2023-09-22 17:45:07
15236
+ */
15237
+ off(name, fn) {
15238
+ if (this.isDestroyed) {
15239
+ return;
15240
+ }
15241
+ this.evt.off(name, fn);
15242
+ }
15120
15243
  /**
15121
15244
  * 订阅任意事件
15122
15245
  * @author lxm
@@ -15143,9 +15266,9 @@ var ControllerEvent = class {
15143
15266
  };
15144
15267
 
15145
15268
  // src/controller/utils/util/util.ts
15146
- import { isNil as isNil10 } from "ramda";
15269
+ import { isNil as isNil11 } from "ramda";
15147
15270
  function isValueChange(value, value2) {
15148
- if ((isNil10(value) || value === "") && (isNil10(value2) || value2 === "")) {
15271
+ if ((isNil11(value) || value === "") && (isNil11(value2) || value2 === "")) {
15149
15272
  return false;
15150
15273
  }
15151
15274
  return value !== value2;
@@ -15221,7 +15344,7 @@ function generateRules(itemVRs, name, valueItemName) {
15221
15344
 
15222
15345
  // src/controller/utils/value-ex/value-ex.ts
15223
15346
  import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
15224
- import { isNil as isNil11, mergeLeft } from "ramda";
15347
+ import { isNil as isNil12, mergeLeft } from "ramda";
15225
15348
  var ValueExUtil = class {
15226
15349
  /**
15227
15350
  * 合并默认值
@@ -15246,7 +15369,7 @@ var ValueExUtil = class {
15246
15369
  * @return {*} {string}
15247
15370
  */
15248
15371
  static toText(options, value) {
15249
- if (isNil11(value) || value === "") {
15372
+ if (isNil12(value) || value === "") {
15250
15373
  return "";
15251
15374
  }
15252
15375
  const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
@@ -15271,12 +15394,12 @@ var ValueExUtil = class {
15271
15394
  import { RuntimeError as RuntimeError22, ModelError as ModelError16 } from "@ibiz-template/core";
15272
15395
  import dayjs from "dayjs";
15273
15396
  import { createUUID as createUUID2 } from "qx-util";
15274
- import { isNil as isNil12, isNotNil as isNotNil2 } from "ramda";
15397
+ import { isNil as isNil13, isNotNil as isNotNil2 } from "ramda";
15275
15398
  function getDefaultValue(opts, origins) {
15276
15399
  var _a;
15277
15400
  const { name, valueType, defaultValue, valueFormat } = opts;
15278
15401
  const { data, context, params } = origins;
15279
- if (isNil12(valueType) && isNil12(defaultValue)) {
15402
+ if (isNil13(valueType) && isNil13(defaultValue)) {
15280
15403
  return;
15281
15404
  }
15282
15405
  if (valueType === "RESET") {
@@ -15527,6 +15650,205 @@ var BaseController = class {
15527
15650
  }
15528
15651
  };
15529
15652
 
15653
+ // src/controller/utils/view-msg/view-msg-controller.ts
15654
+ import { RuntimeError as RuntimeError23, RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
15655
+ import { isNil as isNil14, mergeRight as mergeRight2 } from "ramda";
15656
+ var ViewMsgController = class _ViewMsgController {
15657
+ constructor(msgGroupId) {
15658
+ this.msgGroupId = msgGroupId;
15659
+ /**
15660
+ * 视图消息map
15661
+ * @author lxm
15662
+ * @date 2023-09-22 05:38:03
15663
+ */
15664
+ this.viewMsgMap = /* @__PURE__ */ new Map();
15665
+ }
15666
+ /**
15667
+ * 初始化方法,从全局获取视图消息组和视图消息的模型
15668
+ * @author lxm
15669
+ * @date 2023-09-22 05:41:08
15670
+ * @param {IContext} context
15671
+ * @return {*} {Promise<void>}
15672
+ */
15673
+ async init(context) {
15674
+ var _a, _b;
15675
+ const appModel = ibiz.hub.getApp(context.srfappid).model;
15676
+ const msgGroup = (_a = appModel.appViewMsgGroups) == null ? void 0 : _a.find(
15677
+ (item) => item.id === this.msgGroupId
15678
+ );
15679
+ if (!msgGroup) {
15680
+ throw new RuntimeError23("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
15681
+ }
15682
+ this.msgGroup = msgGroup;
15683
+ const msgDetailsViewMsgIds = msgGroup.appViewMsgGroupDetails.map(
15684
+ (item) => item.appViewMsgId
15685
+ );
15686
+ (_b = appModel.appViewMsgs) == null ? void 0 : _b.forEach((item) => {
15687
+ const index = msgDetailsViewMsgIds.indexOf(item.id);
15688
+ if (index !== -1) {
15689
+ this.viewMsgMap.set(item.id, item);
15690
+ msgDetailsViewMsgIds.splice(index, 1);
15691
+ }
15692
+ });
15693
+ if (msgDetailsViewMsgIds.length) {
15694
+ throw new RuntimeError23(
15695
+ "\u6CA1\u6709\u627E\u5230".concat(msgDetailsViewMsgIds.join(","), "\u89C6\u56FE\u6D88\u606F\u6A21\u578B")
15696
+ );
15697
+ }
15698
+ }
15699
+ getDeFieldName(appDataEntity, fieldId) {
15700
+ var _a, _b;
15701
+ if (!fieldId) {
15702
+ return;
15703
+ }
15704
+ return (_b = (_a = findFieldById(appDataEntity, fieldId)) == null ? void 0 : _a.name) == null ? void 0 : _b.toLowerCase();
15705
+ }
15706
+ /**
15707
+ * 查询并获取指定实体的数据集数据
15708
+ * @author lxm
15709
+ * @date 2023-09-20 08:10:57
15710
+ * @static
15711
+ * @param {IPSAppDEDataSetViewMsg} msgModel
15712
+ * @param {IParams} [context={}]
15713
+ * @param {IParams} [params={}]
15714
+ * @return {*} {Promise<IData[]>}
15715
+ */
15716
+ static async fetchDataSet(msgModel, context, params) {
15717
+ const { appDataEntityId, appDEDataSetId } = msgModel;
15718
+ if (!appDEDataSetId) {
15719
+ throw new RuntimeModelError20(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
15720
+ }
15721
+ const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
15722
+ if (res.data.length) {
15723
+ return res.data;
15724
+ }
15725
+ return [];
15726
+ }
15727
+ /**
15728
+ * 计算视图信息呈现数据
15729
+ * @author lxm
15730
+ * @date 2023-09-20 09:16:59
15731
+ * @param {IContext} context
15732
+ * @param {IParams} params
15733
+ * @return {*} {IViewMessage[]}
15734
+ */
15735
+ async calcViewMessages(context, params) {
15736
+ const details = this.msgGroup.appViewMsgGroupDetails;
15737
+ const result = [];
15738
+ if (details == null ? void 0 : details.length) {
15739
+ await Promise.all(
15740
+ details.map(async (detail) => {
15741
+ const msgModel = this.viewMsgMap.get(detail.appViewMsgId);
15742
+ if (msgModel.dynamicMode === 1) {
15743
+ const msgs = await this.calcDynaMsgs(detail, context, params);
15744
+ result.push(...msgs);
15745
+ } else {
15746
+ const msgData = this.calcStaticMsg(detail);
15747
+ result.push(msgData);
15748
+ }
15749
+ })
15750
+ );
15751
+ }
15752
+ return result;
15753
+ }
15754
+ /**
15755
+ * 计算静态消息数据(或者动态的里面静态的配置)
15756
+ * @author lxm
15757
+ * @date 2023-09-20 09:46:45
15758
+ * @protected
15759
+ * @param {IPSAppViewMsgGroupDetail} detail
15760
+ * @return {*} {IViewMessage}
15761
+ */
15762
+ calcStaticMsg(detail) {
15763
+ const { position: position1 } = detail;
15764
+ const {
15765
+ title,
15766
+ message,
15767
+ removeMode,
15768
+ position: position2,
15769
+ messageType
15770
+ } = this.viewMsgMap.get(detail.appViewMsgId);
15771
+ const position = position1 || position2;
15772
+ return {
15773
+ title,
15774
+ message,
15775
+ position,
15776
+ messageType,
15777
+ removeMode
15778
+ };
15779
+ }
15780
+ /**
15781
+ * 计算动态视图消息数据
15782
+ * @author lxm
15783
+ * @date 2023-09-20 09:46:26
15784
+ * @protected
15785
+ * @param {IPSAppViewMsgGroupDetail} detail
15786
+ * @param {IContext} context
15787
+ * @param {IParams} params
15788
+ * @return {*} {Promise<IViewMessage[]>}
15789
+ */
15790
+ async calcDynaMsgs(detail, context, params) {
15791
+ const msgModel = this.viewMsgMap.get(
15792
+ detail.appViewMsgId
15793
+ );
15794
+ const {
15795
+ appDataEntityId,
15796
+ orderValueAppDEFieldId,
15797
+ titleAppDEFieldId,
15798
+ removeFlagAppDEFieldId,
15799
+ msgTypeAppDEFieldId,
15800
+ contentAppDEFieldId,
15801
+ msgPosAppDEFieldId
15802
+ } = msgModel;
15803
+ if (!appDataEntityId) {
15804
+ throw new RuntimeModelError20(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
15805
+ }
15806
+ const entity = await ibiz.hub.getAppDataEntity(
15807
+ appDataEntityId,
15808
+ context.srfappid
15809
+ );
15810
+ const fetchParams = { ...params };
15811
+ const sortField = this.getDeFieldName(entity, orderValueAppDEFieldId);
15812
+ if (sortField) {
15813
+ fetchParams.sort = "".concat(sortField, ",asc");
15814
+ }
15815
+ const dataSet = await _ViewMsgController.fetchDataSet(
15816
+ msgModel,
15817
+ context,
15818
+ fetchParams
15819
+ );
15820
+ if (!dataSet.length) {
15821
+ return [];
15822
+ }
15823
+ const basicMsg = this.calcStaticMsg(detail);
15824
+ const titleField = this.getDeFieldName(entity, titleAppDEFieldId);
15825
+ const positionField = this.getDeFieldName(entity, msgPosAppDEFieldId);
15826
+ const messageField = this.getDeFieldName(entity, contentAppDEFieldId);
15827
+ const typeField = this.getDeFieldName(entity, msgTypeAppDEFieldId);
15828
+ const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
15829
+ const deViewMessages = dataSet.map((item) => {
15830
+ const message = {};
15831
+ if (positionField && !isNil14(item[positionField])) {
15832
+ message.position = item[positionField];
15833
+ }
15834
+ if (titleField && !isNil14(item[titleField])) {
15835
+ message.title = item[titleField];
15836
+ }
15837
+ if (messageField && !isNil14(item[messageField])) {
15838
+ message.message = item[messageField];
15839
+ }
15840
+ if (typeField && !isNil14(item[typeField])) {
15841
+ message.messageType = item[typeField];
15842
+ }
15843
+ if (removeModeField && !isNil14(item[removeModeField])) {
15844
+ message.removeMode = item[removeModeField];
15845
+ }
15846
+ return mergeRight2(basicMsg, message);
15847
+ });
15848
+ return deViewMessages;
15849
+ }
15850
+ };
15851
+
15530
15852
  // src/controller/common/view/view.controller.ts
15531
15853
  var ViewController = class extends BaseController {
15532
15854
  /**
@@ -15662,6 +15984,7 @@ var ViewController = class extends BaseController {
15662
15984
  this.state.isLoading = false;
15663
15985
  this.state.caption = this.model.caption;
15664
15986
  this.state.srfactiveviewdata = null;
15987
+ this.state.viewMessages = {};
15665
15988
  }
15666
15989
  async onCreated() {
15667
15990
  await super.onCreated();
@@ -15702,6 +16025,7 @@ var ViewController = class extends BaseController {
15702
16025
  });
15703
16026
  }
15704
16027
  }
16028
+ this.initViewMsg();
15705
16029
  if (this.engines.length) {
15706
16030
  await Promise.all(this.engines.map((engine) => engine.onCreated()));
15707
16031
  }
@@ -15736,7 +16060,7 @@ var ViewController = class extends BaseController {
15736
16060
  */
15737
16061
  handleContextParams() {
15738
16062
  this.context.srfappid = this.model.appId;
15739
- if (isNil13(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
16063
+ if (isNil15(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
15740
16064
  this.context.srfsessionid = createUUID3();
15741
16065
  }
15742
16066
  const navContexts = this.model.appViewNavContexts;
@@ -15768,7 +16092,7 @@ var ViewController = class extends BaseController {
15768
16092
  async callUIAction(key, args) {
15769
16093
  const result = this.call(key, args);
15770
16094
  if (result === void 0) {
15771
- throw new RuntimeError23("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
16095
+ throw new RuntimeError24("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
15772
16096
  }
15773
16097
  return result;
15774
16098
  }
@@ -15808,6 +16132,55 @@ var ViewController = class extends BaseController {
15808
16132
  });
15809
16133
  }
15810
16134
  }
16135
+ /**
16136
+ * 初始化视图消息
16137
+ * @author lxm
16138
+ * @date 2023-09-20 09:19:20
16139
+ */
16140
+ async initViewMsg() {
16141
+ const { appViewMsgGroupId } = this.model;
16142
+ if (appViewMsgGroupId) {
16143
+ this.state.viewMessages = { TOP: [], BOTTOM: [], BODY: [], POPUP: [] };
16144
+ this.viewMsgController = new ViewMsgController(appViewMsgGroupId);
16145
+ await this.viewMsgController.init(this.context);
16146
+ const messages = await this.viewMsgController.calcViewMessages(
16147
+ this.context,
16148
+ this.params
16149
+ );
16150
+ messages.forEach((message) => {
16151
+ if (["TOP", "BOTTOM", "BODY", "POPUP"].includes(message.position)) {
16152
+ this.state.viewMessages[message.position].push(message);
16153
+ }
16154
+ });
16155
+ if (this.state.viewMessages.POPUP.length) {
16156
+ this.alertViewMessage(this.state.viewMessages.POPUP);
16157
+ }
16158
+ }
16159
+ }
16160
+ /**
16161
+ * 弹出视图消息,一个接一个弹
16162
+ * @author lxm
16163
+ * @date 2023-09-20 10:17:42
16164
+ * @param {ViewMessage[]} messages
16165
+ * @return {*} {Promise<void>}
16166
+ */
16167
+ async alertViewMessage(messages) {
16168
+ const [message, ...rest] = messages;
16169
+ const modalParams = {
16170
+ title: message.title,
16171
+ desc: message.message
16172
+ };
16173
+ if (message.messageType === "WARN") {
16174
+ await ibiz.modal.warning(modalParams);
16175
+ } else if (message.messageType === "ERROR") {
16176
+ await ibiz.modal.error(modalParams);
16177
+ } else {
16178
+ await ibiz.modal.info(modalParams);
16179
+ }
16180
+ if (rest.length) {
16181
+ this.alertViewMessage(rest);
16182
+ }
16183
+ }
15811
16184
  };
15812
16185
 
15813
16186
  // src/controller/common/view/mob-view.controller.ts
@@ -15969,7 +16342,7 @@ var EditorController = class {
15969
16342
  };
15970
16343
 
15971
16344
  // src/controller/common/editor/code-list-editor.controller.ts
15972
- import { RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
16345
+ import { RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
15973
16346
  var CodeListEditorController = class extends EditorController {
15974
16347
  /**
15975
16348
  * 加载代码表数据
@@ -15993,13 +16366,13 @@ var CodeListEditorController = class extends EditorController {
15993
16366
  );
15994
16367
  return dataItems;
15995
16368
  }
15996
- throw new RuntimeModelError20(this.model, "\u8BF7\u914D\u7F6E\u4EE3\u7801\u8868");
16369
+ throw new RuntimeModelError21(this.model, "\u8BF7\u914D\u7F6E\u4EE3\u7801\u8868");
15997
16370
  }
15998
16371
  };
15999
16372
 
16000
16373
  // src/controller/common/control/control.controller.ts
16001
16374
  import { NoticeError } from "@ibiz-template/core";
16002
- import { isNil as isNil14 } from "ramda";
16375
+ import { isNil as isNil16 } from "ramda";
16003
16376
  var ControlController = class extends BaseController {
16004
16377
  /**
16005
16378
  * Creates an instance of ControlController.
@@ -16176,7 +16549,7 @@ var ControlController = class extends BaseController {
16176
16549
  let message;
16177
16550
  let duration;
16178
16551
  if (msgItem && msgItem.content) {
16179
- duration = isNil14(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
16552
+ duration = isNil16(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
16180
16553
  const scriptParams = { ...this.getEventArgs() };
16181
16554
  if (opts == null ? void 0 : opts.data) {
16182
16555
  scriptParams.data = opts.data;
@@ -16215,7 +16588,7 @@ var ControlController = class extends BaseController {
16215
16588
  };
16216
16589
 
16217
16590
  // src/controller/common/control/md-control.controller.ts
16218
- import { isElementSame, RuntimeError as RuntimeError24 } from "@ibiz-template/core";
16591
+ import { isElementSame, RuntimeError as RuntimeError25 } from "@ibiz-template/core";
16219
16592
  var MDControlController = class extends ControlController {
16220
16593
  constructor() {
16221
16594
  super(...arguments);
@@ -16330,6 +16703,9 @@ var MDControlController = class extends ControlController {
16330
16703
  * @date 2022-08-19 14:08:50
16331
16704
  */
16332
16705
  async load(args = {}) {
16706
+ if (this.state.isSimple) {
16707
+ return [];
16708
+ }
16333
16709
  await this.startLoading();
16334
16710
  try {
16335
16711
  const isInitialLoad = args.isInitialLoad === true;
@@ -16397,7 +16773,7 @@ var MDControlController = class extends ControlController {
16397
16773
  async remove(args) {
16398
16774
  const { context, params, data } = this.handlerAbilityParams(args);
16399
16775
  if (!(data == null ? void 0 : data.length)) {
16400
- throw new RuntimeError24("\u672A\u9009\u4E2D\u6570\u636E");
16776
+ throw new RuntimeError25("\u672A\u9009\u4E2D\u6570\u636E");
16401
16777
  }
16402
16778
  if ((args == null ? void 0 : args.silent) !== true) {
16403
16779
  const del = await ibiz.confirm.error({
@@ -16541,8 +16917,8 @@ var MDControlController = class extends ControlController {
16541
16917
  // src/controller/control/app-menu/app-menu.controller.ts
16542
16918
  import {
16543
16919
  findRecursiveChild,
16544
- RuntimeError as RuntimeError25,
16545
- RuntimeModelError as RuntimeModelError21
16920
+ RuntimeError as RuntimeError26,
16921
+ RuntimeModelError as RuntimeModelError22
16546
16922
  } from "@ibiz-template/core";
16547
16923
  var AppMenuController = class extends ControlController {
16548
16924
  initState() {
@@ -16581,14 +16957,14 @@ var AppMenuController = class extends ControlController {
16581
16957
  childrenFields: ["appMenuItems"]
16582
16958
  });
16583
16959
  if (!menuItem) {
16584
- throw new RuntimeError25("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16960
+ throw new RuntimeError26("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16585
16961
  }
16586
16962
  this.evt.emit("onClick", {
16587
16963
  eventArg: id,
16588
16964
  event
16589
16965
  });
16590
16966
  if (!menuItem.appFuncId) {
16591
- throw new RuntimeModelError21(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
16967
+ throw new RuntimeModelError22(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
16592
16968
  }
16593
16969
  const tempContext = this.context.clone();
16594
16970
  if (this.routeDepth && useDepth) {
@@ -16671,8 +17047,8 @@ var AppMenuController = class extends ControlController {
16671
17047
  // src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
16672
17048
  import {
16673
17049
  findRecursiveChild as findRecursiveChild2,
16674
- RuntimeError as RuntimeError26,
16675
- RuntimeModelError as RuntimeModelError22
17050
+ RuntimeError as RuntimeError27,
17051
+ RuntimeModelError as RuntimeModelError23
16676
17052
  } from "@ibiz-template/core";
16677
17053
  var AppMenuIconViewController = class extends AppMenuController {
16678
17054
  async onClickMenuItem(id, event) {
@@ -16681,14 +17057,14 @@ var AppMenuIconViewController = class extends AppMenuController {
16681
17057
  childrenFields: ["appMenuItems"]
16682
17058
  });
16683
17059
  if (!menuItem) {
16684
- throw new RuntimeError26("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
17060
+ throw new RuntimeError27("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16685
17061
  }
16686
17062
  this.evt.emit("onClick", {
16687
17063
  eventArg: id,
16688
17064
  event
16689
17065
  });
16690
17066
  if (!menuItem.appFuncId) {
16691
- throw new RuntimeModelError22(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
17067
+ throw new RuntimeModelError23(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
16692
17068
  }
16693
17069
  const tempContext = this.context.clone();
16694
17070
  if (this.routeDepth === 1) {
@@ -16709,7 +17085,7 @@ var AppMenuIconViewController = class extends AppMenuController {
16709
17085
  import dayjs2 from "dayjs";
16710
17086
 
16711
17087
  // src/controller/control/calendar/calendar.service.ts
16712
- import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
17088
+ import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
16713
17089
  var CalendarService = class extends MDControlService {
16714
17090
  /**
16715
17091
  * 执行查询多条数据的方法
@@ -16759,11 +17135,11 @@ var CalendarService = class extends MDControlService {
16759
17135
  setCalendarConfigData(items, index) {
16760
17136
  const { sysCalendarItems } = this.model;
16761
17137
  if (!sysCalendarItems) {
16762
- throw new RuntimeError27("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
17138
+ throw new RuntimeError28("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16763
17139
  }
16764
17140
  const calendarItem = sysCalendarItems[index];
16765
17141
  if (!calendarItem) {
16766
- throw new RuntimeError27("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
17142
+ throw new RuntimeError28("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16767
17143
  }
16768
17144
  return items.map((item) => {
16769
17145
  return new CalendarItemData(calendarItem, item);
@@ -16953,24 +17329,24 @@ var CalendarController = class extends MDControlController {
16953
17329
  };
16954
17330
 
16955
17331
  // src/controller/control/chart/chart.controller.ts
16956
- import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
17332
+ import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
16957
17333
 
16958
17334
  // src/controller/control/chart/generator/chart-options-generator.ts
16959
17335
  import { mergeDeepRight as mergeDeepRight3 } from "ramda";
16960
- import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
17336
+ import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
16961
17337
 
16962
17338
  // src/controller/control/chart/generator/line-series-generator.ts
16963
- import { RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
17339
+ import { RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
16964
17340
 
16965
17341
  // src/controller/control/chart/generator/base-series-generator.ts
16966
- import { RuntimeModelError as RuntimeModelError23, toNumberOrNil } from "@ibiz-template/core";
17342
+ import { RuntimeModelError as RuntimeModelError24, toNumberOrNil } from "@ibiz-template/core";
16967
17343
  import dayjs3 from "dayjs";
16968
17344
  import minMax from "dayjs/plugin/minMax";
16969
17345
  import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
16970
17346
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
16971
17347
  import weekOfYear from "dayjs/plugin/weekOfYear";
16972
17348
  import isoWeek from "dayjs/plugin/isoWeek";
16973
- import { clone as clone11, isNil as isNil15, mergeDeepRight } from "ramda";
17349
+ import { clone as clone11, isNil as isNil17, mergeDeepRight } from "ramda";
16974
17350
  dayjs3.extend(minMax);
16975
17351
  dayjs3.extend(isSameOrBefore);
16976
17352
  dayjs3.extend(quarterOfYear);
@@ -17006,10 +17382,10 @@ var BaseSeriesGenerator = class {
17006
17382
  this.chartGenerator = chartGenerator;
17007
17383
  const { chartSeriesEncode, caption, id, userParam } = model;
17008
17384
  if (!model.catalogField) {
17009
- throw new RuntimeModelError23(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
17385
+ throw new RuntimeModelError24(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
17010
17386
  }
17011
17387
  if (!model.valueField) {
17012
- throw new RuntimeModelError23(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
17388
+ throw new RuntimeModelError24(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
17013
17389
  }
17014
17390
  this.catalogField = chartGenerator.getFieldKey(model.catalogField);
17015
17391
  this.valueField = chartGenerator.getFieldKey(model.valueField);
@@ -17059,10 +17435,10 @@ var BaseSeriesGenerator = class {
17059
17435
  * @return {*} {(string | undefined)}
17060
17436
  */
17061
17437
  translateVal(codeListKey, val, isExclude = false) {
17062
- if (isNil15(val)) {
17438
+ if (isNil17(val)) {
17063
17439
  return void 0;
17064
17440
  }
17065
- if (isNil15(codeListKey)) {
17441
+ if (isNil17(codeListKey)) {
17066
17442
  return val;
17067
17443
  }
17068
17444
  const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
@@ -17092,7 +17468,7 @@ var BaseSeriesGenerator = class {
17092
17468
  seriesCodeListId,
17093
17469
  item[this.groupField]
17094
17470
  );
17095
- if (isNil15(groupVal)) {
17471
+ if (isNil17(groupVal)) {
17096
17472
  return;
17097
17473
  }
17098
17474
  group = groupVal;
@@ -17387,10 +17763,10 @@ var BaseSeriesGenerator = class {
17387
17763
  var LineSeriesGenerator = class extends BaseSeriesGenerator {
17388
17764
  calcStaticOptions() {
17389
17765
  if (this.xAxisIndex === void 0) {
17390
- throw new RuntimeModelError24(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
17766
+ throw new RuntimeModelError25(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
17391
17767
  }
17392
17768
  if (this.yAxisIndex === void 0) {
17393
- throw new RuntimeModelError24(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
17769
+ throw new RuntimeModelError25(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
17394
17770
  }
17395
17771
  const options = super.calcStaticOptions();
17396
17772
  options.xAxisIndex = this.xAxisIndex;
@@ -17406,14 +17782,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
17406
17782
  };
17407
17783
 
17408
17784
  // src/controller/control/chart/generator/bar-series-generator.ts
17409
- import { RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
17785
+ import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
17410
17786
  var BarSeriesGenerator = class extends BaseSeriesGenerator {
17411
17787
  calcStaticOptions() {
17412
17788
  if (this.xAxisIndex === void 0) {
17413
- throw new RuntimeModelError25(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
17789
+ throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
17414
17790
  }
17415
17791
  if (this.yAxisIndex === void 0) {
17416
- throw new RuntimeModelError25(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
17792
+ throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
17417
17793
  }
17418
17794
  const options = super.calcStaticOptions();
17419
17795
  options.xAxisIndex = this.xAxisIndex;
@@ -17466,14 +17842,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
17466
17842
  };
17467
17843
 
17468
17844
  // src/controller/control/chart/generator/scatter-series-generator.ts
17469
- import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
17845
+ import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
17470
17846
  var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
17471
17847
  calcStaticOptions() {
17472
17848
  if (this.xAxisIndex === void 0) {
17473
- throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
17849
+ throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
17474
17850
  }
17475
17851
  if (this.yAxisIndex === void 0) {
17476
- throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
17852
+ throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
17477
17853
  }
17478
17854
  const options = super.calcStaticOptions();
17479
17855
  options.xAxisIndex = this.xAxisIndex;
@@ -17893,7 +18269,7 @@ var ChartOptionsGenerator2 = class {
17893
18269
  getSrfkeyByParams(params) {
17894
18270
  const generator = this.seriesGenerators[params.seriesIndex];
17895
18271
  if (!generator) {
17896
- throw new RuntimeError28("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
18272
+ throw new RuntimeError29("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
17897
18273
  }
17898
18274
  return generator.getSrfkeyByParams(params);
17899
18275
  }
@@ -18005,10 +18381,10 @@ var ChartController = class extends MDControlController {
18005
18381
  */
18006
18382
  updateChart() {
18007
18383
  if (!this.chart) {
18008
- throw new RuntimeError29("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
18384
+ throw new RuntimeError30("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
18009
18385
  }
18010
18386
  if (!this.options) {
18011
- throw new RuntimeError29("options\u8FD8\u6CA1\u8BA1\u7B97");
18387
+ throw new RuntimeError30("options\u8FD8\u6CA1\u8BA1\u7B97");
18012
18388
  }
18013
18389
  this.chart.setOption(this.options);
18014
18390
  this.resizeChart();
@@ -18053,20 +18429,20 @@ var CaptionBarController = class extends ControlController {
18053
18429
  };
18054
18430
 
18055
18431
  // src/controller/control/toolbar/toolbar.controllerr.ts
18056
- import { recursiveIterate } from "@ibiz-template/core";
18432
+ import { recursiveIterate, RuntimeError as RuntimeError37 } from "@ibiz-template/core";
18057
18433
 
18058
18434
  // src/ui-action/provider/backend-ui-action-provider.ts
18059
- import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
18435
+ import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
18060
18436
  import { isArray as isArray4 } from "qx-util";
18061
18437
 
18062
18438
  // src/ui-action/provider/ui-action-provider-base.ts
18063
- import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
18439
+ import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
18064
18440
 
18065
18441
  // src/ui-logic/index.ts
18066
- import { RuntimeError as RuntimeError34 } from "@ibiz-template/core";
18442
+ import { RuntimeError as RuntimeError35 } from "@ibiz-template/core";
18067
18443
 
18068
18444
  // src/ui-logic/ui-logic.ts
18069
- import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
18445
+ import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
18070
18446
 
18071
18447
  // src/ui-logic/ui-logic-context.ts
18072
18448
  var UILogicContext = class {
@@ -18186,23 +18562,34 @@ var UILogicContext = class {
18186
18562
  get: () => this.lastReturn
18187
18563
  });
18188
18564
  }
18565
+ /**
18566
+ * 是否是实体参数变量(即后台数据对象)
18567
+ * @author lxm
18568
+ * @date 2023-09-22 03:40:30
18569
+ * @param {string} paramId
18570
+ * @return {*} {boolean}
18571
+ */
18572
+ isEntityParam(paramId) {
18573
+ const deLogicParams = this.deLogicParams.get(paramId);
18574
+ return !!(deLogicParams && deLogicParams.model.entityParam);
18575
+ }
18189
18576
  };
18190
18577
 
18191
18578
  // src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
18192
- import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
18579
+ import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
18193
18580
 
18194
18581
  // src/ui-logic/ui-logic-link/ui-logic-link.ts
18195
18582
  import { ModelError as ModelError18 } from "@ibiz-template/core";
18196
18583
 
18197
18584
  // src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
18198
- import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
18585
+ import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
18199
18586
 
18200
18587
  // src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
18201
18588
  var UILogicLinkCond = class {
18202
18589
  };
18203
18590
 
18204
18591
  // src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
18205
- import { ModelError as ModelError17, RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
18592
+ import { ModelError as ModelError17, RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
18206
18593
  var UILogicLinkSingleCond = class extends UILogicLinkCond {
18207
18594
  constructor(model) {
18208
18595
  super();
@@ -18237,7 +18624,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
18237
18624
  switch (this.type) {
18238
18625
  case "ENTITYFIELD": {
18239
18626
  if (!this.value) {
18240
- throw new RuntimeModelError27(
18627
+ throw new RuntimeModelError28(
18241
18628
  this.model,
18242
18629
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
18243
18630
  );
@@ -18247,7 +18634,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
18247
18634
  }
18248
18635
  case "SRCENTITYFIELD": {
18249
18636
  if (!this.value) {
18250
- throw new RuntimeModelError27(
18637
+ throw new RuntimeModelError28(
18251
18638
  this.model,
18252
18639
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
18253
18640
  );
@@ -18310,7 +18697,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
18310
18697
  test(ctx, context, data) {
18311
18698
  let bol = true;
18312
18699
  if (this.conds.length === 0) {
18313
- throw new RuntimeModelError28(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
18700
+ throw new RuntimeModelError29(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
18314
18701
  }
18315
18702
  for (let i = 0; i < this.conds.length; i++) {
18316
18703
  const cond = this.conds[i];
@@ -18364,7 +18751,7 @@ var UILogicLink = class {
18364
18751
  */
18365
18752
  this.groupCond = null;
18366
18753
  const { linkMode, deuilogicLinkGroupCond } = this.model;
18367
- if (linkMode === 0) {
18754
+ if ((linkMode || 0) === 0) {
18368
18755
  if (deuilogicLinkGroupCond) {
18369
18756
  this.groupCond = new UILogicLinkGroupCond(deuilogicLinkGroupCond);
18370
18757
  }
@@ -18436,10 +18823,10 @@ var DEActionNode2 = class extends UILogicNode {
18436
18823
  retDEUILogicParamId
18437
18824
  } = this.model;
18438
18825
  if (!dstAppDataEntityId) {
18439
- throw new RuntimeModelError29(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
18826
+ throw new RuntimeModelError30(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
18440
18827
  }
18441
18828
  if (!dstAppDEActionId) {
18442
- throw new RuntimeModelError29(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
18829
+ throw new RuntimeModelError30(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
18443
18830
  }
18444
18831
  const requestData = ctx.params[dstDEUILogicParamId];
18445
18832
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -18457,13 +18844,13 @@ var DEActionNode2 = class extends UILogicNode {
18457
18844
  };
18458
18845
 
18459
18846
  // src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
18460
- import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
18847
+ import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
18461
18848
  var DEUIActionNode = class extends UILogicNode {
18462
18849
  async exec(ctx) {
18463
18850
  const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
18464
18851
  const { data, parameters } = ctx;
18465
18852
  if (!dstAppDEUIActionId) {
18466
- throw new RuntimeModelError30(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
18853
+ throw new RuntimeModelError31(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
18467
18854
  }
18468
18855
  let actionData = [data];
18469
18856
  if (dstDEUILogicParamId) {
@@ -18530,10 +18917,14 @@ import { clone as clone12 } from "ramda";
18530
18917
  function handleSrcVal2(ctx, srcValParams) {
18531
18918
  const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
18532
18919
  const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
18920
+ let srcField = srcFieldName;
18533
18921
  let value;
18534
18922
  switch (srcValueType) {
18535
18923
  case "SRCDLPARAM":
18536
18924
  value = ctx.params[srcDEUILogicParamId];
18925
+ if (ctx.isEntityParam(srcDEUILogicParamId)) {
18926
+ srcField = srcField == null ? void 0 : srcField.toLowerCase();
18927
+ }
18537
18928
  break;
18538
18929
  case "NULLVALUE":
18539
18930
  return null;
@@ -18557,9 +18948,20 @@ function handleSrcVal2(ctx, srcValParams) {
18557
18948
  default:
18558
18949
  throw new ModelError20(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
18559
18950
  }
18560
- const srcField = srcFieldName;
18561
18951
  if (value && srcField) {
18562
- value = value[srcField];
18952
+ try {
18953
+ value = ScriptFactory.execScriptFn(
18954
+ { srcValue: value },
18955
+ "srcValue.".concat(srcField),
18956
+ {
18957
+ singleRowReturn: true,
18958
+ isAsync: false
18959
+ }
18960
+ );
18961
+ } catch (error) {
18962
+ ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
18963
+ throw error;
18964
+ }
18563
18965
  }
18564
18966
  return value;
18565
18967
  }
@@ -18612,7 +19014,10 @@ var PrepareJSParamNode = class extends UILogicNode {
18612
19014
  */
18613
19015
  setParamValue(nodeParam, ctx) {
18614
19016
  const { dstFieldName, dstDEUILogicParamId } = nodeParam;
18615
- const dstField = dstFieldName;
19017
+ let dstField = dstFieldName;
19018
+ if (ctx.isEntityParam(dstDEUILogicParamId)) {
19019
+ dstField = dstField == null ? void 0 : dstField.toLowerCase();
19020
+ }
18616
19021
  const srcVal = handleSrcVal2(ctx, nodeParam);
18617
19022
  if (dstField) {
18618
19023
  ctx.params[dstDEUILogicParamId][dstField] = srcVal;
@@ -18709,43 +19114,43 @@ var PrepareJSParamNode = class extends UILogicNode {
18709
19114
  };
18710
19115
 
18711
19116
  // src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
18712
- import { RuntimeError as RuntimeError30, RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
19117
+ import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
18713
19118
  import { isFunction } from "lodash-es";
18714
19119
  var ViewCtrlInvokeNode = class extends UILogicNode {
18715
19120
  async exec(ctx) {
18716
19121
  ctx.isEndNode = true;
18717
19122
  const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
18718
19123
  if (!invokeCtrlId) {
18719
- throw new RuntimeModelError31(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
19124
+ throw new RuntimeModelError32(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
18720
19125
  }
18721
19126
  if (!invokeParamId) {
18722
- throw new RuntimeModelError31(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
19127
+ throw new RuntimeModelError32(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
18723
19128
  }
18724
19129
  if (!invokeMethod) {
18725
- throw new RuntimeModelError31(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
19130
+ throw new RuntimeModelError32(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
18726
19131
  }
18727
19132
  const invokeParam = ctx.params[invokeParamId];
18728
19133
  if (!invokeParam) {
18729
- throw new RuntimeError30("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
19134
+ throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
18730
19135
  }
18731
19136
  const invokeCtrl = ctx.params[invokeCtrlId];
18732
19137
  if (!invokeCtrl) {
18733
- throw new RuntimeError30("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
19138
+ throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
18734
19139
  }
18735
19140
  if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
18736
- throw new RuntimeError30("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
19141
+ throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
18737
19142
  }
18738
19143
  await invokeCtrl[invokeMethod](invokeParam);
18739
19144
  }
18740
19145
  };
18741
19146
 
18742
19147
  // src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
18743
- import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
19148
+ import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
18744
19149
  var BindParamNode2 = class extends UILogicNode {
18745
19150
  async exec(ctx) {
18746
19151
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
18747
19152
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
18748
- throw new RuntimeModelError32(
19153
+ throw new RuntimeModelError33(
18749
19154
  this.model,
18750
19155
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
18751
19156
  );
@@ -18756,7 +19161,7 @@ var BindParamNode2 = class extends UILogicNode {
18756
19161
  };
18757
19162
 
18758
19163
  // src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
18759
- import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
19164
+ import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
18760
19165
  var MsgBoxNode = class extends UILogicNode {
18761
19166
  constructor() {
18762
19167
  super(...arguments);
@@ -18770,10 +19175,10 @@ var MsgBoxNode = class extends UILogicNode {
18770
19175
  async exec(ctx) {
18771
19176
  const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
18772
19177
  if (!msgBoxType) {
18773
- throw new RuntimeModelError33(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
19178
+ throw new RuntimeModelError34(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
18774
19179
  }
18775
19180
  if (!buttonsType) {
18776
- throw new RuntimeModelError33(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
19181
+ throw new RuntimeModelError34(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
18777
19182
  }
18778
19183
  let { title } = this.model;
18779
19184
  let { message } = this.model;
@@ -18823,12 +19228,12 @@ var MsgBoxNode = class extends UILogicNode {
18823
19228
  };
18824
19229
 
18825
19230
  // src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
18826
- import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
19231
+ import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
18827
19232
  var DebugParamNode = class extends UILogicNode {
18828
19233
  async exec(ctx) {
18829
19234
  const { dstDEUILogicParamId, name } = this.model;
18830
19235
  if (!dstDEUILogicParamId) {
18831
- throw new RuntimeModelError34(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
19236
+ throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
18832
19237
  }
18833
19238
  const param = ctx.params[dstDEUILogicParamId];
18834
19239
  console.log("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
@@ -18836,25 +19241,25 @@ var DebugParamNode = class extends UILogicNode {
18836
19241
  };
18837
19242
 
18838
19243
  // src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
18839
- import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
19244
+ import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
18840
19245
  var ResetParamNode2 = class extends UILogicNode {
18841
19246
  async exec(ctx) {
18842
19247
  const { dstDEUILogicParamId } = this.model;
18843
19248
  if (!dstDEUILogicParamId) {
18844
- throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
19249
+ throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
18845
19250
  }
18846
19251
  ctx.resetParam(dstDEUILogicParamId);
18847
19252
  }
18848
19253
  };
18849
19254
 
18850
19255
  // src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
18851
- import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
19256
+ import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
18852
19257
  import { clone as clone14 } from "ramda";
18853
19258
  var CopyParamNode2 = class extends UILogicNode {
18854
19259
  async exec(ctx) {
18855
19260
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
18856
19261
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
18857
- throw new RuntimeModelError36(
19262
+ throw new RuntimeModelError37(
18858
19263
  this.model,
18859
19264
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
18860
19265
  );
@@ -18865,7 +19270,7 @@ var CopyParamNode2 = class extends UILogicNode {
18865
19270
  };
18866
19271
 
18867
19272
  // src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
18868
- import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
19273
+ import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
18869
19274
  var AppendParamNode2 = class extends UILogicNode {
18870
19275
  async exec(ctx) {
18871
19276
  const {
@@ -18876,7 +19281,7 @@ var AppendParamNode2 = class extends UILogicNode {
18876
19281
  srcSize
18877
19282
  } = this.model;
18878
19283
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
18879
- throw new RuntimeModelError37(
19284
+ throw new RuntimeModelError38(
18880
19285
  this.model,
18881
19286
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
18882
19287
  );
@@ -18894,12 +19299,12 @@ var AppendParamNode2 = class extends UILogicNode {
18894
19299
  };
18895
19300
 
18896
19301
  // src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
18897
- import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
19302
+ import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
18898
19303
  var SortParamNode2 = class extends UILogicNode {
18899
19304
  async exec(ctx) {
18900
19305
  const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
18901
19306
  if (!dstDEUILogicParamId || !dstFieldName) {
18902
- throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
19307
+ throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
18903
19308
  }
18904
19309
  const key = dstFieldName;
18905
19310
  const arr = ctx.params[dstDEUILogicParamId];
@@ -18910,12 +19315,12 @@ var SortParamNode2 = class extends UILogicNode {
18910
19315
  };
18911
19316
 
18912
19317
  // src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
18913
- import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
19318
+ import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
18914
19319
  var RenewParamNode2 = class extends UILogicNode {
18915
19320
  async exec(ctx) {
18916
19321
  const { dstDEUILogicParamId } = this.model;
18917
19322
  if (!dstDEUILogicParamId) {
18918
- throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
19323
+ throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
18919
19324
  }
18920
19325
  ctx.renewParam(dstDEUILogicParamId);
18921
19326
  }
@@ -18946,43 +19351,43 @@ var DataSetNode2 = class extends UILogicNode {
18946
19351
  };
18947
19352
 
18948
19353
  // src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
18949
- import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
19354
+ import { RuntimeError as RuntimeError32 } from "@ibiz-template/core";
18950
19355
  var ThrowExceptionNode2 = class extends UILogicNode {
18951
19356
  async exec(_ctx) {
18952
19357
  const { errorInfo } = this.model;
18953
- throw new RuntimeError31(errorInfo);
19358
+ throw new RuntimeError32(errorInfo);
18954
19359
  }
18955
19360
  };
18956
19361
 
18957
19362
  // src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
18958
- import { RuntimeError as RuntimeError32, RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
19363
+ import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
18959
19364
  var ViewCtrlFireEventNode = class extends UILogicNode {
18960
19365
  async exec(ctx) {
18961
19366
  ctx.isEndNode = true;
18962
19367
  const { eventName, eventParamId, fireCtrlId } = this.model;
18963
19368
  if (!fireCtrlId) {
18964
- throw new RuntimeModelError40(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
19369
+ throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
18965
19370
  }
18966
19371
  if (!eventName) {
18967
- throw new RuntimeModelError40(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
19372
+ throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
18968
19373
  }
18969
19374
  if (!eventParamId) {
18970
- throw new RuntimeModelError40(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
19375
+ throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
18971
19376
  }
18972
19377
  const invokeCtrl = ctx.params[fireCtrlId];
18973
19378
  if (!invokeCtrl) {
18974
- throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
19379
+ throw new RuntimeError33("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
18975
19380
  }
18976
19381
  const eventParam = ctx.params[eventParamId];
18977
19382
  if (!eventParam) {
18978
- throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
19383
+ throw new RuntimeError33("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
18979
19384
  }
18980
19385
  await invokeCtrl.evt.emit(eventName, eventParam);
18981
19386
  }
18982
19387
  };
18983
19388
 
18984
19389
  // src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
18985
- import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
19390
+ import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
18986
19391
  var ExecuteDELogicNode = class extends UILogicNode {
18987
19392
  async exec(ctx) {
18988
19393
  const {
@@ -18992,17 +19397,17 @@ var ExecuteDELogicNode = class extends UILogicNode {
18992
19397
  retDEUILogicParamId
18993
19398
  } = this.model;
18994
19399
  if (!dstAppDataEntityId) {
18995
- throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
19400
+ throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
18996
19401
  }
18997
19402
  if (!dstAppDELogicId) {
18998
- throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
19403
+ throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
18999
19404
  }
19000
19405
  if (!dstDEUILogicParamId) {
19001
- throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
19406
+ throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
19002
19407
  }
19003
19408
  const dstParam = ctx.params[dstDEUILogicParamId];
19004
19409
  if (!dstParam) {
19005
- throw new RuntimeError33("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
19410
+ throw new RuntimeError34("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
19006
19411
  }
19007
19412
  const result = await execDELogicById(
19008
19413
  dstAppDELogicId,
@@ -19134,7 +19539,7 @@ var UILogic = class {
19134
19539
  this.params = /* @__PURE__ */ new Map();
19135
19540
  var _a;
19136
19541
  if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
19137
- throw new RuntimeModelError42(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
19542
+ throw new RuntimeModelError43(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
19138
19543
  }
19139
19544
  model.deuilogicNodes.forEach((node) => {
19140
19545
  const { logicNodeType } = node;
@@ -19249,7 +19654,7 @@ var UILogic = class {
19249
19654
  const start = this.nodes.get(startDEUILogicNodeId);
19250
19655
  await this.deepExec(start, ctx);
19251
19656
  } else {
19252
- throw new RuntimeModelError42(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
19657
+ throw new RuntimeModelError43(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
19253
19658
  }
19254
19659
  if (ctx.isEndNode) {
19255
19660
  return ctx.result;
@@ -19295,7 +19700,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
19295
19700
  const app = ibiz.hub.getApp(parameters.context.srfappid);
19296
19701
  const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
19297
19702
  if (!deUILogic) {
19298
- throw new RuntimeError34(
19703
+ throw new RuntimeError35(
19299
19704
  "\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
19300
19705
  );
19301
19706
  }
@@ -19308,7 +19713,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
19308
19713
  }
19309
19714
 
19310
19715
  // src/ui-action/uiaction-util.ts
19311
- import { RuntimeError as RuntimeError35 } from "@ibiz-template/core";
19716
+ import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
19312
19717
  var UIActionUtil = class {
19313
19718
  /**
19314
19719
  * 执行界面行为
@@ -19323,7 +19728,7 @@ var UIActionUtil = class {
19323
19728
  static async exec(actionId, params) {
19324
19729
  const action = await getUIActionById(actionId);
19325
19730
  if (!action) {
19326
- throw new RuntimeError35("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
19731
+ throw new RuntimeError36("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
19327
19732
  }
19328
19733
  const provider = await getUIActionProvider(action);
19329
19734
  return provider.exec(action, params);
@@ -19379,12 +19784,12 @@ var UIActionProviderBase = class {
19379
19784
  const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
19380
19785
  if (uilogicAttachMode === "REPLACE") {
19381
19786
  if (!appDEUILogicId) {
19382
- throw new RuntimeModelError43(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
19787
+ throw new RuntimeModelError44(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
19383
19788
  }
19384
19789
  await execUILogic(appDEUILogicId, appDataEntityId, args);
19385
19790
  return result;
19386
19791
  }
19387
- if (!await this.isConfirm(action)) {
19792
+ if (!await this.isConfirm(action, args)) {
19388
19793
  return this.returnError(result);
19389
19794
  }
19390
19795
  const _result = await this.execAction(action, args);
@@ -19406,7 +19811,7 @@ var UIActionProviderBase = class {
19406
19811
  }
19407
19812
  if (action.uilogicAttachMode === "AFTER") {
19408
19813
  if (!appDEUILogicId) {
19409
- throw new RuntimeModelError43(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
19814
+ throw new RuntimeModelError44(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
19410
19815
  }
19411
19816
  await execUILogic(appDEUILogicId, appDataEntityId, args);
19412
19817
  }
@@ -19435,9 +19840,10 @@ var UIActionProviderBase = class {
19435
19840
  * @param {IAppDEUIAction} action 界面行为模型
19436
19841
  * @returns {*} {Promise<boolean>}
19437
19842
  */
19438
- async isConfirm(action) {
19439
- if (action.enableConfirm && action.confirmMsg) {
19440
- return ibiz.modal.confirm({ title: action.confirmMsg });
19843
+ async isConfirm(action, args) {
19844
+ const confirmMsg = this.calcMessage("confirm", action, args);
19845
+ if (action.enableConfirm && confirmMsg) {
19846
+ return ibiz.modal.confirm({ title: confirmMsg });
19441
19847
  }
19442
19848
  return true;
19443
19849
  }
@@ -19530,6 +19936,54 @@ var UIActionProviderBase = class {
19530
19936
  );
19531
19937
  return { resultContext, resultData, resultParams };
19532
19938
  }
19939
+ /**
19940
+ * 计算消息信息(动态,多语言资源)
19941
+ * @author lxm
19942
+ * @date 2023-09-25 03:03:01
19943
+ * @protected
19944
+ * @param {('confirm' | 'success')} type
19945
+ * @param {IAppDEUIAction} action
19946
+ * @param {IUILogicParams} args
19947
+ * @return {*}
19948
+ */
19949
+ calcMessage(type, action, args) {
19950
+ let msg;
19951
+ let msgRes;
19952
+ const { confirmMsg, cmlanguageRes, successMsg, smlanguageRes } = action;
19953
+ switch (type) {
19954
+ case "confirm":
19955
+ msg = confirmMsg;
19956
+ msgRes = cmlanguageRes;
19957
+ break;
19958
+ case "success":
19959
+ msg = successMsg;
19960
+ msgRes = smlanguageRes;
19961
+ break;
19962
+ default:
19963
+ }
19964
+ if (msgRes) {
19965
+ const msgResContent = ibiz.i18n.t(
19966
+ msgRes.lanResTag,
19967
+ msgRes.defaultContent || msg
19968
+ );
19969
+ if (msgResContent !== msgRes.lanResTag) {
19970
+ msg = msgResContent;
19971
+ }
19972
+ }
19973
+ if (msg) {
19974
+ const { data } = args;
19975
+ const scriptParams = { ...args };
19976
+ if (data.length === 1) {
19977
+ [scriptParams.data] = data;
19978
+ } else if (data.length === 0) {
19979
+ delete scriptParams.data;
19980
+ }
19981
+ return ScriptFactory.execScriptFn(scriptParams, "`".concat(msg, "`"), {
19982
+ isAsync: false,
19983
+ singleRowReturn: true
19984
+ });
19985
+ }
19986
+ }
19533
19987
  };
19534
19988
 
19535
19989
  // src/ui-action/provider/backend-ui-action-provider.ts
@@ -19540,7 +19994,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
19540
19994
  const entityName = action.appDataEntityId;
19541
19995
  const methodName = action.appDEMethodId;
19542
19996
  if (!entityName || !methodName) {
19543
- throw new RuntimeModelError44(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
19997
+ throw new RuntimeModelError45(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
19544
19998
  }
19545
19999
  const { resultContext, resultParams, resultData } = await this.handleParams(
19546
20000
  action,
@@ -19586,8 +20040,11 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
19586
20040
  isMultiData ? _data : _data[0],
19587
20041
  tempParams
19588
20042
  );
19589
- if (res.ok && action.successMsg) {
19590
- ibiz.message.success(action.successMsg);
20043
+ if (res.ok) {
20044
+ const successMsg = this.calcMessage("success", action, args);
20045
+ if (successMsg) {
20046
+ ibiz.message.success(successMsg);
20047
+ }
19591
20048
  }
19592
20049
  Object.assign(actionResult, {
19593
20050
  data: isArray4(res.data) ? res.data : [res.data],
@@ -19652,7 +20109,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
19652
20109
  };
19653
20110
 
19654
20111
  // src/ui-action/provider/front-ui-action-provider.ts
19655
- import { StringUtil, RuntimeModelError as RuntimeModelError45, ModelError as ModelError25 } from "@ibiz-template/core";
20112
+ import { StringUtil, RuntimeModelError as RuntimeModelError46, ModelError as ModelError25 } from "@ibiz-template/core";
19656
20113
  var FrontUIActionProvider = class extends UIActionProviderBase {
19657
20114
  async execAction(action, args) {
19658
20115
  const { context, params, data, event, noWaitRoute } = args;
@@ -19667,7 +20124,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
19667
20124
  case "WIZARD": {
19668
20125
  const frontPSAppView = action.frontAppViewId;
19669
20126
  if (!frontPSAppView) {
19670
- throw new RuntimeModelError45(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
20127
+ throw new RuntimeModelError46(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
19671
20128
  }
19672
20129
  const { resultContext, resultParams } = await this.handleParams(
19673
20130
  action,
@@ -19723,7 +20180,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
19723
20180
  );
19724
20181
  return result || {};
19725
20182
  }
19726
- throw new RuntimeModelError45(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
20183
+ throw new RuntimeModelError46(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
19727
20184
  }
19728
20185
  };
19729
20186
 
@@ -19788,15 +20245,29 @@ var ToolbarController = class extends ControlController {
19788
20245
  async doUIAction(item, event, param = {}) {
19789
20246
  if (item.itemType === "DEUIACTION") {
19790
20247
  const actionId = item.uiactionId;
19791
- const res = await this.ctx.view.call("GetData" /* GET_DATA */);
19792
- const data = res || [];
19793
- const args = this.getEventArgs();
19794
- args.params = Object.assign(param, args.params);
19795
- await UIActionUtil.execAndResolved(actionId, {
19796
- ...args,
19797
- data,
19798
- event
19799
- });
20248
+ const uiAction = await getUIActionById(actionId);
20249
+ if (!uiAction) {
20250
+ throw new RuntimeError37("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
20251
+ }
20252
+ const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
20253
+ if (enableLoading) {
20254
+ this.state.buttonsState.setLoading(item.id);
20255
+ }
20256
+ try {
20257
+ const res = await this.ctx.view.call("GetData" /* GET_DATA */);
20258
+ const data = res || [];
20259
+ const args = this.getEventArgs();
20260
+ args.params = Object.assign(param, args.params);
20261
+ await UIActionUtil.execAndResolved(actionId, {
20262
+ ...args,
20263
+ data,
20264
+ event
20265
+ });
20266
+ } finally {
20267
+ if (enableLoading) {
20268
+ this.state.buttonsState.setLoading("");
20269
+ }
20270
+ }
19800
20271
  }
19801
20272
  }
19802
20273
  async onCreated() {
@@ -19831,19 +20302,14 @@ var ToolbarController = class extends ControlController {
19831
20302
  * @memberof ToolbarController
19832
20303
  */
19833
20304
  async onItemClick(item, event, params) {
19834
- this.state.buttonsState.setLoading(item.id);
19835
20305
  const isExtra = item.buttonType === "extra";
19836
- try {
19837
- await this._evt.emit("onClick", {
19838
- event,
19839
- eventArg: item.id,
19840
- buttonType: isExtra ? "extra" : "deuiaction"
19841
- });
19842
- if (!isExtra) {
19843
- await this.doUIAction(item, event, params);
19844
- }
19845
- } finally {
19846
- this.state.buttonsState.setLoading("");
20306
+ await this._evt.emit("onClick", {
20307
+ event,
20308
+ eventArg: item.id,
20309
+ buttonType: isExtra ? "extra" : "deuiaction"
20310
+ });
20311
+ if (!isExtra) {
20312
+ await this.doUIAction(item, event, params);
19847
20313
  }
19848
20314
  }
19849
20315
  async calcButtonState(data, appDeId) {
@@ -20003,6 +20469,89 @@ var DashboardController = class extends ControlController {
20003
20469
  }
20004
20470
  };
20005
20471
 
20472
+ // src/controller/control/dashboard/custom-dashboard.controller.ts
20473
+ var CustomDashboardController = class {
20474
+ /**
20475
+ * Creates an instance of BaseController.
20476
+ * @author lxm
20477
+ * @date 2023-04-26 06:46:21
20478
+ * @param {CTX} ctx 跨组件上下文环境,内部机制不暴露
20479
+ */
20480
+ constructor(model) {
20481
+ /**
20482
+ * 自定义布局模型数据
20483
+ *
20484
+ * @author: zhujiamin
20485
+ * @Date: 2023-09-20 16:42:36
20486
+ */
20487
+ this.customModelData = [];
20488
+ /**
20489
+ * 动态设计水平列数
20490
+ *
20491
+ * @author: zhujiamin
20492
+ * @Date: 2023-09-20 16:43:39
20493
+ */
20494
+ this.layoutColNum = 12;
20495
+ /**
20496
+ * 动态设计单元格高度,80px
20497
+ *
20498
+ * @author: zhujiamin
20499
+ * @Date: 2023-09-20 16:43:39
20500
+ */
20501
+ this.layoutRowH = 80;
20502
+ /**
20503
+ * 看板模型
20504
+ *
20505
+ * @author: zhujiamin
20506
+ * @Date: 2023-09-20 16:43:39
20507
+ */
20508
+ this.model = null;
20509
+ var _a, _b;
20510
+ this.model = model;
20511
+ this.config = new ConfigService(
20512
+ model.appId,
20513
+ "dynadashboard",
20514
+ "dashboard_".concat(((_a = this.model.appDataEntityId) == null ? void 0 : _a.toLowerCase()) || "app", "_").concat((_b = this.model.codeName) == null ? void 0 : _b.toLowerCase())
20515
+ );
20516
+ }
20517
+ /**
20518
+ * 加载自定义布局模型数据
20519
+ *
20520
+ * @author: zhujiamin
20521
+ * @Date: 2023-09-20 16:22:49
20522
+ */
20523
+ async loadCustomModelData() {
20524
+ const res = await this.config.load();
20525
+ if (res.model) {
20526
+ this.customModelData = res.model;
20527
+ }
20528
+ if (res.colNum) {
20529
+ this.layoutColNum = res.colNum;
20530
+ }
20531
+ if (res.rowH) {
20532
+ this.layoutRowH = res.rowH;
20533
+ }
20534
+ return this.customModelData;
20535
+ }
20536
+ /**
20537
+ * 保存自定义布局模型数据
20538
+ *
20539
+ * @author: zhujiamin
20540
+ * @Date: 2023-09-20 16:22:49
20541
+ */
20542
+ async saveCustomModelData(model) {
20543
+ const res = await this.config.save({
20544
+ model,
20545
+ colNum: this.layoutColNum,
20546
+ rowH: this.layoutRowH
20547
+ });
20548
+ if (res) {
20549
+ this.customModelData = model;
20550
+ }
20551
+ return model;
20552
+ }
20553
+ };
20554
+
20006
20555
  // src/controller/control/dashboard/portlet/portlet-part/portlet-part.state.ts
20007
20556
  var PortletPartState = class {
20008
20557
  constructor() {
@@ -20109,6 +20658,25 @@ var PortletPartController = class {
20109
20658
  createState() {
20110
20659
  return new PortletPartState();
20111
20660
  }
20661
+ /**
20662
+ * 数据改变方法
20663
+ * @param {DataChangeEvent} event
20664
+ * @return {*}
20665
+ * @author: zhujiamin
20666
+ * @Date: 2023-09-22 17:39:44
20667
+ */
20668
+ onDataChange(event) {
20669
+ let data = event.data[0];
20670
+ if (data && data instanceof ControlVO) {
20671
+ data = data.getOrigin();
20672
+ }
20673
+ if (data) {
20674
+ this.state.actionGroupState.update(
20675
+ data,
20676
+ this.dashboard.view.model.appDataEntityId
20677
+ );
20678
+ }
20679
+ }
20112
20680
  /**
20113
20681
  * 初始化标题右侧界面行为按钮的状态
20114
20682
  *
@@ -20138,15 +20706,7 @@ var PortletPartController = class {
20138
20706
  this.state.actionGroupState = containerState;
20139
20707
  const { appDataEntityId } = this.dashboard.view.model;
20140
20708
  if (appDataEntityId) {
20141
- this.dashboard.view.evt.on("onDataChange", (event) => {
20142
- let data = event.data[0];
20143
- if (data && data instanceof ControlVO) {
20144
- data = data.getOrigin();
20145
- }
20146
- if (data) {
20147
- this.state.actionGroupState.update(data, appDataEntityId);
20148
- }
20149
- });
20709
+ this.dashboard.view.evt.on("onDataChange", this.onDataChange);
20150
20710
  }
20151
20711
  }
20152
20712
  /**
@@ -20195,6 +20755,15 @@ var PortletPartController = class {
20195
20755
  }
20196
20756
  }
20197
20757
  }
20758
+ /**
20759
+ * 销毁
20760
+ * @author lxm
20761
+ * @date 2023-04-25 11:08:54
20762
+ */
20763
+ async destroyed() {
20764
+ ibiz.log.debug("".concat(this.model.codeName, " onDestroyed"));
20765
+ this.dashboard.view.evt.off("onDataChange", this.onDataChange);
20766
+ }
20198
20767
  };
20199
20768
 
20200
20769
  // src/controller/control/dashboard/portlet/container-portlet/container-portlet.controller.ts
@@ -20206,8 +20775,8 @@ var ViewPortletController = class extends PortletPartController {
20206
20775
  };
20207
20776
 
20208
20777
  // src/controller/control/data-view/data-view.controller.ts
20209
- import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
20210
- import { isNil as isNil16 } from "ramda";
20778
+ import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
20779
+ import { isNil as isNil18 } from "ramda";
20211
20780
 
20212
20781
  // src/controller/control/data-view/data-view.service.ts
20213
20782
  var DataViewControlService = class extends MDControlService {
@@ -20381,6 +20950,7 @@ var DataViewControlController = class extends MDControlController {
20381
20950
  }
20382
20951
  }
20383
20952
  async afterLoad(args, items) {
20953
+ await this.initGroupCodeListItems();
20384
20954
  await this.handleDataGroup();
20385
20955
  await this.initGroupActionStates();
20386
20956
  return items;
@@ -20416,7 +20986,7 @@ var DataViewControlController = class extends MDControlController {
20416
20986
  const optItemModel = this.getOptItemModel();
20417
20987
  if (optItemModel) {
20418
20988
  if (!optItemModel.deuiactionGroup) {
20419
- throw new RuntimeModelError46(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
20989
+ throw new RuntimeModelError47(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
20420
20990
  }
20421
20991
  if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
20422
20992
  ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -20465,7 +21035,7 @@ var DataViewControlController = class extends MDControlController {
20465
21035
  const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
20466
21036
  if (enableGroup && groupMode) {
20467
21037
  if (!groupAppDEFieldId) {
20468
- throw new RuntimeModelError46(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
21038
+ throw new RuntimeModelError47(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
20469
21039
  }
20470
21040
  if (groupMode === "AUTO") {
20471
21041
  this.handleAutoGroup();
@@ -20486,7 +21056,7 @@ var DataViewControlController = class extends MDControlController {
20486
21056
  const groupMap = /* @__PURE__ */ new Map();
20487
21057
  items.forEach((item) => {
20488
21058
  const groupVal = item[groupAppDEFieldId];
20489
- if (isNil16(groupVal)) {
21059
+ if (isNil18(groupVal)) {
20490
21060
  return;
20491
21061
  }
20492
21062
  if (!groupMap.has(groupVal)) {
@@ -20515,7 +21085,7 @@ var DataViewControlController = class extends MDControlController {
20515
21085
  async initGroupCodeListItems() {
20516
21086
  const { groupCodeListId } = this.model;
20517
21087
  if (!groupCodeListId) {
20518
- throw new RuntimeModelError46(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
21088
+ return;
20519
21089
  }
20520
21090
  const app = ibiz.hub.getApp(this.context.srfappid);
20521
21091
  this.groupCodeListItems = await app.codeList.get(
@@ -20530,9 +21100,9 @@ var DataViewControlController = class extends MDControlController {
20530
21100
  * @memberof DataViewControlController
20531
21101
  */
20532
21102
  async handleCodeListGroup() {
20533
- const { groupAppDEFieldId } = this.model;
20534
- if (!this.groupCodeListItems) {
20535
- await this.initGroupCodeListItems();
21103
+ const { groupAppDEFieldId, groupCodeListId } = this.model;
21104
+ if (!groupCodeListId) {
21105
+ throw new RuntimeModelError47(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
20536
21106
  }
20537
21107
  const { items } = this.state;
20538
21108
  const groupMap = /* @__PURE__ */ new Map();
@@ -20619,10 +21189,10 @@ var DataViewControlController = class extends MDControlController {
20619
21189
  };
20620
21190
 
20621
21191
  // src/controller/control/exp-bar/calendar-exp-bar.controller.ts
20622
- import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
21192
+ import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
20623
21193
 
20624
21194
  // src/controller/control/exp-bar/exp-bar.controller.ts
20625
- import { RuntimeError as RuntimeError36, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
21195
+ import { RuntimeError as RuntimeError38, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
20626
21196
  var ExpBarControlController = class extends ControlController {
20627
21197
  constructor() {
20628
21198
  super(...arguments);
@@ -20677,7 +21247,7 @@ var ExpBarControlController = class extends ControlController {
20677
21247
  get xDataController() {
20678
21248
  const controller = this.view.getController(this.model.xdataControlName);
20679
21249
  if (!controller) {
20680
- throw new RuntimeModelError47(
21250
+ throw new RuntimeModelError48(
20681
21251
  this.model,
20682
21252
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
20683
21253
  );
@@ -20910,7 +21480,7 @@ var ExpBarControlController = class extends ControlController {
20910
21480
  if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
20911
21481
  return this.XDataModel.navAppViewId;
20912
21482
  }
20913
- throw new RuntimeError36("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
21483
+ throw new RuntimeError38("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
20914
21484
  }
20915
21485
  /**
20916
21486
  * 获取导航视图
@@ -20997,7 +21567,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
20997
21567
  get xDataController() {
20998
21568
  const controller = this.view.getController(this.model.xdataControlName);
20999
21569
  if (!controller) {
21000
- throw new RuntimeModelError48(
21570
+ throw new RuntimeModelError49(
21001
21571
  this.model,
21002
21572
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
21003
21573
  );
@@ -21052,7 +21622,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
21052
21622
  };
21053
21623
 
21054
21624
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
21055
- import { RuntimeError as RuntimeError37, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
21625
+ import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
21056
21626
  var TreeExpBarController = class extends ExpBarControlController {
21057
21627
  constructor() {
21058
21628
  super(...arguments);
@@ -21075,7 +21645,7 @@ var TreeExpBarController = class extends ExpBarControlController {
21075
21645
  get xDataController() {
21076
21646
  const controller = this.view.getController(this.model.xdataControlName);
21077
21647
  if (!controller) {
21078
- throw new RuntimeModelError49(
21648
+ throw new RuntimeModelError50(
21079
21649
  this.model,
21080
21650
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
21081
21651
  );
@@ -21127,7 +21697,7 @@ var TreeExpBarController = class extends ExpBarControlController {
21127
21697
  const deData = node.deData || node;
21128
21698
  const nodeModel = this.getNodeModel(node.nodeId);
21129
21699
  if (!nodeModel) {
21130
- throw new RuntimeError37("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
21700
+ throw new RuntimeError39("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
21131
21701
  }
21132
21702
  const result = this.prepareParams(nodeModel, deData, context, params);
21133
21703
  result.context.currentSrfNav = nodeId;
@@ -22536,7 +23106,7 @@ var FormMDCtrlContentTypeController = class {
22536
23106
  };
22537
23107
 
22538
23108
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
22539
- import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
23109
+ import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
22540
23110
  var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
22541
23111
  /**
22542
23112
  * 初始化
@@ -22551,7 +23121,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
22551
23121
  const { model } = this.parent;
22552
23122
  const { contentControl } = model;
22553
23123
  if (!contentControl) {
22554
- throw new RuntimeError38("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
23124
+ throw new RuntimeError40("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
22555
23125
  }
22556
23126
  this.controlModel = contentControl;
22557
23127
  const controlProvider = await getControlProvider(this.controlModel);
@@ -22661,7 +23231,7 @@ import { isArray as isArray5 } from "lodash-es";
22661
23231
  import {
22662
23232
  awaitTimeout,
22663
23233
  mergeInLeft,
22664
- RuntimeError as RuntimeError39,
23234
+ RuntimeError as RuntimeError41,
22665
23235
  mergeDefaultInLeft as mergeDefaultInLeft2
22666
23236
  } from "@ibiz-template/core";
22667
23237
  import { debounce } from "lodash-es";
@@ -22669,7 +23239,7 @@ import { debounce } from "lodash-es";
22669
23239
  // src/controller/control/form/edit-form/edit-form.service.ts
22670
23240
  import {
22671
23241
  recursiveIterate as recursiveIterate3,
22672
- RuntimeModelError as RuntimeModelError50
23242
+ RuntimeModelError as RuntimeModelError51
22673
23243
  } from "@ibiz-template/core";
22674
23244
  var EditFormService = class extends ControlService {
22675
23245
  /**
@@ -22787,7 +23357,7 @@ var EditFormService = class extends ControlService {
22787
23357
  const wizardForm = this.model;
22788
23358
  const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
22789
23359
  if (!methodName) {
22790
- throw new RuntimeModelError50(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
23360
+ throw new RuntimeModelError51(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
22791
23361
  }
22792
23362
  let res = await this.exec(
22793
23363
  methodName,
@@ -23050,7 +23620,7 @@ var EditFormController = class extends FormController {
23050
23620
  }
23051
23621
  const isValid = await this.validate();
23052
23622
  if (!isValid) {
23053
- throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
23623
+ throw new RuntimeError41("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
23054
23624
  }
23055
23625
  await this.startLoading();
23056
23626
  await this.evt.emit("onBeforeSave", void 0);
@@ -23159,7 +23729,7 @@ var EditFormController = class extends FormController {
23159
23729
  (item) => item.id === formItemUpdateId
23160
23730
  );
23161
23731
  if (!formItemUpdate) {
23162
- throw new RuntimeError39("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
23732
+ throw new RuntimeError41("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
23163
23733
  }
23164
23734
  const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
23165
23735
  const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
@@ -23203,7 +23773,7 @@ var EditFormController = class extends FormController {
23203
23773
  async wfStart(extraParams = {}) {
23204
23774
  const isValid = await this.validate();
23205
23775
  if (!isValid) {
23206
- throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
23776
+ throw new RuntimeError41("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
23207
23777
  }
23208
23778
  await this.startLoading();
23209
23779
  try {
@@ -23236,7 +23806,7 @@ var EditFormController = class extends FormController {
23236
23806
  async wfSubmit(extraParams = {}) {
23237
23807
  const isValid = await this.validate();
23238
23808
  if (!isValid) {
23239
- throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
23809
+ throw new RuntimeError41("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
23240
23810
  }
23241
23811
  await this.startLoading();
23242
23812
  try {
@@ -23467,7 +24037,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
23467
24037
  };
23468
24038
 
23469
24039
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
23470
- import { RuntimeError as RuntimeError40, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
24040
+ import { RuntimeError as RuntimeError42, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
23471
24041
  var FormMDCtrlGridController = class extends FormMDCtrlControlController {
23472
24042
  constructor() {
23473
24043
  super(...arguments);
@@ -23572,7 +24142,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
23572
24142
  const { model } = this.parent;
23573
24143
  const { contentControl } = model;
23574
24144
  if (!contentControl) {
23575
- throw new RuntimeError40("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
24145
+ throw new RuntimeError42("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
23576
24146
  }
23577
24147
  mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
23578
24148
  this.controlModel = contentControl;
@@ -24284,8 +24854,8 @@ import {
24284
24854
  debounceAndAsyncMerge as debounceAndAsyncMerge2,
24285
24855
  mergeDefaultInLeft as mergeDefaultInLeft3,
24286
24856
  recursiveIterate as recursiveIterate4,
24287
- RuntimeError as RuntimeError41,
24288
- RuntimeModelError as RuntimeModelError51
24857
+ RuntimeError as RuntimeError43,
24858
+ RuntimeModelError as RuntimeModelError52
24289
24859
  } from "@ibiz-template/core";
24290
24860
  import { clone as clone15 } from "ramda";
24291
24861
 
@@ -24481,11 +25051,11 @@ var GridController = class extends MDControlController {
24481
25051
  (item) => item.model.appDEFieldId === groupAppDEFieldId
24482
25052
  );
24483
25053
  if (!this.groupFieldColumn) {
24484
- throw new RuntimeModelError51(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
25054
+ throw new RuntimeModelError52(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
24485
25055
  }
24486
25056
  const groupFieldName = this.groupFieldColumn.model.id;
24487
25057
  if (!this.groupFieldColumn.model.appCodeListId) {
24488
- throw new RuntimeModelError51(
25058
+ throw new RuntimeModelError52(
24489
25059
  this.groupFieldColumn.model,
24490
25060
  "\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
24491
25061
  );
@@ -24495,7 +25065,7 @@ var GridController = class extends MDControlController {
24495
25065
  );
24496
25066
  if (index !== -1 && index !== 0) {
24497
25067
  if (this.isMultistageHeader) {
24498
- throw new RuntimeModelError51(
25068
+ throw new RuntimeModelError52(
24499
25069
  this.model,
24500
25070
  "\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
24501
25071
  );
@@ -24505,10 +25075,10 @@ var GridController = class extends MDControlController {
24505
25075
  }
24506
25076
  if (groupMode === "CODELIST") {
24507
25077
  if (!groupCodeListId) {
24508
- throw new RuntimeModelError51(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
25078
+ throw new RuntimeModelError52(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
24509
25079
  }
24510
25080
  if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
24511
- throw new RuntimeModelError51(
25081
+ throw new RuntimeModelError52(
24512
25082
  this.model,
24513
25083
  "\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
24514
25084
  );
@@ -24589,7 +25159,7 @@ var GridController = class extends MDControlController {
24589
25159
  return;
24590
25160
  }
24591
25161
  if (!aggAppDEDataSetId || !aggAppDataEntityId) {
24592
- throw new RuntimeModelError51(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
25162
+ throw new RuntimeModelError52(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
24593
25163
  }
24594
25164
  const params = await this.getFetchParams();
24595
25165
  const app = ibiz.hub.getApp(this.context.srfappid);
@@ -24657,7 +25227,7 @@ var GridController = class extends MDControlController {
24657
25227
  }
24658
25228
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
24659
25229
  if (editingRow) {
24660
- throw new RuntimeError41("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
25230
+ throw new RuntimeError43("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
24661
25231
  }
24662
25232
  const queryParams = { ...this.params };
24663
25233
  const defaultData = this.calcDefaultValue({}, true);
@@ -24696,7 +25266,7 @@ var GridController = class extends MDControlController {
24696
25266
  (item) => item.data.srfkey === data.srfkey
24697
25267
  );
24698
25268
  if (!rowState) {
24699
- throw new RuntimeError41("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
25269
+ throw new RuntimeError43("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
24700
25270
  }
24701
25271
  if (!rowState.modified) {
24702
25272
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -24708,7 +25278,7 @@ var GridController = class extends MDControlController {
24708
25278
  }
24709
25279
  const isValid = await this.validate(rowState);
24710
25280
  if (!isValid) {
24711
- throw new RuntimeError41("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
25281
+ throw new RuntimeError43("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
24712
25282
  }
24713
25283
  await this.startLoading();
24714
25284
  let res;
@@ -24920,7 +25490,7 @@ var GridController = class extends MDControlController {
24920
25490
  }
24921
25491
  async toggleRowEdit() {
24922
25492
  if (!this.model.enableRowNew) {
24923
- throw new RuntimeError41("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
25493
+ throw new RuntimeError43("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
24924
25494
  }
24925
25495
  this.state.rowEditOpen = !this.state.rowEditOpen;
24926
25496
  }
@@ -24953,7 +25523,7 @@ var GridController = class extends MDControlController {
24953
25523
  } else {
24954
25524
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
24955
25525
  if (editingRow) {
24956
- throw new RuntimeError41("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
25526
+ throw new RuntimeError43("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
24957
25527
  }
24958
25528
  if (row.data.srfuf === 1 /* UPDATE */) {
24959
25529
  row.cacheData = clone15(row.data);
@@ -25003,7 +25573,7 @@ var GridController = class extends MDControlController {
25003
25573
  (item) => item.id === updateId
25004
25574
  );
25005
25575
  if (!findUpdate) {
25006
- throw new RuntimeError41("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
25576
+ throw new RuntimeError43("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
25007
25577
  }
25008
25578
  const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
25009
25579
  const updateItems = degeiupdateDetails.map((item) => item.id);
@@ -25112,7 +25682,7 @@ var GridController = class extends MDControlController {
25112
25682
  data2 = this.getData();
25113
25683
  }
25114
25684
  if (data2.length === 0) {
25115
- throw new RuntimeError41("\u65E0\u5BFC\u51FA\u6570\u636E");
25685
+ throw new RuntimeError43("\u65E0\u5BFC\u51FA\u6570\u636E");
25116
25686
  }
25117
25687
  return formatExcelData(data2);
25118
25688
  };
@@ -25131,11 +25701,11 @@ var GridController = class extends MDControlController {
25131
25701
  );
25132
25702
  const data = formatArrayData(filterVal, await getExportData());
25133
25703
  if (!ibiz.util.getExportExcel) {
25134
- throw new RuntimeError41("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
25704
+ throw new RuntimeError43("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
25135
25705
  }
25136
25706
  const exportExcel = await ibiz.util.getExportExcel();
25137
25707
  if (!exportExcel) {
25138
- throw new RuntimeError41("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
25708
+ throw new RuntimeError43("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
25139
25709
  }
25140
25710
  exportExcel.exportJsonToExcel({
25141
25711
  header,
@@ -25181,7 +25751,7 @@ var GridController = class extends MDControlController {
25181
25751
  };
25182
25752
 
25183
25753
  // src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
25184
- import { DataTypes as DataTypes2, ModelError as ModelError26 } from "@ibiz-template/core";
25754
+ import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
25185
25755
  import dayjs4 from "dayjs";
25186
25756
  import { clone as clone16 } from "ramda";
25187
25757
  var GridFieldColumnController = class extends GridColumnController {
@@ -25407,7 +25977,7 @@ var GridFieldColumnController = class extends GridColumnController {
25407
25977
  if (!this.valueFormat) {
25408
25978
  return strVal;
25409
25979
  }
25410
- const isDate = DataTypes2.isDate(this.dataType);
25980
+ const isDate = DataTypes3.isDate(this.dataType);
25411
25981
  if (isDate) {
25412
25982
  return dayjs4(strVal).format(this.valueFormat);
25413
25983
  }
@@ -25416,7 +25986,7 @@ var GridFieldColumnController = class extends GridColumnController {
25416
25986
  };
25417
25987
 
25418
25988
  // src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
25419
- import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
25989
+ import { RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
25420
25990
  var GridUAColumnController = class extends GridColumnController {
25421
25991
  /**
25422
25992
  * 给rowController初始化操作列的状态
@@ -25429,7 +25999,7 @@ var GridUAColumnController = class extends GridColumnController {
25429
25999
  var _a;
25430
26000
  const { deuiactionGroup } = this.model;
25431
26001
  if (!deuiactionGroup) {
25432
- throw new RuntimeModelError52(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
26002
+ throw new RuntimeModelError53(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
25433
26003
  }
25434
26004
  if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
25435
26005
  ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -25470,7 +26040,7 @@ var GridUAColumnController = class extends GridColumnController {
25470
26040
  };
25471
26041
 
25472
26042
  // src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
25473
- import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
26043
+ import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
25474
26044
  import Schema2 from "async-validator";
25475
26045
  import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
25476
26046
  var GridFieldEditColumnController = class extends GridFieldColumnController {
@@ -25604,7 +26174,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
25604
26174
  if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
25605
26175
  const result = await this.validate(row);
25606
26176
  if (!result) {
25607
- throw new RuntimeError42(
26177
+ throw new RuntimeError44(
25608
26178
  "".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
25609
26179
  );
25610
26180
  }
@@ -25962,7 +26532,7 @@ var ListController = class extends MDControlController {
25962
26532
  };
25963
26533
 
25964
26534
  // src/controller/control/panel/panel/panel.controller.ts
25965
- import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
26535
+ import { recursiveIterate as recursiveIterate5, RuntimeError as RuntimeError45 } from "@ibiz-template/core";
25966
26536
  var PanelController = class extends ControlController {
25967
26537
  constructor() {
25968
26538
  super(...arguments);
@@ -26060,7 +26630,7 @@ var PanelController = class extends ControlController {
26060
26630
  async load() {
26061
26631
  const data = await this.prepareData();
26062
26632
  if (!data) {
26063
- throw new RuntimeError43("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
26633
+ throw new RuntimeError45("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
26064
26634
  }
26065
26635
  const panelData = this.convertData(data);
26066
26636
  this.state.data = panelData;
@@ -26135,6 +26705,19 @@ var PanelController = class extends ControlController {
26135
26705
  this.state.data[name] = value;
26136
26706
  this.dataChangeNotify([name]);
26137
26707
  }
26708
+ initControlScheduler(logics = []) {
26709
+ const actualLogics = [...logics];
26710
+ recursiveIterate5(
26711
+ this.model,
26712
+ (item) => {
26713
+ if (item.controlLogics) {
26714
+ actualLogics.push(...item.controlLogics);
26715
+ }
26716
+ },
26717
+ { childrenFields: ["rootPanelItems", "panelItems", "panelTabPages"] }
26718
+ );
26719
+ super.initControlScheduler(actualLogics);
26720
+ }
26138
26721
  };
26139
26722
 
26140
26723
  // src/controller/control/panel/view-layout-panel/view-layout-panel.controller.ts
@@ -26256,6 +26839,17 @@ var PanelItemController = class {
26256
26839
  this.model = model;
26257
26840
  this.panel = panel;
26258
26841
  this.parent = parent;
26842
+ /**
26843
+ * 动态逻辑结果
26844
+ * @author lxm
26845
+ * @date 2023-09-21 03:36:37
26846
+ * @protected
26847
+ */
26848
+ this.dynaLogicResult = {
26849
+ visible: true,
26850
+ disabled: false,
26851
+ required: false
26852
+ };
26259
26853
  this.state = this.createState();
26260
26854
  }
26261
26855
  /**
@@ -26341,8 +26935,11 @@ var PanelItemController = class {
26341
26935
  * @date 2022-09-20 18:09:56
26342
26936
  * @param {string[]} names
26343
26937
  */
26344
- dataChangeNotify(names) {
26938
+ async dataChangeNotify(names) {
26345
26939
  this.calcDynamicLogic(names);
26940
+ this.calcItemDisabled(this.data);
26941
+ this.calcItemVisible(this.data);
26942
+ this.calcItemRequired(this.data);
26346
26943
  this.calcDynaClass(this.data);
26347
26944
  }
26348
26945
  /**
@@ -26351,10 +26948,76 @@ var PanelItemController = class {
26351
26948
  * @author lxm
26352
26949
  * @date 2022-09-20 18:09:07
26353
26950
  */
26354
- panelStateNotify(_state) {
26951
+ async panelStateNotify(_state) {
26355
26952
  this.calcDynamicLogic([], true);
26953
+ this.calcItemDisabled(this.data);
26954
+ this.calcItemVisible(this.data);
26955
+ this.calcItemRequired(this.data);
26356
26956
  this.calcDynaClass(this.data);
26357
26957
  }
26958
+ /**
26959
+ * 计算项的禁用状态
26960
+ * @author lxm
26961
+ * @date 2023-06-26 06:19:00
26962
+ * @param {IData} data
26963
+ */
26964
+ calcItemDisabled(data) {
26965
+ let enable = !this.dynaLogicResult.disabled;
26966
+ if (enable && this.panel.scheduler) {
26967
+ const itemEnable = this.panel.scheduler.triggerItemEnable(
26968
+ this.model.id,
26969
+ {
26970
+ data: [data]
26971
+ }
26972
+ );
26973
+ if (itemEnable !== void 0) {
26974
+ enable = itemEnable;
26975
+ }
26976
+ }
26977
+ this.state.disabled = !enable;
26978
+ }
26979
+ /**
26980
+ * 计算项的显示状态
26981
+ * @author lxm
26982
+ * @date 2023-06-26 06:19:00
26983
+ * @param {IData} data
26984
+ */
26985
+ calcItemVisible(data) {
26986
+ let { visible } = this.dynaLogicResult;
26987
+ if (visible && this.panel.scheduler) {
26988
+ const itemVIsible = this.panel.scheduler.triggerItemVisible(
26989
+ this.model.id,
26990
+ {
26991
+ data: [data]
26992
+ }
26993
+ );
26994
+ if (itemVIsible !== void 0) {
26995
+ visible = itemVIsible;
26996
+ }
26997
+ }
26998
+ this.state.visible = visible;
26999
+ }
27000
+ /**
27001
+ * 计算项的必填状态
27002
+ * @author lxm
27003
+ * @date 2023-06-26 06:19:00
27004
+ * @param {IData} data
27005
+ */
27006
+ calcItemRequired(data) {
27007
+ let allowEmpty = !this.dynaLogicResult.required;
27008
+ if (allowEmpty && this.panel.scheduler) {
27009
+ const itemAllowEmpty = this.panel.scheduler.triggerItemBlank(
27010
+ this.model.id,
27011
+ {
27012
+ data: [data]
27013
+ }
27014
+ );
27015
+ if (itemAllowEmpty !== void 0) {
27016
+ allowEmpty = itemAllowEmpty;
27017
+ }
27018
+ }
27019
+ this.state.required = !allowEmpty;
27020
+ }
26358
27021
  /**
26359
27022
  * 计算动态逻辑
26360
27023
  *
@@ -26378,13 +27041,13 @@ var PanelItemController = class {
26378
27041
  const ok = verifyPanelGroupLogic(this.data, logic);
26379
27042
  switch (logic.logicCat) {
26380
27043
  case "ITEMBLANK":
26381
- this.state.required = !ok;
27044
+ this.dynaLogicResult.required = !ok;
26382
27045
  break;
26383
27046
  case "ITEMENABLE":
26384
- this.state.disabled = !ok;
27047
+ this.dynaLogicResult.disabled = !ok;
26385
27048
  break;
26386
27049
  case "PANELVISIBLE":
26387
- this.state.visible = ok;
27050
+ this.dynaLogicResult.visible = ok;
26388
27051
  break;
26389
27052
  default:
26390
27053
  }
@@ -26793,7 +27456,7 @@ var TabExpPanelController = class extends ControlController {
26793
27456
  };
26794
27457
 
26795
27458
  // src/controller/control/tree/tree.controller.ts
26796
- import { recursiveIterate as recursiveIterate5 } from "@ibiz-template/core";
27459
+ import { recursiveIterate as recursiveIterate6 } from "@ibiz-template/core";
26797
27460
 
26798
27461
  // src/controller/control/tree/tree.service.ts
26799
27462
  import { ModelError as ModelError27 } from "@ibiz-template/core";
@@ -27156,7 +27819,7 @@ var TreeController = class extends MDControlController {
27156
27819
  this.state.rootNodes = nodes;
27157
27820
  }
27158
27821
  this.state.items = [];
27159
- recursiveIterate5(
27822
+ recursiveIterate6(
27160
27823
  { children: this.state.rootNodes },
27161
27824
  (node) => {
27162
27825
  this.state.items.push(node);
@@ -27279,7 +27942,7 @@ var TreeController = class extends MDControlController {
27279
27942
  */
27280
27943
  calcExpandedKeys(nodes) {
27281
27944
  let expandedKeys = [];
27282
- recursiveIterate5({ children: nodes }, (node) => {
27945
+ recursiveIterate6({ children: nodes }, (node) => {
27283
27946
  var _a;
27284
27947
  if ((_a = node.children) == null ? void 0 : _a.length) {
27285
27948
  expandedKeys.push(node.id);
@@ -27325,7 +27988,7 @@ var TreeController = class extends MDControlController {
27325
27988
  };
27326
27989
 
27327
27990
  // src/controller/control/wizard-panel/wizard-panel.controller.ts
27328
- import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
27991
+ import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
27329
27992
 
27330
27993
  // src/controller/control/wizard-panel/wizard-panel.service.ts
27331
27994
  var WizardPanelService = class extends ControlService {
@@ -27484,7 +28147,7 @@ var WizardPanelController = class extends ControlController {
27484
28147
  const { activeFormTag } = this.state;
27485
28148
  const controller = this.formControllers.get(activeFormTag);
27486
28149
  if (!controller) {
27487
- throw new RuntimeError44("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
28150
+ throw new RuntimeError46("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
27488
28151
  }
27489
28152
  return controller;
27490
28153
  }
@@ -27559,7 +28222,7 @@ var WizardPanelController = class extends ControlController {
27559
28222
  this.tagHistory.pop();
27560
28223
  const prevTag = this.tagHistory[this.tagHistory.length - 1];
27561
28224
  if (!prevTag) {
27562
- throw new RuntimeError44("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
28225
+ throw new RuntimeError46("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
27563
28226
  }
27564
28227
  this.state.activeFormTag = prevTag;
27565
28228
  }
@@ -27580,7 +28243,7 @@ var WizardPanelController = class extends ControlController {
27580
28243
  }
27581
28244
  );
27582
28245
  if (!wizardForm) {
27583
- throw new RuntimeError44("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
28246
+ throw new RuntimeError46("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
27584
28247
  }
27585
28248
  nextTag = data.srfnextform;
27586
28249
  } else {
@@ -27592,7 +28255,7 @@ var WizardPanelController = class extends ControlController {
27592
28255
  });
27593
28256
  const nextWizardStep = wizardSteps[index + 1];
27594
28257
  if (!nextWizardStep) {
27595
- throw new RuntimeError44("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
28258
+ throw new RuntimeError46("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
27596
28259
  }
27597
28260
  const nextWizardForm = this.model.dewizard.dewizardForms.find(
27598
28261
  (wizardForm) => {
@@ -27605,7 +28268,7 @@ var WizardPanelController = class extends ControlController {
27605
28268
  }
27606
28269
  }
27607
28270
  if (!nextTag) {
27608
- throw new RuntimeError44("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
28271
+ throw new RuntimeError46("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
27609
28272
  }
27610
28273
  this.state.activeFormTag = nextTag;
27611
28274
  this.tagHistory.push(nextTag);
@@ -27835,8 +28498,8 @@ var MDCtrlController = class extends MDControlController {
27835
28498
  };
27836
28499
 
27837
28500
  // src/controller/control/kanban/kanban.controller.ts
27838
- import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
27839
- import { isNil as isNil17 } from "ramda";
28501
+ import { RuntimeError as RuntimeError47, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
28502
+ import { isNil as isNil19 } from "ramda";
27840
28503
 
27841
28504
  // src/controller/control/kanban/kanban.service.ts
27842
28505
  var KanbanService = class extends DataViewControlService {
@@ -27910,20 +28573,20 @@ var KanbanController = class extends DataViewControlController {
27910
28573
  const sortField = this.model.minorSortAppDEFieldId;
27911
28574
  const { minorSortDir } = this.model;
27912
28575
  if (!sortField) {
27913
- throw new RuntimeModelError53(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
28576
+ throw new RuntimeModelError54(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
27914
28577
  }
27915
28578
  if (!minorSortDir) {
27916
- throw new RuntimeModelError53(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
28579
+ throw new RuntimeModelError54(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
27917
28580
  }
27918
28581
  const isAsc = minorSortDir === "ASC";
27919
28582
  items.forEach((item) => {
27920
28583
  const sortValue = item[sortField];
27921
- if (isNil17(sortValue)) {
28584
+ if (isNil19(sortValue)) {
27922
28585
  item[sortField] = 0;
27923
28586
  } else {
27924
28587
  const toNum = Number(sortValue);
27925
28588
  if (Number.isNaN(toNum)) {
27926
- throw new RuntimeError45(
28589
+ throw new RuntimeError47(
27927
28590
  "".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
27928
28591
  );
27929
28592
  }
@@ -27939,7 +28602,7 @@ var KanbanController = class extends DataViewControlController {
27939
28602
  }
27940
28603
  handleDataGroup() {
27941
28604
  if (!this.model.enableGroup || this.model.groupMode === "NONE") {
27942
- throw new RuntimeError45("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
28605
+ throw new RuntimeError47("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
27943
28606
  }
27944
28607
  return super.handleDataGroup();
27945
28608
  }
@@ -28062,6 +28725,376 @@ var KanbanController = class extends DataViewControlController {
28062
28725
  }
28063
28726
  };
28064
28727
 
28728
+ // src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
28729
+ import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
28730
+
28731
+ // src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
28732
+ import { isArray as isArray6 } from "qx-util";
28733
+ var TreeGridExService = class extends TreeService {
28734
+ constructor() {
28735
+ super(...arguments);
28736
+ /**
28737
+ * 表格列映射关系
28738
+ *
28739
+ * @author zk
28740
+ * @date 2023-09-25 05:09:11
28741
+ * @type {Map<string, Map<string, UIMapField>>}
28742
+ * @memberof TreeGridService
28743
+ */
28744
+ this.multipleUiMap = /* @__PURE__ */ new Map();
28745
+ }
28746
+ /**
28747
+ * 初始化节点属性映射
28748
+ *
28749
+ * @author lxm
28750
+ * @date 2022-08-31 18:08:37
28751
+ */
28752
+ initUIDataMap() {
28753
+ var _a;
28754
+ super.initUIDataMap();
28755
+ (_a = this.model.detreeNodes) == null ? void 0 : _a.forEach((item) => {
28756
+ var _a2;
28757
+ const dataMap = /* @__PURE__ */ new Map();
28758
+ (_a2 = item.detreeNodeDataItems) == null ? void 0 : _a2.forEach((dataItem) => {
28759
+ const uiKey = dataItem.id.toLowerCase();
28760
+ const deField = dataItem.appDEFieldId;
28761
+ const deFieldKey = deField.toLowerCase();
28762
+ const mapField = new UIMapField(uiKey, deFieldKey, {
28763
+ isOriginField: true,
28764
+ dataType: dataItem.dataType
28765
+ });
28766
+ dataMap.set(uiKey, mapField);
28767
+ });
28768
+ this.multipleUiMap.set(item.id, dataMap);
28769
+ });
28770
+ }
28771
+ /**
28772
+ * 获取实体数据集数据
28773
+ *
28774
+ * @protected
28775
+ * @param {TreeNodeRSModel} nodeRS
28776
+ * @param {TreeFetchOpts} opts
28777
+ * @returns {*}
28778
+ * @memberof TreeService
28779
+ */
28780
+ async getDENodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
28781
+ const { appDEDataSetId, appDataEntityId } = nodeModel;
28782
+ const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
28783
+ context: opts.context,
28784
+ params: opts.params,
28785
+ navContext: {},
28786
+ navParams: {}
28787
+ };
28788
+ params.size = nodeModel.maxSize || 1e3;
28789
+ if (nodeModel.sortAppDEFieldId && nodeModel.sortDir) {
28790
+ Object.assign(params, {
28791
+ sort: "".concat(nodeModel.sortAppDEFieldId.toLowerCase(), ",").concat(nodeModel.sortDir.toLowerCase())
28792
+ });
28793
+ }
28794
+ const response = await this.app.deService.exec(
28795
+ appDataEntityId,
28796
+ appDEDataSetId,
28797
+ context,
28798
+ params
28799
+ );
28800
+ if (response.data.length) {
28801
+ const { data } = this.handleResponseForMultiple(response, nodeModel.id);
28802
+ const nodeDatas = data.map((item) => {
28803
+ return new TreeDataSetNodeData(nodeModel, parentNodeData, {
28804
+ data: item,
28805
+ leaf: !!opts.leaf,
28806
+ navContext,
28807
+ navParams
28808
+ });
28809
+ });
28810
+ return nodeDatas;
28811
+ }
28812
+ return [];
28813
+ }
28814
+ /**
28815
+ * 处理多数据源响应
28816
+ *
28817
+ * @author zk
28818
+ * @date 2023-09-21 04:09:06
28819
+ * @param {IHttpResponse} response
28820
+ * @param {string} tag 多数据源dataUIMap标识
28821
+ * @return {*} {IHttpResponse}
28822
+ * @memberof TreeGridService
28823
+ */
28824
+ handleResponseForMultiple(response, tag) {
28825
+ const res = super.handleResponse(response);
28826
+ if (res.headers) {
28827
+ if (res.headers["x-page"]) {
28828
+ res.page = Number(res.headers["x-page"]);
28829
+ }
28830
+ if (res.headers["x-per-page"]) {
28831
+ res.size = Number(res.headers["x-per-page"]);
28832
+ }
28833
+ if (res.headers["x-total"]) {
28834
+ res.total = Number(res.headers["x-total"]);
28835
+ }
28836
+ }
28837
+ if (res.ok) {
28838
+ if (isArray6(res.data)) {
28839
+ res.data = res.data.map(
28840
+ (item) => this.toUIDataForMultiple(item, tag)
28841
+ );
28842
+ } else {
28843
+ res.data = this.toUIDataForMultiple(res.data, tag);
28844
+ }
28845
+ }
28846
+ return res;
28847
+ }
28848
+ /**
28849
+ * 实体数据转ui数据
28850
+ *
28851
+ * @author zk
28852
+ * @date 2023-09-21 06:09:06
28853
+ * @param {IData} entityData 实体数据
28854
+ * @param {string} tag 多数据源dataUIMap标识
28855
+ * @return {*} {ControlVO}
28856
+ * @memberof TreeGridService
28857
+ */
28858
+ toUIDataForMultiple(entityData, tag) {
28859
+ const dataUIMap = this.multipleUiMap.get(tag);
28860
+ return new ControlVO(entityData, dataUIMap);
28861
+ }
28862
+ };
28863
+
28864
+ // src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
28865
+ var TreeGridExController = class extends MDControlController {
28866
+ constructor() {
28867
+ super(...arguments);
28868
+ /**
28869
+ * 表格列的适配器
28870
+ *
28871
+ * @author zk
28872
+ * @date 2023-09-21 06:09:04
28873
+ * @type {{ [key: string]: IGridColumnProvider }}
28874
+ * @memberof TreeGridExController
28875
+ */
28876
+ this.providers = {};
28877
+ /**
28878
+ * 所有表格列控制器集合
28879
+ *
28880
+ * @author zk
28881
+ * @date 2023-09-21 06:09:10
28882
+ * @type {{ [key: string]: GridColumnController }}
28883
+ * @memberof TreeGridExController
28884
+ */
28885
+ this.columns = {};
28886
+ /**
28887
+ * 所有表格属性列的控制器
28888
+ *
28889
+ * @author zk
28890
+ * @date 2023-09-21 06:09:16
28891
+ * @type {{ [key: string]: GridFieldColumnController }}
28892
+ * @memberof TreeGridExController
28893
+ */
28894
+ this.fieldColumns = {};
28895
+ /**
28896
+ * 所有表格操作列的控制器
28897
+ *
28898
+ * @author zk
28899
+ * @date 2023-09-21 06:09:21
28900
+ * @type {{ [key: string]: GridUAColumnController }}
28901
+ * @memberof TreeGridExController
28902
+ */
28903
+ this.uaColumns = {};
28904
+ }
28905
+ initState() {
28906
+ super.initState();
28907
+ this.state.size = 0;
28908
+ this.state.columnStates = [];
28909
+ this.state.defaultExpandedKeys = [];
28910
+ }
28911
+ async onCreated() {
28912
+ await super.onCreated();
28913
+ this.service = new TreeGridExService(this.model);
28914
+ await this.service.init(this.context);
28915
+ this.initColumnStates();
28916
+ await this.initGridColumns();
28917
+ }
28918
+ /**
28919
+ * 初始化表格属性列,操作列,编辑项控制器
28920
+ *
28921
+ * @author zk
28922
+ * @date 2023-09-21 06:09:28
28923
+ * @protected
28924
+ * @return {*} {Promise<void>}
28925
+ * @memberof TreeGridExController
28926
+ */
28927
+ async initGridColumns() {
28928
+ if (this.model.detreeColumns) {
28929
+ await Promise.all(
28930
+ this.model.detreeColumns.map(
28931
+ async (column) => this.initColumnsController(column)
28932
+ )
28933
+ );
28934
+ }
28935
+ }
28936
+ /**
28937
+ * 初始化表格属性列,操作列,编辑项控制器
28938
+ *
28939
+ * @author zk
28940
+ * @date 2023-09-21 06:09:37
28941
+ * @protected
28942
+ * @param {IDETreeColumn} column
28943
+ * @return {*} {Promise<void>}
28944
+ * @memberof TreeGridExController
28945
+ */
28946
+ async initColumnsController(column) {
28947
+ const provider = await getGridColumnProvider(column);
28948
+ if (!provider) {
28949
+ return;
28950
+ }
28951
+ this.providers[column.codeName] = provider;
28952
+ const controller = await provider.createController(column, this);
28953
+ this.columns[column.codeName] = controller;
28954
+ if (column.columnType === "DEFGRIDCOLUMN") {
28955
+ this.fieldColumns[column.codeName] = controller;
28956
+ } else if (column.columnType === "UAGRIDCOLUMN") {
28957
+ this.uaColumns[column.codeName] = controller;
28958
+ }
28959
+ }
28960
+ /**
28961
+ * 初始化表格列状态
28962
+ *
28963
+ * @author zk
28964
+ * @date 2023-09-21 06:09:43
28965
+ * @protected
28966
+ * @memberof TreeGridExController
28967
+ */
28968
+ initColumnStates() {
28969
+ recursiveIterate7(
28970
+ this.model,
28971
+ (column) => {
28972
+ if (column.columnType !== "GROUPGRIDCOLUMN") {
28973
+ this.state.columnStates.push({
28974
+ key: column.codeName,
28975
+ caption: column.caption,
28976
+ hidden: !!column.hideDefault,
28977
+ uaColumn: column.columnType === "UAGRIDCOLUMN"
28978
+ });
28979
+ }
28980
+ },
28981
+ { childrenFields: ["detreeColumns"] }
28982
+ );
28983
+ this.calcColumnFixed();
28984
+ }
28985
+ /**
28986
+ * 计算列的固定状态
28987
+ *
28988
+ * @author zk
28989
+ * @date 2023-09-21 06:09:50
28990
+ * @protected
28991
+ * @memberof TreeGridExController
28992
+ */
28993
+ calcColumnFixed() {
28994
+ const showColumns = this.state.columnStates.filter(
28995
+ (column) => !column.hidden
28996
+ );
28997
+ const allNum = showColumns.length;
28998
+ showColumns.forEach((column, index) => {
28999
+ if (column.uaColumn) {
29000
+ column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
29001
+ } else {
29002
+ column.fixed = "right";
29003
+ }
29004
+ });
29005
+ }
29006
+ /**
29007
+ * 树部件加载,从根节点开始重新加载
29008
+ *
29009
+ * @author zk
29010
+ * @date 2023-09-21 06:09:56
29011
+ * @param {MDCtrlLoadParams} [args={}]
29012
+ * @return {*} {Promise<ITreeNodeData[]>}
29013
+ * @memberof TreeGridExController
29014
+ */
29015
+ async load(args = {}) {
29016
+ const isInitialLoad = args.isInitialLoad === true;
29017
+ const nodes = await this.loadNodes();
29018
+ this.state.expandedKeys = this.calcExpandedKeys(nodes);
29019
+ await this.afterLoad(args, nodes);
29020
+ this.state.isLoaded = true;
29021
+ await this.evt.emit("onLoadSuccess", {
29022
+ isInitialLoad
29023
+ });
29024
+ return nodes;
29025
+ }
29026
+ /**
29027
+ * 加载子节点数据
29028
+ *
29029
+ * @author zk
29030
+ * @date 2023-09-21 06:09:02
29031
+ * @param {ITreeNodeData} [parentNode]
29032
+ * @return {*} {Promise<ITreeNodeData[]>}
29033
+ * @memberof TreeGridExController
29034
+ */
29035
+ async loadNodes(parentNode) {
29036
+ const params = await this.getFetchParams();
29037
+ const hasQuery = !!params.query;
29038
+ const defaultExpandedKeys = !parentNode ? this.state.defaultExpandedKeys : void 0;
29039
+ await this.startLoading();
29040
+ let nodes;
29041
+ try {
29042
+ nodes = await this.service.fetchChildNodes(parentNode, {
29043
+ context: this.context.clone(),
29044
+ params,
29045
+ hasQuery,
29046
+ defaultExpandedKeys
29047
+ }) || [];
29048
+ } finally {
29049
+ await this.endLoading();
29050
+ }
29051
+ if (parentNode) {
29052
+ parentNode.children = nodes;
29053
+ } else {
29054
+ this.state.rootNodes = nodes;
29055
+ }
29056
+ this.state.items = [];
29057
+ recursiveIterate7(
29058
+ { children: this.state.rootNodes },
29059
+ (node) => {
29060
+ this.state.items.push(node);
29061
+ }
29062
+ );
29063
+ return nodes;
29064
+ }
29065
+ /**
29066
+ * 计算展开节点集合
29067
+ *
29068
+ * @author zk
29069
+ * @date 2023-09-21 06:09:07
29070
+ * @param {ITreeNodeData[]} nodes
29071
+ * @return {*} {string[]}
29072
+ * @memberof TreeGridExController
29073
+ */
29074
+ calcExpandedKeys(nodes) {
29075
+ let expandedKeys = [];
29076
+ recursiveIterate7({ children: nodes }, (node) => {
29077
+ var _a;
29078
+ if ((_a = node.children) == null ? void 0 : _a.length) {
29079
+ expandedKeys.push(node.id);
29080
+ }
29081
+ });
29082
+ if (this.state.defaultExpandedKeys.length) {
29083
+ expandedKeys.push(...this.state.defaultExpandedKeys);
29084
+ expandedKeys = Array.from(new Set(expandedKeys));
29085
+ }
29086
+ return expandedKeys;
29087
+ }
29088
+ };
29089
+
29090
+ // src/controller/control/tree-grid/tree-grid.controller.ts
29091
+ var TreeGridController = class extends GridController {
29092
+ };
29093
+
29094
+ // src/controller/control/tree-grid/tree-grid.service.ts
29095
+ var TreeGridService = class extends GridService {
29096
+ };
29097
+
28065
29098
  // src/controller/hub.controller.ts
28066
29099
  var HubController = class {
28067
29100
  constructor() {
@@ -28277,7 +29310,7 @@ var AppHub = class {
28277
29310
  this.registerAppView(appView);
28278
29311
  return appView;
28279
29312
  }
28280
- throw new RuntimeError46("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
29313
+ throw new RuntimeError48("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
28281
29314
  }
28282
29315
  /**
28283
29316
  * 根据应用实体代码名称查找应用视图
@@ -28308,7 +29341,7 @@ var AppHub = class {
28308
29341
  this.registerAppDataEntity(entity, appId);
28309
29342
  return entity;
28310
29343
  }
28311
- throw new RuntimeError46("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
29344
+ throw new RuntimeError48("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
28312
29345
  }
28313
29346
  /**
28314
29347
  * 新建 hub 应用
@@ -28329,11 +29362,18 @@ var AppHub = class {
28329
29362
  appModel = await this.modelLoaderProvider.getApp(id);
28330
29363
  this.registerApp(appModel);
28331
29364
  } else {
28332
- throw new RuntimeError46("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
29365
+ throw new RuntimeError48("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
28333
29366
  }
28334
29367
  const app = new Application(appModel);
28335
29368
  this.appMap.set(id, app);
28336
29369
  await app.init();
29370
+ if (!this.configCache) {
29371
+ this.configCache = new ConfigService(
29372
+ ibiz.env.appId,
29373
+ "PSSysHub",
29374
+ "Global"
29375
+ );
29376
+ }
28337
29377
  return app;
28338
29378
  }
28339
29379
  /**
@@ -28420,7 +29460,7 @@ var EngineFactory = class {
28420
29460
  };
28421
29461
 
28422
29462
  // src/engine/view-base.engine.ts
28423
- import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
29463
+ import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
28424
29464
  var ViewEngineBase = class {
28425
29465
  /**
28426
29466
  * 构造函数在视图控制器的构造函数逻辑内部执行
@@ -28608,7 +29648,7 @@ var ViewEngineBase = class {
28608
29648
  const { appDataEntityId } = this.view.model;
28609
29649
  const { evt, context, params } = this.view;
28610
29650
  if (!appDataEntityId) {
28611
- throw new RuntimeError47("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
29651
+ throw new RuntimeError49("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
28612
29652
  }
28613
29653
  const app = ibiz.hub.getApp(context.srfappid);
28614
29654
  const res = await app.deService.exec(
@@ -28629,7 +29669,7 @@ var ViewEngineBase = class {
28629
29669
  };
28630
29670
 
28631
29671
  // src/engine/md-view.engine.ts
28632
- import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
29672
+ import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
28633
29673
  var MDViewEngine = class extends ViewEngineBase {
28634
29674
  /**
28635
29675
  * 多数据部件名称
@@ -28824,7 +29864,7 @@ var MDViewEngine = class extends ViewEngineBase {
28824
29864
  (item) => item.id === "newdata"
28825
29865
  );
28826
29866
  if (!openAppViewLogic) {
28827
- throw new RuntimeModelError54(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29867
+ throw new RuntimeModelError55(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
28828
29868
  }
28829
29869
  const context = this.view.context.clone();
28830
29870
  if (copyMode) {
@@ -28840,7 +29880,7 @@ var MDViewEngine = class extends ViewEngineBase {
28840
29880
  if (result instanceof Object && result.ok) {
28841
29881
  this.refresh();
28842
29882
  } else if (result === -1) {
28843
- throw new RuntimeModelError54(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29883
+ throw new RuntimeModelError55(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
28844
29884
  }
28845
29885
  }
28846
29886
  /**
@@ -29037,7 +30077,7 @@ var GlobalUtil = class {
29037
30077
  };
29038
30078
 
29039
30079
  // src/logic-scheduler/executor/logic-executor.ts
29040
- import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
30080
+ import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
29041
30081
  var LogicExecutor = class {
29042
30082
  /**
29043
30083
  * @author lxm
@@ -29058,7 +30098,7 @@ var LogicExecutor = class {
29058
30098
  */
29059
30099
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
29060
30100
  execute(_executeParams) {
29061
- throw new RuntimeError48("Method not implemented.");
30101
+ throw new RuntimeError50("Method not implemented.");
29062
30102
  }
29063
30103
  /**
29064
30104
  * 销毁方法
@@ -29149,13 +30189,13 @@ var ScriptExecutor = class extends LogicExecutor {
29149
30189
  };
29150
30190
 
29151
30191
  // src/logic-scheduler/executor/app-de-ui-logic-executor.ts
29152
- import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
30192
+ import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
29153
30193
  var AppDEUILogicExecutor = class extends LogicExecutor {
29154
30194
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
29155
30195
  execute(executeParams) {
29156
30196
  const { appDEUILogicId, appDataEntityId } = this.logic;
29157
30197
  if (!appDEUILogicId) {
29158
- throw new RuntimeModelError55(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
30198
+ throw new RuntimeModelError56(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
29159
30199
  }
29160
30200
  execUILogic(appDEUILogicId, appDataEntityId, executeParams);
29161
30201
  }
@@ -29490,7 +30530,7 @@ var LogicSchedulerCenter = class {
29490
30530
  };
29491
30531
 
29492
30532
  // src/logic-scheduler/trigger/logic-trigger.ts
29493
- import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
30533
+ import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
29494
30534
  var LogicTrigger = class {
29495
30535
  /**
29496
30536
  * @author lxm
@@ -29550,7 +30590,7 @@ var LogicTrigger = class {
29550
30590
  if (this.executor) {
29551
30591
  return this.executor.execute(executeParams);
29552
30592
  }
29553
- throw new RuntimeError49("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
30593
+ throw new RuntimeError51("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
29554
30594
  }
29555
30595
  /**
29556
30596
  * 销毁方法
@@ -29567,12 +30607,12 @@ var CustomTrigger = class extends LogicTrigger {
29567
30607
  };
29568
30608
 
29569
30609
  // src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
29570
- import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
30610
+ import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
29571
30611
  var ItemDynaLogicTrigger = class extends LogicTrigger {
29572
30612
  bindExecutor(executor) {
29573
30613
  super.bindExecutor(executor);
29574
30614
  if (this.executor.type !== "SCRIPT") {
29575
- throw new RuntimeError50(
30615
+ throw new RuntimeError52(
29576
30616
  "\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
29577
30617
  );
29578
30618
  }
@@ -29596,20 +30636,22 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
29596
30636
  );
29597
30637
  }
29598
30638
  match(matchParams) {
30639
+ var _a, _b;
29599
30640
  const superResult = super.match(matchParams);
29600
- return superResult && matchParams.itemName === this.logic.itemName;
30641
+ return superResult && // 忽略大小写匹配
30642
+ ((_a = matchParams.itemName) == null ? void 0 : _a.toLowerCase()) === ((_b = this.logic.itemName) == null ? void 0 : _b.toLowerCase());
29601
30643
  }
29602
30644
  execute(executeParams) {
29603
30645
  const result = this.executor.execute(executeParams);
29604
30646
  if (typeof result === "boolean") {
29605
30647
  return result;
29606
30648
  }
29607
- throw new RuntimeError50("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
30649
+ throw new RuntimeError52("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
29608
30650
  }
29609
30651
  };
29610
30652
 
29611
30653
  // src/logic-scheduler/trigger/timer-trigger.ts
29612
- import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
30654
+ import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
29613
30655
  var TimerTrigger = class extends LogicTrigger {
29614
30656
  constructor() {
29615
30657
  super(...arguments);
@@ -29618,7 +30660,7 @@ var TimerTrigger = class extends LogicTrigger {
29618
30660
  start() {
29619
30661
  this.timer = setInterval(() => {
29620
30662
  if (!this.scheduler.defaultParamsCb) {
29621
- throw new RuntimeError51("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
30663
+ throw new RuntimeError53("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
29622
30664
  }
29623
30665
  const params = this.scheduler.defaultParamsCb();
29624
30666
  this.executor.execute(params);
@@ -29635,8 +30677,8 @@ var TimerTrigger = class extends LogicTrigger {
29635
30677
  // src/logic-scheduler/executor/app-ui-logic-executor.ts
29636
30678
  import {
29637
30679
  ModelError as ModelError30,
29638
- RuntimeError as RuntimeError52,
29639
- RuntimeModelError as RuntimeModelError56
30680
+ RuntimeError as RuntimeError54,
30681
+ RuntimeModelError as RuntimeModelError57
29640
30682
  } from "@ibiz-template/core";
29641
30683
  import { notNilEmpty as notNilEmpty8 } from "qx-util";
29642
30684
  var AppUILogicExecutor = class extends LogicExecutor {
@@ -29671,7 +30713,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
29671
30713
  const { context, params, ...rest } = parameters;
29672
30714
  const { data } = parameters;
29673
30715
  if (!(data == null ? void 0 : data[0])) {
29674
- throw new RuntimeError52("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
30716
+ throw new RuntimeError54("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
29675
30717
  }
29676
30718
  const openViewRefs = appUILogic.openDataAppViews;
29677
30719
  let openViewRef;
@@ -29680,7 +30722,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
29680
30722
  } else {
29681
30723
  openViewRef = appUILogic.openDataAppView;
29682
30724
  if (!openViewRef) {
29683
- throw new RuntimeModelError56(
30725
+ throw new RuntimeModelError57(
29684
30726
  appUILogic,
29685
30727
  "opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
29686
30728
  );
@@ -29688,7 +30730,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
29688
30730
  }
29689
30731
  const openView = openViewRef.refAppViewId;
29690
30732
  if (!openView) {
29691
- throw new RuntimeModelError56(
30733
+ throw new RuntimeModelError57(
29692
30734
  appUILogic,
29693
30735
  "opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
29694
30736
  );
@@ -29715,7 +30757,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
29715
30757
  const appDataEntityId = parameters.view.model.appDataEntityId;
29716
30758
  const formTypeName = await getFormTypeFieldName(appDataEntityId);
29717
30759
  if (!formTypeName) {
29718
- throw new RuntimeModelError56(
30760
+ throw new RuntimeModelError57(
29719
30761
  appUILogic,
29720
30762
  "".concat(appDataEntityId, "\u5B9E\u4F53\u7F3A\u5C11\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027")
29721
30763
  );
@@ -29723,12 +30765,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
29723
30765
  const { data } = parameters;
29724
30766
  const formTypeValue = data[0][formTypeName];
29725
30767
  if (!formTypeValue) {
29726
- throw new RuntimeModelError56(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
30768
+ throw new RuntimeModelError57(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
29727
30769
  }
29728
30770
  const openViewRefs = appUILogic.openDataAppViews;
29729
30771
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
29730
30772
  if (!findView) {
29731
- throw new RuntimeError52(
30773
+ throw new RuntimeError54(
29732
30774
  "\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
29733
30775
  );
29734
30776
  }
@@ -29765,7 +30807,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
29765
30807
  return viewRef.refMode.toLowerCase() !== parentDeName;
29766
30808
  });
29767
30809
  if (!newViewRef) {
29768
- throw new RuntimeModelError56(
30810
+ throw new RuntimeModelError57(
29769
30811
  appUILogic,
29770
30812
  "\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
29771
30813
  );
@@ -29775,7 +30817,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
29775
30817
  } else {
29776
30818
  newViewRef = newDataAppView;
29777
30819
  if (!newViewRef || !newViewRef.refAppViewId) {
29778
- throw new RuntimeModelError56(
30820
+ throw new RuntimeModelError57(
29779
30821
  appUILogic,
29780
30822
  "newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
29781
30823
  );
@@ -29825,7 +30867,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
29825
30867
  const { wizardAppView, newDataAppViews } = appUILogic;
29826
30868
  const { context, params, ...rest } = parameters;
29827
30869
  if (!wizardAppView || !wizardAppView.refAppViewId) {
29828
- throw new RuntimeModelError56(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
30870
+ throw new RuntimeModelError57(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
29829
30871
  }
29830
30872
  const result = await ibiz.commands.execute(
29831
30873
  OpenAppViewCommand.TAG,
@@ -29839,12 +30881,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
29839
30881
  }
29840
30882
  const selectData = (_a = result.data) == null ? void 0 : _a[0];
29841
30883
  if (!selectData) {
29842
- throw new RuntimeError52("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
30884
+ throw new RuntimeError54("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
29843
30885
  }
29844
30886
  const indexType = selectData.srfkey;
29845
30887
  const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
29846
30888
  if (!findView) {
29847
- throw new RuntimeError52(
30889
+ throw new RuntimeError54(
29848
30890
  "\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
29849
30891
  );
29850
30892
  }
@@ -29871,7 +30913,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
29871
30913
  const minorDERs = selfDe.minorAppDERSs;
29872
30914
  const pickParentDeName = newViewRef.refMode.toLowerCase();
29873
30915
  if (!minorDERs) {
29874
- throw new RuntimeModelError56(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
30916
+ throw new RuntimeModelError57(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
29875
30917
  }
29876
30918
  let pickParentFieldName;
29877
30919
  minorDERs == null ? void 0 : minorDERs.forEach((item) => {
@@ -30144,6 +31186,7 @@ export {
30144
31186
  ChartService,
30145
31187
  CodeListEditorController,
30146
31188
  CodeListService,
31189
+ ConfigService,
30147
31190
  ContainerPortletController,
30148
31191
  ContextMenuController,
30149
31192
  ControlController,
@@ -30153,6 +31196,7 @@ export {
30153
31196
  ControllerEvent,
30154
31197
  Counter,
30155
31198
  CounterService,
31199
+ CustomDashboardController,
30156
31200
  DECache,
30157
31201
  DEDQCondUtil,
30158
31202
  DEService,
@@ -30264,6 +31308,10 @@ export {
30264
31308
  TreeController,
30265
31309
  TreeDataSetNodeData,
30266
31310
  TreeExpBarController,
31311
+ TreeGridController,
31312
+ TreeGridExController,
31313
+ TreeGridExService,
31314
+ TreeGridService,
30267
31315
  TreeNodeData,
30268
31316
  TreeService,
30269
31317
  TreeStaticNodeData,