@ibiz-template/runtime 0.5.0-beta.2 → 0.5.0-beta.4

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 (63) hide show
  1. package/dist/index.esm.js +774 -633
  2. package/dist/index.system.min.js +1 -4
  3. package/out/controller/common/control/md-control.controller.d.ts +10 -0
  4. package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
  5. package/out/controller/common/control/md-control.controller.js +37 -0
  6. package/out/controller/control/data-view/data-view.controller.d.ts +8 -7
  7. package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
  8. package/out/controller/control/data-view/data-view.controller.js +9 -21
  9. package/out/controller/control/form/edit-form/edit-form.controller.d.ts +20 -0
  10. package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
  11. package/out/controller/control/form/edit-form/edit-form.controller.js +53 -8
  12. package/out/controller/control/grid/grid/grid.controller.d.ts +10 -0
  13. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  14. package/out/controller/control/grid/grid/grid.controller.js +16 -14
  15. package/out/controller/control/list/list.controller.d.ts +8 -7
  16. package/out/controller/control/list/list.controller.d.ts.map +1 -1
  17. package/out/controller/control/list/list.controller.js +9 -21
  18. package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts +0 -9
  19. package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
  20. package/out/controller/control/md-ctrl/md-ctrl.controller.js +0 -23
  21. package/out/controller/control/search-bar/search-bar.controller.d.ts +9 -1
  22. package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
  23. package/out/controller/control/search-bar/search-bar.controller.js +34 -11
  24. package/out/controller/control/tree/tree.controller.d.ts +13 -5
  25. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  26. package/out/controller/control/tree/tree.controller.js +39 -22
  27. package/out/controller/hub.controller.d.ts.map +1 -1
  28. package/out/controller/hub.controller.js +11 -2
  29. package/out/global/global-util/global-util.d.ts +1 -2
  30. package/out/global/global-util/global-util.d.ts.map +1 -1
  31. package/out/global/global-util/global-util.js +1 -2
  32. package/out/interface/controller/state/control/i-search-bar.state.d.ts +1 -5
  33. package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
  34. package/out/interface/service/i-data-entity/i-data-entity.d.ts +17 -0
  35. package/out/interface/service/i-data-entity/i-data-entity.d.ts.map +1 -1
  36. package/out/service/app-data-entity/app-data-entity.d.ts +9 -0
  37. package/out/service/app-data-entity/app-data-entity.d.ts.map +1 -1
  38. package/out/service/app-data-entity/app-data-entity.js +41 -11
  39. package/out/service/dto/method.dto.js +1 -1
  40. package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
  41. package/out/service/utils/de-cache/de-cache.js +3 -0
  42. package/out/ui-action/provider/loginout-ui-action-provider.js +1 -1
  43. package/out/utils/index.d.ts +1 -0
  44. package/out/utils/index.d.ts.map +1 -1
  45. package/out/utils/index.js +1 -0
  46. package/package.json +6 -6
  47. package/src/controller/common/control/md-control.controller.ts +46 -0
  48. package/src/controller/control/data-view/data-view.controller.ts +12 -19
  49. package/src/controller/control/form/edit-form/edit-form.controller.ts +51 -7
  50. package/src/controller/control/grid/grid/grid.controller.ts +20 -12
  51. package/src/controller/control/list/list.controller.ts +12 -19
  52. package/src/controller/control/md-ctrl/md-ctrl.controller.ts +0 -22
  53. package/src/controller/control/search-bar/search-bar.controller.ts +45 -11
  54. package/src/controller/control/tree/tree.controller.ts +62 -26
  55. package/src/controller/hub.controller.ts +11 -2
  56. package/src/global/global-util/global-util.ts +1 -3
  57. package/src/interface/controller/state/control/i-search-bar.state.ts +1 -6
  58. package/src/interface/service/i-data-entity/i-data-entity.ts +19 -0
  59. package/src/service/app-data-entity/app-data-entity.ts +46 -11
  60. package/src/service/dto/method.dto.ts +1 -1
  61. package/src/service/utils/de-cache/de-cache.ts +3 -0
  62. package/src/ui-action/provider/loginout-ui-action-provider.ts +1 -1
  63. package/src/utils/index.ts +1 -0
package/dist/index.esm.js CHANGED
@@ -76,7 +76,91 @@ var RegisterCenter = class {
76
76
  };
77
77
 
78
78
  // src/command/app/app-func/app-func.ts
