@ibiz-template/runtime 0.5.3-beta.8 → 0.5.3

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 (135) hide show
  1. package/dist/index.esm.js +832 -333
  2. package/dist/index.system.min.js +1 -1
  3. package/out/controller/common/view/view.controller.d.ts.map +1 -1
  4. package/out/controller/common/view/view.controller.js +2 -0
  5. package/out/controller/control/form/edit-form/edit-form.controller.js +1 -1
  6. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
  7. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +4 -0
  8. package/out/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.d.ts +8 -0
  9. package/out/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.d.ts.map +1 -1
  10. package/out/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.js +10 -0
  11. package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.d.ts +8 -0
  12. package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.d.ts.map +1 -1
  13. package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.js +15 -0
  14. package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.d.ts +7 -0
  15. package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.d.ts.map +1 -1
  16. package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.js +10 -0
  17. package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
  18. package/out/controller/control/grid/grid/grid.service.js +1 -10
  19. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts +7 -0
  20. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
  21. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +11 -2
  22. package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts +0 -7
  23. package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts.map +1 -1
  24. package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +0 -9
  25. package/out/controller/control/tree/tree.controller.d.ts +17 -0
  26. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  27. package/out/controller/control/tree/tree.controller.js +22 -0
  28. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
  29. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +6 -4
  30. package/out/controller/utils/jsonschema/entity.d.ts.map +1 -1
  31. package/out/controller/utils/jsonschema/entity.js +4 -1
  32. package/out/global/global-util/global-util.d.ts +8 -1
  33. package/out/global/global-util/global-util.d.ts.map +1 -1
  34. package/out/global/global-util/global-util.js +8 -1
  35. package/out/interface/controller/common/i-icon/i-icon.d.ts +1 -0
  36. package/out/interface/controller/common/i-icon/i-icon.d.ts.map +1 -1
  37. package/out/interface/controller/state/control/i-drbar.state.d.ts +7 -0
  38. package/out/interface/controller/state/control/i-drbar.state.d.ts.map +1 -1
  39. package/out/interface/controller/state/control/i-drtab.state.d.ts +7 -0
  40. package/out/interface/controller/state/control/i-drtab.state.d.ts.map +1 -1
  41. package/out/interface/service/i-transaction/i-transaction.d.ts +83 -0
  42. package/out/interface/service/i-transaction/i-transaction.d.ts.map +1 -0
  43. package/out/interface/service/i-transaction/i-transaction.js +1 -0
  44. package/out/interface/service/index.d.ts +1 -0
  45. package/out/interface/service/index.d.ts.map +1 -1
  46. package/out/interface/service/service/i-app-de.service.d.ts +9 -1
  47. package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
  48. package/out/interface/util/i-view-stack/i-view-stack.d.ts +53 -0
  49. package/out/interface/util/i-view-stack/i-view-stack.d.ts.map +1 -0
  50. package/out/interface/util/i-view-stack/i-view-stack.js +1 -0
  51. package/out/interface/util/index.d.ts +1 -0
  52. package/out/interface/util/index.d.ts.map +1 -1
  53. package/out/register/helper/async-action-register.d.ts.map +1 -1
  54. package/out/register/helper/async-action-register.js +1 -1
  55. package/out/service/de-service-util.d.ts +11 -0
  56. package/out/service/de-service-util.d.ts.map +1 -1
  57. package/out/service/de-service-util.js +34 -0
  58. package/out/service/dto/method.dto.d.ts +1 -2
  59. package/out/service/dto/method.dto.d.ts.map +1 -1
  60. package/out/service/dto/method.dto.js +0 -7
  61. package/out/service/service/auth/v7-auth.service.d.ts +1 -2
  62. package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
  63. package/out/service/service/auth/v7-auth.service.js +27 -7
  64. package/out/service/service/entity/de.service.d.ts +1 -1
  65. package/out/service/service/entity/de.service.d.ts.map +1 -1
  66. package/out/service/service/entity/de.service.js +4 -1
  67. package/out/service/service/entity/method/de-action.d.ts +13 -1
  68. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  69. package/out/service/service/entity/method/de-action.js +163 -56
  70. package/out/service/service/entity/method/fetch.d.ts.map +1 -1
  71. package/out/service/service/entity/method/fetch.js +2 -1
  72. package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
  73. package/out/service/service/entity/method/method-renturn.js +9 -3
  74. package/out/service/utils/de-cache/de-cache.d.ts +11 -1
  75. package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
  76. package/out/service/utils/de-cache/de-cache.js +122 -18
  77. package/out/service/utils/de-dq-cond/ps-model-cond-engine-base.d.ts.map +1 -1
  78. package/out/service/utils/de-dq-cond/ps-model-cond-engine-base.js +4 -0
  79. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
  80. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +9 -1
  81. package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
  82. package/out/service/vo/tree-node-data/tree-node-data.js +3 -0
  83. package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
  84. package/out/ui-action/provider/front-ui-action-provider.js +2 -1
  85. package/out/utils/index.d.ts +1 -0
  86. package/out/utils/index.d.ts.map +1 -1
  87. package/out/utils/index.js +1 -0
  88. package/out/utils/ui-domain/transaction.d.ts +66 -0
  89. package/out/utils/ui-domain/transaction.d.ts.map +1 -0
  90. package/out/utils/ui-domain/transaction.js +94 -0
  91. package/out/utils/ui-domain/ui-domain.d.ts +18 -0
  92. package/out/utils/ui-domain/ui-domain.d.ts.map +1 -1
  93. package/out/utils/ui-domain/ui-domain.js +23 -0
  94. package/out/utils/view-stack/view-stack.d.ts +29 -0
  95. package/out/utils/view-stack/view-stack.d.ts.map +1 -0
  96. package/out/utils/view-stack/view-stack.js +47 -0
  97. package/package.json +5 -5
  98. package/src/controller/common/view/view.controller.ts +4 -0
  99. package/src/controller/control/form/edit-form/edit-form.controller.ts +1 -1
  100. package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +4 -0
  101. package/src/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.ts +14 -0
  102. package/src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.ts +16 -0
  103. package/src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.ts +9 -1
  104. package/src/controller/control/grid/grid/grid.service.ts +1 -11
  105. package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +12 -2
  106. package/src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts +0 -10
  107. package/src/controller/control/tree/tree.controller.ts +35 -0
  108. package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +12 -4
  109. package/src/controller/utils/jsonschema/entity.ts +4 -1
  110. package/src/global/global-util/global-util.ts +9 -0
  111. package/src/interface/controller/common/i-icon/i-icon.ts +1 -0
  112. package/src/interface/controller/state/control/i-drbar.state.ts +8 -0
  113. package/src/interface/controller/state/control/i-drtab.state.ts +8 -0
  114. package/src/interface/service/i-transaction/i-transaction.ts +88 -0
  115. package/src/interface/service/index.ts +4 -0
  116. package/src/interface/service/service/i-app-de.service.ts +10 -1
  117. package/src/interface/util/i-view-stack/i-view-stack.ts +53 -0
  118. package/src/interface/util/index.ts +1 -0
  119. package/src/register/helper/async-action-register.ts +3 -1
  120. package/src/service/de-service-util.ts +43 -0
  121. package/src/service/dto/method.dto.ts +1 -8
  122. package/src/service/service/auth/v7-auth.service.ts +37 -19
  123. package/src/service/service/entity/de.service.ts +6 -1
  124. package/src/service/service/entity/method/de-action.ts +182 -61
  125. package/src/service/service/entity/method/fetch.ts +2 -4
  126. package/src/service/service/entity/method/method-renturn.ts +14 -5
  127. package/src/service/utils/de-cache/de-cache.ts +128 -19
  128. package/src/service/utils/de-dq-cond/ps-model-cond-engine-base.ts +4 -0
  129. package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +11 -0
  130. package/src/service/vo/tree-node-data/tree-node-data.ts +3 -0
  131. package/src/ui-action/provider/front-ui-action-provider.ts +2 -1
  132. package/src/utils/index.ts +1 -0
  133. package/src/utils/ui-domain/transaction.ts +100 -0
  134. package/src/utils/ui-domain/ui-domain.ts +25 -0
  135. package/src/utils/view-stack/view-stack.ts +64 -0
package/dist/index.esm.js CHANGED
@@ -2850,6 +2850,95 @@ var ThemeUtil = class {
2850
2850
 
2851
2851
  // src/utils/ui-domain/ui-domain.ts
2852
2852
  import { createUUID } from "qx-util";
2853
+
2854
+ // src/utils/ui-domain/transaction.ts
2855
+ var Transaction = class {
2856
+ constructor() {
2857
+ /**
2858
+ * 待提交队列
2859
+ *
2860
+ * @author chitanda
2861
+ * @date 2024-01-17 15:01:38
2862
+ * @protected
2863
+ */
2864
+ this.commitQueue = /* @__PURE__ */ new Map();
2865
+ /**
2866
+ * 事务状态
2867
+ *
2868
+ * @author chitanda
2869
+ * @date 2024-01-17 15:01:45
2870
+ * @type {ITransactionState}
2871
+ */
2872
+ this.state = {
2873
+ isOpen: false,
2874
+ isChange: false
2875
+ };
2876
+ }
2877
+ /**
2878
+ * 开启事务
2879
+ *
2880
+ * @description 事务开启后,所有的数据操作都会被缓存,直到事务提交或者回滚
2881
+ * @author chitanda
2882
+ * @date 2024-01-17 15:01:46
2883
+ */
2884
+ open() {
2885
+ if (this.state.isOpen) {
2886
+ ibiz.log.warn("\u4E8B\u52A1\u5DF2\u7ECF\u5F00\u542F, \u5355\u4E2A\u754C\u9762\u57DF\u53EA\u80FD\u5F00\u542F\u4E00\u4E2A\u4E8B\u52A1");
2887
+ return;
2888
+ }
2889
+ this.state.isOpen = true;
2890
+ }
2891
+ /**
2892
+ * 新增变更事务回调,事务提交时会按照添加顺序倒序执行
2893
+ *
2894
+ * @author chitanda
2895
+ * @date 2024-01-17 16:01:50
2896
+ * @param {string} id 回调标识,用于去重。一个数据只能有一个回调
2897
+ * @param {() => void} commit
2898
+ */
2899
+ change(id, commit) {
2900
+ this.state.isChange = true;
2901
+ this.commitQueue.set(id, commit);
2902
+ }
2903
+ /**
2904
+ * 提交事务
2905
+ *
2906
+ * @author chitanda
2907
+ * @date 2024-01-17 15:01:05
2908
+ */
2909
+ commit() {
2910
+ const commitQueue = Array.from(this.commitQueue.values()).reverse();
2911
+ for (const commit of commitQueue) {
2912
+ commit();
2913
+ }
2914
+ this.commitQueue.clear();
2915
+ this.state.isChange = false;
2916
+ }
2917
+ /**
2918
+ * 回滚事务
2919
+ *
2920
+ * @author chitanda
2921
+ * @date 2024-01-17 19:01:43
2922
+ */
2923
+ rollback() {
2924
+ this.commitQueue.clear();
2925
+ this.state.isChange = false;
2926
+ }
2927
+ /**
2928
+ * 关闭事务
2929
+ *
2930
+ * @author chitanda
2931
+ * @date 2024-01-17 15:01:02
2932
+ */
2933
+ close() {
2934
+ if (this.state.isChange) {
2935
+ throw new Error("\u5F53\u524D\u4E8B\u52A1\u672A\u63D0\u4EA4\uFF0C\u4E0D\u53EF\u4EE5\u76F4\u63A5\u5173\u95ED\u4E8B\u52A1");
2936
+ }
2937
+ this.state.isOpen = false;
2938
+ }
2939
+ };
2940
+
2941
+ // src/utils/ui-domain/ui-domain.ts
2853
2942
  var UIDomain = class {
2854
2943
  /**
2855
2944
  * Creates an instance of UIDomain.
@@ -2886,6 +2975,14 @@ var UIDomain = class {
2886
2975
  * @type {Map<string, IAppDERS[]>}
2887
2976
  */
2888
2977
  this.rs2Map = /* @__PURE__ */ new Map();
2978
+ /**
2979
+ * 当前界面域下唯一事务
2980
+ *
2981
+ * @author chitanda
2982
+ * @date 2024-01-17 15:01:07
2983
+ * @type {Transaction}
2984
+ */
2985
+ this.transaction = new Transaction();
2889
2986
  if (id) {
2890
2987
  this.id = id;
2891
2988
  } else {
@@ -2917,6 +3014,20 @@ var UIDomain = class {
2917
3014
  }
2918
3015
  return [];
2919
3016
  }
3017
+ /**
3018
+ * 查询指定主实体下的所有子实体关系
3019
+ *
3020
+ * @author chitanda
3021
+ * @date 2024-01-17 16:01:21
3022
+ * @param {string} appDataEntityId
3023
+ * @return {*} {IAppDERS[]}
3024
+ */
3025
+ getDERConfigByMajor(appDataEntityId) {
3026
+ if (this.rs2Map.has(appDataEntityId)) {
3027
+ return this.rs2Map.get(appDataEntityId);
3028
+ }
3029
+ return [];
3030
+ }
2920
3031
  /**
2921
3032
  * 根据模型给的子实体中的父关系模型,计算每个实体的子关系模型
2922
3033
  *
@@ -3039,6 +3150,47 @@ var RawValueUtil = class {
3039
3150
  }
3040
3151
  };
3041
3152
 
3153
+ // src/utils/view-stack/view-stack.ts
3154
+ var ViewStack = class {
3155
+ constructor() {
3156
+ this.stackMap = /* @__PURE__ */ new Map();
3157
+ this.stack = [];
3158
+ this.activeStack = [];
3159
+ }
3160
+ add(id, view) {
3161
+ this.stack.push(view);
3162
+ this.stackMap.set(id, view);
3163
+ this.recalculateActiveStack();
3164
+ }
3165
+ remove(id) {
3166
+ const view = this.stackMap.get(id);
3167
+ if (view) {
3168
+ this.stack.splice(this.stack.indexOf(view), 1);
3169
+ this.stackMap.delete(id);
3170
+ this.recalculateActiveStack();
3171
+ }
3172
+ }
3173
+ getActives() {
3174
+ return this.activeStack;
3175
+ }
3176
+ active(_id) {
3177
+ this.recalculateActiveStack();
3178
+ }
3179
+ deactivate(_id) {
3180
+ this.recalculateActiveStack();
3181
+ }
3182
+ /**
3183
+ * 重新计算激活视图堆栈
3184
+ *
3185
+ * @author chitanda
3186
+ * @date 2024-01-18 14:01:23
3187
+ * @protected
3188
+ */
3189
+ recalculateActiveStack() {
3190
+ this.activeStack = this.stack.filter((item) => item.isActive === true);
3191
+ }
3192
+ };
3193
+
3042
3194
  // src/utils/promise/promise.ts