79
- import { ModelError as ModelError15, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
79
+ import { ModelError as ModelError16, RuntimeError as RuntimeError24 } from "@ibiz-template/core";
80
+
81
+ // src/utils/error-handler/default-error-handler.ts
82
+ import {
83
+ RuntimeModelError,
84
+ ModelError,
85
+ HttpError,
86
+ NoticeError,
87
+ RuntimeError
88
+ } from "@ibiz-template/core";
89
+ var DefaultErrorHandler = class {
90
+ handle(error) {
91
+ if (error instanceof RuntimeModelError || error instanceof ModelError) {
92
+ ibiz.message.error(error.message, 10, true);
93
+ } else if (error instanceof HttpError) {
94
+ if (error.status === 401) {
95
+ ibiz.message.error("\u6CA1\u6709\u6CE8\u518C\u65E0\u6743\u9650\u9519\u8BEF\u5904\u7406\u5668");
96
+ } else {
97
+ ibiz.notification.error({
98
+ title: "",
99
+ desc: error.message,
100
+ duration: 10
101
+ });
102
+ }
103
+ } else if (error instanceof NoticeError) {
104
+ ibiz.message.error(error.message, error.duration, error.duration === 0);
105
+ } else if (error instanceof RuntimeError) {
106
+ ibiz.message.error(error.message, 10, true);
107
+ }
108
+ ibiz.log.error(error);
109
+ return true;
110
+ }
111
+ };
112
+
113
+ // src/utils/error-handler/error-handler-center.ts
114
+ var ErrorHandlerCenter = class {
115
+ constructor() {
116
+ /**
117
+ * 处理器集合
118
+ * @author lxm
119
+ * @date 2023-09-26 04:56:29
120
+ * @type {IErrorHandler[]}
121
+ */
122
+ this.handlers = [];
123
+ }
124
+ /**
125
+ * 注册处理器(后注册的优先级更高)
126
+ * @author lxm
127
+ * @date 2023-09-26 04:59:06
128
+ * @param {IErrorHandler} handler
129
+ */
130
+ register(handler) {
131
+ this.handlers.unshift(handler);
132
+ }
133
+ /**
134
+ * 处理单个报错
135
+ * @author lxm
136
+ * @date 2023-09-26 05:18:18
137
+ * @protected
138
+ * @param {unknown} error
139
+ */
140
+ handleSingle(error) {
141
+ const find = this.handlers.find((item) => {
142
+ return !!item.handle(error);
143
+ });
144
+ if (!find) {
145
+ ibiz.log.error("\u6CA1\u6709\u627E\u5230\u80FD\u5904\u7406\u8BE5\u9519\u8BEF\u7684\u5904\u7406\u5668", error);
146
+ }
147
+ }
148
+ /**
149
+ * 按顺序检测处理器,最先满足条件的处理该异常
150
+ * @author lxm
151
+ * @date 2023-09-26 05:01:08
152
+ * @param {unknown} error
153
+ */
154
+ handle(error) {
155
+ if (error instanceof Array) {
156
+ error.forEach((item) => {
157
+ this.handleSingle(item);
158
+ });
159
+ } else {
160
+ this.handleSingle(error);
161
+ }
162
+ }
163
+ };
80
164
 
81
165
  // src/utils/handlebars/utils/helper/helper.ts
82
166
  var HelperUtil = class {
@@ -627,12 +711,12 @@ function calcNavParams(model, originParams) {
627
711
  }
628
712
 
629
713
  // src/utils/open-redirect-view/open-redirect-view.ts
630
- import { RuntimeError, RuntimeModelError as RuntimeModelError2 } from "@ibiz-template/core";
714
+ import { RuntimeError as RuntimeError2, RuntimeModelError as RuntimeModelError3 } from "@ibiz-template/core";
631
715
  import { isNilOrEmpty as isNilOrEmpty2, notNilEmpty as notNilEmpty3 } from "qx-util";
632
716
  import qs from "qs";
633
717
 
634
718
  // src/model/utils/util.ts
635
- import { RuntimeModelError } from "@ibiz-template/core";
719
+ import { RuntimeModelError as RuntimeModelError2 } from "@ibiz-template/core";
636
720
  function findModelChild(models, id) {
637
721
  if (models && id) {
638
722
  const model = models.find((item) => {
@@ -695,11 +779,11 @@ function parseUserParams(userParams) {
695
779
  function getPFPlugin(id, appId) {
696
780
  const app = ibiz.hub.getApp(appId);
697
781
  if (!app) {
698
- throw new RuntimeModelError(app, "\u672A\u627E\u5230\u5E94\u7528");
782
+ throw new RuntimeModelError2(app, "\u672A\u627E\u5230\u5E94\u7528");
699
783
  }
700
784
  const { model } = app;
701
785
  if (!model.appPFPluginRefs) {
702
- throw new RuntimeModelError(model, "\u5E94\u7528\u672A\u914D\u7F6E\u63D2\u4EF6");
786
+ throw new RuntimeModelError2(model, "\u5E94\u7528\u672A\u914D\u7F6E\u63D2\u4EF6");
703
787
  }
704
788
  const plugin = model.appPFPluginRefs.find(
705
789
  (item) => item.pluginCode.toLowerCase() === id.toLowerCase()
@@ -1068,12 +1152,12 @@ async function toLocalOpenWFRedirectView(context, linkUrl, opts = {}) {
1068
1152
  const params = qs.parse(queryStr, { delimiter: ";" });
1069
1153
  const deName = params.srfdename || "";
1070
1154
  if (!deName) {
1071
- throw new RuntimeError("\u91CD\u5B9A\u5411\u53C2\u6570\u7F3A\u5C11\u5B9E\u4F53\u540D\u79F0");
1155
+ throw new RuntimeError2("\u91CD\u5B9A\u5411\u53C2\u6570\u7F3A\u5C11\u5B9E\u4F53\u540D\u79F0");
1072
1156
  }
1073
1157
  const app = ibiz.hub.getApp(context.srfappid);
1074
1158
  const deCodeName = app.deName2DeCodeName.get(deName.toUpperCase());
1075
1159
  if (!deCodeName) {
1076
- throw new RuntimeError("\u672A\u627E\u5230\u6307\u5B9A\u5B9E\u4F53\u7684codeName: ".concat(deName));
1160
+ throw new RuntimeError2("\u672A\u627E\u5230\u6307\u5B9A\u5B9E\u4F53\u7684codeName: ".concat(deName));
1077
1161
  }
1078
1162
  params[deCodeName.toLowerCase()] = params[deName.toLowerCase()];
1079
1163
  const deRdViewCodeName = "".concat(deCodeName).concat(ibiz.env.isMob ? "Mob" : "", "RedirectView");
@@ -1137,7 +1221,7 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
1137
1221
  );
1138
1222
  return { type: "view", ...toView };
1139
1223
  }
1140
- throw new RuntimeError("\u672A\u652F\u6301\u7684linkUrl\u683C\u5F0F:".concat(linkUrl));
1224
+ throw new RuntimeError2("\u672A\u652F\u6301\u7684linkUrl\u683C\u5F0F:".concat(linkUrl));
1141
1225
  }
1142
1226
  }
1143
1227
  } finally {
@@ -1170,7 +1254,7 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
1170
1254
  opts: { ...opts, data: [curData] }
1171
1255
  };
1172
1256
  }
1173
- throw new RuntimeModelError2(refView, "\u672A\u914D\u7F6E\u5B9E\u9645\u5F15\u7528\u89C6\u56FE");
1257
+ throw new RuntimeModelError3(refView, "\u672A\u914D\u7F6E\u5B9E\u9645\u5F15\u7528\u89C6\u56FE");
1174
1258
  } else {
1175
1259
  ibiz.log.error(
1176
1260
  "\u91CD\u5B9A\u5411\u89C6\u56FE\u5F15\u7528\u6709\uFF1A",
@@ -1180,7 +1264,7 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
1180
1264
  title: realTitle
1181
1265
  }))
1182
1266
  );
1183
- throw new RuntimeModelError2(
1267
+ throw new RuntimeModelError3(
1184
1268
  appView,
1185
1269
  "\u672A\u627E\u5230\u91CD\u5B9A\u5411\u6807\u8BC6[".concat(rdTag, "]\u6216[").concat(deRdTag, "]\u6216\u5DE5\u4F5C\u6D41[").concat(wfRdTag, "]\u5BF9\u5E94\u89C6\u56FE")
1186
1270
  );
@@ -1256,7 +1340,7 @@ async function calcDERdTag(entity, rdView, params, data) {
1256
1340
  }
1257
1341
 
1258
1342
  // src/utils/verify/verify.ts
1259
- import { RuntimeError as RuntimeError2 } from "@ibiz-template/core";
1343
+ import { RuntimeError as RuntimeError3 } from "@ibiz-template/core";
1260
1344
  import { isNilOrEmpty as isNilOrEmpty3, notNilEmpty as notNilEmpty4 } from "qx-util";
1261
1345
  import { isNil } from "ramda";
1262
1346
  function testCond(value, op, value2) {
@@ -1296,7 +1380,7 @@ function testCond(value, op, value2) {
1296
1380
  case "RIGHTLIKE":
1297
1381
  return strContain(value, value2, "end");
1298
1382
  default:
1299
- throw new RuntimeError2("\u503C\u64CD\u4F5C\uFF1A".concat(op, "\uFF0C\u6682\u672A\u652F\u6301"));
1383
+ throw new RuntimeError3("\u503C\u64CD\u4F5C\uFF1A".concat(op, "\uFF0C\u6682\u672A\u652F\u6301"));
1300
1384
  }
1301
1385
  }
1302
1386
  function compare(value, value2) {
@@ -1310,7 +1394,7 @@ function compare(value, value2) {
1310
1394
  if (!Number.isNaN(date1) && !Number.isNaN(date2)) {
1311
1395
  return compareNumber(date1, date2);
1312
1396
  }
1313
- throw new RuntimeError2("".concat(value, " \u548C ").concat(value2, " \u65E0\u6CD5\u6BD4\u8F83\u5927\u5C0F"));
1397
+ throw new RuntimeError3("".concat(value, " \u548C ").concat(value2, " \u65E0\u6CD5\u6BD4\u8F83\u5927\u5C0F"));
1314
1398
  }
1315
1399
  function compareNumber(value, value2) {
1316
1400
  if (Number.isNaN(value)) {
@@ -1329,7 +1413,7 @@ function compareNumber(value, value2) {
1329
1413
  }
1330
1414
  function contains(value, value2) {
1331
1415
  if (!value2 || typeof value2 !== "string") {
1332
- throw new RuntimeError2("\u8303\u56F4\u6BD4\u8F83\u7684\u6761\u4EF6\u503C\u4E0D\u5B58\u6216\u8005\u4E0D\u662F\u5B57\u7B26\u4E32");
1416
+ throw new RuntimeError3("\u8303\u56F4\u6BD4\u8F83\u7684\u6761\u4EF6\u503C\u4E0D\u5B58\u6216\u8005\u4E0D\u662F\u5B57\u7B26\u4E32");
1333
1417
  }
1334
1418
  if (value) {
1335
1419
  const arr = value2.split(",");
@@ -1355,7 +1439,7 @@ function strContain(value, value2, mode) {
1355
1439
  }
1356
1440
 
1357
1441
  // src/utils/verify/de-rule-verify.ts
1358
- import { RuntimeError as RuntimeError3 } from "@ibiz-template/core";
1442
+ import { RuntimeError as RuntimeError4 } from "@ibiz-template/core";
1359
1443
  import { isNilOrEmpty as isNilOrEmpty4 } from "qx-util";
1360
1444
  import { isEmpty as isEmpty2, isNil as isNil2 } from "ramda";
1361
1445
 
@@ -1717,7 +1801,7 @@ function checkFieldSimpleRule(value, op, value2, errorInfo, paramType, form, pri
1717
1801
  const result = testCond(value, op, value2);
1718
1802
  if (!result) {
1719
1803
  if (primaryModel) {
1720
- throw new RuntimeError3(errorInfo);
1804
+ throw new RuntimeError4(errorInfo);
1721
1805
  }
1722
1806
  }
1723
1807
  return !result;
@@ -1729,7 +1813,7 @@ function checkFieldStringLengthRule(viewValue, minLength, indexOfMin, maxLength,
1729
1813
  const judge = isNilOrEmpty4(viewValue);
1730
1814
  if (judge) {
1731
1815
  if (primaryModel) {
1732
- throw new RuntimeError3("\u503C\u4E3A\u7A7A");
1816
+ throw new RuntimeError4("\u503C\u4E3A\u7A7A");
1733
1817
  }
1734
1818
  errorInfo = "\u503C\u4E3A\u7A7A";
1735
1819
  return true;
@@ -1739,13 +1823,13 @@ function checkFieldStringLengthRule(viewValue, minLength, indexOfMin, maxLength,
1739
1823
  if (indexOfMin) {
1740
1824
  if (viewValueLength < minLength) {
1741
1825
  if (primaryModel) {
1742
- throw new RuntimeError3(errorInfo);
1826
+ throw new RuntimeError4(errorInfo);
1743
1827
  }
1744
1828
  return true;
1745
1829
  }
1746
1830
  } else if (viewValueLength <= minLength) {
1747
1831
  if (primaryModel) {
1748
- throw new RuntimeError3(errorInfo);
1832
+ throw new RuntimeError4(errorInfo);
1749
1833
  }
1750
1834
  return true;
1751
1835
  }
@@ -1754,13 +1838,13 @@ function checkFieldStringLengthRule(viewValue, minLength, indexOfMin, maxLength,
1754
1838
  if (indexOfMax) {
1755
1839
  if (viewValueLength > maxLength) {
1756
1840
  if (primaryModel) {
1757
- throw new RuntimeError3(errorInfo);
1841
+ throw new RuntimeError4(errorInfo);
1758
1842
  }
1759
1843
  return true;
1760
1844
  }
1761
1845
  } else if (viewValueLength >= maxLength) {
1762
1846
  if (primaryModel) {
1763
- throw new RuntimeError3(errorInfo);
1847
+ throw new RuntimeError4(errorInfo);
1764
1848
  }
1765
1849
  return true;
1766
1850
  }
@@ -1775,7 +1859,7 @@ function checkFieldRegExRule(viewValue, strReg, errorInfo, primaryModel) {
1775
1859
  const judge = isNilOrEmpty4(viewValue);
1776
1860
  if (judge) {
1777
1861
  if (primaryModel) {
1778
- throw new RuntimeError3("\u503C\u4E3A\u7A7A");
1862
+ throw new RuntimeError4("\u503C\u4E3A\u7A7A");
1779
1863
  }
1780
1864
  errorInfo = "\u503C\u4E3A\u7A7A";
1781
1865
  return true;
@@ -1783,7 +1867,7 @@ function checkFieldRegExRule(viewValue, strReg, errorInfo, primaryModel) {
1783
1867
  const regExp = new RegExp(strReg);
1784
1868
  if (!regExp.test(viewValue)) {
1785
1869
  if (primaryModel) {
1786
- throw new RuntimeError3(errorInfo);
1870
+ throw new RuntimeError4(errorInfo);
1787
1871
  }
1788
1872
  return true;
1789
1873
  }
@@ -1797,7 +1881,7 @@ function checkFieldValueRangeRule(viewValue, minNumber, indexOfMin, maxNumber, i
1797
1881
  const isEmptyVal = isNilOrEmpty4(viewValue);
1798
1882
  if (isEmptyVal) {
1799
1883
  if (primaryModel) {
1800
- throw new RuntimeError3("\u503C\u4E3A\u7A7A");
1884
+ throw new RuntimeError4("\u503C\u4E3A\u7A7A");
1801
1885
  }
1802
1886
  errorInfo = "\u503C\u4E3A\u7A7A";
1803
1887
  return true;
@@ -1816,13 +1900,13 @@ function checkFieldValueRangeRule(viewValue, minNumber, indexOfMin, maxNumber, i
1816
1900
  if (indexOfMin) {
1817
1901
  if (data < minNumber) {
1818
1902
  if (primaryModel) {
1819
- throw new RuntimeError3(errorInfo);
1903
+ throw new RuntimeError4(errorInfo);
1820
1904
  }
1821
1905
  return true;
1822
1906
  }
1823
1907
  } else if (data <= minNumber) {
1824
1908
  if (primaryModel) {
1825
- throw new RuntimeError3(errorInfo);
1909
+ throw new RuntimeError4(errorInfo);
1826
1910
  }
1827
1911
  return true;
1828
1912
  }
@@ -1831,13 +1915,13 @@ function checkFieldValueRangeRule(viewValue, minNumber, indexOfMin, maxNumber, i
1831
1915
  if (indexOfMax) {
1832
1916
  if (data > maxNumber) {
1833
1917
  if (primaryModel) {
1834
- throw new RuntimeError3(errorInfo);
1918
+ throw new RuntimeError4(errorInfo);
1835
1919
  }
1836
1920
  return true;
1837
1921
  }
1838
1922
  } else if (data >= maxNumber) {
1839
1923
  if (primaryModel) {
1840
- throw new RuntimeError3(errorInfo);
1924
+ throw new RuntimeError4(errorInfo);
1841
1925
  }
1842
1926
  return true;
1843
1927
  }
@@ -1879,13 +1963,13 @@ function checkFieldScriptRule(value, data, scriptCode, errorInfo, primaryModel)
1879
1963
  }
1880
1964
  errorInfo = "";
1881
1965
  if (!resultBoolean && primaryModel) {
1882
- throw new RuntimeError3(errorInfo);
1966
+ throw new RuntimeError4(errorInfo);
1883
1967
  }
1884
1968
  return { isPast: resultBoolean, infoMessage: selfError || errorInfo };
1885
1969
  }
1886
1970
 
1887
1971
  // src/utils/verify/form-dynamic-logic.ts
1888
- import { ModelError, RuntimeModelError as RuntimeModelError3 } from "@ibiz-template/core";
1972
+ import { ModelError as ModelError2, RuntimeModelError as RuntimeModelError4 } from "@ibiz-template/core";
1889
1973
  function isGroupLogic(logic) {
1890
1974
  return logic.logicType === "GROUP";
1891
1975
  }
@@ -1896,7 +1980,7 @@ function verifyFormGroupLogic(data, logic) {
1896
1980
  if (isGroupLogic(logic)) {
1897
1981
  const children = logic.defdlogics;
1898
1982
  if (!children || children.length === 0) {
1899
- throw new RuntimeModelError3(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
1983
+ throw new RuntimeModelError4(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
1900
1984
  }
1901
1985
  let result = true;
1902
1986
  if (logic.groupOP === "AND") {
@@ -1921,11 +2005,11 @@ function verifyFormGroupLogic(data, logic) {
1921
2005
  logic.value
1922
2006
  );
1923
2007
  }
1924
- throw new ModelError(logic, "\u672A\u652F\u6301\u7684\u903B\u8F91\u7C7B\u578B".concat(logic.logicType));
2008
+ throw new ModelError2(logic, "\u672A\u652F\u6301\u7684\u903B\u8F91\u7C7B\u578B".concat(logic.logicType));
1925
2009
  }
1926
2010
 
1927
2011
  // src/utils/verify/panel-dynamic-logic.ts
1928
- import { ModelError as ModelError2, RuntimeModelError as RuntimeModelError4 } from "@ibiz-template/core";
2012
+ import { ModelError as ModelError3, RuntimeModelError as RuntimeModelError5 } from "@ibiz-template/core";
1929
2013
  function isGroupLogic2(logic) {
1930
2014
  return logic.logicType === "GROUP";
1931
2015
  }
@@ -1936,7 +2020,7 @@ function verifyPanelGroupLogic(data, logic) {
1936
2020
  if (isGroupLogic2(logic)) {
1937
2021
  const children = logic.panelItemLogics;
1938
2022
  if (!children || children.length === 0) {
1939
- throw new RuntimeModelError4(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
2023
+ throw new RuntimeModelError5(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
1940
2024
  }
1941
2025
  let result = true;
1942
2026
  if (logic.groupOP === "AND") {
@@ -1961,7 +2045,7 @@ function verifyPanelGroupLogic(data, logic) {
1961
2045
  logic.value
1962
2046
  );
1963
2047
  }
1964
- throw new ModelError2(logic, "\u672A\u652F\u6301\u7684\u903B\u8F91\u7C7B\u578B".concat(logic.logicType));
2048
+ throw new ModelError3(logic, "\u672A\u652F\u6301\u7684\u903B\u8F91\u7C7B\u578B".concat(logic.logicType));
1965
2049
  }
1966
2050
 
1967
2051
  // src/utils/layout-panel-util/layout-panel-util.ts
@@ -2905,7 +2989,7 @@ async function handleAllSettled(values, isThrow = true) {
2905
2989
  }
2906
2990
 
2907
2991
  // src/command/app/open-app-view/open-app-view.ts
2908
- import { ModelError as ModelError14, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
2992
+ import { ModelError as ModelError15, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
2909
2993
  import { clone as clone14 } from "ramda";
2910
2994
 
2911
2995
  // src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
@@ -3009,7 +3093,7 @@ var PSModelCondEngineBase = class {
3009
3093
  };
3010
3094
 
3011
3095
  // src/service/utils/de-dq-cond/ps-model-group-cond-base.ts
3012
- import { RuntimeError as RuntimeError4 } from "@ibiz-template/core";
3096
+ import { RuntimeError as RuntimeError5 } from "@ibiz-template/core";
3013
3097
 
3014
3098
  // src/service/utils/de-dq-cond/ps-model-cond-base.ts
3015
3099
  var PSModelCondBase = class {
@@ -3162,7 +3246,7 @@ var PSModelGroupCondBase = class _PSModelGroupCondBase extends PSModelCondBase {
3162
3246
  }
3163
3247
  });
3164
3248
  } else {
3165
- throw new RuntimeError4("\u503C\u5FC5\u987B\u4E3A\u6570\u7EC4");
3249
+ throw new RuntimeError5("\u503C\u5FC5\u987B\u4E3A\u6570\u7EC4");
3166
3250
  }
3167
3251
  }
3168
3252
  }
@@ -3284,7 +3368,7 @@ _PSDEDQCondEngine.PARAMTYPE_WEBCONTEXT = "WEBCONTEXT";
3284
3368
  var PSDEDQCondEngine = _PSDEDQCondEngine;
3285
3369
 
3286
3370
  // src/register/helper/app-counter-register.ts
3287
- import { RuntimeError as RuntimeError5 } from "@ibiz-template/core";
3371
+ import { RuntimeError as RuntimeError6 } from "@ibiz-template/core";
3288
3372
 
3289
3373
  // src/register/helper/common-register.ts
3290
3374
  async function getPluginRegisterKey(pluginId, appId) {
@@ -3328,14 +3412,14 @@ async function getAppCounterProvider(model) {
3328
3412
  if (counterType === "CUSTOM") {
3329
3413
  provider = getProvider(codeName);
3330
3414
  if (!provider) {
3331
- throw new RuntimeError5("\u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u7CFB\u7EDF\u8BA1\u6570\u5668".concat(codeName, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3415
+ throw new RuntimeError6("\u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u7CFB\u7EDF\u8BA1\u6570\u5668".concat(codeName, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3332
3416
  } else {
3333
3417
  return provider;
3334
3418
  }
3335
3419
  }
3336
3420
  provider = getProvider(counterType);
3337
3421
  if (!provider) {
3338
- throw new RuntimeError5("\u627E\u4E0D\u7CFB\u7EDF\u8BA1\u6570\u5668\u7C7B\u578B".concat(counterType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3422
+ throw new RuntimeError6("\u627E\u4E0D\u7CFB\u7EDF\u8BA1\u6570\u5668\u7C7B\u578B".concat(counterType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3339
3423
  } else {
3340
3424
  return provider;
3341
3425
  }
@@ -3617,7 +3701,7 @@ async function getPortletProvider(model) {
3617
3701
  }
3618
3702
 
3619
3703
  // src/register/helper/ui-action-register.ts
3620
- import { RuntimeError as RuntimeError6 } from "@ibiz-template/core";
3704
+ import { RuntimeError as RuntimeError7 } from "@ibiz-template/core";
3621
3705
  var UIACTION_PROVIDER_PREFIX = "UIACTION";
3622
3706
  function registerUIActionProvider(key, callback) {
3623
3707
  ibiz.register.register("".concat(UIACTION_PROVIDER_PREFIX, "_").concat(key), callback);
@@ -3647,14 +3731,14 @@ async function getUIActionProvider(model) {
3647
3731
  }
3648
3732
  provider = getProvider8(uiactionMode);
3649
3733
  if (!provider) {
3650
- throw new RuntimeError6("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3734
+ throw new RuntimeError7("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3651
3735
  } else {
3652
3736
  return provider;
3653
3737
  }
3654
3738
  }
3655
3739
 
3656
3740
  // src/register/helper/ui-logic-node-register.ts
3657
- import { RuntimeError as RuntimeError7 } from "@ibiz-template/core";
3741
+ import { RuntimeError as RuntimeError8 } from "@ibiz-template/core";
3658
3742
  var UILOGINNODE_PROVIDER_PREFIX = "UI_LOGIN_NODE";
3659
3743
  function registerUILogicNodeProvider(key, callback) {
3660
3744
  ibiz.register.register("".concat(UILOGINNODE_PROVIDER_PREFIX, "_").concat(key), callback);
@@ -3670,7 +3754,7 @@ async function getUILogicNodeProvider(model) {
3670
3754
  if (provider) {
3671
3755
  return provider;
3672
3756
  }
3673
- throw new RuntimeError7(
3757
+ throw new RuntimeError8(
3674
3758
  "\u627E\u4E0D\u5230\u754C\u9762\u903B\u8F91\u524D\u7AEF\u63D2\u4EF6\u8282\u70B9\uFF0C\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668")
3675
3759
  );
3676
3760
  }
@@ -3720,7 +3804,7 @@ async function getViewProvider(model) {
3720
3804
  }
3721
3805
 
3722
3806
  // src/register/helper/async-action-register.ts
3723
- import { RuntimeError as RuntimeError8 } from "@ibiz-template/core";
3807
+ import { RuntimeError as RuntimeError9 } from "@ibiz-template/core";
3724
3808
  var ASYNC_ACTION_PROVIDER_PREFIX = "ASYNC_ACTION";
3725
3809
  function registerAsyncActionProvider(key, callback) {
3726
3810
  ibiz.register.register("".concat(ASYNC_ACTION_PROVIDER_PREFIX, "_").concat(key), callback);
@@ -3733,14 +3817,14 @@ function getProvider10(key) {
3733
3817
  function getAsyncActionProvider(actiontype) {
3734
3818
  const provider = getProvider10(actiontype);
3735
3819
  if (!provider) {
3736
- throw new RuntimeError8("\u627E\u4E0D\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B".concat(actiontype, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3820
+ throw new RuntimeError9("\u627E\u4E0D\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B".concat(actiontype, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3737
3821
  } else {
3738
3822
  return provider;
3739
3823
  }
3740
3824
  }
3741
3825
 
3742
3826
  // src/platform/provider/platform-provider-base.ts
3743
- import { downloadFileFromBlob, RuntimeError as RuntimeError9 } from "@ibiz-template/core";
3827
+ import { downloadFileFromBlob, RuntimeError as RuntimeError10 } from "@ibiz-template/core";
3744
3828
  var PlatformProviderBase = class {
3745
3829
  back() {
3746
3830
  throw new Error("Method not implemented.");
@@ -3758,10 +3842,10 @@ var PlatformProviderBase = class {
3758
3842
  baseURL: ""
3759
3843
  });
3760
3844
  if (response.status !== 200) {
3761
- throw new RuntimeError9("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
3845
+ throw new RuntimeError10("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
3762
3846
  }
3763
3847
  if (!response.data) {
3764
- throw new RuntimeError9("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
3848
+ throw new RuntimeError10("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
3765
3849
  } else {
3766
3850
  const fileName = name;
3767
3851
  downloadFileFromBlob(response.data, fileName);
@@ -3836,7 +3920,7 @@ function getPlatformProvider() {
3836
3920
  }
3837
3921
 
3838
3922
  // src/register/helper/de-method-register.ts
3839
- import { RuntimeError as RuntimeError10 } from "@ibiz-template/core";
3923
+ import { RuntimeError as RuntimeError11 } from "@ibiz-template/core";
3840
3924
  var DEMETHOD_PROVIDER_PREFIX = "DEMETHOD";
3841
3925
  function registerDEMethodProvider(key, callback) {
3842
3926
  ibiz.register.register("".concat(DEMETHOD_PROVIDER_PREFIX, "_").concat(key), callback);
@@ -3862,7 +3946,7 @@ async function getDEMethodProvider(model) {
3862
3946
  }
3863
3947
  provider = getProvider12(methodType);
3864
3948
  if (!provider) {
3865
- throw new RuntimeError10("\u627E\u4E0D\u5B9E\u4F53\u884C\u4E3A\u65B9\u6CD5\u7C7B\u578B\u4E3A".concat(methodType, "\u7684\u9002\u914D\u5668"));
3949
+ throw new RuntimeError11("\u627E\u4E0D\u5B9E\u4F53\u884C\u4E3A\u65B9\u6CD5\u7C7B\u578B\u4E3A".concat(methodType, "\u7684\u9002\u914D\u5668"));
3866
3950
  } else {
3867
3951
  return provider;
3868
3952
  }
@@ -3904,7 +3988,7 @@ async function getTreeGridExColumnProvider(model) {
3904
3988
  }
3905
3989
 
3906
3990
  // src/service/utils/app-counter/app-counter.ts
3907
- import { IBizContext, RuntimeError as RuntimeError11 } from "@ibiz-template/core";
3991
+ import { IBizContext, RuntimeError as RuntimeError12 } from "@ibiz-template/core";
3908
3992
  import { notNilEmpty as notNilEmpty5, QXEvent } from "qx-util";
3909
3993
  import { clone as clone3 } from "ramda";
3910
3994
  var AppCounter = class {
@@ -4009,7 +4093,7 @@ var AppCounter = class {
4009
4093
  * @return {*} {Promise<IData>}
4010
4094
  */
4011
4095
  async load() {
4012
- throw new RuntimeError11("\u672A\u5B9E\u73B0\u8BA1\u6570\u5668\u52A0\u8F7D\u65B9\u6CD5");
4096
+ throw new RuntimeError12("\u672A\u5B9E\u73B0\u8BA1\u6570\u5668\u52A0\u8F7D\u65B9\u6CD5");
4013
4097
  }
4014
4098
  /**
4015
4099
  * 计数器刷新
@@ -4074,7 +4158,7 @@ var AppCounter = class {
4074
4158
  };
4075
4159
 
4076
4160
  // src/service/utils/app-counter/app-de-counter.ts
4077
- import { RuntimeModelError as RuntimeModelError5 } from "@ibiz-template/core";
4161
+ import { RuntimeModelError as RuntimeModelError6 } from "@ibiz-template/core";
4078
4162
  var AppDECounter = class extends AppCounter {
4079
4163
  /**
4080
4164
  * 计数器初始化
@@ -4088,7 +4172,7 @@ var AppDECounter = class extends AppCounter {
4088
4172
  this.appDataEntityId = this.model.appDataEntityId;
4089
4173
  const action = this.model.getAppDEActionId;
4090
4174
  if (!action) {
4091
- throw new RuntimeModelError5(this.model, "\u672A\u627E\u5230\u83B7\u53D6\u8BA1\u6570\u5668\u884C\u4E3A!");
4175
+ throw new RuntimeModelError6(this.model, "\u672A\u627E\u5230\u83B7\u53D6\u8BA1\u6570\u5668\u884C\u4E3A!");
4092
4176
  }
4093
4177
  this.action = action;
4094
4178
  await super.init(context, params);
@@ -4130,7 +4214,7 @@ function presetAppCounterProvider() {
4130
4214
  }
4131
4215
 
4132
4216
  // src/service/utils/de-dq-cond-util/de-dq-cond-util.ts
4133
- import { ModelError as ModelError3 } from "@ibiz-template/core";
4217
+ import { ModelError as ModelError4 } from "@ibiz-template/core";
4134
4218
  var DEDQCondUtil = class {
4135
4219
  /**
4136
4220
  * 根据数据查询获取查询
@@ -4187,7 +4271,7 @@ var DEDQCondUtil = class {
4187
4271
  condArr.push("");
4188
4272
  }
4189
4273
  } else {
4190
- throw new ModelError3(item, "\u6682\u672A\u652F\u6301\u7684\u67E5\u8BE2\u6761\u4EF6\u7C7B\u578B: ".concat(item.condType));
4274
+ throw new ModelError4(item, "\u6682\u672A\u652F\u6301\u7684\u67E5\u8BE2\u6761\u4EF6\u7C7B\u578B: ".concat(item.condType));
4191
4275
  }
4192
4276
  arr.push(condArr);
4193
4277
  });
@@ -4206,7 +4290,7 @@ var DEDQCondUtil = class {
4206
4290
  DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
4207
4291
 
4208
4292
  // src/service/utils/dynamic-code-list/dynamic-code-list.ts
4209
- import { ModelError as ModelError4, RuntimeModelError as RuntimeModelError6 } from "@ibiz-template/core";
4293
+ import { ModelError as ModelError5, RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
4210
4294
  import { isNil as isNil3 } from "ramda";
4211
4295
  var DynamicCodeListCache = class {
4212
4296
  constructor(codeList) {
@@ -4242,7 +4326,7 @@ var DynamicCodeListCache = class {
4242
4326
  if (predefinedType) {
4243
4327
  this.isPredefined = true;
4244
4328
  if (!["OPERATOR", "RUNTIME"].includes(predefinedType)) {
4245
- throw new ModelError4(
4329
+ throw new ModelError5(
4246
4330
  this.codeList,
4247
4331
  "\u9884\u5B9A\u4E49\u7C7B\u578B".concat(predefinedType, "\u6682\u4E0D\u652F\u6301")
4248
4332
  );
@@ -4351,10 +4435,10 @@ var DynamicCodeListCache = class {
4351
4435
  return Object.freeze(res2.data.items);
4352
4436
  }
4353
4437
  if (!appDataEntityId) {
4354
- throw new RuntimeModelError6(this.codeList, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
4438
+ throw new RuntimeModelError7(this.codeList, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
4355
4439
  }
4356
4440
  if (!appDEDataSetId) {
4357
- throw new RuntimeModelError6(this.codeList, "\u672A\u914D\u7F6E\u6570\u636E\u96C6");
4441
+ throw new RuntimeModelError7(this.codeList, "\u672A\u914D\u7F6E\u6570\u636E\u96C6");
4358
4442
  }
4359
4443
  const res = await app.deService.exec(
4360
4444
  appDataEntityId,
@@ -4446,10 +4530,10 @@ var DynamicCodeListCache = class {
4446
4530
  // src/service/utils/de-cache/de-cache.ts
4447
4531
  import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
4448
4532
  import { ascSort, createUUID as createUUID2 } from "qx-util";
4449
- import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
4533
+ import { RuntimeError as RuntimeError14 } from "@ibiz-template/core";
4450
4534
 
4451
4535
  // src/service/utils/service-exist-util/service-exist-util.ts
4452
- import { RuntimeError as RuntimeError12 } from "@ibiz-template/core";
4536
+ import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
4453
4537
  import { isEmpty as isEmpty4, isNil as isNil4 } from "ramda";
4454
4538
  function isExistSrfKey(funcName, entity) {
4455
4539
  if (entity != null) {
@@ -4458,14 +4542,14 @@ function isExistSrfKey(funcName, entity) {
4458
4542
  return true;
4459
4543
  }
4460
4544
  }
4461
- throw new RuntimeError12("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfkey\u300D\u65E0\u6CD5\u5904\u7406"));
4545
+ throw new RuntimeError13("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfkey\u300D\u65E0\u6CD5\u5904\u7406"));
4462
4546
  }
4463
4547
  function isExistSessionId(funcName, context) {
4464
4548
  const { srfsessionid } = context;
4465
4549
  if (!isNil4(srfsessionid) && !isEmpty4(srfsessionid)) {
4466
4550
  return true;
4467
4551
  }
4468
- throw new RuntimeError12("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
4552
+ throw new RuntimeError13("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
4469
4553
  }
4470
4554
 
4471
4555
  // src/service/utils/de-cache/de-cache.ts
@@ -4551,7 +4635,7 @@ var DECache = class {
4551
4635
  if (this.isUnionKey) {
4552
4636
  this.calcUnionKey(entity);
4553
4637
  if (this.checkData(context, entity.srfkey)) {
4554
- throw new RuntimeError13(
4638
+ throw new RuntimeError14(
4555
4639
  "\u65B0\u5EFA\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
4556
4640
  );
4557
4641
  }
@@ -4602,7 +4686,7 @@ var DECache = class {
4602
4686
  if (this.isUnionKey) {
4603
4687
  this.calcUnionKey(entity);
4604
4688
  if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
4605
- throw new RuntimeError13(
4689
+ throw new RuntimeError14(
4606
4690
  "\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
4607
4691
  );
4608
4692
  }
@@ -4857,6 +4941,9 @@ var DECache = class {
4857
4941
  * @date 2023-12-22 13:12:17
4858
4942
  */
4859
4943
  clear() {
4944
+ this.cacheMap.forEach((item) => {
4945
+ item.destroy();
4946
+ });
4860
4947
  this.cacheMap.clear();
4861
4948
  }
4862
4949
  /**
@@ -5034,7 +5121,7 @@ function fieldValueToBoolean(value) {
5034
5121
  }
5035
5122
 
5036
5123
  // src/service/service/code-list/code-list.service.ts
5037
- import { RuntimeError as RuntimeError14 } from "@ibiz-template/core";
5124
+ import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
5038
5125
  var CodeListService = class {
5039
5126
  constructor(appModel) {
5040
5127
  this.appModel = appModel;
@@ -5181,7 +5268,7 @@ var CodeListService = class {
5181
5268
  async get(tag, context, params) {
5182
5269
  const codeList = this.allCodeLists.get(tag);
5183
5270
  if (!codeList) {
5184
- throw new RuntimeError14("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
5271
+ throw new RuntimeError15("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
5185
5272
  }
5186
5273
  if (codeList.codeListType === "STATIC") {
5187
5274
  return this.getStatic(codeList);
@@ -5245,7 +5332,7 @@ var ConfigService = class {
5245
5332
  };
5246
5333
 
5247
5334
  // src/service/service/counter/counter.service.ts
5248
- import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
5335
+ import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
5249
5336
  var CounterService = class {
5250
5337
  /**
5251
5338
  * 获取计数器
@@ -5284,7 +5371,7 @@ var CounterService = class {
5284
5371
  static async getCounterByRef(model, context, params) {
5285
5372
  const { appCounter } = model;
5286
5373
  if (!appCounter) {
5287
- throw new RuntimeModelError7(model, "\u672A\u914D\u7F6E\u5E94\u7528\u8BA1\u6570\u5668!");
5374
+ throw new RuntimeModelError8(model, "\u672A\u914D\u7F6E\u5E94\u7528\u8BA1\u6570\u5668!");
5288
5375
  }
5289
5376
  return this.getCounter(appCounter, context, params);
5290
5377
  }
@@ -5302,12 +5389,12 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
5302
5389
 
5303
5390
  // src/service/service/entity/de.service.ts
5304
5391
  import {
5305
- ModelError as ModelError5,
5306
- RuntimeError as RuntimeError16
5392
+ ModelError as ModelError6,
5393
+ RuntimeError as RuntimeError17
5307
5394
  } from "@ibiz-template/core";
5308
5395
 
5309
5396
  // src/service/service/work-flow/work-flow.service.ts
5310
- import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
5397
+ import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
5311
5398
  var WorkFlowService = class {
5312
5399
  /**
5313
5400
  * Creates an instance of WorkFlowService.
@@ -5627,7 +5714,7 @@ var WorkFlowService = class {
5627
5714
  case "sendcopy":
5628
5715
  return this.wfSendCopy(context, params, data);
5629
5716
  default: {
5630
- throw new RuntimeError15("\u300C".concat(methodName, "\u300D\u672A\u5B9E\u73B0"));
5717
+ throw new RuntimeError16("\u300C".concat(methodName, "\u300D\u672A\u5B9E\u73B0"));
5631
5718
  }
5632
5719
  }
5633
5720
  }
@@ -5668,7 +5755,7 @@ var FileService = class {
5668
5755
 
5669
5756
  // src/service/app-data-entity/app-data-entity.ts
5670
5757
  import { clone as clone5, isNil as isNil7 } from "ramda";
5671
- import { DataTypes } from "@ibiz-template/core";
5758
+ import { DataTypes, HistoryList } from "@ibiz-template/core";
5672
5759
  import { createUUID as createUUID3 } from "qx-util";
5673
5760
 
5674
5761
  // src/service/constant/srfuf.ts
@@ -5692,6 +5779,9 @@ var AppDataEntity = class _AppDataEntity {
5692
5779
  * @param {(IData | AppDataEntity)} [data={}]
5693
5780
  */
5694
5781
  constructor(entity, data = {}) {
5782
+ let history = new HistoryList(
5783
+ data instanceof _AppDataEntity ? clone5(data._data) : clone5(data)
5784
+ );
5695
5785
  Object.defineProperty(this, "_entity", {
5696
5786
  enumerable: false,
5697
5787
  configurable: true,
@@ -5700,7 +5790,19 @@ var AppDataEntity = class _AppDataEntity {
5700
5790
  Object.defineProperty(this, "_data", {
5701
5791
  enumerable: false,
5702
5792
  configurable: true,
5703
- value: data instanceof _AppDataEntity ? clone5(data._data) : clone5(data)
5793
+ get() {
5794
+ return history.data;
5795
+ }
5796
+ });
5797
+ Object.defineProperty(this, "history", {
5798
+ enumerable: false,
5799
+ configurable: true,
5800
+ set(v) {
5801
+ history = v;
5802
+ },
5803
+ get() {
5804
+ return history;
5805
+ }
5704
5806
  });
5705
5807
  Object.defineProperty(this, "srfdeid", {
5706
5808
  get() {
@@ -5773,17 +5875,18 @@ var AppDataEntity = class _AppDataEntity {
5773
5875
  */
5774
5876
  defineProperties() {
5775
5877
  var _a;
5776
- const { _data, convertVal } = this;
5878
+ const self = this;
5879
+ const { convertVal } = this;
5777
5880
  const properties = {};
5778
- const keys = Object.keys(_data);
5881
+ const keys = Object.keys(this._data);
5779
5882
  keys.forEach((key) => {
5780
5883
  properties[key] = {
5781
5884
  enumerable: true,
5782
5885
  set(val) {
5783
- _data[key] = val;
5886
+ self._data[key] = val;
5784
5887
  },
5785
5888
  get() {
5786
- return _data[key];
5889
+ return self._data[key];
5787
5890
  }
5788
5891
  };
5789
5892
  });
@@ -5792,13 +5895,13 @@ var AppDataEntity = class _AppDataEntity {
5792
5895
  properties[key] = {
5793
5896
  enumerable: true,
5794
5897
  set(val) {
5795
- _data[key] = convertVal(val, field.stdDataType);
5898
+ self._data[key] = convertVal(val, field.stdDataType);
5796
5899
  },
5797
5900
  get() {
5798
- return _data[key];
5901
+ return self._data[key];
5799
5902
  }
5800
5903
  };
5801
- _data[key] = convertVal(_data[key], field.stdDataType);
5904
+ self._data[key] = convertVal(self._data[key], field.stdDataType);
5802
5905
  });
5803
5906
  Object.defineProperties(this, properties);
5804
5907
  }
@@ -5810,8 +5913,9 @@ var AppDataEntity = class _AppDataEntity {
5810
5913
  * @return {*} {AppDataEntity}
5811
5914
  */
5812
5915
  clone() {
5813
- const entity = new _AppDataEntity(this._entity, this._data);
5916
+ const entity = new _AppDataEntity(this._entity);
5814
5917
  entity.srfkey = this.srfkey;
5918
+ entity.history = clone5(this.history);
5815
5919
  return entity;
5816
5920
  }
5817
5921
  /**
@@ -5834,9 +5938,23 @@ var AppDataEntity = class _AppDataEntity {
5834
5938
  delete _data[key];
5835
5939
  }
5836
5940
  });
5837
- Object.assign(this._data, _data);
5941
+ this.history.assign(_data);
5838
5942
  return this;
5839
5943
  }
5944
+ /**
5945
+ * 实体对象销毁
5946
+ *
5947
+ * @author chitanda
5948
+ * @date 2023-12-28 21:12:24
5949
+ */
5950
+ destroy() {
5951
+ this.history.destroy();
5952
+ Object.defineProperty(this, "_entity", {
5953
+ enumerable: false,
5954
+ configurable: true,
5955
+ value: null
5956
+ });
5957
+ }
5840
5958
  /**
5841
5959
  * 根据属性的数据类型转换值
5842
5960
  * @author lxm
@@ -5922,7 +6040,7 @@ var DEService = class {
5922
6040
  const model = findModelChild(this.model.appDEMethods, id);
5923
6041
  const provider = await getDEMethodProvider(model);
5924
6042
  if (!provider) {
5925
- throw new ModelError5(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
6043
+ throw new ModelError6(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
5926
6044
  }
5927
6045
  const method = provider.create(this, this.model, model, {
5928
6046
  acMode,
@@ -5947,7 +6065,7 @@ var DEService = class {
5947
6065
  if (method) {
5948
6066
  return method.exec(context, params, params2);
5949
6067
  }
5950
- throw new RuntimeError16("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
6068
+ throw new RuntimeError17("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
5951
6069
  }
5952
6070
  getDraft(context, params, params2) {
5953
6071
  return this.exec("GetDraft", context, params, params2);
@@ -6011,7 +6129,7 @@ var DEService = class {
6011
6129
  if (method) {
6012
6130
  return method.exec(context, params, params2);
6013
6131
  }
6014
- throw new RuntimeError16("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
6132
+ throw new RuntimeError17("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
6015
6133
  }
6016
6134
  /**
6017
6135
  * 实体级别 AI 聊天会话
@@ -6401,7 +6519,7 @@ var ControlService = class {
6401
6519
  };
6402
6520
 
6403
6521
  // src/service/service/control/md-control.service.ts
6404
- import { RuntimeError as RuntimeError17 } from "@ibiz-template/core";
6522
+ import { RuntimeError as RuntimeError18 } from "@ibiz-template/core";
6405
6523
  import { isArray as isArray3 } from "qx-util";
6406
6524
  var MDControlService = class extends ControlService {
6407
6525
  /**
@@ -6530,7 +6648,7 @@ var MDControlService = class extends ControlService {
6530
6648
  * @returns {*} {Promise<IHttpResponse>}
6531
6649
  */
6532
6650
  async exportData(_dataExport, _context, _params = {}) {
6533
- throw new RuntimeError17("\u672A\u5B9E\u73B0");
6651
+ throw new RuntimeError18("\u672A\u5B9E\u73B0");
6534
6652
  }
6535
6653
  /**
6536
6654
  * 处理响应
@@ -6565,7 +6683,7 @@ var MDControlService = class extends ControlService {
6565
6683
  };
6566
6684
 
6567
6685
  // src/service/service/authority/authority.service.ts
6568
- import { RuntimeError as RuntimeError18 } from "@ibiz-template/core";
6686
+ import { RuntimeError as RuntimeError19 } from "@ibiz-template/core";
6569
6687
 
6570
6688
  // src/service/service/authority/de-authority.service.ts
6571
6689
  var DeAuthorityService = class {
@@ -6701,7 +6819,7 @@ var AuthorityService = class {
6701
6819
  this.appModel.appId
6702
6820
  );
6703
6821
  if (!entityModel) {
6704
- throw new RuntimeError18("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
6822
+ throw new RuntimeError19("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
6705
6823
  }
6706
6824
  const constructor = this.constructorCache.get(id);
6707
6825
  let service;
@@ -6890,18 +7008,18 @@ var AsyncActionService = class {
6890
7008
 
6891
7009
  // src/service/service/entity/method/de-action.ts
6892
7010
  import {
6893
- HttpError as HttpError4,
7011
+ HttpError as HttpError5,
6894
7012
  HttpResponse as HttpResponse3,
6895
- RuntimeError as RuntimeError20,
6896
- RuntimeModelError as RuntimeModelError19
7013
+ RuntimeError as RuntimeError21,
7014
+ RuntimeModelError as RuntimeModelError20
6897
7015
  } from "@ibiz-template/core";
6898
7016
  import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
6899
7017
 
6900
7018
  // src/service/service/entity/method/method.ts
6901
- import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
7019
+ import { RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
6902
7020
 
6903
7021
  // src/service/dto/method.dto.ts
6904
- import { ModelError as ModelError6 } from "@ibiz-template/core";
7022
+ import { ModelError as ModelError7 } from "@ibiz-template/core";
6905
7023
  var MethodDto = class _MethodDto {
6906
7024
  constructor(service, entity, isLocalMode, dto) {
6907
7025
  this.service = service;
@@ -7022,7 +7140,7 @@ var MethodDto = class _MethodDto {
7022
7140
  break;
7023
7141
  }
7024
7142
  default:
7025
- throw new ModelError6(
7143
+ throw new ModelError7(
7026
7144
  field,
7027
7145
  "\u672A\u652F\u6301\u7684\u5E94\u7528\u5B9E\u4F53\u65B9\u6CD5\u8F93\u5165\u5C5E\u6027\u7C7B\u578B: ".concat(field.type)
7028
7146
  );
@@ -7062,7 +7180,6 @@ var MethodDto = class _MethodDto {
7062
7180
  item[field.refPickupAppDEFieldId] = pKey;
7063
7181
  });
7064
7182
  await dto.sets(context, items);
7065
- delete datum[key];
7066
7183
  } else {
7067
7184
  await dto.sets(context, []);
7068
7185
  }
@@ -7311,17 +7428,17 @@ var Method = class {
7311
7428
  break;
7312
7429
  default:
7313
7430
  if (requestMethod) {
7314
- throw new RuntimeModelError8(
7431
+ throw new RuntimeModelError9(
7315
7432
  this.method,
7316
7433
  "\u672A\u652F\u6301\u7684\u8BF7\u6C42\u65B9\u5F0F: ".concat(requestMethod)
7317
7434
  );
7318
7435
  } else {
7319
- throw new RuntimeModelError8(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
7436
+ throw new RuntimeModelError9(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
7320
7437
  }
7321
7438
  }
7322
7439
  return res;
7323
7440
  }
7324
- throw new RuntimeModelError8(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
7441
+ throw new RuntimeModelError9(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
7325
7442
  }
7326
7443
  mergeRequestPath(path2, methodName) {
7327
7444
  return "".concat(path2, "/").concat(methodName);
@@ -7354,12 +7471,12 @@ var Method = class {
7354
7471
  };
7355
7472
 
7356
7473
  // src/de-logic/index.ts
7357
- import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as RuntimeError19 } from "@ibiz-template/core";
7474
+ import { HttpError as HttpError4, HttpResponse as HttpResponse2, RuntimeError as RuntimeError20 } from "@ibiz-template/core";
7358
7475
  import { isArray as isArray5 } from "lodash-es";
7359
7476
  import { clone as clone12 } from "ramda";
7360
7477
 
7361
7478
  // src/de-logic/de-logic.ts
7362
- import { ModelError as ModelError12, RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
7479
+ import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError19 } from "@ibiz-template/core";
7363
7480
 
7364
7481
  // src/de-logic/de-logic-context.ts
7365
7482
  import { isArray as isArray4 } from "lodash-es";
@@ -7491,17 +7608,17 @@ var DELogicContext = class {
7491
7608
  };
7492
7609
 
7493
7610
  // src/de-logic/de-logic-node/de-action-node/de-action-node.ts
7494
- import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
7611
+ import { RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
7495
7612
 
7496
7613
  // src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts
7497
- import { RuntimeModelError as RuntimeModelError10 } from "@ibiz-template/core";
7614
+ import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
7498
7615
 
7499
7616
  // src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts
7500
7617
  var DELogicLinkCond = class {
7501
7618
  };
7502
7619
 
7503
7620
  // src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts
7504
- import { ModelError as ModelError7, RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
7621
+ import { ModelError as ModelError8, RuntimeModelError as RuntimeModelError10 } from "@ibiz-template/core";
7505
7622
  var DELogicLinkSingleCond = class extends DELogicLinkCond {
7506
7623
  constructor(model) {
7507
7624
  super();
@@ -7548,7 +7665,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
7548
7665
  switch (this.type) {
7549
7666
  case "ENTITYFIELD": {
7550
7667
  if (!this.value) {
7551
- throw new RuntimeModelError9(
7668
+ throw new RuntimeModelError10(
7552
7669
  this.model,
7553
7670
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
7554
7671
  );
@@ -7558,7 +7675,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
7558
7675
  }
7559
7676
  case "SRCENTITYFIELD": {
7560
7677
  if (!this.value) {
7561
- throw new RuntimeModelError9(
7678
+ throw new RuntimeModelError10(
7562
7679
  this.model,
7563
7680
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
7564
7681
  );
@@ -7567,7 +7684,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
7567
7684
  return testCond(dst[this.dstField], this.op, src[this.value]);
7568
7685
  }
7569
7686
  case "CURTIME":
7570
- throw new ModelError7(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
7687
+ throw new ModelError8(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
7571
7688
  default:
7572
7689
  return testCond(dst[this.dstField], this.op, this.value);
7573
7690
  }
@@ -7621,7 +7738,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
7621
7738
  test(ctx, context, data) {
7622
7739
  let bol = true;
7623
7740
  if (this.conds.length === 0) {
7624
- throw new RuntimeModelError10(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
7741
+ throw new RuntimeModelError11(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
7625
7742
  }
7626
7743
  for (let i = 0; i < this.conds.length; i++) {
7627
7744
  const cond = this.conds[i];
@@ -7724,10 +7841,10 @@ var DEActionNode = class extends DELogicNode {
7724
7841
  retDELogicParamId
7725
7842
  } = this.model;
7726
7843
  if (!dstAppDataEntityId) {
7727
- throw new RuntimeModelError11(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
7844
+ throw new RuntimeModelError12(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
7728
7845
  }
7729
7846
  if (!dstAppDEActionId) {
7730
- throw new RuntimeModelError11(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
7847
+ throw new RuntimeModelError12(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
7731
7848
  }
7732
7849
  const requestData = ctx.params[dstDELogicParamId];
7733
7850
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -7751,7 +7868,7 @@ var StartNode = class extends DELogicNode {
7751
7868
  };
7752
7869
 
7753
7870
  // src/de-logic/de-logic-node/end-node/end-node.ts
7754
- import { ModelError as ModelError8 } from "@ibiz-template/core";
7871
+ import { ModelError as ModelError9 } from "@ibiz-template/core";
7755
7872
  var EndNode = class extends DELogicNode {
7756
7873
  async exec(ctx) {
7757
7874
  ctx.isEndNode = true;
@@ -7775,7 +7892,7 @@ var EndNode = class extends DELogicNode {
7775
7892
  case "LOGICPARAMFIELD":
7776
7893
  case "BREAK":
7777
7894
  default:
7778
- throw new ModelError8(
7895
+ throw new ModelError9(
7779
7896
  this.model,
7780
7897
  "\u6682\u672A\u652F\u6301\u7684\u7ED3\u675F\u8282\u70B9\u8FD4\u56DE\u503C\u7C7B\u578B: ".concat(returnType)
7781
7898
  );
@@ -7784,11 +7901,11 @@ var EndNode = class extends DELogicNode {
7784
7901
  };
7785
7902
 
7786
7903
  // src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts
7787
- import { ModelError as ModelError10 } from "@ibiz-template/core";
7904
+ import { ModelError as ModelError11 } from "@ibiz-template/core";
7788
7905
  import { clone as clone9 } from "ramda";
7789
7906
 
7790
7907
  // src/de-logic/utils/handle-src-val.ts
7791
- import { ModelError as ModelError9 } from "@ibiz-template/core";
7908
+ import { ModelError as ModelError10 } from "@ibiz-template/core";
7792
7909
  import { clone as clone8 } from "ramda";
7793
7910
  function handleSrcVal(ctx, srcValParams) {
7794
7911
  const { srcDELogicParamId, srcFieldName, srcValue } = srcValParams;
@@ -7822,7 +7939,7 @@ function handleSrcVal(ctx, srcValParams) {
7822
7939
  value = clone8(ibiz.env);
7823
7940
  break;
7824
7941
  default:
7825
- throw new ModelError9(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
7942
+ throw new ModelError10(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
7826
7943
  }
7827
7944
  if (value && srcField) {
7828
7945
  try {
@@ -7869,7 +7986,7 @@ var PrepareParamNode = class extends DELogicNode {
7869
7986
  case "SORTPARAM":
7870
7987
  return this.sortParam(nodeParam, ctx);
7871
7988
  default:
7872
- throw new ModelError10(
7989
+ throw new ModelError11(
7873
7990
  nodeParam,
7874
7991
  "\u6682\u672A\u652F\u6301\u903B\u8F91\u5904\u7406\u53C2\u6570\u64CD\u4F5C".concat(nodeParam.paramAction)
7875
7992
  );
@@ -8011,12 +8128,12 @@ var DataSetNode = class extends DELogicNode {
8011
8128
  };
8012
8129
 
8013
8130
  // src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts
8014
- import { RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
8131
+ import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
8015
8132
  var BindParamNode = class extends DELogicNode {
8016
8133
  async exec(ctx) {
8017
8134
  const { dstDELogicParamId, srcDELogicParamId } = this.model;
8018
8135
  if (!dstDELogicParamId || !srcDELogicParamId) {
8019
- throw new RuntimeModelError12(
8136
+ throw new RuntimeModelError13(
8020
8137
  this.model,
8021
8138
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
8022
8139
  );
@@ -8027,37 +8144,37 @@ var BindParamNode = class extends DELogicNode {
8027
8144
  };
8028
8145
 
8029
8146
  // src/de-logic/de-logic-node/reset-param-node/reset-param-node.ts
8030
- import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
8147
+ import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
8031
8148
  var ResetParamNode = class extends DELogicNode {
8032
8149
  async exec(ctx) {
8033
8150
  const { dstDELogicParamId } = this.model;
8034
8151
  if (!dstDELogicParamId) {
8035
- throw new RuntimeModelError13(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8152
+ throw new RuntimeModelError14(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8036
8153
  }
8037
8154
  ctx.resetParam(dstDELogicParamId);
8038
8155
  }
8039
8156
  };
8040
8157
 
8041
8158
  // src/de-logic/de-logic-node/renew-param-node/renew-param-node.ts
8042
- import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
8159
+ import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
8043
8160
  var RenewParamNode = class extends DELogicNode {
8044
8161
  async exec(ctx) {
8045
8162
  const { dstDELogicParamId } = this.model;
8046
8163
  if (!dstDELogicParamId) {
8047
- throw new RuntimeModelError14(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8164
+ throw new RuntimeModelError15(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8048
8165
  }
8049
8166
  ctx.renewParam(dstDELogicParamId);
8050
8167
  }
8051
8168
  };
8052
8169
 
8053
8170
  // src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
8054
- import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
8171
+ import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
8055
8172
  import { clone as clone10 } from "ramda";
8056
8173
  var CopyParamNode = class extends DELogicNode {
8057
8174
  async exec(ctx) {
8058
8175
  const { dstDELogicParamId, srcDELogicParamId } = this.model;
8059
8176
  if (!dstDELogicParamId || !srcDELogicParamId) {
8060
- throw new RuntimeModelError15(
8177
+ throw new RuntimeModelError16(
8061
8178
  this.model,
8062
8179
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
8063
8180
  );
@@ -8068,12 +8185,12 @@ var CopyParamNode = class extends DELogicNode {
8068
8185
  };
8069
8186
 
8070
8187
  // src/de-logic/de-logic-node/sort-param-node/sort-param-node.ts
8071
- import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
8188
+ import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
8072
8189
  var SortParamNode = class extends DELogicNode {
8073
8190
  async exec(ctx) {
8074
8191
  const { dstDELogicParamId, dstSortDir, dstFieldName } = this.model;
8075
8192
  if (!dstDELogicParamId || !dstFieldName) {
8076
- throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
8193
+ throw new RuntimeModelError17(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
8077
8194
  }
8078
8195
  const key = dstFieldName.toLowerCase();
8079
8196
  const arr = ctx.params[dstDELogicParamId];
@@ -8084,7 +8201,7 @@ var SortParamNode = class extends DELogicNode {
8084
8201
  };
8085
8202
 
8086
8203
  // src/de-logic/de-logic-node/append-param-node/append-param-node.ts
8087
- import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
8204
+ import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
8088
8205
  var AppendParamNode = class extends DELogicNode {
8089
8206
  async exec(ctx) {
8090
8207
  const {
@@ -8095,7 +8212,7 @@ var AppendParamNode = class extends DELogicNode {
8095
8212
  srcSize
8096
8213
  } = this.model;
8097
8214
  if (!dstDELogicParamId || !srcDELogicParamId) {
8098
- throw new RuntimeModelError17(
8215
+ throw new RuntimeModelError18(
8099
8216
  this.model,
8100
8217
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
8101
8218
  );
@@ -8113,11 +8230,11 @@ var AppendParamNode = class extends DELogicNode {
8113
8230
  };
8114
8231
 
8115
8232
  // src/de-logic/de-logic-node/throw-exception-node/throw-exception-node.ts
8116
- import { HttpError as HttpError2 } from "@ibiz-template/core";
8233
+ import { HttpError as HttpError3 } from "@ibiz-template/core";
8117
8234
  var ThrowExceptionNode = class extends DELogicNode {
8118
8235
  async exec(_ctx) {
8119
8236
  const { errorCode, errorInfo } = this.model;
8120
- throw new HttpError2({
8237
+ throw new HttpError3({
8121
8238
  response: {
8122
8239
  status: errorCode,
8123
8240
  statusText: errorInfo
@@ -8128,7 +8245,7 @@ var ThrowExceptionNode = class extends DELogicNode {
8128
8245
  };
8129
8246
 
8130
8247
  // src/de-logic/de-logic-param/de-logic-param.ts
8131
- import { ModelError as ModelError11 } from "@ibiz-template/core";
8248
+ import { ModelError as ModelError12 } from "@ibiz-template/core";
8132
8249
  import { clone as clone11 } from "ramda";
8133
8250
  var DELogicParam = class {
8134
8251
  /**
@@ -8165,7 +8282,7 @@ var DELogicParam = class {
8165
8282
  } else if (m.entityListParam) {
8166
8283
  ctx.params[tag] = [];
8167
8284
  } else if (m.entityPageParam) {
8168
- throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5206\u9875\u67E5\u8BE2\u7ED3\u679C");
8285
+ throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5206\u9875\u67E5\u8BE2\u7ED3\u679C");
8169
8286
  } else if (m.entityParam) {
8170
8287
  ctx.params[tag] = {};
8171
8288
  } else if (m.lastReturnParam) {
@@ -8179,19 +8296,19 @@ var DELogicParam = class {
8179
8296
  } else if (m.cloneParam) {
8180
8297
  ctx.params[tag] = clone11(ctx.data || {});
8181
8298
  } else if (m.envParam) {
8182
- throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF");
8299
+ throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF");
8183
8300
  } else if (m.fileListParam) {
8184
- throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u6587\u4EF6\u5BF9\u8C61\u5217\u8868\u53D8\u91CF");
8301
+ throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u6587\u4EF6\u5BF9\u8C61\u5217\u8868\u53D8\u91CF");
8185
8302
  } else if (m.fileParam) {
8186
- throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u6587\u4EF6\u5BF9\u8C61\u53D8\u91CF");
8303
+ throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u6587\u4EF6\u5BF9\u8C61\u53D8\u91CF");
8187
8304
  } else if (m.filterParam) {
8188
- throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u8FC7\u6EE4\u5668\u5BF9\u8C61\u53D8\u91CF");
8305
+ throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u8FC7\u6EE4\u5668\u5BF9\u8C61\u53D8\u91CF");
8189
8306
  } else if (m.lastParam) {
8190
- throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u6700\u540E\u6570\u636E\u53D8\u91CF");
8307
+ throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u6700\u540E\u6570\u636E\u53D8\u91CF");
8191
8308
  } else if (m.originEntity) {
8192
- throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u539F\u59CB\u6570\u636E\u5BF9\u8C61");
8309
+ throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u539F\u59CB\u6570\u636E\u5BF9\u8C61");
8193
8310
  } else if (m.sessionParam) {
8194
- throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u64CD\u4F5C\u4F1A\u8BDD\u53D8\u91CF");
8311
+ throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u64CD\u4F5C\u4F1A\u8BDD\u53D8\u91CF");
8195
8312
  }
8196
8313
  }
8197
8314
  /**
@@ -8208,7 +8325,7 @@ var DELogicParam = class {
8208
8325
  } else if (m.simpleParam || m.entityParam) {
8209
8326
  ctx.params[tag] = {};
8210
8327
  } else {
8211
- throw new ModelError11(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
8328
+ throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
8212
8329
  }
8213
8330
  }
8214
8331
  };
@@ -8244,7 +8361,7 @@ var DELogic = class {
8244
8361
  var _a, _b;
8245
8362
  if (model.customCode) {
8246
8363
  if (!model.scriptCode) {
8247
- throw new RuntimeModelError18(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
8364
+ throw new RuntimeModelError19(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
8248
8365
  }
8249
8366
  this.scriptFn = ScriptFactory.createScriptFn([], model.scriptCode, {
8250
8367
  isAsync: true
@@ -8252,7 +8369,7 @@ var DELogic = class {
8252
8369
  return;
8253
8370
  }
8254
8371
  if (!((_a = model.delogicNodes) == null ? void 0 : _a.length)) {
8255
- throw new RuntimeModelError18(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
8372
+ throw new RuntimeModelError19(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
8256
8373
  }
8257
8374
  model.delogicNodes.forEach((node) => {
8258
8375
  const { logicNodeType } = node;
@@ -8295,7 +8412,7 @@ var DELogic = class {
8295
8412
  logicNode = new SortParamNode(node);
8296
8413
  break;
8297
8414
  default:
8298
- throw new ModelError12(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
8415
+ throw new ModelError13(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
8299
8416
  }
8300
8417
  this.nodes.set(node.id, logicNode);
8301
8418
  });
@@ -8351,7 +8468,7 @@ var DELogic = class {
8351
8468
  const start = this.nodes.get(startDELogicNodeId);
8352
8469
  await this.deepExec(start, ctx);
8353
8470
  } else {
8354
- throw new RuntimeModelError18(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
8471
+ throw new RuntimeModelError19(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
8355
8472
  }
8356
8473
  if (ctx.isEndNode) {
8357
8474
  return ctx.result;
@@ -8407,7 +8524,7 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
8407
8524
  context.srfappid
8408
8525
  );
8409
8526
  if (!deLogic) {
8410
- throw new RuntimeError19("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
8527
+ throw new RuntimeError20("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
8411
8528
  }
8412
8529
  return execDELogic(deLogic, context, data, params);
8413
8530
  }
@@ -8419,7 +8536,7 @@ async function execDELogicAction(deDELogic, context, data, params) {
8419
8536
  const result = await execDELogic(deDELogic, _context, _data, _params);
8420
8537
  return new HttpResponse2(result);
8421
8538
  } catch (err) {
8422
- if (err instanceof HttpError3) {
8539
+ if (err instanceof HttpError4) {
8423
8540
  return new HttpResponse2(err, 500);
8424
8541
  }
8425
8542
  throw err;
@@ -8476,7 +8593,7 @@ var DEActionMethod = class extends Method {
8476
8593
  if (this.method.actionType === "DELOGIC") {
8477
8594
  const deLogic = findDELogic(this.method.appDELogicId, this.entity);
8478
8595
  if (!deLogic) {
8479
- throw new RuntimeModelError19(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
8596
+ throw new RuntimeModelError20(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
8480
8597
  }
8481
8598
  return execDELogicAction(deLogic, context, data, params);
8482
8599
  }
@@ -8554,7 +8671,7 @@ var DEActionMethod = class extends Method {
8554
8671
  */
8555
8672
  async create(context, data, params) {
8556
8673
  if (!data) {
8557
- throw new RuntimeError20("create\u884C\u4E3A\u6CA1\u6709\u4F20data");
8674
+ throw new RuntimeError21("create\u884C\u4E3A\u6CA1\u6709\u4F20data");
8558
8675
  }
8559
8676
  if (this.isLocalMode) {
8560
8677
  return this.createTemp(context, this.createEntity(data));
@@ -8596,7 +8713,7 @@ var DEActionMethod = class extends Method {
8596
8713
  */
8597
8714
  async update(context, data, params) {
8598
8715
  if (!data) {
8599
- throw new RuntimeError20("update\u884C\u4E3A\u6CA1\u6709\u4F20data");
8716
+ throw new RuntimeError21("update\u884C\u4E3A\u6CA1\u6709\u4F20data");
8600
8717
  }
8601
8718
  if (this.isLocalMode) {
8602
8719
  return this.updateTemp(context, this.createEntity(data));
@@ -8671,7 +8788,7 @@ var DEActionMethod = class extends Method {
8671
8788
  }
8672
8789
  return new HttpResponse3(resultData);
8673
8790
  } catch (err) {
8674
- throw new HttpError4(err);
8791
+ throw new HttpError5(err);
8675
8792
  }
8676
8793
  }
8677
8794
  /**
@@ -8717,7 +8834,7 @@ var DEActionMethod = class extends Method {
8717
8834
  }
8718
8835
  return new HttpResponse3(data, 500);
8719
8836
  } catch (err) {
8720
- throw new HttpError4(err);
8837
+ throw new HttpError5(err);
8721
8838
  }
8722
8839
  }
8723
8840
  /**
@@ -8745,7 +8862,7 @@ var DEActionMethod = class extends Method {
8745
8862
  }
8746
8863
  return new HttpResponse3(resultData, 500);
8747
8864
  } catch (err) {
8748
- throw new HttpError4(err);
8865
+ throw new HttpError5(err);
8749
8866
  }
8750
8867
  }
8751
8868
  /**
@@ -8771,7 +8888,7 @@ var DEActionMethod = class extends Method {
8771
8888
  }
8772
8889
  return new HttpResponse3(data, 500);
8773
8890
  } catch (err) {
8774
- throw new HttpError4(err);
8891
+ throw new HttpError5(err);
8775
8892
  }
8776
8893
  }
8777
8894
  /**
@@ -8796,8 +8913,8 @@ var DeActionDeMethodProvider = class {
8796
8913
  // src/service/service/entity/method/fetch.ts
8797
8914
  import {
8798
8915
  HttpResponse as HttpResponse4,
8799
- ModelError as ModelError13,
8800
- RuntimeModelError as RuntimeModelError20
8916
+ ModelError as ModelError14,
8917
+ RuntimeModelError as RuntimeModelError21
8801
8918
  } from "@ibiz-template/core";
8802
8919
  import { isArray as isArray7 } from "lodash-es";
8803
8920
  import { clone as clone13, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
@@ -8826,7 +8943,7 @@ var FetchMethod = class extends Method {
8826
8943
  }
8827
8944
  break;
8828
8945
  default:
8829
- throw new ModelError13(
8946
+ throw new ModelError14(
8830
8947
  this.method,
8831
8948
  "\u6570\u636E\u6765\u6E90\u7C7B\u578B".concat(this.method.dataSetType, "\u6682\u672A\u652F\u6301")
8832
8949
  );
@@ -8905,7 +9022,7 @@ var FetchMethod = class extends Method {
8905
9022
  async fetchCodeListSet(context, params) {
8906
9023
  const { appCodeListId } = this.method;
8907
9024
  if (!appCodeListId) {
8908
- throw new RuntimeModelError20(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
9025
+ throw new RuntimeModelError21(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
8909
9026
  }
8910
9027
  const codeItems = await this.app.codeList.get(
8911
9028
  appCodeListId,
@@ -9717,7 +9834,7 @@ var MqttService = class {
9717
9834
  };
9718
9835
 
9719
9836
  // src/service/de-service-util.ts
9720
- import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
9837
+ import { RuntimeError as RuntimeError22 } from "@ibiz-template/core";
9721
9838
  var _DEServiceUtil = class _DEServiceUtil {
9722
9839
  /**
9723
9840
  * Creates an instance of DEServiceUtil.
@@ -9770,7 +9887,7 @@ var _DEServiceUtil = class _DEServiceUtil {
9770
9887
  this.appModel.appId
9771
9888
  );
9772
9889
  if (!entityModel) {
9773
- throw new RuntimeError21("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
9890
+ throw new RuntimeError22("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
9774
9891
  }
9775
9892
  const constructor = _DEServiceUtil.constructorCache.get(id.toUpperCase());
9776
9893
  let service;
@@ -9866,7 +9983,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
9866
9983
  const context = clone14(_context);
9867
9984
  const appView = await ibiz.hub.config.view.get(appViewId);
9868
9985
  if (!appView) {
9869
- throw new RuntimeError22("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
9986
+ throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
9870
9987
  }
9871
9988
  if ((context.srfkey || params.srfuf === 0 /* CREATE */) && appView.appDataEntityId) {
9872
9989
  const deName = calcDeCodeNameById(appView.appDataEntityId);
@@ -9897,11 +10014,11 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
9897
10014
  }
9898
10015
  return this.openIndexViewTab(appView, context, params);
9899
10016
  case "POPUP":
9900
- throw new ModelError14(appView, "\u672A\u652F\u6301\u7684\u89C6\u56FE\u6253\u5F00\u6A21\u5F0F: POPUP");
10017
+ throw new ModelError15(appView, "\u672A\u652F\u6301\u7684\u89C6\u56FE\u6253\u5F00\u6A21\u5F0F: POPUP");
9901
10018
  case "POPUPMODAL":
9902
10019
  return this.openModal(appView, context, params);
9903
10020
  case "POPUPAPP":
9904
- throw new ModelError14(appView, "\u672A\u652F\u6301\u7684\u89C6\u56FE\u6253\u5F00\u6A21\u5F0F: POPUPAPP");
10021
+ throw new ModelError15(appView, "\u672A\u652F\u6301\u7684\u89C6\u56FE\u6253\u5F00\u6A21\u5F0F: POPUPAPP");
9905
10022
  case "POPOVER":
9906
10023
  return this.openPopover(appView, opts.event, context, params);
9907
10024
  case "DRAWER_LEFT":
@@ -9955,7 +10072,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
9955
10072
  */
9956
10073
  async openPopover(appView, event, context, params = {}) {
9957
10074
  if (!event) {
9958
- throw new RuntimeError22("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
10075
+ throw new RuntimeError23("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
9959
10076
  }
9960
10077
  return ibiz.openView.popover(appView.id, event, context, params);
9961
10078
  }
@@ -10011,7 +10128,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10011
10128
  const app = await ibiz.hub.getAppAsync(context.srfappid);
10012
10129
  const appFunc = app.getAppFunc(appFuncId);
10013
10130
  if (!appFunc) {
10014
- throw new RuntimeError23("\u627E\u4E0D\u5230\u53EB".concat(appFuncId, "\u7684\u5E94\u7528\u529F\u80FD"));
10131
+ throw new RuntimeError24("\u627E\u4E0D\u5230\u53EB".concat(appFuncId, "\u7684\u5E94\u7528\u529F\u80FD"));
10015
10132
  }
10016
10133
  const { navigateContexts, navigateParams, appFuncType } = appFunc;
10017
10134
  const _context = context.clone();
@@ -10029,7 +10146,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10029
10146
  case "CUSTOM":
10030
10147
  return this.custom(appFunc, _context, _params);
10031
10148
  default:
10032
- throw new ModelError15(appFunc, "\u672A\u652F\u6301\u7684\u5E94\u7528\u529F\u80FD\u7C7B\u578B: ".concat(appFuncType));
10149
+ throw new ModelError16(appFunc, "\u672A\u652F\u6301\u7684\u5E94\u7528\u529F\u80FD\u7C7B\u578B: ".concat(appFuncType));
10033
10150
  }
10034
10151
  }
10035
10152
  /**
@@ -10045,7 +10162,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10045
10162
  */
10046
10163
  async openAppView(appFunc, context, params, opts) {
10047
10164
  if (!appFunc.appViewId) {
10048
- throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appFunc.appViewId, "]\u4E0D\u5B58\u5728"));
10165
+ throw new RuntimeError24("\u5E94\u7528\u89C6\u56FE[".concat(appFunc.appViewId, "]\u4E0D\u5B58\u5728"));
10049
10166
  }
10050
10167
  return ibiz.commands.execute(
10051
10168
  OpenAppViewCommand.TAG,
@@ -10079,7 +10196,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10079
10196
  */
10080
10197
  openPdAppFunc(appFunc, context, params) {
10081
10198
  ibiz.log.warn("openPdAppFunc", appFunc, context, params);
10082
- throw new RuntimeError23("\u672A\u5B9E\u73B0");
10199
+ throw new RuntimeError24("\u672A\u5B9E\u73B0");
10083
10200
  }
10084
10201
  /**
10085
10202
  * 执行 JavaScript 脚本
@@ -10093,7 +10210,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10093
10210
  */
10094
10211
  executeJavaScript(appFunc, context, params) {
10095
10212
  ibiz.log.warn("executeJavaScript", appFunc, context, params);
10096
- throw new RuntimeError23("\u672A\u5B9E\u73B0");
10213
+ throw new RuntimeError24("\u672A\u5B9E\u73B0");
10097
10214
  }
10098
10215
  /**
10099
10216
  * 自定义应用功能
@@ -10107,7 +10224,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10107
10224
  */
10108
10225
  custom(appFunc, context, params) {
10109
10226
  ibiz.log.warn("custom", appFunc, context, params);
10110
- throw new RuntimeError23("\u672A\u5B9E\u73B0");
10227
+ throw new RuntimeError24("\u672A\u5B9E\u73B0");
10111
10228
  }
10112
10229
  };
10113
10230
  /**
@@ -10128,7 +10245,7 @@ function installCommand() {
10128
10245
  }
10129
10246
 
10130
10247
  // src/app-hub.ts
10131
- import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
10248
+ import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
10132
10249
 
10133
10250
  // src/application.ts
10134
10251
  import { Net, getToken } from "@ibiz-template/core";
@@ -10320,7 +10437,7 @@ var Convert = class {
10320
10437
  };
10321
10438
 
10322
10439
  // src/hub/config/app-view-config-service.ts
10323
- import { RuntimeError as RuntimeError24 } from "@ibiz-template/core";
10440
+ import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
10324
10441
  var AppViewConfigService = class {
10325
10442
  constructor() {
10326
10443
  /**
@@ -10362,7 +10479,7 @@ var AppViewConfigService = class {
10362
10479
  if (!this.viewConfigs.has(id)) {
10363
10480
  const model = await ibiz.hub.getAppView(id);
10364
10481
  if (!model) {
10365
- throw new RuntimeError24("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
10482
+ throw new RuntimeError25("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
10366
10483
  }
10367
10484
  this.set(model.id, {
10368
10485
  id: model.id,
@@ -10419,14 +10536,14 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
10419
10536
 
10420
10537
  // src/controller/common/view/view.controller.ts
10421
10538
  import { notNilEmpty as notNilEmpty6 } from "qx-util";
10422
- import { IBizContext as IBizContext2, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
10539
+ import { IBizContext as IBizContext2, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
10423
10540
  import { isEmpty as isEmpty8, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
10424
10541
 
10425
10542
  // src/controller/utils/loading/loading.state.ts
10426
10543
  import { NOOP } from "@ibiz-template/core";
10427
10544
 
10428
10545
  // src/controller/utils/counter/counter.ts
10429
- import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
10546
+ import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
10430
10547
  var Counter = class {
10431
10548
  /**
10432
10549
  * Creates an instance of Counter.
@@ -10488,7 +10605,7 @@ var Counter = class {
10488
10605
  return;
10489
10606
  }
10490
10607
  if (this.count === 0) {
10491
- throw new RuntimeError25("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
10608
+ throw new RuntimeError26("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
10492
10609
  }
10493
10610
  this.count -= 1;
10494
10611
  if (this.count === 0) {
@@ -11068,7 +11185,7 @@ function getOriginData(data) {
11068
11185
  }
11069
11186
 
11070
11187
  // src/controller/utils/value-rule/value-rule.ts
11071
- import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
11188
+ import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
11072
11189
  import { isNilOrEmpty as isNilOrEmpty7, isNumber } from "qx-util";
11073
11190
  import { isNil as isNil14 } from "ramda";
11074
11191
  function generateRules(itemVRs, name, valueItemName) {
@@ -11118,7 +11235,7 @@ function generateRules(itemVRs, name, valueItemName) {
11118
11235
  deRule.groupCond
11119
11236
  );
11120
11237
  if (!isPast) {
11121
- callback(new RuntimeError26(infoMessage || deRule.ruleInfo));
11238
+ callback(new RuntimeError27(infoMessage || deRule.ruleInfo));
11122
11239
  }
11123
11240
  return true;
11124
11241
  },
@@ -11188,7 +11305,7 @@ function generateEditorRules(editor) {
11188
11305
  }
11189
11306
 
11190
11307
  // src/controller/utils/value-ex/value-ex.ts
11191
- import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
11308
+ import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
11192
11309
  import { isNil as isNil15, mergeLeft } from "ramda";
11193
11310
  var ValueExUtil = class {
11194
11311
  /**
@@ -11220,7 +11337,7 @@ var ValueExUtil = class {
11220
11337
  const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
11221
11338
  if (["OBJECTS", "OBJECT"].includes(valueType)) {
11222
11339
  if (!objectNameField) {
11223
- throw new RuntimeError27("\u7F3A\u5C11objectNameField");
11340
+ throw new RuntimeError28("\u7F3A\u5C11objectNameField");
11224
11341
  }
11225
11342
  const textKey = objectNameField.toLowerCase();
11226
11343
  if (valueType === "OBJECTS") {
@@ -11236,7 +11353,7 @@ var ValueExUtil = class {
11236
11353
  };
11237
11354
 
11238
11355
  // src/controller/utils/value-default/value-default.ts
11239
- import { RuntimeError as RuntimeError28, ModelError as ModelError16 } from "@ibiz-template/core";
11356
+ import { RuntimeError as RuntimeError29, ModelError as ModelError17 } from "@ibiz-template/core";
11240
11357
  import dayjs from "dayjs";
11241
11358
  import { createUUID as createUUID8 } from "qx-util";
11242
11359
  import { isNil as isNil16, isNotNil } from "ramda";
@@ -11277,7 +11394,7 @@ function getDefaultValue(opts, origins) {
11277
11394
  case "SESSION":
11278
11395
  case "APPLICATION":
11279
11396
  if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
11280
- throw new RuntimeError28("appdata.context\u4E0D\u5B58\u5728");
11397
+ throw new RuntimeError29("appdata.context\u4E0D\u5B58\u5728");
11281
11398
  }
11282
11399
  return ibiz.appData.context[defaultValue];
11283
11400
  case "CONTEXT":
@@ -11285,13 +11402,13 @@ function getDefaultValue(opts, origins) {
11285
11402
  case "UNIQUEID":
11286
11403
  return createUUID8();
11287
11404
  default:
11288
- throw new ModelError16({}, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
11405
+ throw new ModelError17({}, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
11289
11406
  }
11290
11407
  }
11291
11408
 
11292
11409
  // src/controller/utils/data-file-util/data-file-util.ts
11293
11410
  import {
11294
- RuntimeError as RuntimeError29
11411
+ RuntimeError as RuntimeError30
11295
11412
  } from "@ibiz-template/core";
11296
11413
  var asyncImportUrl = "asyncimportdata2";
11297
11414
  var importUrl = "importdata2";
@@ -11345,11 +11462,11 @@ async function importData(file, appDataEntity, dataImport) {
11345
11462
  }
11346
11463
  async function exportData(header, data, fileName) {
11347
11464
  if (!ibiz.util.getExcelUtil) {
11348
- throw new RuntimeError29("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
11465
+ throw new RuntimeError30("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
11349
11466
  }
11350
11467
  const exportExcel = await ibiz.util.getExcelUtil();
11351
11468
  if (!exportExcel) {
11352
- throw new RuntimeError29("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
11469
+ throw new RuntimeError30("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
11353
11470
  }
11354
11471
  try {
11355
11472
  exportExcel.exportJsonToExcel({
@@ -11585,7 +11702,7 @@ var BaseController = class {
11585
11702
  };
11586
11703
 
11587
11704
  // src/controller/utils/view-msg/view-msg-controller.ts
11588
- import { RuntimeError as RuntimeError30, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
11705
+ import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError22 } from "@ibiz-template/core";
11589
11706
  import { isNil as isNil17, mergeRight as mergeRight2 } from "ramda";
11590
11707
  var ViewMsgController = class _ViewMsgController {
11591
11708
  constructor(msgGroupId) {
@@ -11611,7 +11728,7 @@ var ViewMsgController = class _ViewMsgController {
11611
11728
  (item) => item.id === this.msgGroupId
11612
11729
  );
11613
11730
  if (!msgGroup) {
11614
- throw new RuntimeError30("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
11731
+ throw new RuntimeError31("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
11615
11732
  }
11616
11733
  this.msgGroup = msgGroup;
11617
11734
  const msgDetailsViewMsgIds = msgGroup.appViewMsgGroupDetails.map(
@@ -11625,7 +11742,7 @@ var ViewMsgController = class _ViewMsgController {
11625
11742
  }
11626
11743
  });
11627
11744
  if (msgDetailsViewMsgIds.length) {
11628
- throw new RuntimeError30(
11745
+ throw new RuntimeError31(
11629
11746
  "\u6CA1\u6709\u627E\u5230".concat(msgDetailsViewMsgIds.join(","), "\u89C6\u56FE\u6D88\u606F\u6A21\u578B")
11630
11747
  );
11631
11748
  }
@@ -11650,7 +11767,7 @@ var ViewMsgController = class _ViewMsgController {
11650
11767
  static async fetchDataSet(msgModel, context, params) {
11651
11768
  const { appDataEntityId, appDEDataSetId } = msgModel;
11652
11769
  if (!appDEDataSetId) {
11653
- throw new RuntimeModelError21(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
11770
+ throw new RuntimeModelError22(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
11654
11771
  }
11655
11772
  const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
11656
11773
  if (res.data.length) {
@@ -11744,7 +11861,7 @@ var ViewMsgController = class _ViewMsgController {
11744
11861
  msgPosAppDEFieldId
11745
11862
  } = msgModel;
11746
11863
  if (!appDataEntityId) {
11747
- throw new RuntimeModelError21(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
11864
+ throw new RuntimeModelError22(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
11748
11865
  }
11749
11866
  const entity = await ibiz.hub.getAppDataEntity(
11750
11867
  appDataEntityId,
@@ -12053,7 +12170,7 @@ var ViewController = class extends BaseController {
12053
12170
  async callUIAction(key, args) {
12054
12171
  const result = this.call(key, args);
12055
12172
  if (result === void 0) {
12056
- throw new RuntimeError31("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
12173
+ throw new RuntimeError32("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
12057
12174
  }
12058
12175
  return result;
12059
12176
  }
@@ -12324,7 +12441,7 @@ var EditorController = class {
12324
12441
  };
12325
12442
 
12326
12443
  // src/controller/common/editor/code-list-editor.controller.ts
12327
- import { RuntimeModelError as RuntimeModelError22 } from "@ibiz-template/core";
12444
+ import { RuntimeModelError as RuntimeModelError23 } from "@ibiz-template/core";
12328
12445
  var CodeListEditorController = class extends EditorController {
12329
12446
  /**
12330
12447
  * 加载代码表数据
@@ -12348,7 +12465,7 @@ var CodeListEditorController = class extends EditorController {
12348
12465
  );
12349
12466
  return dataItems;
12350
12467
  }
12351
- throw new RuntimeModelError22(
12468
+ throw new RuntimeModelError23(
12352
12469
  this.model,
12353
12470
  "\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
12354
12471
  );
@@ -12356,7 +12473,7 @@ var CodeListEditorController = class extends EditorController {
12356
12473
  };
12357
12474
 
12358
12475
  // src/controller/common/control/control.controller.ts
12359
- import { IBizContext as IBizContext3, IBizParams, NoticeError } from "@ibiz-template/core";
12476
+ import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
12360
12477
  import { clone as clone15, isNil as isNil19 } from "ramda";
12361
12478
  import { notNilEmpty as notNilEmpty7 } from "qx-util";
12362
12479
  var ControlController = class extends BaseController {
@@ -12676,7 +12793,7 @@ var ControlController = class extends BaseController {
12676
12793
  }
12677
12794
  if (opts == null ? void 0 : opts.error) {
12678
12795
  ibiz.log.error(opts.error);
12679
- throw new NoticeError(message, duration);
12796
+ throw new NoticeError2(message, duration);
12680
12797
  } else {
12681
12798
  ibiz.message.success(message, duration, duration === 0);
12682
12799
  }
@@ -12684,7 +12801,7 @@ var ControlController = class extends BaseController {
12684
12801
  };
12685
12802
 
12686
12803
  // src/controller/common/control/md-control.controller.ts
12687
- import { isElementSame, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
12804
+ import { isElementSame, RuntimeError as RuntimeError33 } from "@ibiz-template/core";
12688
12805
  import { debounce } from "lodash-es";
12689
12806
  var MDControlController = class extends ControlController {
12690
12807
  constructor() {
@@ -12804,6 +12921,18 @@ var MDControlController = class extends ControlController {
12804
12921
  this.commandDataChange = false;
12805
12922
  }
12806
12923
  }
12924
+ /**
12925
+ * 获取部件默认排序模型
12926
+ * @return {*}
12927
+ * @author: zhujiamin
12928
+ * @Date: 2023-12-28 18:43:27
12929
+ */
12930
+ getSortModel() {
12931
+ return {
12932
+ minorSortAppDEFieldId: void 0,
12933
+ minorSortDir: void 0
12934
+ };
12935
+ }
12807
12936
  /**
12808
12937
  * 设置排序
12809
12938
  * 无参数时设置的是默认排序。
@@ -12816,6 +12945,30 @@ var MDControlController = class extends ControlController {
12816
12945
  setSort(key, order) {
12817
12946
  if (key && order) {
12818
12947
  this.state.sortQuery = "".concat(key, ",").concat(order);
12948
+ } else if (!key && !order) {
12949
+ const { minorSortAppDEFieldId, minorSortDir } = this.getSortModel();
12950
+ if (this.view && localStorage.getItem("".concat(this.view.model.id, ".").concat(this.model.name, ".sort"))) {
12951
+ this.state.sortQuery = localStorage.getItem(
12952
+ "".concat(this.view.model.id, ".").concat(this.model.name, ".sort")
12953
+ );
12954
+ } else if (minorSortAppDEFieldId && minorSortDir) {
12955
+ const fieldName = this.fieldIdNameMap.get(minorSortAppDEFieldId);
12956
+ this.state.sortQuery = "".concat(fieldName.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
12957
+ }
12958
+ } else {
12959
+ this.state.sortQuery = "";
12960
+ }
12961
+ if (this.view) {
12962
+ if (this.state.sortQuery) {
12963
+ localStorage.setItem(
12964
+ "".concat(this.view.model.id, ".").concat(this.model.name, ".sort"),
12965
+ this.state.sortQuery
12966
+ );
12967
+ } else {
12968
+ localStorage.removeItem(
12969
+ "".concat(this.view.model.id, ".").concat(this.model.name, ".sort")
12970
+ );
12971
+ }
12819
12972
  }
12820
12973
  }
12821
12974
  /**
@@ -12931,7 +13084,7 @@ var MDControlController = class extends ControlController {
12931
13084
  async remove(args) {
12932
13085
  const { context, params, data } = this.handlerAbilityParams(args);
12933
13086
  if (!(data == null ? void 0 : data.length)) {
12934
- throw new RuntimeError32("\u672A\u9009\u4E2D\u6570\u636E");
13087
+ throw new RuntimeError33("\u672A\u9009\u4E2D\u6570\u636E");
12935
13088
  }
12936
13089
  if ((args == null ? void 0 : args.silent) !== true) {
12937
13090
  const del = await ibiz.confirm.error({
@@ -13080,7 +13233,7 @@ var MDControlController = class extends ControlController {
13080
13233
  (importItem) => importItem.id === dedataImportId
13081
13234
  );
13082
13235
  if (!dataImport) {
13083
- throw new RuntimeError32("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
13236
+ throw new RuntimeError33("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
13084
13237
  }
13085
13238
  let importName = "DataImport";
13086
13239
  if (dataImport.enableCustomized) {
@@ -13114,8 +13267,8 @@ var MDControlController = class extends ControlController {
13114
13267
  // src/controller/control/app-menu/app-menu.controller.ts
13115
13268
  import {
13116
13269
  findRecursiveChild,
13117
- RuntimeError as RuntimeError33,
13118
- RuntimeModelError as RuntimeModelError23
13270
+ RuntimeError as RuntimeError34,
13271
+ RuntimeModelError as RuntimeModelError24
13119
13272
  } from "@ibiz-template/core";
13120
13273
  var AppMenuController = class extends ControlController {
13121
13274
  initState() {
@@ -13154,14 +13307,14 @@ var AppMenuController = class extends ControlController {
13154
13307
  childrenFields: ["appMenuItems"]
13155
13308
  });
13156
13309
  if (!menuItem) {
13157
- throw new RuntimeError33("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
13310
+ throw new RuntimeError34("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
13158
13311
  }
13159
13312
  this.evt.emit("onClick", {
13160
13313
  eventArg: id,
13161
13314
  event
13162
13315
  });
13163
13316
  if (!menuItem.appFuncId) {
13164
- throw new RuntimeModelError23(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13317
+ throw new RuntimeModelError24(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13165
13318
  }
13166
13319
  const tempContext = this.context.clone();
13167
13320
  tempContext.srfappid = menuItem.appId;
@@ -13270,8 +13423,8 @@ var AppMenuController = class extends ControlController {
13270
13423
  // src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
13271
13424
  import {
13272
13425
  findRecursiveChild as findRecursiveChild2,
13273
- RuntimeError as RuntimeError34,
13274
- RuntimeModelError as RuntimeModelError24
13426
+ RuntimeError as RuntimeError35,
13427
+ RuntimeModelError as RuntimeModelError25
13275
13428
  } from "@ibiz-template/core";
13276
13429
  var AppMenuIconViewController = class extends AppMenuController {
13277
13430
  async onClickMenuItem(id, event) {
@@ -13280,14 +13433,14 @@ var AppMenuIconViewController = class extends AppMenuController {
13280
13433
  childrenFields: ["appMenuItems"]
13281
13434
  });
13282
13435
  if (!menuItem) {
13283
- throw new RuntimeError34("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
13436
+ throw new RuntimeError35("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
13284
13437
  }
13285
13438
  this.evt.emit("onClick", {
13286
13439
  eventArg: id,
13287
13440
  event
13288
13441
  });
13289
13442
  if (!menuItem.appFuncId) {
13290
- throw new RuntimeModelError24(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13443
+ throw new RuntimeModelError25(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13291
13444
  }
13292
13445
  const tempContext = this.context.clone();
13293
13446
  if (this.routeDepth === 1) {
@@ -13308,7 +13461,7 @@ var AppMenuIconViewController = class extends AppMenuController {
13308
13461
  import dayjs2 from "dayjs";
13309
13462
 
13310
13463
  // src/controller/control/calendar/calendar.service.ts
13311
- import { RuntimeError as RuntimeError35 } from "@ibiz-template/core";
13464
+ import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
13312
13465
  var CalendarService = class extends MDControlService {
13313
13466
  /**
13314
13467
  * 执行查询多条数据的方法
@@ -13358,11 +13511,11 @@ var CalendarService = class extends MDControlService {
13358
13511
  setCalendarConfigData(items, index) {
13359
13512
  const { sysCalendarItems } = this.model;
13360
13513
  if (!sysCalendarItems) {
13361
- throw new RuntimeError35("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
13514
+ throw new RuntimeError36("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
13362
13515
  }
13363
13516
  const calendarItem = sysCalendarItems[index];
13364
13517
  if (!calendarItem) {
13365
- throw new RuntimeError35("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
13518
+ throw new RuntimeError36("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
13366
13519
  }
13367
13520
  return items.map((item) => {
13368
13521
  return new CalendarItemData(calendarItem, item);
@@ -13576,17 +13729,17 @@ var CalendarController = class extends MDControlController {
13576
13729
  };
13577
13730
 
13578
13731
  // src/controller/control/chart/chart.controller.ts
13579
- import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
13732
+ import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
13580
13733
 
13581
13734
  // src/controller/control/chart/generator/chart-options-generator.ts
13582
13735
  import { mergeDeepRight as mergeDeepRight3 } from "ramda";
13583
- import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
13736
+ import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
13584
13737
 
13585
13738
  // src/controller/control/chart/generator/line-series-generator.ts
13586
- import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
13739
+ import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
13587
13740
 
13588
13741
  // src/controller/control/chart/generator/base-series-generator.ts
13589
- import { plus, RuntimeModelError as RuntimeModelError25, toNumberOrNil } from "@ibiz-template/core";
13742
+ import { plus, RuntimeModelError as RuntimeModelError26, toNumberOrNil } from "@ibiz-template/core";
13590
13743
  import dayjs3 from "dayjs";
13591
13744
  import minMax from "dayjs/plugin/minMax";
13592
13745
  import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
@@ -13636,10 +13789,10 @@ var BaseSeriesGenerator = class {
13636
13789
  this.chartGenerator = chartGenerator;
13637
13790
  const { chartSeriesEncode, caption, id, userParam } = model;
13638
13791
  if (!model.catalogField) {
13639
- throw new RuntimeModelError25(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
13792
+ throw new RuntimeModelError26(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
13640
13793
  }
13641
13794
  if (!model.valueField) {
13642
- throw new RuntimeModelError25(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
13795
+ throw new RuntimeModelError26(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
13643
13796
  }
13644
13797
  this.catalogField = chartGenerator.getFieldKey(model.catalogField);
13645
13798
  this.valueField = chartGenerator.getFieldKey(model.valueField);
@@ -14062,10 +14215,10 @@ var BaseSeriesGenerator = class {
14062
14215
  var LineSeriesGenerator = class extends BaseSeriesGenerator {
14063
14216
  calcStaticOptions() {
14064
14217
  if (this.xAxisIndex === void 0) {
14065
- throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14218
+ throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14066
14219
  }
14067
14220
  if (this.yAxisIndex === void 0) {
14068
- throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14221
+ throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14069
14222
  }
14070
14223
  const options = super.calcStaticOptions();
14071
14224
  options.xAxisIndex = this.xAxisIndex;
@@ -14081,14 +14234,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
14081
14234
  };
14082
14235
 
14083
14236
  // src/controller/control/chart/generator/bar-series-generator.ts
14084
- import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
14237
+ import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
14085
14238
  var BarSeriesGenerator = class extends BaseSeriesGenerator {
14086
14239
  calcStaticOptions() {
14087
14240
  if (this.xAxisIndex === void 0) {
14088
- throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14241
+ throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14089
14242
  }
14090
14243
  if (this.yAxisIndex === void 0) {
14091
- throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14244
+ throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14092
14245
  }
14093
14246
  const options = super.calcStaticOptions();
14094
14247
  options.xAxisIndex = this.xAxisIndex;
@@ -14141,14 +14294,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
14141
14294
  };
14142
14295
 
14143
14296
  // src/controller/control/chart/generator/scatter-series-generator.ts
14144
- import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
14297
+ import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
14145
14298
  var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
14146
14299
  calcStaticOptions() {
14147
14300
  if (this.xAxisIndex === void 0) {
14148
- throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14301
+ throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14149
14302
  }
14150
14303
  if (this.yAxisIndex === void 0) {
14151
- throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14304
+ throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14152
14305
  }
14153
14306
  const options = super.calcStaticOptions();
14154
14307
  options.xAxisIndex = this.xAxisIndex;
@@ -14589,7 +14742,7 @@ var ChartOptionsGenerator2 = class {
14589
14742
  getChartDataByParams(params) {
14590
14743
  const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
14591
14744
  if (!generator) {
14592
- throw new RuntimeError36("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
14745
+ throw new RuntimeError37("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
14593
14746
  }
14594
14747
  return generator.getChartDataByParams(params);
14595
14748
  }
@@ -14702,10 +14855,10 @@ var ChartController = class extends MDControlController {
14702
14855
  */
14703
14856
  updateChart() {
14704
14857
  if (!this.chart) {
14705
- throw new RuntimeError37("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
14858
+ throw new RuntimeError38("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
14706
14859
  }
14707
14860
  if (!this.options) {
14708
- throw new RuntimeError37("options\u8FD8\u6CA1\u8BA1\u7B97");
14861
+ throw new RuntimeError38("options\u8FD8\u6CA1\u8BA1\u7B97");
14709
14862
  }
14710
14863
  this.chart.setOption(this.options);
14711
14864
  this.resizeChart();
@@ -14743,20 +14896,20 @@ var CaptionBarController = class extends ControlController {
14743
14896
  };
14744
14897
 
14745
14898
  // src/controller/control/toolbar/toolbar.controllerr.ts
14746
- import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError46 } from "@ibiz-template/core";
14899
+ import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError47 } from "@ibiz-template/core";
14747
14900
 
14748
14901
  // src/ui-action/provider/backend-ui-action-provider.ts
14749
- import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
14902
+ import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
14750
14903
  import { isArray as isArray8 } from "qx-util";
14751
14904
 
14752
14905
  // src/ui-action/provider/ui-action-provider-base.ts
14753
- import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
14906
+ import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
14754
14907
 
14755
14908
  // src/ui-logic/index.ts
14756
- import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
14909
+ import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
14757
14910
 
14758
14911
  // src/ui-logic/ui-logic.ts
14759
- import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
14912
+ import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
14760
14913
 
14761
14914
  // src/ui-logic/ui-logic-context.ts
14762
14915
  var UILogicContext = class {
@@ -14902,23 +15055,23 @@ var UILogicContext = class {
14902
15055
  };
14903
15056
 
14904
15057
  // src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
14905
- import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
15058
+ import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
14906
15059
 
14907
15060
  // src/ui-logic/ui-logic-link/ui-logic-link.ts
14908
- import { ModelError as ModelError19 } from "@ibiz-template/core";
15061
+ import { ModelError as ModelError20 } from "@ibiz-template/core";
14909
15062
 
14910
15063
  // src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
14911
- import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
15064
+ import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
14912
15065
 
14913
15066
  // src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
14914
15067
  var UILogicLinkCond = class {
14915
15068
  };
14916
15069
 
14917
15070
  // src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
14918
- import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
15071
+ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
14919
15072
 
14920
15073
  // src/ui-logic/utils/handle-src-val.ts
14921
- import { ModelError as ModelError17 } from "@ibiz-template/core";
15074
+ import { ModelError as ModelError18 } from "@ibiz-template/core";
14922
15075
  import { clone as clone17 } from "ramda";
14923
15076
  function handleSrcVal2(ctx, srcValParams) {
14924
15077
  const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
@@ -14949,7 +15102,7 @@ function handleSrcVal2(ctx, srcValParams) {
14949
15102
  value = clone17(ibiz.env);
14950
15103
  break;
14951
15104
  default:
14952
- throw new ModelError17(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
15105
+ throw new ModelError18(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
14953
15106
  }
14954
15107
  if (value && srcField) {
14955
15108
  try {
@@ -15011,7 +15164,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
15011
15164
  switch (this.type) {
15012
15165
  case "ENTITYFIELD": {
15013
15166
  if (!this.value) {
15014
- throw new RuntimeModelError29(
15167
+ throw new RuntimeModelError30(
15015
15168
  this.model,
15016
15169
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
15017
15170
  );
@@ -15021,7 +15174,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
15021
15174
  }
15022
15175
  case "SRCENTITYFIELD": {
15023
15176
  if (!this.value) {
15024
- throw new RuntimeModelError29(
15177
+ throw new RuntimeModelError30(
15025
15178
  this.model,
15026
15179
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
15027
15180
  );
@@ -15033,7 +15186,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
15033
15186
  return testCond(dstVal, this.op, srcVal);
15034
15187
  }
15035
15188
  case "CURTIME":
15036
- throw new ModelError18(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
15189
+ throw new ModelError19(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
15037
15190
  default:
15038
15191
  return testCond(dstVal, this.op, this.value);
15039
15192
  }
@@ -15087,7 +15240,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
15087
15240
  test(ctx, context, data) {
15088
15241
  let bol = true;
15089
15242
  if (this.conds.length === 0) {
15090
- throw new RuntimeModelError30(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
15243
+ throw new RuntimeModelError31(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
15091
15244
  }
15092
15245
  for (let i = 0; i < this.conds.length; i++) {
15093
15246
  const cond = this.conds[i];
@@ -15175,13 +15328,13 @@ var UILogicLink = class {
15175
15328
  case 1:
15176
15329
  return true;
15177
15330
  case 2:
15178
- throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u7ED3\u675F");
15331
+ throw new ModelError20(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u7ED3\u675F");
15179
15332
  case 3:
15180
- throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u62D2\u7EDD");
15333
+ throw new ModelError20(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u62D2\u7EDD");
15181
15334
  case 9:
15182
- throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u5E38\u5904\u7406");
15335
+ throw new ModelError20(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u5E38\u5904\u7406");
15183
15336
  default:
15184
- throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B:".concat(linkMode));
15337
+ throw new ModelError20(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B:".concat(linkMode));
15185
15338
  }
15186
15339
  }
15187
15340
  };
@@ -15213,10 +15366,10 @@ var DEActionNode2 = class extends UILogicNode {
15213
15366
  retDEUILogicParamId
15214
15367
  } = this.model;
15215
15368
  if (!dstAppDataEntityId) {
15216
- throw new RuntimeModelError31(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
15369
+ throw new RuntimeModelError32(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
15217
15370
  }
15218
15371
  if (!dstAppDEActionId) {
15219
- throw new RuntimeModelError31(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
15372
+ throw new RuntimeModelError32(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
15220
15373
  }
15221
15374
  const requestData = ctx.params[dstDEUILogicParamId];
15222
15375
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -15234,13 +15387,13 @@ var DEActionNode2 = class extends UILogicNode {
15234
15387
  };
15235
15388
 
15236
15389
  // src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
15237
- import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
15390
+ import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
15238
15391
  var DEUIActionNode = class extends UILogicNode {
15239
15392
  async exec(ctx) {
15240
15393
  const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
15241
15394
  const { data, parameters } = ctx;
15242
15395
  if (!dstAppDEUIActionId) {
15243
- throw new RuntimeModelError32(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
15396
+ throw new RuntimeModelError33(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
15244
15397
  }
15245
15398
  let actionData = [data];
15246
15399
  if (dstDEUILogicParamId) {
@@ -15271,7 +15424,7 @@ var StartNode2 = class extends UILogicNode {
15271
15424
  };
15272
15425
 
15273
15426
  // src/ui-logic/ui-logic-node/end-node/end-node.ts
15274
- import { ModelError as ModelError20 } from "@ibiz-template/core";
15427
+ import { ModelError as ModelError21 } from "@ibiz-template/core";
15275
15428
  var EndNode2 = class extends UILogicNode {
15276
15429
  async exec(ctx) {
15277
15430
  ctx.isEndNode = true;
@@ -15295,7 +15448,7 @@ var EndNode2 = class extends UILogicNode {
15295
15448
  case "LOGICPARAMFIELD":
15296
15449
  case "BREAK":
15297
15450
  default:
15298
- throw new ModelError20(
15451
+ throw new ModelError21(
15299
15452
  this.model,
15300
15453
  "\u6682\u672A\u652F\u6301\u7684\u7ED3\u675F\u8282\u70B9\u8FD4\u56DE\u503C\u7C7B\u578B: ".concat(returnType)
15301
15454
  );
@@ -15304,7 +15457,7 @@ var EndNode2 = class extends UILogicNode {
15304
15457
  };
15305
15458
 
15306
15459
  // src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
15307
- import { ModelError as ModelError21, RuntimeError as RuntimeError38 } from "@ibiz-template/core";
15460
+ import { ModelError as ModelError22, RuntimeError as RuntimeError39 } from "@ibiz-template/core";
15308
15461
  import { clone as clone18 } from "ramda";
15309
15462
  var PrepareJSParamNode = class extends UILogicNode {
15310
15463
  async exec(ctx) {
@@ -15336,7 +15489,7 @@ var PrepareJSParamNode = class extends UILogicNode {
15336
15489
  await this.sortParam(nodeParam, ctx);
15337
15490
  break;
15338
15491
  default:
15339
- throw new ModelError21(
15492
+ throw new ModelError22(
15340
15493
  nodeParam,
15341
15494
  "\u6682\u672A\u652F\u6301\u903B\u8F91\u5904\u7406\u53C2\u6570\u64CD\u4F5C".concat(nodeParam.paramAction)
15342
15495
  );
@@ -15354,7 +15507,7 @@ var PrepareJSParamNode = class extends UILogicNode {
15354
15507
  setParamValue(nodeParam, ctx) {
15355
15508
  const { dstFieldName, dstDEUILogicParamId } = nodeParam;
15356
15509
  if (!dstDEUILogicParamId) {
15357
- throw new RuntimeError38("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
15510
+ throw new RuntimeError39("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
15358
15511
  }
15359
15512
  let dstField = dstFieldName;
15360
15513
  if (ctx.isEntityParam(dstDEUILogicParamId)) {
@@ -15471,43 +15624,43 @@ var PrepareJSParamNode = class extends UILogicNode {
15471
15624
  };
15472
15625
 
15473
15626
  // src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
15474
- import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
15627
+ import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
15475
15628
  import { isFunction } from "lodash-es";
15476
15629
  var ViewCtrlInvokeNode = class extends UILogicNode {
15477
15630
  async exec(ctx) {
15478
15631
  ctx.isEndNode = true;
15479
15632
  const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
15480
15633
  if (!invokeCtrlId) {
15481
- throw new RuntimeModelError33(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
15634
+ throw new RuntimeModelError34(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
15482
15635
  }
15483
15636
  if (!invokeParamId) {
15484
- throw new RuntimeModelError33(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
15637
+ throw new RuntimeModelError34(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
15485
15638
  }
15486
15639
  if (!invokeMethod) {
15487
- throw new RuntimeModelError33(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
15640
+ throw new RuntimeModelError34(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
15488
15641
  }
15489
15642
  const invokeParam = ctx.params[invokeParamId];
15490
15643
  if (!invokeParam) {
15491
- throw new RuntimeError39("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
15644
+ throw new RuntimeError40("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
15492
15645
  }
15493
15646
  const invokeCtrl = ctx.params[invokeCtrlId];
15494
15647
  if (!invokeCtrl) {
15495
- throw new RuntimeError39("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
15648
+ throw new RuntimeError40("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
15496
15649
  }
15497
15650
  if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
15498
- throw new RuntimeError39("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
15651
+ throw new RuntimeError40("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
15499
15652
  }
15500
15653
  await invokeCtrl[invokeMethod](invokeParam);
15501
15654
  }
15502
15655
  };
15503
15656
 
15504
15657
  // src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
15505
- import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
15658
+ import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
15506
15659
  var BindParamNode2 = class extends UILogicNode {
15507
15660
  async exec(ctx) {
15508
15661
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
15509
15662
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
15510
- throw new RuntimeModelError34(
15663
+ throw new RuntimeModelError35(
15511
15664
  this.model,
15512
15665
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
15513
15666
  );
@@ -15518,7 +15671,7 @@ var BindParamNode2 = class extends UILogicNode {
15518
15671
  };
15519
15672
 
15520
15673
  // src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
15521
- import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
15674
+ import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
15522
15675
  var MsgBoxNode = class extends UILogicNode {
15523
15676
  constructor() {
15524
15677
  super(...arguments);
@@ -15532,10 +15685,10 @@ var MsgBoxNode = class extends UILogicNode {
15532
15685
  async exec(ctx) {
15533
15686
  const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
15534
15687
  if (!msgBoxType) {
15535
- throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
15688
+ throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
15536
15689
  }
15537
15690
  if (!buttonsType) {
15538
- throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
15691
+ throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
15539
15692
  }
15540
15693
  let { title } = this.model;
15541
15694
  let { message } = this.model;
@@ -15577,7 +15730,7 @@ var MsgBoxNode = class extends UILogicNode {
15577
15730
  resultTags = ["ok", "cancel"];
15578
15731
  break;
15579
15732
  default:
15580
- throw new ModelError22(this.model, "".concat(buttonsType, "\u6682\u672A\u652F\u6301"));
15733
+ throw new ModelError23(this.model, "".concat(buttonsType, "\u6682\u672A\u652F\u6301"));
15581
15734
  }
15582
15735
  const result = await ibiz.modal.confirm(modalParams);
15583
15736
  ctx.setLastReturn(resultTags[result ? 0 : 1]);
@@ -15595,12 +15748,12 @@ var PFPluginNode = class extends UILogicNode {
15595
15748
  };
15596
15749
 
15597
15750
  // src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
15598
- import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
15751
+ import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
15599
15752
  var DebugParamNode = class extends UILogicNode {
15600
15753
  async exec(ctx) {
15601
15754
  const { dstDEUILogicParamId, name } = this.model;
15602
15755
  if (!dstDEUILogicParamId) {
15603
- throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15756
+ throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15604
15757
  }
15605
15758
  const param = ctx.params[dstDEUILogicParamId];
15606
15759
  console.log("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
@@ -15608,25 +15761,25 @@ var DebugParamNode = class extends UILogicNode {
15608
15761
  };
15609
15762
 
15610
15763
  // src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
15611
- import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
15764
+ import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
15612
15765
  var ResetParamNode2 = class extends UILogicNode {
15613
15766
  async exec(ctx) {
15614
15767
  const { dstDEUILogicParamId } = this.model;
15615
15768
  if (!dstDEUILogicParamId) {
15616
- throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15769
+ throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15617
15770
  }
15618
15771
  ctx.resetParam(dstDEUILogicParamId);
15619
15772
  }
15620
15773
  };
15621
15774
 
15622
15775
  // src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
15623
- import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
15776
+ import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
15624
15777
  import { clone as clone19 } from "ramda";
15625
15778
  var CopyParamNode2 = class extends UILogicNode {
15626
15779
  async exec(ctx) {
15627
15780
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
15628
15781
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
15629
- throw new RuntimeModelError38(
15782
+ throw new RuntimeModelError39(
15630
15783
  this.model,
15631
15784
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
15632
15785
  );
@@ -15637,7 +15790,7 @@ var CopyParamNode2 = class extends UILogicNode {
15637
15790
  };
15638
15791
 
15639
15792
  // src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
15640
- import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
15793
+ import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
15641
15794
  var AppendParamNode2 = class extends UILogicNode {
15642
15795
  async exec(ctx) {
15643
15796
  const {
@@ -15648,7 +15801,7 @@ var AppendParamNode2 = class extends UILogicNode {
15648
15801
  srcSize
15649
15802
  } = this.model;
15650
15803
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
15651
- throw new RuntimeModelError39(
15804
+ throw new RuntimeModelError40(
15652
15805
  this.model,
15653
15806
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
15654
15807
  );
@@ -15666,12 +15819,12 @@ var AppendParamNode2 = class extends UILogicNode {
15666
15819
  };
15667
15820
 
15668
15821
  // src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
15669
- import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
15822
+ import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
15670
15823
  var SortParamNode2 = class extends UILogicNode {
15671
15824
  async exec(ctx) {
15672
15825
  const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
15673
15826
  if (!dstDEUILogicParamId || !dstFieldName) {
15674
- throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
15827
+ throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
15675
15828
  }
15676
15829
  const key = dstFieldName;
15677
15830
  const arr = ctx.params[dstDEUILogicParamId];
@@ -15682,19 +15835,19 @@ var SortParamNode2 = class extends UILogicNode {
15682
15835
  };
15683
15836
 
15684
15837
  // src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
15685
- import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
15838
+ import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
15686
15839
  var RenewParamNode2 = class extends UILogicNode {
15687
15840
  async exec(ctx) {
15688
15841
  const { dstDEUILogicParamId } = this.model;
15689
15842
  if (!dstDEUILogicParamId) {
15690
- throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15843
+ throw new RuntimeModelError42(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15691
15844
  }
15692
15845
  ctx.renewParam(dstDEUILogicParamId);
15693
15846
  }
15694
15847
  };
15695
15848
 
15696
15849
  // src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
15697
- import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
15850
+ import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
15698
15851
  var DataSetNode2 = class extends UILogicNode {
15699
15852
  async exec(ctx) {
15700
15853
  const {
@@ -15704,7 +15857,7 @@ var DataSetNode2 = class extends UILogicNode {
15704
15857
  retDEUILogicParamId
15705
15858
  } = this.model;
15706
15859
  if (!dstDEUILogicParamId) {
15707
- throw new RuntimeModelError42(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
15860
+ throw new RuntimeModelError43(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
15708
15861
  }
15709
15862
  const queryParams = ctx.params[dstDEUILogicParamId];
15710
15863
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -15721,43 +15874,43 @@ var DataSetNode2 = class extends UILogicNode {
15721
15874
  };
15722
15875
 
15723
15876
  // src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
15724
- import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
15877
+ import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
15725
15878
  var ThrowExceptionNode2 = class extends UILogicNode {
15726
15879
  async exec(_ctx) {
15727
15880
  const { errorInfo } = this.model;
15728
- throw new RuntimeError40(errorInfo);
15881
+ throw new RuntimeError41(errorInfo);
15729
15882
  }
15730
15883
  };
15731
15884
 
15732
15885
  // src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
15733
- import { RuntimeError as RuntimeError41, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
15886
+ import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
15734
15887
  var ViewCtrlFireEventNode = class extends UILogicNode {
15735
15888
  async exec(ctx) {
15736
15889
  ctx.isEndNode = true;
15737
15890
  const { eventName, eventParamId, fireCtrlId } = this.model;
15738
15891
  if (!fireCtrlId) {
15739
- throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
15892
+ throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
15740
15893
  }
15741
15894
  if (!eventName) {
15742
- throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
15895
+ throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
15743
15896
  }
15744
15897
  if (!eventParamId) {
15745
- throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
15898
+ throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
15746
15899
  }
15747
15900
  const invokeCtrl = ctx.params[fireCtrlId];
15748
15901
  if (!invokeCtrl) {
15749
- throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
15902
+ throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
15750
15903
  }
15751
15904
  const eventParam = ctx.params[eventParamId];
15752
15905
  if (!eventParam) {
15753
- throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
15906
+ throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
15754
15907
  }
15755
15908
  await invokeCtrl.evt.emit(eventName, eventParam);
15756
15909
  }
15757
15910
  };
15758
15911
 
15759
15912
  // src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
15760
- import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
15913
+ import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
15761
15914
  var ExecuteDELogicNode = class extends UILogicNode {
15762
15915
  async exec(ctx) {
15763
15916
  const {
@@ -15767,17 +15920,17 @@ var ExecuteDELogicNode = class extends UILogicNode {
15767
15920
  retDEUILogicParamId
15768
15921
  } = this.model;
15769
15922
  if (!dstAppDataEntityId) {
15770
- throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
15923
+ throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
15771
15924
  }
15772
15925
  if (!dstAppDELogicId) {
15773
- throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
15926
+ throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
15774
15927
  }
15775
15928
  if (!dstDEUILogicParamId) {
15776
- throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
15929
+ throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
15777
15930
  }
15778
15931
  const dstParam = ctx.params[dstDEUILogicParamId];
15779
15932
  if (!dstParam) {
15780
- throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
15933
+ throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
15781
15934
  }
15782
15935
  const result = await execDELogicById(
15783
15936
  dstAppDELogicId,
@@ -15810,7 +15963,7 @@ var RawJSCodeNode = class extends UILogicNode {
15810
15963
  };
15811
15964
 
15812
15965
  // src/ui-logic/ui-logic-param/ui-logic-param.ts
15813
- import { ModelError as ModelError23 } from "@ibiz-template/core";
15966
+ import { ModelError as ModelError24 } from "@ibiz-template/core";
15814
15967
  var UILogicParam = class {
15815
15968
  /**
15816
15969
  * Creates an instance of UILogicParam.
@@ -15865,7 +16018,7 @@ var UILogicParam = class {
15865
16018
  } else if (m.entityListParam) {
15866
16019
  ctx.params[tag] = [];
15867
16020
  } else if (m.entityPageParam) {
15868
- throw new ModelError23(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5206\u9875\u67E5\u8BE2\u7ED3\u679C");
16021
+ throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5206\u9875\u67E5\u8BE2\u7ED3\u679C");
15869
16022
  } else if (m.entityParam) {
15870
16023
  ctx.params[tag] = {};
15871
16024
  } else if (m.lastReturnParam) {
@@ -15873,9 +16026,9 @@ var UILogicParam = class {
15873
16026
  } else if (m.navContextParam) {
15874
16027
  ctx.params[tag] = context;
15875
16028
  } else if (m.navViewParamParam) {
15876
- throw new ModelError23(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u89C6\u56FE\u8DEF\u7531\u53C2\u6570");
16029
+ throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u89C6\u56FE\u8DEF\u7531\u53C2\u6570");
15877
16030
  } else if (m.routeViewSessionParam) {
15878
- throw new ModelError23(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u8DEF\u7531\u89C6\u56FE\u4F1A\u8BDD");
16031
+ throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u8DEF\u7531\u89C6\u56FE\u4F1A\u8BDD");
15879
16032
  } else if (m.simpleListParam) {
15880
16033
  ctx.params[tag] = [];
15881
16034
  } else if (m.simpleParam) {
@@ -15883,7 +16036,7 @@ var UILogicParam = class {
15883
16036
  } else if (m.viewNavDataParam) {
15884
16037
  ctx.params[tag] = params;
15885
16038
  } else if (m.viewSessionParam) {
15886
- throw new ModelError23(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5F53\u524D\u89C6\u56FE\u4F1A\u8BDD");
16039
+ throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5F53\u524D\u89C6\u56FE\u4F1A\u8BDD");
15887
16040
  }
15888
16041
  }
15889
16042
  /**
@@ -15900,7 +16053,7 @@ var UILogicParam = class {
15900
16053
  } else if (m.simpleParam || m.entityParam) {
15901
16054
  ctx.params[tag] = {};
15902
16055
  } else {
15903
- throw new ModelError23(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
16056
+ throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
15904
16057
  }
15905
16058
  }
15906
16059
  };
@@ -15935,7 +16088,7 @@ var UILogic = class {
15935
16088
  this.params = /* @__PURE__ */ new Map();
15936
16089
  var _a;
15937
16090
  if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
15938
- throw new RuntimeModelError45(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
16091
+ throw new RuntimeModelError46(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
15939
16092
  }
15940
16093
  model.deuilogicNodes.forEach((node) => {
15941
16094
  const { logicNodeType } = node;
@@ -16002,7 +16155,7 @@ var UILogic = class {
16002
16155
  logicNode = new RawJSCodeNode(node);
16003
16156
  break;
16004
16157
  default:
16005
- throw new ModelError24(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
16158
+ throw new ModelError25(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
16006
16159
  }
16007
16160
  this.nodes.set(node.id, logicNode);
16008
16161
  });
@@ -16055,7 +16208,7 @@ var UILogic = class {
16055
16208
  const start = this.nodes.get(startDEUILogicNodeId);
16056
16209
  await this.deepExec(start, ctx);
16057
16210
  } else {
16058
- throw new RuntimeModelError45(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
16211
+ throw new RuntimeModelError46(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
16059
16212
  }
16060
16213
  if (ctx.isEndNode) {
16061
16214
  return ctx.result;
@@ -16101,7 +16254,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
16101
16254
  const app = ibiz.hub.getApp(parameters.context.srfappid);
16102
16255
  const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
16103
16256
  if (!deUILogic) {
16104
- throw new RuntimeError43(
16257
+ throw new RuntimeError44(
16105
16258
  "\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
16106
16259
  );
16107
16260
  }
@@ -16114,7 +16267,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
16114
16267
  }
16115
16268
 
16116
16269
  // src/ui-action/uiaction-util.ts
16117
- import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
16270
+ import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
16118
16271
  var UIActionUtil = class {
16119
16272
  /**
16120
16273
  * 执行界面行为
@@ -16129,7 +16282,7 @@ var UIActionUtil = class {
16129
16282
  static async exec(actionId, params, appId) {
16130
16283
  const action = await getUIActionById(actionId, appId);
16131
16284
  if (!action) {
16132
- throw new RuntimeError44("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
16285
+ throw new RuntimeError45("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
16133
16286
  }
16134
16287
  if (action.actionTarget === "SINGLEDATA") {
16135
16288
  const validateResult = await params.view.call("Validate" /* VALIDATE */);
@@ -16190,7 +16343,7 @@ var UIActionProviderBase = class {
16190
16343
  const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
16191
16344
  if (uilogicAttachMode === "REPLACE") {
16192
16345
  if (!appDEUILogicId) {
16193
- throw new RuntimeModelError46(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16346
+ throw new RuntimeModelError47(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16194
16347
  }
16195
16348
  await execUILogic(appDEUILogicId, appDataEntityId, args);
16196
16349
  return result;
@@ -16205,7 +16358,7 @@ var UIActionProviderBase = class {
16205
16358
  }
16206
16359
  if (action.uilogicAttachMode === "AFTER") {
16207
16360
  if (!appDEUILogicId) {
16208
- throw new RuntimeModelError46(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16361
+ throw new RuntimeModelError47(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16209
16362
  }
16210
16363
  await execUILogic(
16211
16364
  appDEUILogicId,
@@ -16430,7 +16583,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
16430
16583
  const entityName = action.appDataEntityId;
16431
16584
  const methodName = action.appDEMethodId;
16432
16585
  if (!entityName || !methodName) {
16433
- throw new RuntimeModelError47(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
16586
+ throw new RuntimeModelError48(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
16434
16587
  }
16435
16588
  const { resultContext, resultParams, resultData } = await this.handleParams(
16436
16589
  action,
@@ -16555,9 +16708,9 @@ var SysUIActionProvider = class extends UIActionProviderBase {
16555
16708
  // src/ui-action/provider/front-ui-action-provider.ts
16556
16709
  import {
16557
16710
  StringUtil,
16558
- RuntimeModelError as RuntimeModelError48,
16559
- ModelError as ModelError25,
16560
- RuntimeError as RuntimeError45
16711
+ RuntimeModelError as RuntimeModelError49,
16712
+ ModelError as ModelError26,
16713
+ RuntimeError as RuntimeError46
16561
16714
  } from "@ibiz-template/core";
16562
16715
  var FrontUIActionProvider = class extends UIActionProviderBase {
16563
16716
  async execAction(action, args) {
@@ -16573,7 +16726,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16573
16726
  case "WIZARD": {
16574
16727
  const frontPSAppView = action.frontAppViewId;
16575
16728
  if (!frontPSAppView) {
16576
- throw new RuntimeModelError48(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
16729
+ throw new RuntimeModelError49(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
16577
16730
  }
16578
16731
  const { resultContext, resultParams } = await this.handleParams(
16579
16732
  action,
@@ -16611,7 +16764,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16611
16764
  actionResult = this.doOther(action, args);
16612
16765
  break;
16613
16766
  default:
16614
- throw new ModelError25(
16767
+ throw new ModelError26(
16615
16768
  action,
16616
16769
  "\u672A\u652F\u6301\u7684\u524D\u53F0\u5904\u7406\u6A21\u5F0F[".concat(action.frontProcessType, "]")
16617
16770
  );
@@ -16638,7 +16791,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16638
16791
  );
16639
16792
  return result || {};
16640
16793
  }
16641
- throw new RuntimeModelError48(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
16794
+ throw new RuntimeModelError49(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
16642
16795
  }
16643
16796
  /**
16644
16797
  * 执行打印行为
@@ -16667,7 +16820,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16667
16820
  if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
16668
16821
  requestUrl += "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
16669
16822
  } else {
16670
- throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
16823
+ throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
16671
16824
  }
16672
16825
  const res = await ibiz.net.request(requestUrl, {
16673
16826
  method: "get",
@@ -16694,10 +16847,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16694
16847
  window.open(link, "_blank");
16695
16848
  }
16696
16849
  } else {
16697
- throw new RuntimeError45("\u6253\u5370\u5931\u8D25");
16850
+ throw new RuntimeError46("\u6253\u5370\u5931\u8D25");
16698
16851
  }
16699
16852
  } else {
16700
- throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
16853
+ throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
16701
16854
  }
16702
16855
  }
16703
16856
  /**
@@ -16740,7 +16893,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16740
16893
  refreshMode: 1
16741
16894
  };
16742
16895
  }
16743
- throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
16896
+ throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
16744
16897
  }
16745
16898
  /**
16746
16899
  * 执行导出行为
@@ -16791,10 +16944,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16791
16944
  URL.revokeObjectURL(elink.href);
16792
16945
  document.body.removeChild(elink);
16793
16946
  } else {
16794
- throw new RuntimeError45("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
16947
+ throw new RuntimeError46("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
16795
16948
  }
16796
16949
  } else {
16797
- throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
16950
+ throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
16798
16951
  }
16799
16952
  }
16800
16953
  };
@@ -16827,7 +16980,7 @@ var LoginOutUIActionProvider = class extends UIActionProviderBase {
16827
16980
  desc: "\u60A8\u786E\u5B9A\u8981\u9000\u51FA\u767B\u5F55\u5417\uFF1F\u9000\u51FA\u540E\u60A8\u5C06\u65E0\u6CD5\u7EE7\u7EED\u8BBF\u95EE\u5DF2\u767B\u5F55\u72B6\u6001\u7684\u529F\u80FD\u548C\u4FE1\u606F\uFF0C\u8BF7\u786E\u4FDD\u60A8\u5DF2\u4FDD\u5B58\u6240\u6709\u672A\u5B8C\u6210\u7684\u64CD\u4F5C\u3002"
16828
16981
  });
16829
16982
  if (confirm) {
16830
- const bol = await ibiz.auth.logout();
16983
+ const bol = await ibiz.hub.controller.logout();
16831
16984
  if (bol) {
16832
16985
  window.location.reload();
16833
16986
  }
@@ -16881,7 +17034,7 @@ var ToolbarController = class extends ControlController {
16881
17034
  const actionId = item.uiactionId;
16882
17035
  const uiAction = await getUIActionById(actionId, item.appId);
16883
17036
  if (!uiAction) {
16884
- throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
17037
+ throw new RuntimeError47("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
16885
17038
  }
16886
17039
  const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
16887
17040
  if (enableLoading) {
@@ -17479,7 +17632,7 @@ var RawItemPortletController = class extends PortletPartController {
17479
17632
  };
17480
17633
 
17481
17634
  // src/controller/control/data-view/data-view.controller.ts
17482
- import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
17635
+ import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
17483
17636
  import { isNil as isNil21 } from "ramda";
17484
17637
 
17485
17638
  // src/controller/control/data-view/data-view.service.ts
@@ -17694,7 +17847,7 @@ var DataViewControlController = class extends MDControlController {
17694
17847
  const optItemModel = this.getOptItemModel();
17695
17848
  if (optItemModel) {
17696
17849
  if (!optItemModel.deuiactionGroup) {
17697
- throw new RuntimeModelError49(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
17850
+ throw new RuntimeModelError50(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
17698
17851
  }
17699
17852
  if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
17700
17853
  ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -17747,7 +17900,7 @@ var DataViewControlController = class extends MDControlController {
17747
17900
  const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
17748
17901
  if (enableGroup && groupMode) {
17749
17902
  if (!groupAppDEFieldId) {
17750
- throw new RuntimeModelError49(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
17903
+ throw new RuntimeModelError50(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
17751
17904
  }
17752
17905
  if (groupMode === "AUTO") {
17753
17906
  this.handleAutoGroup();
@@ -17814,7 +17967,7 @@ var DataViewControlController = class extends MDControlController {
17814
17967
  async handleCodeListGroup() {
17815
17968
  const { groupAppDEFieldId, groupCodeListId } = this.model;
17816
17969
  if (!groupCodeListId) {
17817
- throw new RuntimeModelError49(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
17970
+ throw new RuntimeModelError50(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
17818
17971
  }
17819
17972
  const { items } = this.state;
17820
17973
  const groupMap = /* @__PURE__ */ new Map();
@@ -17842,25 +17995,16 @@ var DataViewControlController = class extends MDControlController {
17842
17995
  this.state.groups = groups;
17843
17996
  }
17844
17997
  /**
17845
- * 设置排序
17846
- *
17847
- * @author lxm
17848
- * @date 2022-09-28 13:09:44
17849
- * @param {string} key 排序字段
17850
- * @param {string} order 排序顺序
17998
+ * 获取部件默认排序模型
17999
+ * @return {*}
18000
+ * @author: zhujiamin
18001
+ * @Date: 2023-12-28 18:43:27
17851
18002
  */
17852
- setSort(key, order) {
17853
- if (key && order) {
17854
- super.setSort(key, order);
17855
- } else {
17856
- const { minorSortAppDEFieldId, minorSortDir } = this.model;
17857
- if (minorSortAppDEFieldId && minorSortDir) {
17858
- const fieldName = this.fieldIdNameMap.get(minorSortAppDEFieldId);
17859
- this.state.sortQuery = "".concat(fieldName.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
17860
- } else {
17861
- this.state.sortQuery = "";
17862
- }
17863
- }
18003
+ getSortModel() {
18004
+ return {
18005
+ minorSortAppDEFieldId: this.model.minorSortAppDEFieldId,
18006
+ minorSortDir: this.model.minorSortDir
18007
+ };
17864
18008
  }
17865
18009
  /**
17866
18010
  * 点击新建
@@ -17929,7 +18073,7 @@ var DataViewControlController = class extends MDControlController {
17929
18073
  caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
17930
18074
  }
17931
18075
  if (!item.appDEFieldId) {
17932
- throw new RuntimeModelError49(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
18076
+ throw new RuntimeModelError50(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
17933
18077
  }
17934
18078
  const tempItem = {
17935
18079
  caption,
@@ -17947,10 +18091,10 @@ var DataViewControlController = class extends MDControlController {
17947
18091
  };
17948
18092
 
17949
18093
  // src/controller/control/exp-bar/calendar-exp-bar.controller.ts
17950
- import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
18094
+ import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
17951
18095
 
17952
18096
  // src/controller/control/exp-bar/exp-bar.controller.ts
17953
- import { RuntimeError as RuntimeError47, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
18097
+ import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
17954
18098
  var ExpBarControlController = class extends ControlController {
17955
18099
  constructor() {
17956
18100
  super(...arguments);
@@ -18005,7 +18149,7 @@ var ExpBarControlController = class extends ControlController {
18005
18149
  get xDataController() {
18006
18150
  const controller = this.view.getController(this.model.xdataControlName);
18007
18151
  if (!controller) {
18008
- throw new RuntimeModelError50(
18152
+ throw new RuntimeModelError51(
18009
18153
  this.model,
18010
18154
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
18011
18155
  );
@@ -18276,7 +18420,7 @@ var ExpBarControlController = class extends ControlController {
18276
18420
  if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
18277
18421
  return this.XDataModel.navAppViewId;
18278
18422
  }
18279
- throw new RuntimeError47("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
18423
+ throw new RuntimeError48("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
18280
18424
  }
18281
18425
  /**
18282
18426
  * 获取导航视图
@@ -18364,7 +18508,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
18364
18508
  get xDataController() {
18365
18509
  const controller = this.view.getController(this.model.xdataControlName);
18366
18510
  if (!controller) {
18367
- throw new RuntimeModelError51(
18511
+ throw new RuntimeModelError52(
18368
18512
  this.model,
18369
18513
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
18370
18514
  );
@@ -18419,7 +18563,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
18419
18563
  };
18420
18564
 
18421
18565
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
18422
- import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
18566
+ import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
18423
18567
  var TreeExpBarController = class extends ExpBarControlController {
18424
18568
  constructor() {
18425
18569
  super(...arguments);
@@ -18442,7 +18586,7 @@ var TreeExpBarController = class extends ExpBarControlController {
18442
18586
  get xDataController() {
18443
18587
  const controller = this.view.getController(this.model.xdataControlName);
18444
18588
  if (!controller) {
18445
- throw new RuntimeModelError52(
18589
+ throw new RuntimeModelError53(
18446
18590
  this.model,
18447
18591
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
18448
18592
  );
@@ -18494,7 +18638,7 @@ var TreeExpBarController = class extends ExpBarControlController {
18494
18638
  const deData = node.deData || node;
18495
18639
  const nodeModel = this.getNodeModel(node.nodeId);
18496
18640
  if (!nodeModel) {
18497
- throw new RuntimeError48("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
18641
+ throw new RuntimeError49("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
18498
18642
  }
18499
18643
  const result = this.prepareParams(nodeModel, deData, context, params);
18500
18644
  result.context.currentSrfNav = nodeId;
@@ -18685,7 +18829,7 @@ var ChartExpBarController = class extends ExpBarControlController {
18685
18829
  };
18686
18830
 
18687
18831
  // src/controller/control/form/search-form/search-form.controller.ts
18688
- import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
18832
+ import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
18689
18833
 
18690
18834
  // src/controller/control/form/form/form.controller.ts
18691
18835
  import { debounceAndAsyncMerge, recursiveIterate as recursiveIterate3 } from "@ibiz-template/core";
@@ -19246,7 +19390,7 @@ var SearchFormController = class extends FormController {
19246
19390
  applyStoredFilter(index) {
19247
19391
  const filter = this.state.storedFilters[index];
19248
19392
  if (!filter) {
19249
- throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
19393
+ throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
19250
19394
  }
19251
19395
  if (filter.data) {
19252
19396
  Object.assign(this.data, filter.data);
@@ -19262,7 +19406,7 @@ var SearchFormController = class extends FormController {
19262
19406
  async removeStoredFilter(index) {
19263
19407
  const filter = this.state.storedFilters[index];
19264
19408
  if (!filter) {
19265
- throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
19409
+ throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
19266
19410
  }
19267
19411
  this.state.storedFilters.splice(index, 1);
19268
19412
  await this.saveConfig();
@@ -20448,8 +20592,8 @@ var FormMDCtrlController = class extends FormDetailController {
20448
20592
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.ts
20449
20593
  import {
20450
20594
  mergeInLeft,
20451
- ModelError as ModelError26,
20452
- RuntimeModelError as RuntimeModelError53
20595
+ ModelError as ModelError27,
20596
+ RuntimeModelError as RuntimeModelError54
20453
20597
  } from "@ibiz-template/core";
20454
20598
  var FormMDCtrlMDController = class extends FormMDCtrlController {
20455
20599
  constructor() {
@@ -20475,7 +20619,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
20475
20619
  await super.onInit();
20476
20620
  const { contentControl } = this.model;
20477
20621
  if (!contentControl) {
20478
- throw new RuntimeModelError53(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
20622
+ throw new RuntimeModelError54(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
20479
20623
  }
20480
20624
  if (contentControl.controlType === "GRID") {
20481
20625
  mergeInLeft(contentControl, {
@@ -20525,7 +20669,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
20525
20669
  if (this.model.contentType === "GRID") {
20526
20670
  this.mdController.newRow();
20527
20671
  } else {
20528
- throw new ModelError26(
20672
+ throw new ModelError27(
20529
20673
  this.model,
20530
20674
  "\u591A\u6570\u636E\u90E8\u4EF6\u7C7B\u578B".concat(this.model.contentType, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0\u6570\u636E")
20531
20675
  );
@@ -20572,7 +20716,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
20572
20716
  };
20573
20717
 
20574
20718
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
20575
- import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
20719
+ import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
20576
20720
  import { createUUID as createUUID11 } from "qx-util";
20577
20721
 
20578
20722
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
@@ -20613,7 +20757,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
20613
20757
  super.onInit();
20614
20758
  const { contentControl } = this.model;
20615
20759
  if (!contentControl) {
20616
- throw new RuntimeModelError54(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
20760
+ throw new RuntimeModelError55(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
20617
20761
  }
20618
20762
  contentControl.enableAutoSave = this.enableCreate || this.enableUpdate;
20619
20763
  const controlProvider = await getControlProvider(contentControl);
@@ -20689,7 +20833,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
20689
20833
  async remove(id) {
20690
20834
  const controller = this.formMap.get(id);
20691
20835
  if (!controller) {
20692
- throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
20836
+ throw new RuntimeError51("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
20693
20837
  }
20694
20838
  await controller.remove();
20695
20839
  const index = this.state.items.findIndex((item) => item.id === id);
@@ -20746,7 +20890,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
20746
20890
  };
20747
20891
 
20748
20892
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
20749
- import { ModelError as ModelError27 } from "@ibiz-template/core";
20893
+ import { ModelError as ModelError28 } from "@ibiz-template/core";
20750
20894
  import { clone as clone20 } from "ramda";
20751
20895
  var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
20752
20896
  constructor() {
@@ -20793,7 +20937,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
20793
20937
  this.isSingleData = true;
20794
20938
  break;
20795
20939
  default:
20796
- throw new ModelError27(
20940
+ throw new ModelError28(
20797
20941
  this.model,
20798
20942
  "\u6682\u4E0D\u652F\u6301\u91CD\u590D\u5668\u6837\u5F0F".concat(this.model.detailStyle)
20799
20943
  );
@@ -20957,7 +21101,7 @@ var FormTabPanelController = class extends FormDetailController {
20957
21101
  import {
20958
21102
  awaitTimeout,
20959
21103
  mergeInLeft as mergeInLeft2,
20960
- RuntimeError as RuntimeError51
21104
+ RuntimeError as RuntimeError52
20961
21105
  } from "@ibiz-template/core";
20962
21106
  import { debounce as debounce2 } from "lodash-es";
20963
21107
  import { createUUID as createUUID12 } from "qx-util";
@@ -20966,7 +21110,7 @@ import { clone as clone21 } from "ramda";
20966
21110
  // src/controller/control/form/edit-form/edit-form.service.ts
20967
21111
  import {
20968
21112
  recursiveIterate as recursiveIterate6,
20969
- RuntimeModelError as RuntimeModelError55
21113
+ RuntimeModelError as RuntimeModelError56
20970
21114
  } from "@ibiz-template/core";
20971
21115
  var EditFormService = class extends FormService {
20972
21116
  /**
@@ -21090,7 +21234,7 @@ var EditFormService = class extends FormService {
21090
21234
  const wizardForm = this.model;
21091
21235
  const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
21092
21236
  if (!methodName) {
21093
- throw new RuntimeModelError55(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
21237
+ throw new RuntimeModelError56(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
21094
21238
  }
21095
21239
  let res = await this.exec(
21096
21240
  methodName,
@@ -21251,6 +21395,19 @@ var EditFormService = class extends FormService {
21251
21395
 
21252
21396
  // src/controller/control/form/edit-form/edit-form.controller.ts
21253
21397
  var EditFormController = class extends FormController {
21398
+ constructor() {
21399
+ super(...arguments);
21400
+ /**
21401
+ * 表单旧数据
21402
+ *
21403
+ * @author zk
21404
+ * @date 2023-12-20 11:12:43
21405
+ * @protected
21406
+ * @type {IData}
21407
+ * @memberof FormController
21408
+ */
21409
+ this.oldData = new ControlVO();
21410
+ }
21254
21411
  get view() {
21255
21412
  return this.ctx.view;
21256
21413
  }
@@ -21388,6 +21545,7 @@ var EditFormController = class extends FormController {
21388
21545
  }
21389
21546
  this.state.modified = false;
21390
21547
  this.state.data = res.data;
21548
+ this.oldData = this.data.clone();
21391
21549
  this.formStateNotify("LOAD" /* LOAD */);
21392
21550
  await this.evt.emit("onLoadSuccess", void 0);
21393
21551
  this.actionNotification("GETSUCCESS");
@@ -21408,7 +21566,7 @@ var EditFormController = class extends FormController {
21408
21566
  }
21409
21567
  const isValid = await this.validate();
21410
21568
  if (!isValid) {
21411
- throw new RuntimeError51("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
21569
+ throw new RuntimeError52("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
21412
21570
  }
21413
21571
  if (!silent) {
21414
21572
  await this.startLoading();
@@ -21439,6 +21597,7 @@ var EditFormController = class extends FormController {
21439
21597
  } else {
21440
21598
  mergeInLeft2(this.data, res.data);
21441
21599
  }
21600
+ this.oldData = this.data.clone();
21442
21601
  this.data.tempsrfkey = this.data.srfkey;
21443
21602
  }
21444
21603
  this.state.modified = false;
@@ -21530,7 +21689,7 @@ var EditFormController = class extends FormController {
21530
21689
  (item) => item.id === formItemUpdateId
21531
21690
  );
21532
21691
  if (!formItemUpdate) {
21533
- throw new RuntimeError51("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
21692
+ throw new RuntimeError52("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
21534
21693
  }
21535
21694
  const {
21536
21695
  appDEMethodId,
@@ -21590,7 +21749,7 @@ var EditFormController = class extends FormController {
21590
21749
  async wfStart(args) {
21591
21750
  const isValid = await this.validate();
21592
21751
  if (!isValid) {
21593
- throw new RuntimeError51("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
21752
+ throw new RuntimeError52("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
21594
21753
  }
21595
21754
  await this.startLoading();
21596
21755
  const { context, params } = this.handlerAbilityParams(args);
@@ -21619,7 +21778,7 @@ var EditFormController = class extends FormController {
21619
21778
  async wfSubmit(args) {
21620
21779
  const isValid = await this.validate();
21621
21780
  if (!isValid) {
21622
- throw new RuntimeError51("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
21781
+ throw new RuntimeError52("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
21623
21782
  }
21624
21783
  await this.startLoading();
21625
21784
  const { context, params } = this.handlerAbilityParams(args);
@@ -21648,14 +21807,40 @@ var EditFormController = class extends FormController {
21648
21807
  * @return {*} {Promise<void>}
21649
21808
  */
21650
21809
  async autoSave() {
21651
- if (this.model.enableAutoSave) {
21652
- try {
21653
- await this.save({ silent: true, noFillBack: true });
21654
- } catch (error) {
21655
- ibiz.log.error(error);
21656
- }
21810
+ if (!this.model.enableAutoSave) {
21811
+ return;
21812
+ }
21813
+ const { demand } = this.model;
21814
+ const saveParam = { silent: true, noFillBack: true };
21815
+ if (demand) {
21816
+ saveParam.data = this.getDiffData();
21817
+ }
21818
+ try {
21819
+ await this.save(saveParam);
21820
+ } catch (error) {
21821
+ ibiz.log.error(error);
21657
21822
  }
21658
21823
  }
21824
+ /**
21825
+ * 比较旧数据跟当前数据的差异返回差异数据
21826
+ *
21827
+ * @author zk
21828
+ * @date 2023-12-20 10:12:06
21829
+ * @protected
21830
+ * @return {*} {IData}
21831
+ * @memberof EditFormController
21832
+ */
21833
+ getDiffData() {
21834
+ const { data } = this.state;
21835
+ const diffData = {};
21836
+ Object.keys(data).forEach((key) => {
21837
+ if (data[key] !== this.oldData[key] || key === data.srfkeyfield) {
21838
+ diffData[key] = data[key];
21839
+ }
21840
+ });
21841
+ diffData.srfuf = data.srfuf;
21842
+ return new ControlVO(diffData, this.oldData.$dataUIMap);
21843
+ }
21659
21844
  /**
21660
21845
  * 设置simple模式的数据
21661
21846
  * @author lxm
@@ -21909,13 +22094,13 @@ import {
21909
22094
  debounceAndAsyncMerge as debounceAndAsyncMerge2,
21910
22095
  mergeDefaultInLeft,
21911
22096
  recursiveIterate as recursiveIterate7,
21912
- RuntimeError as RuntimeError52,
21913
- RuntimeModelError as RuntimeModelError57
22097
+ RuntimeError as RuntimeError53,
22098
+ RuntimeModelError as RuntimeModelError58
21914
22099
  } from "@ibiz-template/core";
21915
22100
  import { clone as clone22 } from "ramda";
21916
22101
 
21917
22102
  // src/controller/control/grid/grid/grid.service.ts
21918
- import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
22103
+ import { RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
21919
22104
  var GridService = class extends MDControlService {
21920
22105
  /**
21921
22106
  * 初始化属性映射
@@ -21943,7 +22128,7 @@ var GridService = class extends MDControlService {
21943
22128
  dataType: dataItem.dataType
21944
22129
  });
21945
22130
  } else {
21946
- throw new RuntimeModelError56(
22131
+ throw new RuntimeModelError57(
21947
22132
  column,
21948
22133
  "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8868\u683C\u6570\u636E\u9879[".concat(deField, "]")
21949
22134
  );
@@ -22131,11 +22316,11 @@ var GridController = class extends MDControlController {
22131
22316
  (item) => item.model.appDEFieldId === groupAppDEFieldId
22132
22317
  );
22133
22318
  if (!this.groupFieldColumn) {
22134
- throw new RuntimeModelError57(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
22319
+ throw new RuntimeModelError58(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
22135
22320
  }
22136
22321
  const groupFieldName = this.groupFieldColumn.model.id;
22137
22322
  if (!this.groupFieldColumn.model.appCodeListId) {
22138
- throw new RuntimeModelError57(
22323
+ throw new RuntimeModelError58(
22139
22324
  this.groupFieldColumn.model,
22140
22325
  "\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
22141
22326
  );
@@ -22145,7 +22330,7 @@ var GridController = class extends MDControlController {
22145
22330
  );
22146
22331
  if (index !== -1 && index !== 0) {
22147
22332
  if (this.isMultistageHeader) {
22148
- throw new RuntimeModelError57(
22333
+ throw new RuntimeModelError58(
22149
22334
  this.model,
22150
22335
  "\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
22151
22336
  );
@@ -22155,10 +22340,10 @@ var GridController = class extends MDControlController {
22155
22340
  }
22156
22341
  if (groupMode === "CODELIST") {
22157
22342
  if (!groupCodeListId) {
22158
- throw new RuntimeModelError57(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
22343
+ throw new RuntimeModelError58(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
22159
22344
  }
22160
22345
  if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
22161
- throw new RuntimeModelError57(
22346
+ throw new RuntimeModelError58(
22162
22347
  this.model,
22163
22348
  "\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
22164
22349
  );
@@ -22245,7 +22430,7 @@ var GridController = class extends MDControlController {
22245
22430
  return;
22246
22431
  }
22247
22432
  if (!aggAppDEDataSetId || !aggAppDataEntityId) {
22248
- throw new RuntimeModelError57(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
22433
+ throw new RuntimeModelError58(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
22249
22434
  }
22250
22435
  const params = await this.getFetchParams();
22251
22436
  const app = ibiz.hub.getApp(this.context.srfappid);
@@ -22313,7 +22498,7 @@ var GridController = class extends MDControlController {
22313
22498
  if (editShowMode === "row") {
22314
22499
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
22315
22500
  if (editingRow) {
22316
- throw new RuntimeError52("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
22501
+ throw new RuntimeError53("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
22317
22502
  }
22318
22503
  }
22319
22504
  const queryParams = { ...this.params };
@@ -22354,7 +22539,7 @@ var GridController = class extends MDControlController {
22354
22539
  const isCreate = data.srfuf === 0 /* CREATE */;
22355
22540
  const rowState = this.findRowState(data);
22356
22541
  if (!rowState) {
22357
- throw new RuntimeError52("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
22542
+ throw new RuntimeError53("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
22358
22543
  }
22359
22544
  if (!rowState.modified) {
22360
22545
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -22366,7 +22551,7 @@ var GridController = class extends MDControlController {
22366
22551
  }
22367
22552
  const isValid = await this.validate(rowState);
22368
22553
  if (!isValid) {
22369
- throw new RuntimeError52("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
22554
+ throw new RuntimeError53("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
22370
22555
  }
22371
22556
  let res;
22372
22557
  const deName = calcDeCodeNameById(this.model.appDataEntityId);
@@ -22563,7 +22748,7 @@ var GridController = class extends MDControlController {
22563
22748
  }
22564
22749
  async toggleRowEdit() {
22565
22750
  if (!this.model.enableRowNew) {
22566
- throw new RuntimeError52("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
22751
+ throw new RuntimeError53("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
22567
22752
  }
22568
22753
  this.state.rowEditOpen = !this.state.rowEditOpen;
22569
22754
  }
@@ -22596,7 +22781,7 @@ var GridController = class extends MDControlController {
22596
22781
  } else {
22597
22782
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
22598
22783
  if (editingRow) {
22599
- throw new RuntimeError52("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
22784
+ throw new RuntimeError53("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
22600
22785
  }
22601
22786
  if (row.data.srfuf === 1 /* UPDATE */) {
22602
22787
  row.cacheData = clone22(row.data);
@@ -22610,6 +22795,18 @@ var GridController = class extends MDControlController {
22610
22795
  });
22611
22796
  this.evt.emit("onRowEditChange", { row });
22612
22797
  }
22798
+ /**
22799
+ * 获取部件默认排序模型
22800
+ * @return {*}
22801
+ * @author: zhujiamin
22802
+ * @Date: 2023-12-28 18:43:27
22803
+ */
22804
+ getSortModel() {
22805
+ return {
22806
+ minorSortAppDEFieldId: this.model.minorSortAppDEFieldId,
22807
+ minorSortDir: this.model.minorSortDir
22808
+ };
22809
+ }
22613
22810
  /**
22614
22811
  * 设置排序
22615
22812
  *
@@ -22619,18 +22816,11 @@ var GridController = class extends MDControlController {
22619
22816
  * @param {string} order 排序顺序
22620
22817
  */
22621
22818
  setSort(fieldId, order) {
22622
- if (fieldId && order) {
22623
- const fieldName = this.fieldIdNameMap.get(fieldId).toLowerCase();
22624
- super.setSort(fieldName, order);
22625
- } else {
22626
- const { minorSortAppDEFieldId, minorSortDir } = this.model;
22627
- if (minorSortAppDEFieldId && minorSortDir) {
22628
- const fieldName = this.fieldIdNameMap.get(minorSortAppDEFieldId);
22629
- this.state.sortQuery = "".concat(fieldName.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
22630
- } else {
22631
- this.state.sortQuery = "";
22632
- }
22819
+ let fieldName;
22820
+ if (fieldId) {
22821
+ fieldName = this.fieldIdNameMap.get(fieldId).toLowerCase();
22633
22822
  }
22823
+ super.setSort(fieldName, order);
22634
22824
  }
22635
22825
  /**
22636
22826
  * 表格编辑项更新
@@ -22646,7 +22836,7 @@ var GridController = class extends MDControlController {
22646
22836
  (item) => item.id === updateId
22647
22837
  );
22648
22838
  if (!findUpdate) {
22649
- throw new RuntimeError52("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
22839
+ throw new RuntimeError53("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
22650
22840
  }
22651
22841
  const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
22652
22842
  const updateItems = degeiupdateDetails.map((item) => item.id);
@@ -22802,7 +22992,7 @@ var GridController = class extends MDControlController {
22802
22992
  data2 = this.getData();
22803
22993
  }
22804
22994
  if (data2.length === 0) {
22805
- throw new RuntimeError52("\u65E0\u5BFC\u51FA\u6570\u636E");
22995
+ throw new RuntimeError53("\u65E0\u5BFC\u51FA\u6570\u636E");
22806
22996
  }
22807
22997
  return formatExcelData(data2);
22808
22998
  };
@@ -22958,7 +23148,7 @@ var GridController = class extends MDControlController {
22958
23148
  };
22959
23149
 
22960
23150
  // src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
22961
- import { DataTypes as DataTypes3, ModelError as ModelError28, plus as plus2 } from "@ibiz-template/core";
23151
+ import { DataTypes as DataTypes3, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
22962
23152
  import dayjs4 from "dayjs";
22963
23153
  import { debounce as debounce3 } from "lodash-es";
22964
23154
  import { clone as clone23, isNil as isNil22 } from "ramda";
@@ -23079,7 +23269,7 @@ var GridFieldColumnController = class extends GridColumnController {
23079
23269
  const valueItem = this.model.linkValueItem || "srfkey";
23080
23270
  const value = row.data[valueItem];
23081
23271
  if (value == null) {
23082
- throw new ModelError28(this.model, "\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
23272
+ throw new ModelError29(this.model, "\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
23083
23273
  }
23084
23274
  const { linkAppViewId } = this.model;
23085
23275
  if (!linkAppViewId) {
@@ -23185,12 +23375,12 @@ var GridFieldColumnController = class extends GridColumnController {
23185
23375
  aggValue = Math.min(...items.map((item) => item[fieldName]));
23186
23376
  break;
23187
23377
  default:
23188
- throw new ModelError28(this.model, "\u6682\u672A\u652F\u6301\u5C5E\u6027\u5217\u805A\u5408\u6A21\u5F0F".concat(aggMode));
23378
+ throw new ModelError29(this.model, "\u6682\u672A\u652F\u6301\u5C5E\u6027\u5217\u805A\u5408\u6A21\u5F0F".concat(aggMode));
23189
23379
  }
23190
23380
  } else if (this.grid.model.aggMode === "ALL") {
23191
- throw new ModelError28(this.model, "\u8FDC\u7A0B\u805A\u5408\u6682\u672A\u652F\u6301");
23381
+ throw new ModelError29(this.model, "\u8FDC\u7A0B\u805A\u5408\u6682\u672A\u652F\u6301");
23192
23382
  } else {
23193
- throw new ModelError28(
23383
+ throw new ModelError29(
23194
23384
  this.grid.model,
23195
23385
  "\u6682\u672A\u652F\u6301\u805A\u5408\u6A21\u5F0F".concat(this.grid.model.aggMode)
23196
23386
  );
@@ -23261,7 +23451,7 @@ var GridFieldColumnController = class extends GridColumnController {
23261
23451
  };
23262
23452
 
23263
23453
  // src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
23264
- import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
23454
+ import { RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
23265
23455
  var GridUAColumnController = class extends GridColumnController {
23266
23456
  /**
23267
23457
  * 给rowController初始化操作列的状态
@@ -23274,7 +23464,7 @@ var GridUAColumnController = class extends GridColumnController {
23274
23464
  var _a;
23275
23465
  const { deuiactionGroup } = this.model;
23276
23466
  if (!deuiactionGroup) {
23277
- throw new RuntimeModelError58(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
23467
+ throw new RuntimeModelError59(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
23278
23468
  }
23279
23469
  if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
23280
23470
  ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -23319,7 +23509,7 @@ var GridUAColumnController = class extends GridColumnController {
23319
23509
  };
23320
23510
 
23321
23511
  // src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
23322
- import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
23512
+ import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
23323
23513
  import Schema2 from "async-validator";
23324
23514
  import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
23325
23515
  var GridFieldEditColumnController = class extends GridFieldColumnController {
@@ -23468,7 +23658,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
23468
23658
  if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
23469
23659
  const result = await this.validate(row);
23470
23660
  if (!result) {
23471
- throw new RuntimeError53(
23661
+ throw new RuntimeError54(
23472
23662
  "".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
23473
23663
  );
23474
23664
  }
@@ -23633,25 +23823,16 @@ var ListController = class extends MDControlController {
23633
23823
  await this.service.init(this.context);
23634
23824
  }
23635
23825
  /**
23636
- * 设置排序
23637
- *
23638
- * @author lxm
23639
- * @date 2022-09-28 13:09:44
23640
- * @param {string} key 排序字段
23641
- * @param {string} order 排序顺序
23826
+ * 获取部件默认排序模型
23827
+ * @return {*}
23828
+ * @author: zhujiamin
23829
+ * @Date: 2023-12-28 18:43:27
23642
23830
  */
23643
- setSort(key, order) {
23644
- if (key && order) {
23645
- super.setSort(key, order);
23646
- } else {
23647
- const { minorSortAppDEFieldId, minorSortDir } = this.model;
23648
- if (minorSortAppDEFieldId && minorSortDir) {
23649
- const fieldName = this.fieldIdNameMap.get(minorSortAppDEFieldId);
23650
- this.state.sortQuery = "".concat(fieldName.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
23651
- } else {
23652
- this.state.sortQuery = "";
23653
- }
23654
- }
23831
+ getSortModel() {
23832
+ return {
23833
+ minorSortAppDEFieldId: this.model.minorSortAppDEFieldId,
23834
+ minorSortDir: this.model.minorSortDir
23835
+ };
23655
23836
  }
23656
23837
  /**
23657
23838
  * 加载更多
@@ -23775,7 +23956,7 @@ var ListController = class extends MDControlController {
23775
23956
  };
23776
23957
 
23777
23958
  // src/controller/control/panel/panel/panel.controller.ts
23778
- import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError54 } from "@ibiz-template/core";
23959
+ import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError55 } from "@ibiz-template/core";
23779
23960
  var PanelController = class extends ControlController {
23780
23961
  constructor(model, context, params, ctx, container) {
23781
23962
  super(model, context, params, ctx);
@@ -23899,7 +24080,7 @@ var PanelController = class extends ControlController {
23899
24080
  var _a, _b;
23900
24081
  const data = await this.prepareData();
23901
24082
  if (!data) {
23902
- throw new RuntimeError54("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
24083
+ throw new RuntimeError55("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
23903
24084
  }
23904
24085
  const panelData = this.convertData(data);
23905
24086
  (_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
@@ -24494,11 +24675,15 @@ var PickupViewPanelController = class extends ControlController {
24494
24675
  };
24495
24676
 
24496
24677
  // src/controller/control/search-bar/search-bar.controller.ts
24497
- import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
24678
+ import {
24679
+ RuntimeError as RuntimeError56,
24680
+ mergeInLeft as mergeInLeft3,
24681
+ recursiveIterate as recursiveIterate9
24682
+ } from "@ibiz-template/core";
24498
24683
  import { isNil as isNil23 } from "ramda";
24499
24684
 
24500
24685
  // src/controller/control/search-bar/search-bar-filter.controller.ts
24501
- import { RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
24686
+ import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
24502
24687
  var SearchBarFilterController = class {
24503
24688
  constructor(model, searchBar) {
24504
24689
  this.model = model;
@@ -24526,7 +24711,7 @@ var SearchBarFilterController = class {
24526
24711
  */
24527
24712
  async init() {
24528
24713
  if (!this.model.editor) {
24529
- throw new RuntimeModelError59(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
24714
+ throw new RuntimeModelError60(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
24530
24715
  }
24531
24716
  this.editorProvider = await getEditorProvider(this.model.editor);
24532
24717
  if (this.editorProvider) {
@@ -24914,7 +25099,7 @@ var SearchBarController = class extends ControlController {
24914
25099
  }
24915
25100
  }
24916
25101
  /**
24917
- * 格式化过滤项
25102
+ * 格式化过滤项 (后续如果修改这里的逻辑记得把下方的反推函数parseFilters也跟着修改!)
24918
25103
  * @author lxm
24919
25104
  * @date 2023-10-16 03:45:41
24920
25105
  * @param {IFilterNode} node
@@ -24936,6 +25121,33 @@ var SearchBarController = class extends ControlController {
24936
25121
  value: node.value
24937
25122
  };
24938
25123
  }
25124
+ /**
25125
+ * 根据格式化后的过滤项反推出过滤项树节点数据集合
25126
+ * @param {IData} data
25127
+ * @return {*}
25128
+ * @author: zhujiamin
25129
+ * @Date: 2023-12-28 09:47:45
25130
+ */
25131
+ parseFilters(data) {
25132
+ if (data.condtype === "GROUP") {
25133
+ return {
25134
+ leaf: false,
25135
+ logicType: data.condop === "AND" ? "AND" : "OR",
25136
+ children: (data.searchconds || []).map(
25137
+ (item) => this.parseFilters(item)
25138
+ )
25139
+ };
25140
+ }
25141
+ if (data.condtype === "DEFIELD") {
25142
+ return {
25143
+ leaf: true,
25144
+ field: data.fieldname || null,
25145
+ valueOP: data.condop || null,
25146
+ value: data.value || null
25147
+ };
25148
+ }
25149
+ throw new RuntimeError56("\u65E0\u6548\u7684condtype:".concat(data.condtype));
25150
+ }
24939
25151
  /**
24940
25152
  * 获取初始过滤项树节点数据集合
24941
25153
  * @return {*}
@@ -24980,9 +25192,6 @@ var SearchBarController = class extends ControlController {
24980
25192
  if (tempData.theme_model.columnstates) {
24981
25193
  tempGroup.searchGroupData.columnstates = tempData.theme_model.columnstates;
24982
25194
  }
24983
- if (tempData.theme_model.filternodes) {
24984
- tempGroup.searchGroupData.filternodes = tempData.theme_model.filternodes;
24985
- }
24986
25195
  if (tempData.theme_model.searchconds) {
24987
25196
  tempGroup.searchGroupData.searchconds = tempData.theme_model.searchconds;
24988
25197
  }
@@ -24991,7 +25200,7 @@ var SearchBarController = class extends ControlController {
24991
25200
  tempGroup.show = tempData.valid_flag === "1";
24992
25201
  }
24993
25202
  } catch (error) {
24994
- ibiz.log.error(error);
25203
+ ibiz.log.error("".concat(item.data, "\u975E\u6807\u51C6JSON\u683C\u5F0F:"), error);
24995
25204
  }
24996
25205
  }
24997
25206
  return tempGroup;
@@ -25040,11 +25249,9 @@ var SearchBarController = class extends ControlController {
25040
25249
  if (this.grid && this.state.selectedSearchGroupItem) {
25041
25250
  const filters = this.calcFilters();
25042
25251
  const saveParams = {
25043
- filternodes: this.state.filterNodes,
25044
25252
  searchconds: filters,
25045
25253
  sort: this.grid.state.sortQuery,
25046
- columnstates: this.grid.state.columnStates,
25047
- show: this.state.selectedSearchGroupItem.show
25254
+ columnstates: this.grid.state.columnStates
25048
25255
  };
25049
25256
  if (this.state.selectedSearchGroupItem.saved) {
25050
25257
  await this.service.update(this.state.selectedSearchGroupItem.id, {
@@ -25085,8 +25292,11 @@ var SearchBarController = class extends ControlController {
25085
25292
  groupItem.show = true;
25086
25293
  }
25087
25294
  }
25088
- if (groupItem.searchGroupData && groupItem.searchGroupData.filternodes) {
25089
- this.state.filterNodes = groupItem.searchGroupData.filternodes;
25295
+ if (groupItem.searchGroupData && groupItem.searchGroupData.searchconds && groupItem.searchGroupData.searchconds.length > 0) {
25296
+ const filterNodes = groupItem.searchGroupData.searchconds.map(
25297
+ (item) => this.parseFilters(item)
25298
+ );
25299
+ this.state.filterNodes = filterNodes;
25090
25300
  } else {
25091
25301
  this.state.filterNodes = this.getOriginFilterNodes();
25092
25302
  }
@@ -25335,13 +25545,13 @@ var TabExpPanelController = class extends ControlController {
25335
25545
 
25336
25546
  // src/controller/control/tree/tree.controller.ts
25337
25547
  import {
25338
- RuntimeError as RuntimeError55,
25339
- RuntimeModelError as RuntimeModelError60,
25548
+ RuntimeError as RuntimeError57,
25549
+ RuntimeModelError as RuntimeModelError61,
25340
25550
  recursiveIterate as recursiveIterate10
25341
25551
  } from "@ibiz-template/core";
25342
25552
 
25343
25553
  // src/controller/control/tree/tree.service.ts
25344
- import { ModelError as ModelError29 } from "@ibiz-template/core";
25554
+ import { ModelError as ModelError30 } from "@ibiz-template/core";
25345
25555
  var TreeService = class extends MDControlService {
25346
25556
  /**
25347
25557
  * 获取子节点数据
@@ -25438,7 +25648,7 @@ var TreeService = class extends MDControlService {
25438
25648
  );
25439
25649
  break;
25440
25650
  default:
25441
- throw new ModelError29(
25651
+ throw new ModelError30(
25442
25652
  nodeModel,
25443
25653
  "".concat(nodeModel.treeNodeType, "\u8282\u70B9\u7C7B\u578B\u672A\u652F\u6301")
25444
25654
  );
@@ -25641,11 +25851,11 @@ var TreeController = class extends MDControlController {
25641
25851
  */
25642
25852
  this.dropNodeRss = /* @__PURE__ */ new Map();
25643
25853
  /**
25644
- * 节点对应的上下文菜单里第一个行为级别为常用操作的项
25854
+ * 节点上下文解析后信息`
25645
25855
  * @author lxm
25646
- * @date 2023-12-19 03:14:03
25856
+ * @date 2023-12-29 10:38:37
25647
25857
  */
25648
- this.nodeClickTBUIActionItem = /* @__PURE__ */ new Map();
25858
+ this.contextMenuInfos = {};
25649
25859
  }
25650
25860
  get _evt() {
25651
25861
  return this.evt;
@@ -25759,12 +25969,28 @@ var TreeController = class extends MDControlController {
25759
25969
  initNodeClickTBUIActionItem() {
25760
25970
  var _a;
25761
25971
  (_a = this.model.detreeNodes) == null ? void 0 : _a.forEach((node) => {
25762
- var _a2, _b;
25763
- if ((_b = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b.length) {
25764
- const items = getUIActionItemsByActionLevel(node.decontextMenu, 200);
25765
- if (items.length > 0) {
25766
- this.nodeClickTBUIActionItem.set(node.id, items[0]);
25767
- }
25972
+ var _a2;
25973
+ const contextMenu = node.decontextMenu;
25974
+ if ((_a2 = contextMenu == null ? void 0 : contextMenu.detoolbarItems) == null ? void 0 : _a2.length) {
25975
+ let itemNum = 0;
25976
+ const items = [];
25977
+ recursiveIterate10(
25978
+ contextMenu,
25979
+ (item) => {
25980
+ if (item.itemType === "DEUIACTION") {
25981
+ itemNum += 1;
25982
+ const uiItem = item;
25983
+ if (uiItem.actionLevel === 200) {
25984
+ items.push(uiItem);
25985
+ }
25986
+ }
25987
+ },
25988
+ { childrenFields: ["detoolbarItems"] }
25989
+ );
25990
+ this.contextMenuInfos[node.id] = {
25991
+ onlyOneActionItem: itemNum === 1,
25992
+ clickTBUIActionItem: items[0]
25993
+ };
25768
25994
  }
25769
25995
  });
25770
25996
  }
@@ -25856,9 +26082,15 @@ var TreeController = class extends MDControlController {
25856
26082
  * @memberof TreeController
25857
26083
  */
25858
26084
  async onTreeNodeClick(nodeData, event) {
25859
- if (this.nodeClickTBUIActionItem.has(nodeData.nodeId)) {
25860
- const item = this.nodeClickTBUIActionItem.get(nodeData.nodeId);
25861
- return this.doUIAction(item.uiactionId, nodeData, event, item.appId);
26085
+ var _a;
26086
+ const clickActionItem = (_a = this.contextMenuInfos[nodeData.nodeId]) == null ? void 0 : _a.clickTBUIActionItem;
26087
+ if (clickActionItem) {
26088
+ return this.doUIAction(
26089
+ clickActionItem.uiactionId,
26090
+ nodeData,
26091
+ event,
26092
+ clickActionItem.appId
26093
+ );
25862
26094
  }
25863
26095
  if (this.state.navigational) {
25864
26096
  const nodeModel = this.getNodeModel(nodeData.nodeId);
@@ -26100,14 +26332,17 @@ var TreeController = class extends MDControlController {
26100
26332
  draggingNodeModel.appDataEntityId
26101
26333
  );
26102
26334
  }
26103
- if (((_a = draggingNode.parent) == null ? void 0 : _a.id) !== ((_b = dropNode.parent) == null ? void 0 : _b.id)) {
26104
- return !!this.findDropNodeRS(
26105
- dropNode.parent.nodeId,
26106
- draggingNodeModel.appDataEntityId
26107
- );
26335
+ if (((_a = draggingNode.parent) == null ? void 0 : _a.id) === ((_b = dropNode.parent) == null ? void 0 : _b.id)) {
26336
+ const currentNodeModel = this.getNodeModel(dropNode.nodeId);
26337
+ return (currentNodeModel == null ? void 0 : currentNodeModel.allowOrder) === true;
26108
26338
  }
26109
- const parentNodeModel = this.getNodeModel(dropNode.nodeId);
26110
- return (parentNodeModel == null ? void 0 : parentNodeModel.allowOrder) === true;
26339
+ if (!dropNode.parent) {
26340
+ return false;
26341
+ }
26342
+ return !!this.findDropNodeRS(
26343
+ dropNode.parent.nodeId,
26344
+ draggingNodeModel.appDataEntityId
26345
+ );
26111
26346
  }
26112
26347
  /**
26113
26348
  * 找到指定父节点下的节点关系里面
@@ -26133,16 +26368,16 @@ var TreeController = class extends MDControlController {
26133
26368
  * @return {*} {Promise<void>}
26134
26369
  */
26135
26370
  async onNodeDrop(draggingNode, dropNode, dropType) {
26136
- var _a, _b, _c, _d;
26371
+ var _a, _b, _c;
26137
26372
  if (dropType === "inner" && !dropNode.leaf && dropNode.children === void 0) {
26138
26373
  await this.expandNodeByKey([dropNode.id]);
26139
26374
  }
26140
26375
  const modifiedNodeDatas = [];
26141
26376
  const draggingNodeModel = this.getNodeModel(draggingNode.nodeId);
26142
26377
  const dropInNode = dropType === "inner" ? dropNode : dropNode.parent;
26143
- const isChangedParent = ((_a = dropNode.parent) == null ? void 0 : _a.id) !== ((_b = draggingNode.parent) == null ? void 0 : _b.id);
26378
+ const isChangedParent = (dropNode == null ? void 0 : dropNode.id) !== ((_a = draggingNode.parent) == null ? void 0 : _a.id);
26144
26379
  let orderNodeModel = this.getNodeModel(dropNode.nodeId);
26145
- if (dropType === "inner" || ((_c = dropNode.parent) == null ? void 0 : _c.id) !== ((_d = draggingNode.parent) == null ? void 0 : _d.id)) {
26380
+ if (dropType === "inner" || ((_b = dropNode.parent) == null ? void 0 : _b.id) !== ((_c = draggingNode.parent) == null ? void 0 : _c.id)) {
26146
26381
  const dropNodeRs = this.findDropNodeRS(
26147
26382
  dropInNode.nodeId,
26148
26383
  draggingNodeModel.appDataEntityId
@@ -26177,7 +26412,7 @@ var TreeController = class extends MDControlController {
26177
26412
  const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
26178
26413
  if (allowOrder === true) {
26179
26414
  if (!sortAppDEFieldId) {
26180
- throw new RuntimeModelError60(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
26415
+ throw new RuntimeModelError61(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
26181
26416
  }
26182
26417
  const sortField = sortAppDEFieldId.toLowerCase();
26183
26418
  const isAsc = sortDir === "ASC";
@@ -26258,10 +26493,10 @@ var TreeController = class extends MDControlController {
26258
26493
  async modifyNodeText(nodeData, text) {
26259
26494
  const model = this.getNodeModel(nodeData.nodeId);
26260
26495
  if (!model.allowEditText) {
26261
- throw new RuntimeModelError60(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
26496
+ throw new RuntimeModelError61(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
26262
26497
  }
26263
26498
  if (!nodeData.deData) {
26264
- throw new RuntimeError55("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
26499
+ throw new RuntimeError57("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
26265
26500
  }
26266
26501
  nodeData.text = text;
26267
26502
  nodeData.deData[model.textAppDEFieldId] = text;
@@ -26270,7 +26505,7 @@ var TreeController = class extends MDControlController {
26270
26505
  };
26271
26506
 
26272
26507
  // src/controller/control/wizard-panel/wizard-panel.controller.ts
26273
- import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
26508
+ import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
26274
26509
 
26275
26510
  // src/controller/control/wizard-panel/wizard-panel.service.ts
26276
26511
  var WizardPanelService = class extends ControlService {
@@ -26436,7 +26671,7 @@ var WizardPanelController = class extends ControlController {
26436
26671
  const { activeFormTag } = this.state;
26437
26672
  const controller = this.formControllers.get(activeFormTag);
26438
26673
  if (!controller) {
26439
- throw new RuntimeError56("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
26674
+ throw new RuntimeError58("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
26440
26675
  }
26441
26676
  return controller;
26442
26677
  }
@@ -26478,7 +26713,7 @@ var WizardPanelController = class extends ControlController {
26478
26713
  getWizardFormByTag(tag) {
26479
26714
  var _a;
26480
26715
  if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
26481
- throw new RuntimeError56("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
26716
+ throw new RuntimeError58("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
26482
26717
  return;
26483
26718
  }
26484
26719
  const wizardForm = this.model.dewizard.dewizardForms.find(
@@ -26487,7 +26722,7 @@ var WizardPanelController = class extends ControlController {
26487
26722
  }
26488
26723
  );
26489
26724
  if (!wizardForm) {
26490
- throw new RuntimeError56("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
26725
+ throw new RuntimeError58("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
26491
26726
  }
26492
26727
  return wizardForm;
26493
26728
  }
@@ -26558,7 +26793,7 @@ var WizardPanelController = class extends ControlController {
26558
26793
  prevTag = this.tagHistory[this.tagHistory.length - 1];
26559
26794
  }
26560
26795
  if (!prevTag) {
26561
- throw new RuntimeError56("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
26796
+ throw new RuntimeError58("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
26562
26797
  }
26563
26798
  this.state.activeFormTag = prevTag;
26564
26799
  }
@@ -26594,7 +26829,7 @@ var WizardPanelController = class extends ControlController {
26594
26829
  });
26595
26830
  const nextWizardStep = wizardSteps[index + 1];
26596
26831
  if (!nextWizardStep) {
26597
- throw new RuntimeError56("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
26832
+ throw new RuntimeError58("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
26598
26833
  }
26599
26834
  const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
26600
26835
  if (nextWizardForm && nextWizardForm.formTag) {
@@ -26603,7 +26838,7 @@ var WizardPanelController = class extends ControlController {
26603
26838
  }
26604
26839
  }
26605
26840
  if (!nextTag) {
26606
- throw new RuntimeError56("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
26841
+ throw new RuntimeError58("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
26607
26842
  }
26608
26843
  this.state.activeFormTag = nextTag;
26609
26844
  this.tagHistory.push(nextTag);
@@ -26622,7 +26857,7 @@ var WizardPanelController = class extends ControlController {
26622
26857
  };
26623
26858
 
26624
26859
  // src/controller/control/md-ctrl/md-ctrl.controller.ts
26625
- import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
26860
+ import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
26626
26861
  import { isNil as isNil24 } from "ramda";
26627
26862
 
26628
26863
  // src/controller/control/md-ctrl/md-ctrl.service.ts
@@ -26693,26 +26928,6 @@ var MDCtrlController = class extends MDControlController {
26693
26928
  await this.service.init(this.context);
26694
26929
  this.setSort();
26695
26930
  }
26696
- /**
26697
- * 设置排序
26698
- *
26699
- * @author lxm
26700
- * @date 2022-09-28 13:09:44
26701
- * @param {string} key 排序字段
26702
- * @param {string} order 排序顺序
26703
- */
26704
- setSort(key, order) {
26705
- if (key && order) {
26706
- super.setSort(key, order);
26707
- } else {
26708
- const { minorSortAppDEFieldId, minorSortDir } = this.model;
26709
- if (minorSortAppDEFieldId && minorSortDir) {
26710
- this.state.sortQuery = "".concat(minorSortAppDEFieldId.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
26711
- } else {
26712
- this.state.sortQuery = "";
26713
- }
26714
- }
26715
- }
26716
26931
  /**
26717
26932
  * 加载更多
26718
26933
  * @author lxm
@@ -26849,7 +27064,7 @@ var MDCtrlController = class extends MDControlController {
26849
27064
  const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
26850
27065
  if (enableGroup && groupMode) {
26851
27066
  if (!groupAppDEFieldId) {
26852
- throw new RuntimeModelError61(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
27067
+ throw new RuntimeModelError62(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
26853
27068
  }
26854
27069
  if (groupMode === "AUTO") {
26855
27070
  this.handleAutoGroup();
@@ -26916,7 +27131,7 @@ var MDCtrlController = class extends MDControlController {
26916
27131
  async handleCodeListGroup() {
26917
27132
  const { groupAppDEFieldId, groupCodeListId } = this.model;
26918
27133
  if (!groupCodeListId) {
26919
- throw new RuntimeModelError61(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
27134
+ throw new RuntimeModelError62(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
26920
27135
  }
26921
27136
  const { items } = this.state;
26922
27137
  const groupMap = /* @__PURE__ */ new Map();
@@ -26946,7 +27161,7 @@ var MDCtrlController = class extends MDControlController {
26946
27161
  };
26947
27162
 
26948
27163
  // src/controller/control/kanban/kanban.controller.ts
26949
- import { RuntimeError as RuntimeError57, RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
27164
+ import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
26950
27165
  import { isNil as isNil25 } from "ramda";
26951
27166
 
26952
27167
  // src/controller/control/kanban/kanban.service.ts
@@ -27024,10 +27239,10 @@ var KanbanController = class extends DataViewControlController {
27024
27239
  const sortField = this.model.minorSortAppDEFieldId;
27025
27240
  const { minorSortDir } = this.model;
27026
27241
  if (!sortField) {
27027
- throw new RuntimeModelError62(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
27242
+ throw new RuntimeModelError63(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
27028
27243
  }
27029
27244
  if (!minorSortDir) {
27030
- throw new RuntimeModelError62(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
27245
+ throw new RuntimeModelError63(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
27031
27246
  }
27032
27247
  const isAsc = minorSortDir === "ASC";
27033
27248
  items.forEach((item) => {
@@ -27037,7 +27252,7 @@ var KanbanController = class extends DataViewControlController {
27037
27252
  } else {
27038
27253
  const toNum = Number(sortValue);
27039
27254
  if (Number.isNaN(toNum)) {
27040
- throw new RuntimeError57(
27255
+ throw new RuntimeError59(
27041
27256
  "".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
27042
27257
  );
27043
27258
  }
@@ -27123,7 +27338,7 @@ var KanbanController = class extends DataViewControlController {
27123
27338
  }
27124
27339
  handleDataGroup() {
27125
27340
  if (!this.model.enableGroup || this.model.groupMode === "NONE") {
27126
- throw new RuntimeError57("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
27341
+ throw new RuntimeError59("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
27127
27342
  }
27128
27343
  return super.handleDataGroup();
27129
27344
  }
@@ -27171,7 +27386,7 @@ var KanbanController = class extends DataViewControlController {
27171
27386
  async handleCodeListGroup() {
27172
27387
  const { groupAppDEFieldId, groupCodeListId } = this.model;
27173
27388
  if (!groupCodeListId) {
27174
- throw new RuntimeModelError62(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
27389
+ throw new RuntimeModelError63(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
27175
27390
  }
27176
27391
  const { items } = this.state;
27177
27392
  const groupMap = /* @__PURE__ */ new Map();
@@ -27775,7 +27990,7 @@ var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
27775
27990
  };
27776
27991
 
27777
27992
  // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
27778
- import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
27993
+ import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
27779
27994
  var TreeGridExUAColumnController = class extends TreeGridExColumnController {
27780
27995
  /**
27781
27996
  * 给rowController初始化操作列的状态
@@ -27788,7 +28003,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
27788
28003
  var _a;
27789
28004
  const { deuiactionGroup } = this.model;
27790
28005
  if (!deuiactionGroup) {
27791
- throw new RuntimeModelError63(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
28006
+ throw new RuntimeModelError64(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
27792
28007
  }
27793
28008
  if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
27794
28009
  ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -27841,7 +28056,7 @@ var TreeGridService = class extends GridService {
27841
28056
  };
27842
28057
 
27843
28058
  // src/controller/control/medit-view-panel/medit-view-panel.controller.ts
27844
- import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
28059
+ import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
27845
28060
  import { createUUID as createUUID13 } from "qx-util";
27846
28061
 
27847
28062
  // src/controller/control/medit-view-panel/medit-view-panel.service.ts
@@ -28057,7 +28272,7 @@ var MEditViewPanelController = class extends MDControlController {
28057
28272
  (item) => item.id === id
28058
28273
  );
28059
28274
  if (panelUiItemIndex < 0) {
28060
- throw new RuntimeError58("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
28275
+ throw new RuntimeError60("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
28061
28276
  }
28062
28277
  const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
28063
28278
  if (tempUiItem.id.startsWith("mockId:")) {
@@ -28564,7 +28779,7 @@ var ReportPanelController = class extends ControlController {
28564
28779
  };
28565
28780
 
28566
28781
  // src/controller/control/gantt/gantt.service.ts
28567
- import { ModelError as ModelError30 } from "@ibiz-template/core";
28782
+ import { ModelError as ModelError31 } from "@ibiz-template/core";
28568
28783
  var GanttService = class extends TreeService {
28569
28784
  /**
28570
28785
  * 执行实体服务
@@ -28682,7 +28897,7 @@ var GanttService = class extends TreeService {
28682
28897
  );
28683
28898
  break;
28684
28899
  default:
28685
- throw new ModelError30(
28900
+ throw new ModelError31(
28686
28901
  nodeModel,
28687
28902
  "".concat(nodeModel.treeNodeType, "\u8282\u70B9\u7C7B\u578B\u672A\u652F\u6301")
28688
28903
  );
@@ -28925,8 +29140,16 @@ var HubController = class {
28925
29140
  login(loginName, password) {
28926
29141
  return ibiz.auth.login(loginName, password);
28927
29142
  }
28928
- logout() {
28929
- return ibiz.auth.logout();
29143
+ async logout() {
29144
+ const bol = await ibiz.auth.logout();
29145
+ if (bol) {
29146
+ const l = window.location;
29147
+ if (l.search.indexOf("isAnonymous=true") !== -1) {
29148
+ const href = "".concat(l.origin).concat(l.pathname).concat(l.hash);
29149
+ window.history.replaceState({}, "", href);
29150
+ }
29151
+ }
29152
+ return bol;
28930
29153
  }
28931
29154
  };
28932
29155
 
@@ -29113,7 +29336,7 @@ var AppHub = class {
29113
29336
  this.registerAppView(appView);
29114
29337
  return appView;
29115
29338
  }
29116
- throw new RuntimeError59("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
29339
+ throw new RuntimeError61("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
29117
29340
  }
29118
29341
  /**
29119
29342
  * 根据应用实体代码名称查找应用视图
@@ -29144,7 +29367,7 @@ var AppHub = class {
29144
29367
  this.registerAppDataEntity(entity, appId);
29145
29368
  return entity;
29146
29369
  }
29147
- throw new RuntimeError59("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
29370
+ throw new RuntimeError61("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
29148
29371
  }
29149
29372
  /**
29150
29373
  * 新建 hub 应用
@@ -29159,7 +29382,7 @@ var AppHub = class {
29159
29382
  return this.appMap.get(id);
29160
29383
  }
29161
29384
  if (!this.modelLoaderProvider) {
29162
- throw new RuntimeError59("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
29385
+ throw new RuntimeError61("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
29163
29386
  }
29164
29387
  const appModel = await this.modelLoaderProvider.getApp(id);
29165
29388
  const app = new Application(appModel);
@@ -29272,7 +29495,7 @@ var EngineFactory = class {
29272
29495
  };
29273
29496
 
29274
29497
  // src/engine/view-base.engine.ts
29275
- import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
29498
+ import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
29276
29499
  var ViewEngineBase = class {
29277
29500
  /**
29278
29501
  * 构造函数在视图控制器的构造函数逻辑内部执行
@@ -29460,7 +29683,7 @@ var ViewEngineBase = class {
29460
29683
  const { appDataEntityId } = this.view.model;
29461
29684
  const { evt, context, params } = this.view;
29462
29685
  if (!appDataEntityId) {
29463
- throw new RuntimeError60("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
29686
+ throw new RuntimeError62("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
29464
29687
  }
29465
29688
  const app = ibiz.hub.getApp(context.srfappid);
29466
29689
  const res = await app.deService.exec(
@@ -29481,7 +29704,7 @@ var ViewEngineBase = class {
29481
29704
  };
29482
29705
 
29483
29706
  // src/engine/md-view.engine.ts
29484
- import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
29707
+ import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
29485
29708
  import { clone as clone24 } from "ramda";
29486
29709
  var MDViewEngine = class extends ViewEngineBase {
29487
29710
  /**
@@ -29665,7 +29888,7 @@ var MDViewEngine = class extends ViewEngineBase {
29665
29888
  view: this.view
29666
29889
  }));
29667
29890
  if (result === -1) {
29668
- throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29891
+ throw new RuntimeModelError65(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29669
29892
  } else {
29670
29893
  return {
29671
29894
  cancel: !result.ok
@@ -29688,7 +29911,7 @@ var MDViewEngine = class extends ViewEngineBase {
29688
29911
  (item) => item.id === "newdata"
29689
29912
  );
29690
29913
  if (!openAppViewLogic) {
29691
- throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29914
+ throw new RuntimeModelError65(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29692
29915
  }
29693
29916
  const params = clone24(this.view.params);
29694
29917
  if (copyMode) {
@@ -29702,7 +29925,7 @@ var MDViewEngine = class extends ViewEngineBase {
29702
29925
  view: this.view
29703
29926
  }));
29704
29927
  if (result === -1) {
29705
- throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29928
+ throw new RuntimeModelError65(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
29706
29929
  } else {
29707
29930
  return {
29708
29931
  cancel: !result.ok
@@ -29819,90 +30042,6 @@ var MDViewEngine = class extends ViewEngineBase {
29819
30042
  }
29820
30043
  };
29821
30044
 
29822
- // src/utils/error-handler/default-error-handler.ts
29823
- import {
29824
- RuntimeModelError as RuntimeModelError65,
29825
- ModelError as ModelError31,
29826
- HttpError as HttpError5,
29827
- NoticeError as NoticeError2,
29828
- RuntimeError as RuntimeError61
29829
- } from "@ibiz-template/core";
29830
- var DefaultErrorHandler = class {
29831
- handle(error) {
29832
- if (error instanceof RuntimeModelError65 || error instanceof ModelError31) {
29833
- ibiz.message.error(error.message, 10, true);
29834
- } else if (error instanceof HttpError5) {
29835
- if (error.status === 401) {
29836
- ibiz.message.error("\u6CA1\u6709\u6CE8\u518C\u65E0\u6743\u9650\u9519\u8BEF\u5904\u7406\u5668");
29837
- } else {
29838
- ibiz.notification.error({
29839
- title: "",
29840
- desc: error.message,
29841
- duration: 10
29842
- });
29843
- }
29844
- } else if (error instanceof NoticeError2) {
29845
- ibiz.message.error(error.message, error.duration, error.duration === 0);
29846
- } else if (error instanceof RuntimeError61) {
29847
- ibiz.message.error(error.message, 10, true);
29848
- }
29849
- ibiz.log.error(error);
29850
- return true;
29851
- }
29852
- };
29853
-
29854
- // src/utils/error-handler/error-handler-center.ts
29855
- var ErrorHandlerCenter = class {
29856
- constructor() {
29857
- /**
29858
- * 处理器集合
29859
- * @author lxm
29860
- * @date 2023-09-26 04:56:29
29861
- * @type {IErrorHandler[]}
29862
- */
29863
- this.handlers = [];
29864
- }
29865
- /**
29866
- * 注册处理器(后注册的优先级更高)
29867
- * @author lxm
29868
- * @date 2023-09-26 04:59:06
29869
- * @param {IErrorHandler} handler
29870
- */
29871
- register(handler) {
29872
- this.handlers.unshift(handler);
29873
- }
29874
- /**
29875
- * 处理单个报错
29876
- * @author lxm
29877
- * @date 2023-09-26 05:18:18
29878
- * @protected
29879
- * @param {unknown} error
29880
- */
29881
- handleSingle(error) {
29882
- const find = this.handlers.find((item) => {
29883
- return !!item.handle(error);
29884
- });
29885
- if (!find) {
29886
- ibiz.log.error("\u6CA1\u6709\u627E\u5230\u80FD\u5904\u7406\u8BE5\u9519\u8BEF\u7684\u5904\u7406\u5668", error);
29887
- }
29888
- }
29889
- /**
29890
- * 按顺序检测处理器,最先满足条件的处理该异常
29891
- * @author lxm
29892
- * @date 2023-09-26 05:01:08
29893
- * @param {unknown} error
29894
- */
29895
- handle(error) {
29896
- if (error instanceof Array) {
29897
- error.forEach((item) => {
29898
- this.handleSingle(item);
29899
- });
29900
- } else {
29901
- this.handleSingle(error);
29902
- }
29903
- }
29904
- };
29905
-
29906
30045
  // src/global/global-util/global-util.ts
29907
30046
  var GlobalUtil = class {
29908
30047
  constructor() {
@@ -29985,7 +30124,7 @@ var GlobalUtil = class {
29985
30124
  };
29986
30125
 
29987
30126
  // src/logic-scheduler/executor/logic-executor.ts
29988
- import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
30127
+ import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
29989
30128
  var LogicExecutor = class {
29990
30129
  /**
29991
30130
  * @author lxm
@@ -30006,7 +30145,7 @@ var LogicExecutor = class {
30006
30145
  */
30007
30146
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30008
30147
  execute(_executeParams) {
30009
- throw new RuntimeError62("Method not implemented.");
30148
+ throw new RuntimeError63("Method not implemented.");
30010
30149
  }
30011
30150
  /**
30012
30151
  * 销毁方法
@@ -30443,7 +30582,7 @@ var LogicSchedulerCenter = class {
30443
30582
  };
30444
30583
 
30445
30584
  // src/logic-scheduler/trigger/logic-trigger.ts
30446
- import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
30585
+ import { RuntimeError as RuntimeError64 } from "@ibiz-template/core";
30447
30586
  var LogicTrigger = class {
30448
30587
  /**
30449
30588
  * @author lxm
@@ -30503,7 +30642,7 @@ var LogicTrigger = class {
30503
30642
  if (this.executor) {
30504
30643
  return this.executor.execute(executeParams);
30505
30644
  }
30506
- throw new RuntimeError63("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
30645
+ throw new RuntimeError64("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
30507
30646
  }
30508
30647
  /**
30509
30648
  * 销毁方法
@@ -30520,12 +30659,12 @@ var CustomTrigger = class extends LogicTrigger {
30520
30659
  };
30521
30660
 
30522
30661
  // src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
30523
- import { RuntimeError as RuntimeError64 } from "@ibiz-template/core";
30662
+ import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
30524
30663
  var ItemDynaLogicTrigger = class extends LogicTrigger {
30525
30664
  bindExecutor(executor) {
30526
30665
  super.bindExecutor(executor);
30527
30666
  if (this.executor.type !== "SCRIPT") {
30528
- throw new RuntimeError64(
30667
+ throw new RuntimeError65(
30529
30668
  "\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
30530
30669
  );
30531
30670
  }
@@ -30561,7 +30700,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
30561
30700
  };
30562
30701
 
30563
30702
  // src/logic-scheduler/trigger/timer-trigger.ts
30564
- import { RuntimeError as RuntimeError65, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
30703
+ import { RuntimeError as RuntimeError66, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
30565
30704
  var TimerTrigger = class extends LogicTrigger {
30566
30705
  constructor() {
30567
30706
  super(...arguments);
@@ -30573,7 +30712,7 @@ var TimerTrigger = class extends LogicTrigger {
30573
30712
  }
30574
30713
  this.timer = setInterval(() => {
30575
30714
  if (!this.scheduler.defaultParamsCb) {
30576
- throw new RuntimeError65("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
30715
+ throw new RuntimeError66("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
30577
30716
  }
30578
30717
  const params = this.scheduler.defaultParamsCb();
30579
30718
  this.executor.execute(params);
@@ -30590,7 +30729,7 @@ var TimerTrigger = class extends LogicTrigger {
30590
30729
  // src/logic-scheduler/executor/app-ui-logic-executor.ts
30591
30730
  import {
30592
30731
  ModelError as ModelError34,
30593
- RuntimeError as RuntimeError66,
30732
+ RuntimeError as RuntimeError67,
30594
30733
  RuntimeModelError as RuntimeModelError68
30595
30734
  } from "@ibiz-template/core";
30596
30735
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
@@ -30628,7 +30767,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30628
30767
  const { context, params, ...rest } = parameters;
30629
30768
  const { data } = parameters;
30630
30769
  if (!(data == null ? void 0 : data[0])) {
30631
- throw new RuntimeError66("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
30770
+ throw new RuntimeError67("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
30632
30771
  }
30633
30772
  const openViewRefs = appUILogic.openDataAppViews;
30634
30773
  let openViewRef;
@@ -30688,7 +30827,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30688
30827
  const openViewRefs = appUILogic.openDataAppViews;
30689
30828
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
30690
30829
  if (!findView) {
30691
- throw new RuntimeError66(
30830
+ throw new RuntimeError67(
30692
30831
  "\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
30693
30832
  );
30694
30833
  }
@@ -30807,7 +30946,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30807
30946
  }
30808
30947
  const selectData = (_a = result.data) == null ? void 0 : _a[0];
30809
30948
  if (!selectData) {
30810
- throw new RuntimeError66("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
30949
+ throw new RuntimeError67("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
30811
30950
  }
30812
30951
  const indexType = selectData.srfkey;
30813
30952
  const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
@@ -30817,7 +30956,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
30817
30956
  }
30818
30957
  );
30819
30958
  if (!findView) {
30820
- throw new RuntimeError66(
30959
+ throw new RuntimeError67(
30821
30960
  "\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
30822
30961
  );
30823
30962
  }
@@ -31174,12 +31313,14 @@ export {
31174
31313
  DataViewControlController,
31175
31314
  DataViewControlService,
31176
31315
  DeAuthorityService,
31316
+ DefaultErrorHandler,
31177
31317
  DynamicCodeListCache,
31178
31318
  EDITOR_PROVIDER_PREFIX,
31179
31319
  EditFormController,
31180
31320
  EditFormService,
31181
31321
  EditorController,
31182
31322
  EngineFactory,
31323
+ ErrorHandlerCenter,
31183
31324
  ExpBarControlController,
31184
31325
  FORMDETAIL_PROVIDER_PREFIX,
31185
31326
  FetchMethod,