3043
3195
  async function handleAllSettled(values, isThrow = true) {
3044
3196
  const allResults = await Promise.allSettled(values);
@@ -3064,7 +3216,7 @@ async function handleAllSettled(values, isThrow = true) {
3064
3216
 
3065
3217
  // src/command/app/open-app-view/open-app-view.ts
3066
3218
  import { ModelError as ModelError15, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
3067
- import { clone as clone16 } from "ramda";
3219
+ import { clone as clone17 } from "ramda";
3068
3220
 
3069
3221
  // src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
3070
3222
  import { isEmpty as isEmpty3 } from "ramda";
@@ -3113,6 +3265,9 @@ var PSModelCondEngineBase = class {
3113
3265
  return objValue != null;
3114
3266
  }
3115
3267
  if ("EQ" /* CONDOP_EQ */ === strCondOp || "ABSEQ" /* CONDOP_ABSEQ */ === strCondOp || "GT" /* CONDOP_GT */ === strCondOp || "GTANDEQ" /* CONDOP_GTANDEQ */ === strCondOp || "LT" /* CONDOP_LT */ === strCondOp || "LTANDEQ" /* CONDOP_LTANDEQ */ === strCondOp || "NOTEQ" /* CONDOP_NOTEQ */ === strCondOp) {
3268
+ if (objValue == null || objCondValue == null) {
3269
+ return false;
3270
+ }
3116
3271
  let nRet = -1;
3117
3272
  if (objValue == objCondValue) {
3118
3273
  nRet = 0;
@@ -3893,7 +4048,9 @@ function getProvider10(key) {
3893
4048
  );
3894
4049
  }
3895
4050
  function getAsyncActionProvider(actiontype) {
3896
- const provider = getProvider10(actiontype);
4051
+ const provider = getProvider10(
4052
+ actiontype || "DEFAULT"
4053
+ );
3897
4054
  if (!provider) {
3898
4055
  throw new RuntimeError9("\u627E\u4E0D\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B".concat(actiontype, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3899
4056
  } else {
@@ -4475,7 +4632,9 @@ var DynamicCodeListCache = class {
4475
4632
  iconPathAppDEFieldId,
4476
4633
  iconPathXAppDEFieldId,
4477
4634
  disableAppDEFieldId,
4478
- dataAppDEFieldId
4635
+ dataAppDEFieldId,
4636
+ clsAppDEFieldId,
4637
+ colorAppDEFieldId
4479
4638
  } = this.codeList;
4480
4639
  const value = valueAppDEFieldId ? data[valueAppDEFieldId] : data.srfkey;
4481
4640
  result.id = value;
@@ -4499,6 +4658,12 @@ var DynamicCodeListCache = class {
4499
4658
  if (disableAppDEFieldId) {
4500
4659
  result.disableSelect = fieldValueToBoolean(data[disableAppDEFieldId]);
4501
4660
  }
4661
+ if (clsAppDEFieldId) {
4662
+ result.textCls = data[clsAppDEFieldId];
4663
+ }
4664
+ if (colorAppDEFieldId) {
4665
+ result.color = data[colorAppDEFieldId];
4666
+ }
4502
4667
  if (dataAppDEFieldId && data[dataAppDEFieldId]) {
4503
4668
  try {
4504
4669
  result.data = ScriptFactory.execSingleLine(
@@ -4762,8 +4927,18 @@ var DECache = class {
4762
4927
  entity.srfkey = createUUID2();
4763
4928
  }
4764
4929
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4765
- this.cacheMap.set(entity.srfkey, clone4(entity));
4766
- ibiz.log.warn("add", entity.srfkey, entity);
4930
+ const commit = () => {
4931
+ this.cacheMap.set(entity.srfkey, clone4(entity));
4932
+ ibiz.log.warn("add", entity.srfkey, entity);
4933
+ };
4934
+ const t = this.getTransaction(context);
4935
+ if (t) {
4936
+ t.change(entity.srfkey, () => {
4937
+ commit();
4938
+ });
4939
+ } else {
4940
+ commit();
4941
+ }
4767
4942
  return entity;
4768
4943
  } catch (err) {
4769
4944
  ibiz.log.error(err);
@@ -4813,10 +4988,25 @@ var DECache = class {
4813
4988
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4814
4989
  const data = this.cacheMap.get(oldKey);
4815
4990
  if (data) {
4816
- data.assign(entity);
4817
- this.cacheMap.set(oldKey, data);
4818
- ibiz.log.warn("update", oldKey, entity);
4819
- return clone4(data);
4991
+ const _data = clone4(data);
4992
+ _data.assign(entity);
4993
+ const commit = () => {
4994
+ data.assign(entity);
4995
+ if (oldKey !== entity.srfkey) {
4996
+ this.cacheMap.delete(oldKey);
4997
+ }
4998
+ this.cacheMap.set(entity.srfkey, data);
4999
+ ibiz.log.warn("update", entity.srfkey, entity);
5000
+ };
5001
+ const t = this.getTransaction(context);
5002
+ if (t) {
5003
+ t.change(entity.srfkey, () => {
5004
+ commit();
5005
+ });
5006
+ } else {
5007
+ commit();
5008
+ }
5009
+ return _data;
4820
5010
  }
4821
5011
  throw new Error("\u6570\u636E\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!");
4822
5012
  } catch (err) {
@@ -4838,9 +5028,18 @@ var DECache = class {
4838
5028
  const key = srfKey;
4839
5029
  if (this.cacheMap.has(key)) {
4840
5030
  const data = this.cacheMap.get(key);
4841
- data.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4842
- this.cacheMap.delete(key);
4843
- ibiz.log.warn("delete", key);
5031
+ const commit = () => {
5032
+ this.cacheMap.delete(key);
5033
+ ibiz.log.warn("delete", key);
5034
+ };
5035
+ const t = this.getTransaction(context);
5036
+ if (t) {
5037
+ t.change(key, () => {
5038
+ commit();
5039
+ });
5040
+ } else {
5041
+ commit();
5042
+ }
4844
5043
  return data;
4845
5044
  }
4846
5045
  return null;
@@ -4861,6 +5060,11 @@ var DECache = class {
4861
5060
  createBatch(context, entities) {
4862
5061
  try {
4863
5062
  isExistSessionId("add", context);
5063
+ const commit = (entity) => {
5064
+ this.cacheMap.set(entity.srfkey, entity);
5065
+ ibiz.log.warn("add", entity.srfkey, entity);
5066
+ };
5067
+ const t = this.getTransaction(context);
4864
5068
  for (let i = 0; i < entities.length; i++) {
4865
5069
  const entity = entities[i];
4866
5070
  if (isNil5(entity.srfkey) || isEmpty5(entity.srfkey)) {
@@ -4868,9 +5072,13 @@ var DECache = class {
4868
5072
  }
4869
5073
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4870
5074
  const data = clone4(entity);
4871
- this.cacheMap.set(entity.srfkey, data);
4872
- entities[i] = data;
4873
- ibiz.log.warn("add", entity.srfkey, entity);
5075
+ if (t) {
5076
+ t.change(data.srfkey, () => {
5077
+ commit(data);
5078
+ });
5079
+ } else {
5080
+ commit(data);
5081
+ }
4874
5082
  }
4875
5083
  return entities;
4876
5084
  } catch (err) {
@@ -4890,16 +5098,41 @@ var DECache = class {
4890
5098
  updateBatch(context, entities) {
4891
5099
  try {
4892
5100
  isExistSessionId("update", context);
5101
+ const commit = (entity, oldKey) => {
5102
+ if (oldKey !== entity.srfkey) {
5103
+ this.cacheMap.delete(oldKey);
5104
+ }
5105
+ this.cacheMap.set(entity.srfkey, entity);
5106
+ ibiz.log.warn("update", entity.srfkey, entity);
5107
+ };
5108
+ const t = this.getTransaction(context);
4893
5109
  for (let i = 0; i < entities.length; i++) {
4894
5110
  const entity = entities[i];
4895
5111
  isExistSrfKey("update", entity);
5112
+ const oldKey = entity.srfkey;
5113
+ if (this.isUnionKey) {
5114
+ this.calcUnionKey(entity);
5115
+ if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
5116
+ throw new RuntimeError14(
5117
+ "\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
5118
+ );
5119
+ }
5120
+ }
4896
5121
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
4897
5122
  const data = this.cacheMap.get(entity.srfkey);
4898
5123
  if (data) {
4899
- data.assign(entity);
4900
- this.cacheMap.set(entity.srfkey, data);
4901
- ibiz.log.warn("update", entity.srfkey, entity);
4902
- entities[i] = clone4(data);
5124
+ const _data = clone4(data);
5125
+ _data.assign(entity);
5126
+ entities[i] = _data;
5127
+ if (t) {
5128
+ t.change(entity.srfkey, () => {
5129
+ data.assign(entity);
5130
+ commit(data, oldKey);
5131
+ });
5132
+ } else {
5133
+ data.assign(entity);
5134
+ commit(data, oldKey);
5135
+ }
4903
5136
  } else {
4904
5137
  throw new Error(
4905
5138
  "\u6570\u636E[".concat(entity.srfdename, "-").concat(entity.srfmajortext, "(").concat(entity.srfkey, ")]\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!")
@@ -4940,10 +5173,20 @@ var DECache = class {
4940
5173
  "\u672A\u627E\u5230\u4EE5\u4E0B\u6570\u636E\u300C".concat(notRemoveKeys.join("\u3001"), "\u300D\uFF0C\u65E0\u6CD5\u5220\u9664!")
4941
5174
  );
4942
5175
  }
4943
- for (let i = 0; i < srfKeys.length; i++) {
4944
- const key = srfKeys[i];
5176
+ const commit = (key) => {
4945
5177
  this.cacheMap.delete(key);
4946
5178
  ibiz.log.warn("delete", key);
5179
+ };
5180
+ const t = this.getTransaction(context);
5181
+ for (let i = 0; i < srfKeys.length; i++) {
5182
+ const key = srfKeys[i];
5183
+ if (t) {
5184
+ t.change(key, () => {
5185
+ commit(key);
5186
+ });
5187
+ } else {
5188
+ commit(key);
5189
+ }
4947
5190
  }
4948
5191
  return [];
4949
5192
  }
@@ -5022,6 +5265,22 @@ var DECache = class {
5022
5265
  });
5023
5266
  data.srfkey = unionValues.join("||");
5024
5267
  }
5268
+ /**
5269
+ * 根据上下文,获取已经开启的事务
5270
+ *
5271
+ * @author chitanda
5272
+ * @date 2024-01-17 15:01:28
5273
+ * @protected
5274
+ * @param {IContext} context
5275
+ * @return {*} {(ITransaction | null)}
5276
+ */
5277
+ getTransaction(context) {
5278
+ const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
5279
+ if (uiDomain && uiDomain.transaction.state.isOpen === true) {
5280
+ return uiDomain.transaction;
5281
+ }
5282
+ return null;
5283
+ }
5025
5284
  };
5026
5285
 
5027
5286
  // src/service/utils/res-path/res-path.ts
@@ -5437,7 +5696,8 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
5437
5696
  // src/service/service/entity/de.service.ts
5438
5697
  import {
5439
5698
  ModelError as ModelError7,
5440
- RuntimeError as RuntimeError17
5699
+ RuntimeError as RuntimeError17,
5700
+ RuntimeModelError as RuntimeModelError10
5441
5701
  } from "@ibiz-template/core";
5442
5702
 
5443
5703
  // src/service/service/work-flow/work-flow.service.ts
@@ -6148,12 +6408,6 @@ var MethodDto = class {
6148
6408
  * @return {*} {Promise<IDataEntity[]>}
6149
6409
  */
6150
6410
  async sets(context, data) {
6151
- const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
6152
- if (uiDomain && uiDomain.state.rsInit !== true) {
6153
- await this.calcRs(context);
6154
- uiDomain.calcParentRs();
6155
- uiDomain.state.rsInit = true;
6156
- }
6157
6411
  return Promise.all(
6158
6412
  data.map(async (datum) => {
6159
6413
  const all = this.fields.filter((field) => field.type === "DTOS").map(async (field) => {
@@ -6195,7 +6449,6 @@ var MethodDto = class {
6195
6449
  *
6196
6450
  * @author chitanda
6197
6451
  * @date 2023-12-26 16:12:13
6198
- * @protected
6199
6452
  * @param {IContext} context
6200
6453
  * @param {number} [depth=0] 递归层级,避免进入死循环。最大递归层级为 10
6201
6454
  * @return {*} {Promise<void>}
@@ -6312,6 +6565,9 @@ var DEService = class {
6312
6565
  return this.methodMap.get(cacheId);
6313
6566
  }
6314
6567
  const model = findModelChild(this.model.appDEMethods, id);
6568
+ if (!model) {
6569
+ throw new RuntimeModelError10(this.model, "\u672A\u627E\u5230\u670D\u52A1\u65B9\u6CD5: ".concat(id));
6570
+ }
6315
6571
  const provider = await getDEMethodProvider(model);
6316
6572
  if (!provider) {
6317
6573
  throw new ModelError7(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
@@ -7172,9 +7428,13 @@ var V7AuthService = class {
7172
7428
  const token = getCookie(CoreConst.TOKEN);
7173
7429
  const expirein = getCookie(CoreConst.TOKEN_EXPIRES);
7174
7430
  const remember = getCookie(CoreConst.TOKEN_REMEMBER);
7431
+ const refreshToken = getCookie(CoreConst.REFRESH_TOKEN);
7175
7432
  setCookie(CoreConst.TOKEN, token, 0, true);
7176
7433
  setCookie(CoreConst.TOKEN_EXPIRES, expirein, 0, true);
7177
7434
  setCookie(CoreConst.TOKEN_REMEMBER, remember, 0, true);
7435
+ if (refreshToken) {
7436
+ setCookie(CoreConst.REFRESH_TOKEN, refreshToken, 0, true);
7437
+ }
7178
7438
  }
7179
7439
  return result;
7180
7440
  }
@@ -7187,17 +7447,21 @@ var V7AuthService = class {
7187
7447
  });
7188
7448
  const { data } = res;
7189
7449
  if (data && data.token) {
7450
+ const cacheDays = remember ? 7 : 0;
7190
7451
  if (remember) {
7191
- setCookie(CoreConst.TOKEN_REMEMBER, "1", 7, true);
7452
+ setCookie(CoreConst.TOKEN_REMEMBER, "1", cacheDays, true);
7192
7453
  }
7193
- setCookie(CoreConst.TOKEN, data.token, remember ? 7 : 0, true);
7454
+ setCookie(CoreConst.TOKEN, data.token, cacheDays, true);
7194
7455
  const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
7195
- setCookie(
7196
- CoreConst.TOKEN_EXPIRES,
7197
- "".concat(expiredDate),
7198
- remember ? 7 : 0,
7199
- true
7200
- );
7456
+ setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDays, true);
7457
+ if (data.refresh_token) {
7458
+ setCookie(
7459
+ CoreConst.REFRESH_TOKEN,
7460
+ data.refresh_token,
7461
+ cacheDays,
7462
+ true
7463
+ );
7464
+ }
7201
7465
  clearCookie(CoreConst.IS_ANONYMOUS);
7202
7466
  }
7203
7467
  return true;
@@ -7215,6 +7479,7 @@ var V7AuthService = class {
7215
7479
  clearCookie(CoreConst.TOKEN);
7216
7480
  clearCookie(CoreConst.TOKEN_EXPIRES);
7217
7481
  clearCookie(CoreConst.TOKEN_REMEMBER);
7482
+ clearCookie(CoreConst.REFRESH_TOKEN);
7218
7483
  clearCookie(CoreConst.IS_ANONYMOUS);
7219
7484
  ibiz.appData = void 0;
7220
7485
  ibiz.orgData = void 0;
@@ -7233,22 +7498,32 @@ var V7AuthService = class {
7233
7498
  }
7234
7499
  const token = getCookie(CoreConst.TOKEN);
7235
7500
  const expirein = getCookie(CoreConst.TOKEN_EXPIRES);
7236
- const remember = getCookie(CoreConst.TOKEN_REMEMBER);
7237
7501
  if (token && expirein) {
7238
7502
  let wait = Number(expirein) - (/* @__PURE__ */ new Date()).getTime();
7239
7503
  const early = 5 * 60 * 1e3;
7240
7504
  wait = wait > early ? wait - early : 0;
7241
7505
  setTimeout(async () => {
7242
- const res = await ibiz.net.get("/uaa/refreshtoken2");
7506
+ const remember = getCookie(CoreConst.TOKEN_REMEMBER);
7507
+ const refreshToken = getCookie(CoreConst.REFRESH_TOKEN);
7508
+ const cacheDay = remember ? 7 : 0;
7509
+ let res;
7510
+ if (refreshToken != null && refreshToken !== "") {
7511
+ res = await ibiz.net.get("/uaa/refresh_token/".concat(refreshToken));
7512
+ } else {
7513
+ res = await ibiz.net.get("/uaa/refreshtoken2");
7514
+ }
7243
7515
  if (res.ok) {
7244
- setCookie(CoreConst.TOKEN, res.data.token, remember ? 7 : 0, true);
7516
+ setCookie(CoreConst.TOKEN, res.data.token, cacheDay, true);
7245
7517
  const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (res.data.expirein || 7199) * 1e3;
7246
- setCookie(
7247
- CoreConst.TOKEN_EXPIRES,
7248
- "".concat(expiredDate),
7249
- remember ? 7 : 0,
7250
- true
7251
- );
7518
+ setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDay, true);
7519
+ if (res.data.refresh_token) {
7520
+ setCookie(
7521
+ CoreConst.REFRESH_TOKEN,
7522
+ res.data.refresh_token,
7523
+ cacheDay,
7524
+ true
7525
+ );
7526
+ }
7252
7527
  }
7253
7528
  this.extendLogin();
7254
7529
  }, wait);
@@ -7299,12 +7574,14 @@ import {
7299
7574
  HttpError as HttpError5,
7300
7575
  HttpResponse as HttpResponse3,
7301
7576
  RuntimeError as RuntimeError21,
7302
- RuntimeModelError as RuntimeModelError21
7577
+ RuntimeModelError as RuntimeModelError22
7303
7578
  } from "@ibiz-template/core";
7304
7579
  import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
7580
+ import { ascSort } from "qx-util";
7581
+ import { clone as clone14 } from "ramda";
7305
7582
 
7306
7583
  // src/service/service/entity/method/method.ts
7307
- import { RuntimeModelError as RuntimeModelError10 } from "@ibiz-template/core";
7584
+ import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
7308
7585
 
7309
7586
  // src/service/service/entity/method/method-input.ts
7310
7587
  var MethodInput = class {
@@ -7396,10 +7673,19 @@ var MethodReturn = class {
7396
7673
  async handle(context, data) {
7397
7674
  if (this.dto) {
7398
7675
  const app = ibiz.hub.getApp(this.entity.appId);
7399
- app.deService.clearTempCache({
7400
- srfappid: app.appId,
7401
- srfsessionid: context.srfsessionid
7402
- });
7676
+ const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
7677
+ if (uiDomain && uiDomain.state.rsInit !== true) {
7678
+ await this.dto.calcRs(context);
7679
+ uiDomain.calcParentRs();
7680
+ uiDomain.state.rsInit = true;
7681
+ }
7682
+ app.deService.clearTempCacheByRs(
7683
+ {
7684
+ srfappid: app.appId,
7685
+ srfsessionid: context.srfsessionid
7686
+ },
7687
+ this.entity.id
7688
+ );
7403
7689
  const items = await this.dto.sets(context, [data]);
7404
7690
  return items[0];
7405
7691
  }
@@ -7475,17 +7761,17 @@ var Method = class {
7475
7761
  break;
7476
7762
  default:
7477
7763
  if (requestMethod) {
7478
- throw new RuntimeModelError10(
7764
+ throw new RuntimeModelError11(
7479
7765
  this.method,
7480
7766
  "\u672A\u652F\u6301\u7684\u8BF7\u6C42\u65B9\u5F0F: ".concat(requestMethod)
7481
7767
  );
7482
7768
  } else {
7483
- throw new RuntimeModelError10(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
7769
+ throw new RuntimeModelError11(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
7484
7770
  }
7485
7771
  }
7486
7772
  return res;
7487
7773
  }
7488
- throw new RuntimeModelError10(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
7774
+ throw new RuntimeModelError11(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
7489
7775
  }
7490
7776
  mergeRequestPath(path2, methodName) {
7491
7777
  return "".concat(path2, "/").concat(methodName);
@@ -7523,7 +7809,7 @@ import { isArray as isArray5 } from "lodash-es";
7523
7809
  import { clone as clone13 } from "ramda";
7524
7810
 
7525
7811
  // src/de-logic/de-logic.ts
7526
- import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
7812
+ import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
7527
7813
 
7528
7814
  // src/de-logic/de-logic-context.ts
7529
7815
  import { isArray as isArray4 } from "lodash-es";
@@ -7655,17 +7941,17 @@ var DELogicContext = class {
7655
7941
  };
7656
7942
 
7657
7943
  // src/de-logic/de-logic-node/de-action-node/de-action-node.ts
7658
- import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
7944
+ import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
7659
7945
 
7660
7946
  // src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts
7661
- import { RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
7947
+ import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
7662
7948
 
7663
7949
  // src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts
7664
7950
  var DELogicLinkCond = class {
7665
7951
  };
7666
7952
 
7667
7953
  // src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts
7668
- import { ModelError as ModelError8, RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
7954
+ import { ModelError as ModelError8, RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
7669
7955
  var DELogicLinkSingleCond = class extends DELogicLinkCond {
7670
7956
  constructor(model) {
7671
7957
  super();
@@ -7712,7 +7998,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
7712
7998
  switch (this.type) {
7713
7999
  case "ENTITYFIELD": {
7714
8000
  if (!this.value) {
7715
- throw new RuntimeModelError11(
8001
+ throw new RuntimeModelError12(
7716
8002
  this.model,
7717
8003
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
7718
8004
  );
@@ -7722,7 +8008,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
7722
8008
  }
7723
8009
  case "SRCENTITYFIELD": {
7724
8010
  if (!this.value) {
7725
- throw new RuntimeModelError11(
8011
+ throw new RuntimeModelError12(
7726
8012
  this.model,
7727
8013
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
7728
8014
  );
@@ -7785,7 +8071,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
7785
8071
  test(ctx, context, data) {
7786
8072
  let bol = true;
7787
8073
  if (this.conds.length === 0) {
7788
- throw new RuntimeModelError12(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
8074
+ throw new RuntimeModelError13(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
7789
8075
  }
7790
8076
  for (let i = 0; i < this.conds.length; i++) {
7791
8077
  const cond = this.conds[i];
@@ -7888,10 +8174,10 @@ var DEActionNode = class extends DELogicNode {
7888
8174
  retDELogicParamId
7889
8175
  } = this.model;
7890
8176
  if (!dstAppDataEntityId) {
7891
- throw new RuntimeModelError13(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
8177
+ throw new RuntimeModelError14(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
7892
8178
  }
7893
8179
  if (!dstAppDEActionId) {
7894
- throw new RuntimeModelError13(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
8180
+ throw new RuntimeModelError14(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
7895
8181
  }
7896
8182
  const requestData = ctx.params[dstDELogicParamId];
7897
8183
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -8184,12 +8470,12 @@ var DataSetNode = class extends DELogicNode {
8184
8470
  };
8185
8471
 
8186
8472
  // src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts
8187
- import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
8473
+ import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
8188
8474
  var BindParamNode = class extends DELogicNode {
8189
8475
  async exec(ctx) {
8190
8476
  const { dstDELogicParamId, srcDELogicParamId } = this.model;
8191
8477
  if (!dstDELogicParamId || !srcDELogicParamId) {
8192
- throw new RuntimeModelError14(
8478
+ throw new RuntimeModelError15(
8193
8479
  this.model,
8194
8480
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
8195
8481
  );
@@ -8200,37 +8486,37 @@ var BindParamNode = class extends DELogicNode {
8200
8486
  };
8201
8487
 
8202
8488
  // src/de-logic/de-logic-node/reset-param-node/reset-param-node.ts
8203
- import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
8489
+ import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
8204
8490
  var ResetParamNode = class extends DELogicNode {
8205
8491
  async exec(ctx) {
8206
8492
  const { dstDELogicParamId } = this.model;
8207
8493
  if (!dstDELogicParamId) {
8208
- throw new RuntimeModelError15(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8494
+ throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8209
8495
  }
8210
8496
  ctx.resetParam(dstDELogicParamId);
8211
8497
  }
8212
8498
  };
8213
8499
 
8214
8500
  // src/de-logic/de-logic-node/renew-param-node/renew-param-node.ts
8215
- import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
8501
+ import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
8216
8502
  var RenewParamNode = class extends DELogicNode {
8217
8503
  async exec(ctx) {
8218
8504
  const { dstDELogicParamId } = this.model;
8219
8505
  if (!dstDELogicParamId) {
8220
- throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8506
+ throw new RuntimeModelError17(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8221
8507
  }
8222
8508
  ctx.renewParam(dstDELogicParamId);
8223
8509
  }
8224
8510
  };
8225
8511
 
8226
8512
  // src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
8227
- import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
8513
+ import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
8228
8514
  import { clone as clone11 } from "ramda";
8229
8515
  var CopyParamNode = class extends DELogicNode {
8230
8516
  async exec(ctx) {
8231
8517
  const { dstDELogicParamId, srcDELogicParamId } = this.model;
8232
8518
  if (!dstDELogicParamId || !srcDELogicParamId) {
8233
- throw new RuntimeModelError17(
8519
+ throw new RuntimeModelError18(
8234
8520
  this.model,
8235
8521
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
8236
8522
  );
@@ -8241,12 +8527,12 @@ var CopyParamNode = class extends DELogicNode {
8241
8527
  };
8242
8528
 
8243
8529
  // src/de-logic/de-logic-node/sort-param-node/sort-param-node.ts
8244
- import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
8530
+ import { RuntimeModelError as RuntimeModelError19 } from "@ibiz-template/core";
8245
8531
  var SortParamNode = class extends DELogicNode {
8246
8532
  async exec(ctx) {
8247
8533
  const { dstDELogicParamId, dstSortDir, dstFieldName } = this.model;
8248
8534
  if (!dstDELogicParamId || !dstFieldName) {
8249
- throw new RuntimeModelError18(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
8535
+ throw new RuntimeModelError19(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
8250
8536
  }
8251
8537
  const key = dstFieldName.toLowerCase();
8252
8538
  const arr = ctx.params[dstDELogicParamId];
@@ -8257,7 +8543,7 @@ var SortParamNode = class extends DELogicNode {
8257
8543
  };
8258
8544
 
8259
8545
  // src/de-logic/de-logic-node/append-param-node/append-param-node.ts
8260
- import { RuntimeModelError as RuntimeModelError19 } from "@ibiz-template/core";
8546
+ import { RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
8261
8547
  var AppendParamNode = class extends DELogicNode {
8262
8548
  async exec(ctx) {
8263
8549
  const {
@@ -8268,7 +8554,7 @@ var AppendParamNode = class extends DELogicNode {
8268
8554
  srcSize
8269
8555
  } = this.model;
8270
8556
  if (!dstDELogicParamId || !srcDELogicParamId) {
8271
- throw new RuntimeModelError19(
8557
+ throw new RuntimeModelError20(
8272
8558
  this.model,
8273
8559
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
8274
8560
  );
@@ -8417,7 +8703,7 @@ var DELogic = class {
8417
8703
  var _a, _b;
8418
8704
  if (model.customCode) {
8419
8705
  if (!model.scriptCode) {
8420
- throw new RuntimeModelError20(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
8706
+ throw new RuntimeModelError21(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
8421
8707
  }
8422
8708
  this.scriptFn = ScriptFactory.createScriptFn([], model.scriptCode, {
8423
8709
  isAsync: true
@@ -8425,7 +8711,7 @@ var DELogic = class {
8425
8711
  return;
8426
8712
  }
8427
8713
  if (!((_a = model.delogicNodes) == null ? void 0 : _a.length)) {
8428
- throw new RuntimeModelError20(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
8714
+ throw new RuntimeModelError21(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
8429
8715
  }
8430
8716
  model.delogicNodes.forEach((node) => {
8431
8717
  const { logicNodeType } = node;
@@ -8524,7 +8810,7 @@ var DELogic = class {
8524
8810
  const start = this.nodes.get(startDELogicNodeId);
8525
8811
  await this.deepExec(start, ctx);
8526
8812
  } else {
8527
- throw new RuntimeModelError20(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
8813
+ throw new RuntimeModelError21(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
8528
8814
  }
8529
8815
  if (ctx.isEndNode) {
8530
8816
  return ctx.result;
@@ -8643,66 +8929,64 @@ var DEActionMethod = class extends Method {
8643
8929
  return this.input.handle(context, data);
8644
8930
  }
8645
8931
  async exec(context, data, params) {
8646
- if (data) {
8932
+ let result;
8933
+ if (data && !["READ", "GETDRAFT"].includes(this.method.actionMode)) {
8647
8934
  await execFieldLogics(this.entity, "change", context, data, params);
8648
8935
  }
8649
8936
  if (this.method.actionType === "DELOGIC") {
8650
8937
  const deLogic = findDELogic(this.method.appDELogicId, this.entity);
8651
8938
  if (!deLogic) {
8652
- throw new RuntimeModelError21(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
8939
+ throw new RuntimeModelError22(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
8653
8940
  }
8654
- return execDELogicAction(deLogic, context, data, params);
8655
- }
8656
- if (data && !this.isLocalMode) {
8657
- data = await this.inputHandle(context, data);
8658
- }
8659
- if (data && !["READ", "GETDRAFT"].includes(this.method.actionMode)) {
8660
- await execFieldLogics(this.entity, "change", context, data, params);
8661
- }
8662
- let result;
8663
- switch (this.method.codeName) {
8664
- case "Create":
8665
- result = await this.create(context, data, params || {});
8666
- break;
8667
- case "Get":
8668
- result = await this.get(context, params);
8669
- break;
8670
- case "GetDraft":
8671
- result = await this.getDraft(context, params);
8672
- break;
8673
- case "Remove":
8674
- result = await this.remove(context, params);
8675
- break;
8676
- case "Update":
8677
- result = await this.update(context, data, params);
8678
- break;
8679
- case "CreateTemp":
8680
- result = await this.createTemp(context, data);
8681
- break;
8682
- case "GetTemp":
8683
- result = await this.getTemp(context, data);
8684
- break;
8685
- case "GetDraftTemp":
8686
- result = await this.getDraftTemp(context, params);
8687
- break;
8688
- case "RemoveTemp":
8689
- result = await this.removeTemp(context, data);
8690
- break;
8691
- case "UpdateTemp":
8692
- result = await this.updateTemp(context, data);
8693
- break;
8694
- default: {
8695
- let path2 = this.calcPath(context);
8696
- if (this.method.needResourceKey) {
8697
- let srfkey = context[this.entity.codeName.toLowerCase()];
8698
- if (isNil10(srfkey)) {
8699
- srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
8941
+ result = await execDELogicAction(deLogic, context, data, params);
8942
+ } else {
8943
+ if (data && !this.isLocalMode) {
8944
+ data = await this.inputHandle(context, data);
8945
+ }
8946
+ switch (this.method.codeName) {
8947
+ case "Create":
8948
+ result = await this.create(context, data, params || {});
8949
+ break;
8950
+ case "Get":
8951
+ result = await this.get(context, params);
8952
+ break;
8953
+ case "GetDraft":
8954
+ result = await this.getDraft(context, params);
8955
+ break;
8956
+ case "Remove":
8957
+ result = await this.remove(context, params);
8958
+ break;
8959
+ case "Update":
8960
+ result = await this.update(context, data, params);
8961
+ break;
8962
+ case "CreateTemp":
8963
+ result = await this.createTemp(context, data);
8964
+ break;
8965
+ case "GetTemp":
8966
+ result = await this.getTemp(context, data);
8967
+ break;
8968
+ case "GetDraftTemp":
8969
+ result = await this.getDraftTemp(context, params);
8970
+ break;
8971
+ case "RemoveTemp":
8972
+ result = await this.removeTemp(context, data);
8973
+ break;
8974
+ case "UpdateTemp":
8975
+ result = await this.updateTemp(context, data);
8976
+ break;
8977
+ default: {
8978
+ let path2 = this.calcPath(context);
8979
+ if (this.method.needResourceKey) {
8980
+ let srfkey = context[this.entity.codeName.toLowerCase()];
8981
+ if (isNil10(srfkey)) {
8982
+ srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
8983
+ }
8984
+ path2 = "".concat(path2, "/").concat(srfkey);
8700
8985
  }
8701
- path2 = "".concat(path2, "/").concat(srfkey);
8986
+ const res = await this.request(path2, context, data, params);
8987
+ res.data = await this.result.handle(context, res.data);
8988
+ result = res;
8702
8989
  }
8703
- const res = await this.request(path2, context, data, params);
8704
- res.data = await this.result.handle(context, res.data);
8705
- result = res;
8706
8990
  }
8707
8991
  }
8708
8992
  if (result.data) {
@@ -8890,6 +9174,13 @@ var DEActionMethod = class extends Method {
8890
9174
  if (!key && context) {
8891
9175
  key = context[this.entity.codeName.toLowerCase()];
8892
9176
  }
9177
+ try {
9178
+ await this.associationDeletion(key, context, params);
9179
+ } catch (error) {
9180
+ throw new HttpError5({
9181
+ response: new HttpResponse3(null, 500, error.message)
9182
+ });
9183
+ }
8893
9184
  const data = this.service.local.delete(context, key);
8894
9185
  if (data) {
8895
9186
  return new HttpResponse3(data);
@@ -8899,6 +9190,100 @@ var DEActionMethod = class extends Method {
8899
9190
  throw new HttpError5(err);
8900
9191
  }
8901
9192
  }
9193
+ /**
9194
+ * 关联删除
9195
+ *
9196
+ * @author chitanda
9197
+ * @date 2024-01-17 16:01:47
9198
+ * @protected
9199
+ * @param {string} key
9200
+ * @param {IContext} context
9201
+ * @param {IParams} [params]
9202
+ * @return {*} {Promise<void>}
9203
+ */
9204
+ async associationDeletion(key, context, _params) {
9205
+ const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
9206
+ const t = uiDomain.transaction;
9207
+ let selfOpenTransaction = false;
9208
+ if (t.state.isOpen === false) {
9209
+ t.open();
9210
+ selfOpenTransaction = true;
9211
+ }
9212
+ try {
9213
+ let configs = uiDomain.getDERConfigByMajor(this.entity.id);
9214
+ if (configs.length > 0) {
9215
+ const data = this.service.local.get(context, key);
9216
+ configs = ascSort(configs, "removeOrder");
9217
+ for (const config of configs) {
9218
+ if (config.rstype !== "DER1N") {
9219
+ throw new RuntimeModelError22(
9220
+ config,
9221
+ "\u76EE\u524D\u53EA\u652F\u6301[DER1N]\u5173\u7CFB\u7C7B\u578B\u5173\u8054\u5220\u9664\u5220\u9664"
9222
+ );
9223
+ }
9224
+ const {
9225
+ removeActionType,
9226
+ removeRejectMsg,
9227
+ minorAppDataEntityId,
9228
+ nestedAppDEDataSetId = "FetchDefault"
9229
+ } = config;
9230
+ const app = ibiz.hub.getApp(this.entity.appId);
9231
+ const minorService = await app.deService.getService(
9232
+ context,
9233
+ minorAppDataEntityId
9234
+ );
9235
+ const _context = clone14(context);
9236
+ _context[this.entity.codeName.toLowerCase()] = key;
9237
+ const res = await minorService.exec(nestedAppDEDataSetId, _context);
9238
+ const items = res.data || [];
9239
+ switch (removeActionType) {
9240
+ case 1: {
9241
+ for (let i = 0; i < items.length; i++) {
9242
+ const item = items[i];
9243
+ _context[minorService.model.codeName.toLowerCase()] = item.srfkey;
9244
+ const res2 = await minorService.remove(_context, item);
9245
+ if (res2.ok === false) {
9246
+ throw new Error(res2.statusText);
9247
+ }
9248
+ }
9249
+ break;
9250
+ }
9251
+ case 2:
9252
+ for (let i = 0; i < items.length; i++) {
9253
+ const item = items[i];
9254
+ _context[minorService.model.codeName.toLowerCase()] = item.srfkey;
9255
+ item[config.parentAppDEFieldId.toLowerCase()] = void 0;
9256
+ const res2 = await minorService.updateTemp(_context, item);
9257
+ if (res2.ok === false) {
9258
+ throw new Error(res2.statusText);
9259
+ }
9260
+ }
9261
+ break;
9262
+ case 3:
9263
+ if (items.length > 0) {
9264
+ const msg = items.map((item) => item.srfmajortext).join("\u3001");
9265
+ const message = "\u65E0\u6CD5\u5220\u9664[".concat(this.entity.logicName, "-").concat(data.srfmajortext, "], \u6570\u636E\u88AB[").concat(minorService.model.logicName, "-").concat(msg, "]\u5F15\u7528");
9266
+ throw new Error(removeRejectMsg || message);
9267
+ }
9268
+ break;
9269
+ default:
9270
+ }
9271
+ }
9272
+ }
9273
+ if (selfOpenTransaction && t.state.isOpen) {
9274
+ t.commit();
9275
+ }
9276
+ } catch (error) {
9277
+ if (selfOpenTransaction && t.state.isOpen) {
9278
+ t.rollback();
9279
+ }
9280
+ throw error;
9281
+ } finally {
9282
+ if (selfOpenTransaction && t.state.isOpen) {
9283
+ t.close();
9284
+ }
9285
+ }
9286
+ }
8902
9287
  /**
8903
9288
  * 更新临时数据
8904
9289
  *
@@ -9012,21 +9397,19 @@ var DeActionDeMethodProvider = class {
9012
9397
  import {
9013
9398
  HttpResponse as HttpResponse4,
9014
9399
  ModelError as ModelError14,
9015
- RuntimeModelError as RuntimeModelError22
9400
+ RuntimeModelError as RuntimeModelError23
9016
9401
  } from "@ibiz-template/core";
9017
9402
  import { isArray as isArray7 } from "lodash-es";
9018
- import { clone as clone14, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
9019
- import { ascSort, descSort } from "qx-util";
9403
+ import { clone as clone15, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
9404
+ import { ascSort as ascSort2, descSort } from "qx-util";
9020
9405
  var FetchMethod = class extends Method {
9021
9406
  async exec(context, params, params2) {
9022
9407
  const searchParams = params && !isArray7(params) ? params : params2 || {};
9023
9408
  let res;
9024
9409
  if (this.isLocalMode) {
9025
9410
  const cond = DEDQCondUtil.getCond(this.method);
9026
- const items = await this.searchLocal(
9027
- cond,
9028
- new SearchFilter(context, searchParams)
9029
- );
9411
+ const filter = new SearchFilter(context, searchParams);
9412
+ const items = await this.searchLocal(cond, filter);
9030
9413
  res = new HttpResponse4(items, 200);
9031
9414
  } else {
9032
9415
  switch (this.method.dataSetType) {
@@ -9098,13 +9481,13 @@ var FetchMethod = class extends Method {
9098
9481
  if (filter.sortMode === "DESC") {
9099
9482
  list = descSort(list, filter.sortField);
9100
9483
  } else {
9101
- list = ascSort(list, filter.sortField);
9484
+ list = ascSort2(list, filter.sortField);
9102
9485
  }
9103
9486
  }
9104
9487
  const { page, size } = filter;
9105
9488
  const start = page * size;
9106
9489
  const end = (page + 1) * size - 1;
9107
- const items = list.slice(start, end).map((item) => clone14(item));
9490
+ const items = list.slice(start, end).map((item) => clone15(item));
9108
9491
  return items;
9109
9492
  }
9110
9493
  /**
@@ -9118,7 +9501,7 @@ var FetchMethod = class extends Method {
9118
9501
  async fetchCodeListSet(context, params) {
9119
9502
  const { appCodeListId } = this.method;
9120
9503
  if (!appCodeListId) {
9121
- throw new RuntimeModelError22(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
9504
+ throw new RuntimeModelError23(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
9122
9505
  }
9123
9506
  const codeItems = await this.app.codeList.get(
9124
9507
  appCodeListId,
@@ -9198,6 +9581,9 @@ var TreeNodeData = class {
9198
9581
  if (sysImage.imagePath) {
9199
9582
  icon.imagePath = sysImage.imagePath;
9200
9583
  }
9584
+ if (sysImage.rawContent) {
9585
+ icon.htmlStr = sysImage.rawContent;
9586
+ }
9201
9587
  }
9202
9588
  return Object.values(icon).length > 0 ? icon : void 0;
9203
9589
  }
@@ -9232,7 +9618,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
9232
9618
 
9233
9619
  // src/service/vo/tree-node-data/tree-data-set-node-data.ts
9234
9620
  import { updateKeyDefine } from "@ibiz-template/core";
9235
- import { clone as clone15, isNil as isNil12 } from "ramda";
9621
+ import { clone as clone16, isNil as isNil12 } from "ramda";
9236
9622
  var CloneExcludeKeys = ["_id", "_value", "_text", "_deData", "clone"];
9237
9623
  var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
9238
9624
  constructor(model, parentNodeData, opts) {
@@ -9313,7 +9699,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
9313
9699
  }
9314
9700
  };
9315
9701
  this.clone = () => {
9316
- const cloneData = clone15(this._deData);
9702
+ const cloneData = clone16(this._deData);
9317
9703
  const cloneNodeData = new _TreeDataSetNodeData(model, this._parent, {
9318
9704
  data: cloneData,
9319
9705
  leaf: this._leaf,
@@ -10088,6 +10474,42 @@ var _DEServiceUtil = class _DEServiceUtil {
10088
10474
  service.local.clear();
10089
10475
  });
10090
10476
  }
10477
+ /**
10478
+ * 清理指定实体的临时数据缓存,并根据关系清理掉子实体的临时数据缓存
10479
+ *
10480
+ * @author chitanda
10481
+ * @date 2024-01-19 14:01:32
10482
+ * @param {IContext} context
10483
+ * @param {string} entityID
10484
+ * @param {string[]} [clearEntities=[]] 已经清理过的实体忽略,避免关系循环引用导致死循环
10485
+ * @return {*} {void}
10486
+ */
10487
+ clearTempCacheByRs(context, entityID, clearEntities = []) {
10488
+ if (clearEntities.includes(entityID) === true) {
10489
+ return;
10490
+ }
10491
+ clearEntities.push(entityID);
10492
+ const sandboxId = context.srfsessionid;
10493
+ if (!this.cache.has(sandboxId)) {
10494
+ return;
10495
+ }
10496
+ const map = this.cache.get(sandboxId);
10497
+ const service = map.get(entityID);
10498
+ if (service) {
10499
+ service.local.clear();
10500
+ }
10501
+ const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
10502
+ if (uiDomain) {
10503
+ const configs = uiDomain.getDERConfigByMajor(entityID);
10504
+ configs.forEach((config) => {
10505
+ this.clearTempCacheByRs(
10506
+ context,
10507
+ config.minorAppDataEntityId,
10508
+ clearEntities
10509
+ );
10510
+ });
10511
+ }
10512
+ }
10091
10513
  /**
10092
10514
  * 执行服务方法
10093
10515
  * @author lxm
@@ -10131,7 +10553,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
10131
10553
  * @return {*} {(Promise<IModalData | void>)}
10132
10554
  */
10133
10555
  async exec(appViewId, _context, params = {}, opts = {}) {
10134
- const context = clone16(_context);
10556
+ const context = clone17(_context);
10135
10557
  const appView = await ibiz.hub.config.view.get(appViewId);
10136
10558
  if (!appView) {
10137
10559
  throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
@@ -11653,7 +12075,10 @@ async function exportData(header, data, fileName) {
11653
12075
  async function getEntitySchema(entityId, context) {
11654
12076
  const app = ibiz.hub.getApp(context.srfappid);
11655
12077
  const entity = await ibiz.hub.getAppDataEntity(entityId, context.srfappid);
11656
- const url = "/jsonschema/".concat(entity.name);
12078
+ let url = "/jsonschema/".concat(entity.name);
12079
+ if (entity.dynaSysMode === 0 && ibiz.appData) {
12080
+ url += "?dynamodeltag=".concat(ibiz.appData.dynamodeltag);
12081
+ }
11657
12082
  const res = await app.net.get(url);
11658
12083
  return res.data;
11659
12084
  }
@@ -11875,7 +12300,7 @@ var BaseController = class {
11875
12300
  };
11876
12301
 
11877
12302
  // src/controller/utils/view-msg/view-msg-controller.ts
11878
- import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError23 } from "@ibiz-template/core";
12303
+ import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
11879
12304
  import { isNil as isNil18, mergeRight as mergeRight2 } from "ramda";
11880
12305
  var ViewMsgController = class _ViewMsgController {
11881
12306
  constructor(msgGroupId) {
@@ -11940,7 +12365,7 @@ var ViewMsgController = class _ViewMsgController {
11940
12365
  static async fetchDataSet(msgModel, context, params) {
11941
12366
  const { appDataEntityId, appDEDataSetId } = msgModel;
11942
12367
  if (!appDEDataSetId) {
11943
- throw new RuntimeModelError23(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
12368
+ throw new RuntimeModelError24(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
11944
12369
  }
11945
12370
  const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
11946
12371
  if (res.data.length) {
@@ -12034,7 +12459,7 @@ var ViewMsgController = class _ViewMsgController {
12034
12459
  msgPosAppDEFieldId
12035
12460
  } = msgModel;
12036
12461
  if (!appDataEntityId) {
12037
- throw new RuntimeModelError23(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
12462
+ throw new RuntimeModelError24(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
12038
12463
  }
12039
12464
  const entity = await ibiz.hub.getAppDataEntity(
12040
12465
  appDataEntityId,
@@ -12291,6 +12716,7 @@ var ViewController = class extends BaseController {
12291
12716
  if (this.engines.length) {
12292
12717
  await Promise.all(this.engines.map((engine) => engine.onDestroyed()));
12293
12718
  }
12719
+ Object.values(this.counters).forEach((counter) => counter.destroy());
12294
12720
  this.ctx.destroy();
12295
12721
  this.engines = [];
12296
12722
  if (this.scheduler) {
@@ -12662,7 +13088,7 @@ var EditorController = class {
12662
13088
  };
12663
13089
 
12664
13090
  // src/controller/common/editor/code-list-editor.controller.ts
12665
- import { RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
13091
+ import { RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
12666
13092
  var CodeListEditorController = class extends EditorController {
12667
13093
  /**
12668
13094
  * 加载代码表数据
@@ -12686,7 +13112,7 @@ var CodeListEditorController = class extends EditorController {
12686
13112
  );
12687
13113
  return dataItems;
12688
13114
  }
12689
- throw new RuntimeModelError24(
13115
+ throw new RuntimeModelError25(
12690
13116
  this.model,
12691
13117
  "\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
12692
13118
  );
@@ -12695,7 +13121,7 @@ var CodeListEditorController = class extends EditorController {
12695
13121
 
12696
13122
  // src/controller/common/control/control.controller.ts
12697
13123
  import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
12698
- import { clone as clone17, isNil as isNil20 } from "ramda";
13124
+ import { clone as clone18, isNil as isNil20 } from "ramda";
12699
13125
  import { notNilEmpty as notNilEmpty7 } from "qx-util";
12700
13126
  var ControlController = class extends BaseController {
12701
13127
  /**
@@ -12737,7 +13163,7 @@ var ControlController = class extends BaseController {
12737
13163
  "".concat(model.controlType, "_DEFAULT")
12738
13164
  );
12739
13165
  if (panelModel) {
12740
- this.controlPanel = clone17(panelModel);
13166
+ this.controlPanel = clone18(panelModel);
12741
13167
  }
12742
13168
  }
12743
13169
  this.updateContextParams({});
@@ -13489,7 +13915,7 @@ var MDControlController = class extends ControlController {
13489
13915
  import {
13490
13916
  findRecursiveChild,
13491
13917
  RuntimeError as RuntimeError34,
13492
- RuntimeModelError as RuntimeModelError25
13918
+ RuntimeModelError as RuntimeModelError26
13493
13919
  } from "@ibiz-template/core";
13494
13920
  var AppMenuController = class extends ControlController {
13495
13921
  constructor(model, context, params, ctx) {
@@ -13568,7 +13994,7 @@ var AppMenuController = class extends ControlController {
13568
13994
  return provider.onClick(menuItem, event, this);
13569
13995
  }
13570
13996
  if (!menuItem.appFuncId) {
13571
- throw new RuntimeModelError25(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13997
+ throw new RuntimeModelError26(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13572
13998
  }
13573
13999
  const tempContext = this.context.clone();
13574
14000
  tempContext.srfappid = menuItem.appId;
@@ -13687,7 +14113,7 @@ var AppMenuController = class extends ControlController {
13687
14113
  import {
13688
14114
  findRecursiveChild as findRecursiveChild2,
13689
14115
  RuntimeError as RuntimeError35,
13690
- RuntimeModelError as RuntimeModelError26
14116
+ RuntimeModelError as RuntimeModelError27
13691
14117
  } from "@ibiz-template/core";
13692
14118
  var AppMenuIconViewController = class extends AppMenuController {
13693
14119
  async onClickMenuItem(id, event) {
@@ -13703,7 +14129,7 @@ var AppMenuIconViewController = class extends AppMenuController {
13703
14129
  event
13704
14130
  });
13705
14131
  if (!menuItem.appFuncId) {
13706
- throw new RuntimeModelError26(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
14132
+ throw new RuntimeModelError27(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13707
14133
  }
13708
14134
  const tempContext = this.context.clone();
13709
14135
  if (this.routeDepth === 1) {
@@ -13999,17 +14425,17 @@ import { mergeDeepRight as mergeDeepRight3 } from "ramda";
13999
14425
  import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
14000
14426
 
14001
14427
  // src/controller/control/chart/generator/line-series-generator.ts
14002
- import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
14428
+ import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
14003
14429
 
14004
14430
  // src/controller/control/chart/generator/base-series-generator.ts
14005
- import { plus, RuntimeModelError as RuntimeModelError27, toNumberOrNil } from "@ibiz-template/core";
14431
+ import { plus, RuntimeModelError as RuntimeModelError28, toNumberOrNil } from "@ibiz-template/core";
14006
14432
  import dayjs4 from "dayjs";
14007
14433
  import minMax from "dayjs/plugin/minMax";
14008
14434
  import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
14009
14435
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
14010
14436
  import weekOfYear from "dayjs/plugin/weekOfYear";
14011
14437
  import isoWeek from "dayjs/plugin/isoWeek";
14012
- import { clone as clone18, isNil as isNil21, mergeDeepRight } from "ramda";
14438
+ import { clone as clone19, isNil as isNil21, mergeDeepRight } from "ramda";
14013
14439
  dayjs4.extend(minMax);
14014
14440
  dayjs4.extend(isSameOrBefore);
14015
14441
  dayjs4.extend(quarterOfYear);
@@ -14052,10 +14478,10 @@ var BaseSeriesGenerator = class {
14052
14478
  this.chartGenerator = chartGenerator;
14053
14479
  const { chartSeriesEncode, caption, id, userParam } = model;
14054
14480
  if (!model.catalogField) {
14055
- throw new RuntimeModelError27(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
14481
+ throw new RuntimeModelError28(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
14056
14482
  }
14057
14483
  if (!model.valueField) {
14058
- throw new RuntimeModelError27(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
14484
+ throw new RuntimeModelError28(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
14059
14485
  }
14060
14486
  this.catalogField = chartGenerator.getFieldKey(model.catalogField);
14061
14487
  this.valueField = chartGenerator.getFieldKey(model.valueField);
@@ -14284,7 +14710,7 @@ var BaseSeriesGenerator = class {
14284
14710
  dataPreprocess(data) {
14285
14711
  const tempData = [];
14286
14712
  data.forEach((singleData) => {
14287
- tempData.push(clone18(singleData));
14713
+ tempData.push(clone19(singleData));
14288
14714
  });
14289
14715
  const { groupMode } = this.model;
14290
14716
  if (groupMode) {
@@ -14478,10 +14904,10 @@ var BaseSeriesGenerator = class {
14478
14904
  var LineSeriesGenerator = class extends BaseSeriesGenerator {
14479
14905
  calcStaticOptions() {
14480
14906
  if (this.xAxisIndex === void 0) {
14481
- throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14907
+ throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14482
14908
  }
14483
14909
  if (this.yAxisIndex === void 0) {
14484
- throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14910
+ throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14485
14911
  }
14486
14912
  const options = super.calcStaticOptions();
14487
14913
  options.xAxisIndex = this.xAxisIndex;
@@ -14497,14 +14923,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
14497
14923
  };
14498
14924
 
14499
14925
  // src/controller/control/chart/generator/bar-series-generator.ts
14500
- import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
14926
+ import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
14501
14927
  var BarSeriesGenerator = class extends BaseSeriesGenerator {
14502
14928
  calcStaticOptions() {
14503
14929
  if (this.xAxisIndex === void 0) {
14504
- throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14930
+ throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14505
14931
  }
14506
14932
  if (this.yAxisIndex === void 0) {
14507
- throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14933
+ throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14508
14934
  }
14509
14935
  const options = super.calcStaticOptions();
14510
14936
  options.xAxisIndex = this.xAxisIndex;
@@ -14557,14 +14983,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
14557
14983
  };
14558
14984
 
14559
14985
  // src/controller/control/chart/generator/scatter-series-generator.ts
14560
- import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
14986
+ import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
14561
14987
  var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
14562
14988
  calcStaticOptions() {
14563
14989
  if (this.xAxisIndex === void 0) {
14564
- throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14990
+ throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14565
14991
  }
14566
14992
  if (this.yAxisIndex === void 0) {
14567
- throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14993
+ throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14568
14994
  }
14569
14995
  const options = super.calcStaticOptions();
14570
14996
  options.xAxisIndex = this.xAxisIndex;
@@ -15162,17 +15588,17 @@ var CaptionBarController = class extends ControlController {
15162
15588
  import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError47 } from "@ibiz-template/core";
15163
15589
 
15164
15590
  // src/ui-action/provider/backend-ui-action-provider.ts
15165
- import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
15591
+ import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
15166
15592
  import { isArray as isArray8 } from "qx-util";
15167
15593
 
15168
15594
  // src/ui-action/provider/ui-action-provider-base.ts
15169
- import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
15595
+ import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
15170
15596
 
15171
15597
  // src/ui-logic/index.ts
15172
15598
  import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
15173
15599
 
15174
15600
  // src/ui-logic/ui-logic.ts
15175
- import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
15601
+ import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
15176
15602
 
15177
15603
  // src/ui-logic/ui-logic-context.ts
15178
15604
  var UILogicContext = class {
@@ -15318,24 +15744,24 @@ var UILogicContext = class {
15318
15744
  };
15319
15745
 
15320
15746
  // src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
15321
- import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
15747
+ import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
15322
15748
 
15323
15749
  // src/ui-logic/ui-logic-link/ui-logic-link.ts
15324
15750
  import { ModelError as ModelError20 } from "@ibiz-template/core";
15325
15751
 
15326
15752
  // src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
15327
- import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
15753
+ import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
15328
15754
 
15329
15755
  // src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
15330
15756
  var UILogicLinkCond = class {
15331
15757
  };
15332
15758
 
15333
15759
  // src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
15334
- import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
15760
+ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
15335
15761
 
15336
15762
  // src/ui-logic/utils/handle-src-val.ts
15337
15763
  import { ModelError as ModelError18 } from "@ibiz-template/core";
15338
- import { clone as clone19 } from "ramda";
15764
+ import { clone as clone20 } from "ramda";
15339
15765
  function handleSrcVal2(ctx, srcValParams) {
15340
15766
  const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
15341
15767
  const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
@@ -15362,7 +15788,7 @@ function handleSrcVal2(ctx, srcValParams) {
15362
15788
  value = ctx.parameters.context;
15363
15789
  break;
15364
15790
  case "ENVPARAM":
15365
- value = clone19(ibiz.env);
15791
+ value = clone20(ibiz.env);
15366
15792
  break;
15367
15793
  default:
15368
15794
  throw new ModelError18(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
@@ -15427,7 +15853,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
15427
15853
  switch (this.type) {
15428
15854
  case "ENTITYFIELD": {
15429
15855
  if (!this.value) {
15430
- throw new RuntimeModelError31(
15856
+ throw new RuntimeModelError32(
15431
15857
  this.model,
15432
15858
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
15433
15859
  );
@@ -15437,7 +15863,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
15437
15863
  }
15438
15864
  case "SRCENTITYFIELD": {
15439
15865
  if (!this.value) {
15440
- throw new RuntimeModelError31(
15866
+ throw new RuntimeModelError32(
15441
15867
  this.model,
15442
15868
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
15443
15869
  );
@@ -15503,7 +15929,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
15503
15929
  test(ctx, context, data) {
15504
15930
  let bol = true;
15505
15931
  if (this.conds.length === 0) {
15506
- throw new RuntimeModelError32(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
15932
+ throw new RuntimeModelError33(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
15507
15933
  }
15508
15934
  for (let i = 0; i < this.conds.length; i++) {
15509
15935
  const cond = this.conds[i];
@@ -15629,10 +16055,10 @@ var DEActionNode2 = class extends UILogicNode {
15629
16055
  retDEUILogicParamId
15630
16056
  } = this.model;
15631
16057
  if (!dstAppDataEntityId) {
15632
- throw new RuntimeModelError33(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
16058
+ throw new RuntimeModelError34(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
15633
16059
  }
15634
16060
  if (!dstAppDEActionId) {
15635
- throw new RuntimeModelError33(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
16061
+ throw new RuntimeModelError34(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
15636
16062
  }
15637
16063
  const requestData = ctx.params[dstDEUILogicParamId];
15638
16064
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -15650,13 +16076,13 @@ var DEActionNode2 = class extends UILogicNode {
15650
16076
  };
15651
16077
 
15652
16078
  // src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
15653
- import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
16079
+ import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
15654
16080
  var DEUIActionNode = class extends UILogicNode {
15655
16081
  async exec(ctx) {
15656
16082
  const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
15657
16083
  const { data, parameters } = ctx;
15658
16084
  if (!dstAppDEUIActionId) {
15659
- throw new RuntimeModelError34(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
16085
+ throw new RuntimeModelError35(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
15660
16086
  }
15661
16087
  let actionData = [data];
15662
16088
  if (dstDEUILogicParamId) {
@@ -15721,7 +16147,7 @@ var EndNode2 = class extends UILogicNode {
15721
16147
 
15722
16148
  // src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
15723
16149
  import { ModelError as ModelError22, RuntimeError as RuntimeError39 } from "@ibiz-template/core";
15724
- import { clone as clone20 } from "ramda";
16150
+ import { clone as clone21 } from "ramda";
15725
16151
  var PrepareJSParamNode = class extends UILogicNode {
15726
16152
  async exec(ctx) {
15727
16153
  const nodeParams = this.model.deuilogicNodeParams;
@@ -15810,7 +16236,7 @@ var PrepareJSParamNode = class extends UILogicNode {
15810
16236
  copyParam(nodeParam, ctx) {
15811
16237
  const { dstDEUILogicParamId } = nodeParam;
15812
16238
  const srcVal = handleSrcVal2(ctx, nodeParam);
15813
- ctx.params[dstDEUILogicParamId] = clone20(srcVal);
16239
+ ctx.params[dstDEUILogicParamId] = clone21(srcVal);
15814
16240
  }
15815
16241
  /**
15816
16242
  * 绑定参数
@@ -15887,20 +16313,20 @@ var PrepareJSParamNode = class extends UILogicNode {
15887
16313
  };
15888
16314
 
15889
16315
  // src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
15890
- import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
16316
+ import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
15891
16317
  import { isFunction } from "lodash-es";
15892
16318
  var ViewCtrlInvokeNode = class extends UILogicNode {
15893
16319
  async exec(ctx) {
15894
16320
  ctx.isEndNode = true;
15895
16321
  const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
15896
16322
  if (!invokeCtrlId) {
15897
- throw new RuntimeModelError35(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
16323
+ throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
15898
16324
  }
15899
16325
  if (!invokeParamId) {
15900
- throw new RuntimeModelError35(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
16326
+ throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
15901
16327
  }
15902
16328
  if (!invokeMethod) {
15903
- throw new RuntimeModelError35(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
16329
+ throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
15904
16330
  }
15905
16331
  const invokeParam = ctx.params[invokeParamId];
15906
16332
  if (!invokeParam) {
@@ -15918,12 +16344,12 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
15918
16344
  };
15919
16345
 
15920
16346
  // src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
15921
- import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
16347
+ import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
15922
16348
  var BindParamNode2 = class extends UILogicNode {
15923
16349
  async exec(ctx) {
15924
16350
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
15925
16351
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
15926
- throw new RuntimeModelError36(
16352
+ throw new RuntimeModelError37(
15927
16353
  this.model,
15928
16354
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
15929
16355
  );
@@ -15934,7 +16360,7 @@ var BindParamNode2 = class extends UILogicNode {
15934
16360
  };
15935
16361
 
15936
16362
  // src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
15937
- import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
16363
+ import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
15938
16364
  var MsgBoxNode = class extends UILogicNode {
15939
16365
  constructor() {
15940
16366
  super(...arguments);
@@ -15948,10 +16374,10 @@ var MsgBoxNode = class extends UILogicNode {
15948
16374
  async exec(ctx) {
15949
16375
  const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
15950
16376
  if (!msgBoxType) {
15951
- throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
16377
+ throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
15952
16378
  }
15953
16379
  if (!buttonsType) {
15954
- throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
16380
+ throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
15955
16381
  }
15956
16382
  let { title } = this.model;
15957
16383
  let { message } = this.model;
@@ -16011,12 +16437,12 @@ var PFPluginNode = class extends UILogicNode {
16011
16437
  };
16012
16438
 
16013
16439
  // src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
16014
- import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
16440
+ import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
16015
16441
  var DebugParamNode = class extends UILogicNode {
16016
16442
  async exec(ctx) {
16017
16443
  const { dstDEUILogicParamId, name } = this.model;
16018
16444
  if (!dstDEUILogicParamId) {
16019
- throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
16445
+ throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
16020
16446
  }
16021
16447
  const param = ctx.params[dstDEUILogicParamId];
16022
16448
  ibiz.log.debug("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
@@ -16024,36 +16450,36 @@ var DebugParamNode = class extends UILogicNode {
16024
16450
  };
16025
16451
 
16026
16452
  // src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
16027
- import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
16453
+ import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
16028
16454
  var ResetParamNode2 = class extends UILogicNode {
16029
16455
  async exec(ctx) {
16030
16456
  const { dstDEUILogicParamId } = this.model;
16031
16457
  if (!dstDEUILogicParamId) {
16032
- throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
16458
+ throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
16033
16459
  }
16034
16460
  ctx.resetParam(dstDEUILogicParamId);
16035
16461
  }
16036
16462
  };
16037
16463
 
16038
16464
  // src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
16039
- import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
16040
- import { clone as clone21 } from "ramda";
16465
+ import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
16466
+ import { clone as clone22 } from "ramda";
16041
16467
  var CopyParamNode2 = class extends UILogicNode {
16042
16468
  async exec(ctx) {
16043
16469
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
16044
16470
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
16045
- throw new RuntimeModelError40(
16471
+ throw new RuntimeModelError41(
16046
16472
  this.model,
16047
16473
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
16048
16474
  );
16049
16475
  }
16050
16476
  const srcVal = handleSrcVal2(ctx, this.model);
16051
- ctx.params[dstDEUILogicParamId] = clone21(srcVal);
16477
+ ctx.params[dstDEUILogicParamId] = clone22(srcVal);
16052
16478
  }
16053
16479
  };
16054
16480
 
16055
16481
  // src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
16056
- import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
16482
+ import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
16057
16483
  var AppendParamNode2 = class extends UILogicNode {
16058
16484
  async exec(ctx) {
16059
16485
  const {
@@ -16064,7 +16490,7 @@ var AppendParamNode2 = class extends UILogicNode {
16064
16490
  srcSize
16065
16491
  } = this.model;
16066
16492
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
16067
- throw new RuntimeModelError41(
16493
+ throw new RuntimeModelError42(
16068
16494
  this.model,
16069
16495
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
16070
16496
  );
@@ -16082,12 +16508,12 @@ var AppendParamNode2 = class extends UILogicNode {
16082
16508
  };
16083
16509
 
16084
16510
  // src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
16085
- import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
16511
+ import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
16086
16512
  var SortParamNode2 = class extends UILogicNode {
16087
16513
  async exec(ctx) {
16088
16514
  const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
16089
16515
  if (!dstDEUILogicParamId || !dstFieldName) {
16090
- throw new RuntimeModelError42(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
16516
+ throw new RuntimeModelError43(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
16091
16517
  }
16092
16518
  const key = dstFieldName;
16093
16519
  const arr = ctx.params[dstDEUILogicParamId];
@@ -16098,19 +16524,19 @@ var SortParamNode2 = class extends UILogicNode {
16098
16524
  };
16099
16525
 
16100
16526
  // src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
16101
- import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
16527
+ import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
16102
16528
  var RenewParamNode2 = class extends UILogicNode {
16103
16529
  async exec(ctx) {
16104
16530
  const { dstDEUILogicParamId } = this.model;
16105
16531
  if (!dstDEUILogicParamId) {
16106
- throw new RuntimeModelError43(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
16532
+ throw new RuntimeModelError44(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
16107
16533
  }
16108
16534
  ctx.renewParam(dstDEUILogicParamId);
16109
16535
  }
16110
16536
  };
16111
16537
 
16112
16538
  // src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
16113
- import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
16539
+ import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
16114
16540
  var DataSetNode2 = class extends UILogicNode {
16115
16541
  async exec(ctx) {
16116
16542
  const {
@@ -16120,7 +16546,7 @@ var DataSetNode2 = class extends UILogicNode {
16120
16546
  retDEUILogicParamId
16121
16547
  } = this.model;
16122
16548
  if (!dstDEUILogicParamId) {
16123
- throw new RuntimeModelError44(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
16549
+ throw new RuntimeModelError45(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
16124
16550
  }
16125
16551
  const queryParams = ctx.params[dstDEUILogicParamId];
16126
16552
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -16146,19 +16572,19 @@ var ThrowExceptionNode2 = class extends UILogicNode {
16146
16572
  };
16147
16573
 
16148
16574
  // src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
16149
- import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
16575
+ import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
16150
16576
  var ViewCtrlFireEventNode = class extends UILogicNode {
16151
16577
  async exec(ctx) {
16152
16578
  ctx.isEndNode = true;
16153
16579
  const { eventName, eventParamId, fireCtrlId } = this.model;
16154
16580
  if (!fireCtrlId) {
16155
- throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
16581
+ throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
16156
16582
  }
16157
16583
  if (!eventName) {
16158
- throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
16584
+ throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
16159
16585
  }
16160
16586
  if (!eventParamId) {
16161
- throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
16587
+ throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
16162
16588
  }
16163
16589
  const invokeCtrl = ctx.params[fireCtrlId];
16164
16590
  if (!invokeCtrl) {
@@ -16173,7 +16599,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
16173
16599
  };
16174
16600
 
16175
16601
  // src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
16176
- import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
16602
+ import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
16177
16603
  var ExecuteDELogicNode = class extends UILogicNode {
16178
16604
  async exec(ctx) {
16179
16605
  const {
@@ -16183,13 +16609,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
16183
16609
  retDEUILogicParamId
16184
16610
  } = this.model;
16185
16611
  if (!dstAppDataEntityId) {
16186
- throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
16612
+ throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
16187
16613
  }
16188
16614
  if (!dstAppDELogicId) {
16189
- throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
16615
+ throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
16190
16616
  }
16191
16617
  if (!dstDEUILogicParamId) {
16192
- throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
16618
+ throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
16193
16619
  }
16194
16620
  const dstParam = ctx.params[dstDEUILogicParamId];
16195
16621
  if (!dstParam) {
@@ -16350,7 +16776,7 @@ var UILogic = class {
16350
16776
  this.params = /* @__PURE__ */ new Map();
16351
16777
  var _a;
16352
16778
  if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
16353
- throw new RuntimeModelError47(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
16779
+ throw new RuntimeModelError48(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
16354
16780
  }
16355
16781
  model.deuilogicNodes.forEach((node) => {
16356
16782
  const { logicNodeType } = node;
@@ -16470,7 +16896,7 @@ var UILogic = class {
16470
16896
  const start = this.nodes.get(startDEUILogicNodeId);
16471
16897
  await this.deepExec(start, ctx);
16472
16898
  } else {
16473
- throw new RuntimeModelError47(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
16899
+ throw new RuntimeModelError48(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
16474
16900
  }
16475
16901
  if (ctx.isEndNode) {
16476
16902
  return ctx.result;
@@ -16605,7 +17031,7 @@ var UIActionProviderBase = class {
16605
17031
  const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
16606
17032
  if (uilogicAttachMode === "REPLACE") {
16607
17033
  if (!appDEUILogicId) {
16608
- throw new RuntimeModelError48(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
17034
+ throw new RuntimeModelError49(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16609
17035
  }
16610
17036
  await execUILogic(appDEUILogicId, appDataEntityId, args);
16611
17037
  return result;
@@ -16620,7 +17046,7 @@ var UIActionProviderBase = class {
16620
17046
  }
16621
17047
  if (action.uilogicAttachMode === "AFTER") {
16622
17048
  if (!appDEUILogicId) {
16623
- throw new RuntimeModelError48(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
17049
+ throw new RuntimeModelError49(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16624
17050
  }
16625
17051
  await execUILogic(
16626
17052
  appDEUILogicId,
@@ -16845,7 +17271,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
16845
17271
  const entityName = action.appDataEntityId;
16846
17272
  const methodName = action.appDEMethodId;
16847
17273
  if (!entityName || !methodName) {
16848
- throw new RuntimeModelError49(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
17274
+ throw new RuntimeModelError50(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
16849
17275
  }
16850
17276
  const { resultContext, resultParams, resultData } = await this.handleParams(
16851
17277
  action,
@@ -16970,7 +17396,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
16970
17396
  // src/ui-action/provider/front-ui-action-provider.ts
16971
17397
  import {
16972
17398
  StringUtil,
16973
- RuntimeModelError as RuntimeModelError50,
17399
+ RuntimeModelError as RuntimeModelError51,
16974
17400
  ModelError as ModelError26,
16975
17401
  RuntimeError as RuntimeError46
16976
17402
  } from "@ibiz-template/core";
@@ -16988,7 +17414,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16988
17414
  case "WIZARD": {
16989
17415
  const frontPSAppView = action.frontAppViewId;
16990
17416
  if (!frontPSAppView) {
16991
- throw new RuntimeModelError50(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
17417
+ throw new RuntimeModelError51(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
16992
17418
  }
16993
17419
  const { resultContext, resultParams } = await this.handleParams(
16994
17420
  action,
@@ -17053,7 +17479,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
17053
17479
  );
17054
17480
  return result || {};
17055
17481
  }
17056
- throw new RuntimeModelError50(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
17482
+ throw new RuntimeModelError51(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
17057
17483
  }
17058
17484
  /**
17059
17485
  * 执行打印行为
@@ -17124,7 +17550,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
17124
17550
  */
17125
17551
  async executeDataImport(action, args) {
17126
17552
  var _a;
17127
- const { resultParams } = await this.handleParams(
17553
+ const { resultContext, resultParams } = await this.handleParams(
17128
17554
  action,
17129
17555
  args.context,
17130
17556
  args.data,
@@ -17148,6 +17574,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
17148
17574
  dismiss: () => modal.dismiss(),
17149
17575
  appDataEntity,
17150
17576
  dataImport: appDEDataImport,
17577
+ context: resultContext,
17151
17578
  params: resultParams
17152
17579
  },
17153
17580
  {
@@ -17901,7 +18328,7 @@ var RawItemPortletController = class extends PortletPartController {
17901
18328
  };
17902
18329
 
17903
18330
  // src/controller/control/data-view/data-view.controller.ts
17904
- import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
18331
+ import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
17905
18332
  import { isNil as isNil22 } from "ramda";
17906
18333
 
17907
18334
  // src/controller/control/data-view/data-view.service.ts
@@ -18116,7 +18543,7 @@ var DataViewControlController = class extends MDControlController {
18116
18543
  const optItemModel = this.getOptItemModel();
18117
18544
  if (optItemModel) {
18118
18545
  if (!optItemModel.deuiactionGroup) {
18119
- throw new RuntimeModelError51(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
18546
+ throw new RuntimeModelError52(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
18120
18547
  }
18121
18548
  if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
18122
18549
  ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -18169,7 +18596,7 @@ var DataViewControlController = class extends MDControlController {
18169
18596
  const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
18170
18597
  if (enableGroup && groupMode) {
18171
18598
  if (!groupAppDEFieldId) {
18172
- throw new RuntimeModelError51(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
18599
+ throw new RuntimeModelError52(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
18173
18600
  }
18174
18601
  if (groupMode === "AUTO") {
18175
18602
  this.handleAutoGroup();
@@ -18236,7 +18663,7 @@ var DataViewControlController = class extends MDControlController {
18236
18663
  async handleCodeListGroup() {
18237
18664
  const { groupAppDEFieldId, groupCodeListId } = this.model;
18238
18665
  if (!groupCodeListId) {
18239
- throw new RuntimeModelError51(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
18666
+ throw new RuntimeModelError52(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
18240
18667
  }
18241
18668
  const { items } = this.state;
18242
18669
  const groupMap = /* @__PURE__ */ new Map();
@@ -18342,7 +18769,7 @@ var DataViewControlController = class extends MDControlController {
18342
18769
  caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
18343
18770
  }
18344
18771
  if (!item.appDEFieldId) {
18345
- throw new RuntimeModelError51(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
18772
+ throw new RuntimeModelError52(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
18346
18773
  }
18347
18774
  const tempItem = {
18348
18775
  caption,
@@ -18360,10 +18787,10 @@ var DataViewControlController = class extends MDControlController {
18360
18787
  };
18361
18788
 
18362
18789
  // src/controller/control/exp-bar/calendar-exp-bar.controller.ts
18363
- import { RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
18790
+ import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
18364
18791
 
18365
18792
  // src/controller/control/exp-bar/exp-bar.controller.ts
18366
- import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
18793
+ import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
18367
18794
  var ExpBarControlController = class extends ControlController {
18368
18795
  constructor() {
18369
18796
  super(...arguments);
@@ -18418,7 +18845,7 @@ var ExpBarControlController = class extends ControlController {
18418
18845
  get xDataController() {
18419
18846
  const controller = this.view.getController(this.model.xdataControlName);
18420
18847
  if (!controller) {
18421
- throw new RuntimeModelError52(
18848
+ throw new RuntimeModelError53(
18422
18849
  this.model,
18423
18850
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
18424
18851
  );
@@ -18777,7 +19204,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
18777
19204
  get xDataController() {
18778
19205
  const controller = this.view.getController(this.model.xdataControlName);
18779
19206
  if (!controller) {
18780
- throw new RuntimeModelError53(
19207
+ throw new RuntimeModelError54(
18781
19208
  this.model,
18782
19209
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
18783
19210
  );
@@ -18832,7 +19259,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
18832
19259
  };
18833
19260
 
18834
19261
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
18835
- import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
19262
+ import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
18836
19263
  var TreeExpBarController = class extends ExpBarControlController {
18837
19264
  constructor() {
18838
19265
  super(...arguments);
@@ -18855,7 +19282,7 @@ var TreeExpBarController = class extends ExpBarControlController {
18855
19282
  get xDataController() {
18856
19283
  const controller = this.view.getController(this.model.xdataControlName);
18857
19284
  if (!controller) {
18858
- throw new RuntimeModelError54(
19285
+ throw new RuntimeModelError55(
18859
19286
  this.model,
18860
19287
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
18861
19288
  );
@@ -19101,7 +19528,7 @@ import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
19101
19528
 
19102
19529
  // src/controller/control/form/form/form.controller.ts
19103
19530
  import {
19104
- RuntimeModelError as RuntimeModelError55,
19531
+ RuntimeModelError as RuntimeModelError56,
19105
19532
  debounceAndAsyncMerge,
19106
19533
  recursiveIterate as recursiveIterate3
19107
19534
  } from "@ibiz-template/core";
@@ -19229,7 +19656,7 @@ var FormController = class extends ControlController {
19229
19656
  return;
19230
19657
  }
19231
19658
  if (form.details[detail.id]) {
19232
- throw new RuntimeModelError55(
19659
+ throw new RuntimeModelError56(
19233
19660
  detail,
19234
19661
  "\u521D\u59CB\u5316\u5F02\u5E38: \u8868\u5355\u6210\u5458[".concat(detail.id, "](").concat(detail.detailType, ")\u5DF2\u5B58\u5728\uFF0C\u8868\u5355\u9879\u6807\u8BC6\u91CD\u590D\u8BF7\u68C0\u67E5\u914D\u7F6E")
19235
19662
  );
@@ -20066,6 +20493,9 @@ var FormDetailController = class {
20066
20493
  * @date 2023-10-11 05:03:26
20067
20494
  */
20068
20495
  async onClick(event) {
20496
+ if (event) {
20497
+ event.stopPropagation();
20498
+ }
20069
20499
  this.form.evt.emit("onFormDetailEvent", {
20070
20500
  formDetailName: this.model.id,
20071
20501
  formDetailEventName: "onClick" /* CLICK */,
@@ -20871,7 +21301,7 @@ var FormMDCtrlController = class extends FormDetailController {
20871
21301
  import {
20872
21302
  mergeInLeft,
20873
21303
  ModelError as ModelError27,
20874
- RuntimeModelError as RuntimeModelError56
21304
+ RuntimeModelError as RuntimeModelError57
20875
21305
  } from "@ibiz-template/core";
20876
21306
  var FormMDCtrlMDController = class extends FormMDCtrlController {
20877
21307
  constructor() {
@@ -20897,7 +21327,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
20897
21327
  await super.onInit();
20898
21328
  const { contentControl } = this.model;
20899
21329
  if (!contentControl) {
20900
- throw new RuntimeModelError56(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
21330
+ throw new RuntimeModelError57(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
20901
21331
  }
20902
21332
  if (contentControl.controlType === "GRID") {
20903
21333
  mergeInLeft(contentControl, {
@@ -20994,7 +21424,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
20994
21424
  };
20995
21425
 
20996
21426
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
20997
- import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
21427
+ import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
20998
21428
  import { createUUID as createUUID11 } from "qx-util";
20999
21429
 
21000
21430
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
@@ -21035,7 +21465,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
21035
21465
  super.onInit();
21036
21466
  const { contentControl } = this.model;
21037
21467
  if (!contentControl) {
21038
- throw new RuntimeModelError57(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
21468
+ throw new RuntimeModelError58(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
21039
21469
  }
21040
21470
  contentControl.enableAutoSave = this.enableCreate || this.enableUpdate;
21041
21471
  const controlProvider = await getControlProvider(contentControl);
@@ -21169,7 +21599,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
21169
21599
 
21170
21600
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
21171
21601
  import { ModelError as ModelError28 } from "@ibiz-template/core";
21172
- import { clone as clone22 } from "ramda";
21602
+ import { clone as clone23 } from "ramda";
21173
21603
  var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
21174
21604
  constructor() {
21175
21605
  super(...arguments);
@@ -21253,7 +21683,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
21253
21683
  copyFields.forEach((key) => {
21254
21684
  tempForm[key] = this.form.model[key];
21255
21685
  });
21256
- this.repeatedForm = clone22(tempForm);
21686
+ this.repeatedForm = clone23(tempForm);
21257
21687
  }
21258
21688
  /**
21259
21689
  * 设置重复器数据(修改主表单里重复器对应属性)
@@ -21361,10 +21791,30 @@ var FormTabPageController = class extends FormDetailController {
21361
21791
  var _a;
21362
21792
  return new FormTabPageState((_a = this.parent) == null ? void 0 : _a.state);
21363
21793
  }
21794
+ /**
21795
+ * 是否激活的分页
21796
+ * @author lxm
21797
+ * @date 2024-01-17 03:16:24
21798
+ * @readonly
21799
+ * @type {boolean}
21800
+ */
21801
+ get isActive() {
21802
+ return this.parent.state.activeTab === this.model.id;
21803
+ }
21364
21804
  };
21365
21805
 
21366
21806
  // src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.ts
21367
21807
  var FormTabPanelState = class extends FormDetailState {
21808
+ constructor() {
21809
+ super(...arguments);
21810
+ /**
21811
+ * 当前激活的分页
21812
+ * @author lxm
21813
+ * @date 2024-01-17 02:05:58
21814
+ * @type {string}
21815
+ */
21816
+ this.activeTab = "";
21817
+ }
21368
21818
  };
21369
21819
 
21370
21820
  // src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.ts
@@ -21373,6 +21823,20 @@ var FormTabPanelController = class extends FormDetailController {
21373
21823
  var _a;
21374
21824
  return new FormTabPanelState((_a = this.parent) == null ? void 0 : _a.state);
21375
21825
  }
21826
+ async onInit() {
21827
+ var _a;
21828
+ await super.onInit();
21829
+ this.state.activeTab = ((_a = this.model.deformTabPages) == null ? void 0 : _a[0].id) || "";
21830
+ }
21831
+ /**
21832
+ * 分页点击切换处理
21833
+ * @author lxm
21834
+ * @date 2024-01-17 02:59:38
21835
+ * @param {string} tabId
21836
+ */
21837
+ onTabChange(tabId) {
21838
+ this.state.activeTab = tabId;
21839
+ }
21376
21840
  };
21377
21841
 
21378
21842
  // src/controller/control/form/edit-form/edit-form.controller.ts
@@ -21383,12 +21847,12 @@ import {
21383
21847
  } from "@ibiz-template/core";
21384
21848
  import { debounce as debounce2 } from "lodash-es";
21385
21849
  import { createUUID as createUUID12 } from "qx-util";
21386
- import { clone as clone23 } from "ramda";
21850
+ import { clone as clone24 } from "ramda";
21387
21851
 
21388
21852
  // src/controller/control/form/edit-form/edit-form.service.ts
21389
21853
  import {
21390
21854
  recursiveIterate as recursiveIterate6,
21391
- RuntimeModelError as RuntimeModelError58
21855
+ RuntimeModelError as RuntimeModelError59
21392
21856
  } from "@ibiz-template/core";
21393
21857
  var EditFormService = class extends FormService {
21394
21858
  /**
@@ -21512,7 +21976,7 @@ var EditFormService = class extends FormService {
21512
21976
  const wizardForm = this.model;
21513
21977
  const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
21514
21978
  if (!methodName) {
21515
- throw new RuntimeModelError58(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
21979
+ throw new RuntimeModelError59(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
21516
21980
  }
21517
21981
  let res = await this.exec(
21518
21982
  methodName,
@@ -21748,8 +22212,8 @@ var EditFormController = class extends FormController {
21748
22212
  * @return {*} {Promise<IData>}
21749
22213
  */
21750
22214
  async copy() {
21751
- const context = clone23(this.context);
21752
- const queryParams = clone23(this.params);
22215
+ const context = clone24(this.context);
22216
+ const queryParams = clone24(this.params);
21753
22217
  const appDataEntity = await ibiz.hub.getAppDataEntity(
21754
22218
  this.model.appDataEntityId,
21755
22219
  this.model.appId
@@ -21806,7 +22270,7 @@ var EditFormController = class extends FormController {
21806
22270
  return this.loadDraft();
21807
22271
  }
21808
22272
  const { context, params } = this.handlerAbilityParams(args);
21809
- const queryParams = clone23(params);
22273
+ const queryParams = clone24(params);
21810
22274
  let res;
21811
22275
  try {
21812
22276
  await this.startLoading();
@@ -21887,7 +22351,7 @@ var EditFormController = class extends FormController {
21887
22351
  });
21888
22352
  }
21889
22353
  ibiz.mc.command.send(
21890
- this.data.$origin,
22354
+ res.data,
21891
22355
  isCreate ? "OBJECTCREATED" : "OBJECTUPDATED"
21892
22356
  );
21893
22357
  return this.data;
@@ -22372,12 +22836,12 @@ import {
22372
22836
  mergeDefaultInLeft,
22373
22837
  recursiveIterate as recursiveIterate7,
22374
22838
  RuntimeError as RuntimeError53,
22375
- RuntimeModelError as RuntimeModelError60
22839
+ RuntimeModelError as RuntimeModelError61
22376
22840
  } from "@ibiz-template/core";
22377
- import { clone as clone24 } from "ramda";
22841
+ import { clone as clone25 } from "ramda";
22378
22842
 
22379
22843
  // src/controller/control/grid/grid/grid.service.ts
22380
- import { RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
22844
+ import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
22381
22845
  var GridService = class extends MDControlService {
22382
22846
  /**
22383
22847
  * 初始化属性映射
@@ -22405,7 +22869,7 @@ var GridService = class extends MDControlService {
22405
22869
  dataType: dataItem.dataType
22406
22870
  });
22407
22871
  } else {
22408
- throw new RuntimeModelError59(
22872
+ throw new RuntimeModelError60(
22409
22873
  column,
22410
22874
  "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8868\u683C\u6570\u636E\u9879[".concat(deField, "]")
22411
22875
  );
@@ -22684,7 +23148,7 @@ var GridController = class extends MDControlController {
22684
23148
  const result = await calcColumnModelBySchema(json, this);
22685
23149
  if (result && result.degridColumns.length > 0) {
22686
23150
  const { degridColumns, degridDataItems } = result;
22687
- this.model = clone24(this.model);
23151
+ this.model = clone25(this.model);
22688
23152
  this.model.degridColumns = [
22689
23153
  ...(this.model.degridColumns || []).filter((item) => {
22690
23154
  return degridColumns.findIndex((x) => x.id === item.id) === -1;
@@ -22715,11 +23179,11 @@ var GridController = class extends MDControlController {
22715
23179
  (item) => item.model.appDEFieldId === groupAppDEFieldId
22716
23180
  );
22717
23181
  if (!this.groupFieldColumn) {
22718
- throw new RuntimeModelError60(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
23182
+ throw new RuntimeModelError61(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
22719
23183
  }
22720
23184
  const groupFieldName = this.groupFieldColumn.model.id;
22721
23185
  if (!this.groupFieldColumn.model.appCodeListId) {
22722
- throw new RuntimeModelError60(
23186
+ throw new RuntimeModelError61(
22723
23187
  this.groupFieldColumn.model,
22724
23188
  "\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
22725
23189
  );
@@ -22729,7 +23193,7 @@ var GridController = class extends MDControlController {
22729
23193
  );
22730
23194
  if (index !== -1 && index !== 0) {
22731
23195
  if (this.isMultistageHeader) {
22732
- throw new RuntimeModelError60(
23196
+ throw new RuntimeModelError61(
22733
23197
  this.model,
22734
23198
  "\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
22735
23199
  );
@@ -22739,10 +23203,10 @@ var GridController = class extends MDControlController {
22739
23203
  }
22740
23204
  if (groupMode === "CODELIST") {
22741
23205
  if (!groupCodeListId) {
22742
- throw new RuntimeModelError60(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
23206
+ throw new RuntimeModelError61(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
22743
23207
  }
22744
23208
  if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
22745
- throw new RuntimeModelError60(
23209
+ throw new RuntimeModelError61(
22746
23210
  this.model,
22747
23211
  "\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
22748
23212
  );
@@ -22829,7 +23293,7 @@ var GridController = class extends MDControlController {
22829
23293
  return;
22830
23294
  }
22831
23295
  if (!aggAppDEDataSetId || !aggAppDataEntityId) {
22832
- throw new RuntimeModelError60(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
23296
+ throw new RuntimeModelError61(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
22833
23297
  }
22834
23298
  const params = await this.getFetchParams();
22835
23299
  const app = ibiz.hub.getApp(this.context.srfappid);
@@ -23199,7 +23663,7 @@ var GridController = class extends MDControlController {
23199
23663
  throw new RuntimeError53("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
23200
23664
  }
23201
23665
  if (row.data.srfuf === 1 /* UPDATE */) {
23202
- row.cacheData = clone24(row.data);
23666
+ row.cacheData = clone25(row.data);
23203
23667
  const defaultVal = this.calcDefaultValue(row.data, false);
23204
23668
  Object.assign(row.data, defaultVal);
23205
23669
  }
@@ -23368,7 +23832,7 @@ var GridController = class extends MDControlController {
23368
23832
  }
23369
23833
  });
23370
23834
  }
23371
- const cloneData = clone24(
23835
+ const cloneData = clone25(
23372
23836
  data2.map((item) => {
23373
23837
  return item.getOrigin();
23374
23838
  })
@@ -23606,7 +24070,7 @@ var GridController = class extends MDControlController {
23606
24070
  import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
23607
24071
  import dayjs5 from "dayjs";
23608
24072
  import { debounce as debounce3 } from "lodash-es";
23609
- import { clone as clone25, isNil as isNil23 } from "ramda";
24073
+ import { clone as clone26, isNil as isNil23 } from "ramda";
23610
24074
  var GridFieldColumnController = class extends GridColumnController {
23611
24075
  constructor() {
23612
24076
  super(...arguments);
@@ -23639,6 +24103,15 @@ var GridFieldColumnController = class extends GridColumnController {
23639
24103
  get hasAction() {
23640
24104
  return !!this.model.deuiactionId;
23641
24105
  }
24106
+ /**
24107
+ * 属性列对应值在数据里的属性字段名称
24108
+ * @author lxm
24109
+ * @date 2023-06-25 09:26:04
24110
+ * @readonly
24111
+ */
24112
+ get fieldName() {
24113
+ return this.model.id.toLowerCase();
24114
+ }
23642
24115
  async onInit() {
23643
24116
  await super.onInit();
23644
24117
  this.loadCodeList = debounce3(this.loadCodeList, 300, {
@@ -23680,7 +24153,7 @@ var GridFieldColumnController = class extends GridColumnController {
23680
24153
  * @readonly
23681
24154
  */
23682
24155
  clickable(row) {
23683
- const value = row.data[this.model.codeName];
24156
+ const value = row.data[this.fieldName];
23684
24157
  return (this.isLinkColumn || this.hasAction) && value;
23685
24158
  }
23686
24159
  /**
@@ -23717,7 +24190,7 @@ var GridFieldColumnController = class extends GridColumnController {
23717
24190
  * @returns {*} {Promise<void>}
23718
24191
  */
23719
24192
  async openLinkView(row, event) {
23720
- const curValue = row.data[this.model.codeName];
24193
+ const curValue = row.data[this.fieldName];
23721
24194
  if (!curValue) {
23722
24195
  return;
23723
24196
  }
@@ -23735,7 +24208,7 @@ var GridFieldColumnController = class extends GridColumnController {
23735
24208
  srfkey: value,
23736
24209
  ...wfContext
23737
24210
  });
23738
- const tempParams = clone25(this.params);
24211
+ const tempParams = clone26(this.params);
23739
24212
  const { context: newContext, params: newParams } = this.handlePublicParams(
23740
24213
  row.data,
23741
24214
  tempContext,
@@ -23906,7 +24379,7 @@ var GridFieldColumnController = class extends GridColumnController {
23906
24379
  };
23907
24380
 
23908
24381
  // src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
23909
- import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
24382
+ import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
23910
24383
  var GridUAColumnController = class extends GridColumnController {
23911
24384
  /**
23912
24385
  * 给rowController初始化操作列的状态
@@ -23919,7 +24392,7 @@ var GridUAColumnController = class extends GridColumnController {
23919
24392
  var _a;
23920
24393
  const { deuiactionGroup } = this.model;
23921
24394
  if (!deuiactionGroup) {
23922
- throw new RuntimeModelError61(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
24395
+ throw new RuntimeModelError62(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
23923
24396
  }
23924
24397
  if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
23925
24398
  ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -24012,15 +24485,6 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
24012
24485
  }
24013
24486
  return void 0;
24014
24487
  }
24015
- /**
24016
- * 列数据属性字段名称
24017
- * @author lxm
24018
- * @date 2023-06-25 09:26:04
24019
- * @readonly
24020
- */
24021
- get fieldName() {
24022
- return this.model.dataItemName;
24023
- }
24024
24488
  /**
24025
24489
  * 初始化方法,生成表格编辑项控制器
24026
24490
  *
@@ -25135,10 +25599,10 @@ import {
25135
25599
  mergeInLeft as mergeInLeft3,
25136
25600
  recursiveIterate as recursiveIterate9
25137
25601
  } from "@ibiz-template/core";
25138
- import { clone as clone26, isNil as isNil24 } from "ramda";
25602
+ import { clone as clone27, isNil as isNil24 } from "ramda";
25139
25603
 
25140
25604
  // src/controller/control/search-bar/search-bar-filter.controller.ts
25141
- import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
25605
+ import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
25142
25606
  var ExcludeOPs = [
25143
25607
  "ISNULL" /* IS_NULL */,
25144
25608
  "ISNOTNULL" /* IS_NOT_NULL */
@@ -25179,7 +25643,7 @@ var SearchBarFilterController = class {
25179
25643
  async init() {
25180
25644
  if (!this.noEditor) {
25181
25645
  if (!this.model.editor) {
25182
- throw new RuntimeModelError62(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
25646
+ throw new RuntimeModelError63(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
25183
25647
  }
25184
25648
  this.editorProvider = await getEditorProvider(this.model.editor);
25185
25649
  if (this.editorProvider) {
@@ -25639,7 +26103,7 @@ var SearchBarController = class extends ControlController {
25639
26103
  }
25640
26104
  });
25641
26105
  if (addSearchBarFilters.length > 0) {
25642
- this.model = clone26(this.model);
26106
+ this.model = clone27(this.model);
25643
26107
  this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
25644
26108
  this.model.enableFilter = true;
25645
26109
  }
@@ -26223,7 +26687,7 @@ var TabExpPanelController = class extends ControlController {
26223
26687
  // src/controller/control/tree/tree.controller.ts
26224
26688
  import {
26225
26689
  RuntimeError as RuntimeError57,
26226
- RuntimeModelError as RuntimeModelError63,
26690
+ RuntimeModelError as RuntimeModelError64,
26227
26691
  recursiveIterate as recursiveIterate10
26228
26692
  } from "@ibiz-template/core";
26229
26693
 
@@ -26576,6 +27040,7 @@ var TreeController = class extends MDControlController {
26576
27040
  this.initDropNodeRss();
26577
27041
  this.initNodeClickTBUIActionItem();
26578
27042
  await this.initService();
27043
+ await this.initCounter();
26579
27044
  this.model.detreeNodes.forEach((node) => {
26580
27045
  var _a2, _b2;
26581
27046
  if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
@@ -26591,6 +27056,12 @@ var TreeController = class extends MDControlController {
26591
27056
  Object.values(this.contextMenus).map((menu) => menu.created())
26592
27057
  );
26593
27058
  }
27059
+ async onDestroyed() {
27060
+ await super.onDestroyed();
27061
+ if (this.counter) {
27062
+ this.counter.destroy();
27063
+ }
27064
+ }
26594
27065
  /**
26595
27066
  * 初始化对应类型的部件服务
26596
27067
  * @author lxm
@@ -26602,6 +27073,23 @@ var TreeController = class extends MDControlController {
26602
27073
  this.service = new TreeService(this.model);
26603
27074
  await this.service.init(this.context);
26604
27075
  }
27076
+ /**
27077
+ * 初始化计数器
27078
+ * @author lxm
27079
+ * @date 2024-01-18 05:12:02
27080
+ * @protected
27081
+ * @return {*} {Promise<void>}
27082
+ */
27083
+ async initCounter() {
27084
+ const { appCounterRefs } = this.model;
27085
+ const appCounterRef = appCounterRefs == null ? void 0 : appCounterRefs[0];
27086
+ if (appCounterRef) {
27087
+ this.counter = await CounterService.getCounterByRef(
27088
+ appCounterRef,
27089
+ this.context
27090
+ );
27091
+ }
27092
+ }
26605
27093
  /**
26606
27094
  * 初始化节点拖入关系处理
26607
27095
  * @author lxm
@@ -27094,7 +27582,7 @@ var TreeController = class extends MDControlController {
27094
27582
  const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
27095
27583
  if (allowOrder === true) {
27096
27584
  if (!sortAppDEFieldId) {
27097
- throw new RuntimeModelError63(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
27585
+ throw new RuntimeModelError64(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
27098
27586
  }
27099
27587
  const sortField = sortAppDEFieldId.toLowerCase();
27100
27588
  const isAsc = sortDir === "ASC";
@@ -27175,7 +27663,7 @@ var TreeController = class extends MDControlController {
27175
27663
  async modifyNodeText(nodeData, text) {
27176
27664
  const model = this.getNodeModel(nodeData._nodeId);
27177
27665
  if (!model.allowEditText) {
27178
- throw new RuntimeModelError63(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
27666
+ throw new RuntimeModelError64(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
27179
27667
  }
27180
27668
  if (!nodeData._deData) {
27181
27669
  throw new RuntimeError57("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
@@ -27539,7 +28027,7 @@ var WizardPanelController = class extends ControlController {
27539
28027
  };
27540
28028
 
27541
28029
  // src/controller/control/md-ctrl/md-ctrl.controller.ts
27542
- import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
28030
+ import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
27543
28031
  import { isNil as isNil25 } from "ramda";
27544
28032
 
27545
28033
  // src/controller/control/md-ctrl/md-ctrl.service.ts
@@ -27746,7 +28234,7 @@ var MDCtrlController = class extends MDControlController {
27746
28234
  const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
27747
28235
  if (enableGroup && groupMode) {
27748
28236
  if (!groupAppDEFieldId) {
27749
- throw new RuntimeModelError64(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
28237
+ throw new RuntimeModelError65(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
27750
28238
  }
27751
28239
  if (groupMode === "AUTO") {
27752
28240
  this.handleAutoGroup();
@@ -27813,7 +28301,7 @@ var MDCtrlController = class extends MDControlController {
27813
28301
  async handleCodeListGroup() {
27814
28302
  const { groupAppDEFieldId, groupCodeListId } = this.model;
27815
28303
  if (!groupCodeListId) {
27816
- throw new RuntimeModelError64(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
28304
+ throw new RuntimeModelError65(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
27817
28305
  }
27818
28306
  const { items } = this.state;
27819
28307
  const groupMap = /* @__PURE__ */ new Map();
@@ -27843,7 +28331,7 @@ var MDCtrlController = class extends MDControlController {
27843
28331
  };
27844
28332
 
27845
28333
  // src/controller/control/kanban/kanban.controller.ts
27846
- import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
28334
+ import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
27847
28335
  import { isNil as isNil26 } from "ramda";
27848
28336
 
27849
28337
  // src/controller/control/kanban/kanban.service.ts
@@ -27921,10 +28409,10 @@ var KanbanController = class extends DataViewControlController {
27921
28409
  const sortField = this.model.minorSortAppDEFieldId;
27922
28410
  const { minorSortDir } = this.model;
27923
28411
  if (!sortField) {
27924
- throw new RuntimeModelError65(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
28412
+ throw new RuntimeModelError66(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
27925
28413
  }
27926
28414
  if (!minorSortDir) {
27927
- throw new RuntimeModelError65(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
28415
+ throw new RuntimeModelError66(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
27928
28416
  }
27929
28417
  const isAsc = minorSortDir === "ASC";
27930
28418
  items.forEach((item) => {
@@ -28068,7 +28556,7 @@ var KanbanController = class extends DataViewControlController {
28068
28556
  async handleCodeListGroup() {
28069
28557
  const { groupAppDEFieldId, groupCodeListId } = this.model;
28070
28558
  if (!groupCodeListId) {
28071
- throw new RuntimeModelError65(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
28559
+ throw new RuntimeModelError66(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
28072
28560
  }
28073
28561
  const { items } = this.state;
28074
28562
  const groupMap = /* @__PURE__ */ new Map();
@@ -28364,10 +28852,11 @@ var KanbanController = class extends DataViewControlController {
28364
28852
  // src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
28365
28853
  import {
28366
28854
  RuntimeError as RuntimeError60,
28855
+ RuntimeModelError as RuntimeModelError67,
28367
28856
  awaitTimeout as awaitTimeout3,
28368
28857
  recursiveIterate as recursiveIterate11
28369
28858
  } from "@ibiz-template/core";
28370
- import { clone as clone27 } from "ramda";
28859
+ import { clone as clone28 } from "ramda";
28371
28860
 
28372
28861
  // src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
28373
28862
  var TreeGridExService = class extends TreeService {
@@ -28637,12 +29126,14 @@ var TreeGridExController = class extends TreeController {
28637
29126
  return;
28638
29127
  }
28639
29128
  const nodeModel = this.getNodeModel(nodeData._nodeId);
28640
- const { appDataEntityId } = nodeModel;
29129
+ const { appDataEntityId, updateAppDEActionId } = nodeModel;
28641
29130
  const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
28642
29131
  if (isCreate) {
28643
29132
  throw new RuntimeError60("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
28644
29133
  }
28645
- const methodAction = "update";
29134
+ if (!updateAppDEActionId) {
29135
+ throw new RuntimeModelError67(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
29136
+ }
28646
29137
  const deName = calcDeCodeNameById(appDataEntityId);
28647
29138
  const tempContext = this.context.clone();
28648
29139
  tempContext[deName] = nodeData._deData.srfkey;
@@ -28651,7 +29142,7 @@ var TreeGridExController = class extends TreeController {
28651
29142
  try {
28652
29143
  res = await app.deService.exec(
28653
29144
  appDataEntityId,
28654
- methodAction,
29145
+ updateAppDEActionId,
28655
29146
  tempContext,
28656
29147
  nodeData._deData
28657
29148
  );
@@ -28801,7 +29292,7 @@ var TreeGridExController = class extends TreeController {
28801
29292
  throw new RuntimeError60("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
28802
29293
  }
28803
29294
  if (row.data._deData.srfuf === 1 /* UPDATE */) {
28804
- row.cacheData = clone27(row.data);
29295
+ row.cacheData = clone28(row.data);
28805
29296
  const defaultVal = this.calcDefaultValue(row.data, false);
28806
29297
  Object.assign(row.data, defaultVal);
28807
29298
  }
@@ -28912,9 +29403,9 @@ var TreeGridExColumnController = class {
28912
29403
  import {
28913
29404
  DataTypes as DataTypes5,
28914
29405
  RuntimeError as RuntimeError61,
28915
- RuntimeModelError as RuntimeModelError66
29406
+ RuntimeModelError as RuntimeModelError68
28916
29407
  } from "@ibiz-template/core";
28917
- import { clone as clone28 } from "ramda";
29408
+ import { clone as clone29 } from "ramda";
28918
29409
  import dayjs6 from "dayjs";
28919
29410
  var TreeGridExNodeColumnController = class {
28920
29411
  /**
@@ -28943,7 +29434,7 @@ var TreeGridExNodeColumnController = class {
28943
29434
  }
28944
29435
  );
28945
29436
  if (!nodeColumn || !nodeDataItem) {
28946
- throw new RuntimeModelError66(
29437
+ throw new RuntimeModelError68(
28947
29438
  nodeModel,
28948
29439
  "\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u6570\u636E\u9879")
28949
29440
  );
@@ -28957,7 +29448,7 @@ var TreeGridExNodeColumnController = class {
28957
29448
  }
28958
29449
  );
28959
29450
  if (!nodeEditItem) {
28960
- throw new RuntimeModelError66(
29451
+ throw new RuntimeModelError68(
28961
29452
  nodeModel,
28962
29453
  "\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u7F16\u8F91\u9879\u6A21\u578B")
28963
29454
  );
@@ -29123,7 +29614,7 @@ var TreeGridExNodeColumnController = class {
29123
29614
  srfkey: value,
29124
29615
  ...wfContext
29125
29616
  });
29126
- const tempParams = clone28(this.params);
29617
+ const tempParams = clone29(this.params);
29127
29618
  const { userParam } = this.nodeColumn;
29128
29619
  if (userParam) {
29129
29620
  const { navigateContexts, navigateParams } = parseUserParams(userParam);
@@ -29357,7 +29848,7 @@ var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
29357
29848
  };
29358
29849
 
29359
29850
  // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
29360
- import { RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
29851
+ import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
29361
29852
  var TreeGridExUAColumnController = class extends TreeGridExColumnController {
29362
29853
  /**
29363
29854
  * 给rowController初始化操作列的状态
@@ -29371,7 +29862,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
29371
29862
  const { deuiactionGroup } = this.model;
29372
29863
  if (!deuiactionGroup) {
29373
29864
  return;
29374
- throw new RuntimeModelError67(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
29865
+ throw new RuntimeModelError69(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
29375
29866
  }
29376
29867
  if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
29377
29868
  ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -29425,7 +29916,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
29425
29916
  };
29426
29917
 
29427
29918
  // src/controller/control/tree-grid/tree-grid.controller.ts
29428
- import { RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
29919
+ import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
29429
29920
  var TreeGridController = class extends GridController {
29430
29921
  constructor() {
29431
29922
  super(...arguments);
@@ -29470,10 +29961,10 @@ var TreeGridController = class extends GridController {
29470
29961
  return item.treeColumnMode === 2 || item.treeColumnMode === 3;
29471
29962
  });
29472
29963
  if (!treeGridParent) {
29473
- throw new RuntimeModelError68(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
29964
+ throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
29474
29965
  }
29475
29966
  if (!treeGridValue) {
29476
- throw new RuntimeModelError68(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
29967
+ throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
29477
29968
  }
29478
29969
  this.treeGridValueField = treeGridValue.appDEFieldId.toLowerCase();
29479
29970
  this.treeGridParentField = treeGridParent.appDEFieldId.toLowerCase();
@@ -31198,8 +31689,8 @@ var ViewEngineBase = class {
31198
31689
  };
31199
31690
 
31200
31691
  // src/engine/md-view.engine.ts
31201
- import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
31202
- import { clone as clone29 } from "ramda";
31692
+ import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
31693
+ import { clone as clone30 } from "ramda";
31203
31694
  var MDViewEngine = class extends ViewEngineBase {
31204
31695
  /**
31205
31696
  * 多数据部件名称
@@ -31382,7 +31873,7 @@ var MDViewEngine = class extends ViewEngineBase {
31382
31873
  view: this.view
31383
31874
  }));
31384
31875
  if (result === -1) {
31385
- throw new RuntimeModelError69(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
31876
+ throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
31386
31877
  } else {
31387
31878
  return {
31388
31879
  cancel: !result.ok
@@ -31405,9 +31896,9 @@ var MDViewEngine = class extends ViewEngineBase {
31405
31896
  (item) => item.id === "newdata"
31406
31897
  );
31407
31898
  if (!openAppViewLogic) {
31408
- throw new RuntimeModelError69(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
31899
+ throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
31409
31900
  }
31410
- const params = clone29(this.view.params);
31901
+ const params = clone30(this.view.params);
31411
31902
  if (copyMode) {
31412
31903
  params.srfcopymode = copyMode;
31413
31904
  }
@@ -31419,7 +31910,7 @@ var MDViewEngine = class extends ViewEngineBase {
31419
31910
  view: this.view
31420
31911
  }));
31421
31912
  if (result === -1) {
31422
- throw new RuntimeModelError69(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
31913
+ throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
31423
31914
  } else {
31424
31915
  return {
31425
31916
  cancel: !result.ok
@@ -31587,6 +32078,13 @@ var GlobalUtil = class {
31587
32078
  * @date 2023-09-26 05:04:26
31588
32079
  */
31589
32080
  this.error = new ErrorHandlerCenter();
32081
+ /**
32082
+ * 视图堆栈
32083
+ *
32084
+ * @author chitanda
32085
+ * @date 2024-01-18 14:01:23
32086
+ */
32087
+ this.viewStack = new ViewStack();
31590
32088
  this.error.register(new DefaultErrorHandler());
31591
32089
  }
31592
32090
  /**
@@ -31730,13 +32228,13 @@ var ScriptExecutor = class extends LogicExecutor {
31730
32228
  };
31731
32229
 
31732
32230
  // src/logic-scheduler/executor/app-de-ui-logic-executor.ts
31733
- import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
32231
+ import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
31734
32232
  var AppDEUILogicExecutor = class extends LogicExecutor {
31735
32233
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
31736
32234
  execute(executeParams) {
31737
32235
  const { appDEUILogicId, appDataEntityId } = this.logic;
31738
32236
  if (!appDEUILogicId) {
31739
- throw new RuntimeModelError70(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
32237
+ throw new RuntimeModelError72(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
31740
32238
  }
31741
32239
  execUILogic(appDEUILogicId, appDataEntityId, executeParams);
31742
32240
  }
@@ -32194,7 +32692,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
32194
32692
  };
32195
32693
 
32196
32694
  // src/logic-scheduler/trigger/timer-trigger.ts
32197
- import { RuntimeError as RuntimeError68, RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
32695
+ import { RuntimeError as RuntimeError68, RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
32198
32696
  var TimerTrigger = class extends LogicTrigger {
32199
32697
  constructor() {
32200
32698
  super(...arguments);
@@ -32202,7 +32700,7 @@ var TimerTrigger = class extends LogicTrigger {
32202
32700
  }
32203
32701
  start() {
32204
32702
  if (!this.logic.timer) {
32205
- throw new RuntimeModelError71(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
32703
+ throw new RuntimeModelError73(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
32206
32704
  }
32207
32705
  this.timer = setInterval(() => {
32208
32706
  if (!this.scheduler.defaultParamsCb) {
@@ -32224,7 +32722,7 @@ var TimerTrigger = class extends LogicTrigger {
32224
32722
  import {
32225
32723
  ModelError as ModelError34,
32226
32724
  RuntimeError as RuntimeError69,
32227
- RuntimeModelError as RuntimeModelError72
32725
+ RuntimeModelError as RuntimeModelError74
32228
32726
  } from "@ibiz-template/core";
32229
32727
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
32230
32728
  var AppUILogicExecutor = class extends LogicExecutor {
@@ -32270,7 +32768,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32270
32768
  } else {
32271
32769
  openViewRef = appUILogic.openDataAppView;
32272
32770
  if (!openViewRef) {
32273
- throw new RuntimeModelError72(
32771
+ throw new RuntimeModelError74(
32274
32772
  appUILogic,
32275
32773
  "opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
32276
32774
  );
@@ -32278,7 +32776,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32278
32776
  }
32279
32777
  const openView = openViewRef.refAppViewId;
32280
32778
  if (!openView) {
32281
- throw new RuntimeModelError72(
32779
+ throw new RuntimeModelError74(
32282
32780
  appUILogic,
32283
32781
  "opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
32284
32782
  );
@@ -32308,7 +32806,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32308
32806
  );
32309
32807
  const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
32310
32808
  if (!typeFileName) {
32311
- throw new RuntimeModelError72(
32809
+ throw new RuntimeModelError74(
32312
32810
  appUILogic,
32313
32811
  "".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
32314
32812
  );
@@ -32316,7 +32814,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32316
32814
  const { data } = parameters;
32317
32815
  const formTypeValue = data[0][typeFileName];
32318
32816
  if (!formTypeValue) {
32319
- throw new RuntimeModelError72(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
32817
+ throw new RuntimeModelError74(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
32320
32818
  }
32321
32819
  const openViewRefs = appUILogic.openDataAppViews;
32322
32820
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
@@ -32358,7 +32856,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32358
32856
  return viewRef.refMode.toLowerCase() !== parentDeName;
32359
32857
  });
32360
32858
  if (!newViewRef) {
32361
- throw new RuntimeModelError72(
32859
+ throw new RuntimeModelError74(
32362
32860
  appUILogic,
32363
32861
  "\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
32364
32862
  );
@@ -32368,7 +32866,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32368
32866
  } else {
32369
32867
  newViewRef = newDataAppView;
32370
32868
  if (!newViewRef || !newViewRef.refAppViewId) {
32371
- throw new RuntimeModelError72(
32869
+ throw new RuntimeModelError74(
32372
32870
  appUILogic,
32373
32871
  "newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
32374
32872
  );
@@ -32432,7 +32930,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32432
32930
  const { wizardAppView, newDataAppViews } = appUILogic;
32433
32931
  const { context, params, ...rest } = parameters;
32434
32932
  if (!wizardAppView || !wizardAppView.refAppViewId) {
32435
- throw new RuntimeModelError72(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
32933
+ throw new RuntimeModelError74(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
32436
32934
  }
32437
32935
  const result = await ibiz.commands.execute(
32438
32936
  OpenAppViewCommand.TAG,
@@ -32483,7 +32981,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32483
32981
  const minorDERs = selfDe.minorAppDERSs;
32484
32982
  const pickParentDeName = newViewRef.refMode.toLowerCase();
32485
32983
  if (!minorDERs) {
32486
- throw new RuntimeModelError72(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
32984
+ throw new RuntimeModelError74(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
32487
32985
  }
32488
32986
  let pickParentFieldName = "";
32489
32987
  minorDERs == null ? void 0 : minorDERs.forEach((item) => {
@@ -32580,12 +33078,12 @@ var ControlEventTrigger = class extends LogicTrigger {
32580
33078
  };
32581
33079
 
32582
33080
  // src/logic-scheduler/executor/app-ui-action-executor.ts
32583
- import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
33081
+ import { RuntimeModelError as RuntimeModelError75 } from "@ibiz-template/core";
32584
33082
  var AppDEUIActionExecutor = class extends LogicExecutor {
32585
33083
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
32586
33084
  execute(executeParams) {
32587
33085
  if (!this.logic.appDEUIActionId) {
32588
- throw new RuntimeModelError73(
33086
+ throw new RuntimeModelError75(
32589
33087
  this.logic,
32590
33088
  "\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
32591
33089
  );
@@ -32970,6 +33468,7 @@ export {
32970
33468
  ViewLayoutPanelController,
32971
33469
  ViewMode,
32972
33470
  ViewPortletController,
33471
+ ViewStack,
32973
33472
  ViewType,
32974
33473
  WFStepTraceViewController,
32975
33474
  WFWithdrawUIActionProvider,