@ibiz-template/runtime 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/index.esm.js +583 -273
  2. package/dist/index.system.min.js +2 -2
  3. package/dist/index.system.min.js.map +1 -1
  4. package/out/app-hub.d.ts +5 -5
  5. package/out/app-hub.d.ts.map +1 -1
  6. package/out/app-hub.js +2 -2
  7. package/out/constant/sys-uiaction-tag.d.ts +4 -0
  8. package/out/constant/sys-uiaction-tag.d.ts.map +1 -1
  9. package/out/constant/sys-uiaction-tag.js +4 -0
  10. package/out/controller/common/control/control.controller.js +2 -2
  11. package/out/controller/control/app-menu/app-menu.controller.d.ts +2 -3
  12. package/out/controller/control/app-menu/app-menu.controller.d.ts.map +1 -1
  13. package/out/controller/control/form/search-form/search-form.controller.d.ts +9 -0
  14. package/out/controller/control/form/search-form/search-form.controller.d.ts.map +1 -1
  15. package/out/controller/control/form/search-form/search-form.controller.js +59 -0
  16. package/out/controller/control/grid/grid/grid.controller.d.ts +23 -2
  17. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  18. package/out/controller/control/grid/grid/grid.controller.js +73 -21
  19. package/out/controller/control/panel/panel/panel.controller.d.ts +4 -1
  20. package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
  21. package/out/controller/control/panel/panel/panel.controller.js +17 -16
  22. package/out/controller/utils/data-file-util/data-file-util.d.ts +3 -3
  23. package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -1
  24. package/out/controller/utils/data-file-util/data-file-util.js +10 -4
  25. package/out/engine/md-view.engine.d.ts.map +1 -1
  26. package/out/engine/md-view.engine.js +8 -0
  27. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +5 -5
  28. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  29. package/out/interface/common/i-app-service/i-app-service.d.ts +53 -0
  30. package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
  31. package/out/interface/controller/controller/control/i-grid.controller.d.ts +27 -1
  32. package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
  33. package/out/interface/controller/controller/control/i-panel.controller.d.ts +8 -0
  34. package/out/interface/controller/controller/control/i-panel.controller.d.ts.map +1 -1
  35. package/out/interface/service/service/i-app-de.service.d.ts +66 -0
  36. package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
  37. package/out/model/utils/util.d.ts +5 -5
  38. package/out/model/utils/util.d.ts.map +1 -1
  39. package/out/model/utils/util.js +14 -6
  40. package/out/service/dto/method.dto.d.ts +2 -2
  41. package/out/service/dto/method.dto.d.ts.map +1 -1
  42. package/out/service/dto/method.dto.js +3 -1
  43. package/out/service/service/config/config.service.d.ts.map +1 -1
  44. package/out/service/service/control/control.service.d.ts +2 -2
  45. package/out/service/service/control/control.service.d.ts.map +1 -1
  46. package/out/service/service/entity/de.service.d.ts +6 -0
  47. package/out/service/service/entity/de.service.d.ts.map +1 -1
  48. package/out/service/service/entity/de.service.js +18 -0
  49. package/out/service/service/entity/method/method.d.ts +2 -3
  50. package/out/service/service/entity/method/method.d.ts.map +1 -1
  51. package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
  52. package/out/ui-action/provider/front-ui-action-provider.d.ts +24 -0
  53. package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
  54. package/out/ui-action/provider/front-ui-action-provider.js +128 -1
  55. package/out/ui-action/provider/sys-ui-action-provider.d.ts.map +1 -1
  56. package/out/ui-action/provider/sys-ui-action-provider.js +2 -0
  57. package/package.json +2 -2
  58. package/src/app-hub.ts +5 -5
  59. package/src/constant/sys-uiaction-tag.ts +4 -0
  60. package/src/controller/common/control/control.controller.ts +2 -2
  61. package/src/controller/control/app-menu/app-menu.controller.ts +2 -2
  62. package/src/controller/control/form/search-form/search-form.controller.ts +64 -0
  63. package/src/controller/control/grid/grid/grid.controller.ts +110 -27
  64. package/src/controller/control/panel/panel/panel.controller.ts +15 -0
  65. package/src/controller/utils/data-file-util/data-file-util.ts +11 -3
  66. package/src/engine/md-view.engine.ts +8 -0
  67. package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +5 -5
  68. package/src/interface/common/i-app-service/i-app-service.ts +71 -0
  69. package/src/interface/controller/controller/control/i-grid.controller.ts +30 -1
  70. package/src/interface/controller/controller/control/i-panel.controller.ts +9 -0
  71. package/src/interface/service/service/i-app-de.service.ts +96 -0
  72. package/src/model/utils/util.ts +16 -6
  73. package/src/service/dto/method.dto.ts +5 -3
  74. package/src/service/service/config/config.service.ts +2 -3
  75. package/src/service/service/control/control.service.ts +2 -2
  76. package/src/service/service/entity/de.service.ts +48 -0
  77. package/src/service/service/entity/method/method.ts +2 -3
  78. package/src/service/service/work-flow/work-flow.service.ts +2 -3
  79. package/src/ui-action/provider/front-ui-action-provider.ts +153 -1
  80. package/src/ui-action/provider/sys-ui-action-provider.ts +2 -0
package/dist/index.esm.js CHANGED
@@ -618,11 +618,12 @@ function calcNavParams(model, originParams) {
618
618
  }
619
619
 
620
620
  // src/utils/open-redirect-view/open-redirect-view.ts
621
- import { RuntimeError, RuntimeModelError } from "@ibiz-template/core";
621
+ import { RuntimeError, RuntimeModelError as RuntimeModelError2 } from "@ibiz-template/core";
622
622
  import { isNilOrEmpty as isNilOrEmpty2, notNilEmpty as notNilEmpty3 } from "qx-util";
623
623
  import qs from "qs";
624
624
 
625
625
  // src/model/utils/util.ts
626
+ import { RuntimeModelError } from "@ibiz-template/core";
626
627
  function findModelChild(models, id) {
627
628
  if (models && id) {
628
629
  const model = models.find((item) => {
@@ -682,9 +683,18 @@ function parseUserParams(userParams) {
682
683
  }
683
684
  return { navigateContexts, navigateParams, other };
684
685
  }
685
- function getPFPlugin(app, id) {
686
- var _a;
687
- const plugin = (_a = app.appPFPluginRefs) == null ? void 0 : _a.find((item) => item.id === id);
686
+ function getPFPlugin(id, appId) {
687
+ const app = ibiz.hub.getApp(appId);
688
+ if (!app) {
689
+ throw new RuntimeModelError(app, "\u672A\u627E\u5230\u5E94\u7528");
690
+ }
691
+ const { model } = app;
692
+ if (!model.appPFPluginRefs) {
693
+ throw new RuntimeModelError(model, "\u5E94\u7528\u672A\u914D\u7F6E\u63D2\u4EF6");
694
+ }
695
+ const plugin = model.appPFPluginRefs.find(
696
+ (item) => item.pluginCode.toLowerCase() === id.toLowerCase()
697
+ );
688
698
  if (!plugin) {
689
699
  throw new Error("\u672A\u627E\u5230\u63D2\u4EF6".concat(id));
690
700
  }
@@ -1121,7 +1131,7 @@ async function openDERedirectView(appView, context, params = {}, opts = {}) {
1121
1131
  return result;
1122
1132
  }
1123
1133
  } else {
1124
- throw new RuntimeModelError(refView, "\u672A\u914D\u7F6E\u5B9E\u9645\u5F15\u7528\u89C6\u56FE");
1134
+ throw new RuntimeModelError2(refView, "\u672A\u914D\u7F6E\u5B9E\u9645\u5F15\u7528\u89C6\u56FE");
1125
1135
  }
1126
1136
  } else {
1127
1137
  ibiz.log.error(
@@ -1132,7 +1142,7 @@ async function openDERedirectView(appView, context, params = {}, opts = {}) {
1132
1142
  title: realTitle
1133
1143
  }))
1134
1144
  );
1135
- throw new RuntimeModelError(
1145
+ throw new RuntimeModelError2(
1136
1146
  appView,
1137
1147
  "\u672A\u627E\u5230\u91CD\u5B9A\u5411\u6807\u8BC6[".concat(rdTag, "]\u6216[").concat(deRdTag, "]\u6216\u5DE5\u4F5C\u6D41[").concat(wfRdTag, "]\u5BF9\u5E94\u89C6\u56FE")
1138
1148
  );
@@ -1804,7 +1814,7 @@ function checkFieldScriptRule(value, data, scriptCode, errorInfo, primaryModel)
1804
1814
  }
1805
1815
 
1806
1816
  // src/utils/verify/form-dynamic-logic.ts
1807
- import { ModelError, RuntimeModelError as RuntimeModelError2 } from "@ibiz-template/core";
1817
+ import { ModelError, RuntimeModelError as RuntimeModelError3 } from "@ibiz-template/core";
1808
1818
  function isGroupLogic(logic) {
1809
1819
  return logic.logicType === "GROUP";
1810
1820
  }
@@ -1815,7 +1825,7 @@ function verifyFormGroupLogic(data, logic) {
1815
1825
  if (isGroupLogic(logic)) {
1816
1826
  const children = logic.defdlogics;
1817
1827
  if (!children || children.length === 0) {
1818
- throw new RuntimeModelError2(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
1828
+ throw new RuntimeModelError3(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
1819
1829
  }
1820
1830
  let result = true;
1821
1831
  if (logic.groupOP === "AND") {
@@ -1844,7 +1854,7 @@ function verifyFormGroupLogic(data, logic) {
1844
1854
  }
1845
1855
 
1846
1856
  // src/utils/verify/panel-dynamic-logic.ts
1847
- import { ModelError as ModelError2, RuntimeModelError as RuntimeModelError3 } from "@ibiz-template/core";
1857
+ import { ModelError as ModelError2, RuntimeModelError as RuntimeModelError4 } from "@ibiz-template/core";
1848
1858
  function isGroupLogic2(logic) {
1849
1859
  return logic.logicType === "GROUP";
1850
1860
  }
@@ -1855,7 +1865,7 @@ function verifyPanelGroupLogic(data, logic) {
1855
1865
  if (isGroupLogic2(logic)) {
1856
1866
  const children = logic.panelItemLogics;
1857
1867
  if (!children || children.length === 0) {
1858
- throw new RuntimeModelError3(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
1868
+ throw new RuntimeModelError4(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
1859
1869
  }
1860
1870
  let result = true;
1861
1871
  if (logic.groupOP === "AND") {
@@ -2270,6 +2280,7 @@ var SysUIActionTag = /* @__PURE__ */ ((SysUIActionTag2) => {
2270
2280
  SysUIActionTag2["CANCEL"] = "Cancel";
2271
2281
  SysUIActionTag2["OK"] = "Ok";
2272
2282
  SysUIActionTag2["SEARCH"] = "Search";
2283
+ SysUIActionTag2["RESET"] = "Reset";
2273
2284
  SysUIActionTag2["FINISH"] = "Finish";
2274
2285
  SysUIActionTag2["NEXT_STEP"] = "NextStep";
2275
2286
  SysUIActionTag2["PREV_STEP"] = "PrevStep";
@@ -3582,7 +3593,7 @@ var AppCounter = class {
3582
3593
  };
3583
3594
 
3584
3595
  // src/service/utils/app-counter/app-de-counter.ts
3585
- import { RuntimeModelError as RuntimeModelError4 } from "@ibiz-template/core";
3596
+ import { RuntimeModelError as RuntimeModelError5 } from "@ibiz-template/core";
3586
3597
  var AppDECounter = class extends AppCounter {
3587
3598
  /**
3588
3599
  * 计数器初始化
@@ -3596,7 +3607,7 @@ var AppDECounter = class extends AppCounter {
3596
3607
  this.appDataEntityId = this.model.appDataEntityId;
3597
3608
  const action = this.model.getAppDEActionId;
3598
3609
  if (!action) {
3599
- throw new RuntimeModelError4(this.model, "\u672A\u627E\u5230\u83B7\u53D6\u8BA1\u6570\u5668\u884C\u4E3A!");
3610
+ throw new RuntimeModelError5(this.model, "\u672A\u627E\u5230\u83B7\u53D6\u8BA1\u6570\u5668\u884C\u4E3A!");
3600
3611
  }
3601
3612
  this.action = action;
3602
3613
  await super.init(context, params);
@@ -3714,7 +3725,7 @@ var DEDQCondUtil = class {
3714
3725
  DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
3715
3726
 
3716
3727
  // src/service/utils/dynamic-code-list/dynamic-code-list.ts
3717
- import { ModelError as ModelError4, RuntimeModelError as RuntimeModelError5 } from "@ibiz-template/core";
3728
+ import { ModelError as ModelError4, RuntimeModelError as RuntimeModelError6 } from "@ibiz-template/core";
3718
3729
  import { isNil as isNil3 } from "ramda";
3719
3730
  var DynamicCodeListCache = class {
3720
3731
  constructor(codeList) {
@@ -3853,10 +3864,10 @@ var DynamicCodeListCache = class {
3853
3864
  return Object.freeze(res2.data.items);
3854
3865
  }
3855
3866
  if (!appDataEntityId) {
3856
- throw new RuntimeModelError5(this.codeList, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
3867
+ throw new RuntimeModelError6(this.codeList, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
3857
3868
  }
3858
3869
  if (!appDEDataSetId) {
3859
- throw new RuntimeModelError5(this.codeList, "\u672A\u914D\u7F6E\u6570\u636E\u96C6");
3870
+ throw new RuntimeModelError6(this.codeList, "\u672A\u914D\u7F6E\u6570\u636E\u96C6");
3860
3871
  }
3861
3872
  const res = await app.deService.exec(
3862
3873
  appDataEntityId,
@@ -4668,7 +4679,7 @@ var ConfigService = class {
4668
4679
  };
4669
4680
 
4670
4681
  // src/service/service/counter/counter.service.ts
4671
- import { RuntimeModelError as RuntimeModelError6 } from "@ibiz-template/core";
4682
+ import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
4672
4683
  var CounterService = class {
4673
4684
  /**
4674
4685
  * 获取计数器
@@ -4707,7 +4718,7 @@ var CounterService = class {
4707
4718
  static async getCounterByRef(model, context, params) {
4708
4719
  const { appCounter } = model;
4709
4720
  if (!appCounter) {
4710
- throw new RuntimeModelError6(model, "\u672A\u914D\u7F6E\u5E94\u7528\u8BA1\u6570\u5668!");
4721
+ throw new RuntimeModelError7(model, "\u672A\u914D\u7F6E\u5E94\u7528\u8BA1\u6570\u5668!");
4711
4722
  }
4712
4723
  return this.getCounter(appCounter, context, params);
4713
4724
  }
@@ -5093,12 +5104,12 @@ var FileService = class {
5093
5104
  import {
5094
5105
  HttpResponse as HttpResponse3,
5095
5106
  RuntimeError as RuntimeError14,
5096
- RuntimeModelError as RuntimeModelError18
5107
+ RuntimeModelError as RuntimeModelError19
5097
5108
  } from "@ibiz-template/core";
5098
5109
  import { isArray as isArray6, isNil as isNil8 } from "lodash-es";
5099
5110
 
5100
5111
  // src/service/service/entity/method/method.ts
5101
- import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
5112
+ import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
5102
5113
  import { isArray as isArray3 } from "lodash-es";
5103
5114
 
5104
5115
  // src/service/app-data-entity/app-data-entity.ts
@@ -5350,7 +5361,9 @@ var MethodDto = class _MethodDto {
5350
5361
  const field = this.fields[i];
5351
5362
  const key = field.codeName.toLowerCase();
5352
5363
  switch (field.type) {
5353
- case "SIMPLE": {
5364
+ case "SIMPLE":
5365
+ case "SIMPLES":
5366
+ case "DTO": {
5354
5367
  break;
5355
5368
  }
5356
5369
  case "DTOS": {
@@ -5618,17 +5631,17 @@ var Method = class {
5618
5631
  break;
5619
5632
  default:
5620
5633
  if (requestMethod) {
5621
- throw new RuntimeModelError7(
5634
+ throw new RuntimeModelError8(
5622
5635
  this.method,
5623
5636
  "\u672A\u652F\u6301\u7684\u8BF7\u6C42\u65B9\u5F0F: ".concat(requestMethod)
5624
5637
  );
5625
5638
  } else {
5626
- throw new RuntimeModelError7(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
5639
+ throw new RuntimeModelError8(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
5627
5640
  }
5628
5641
  }
5629
5642
  return res;
5630
5643
  }
5631
- throw new RuntimeModelError7(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
5644
+ throw new RuntimeModelError8(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
5632
5645
  }
5633
5646
  mergeRequestPath(path2, methodName) {
5634
5647
  return "".concat(path2, "/").concat(methodName);
@@ -5689,7 +5702,7 @@ import { isArray as isArray5 } from "lodash-es";
5689
5702
  import { clone as clone9 } from "ramda";
5690
5703
 
5691
5704
  // src/de-logic/de-logic.ts
5692
- import { ModelError as ModelError11, RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
5705
+ import { ModelError as ModelError11, RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
5693
5706
 
5694
5707
  // src/de-logic/de-logic-context.ts
5695
5708
  import { isArray as isArray4 } from "lodash-es";
@@ -5821,17 +5834,17 @@ var DELogicContext = class {
5821
5834
  };
5822
5835
 
5823
5836
  // src/de-logic/de-logic-node/de-action-node/de-action-node.ts
5824
- import { RuntimeModelError as RuntimeModelError10 } from "@ibiz-template/core";
5837
+ import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
5825
5838
 
5826
5839
  // src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts
5827
- import { RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
5840
+ import { RuntimeModelError as RuntimeModelError10 } from "@ibiz-template/core";
5828
5841
 
5829
5842
  // src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts
5830
5843
  var DELogicLinkCond = class {
5831
5844
  };
5832
5845
 
5833
5846
  // src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts
5834
- import { ModelError as ModelError6, RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
5847
+ import { ModelError as ModelError6, RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
5835
5848
  var DELogicLinkSingleCond = class extends DELogicLinkCond {
5836
5849
  constructor(model) {
5837
5850
  super();
@@ -5878,7 +5891,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
5878
5891
  switch (this.type) {
5879
5892
  case "ENTITYFIELD": {
5880
5893
  if (!this.value) {
5881
- throw new RuntimeModelError8(
5894
+ throw new RuntimeModelError9(
5882
5895
  this.model,
5883
5896
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
5884
5897
  );
@@ -5888,7 +5901,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
5888
5901
  }
5889
5902
  case "SRCENTITYFIELD": {
5890
5903
  if (!this.value) {
5891
- throw new RuntimeModelError8(
5904
+ throw new RuntimeModelError9(
5892
5905
  this.model,
5893
5906
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
5894
5907
  );
@@ -5951,7 +5964,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
5951
5964
  test(ctx, context, data) {
5952
5965
  let bol = true;
5953
5966
  if (this.conds.length === 0) {
5954
- throw new RuntimeModelError9(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
5967
+ throw new RuntimeModelError10(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
5955
5968
  }
5956
5969
  for (let i = 0; i < this.conds.length; i++) {
5957
5970
  const cond = this.conds[i];
@@ -6054,10 +6067,10 @@ var DEActionNode = class extends DELogicNode {
6054
6067
  retDELogicParamId
6055
6068
  } = this.model;
6056
6069
  if (!dstAppDataEntityId) {
6057
- throw new RuntimeModelError10(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
6070
+ throw new RuntimeModelError11(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
6058
6071
  }
6059
6072
  if (!dstAppDEActionId) {
6060
- throw new RuntimeModelError10(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
6073
+ throw new RuntimeModelError11(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
6061
6074
  }
6062
6075
  const requestData = ctx.params[dstDELogicParamId];
6063
6076
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -6341,12 +6354,12 @@ var DataSetNode = class extends DELogicNode {
6341
6354
  };
6342
6355
 
6343
6356
  // src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts
6344
- import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
6357
+ import { RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
6345
6358
  var BindParamNode = class extends DELogicNode {
6346
6359
  async exec(ctx) {
6347
6360
  const { dstDELogicParamId, srcDELogicParamId } = this.model;
6348
6361
  if (!dstDELogicParamId || !srcDELogicParamId) {
6349
- throw new RuntimeModelError11(
6362
+ throw new RuntimeModelError12(
6350
6363
  this.model,
6351
6364
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
6352
6365
  );
@@ -6357,37 +6370,37 @@ var BindParamNode = class extends DELogicNode {
6357
6370
  };
6358
6371
 
6359
6372
  // src/de-logic/de-logic-node/reset-param-node/reset-param-node.ts
6360
- import { RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
6373
+ import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
6361
6374
  var ResetParamNode = class extends DELogicNode {
6362
6375
  async exec(ctx) {
6363
6376
  const { dstDELogicParamId } = this.model;
6364
6377
  if (!dstDELogicParamId) {
6365
- throw new RuntimeModelError12(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
6378
+ throw new RuntimeModelError13(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
6366
6379
  }
6367
6380
  ctx.resetParam(dstDELogicParamId);
6368
6381
  }
6369
6382
  };
6370
6383
 
6371
6384
  // src/de-logic/de-logic-node/renew-param-node/renew-param-node.ts
6372
- import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
6385
+ import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
6373
6386
  var RenewParamNode = class extends DELogicNode {
6374
6387
  async exec(ctx) {
6375
6388
  const { dstDELogicParamId } = this.model;
6376
6389
  if (!dstDELogicParamId) {
6377
- throw new RuntimeModelError13(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
6390
+ throw new RuntimeModelError14(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
6378
6391
  }
6379
6392
  ctx.renewParam(dstDELogicParamId);
6380
6393
  }
6381
6394
  };
6382
6395
 
6383
6396
  // src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
6384
- import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
6397
+ import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
6385
6398
  import { clone as clone7 } from "ramda";
6386
6399
  var CopyParamNode = class extends DELogicNode {
6387
6400
  async exec(ctx) {
6388
6401
  const { dstDELogicParamId, srcDELogicParamId } = this.model;
6389
6402
  if (!dstDELogicParamId || !srcDELogicParamId) {
6390
- throw new RuntimeModelError14(
6403
+ throw new RuntimeModelError15(
6391
6404
  this.model,
6392
6405
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
6393
6406
  );
@@ -6398,12 +6411,12 @@ var CopyParamNode = class extends DELogicNode {
6398
6411
  };
6399
6412
 
6400
6413
  // src/de-logic/de-logic-node/sort-param-node/sort-param-node.ts
6401
- import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
6414
+ import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
6402
6415
  var SortParamNode = class extends DELogicNode {
6403
6416
  async exec(ctx) {
6404
6417
  const { dstDELogicParamId, dstSortDir, dstFieldName } = this.model;
6405
6418
  if (!dstDELogicParamId || !dstFieldName) {
6406
- throw new RuntimeModelError15(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
6419
+ throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
6407
6420
  }
6408
6421
  const key = dstFieldName.toLowerCase();
6409
6422
  const arr = ctx.params[dstDELogicParamId];
@@ -6414,7 +6427,7 @@ var SortParamNode = class extends DELogicNode {
6414
6427
  };
6415
6428
 
6416
6429
  // src/de-logic/de-logic-node/append-param-node/append-param-node.ts
6417
- import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
6430
+ import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
6418
6431
  var AppendParamNode = class extends DELogicNode {
6419
6432
  async exec(ctx) {
6420
6433
  const {
@@ -6425,7 +6438,7 @@ var AppendParamNode = class extends DELogicNode {
6425
6438
  srcSize
6426
6439
  } = this.model;
6427
6440
  if (!dstDELogicParamId || !srcDELogicParamId) {
6428
- throw new RuntimeModelError16(
6441
+ throw new RuntimeModelError17(
6429
6442
  this.model,
6430
6443
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
6431
6444
  );
@@ -6574,7 +6587,7 @@ var DELogic = class {
6574
6587
  var _a, _b;
6575
6588
  if (model.customCode) {
6576
6589
  if (!model.scriptCode) {
6577
- throw new RuntimeModelError17(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
6590
+ throw new RuntimeModelError18(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
6578
6591
  }
6579
6592
  this.scriptFn = ScriptFactory.createScriptFn([], model.scriptCode, {
6580
6593
  isAsync: true
@@ -6582,7 +6595,7 @@ var DELogic = class {
6582
6595
  return;
6583
6596
  }
6584
6597
  if (!((_a = model.delogicNodes) == null ? void 0 : _a.length)) {
6585
- throw new RuntimeModelError17(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
6598
+ throw new RuntimeModelError18(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
6586
6599
  }
6587
6600
  model.delogicNodes.forEach((node) => {
6588
6601
  const { logicNodeType } = node;
@@ -6681,7 +6694,7 @@ var DELogic = class {
6681
6694
  const start = this.nodes.get(startDELogicNodeId);
6682
6695
  await this.deepExec(start, ctx);
6683
6696
  } else {
6684
- throw new RuntimeModelError17(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
6697
+ throw new RuntimeModelError18(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
6685
6698
  }
6686
6699
  if (ctx.isEndNode) {
6687
6700
  return ctx.result;
@@ -6818,7 +6831,7 @@ var DEActionMethod = class extends Method {
6818
6831
  if (this.method.actionType === "DELOGIC") {
6819
6832
  const deLogic = findDELogic(this.method.appDELogicId, this.entity);
6820
6833
  if (!deLogic) {
6821
- throw new RuntimeModelError18(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
6834
+ throw new RuntimeModelError19(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
6822
6835
  }
6823
6836
  return execDELogicAction(deLogic, context, data, params);
6824
6837
  }
@@ -7136,7 +7149,7 @@ var DEActionMethod = class extends Method {
7136
7149
  import {
7137
7150
  HttpResponse as HttpResponse4,
7138
7151
  ModelError as ModelError12,
7139
- RuntimeModelError as RuntimeModelError19
7152
+ RuntimeModelError as RuntimeModelError20
7140
7153
  } from "@ibiz-template/core";
7141
7154
  import { ascSort, descSort } from "qx-util";
7142
7155
  import { clone as clone10, equals as equals2, isEmpty as isEmpty7, isNil as isNil9, where as where2 } from "ramda";
@@ -7297,7 +7310,7 @@ var FetchMethod = class extends Method {
7297
7310
  async fetchCodeListSet(context, params) {
7298
7311
  const { appCodeListId } = this.method;
7299
7312
  if (!appCodeListId) {
7300
- throw new RuntimeModelError19(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
7313
+ throw new RuntimeModelError20(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
7301
7314
  }
7302
7315
  const codeItems = await this.app.codeList.get(
7303
7316
  appCodeListId,
@@ -7412,6 +7425,24 @@ var DEService = class {
7412
7425
  }
7413
7426
  throw new RuntimeError15("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
7414
7427
  }
7428
+ getDraft(context, params, params2) {
7429
+ return this.exec("GetDraft", context, params, params2);
7430
+ }
7431
+ create(context, params, params2) {
7432
+ return this.exec("Create", context, params, params2);
7433
+ }
7434
+ get(context, params, params2) {
7435
+ return this.exec("Get", context, params, params2);
7436
+ }
7437
+ update(context, params, params2) {
7438
+ return this.exec("Update", context, params, params2);
7439
+ }
7440
+ remove(context, params, params2) {
7441
+ return this.exec("Remove", context, params, params2);
7442
+ }
7443
+ fetchDefault(context, params, params2) {
7444
+ return this.exec("FetchDefault", context, params, params2);
7445
+ }
7415
7446
  /**
7416
7447
  * 执行服务方法 ac 模式
7417
7448
  *
@@ -9122,7 +9153,7 @@ function installCommand() {
9122
9153
  }
9123
9154
 
9124
9155
  // src/app-hub.ts
9125
- import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
9156
+ import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
9126
9157
 
9127
9158
  // src/application.ts
9128
9159
  import { Net, getToken } from "@ibiz-template/core";
@@ -10262,10 +10293,13 @@ function listenAsyncAction(id) {
10262
10293
  ibiz.mc.command.asyncAction.on(callBack);
10263
10294
  });
10264
10295
  }
10265
- async function asyncImportData(file, appDataEntity) {
10296
+ async function asyncImportData(file, appDataEntity, dataImport) {
10266
10297
  const data = new FormData();
10267
10298
  data.append("file", file);
10268
- const url = "".concat(appDataEntity.codeName2.toLowerCase(), "/").concat(asyncImportUrl);
10299
+ let url = "".concat(appDataEntity.codeName2.toLowerCase(), "/").concat(asyncImportUrl);
10300
+ if (dataImport == null ? void 0 : dataImport.codeName) {
10301
+ url += "?srfimporttag=".concat(dataImport.codeName);
10302
+ }
10269
10303
  const res = await ibiz.net.request(url, {
10270
10304
  method: "post",
10271
10305
  data,
@@ -10277,10 +10311,13 @@ async function asyncImportData(file, appDataEntity) {
10277
10311
  "OBJECTCREATED"
10278
10312
  );
10279
10313
  }
10280
- async function importData(file, appDataEntity) {
10314
+ async function importData(file, appDataEntity, dataImport) {
10281
10315
  const data = new FormData();
10282
10316
  data.append("file", file);
10283
- const url = "".concat(appDataEntity.codeName2.toLowerCase(), "/").concat(importUrl);
10317
+ let url = "".concat(appDataEntity.codeName2.toLowerCase(), "/").concat(importUrl);
10318
+ if (dataImport == null ? void 0 : dataImport.codeName) {
10319
+ url += "?srfimporttag=".concat(dataImport.codeName);
10320
+ }
10284
10321
  const res = await ibiz.net.request(url, {
10285
10322
  method: "post",
10286
10323
  data,
@@ -10520,7 +10557,7 @@ var BaseController = class {
10520
10557
  };
10521
10558
 
10522
10559
  // src/controller/utils/view-msg/view-msg-controller.ts
10523
- import { RuntimeError as RuntimeError27, RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
10560
+ import { RuntimeError as RuntimeError27, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
10524
10561
  import { isNil as isNil17, mergeRight as mergeRight2 } from "ramda";
10525
10562
  var ViewMsgController = class _ViewMsgController {
10526
10563
  constructor(msgGroupId) {
@@ -10585,7 +10622,7 @@ var ViewMsgController = class _ViewMsgController {
10585
10622
  static async fetchDataSet(msgModel, context, params) {
10586
10623
  const { appDataEntityId, appDEDataSetId } = msgModel;
10587
10624
  if (!appDEDataSetId) {
10588
- throw new RuntimeModelError20(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
10625
+ throw new RuntimeModelError21(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
10589
10626
  }
10590
10627
  const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
10591
10628
  if (res.data.length) {
@@ -10679,7 +10716,7 @@ var ViewMsgController = class _ViewMsgController {
10679
10716
  msgPosAppDEFieldId
10680
10717
  } = msgModel;
10681
10718
  if (!appDataEntityId) {
10682
- throw new RuntimeModelError20(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
10719
+ throw new RuntimeModelError21(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
10683
10720
  }
10684
10721
  const entity = await ibiz.hub.getAppDataEntity(
10685
10722
  appDataEntityId,
@@ -11227,7 +11264,7 @@ var EditorController = class {
11227
11264
  };
11228
11265
 
11229
11266
  // src/controller/common/editor/code-list-editor.controller.ts
11230
- import { RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
11267
+ import { RuntimeModelError as RuntimeModelError22 } from "@ibiz-template/core";
11231
11268
  var CodeListEditorController = class extends EditorController {
11232
11269
  /**
11233
11270
  * 加载代码表数据
@@ -11251,7 +11288,7 @@ var CodeListEditorController = class extends EditorController {
11251
11288
  );
11252
11289
  return dataItems;
11253
11290
  }
11254
- throw new RuntimeModelError21(
11291
+ throw new RuntimeModelError22(
11255
11292
  this.model,
11256
11293
  "\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
11257
11294
  );
@@ -11260,7 +11297,7 @@ var CodeListEditorController = class extends EditorController {
11260
11297
 
11261
11298
  // src/controller/common/control/control.controller.ts
11262
11299
  import { IBizContext as IBizContext3, IBizParams, NoticeError } from "@ibiz-template/core";
11263
- import { isNil as isNil19 } from "ramda";
11300
+ import { clone as clone14, isNil as isNil19 } from "ramda";
11264
11301
  import { notNilEmpty as notNilEmpty7 } from "qx-util";
11265
11302
  var ControlController = class extends BaseController {
11266
11303
  /**
@@ -11300,7 +11337,7 @@ var ControlController = class extends BaseController {
11300
11337
  "".concat(model.controlType, "_DEFAULT")
11301
11338
  );
11302
11339
  if (panelModel) {
11303
- this.controlPanel = panelModel;
11340
+ this.controlPanel = clone14(panelModel);
11304
11341
  }
11305
11342
  this.updateContextParams({});
11306
11343
  }
@@ -11922,7 +11959,7 @@ var MDControlController = class extends ControlController {
11922
11959
  import {
11923
11960
  findRecursiveChild,
11924
11961
  RuntimeError as RuntimeError30,
11925
- RuntimeModelError as RuntimeModelError22
11962
+ RuntimeModelError as RuntimeModelError23
11926
11963
  } from "@ibiz-template/core";
11927
11964
  var AppMenuController = class extends ControlController {
11928
11965
  initState() {
@@ -11968,7 +12005,7 @@ var AppMenuController = class extends ControlController {
11968
12005
  event
11969
12006
  });
11970
12007
  if (!menuItem.appFuncId) {
11971
- throw new RuntimeModelError22(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
12008
+ throw new RuntimeModelError23(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
11972
12009
  }
11973
12010
  const tempContext = this.context.clone();
11974
12011
  if (this.routeDepth && useDepth) {
@@ -12052,7 +12089,7 @@ var AppMenuController = class extends ControlController {
12052
12089
  import {
12053
12090
  findRecursiveChild as findRecursiveChild2,
12054
12091
  RuntimeError as RuntimeError31,
12055
- RuntimeModelError as RuntimeModelError23
12092
+ RuntimeModelError as RuntimeModelError24
12056
12093
  } from "@ibiz-template/core";
12057
12094
  var AppMenuIconViewController = class extends AppMenuController {
12058
12095
  async onClickMenuItem(id, event) {
@@ -12068,7 +12105,7 @@ var AppMenuIconViewController = class extends AppMenuController {
12068
12105
  event
12069
12106
  });
12070
12107
  if (!menuItem.appFuncId) {
12071
- throw new RuntimeModelError23(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
12108
+ throw new RuntimeModelError24(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
12072
12109
  }
12073
12110
  const tempContext = this.context.clone();
12074
12111
  if (this.routeDepth === 1) {
@@ -12340,17 +12377,17 @@ import { mergeDeepRight as mergeDeepRight3 } from "ramda";
12340
12377
  import { RuntimeError as RuntimeError33 } from "@ibiz-template/core";
12341
12378
 
12342
12379
  // src/controller/control/chart/generator/line-series-generator.ts
12343
- import { RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
12380
+ import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
12344
12381
 
12345
12382
  // src/controller/control/chart/generator/base-series-generator.ts
12346
- import { plus, RuntimeModelError as RuntimeModelError24, toNumberOrNil } from "@ibiz-template/core";
12383
+ import { plus, RuntimeModelError as RuntimeModelError25, toNumberOrNil } from "@ibiz-template/core";
12347
12384
  import dayjs3 from "dayjs";
12348
12385
  import minMax from "dayjs/plugin/minMax";
12349
12386
  import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
12350
12387
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
12351
12388
  import weekOfYear from "dayjs/plugin/weekOfYear";
12352
12389
  import isoWeek from "dayjs/plugin/isoWeek";
12353
- import { clone as clone14, isNil as isNil20, mergeDeepRight } from "ramda";
12390
+ import { clone as clone15, isNil as isNil20, mergeDeepRight } from "ramda";
12354
12391
  dayjs3.extend(minMax);
12355
12392
  dayjs3.extend(isSameOrBefore);
12356
12393
  dayjs3.extend(quarterOfYear);
@@ -12386,10 +12423,10 @@ var BaseSeriesGenerator = class {
12386
12423
  this.chartGenerator = chartGenerator;
12387
12424
  const { chartSeriesEncode, caption, id, userParam } = model;
12388
12425
  if (!model.catalogField) {
12389
- throw new RuntimeModelError24(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
12426
+ throw new RuntimeModelError25(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
12390
12427
  }
12391
12428
  if (!model.valueField) {
12392
- throw new RuntimeModelError24(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
12429
+ throw new RuntimeModelError25(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
12393
12430
  }
12394
12431
  this.catalogField = chartGenerator.getFieldKey(model.catalogField);
12395
12432
  this.valueField = chartGenerator.getFieldKey(model.valueField);
@@ -12576,7 +12613,7 @@ var BaseSeriesGenerator = class {
12576
12613
  dataPreprocess(data) {
12577
12614
  const tempData = [];
12578
12615
  data.forEach((singleData) => {
12579
- tempData.push(clone14(singleData));
12616
+ tempData.push(clone15(singleData));
12580
12617
  });
12581
12618
  const { groupMode } = this.model;
12582
12619
  if (groupMode) {
@@ -12770,10 +12807,10 @@ var BaseSeriesGenerator = class {
12770
12807
  var LineSeriesGenerator = class extends BaseSeriesGenerator {
12771
12808
  calcStaticOptions() {
12772
12809
  if (this.xAxisIndex === void 0) {
12773
- throw new RuntimeModelError25(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
12810
+ throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
12774
12811
  }
12775
12812
  if (this.yAxisIndex === void 0) {
12776
- throw new RuntimeModelError25(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
12813
+ throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
12777
12814
  }
12778
12815
  const options = super.calcStaticOptions();
12779
12816
  options.xAxisIndex = this.xAxisIndex;
@@ -12789,14 +12826,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
12789
12826
  };
12790
12827
 
12791
12828
  // src/controller/control/chart/generator/bar-series-generator.ts
12792
- import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
12829
+ import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
12793
12830
  var BarSeriesGenerator = class extends BaseSeriesGenerator {
12794
12831
  calcStaticOptions() {
12795
12832
  if (this.xAxisIndex === void 0) {
12796
- throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
12833
+ throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
12797
12834
  }
12798
12835
  if (this.yAxisIndex === void 0) {
12799
- throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
12836
+ throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
12800
12837
  }
12801
12838
  const options = super.calcStaticOptions();
12802
12839
  options.xAxisIndex = this.xAxisIndex;
@@ -12857,14 +12894,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
12857
12894
  };
12858
12895
 
12859
12896
  // src/controller/control/chart/generator/scatter-series-generator.ts
12860
- import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
12897
+ import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
12861
12898
  var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
12862
12899
  calcStaticOptions() {
12863
12900
  if (this.xAxisIndex === void 0) {
12864
- throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
12901
+ throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
12865
12902
  }
12866
12903
  if (this.yAxisIndex === void 0) {
12867
- throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
12904
+ throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
12868
12905
  }
12869
12906
  const options = super.calcStaticOptions();
12870
12907
  options.xAxisIndex = this.xAxisIndex;
@@ -13443,20 +13480,20 @@ var CaptionBarController = class extends ControlController {
13443
13480
  };
13444
13481
 
13445
13482
  // src/controller/control/toolbar/toolbar.controllerr.ts
13446
- import { recursiveIterate, RuntimeError as RuntimeError42 } from "@ibiz-template/core";
13483
+ import { recursiveIterate, RuntimeError as RuntimeError43 } from "@ibiz-template/core";
13447
13484
 
13448
13485
  // src/ui-action/provider/backend-ui-action-provider.ts
13449
- import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
13486
+ import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
13450
13487
  import { isArray as isArray9 } from "qx-util";
13451
13488
 
13452
13489
  // src/ui-action/provider/ui-action-provider-base.ts
13453
- import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
13490
+ import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
13454
13491
 
13455
13492
  // src/ui-logic/index.ts
13456
13493
  import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
13457
13494
 
13458
13495
  // src/ui-logic/ui-logic.ts
13459
- import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
13496
+ import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
13460
13497
 
13461
13498
  // src/ui-logic/ui-logic-context.ts
13462
13499
  var UILogicContext = class {
@@ -13591,24 +13628,24 @@ var UILogicContext = class {
13591
13628
  };
13592
13629
 
13593
13630
  // src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
13594
- import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
13631
+ import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
13595
13632
 
13596
13633
  // src/ui-logic/ui-logic-link/ui-logic-link.ts
13597
13634
  import { ModelError as ModelError19 } from "@ibiz-template/core";
13598
13635
 
13599
13636
  // src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
13600
- import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
13637
+ import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
13601
13638
 
13602
13639
  // src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
13603
13640
  var UILogicLinkCond = class {
13604
13641
  };
13605
13642
 
13606
13643
  // src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
13607
- import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
13644
+ import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
13608
13645
 
13609
13646
  // src/ui-logic/utils/handle-src-val.ts
13610
13647
  import { ModelError as ModelError17 } from "@ibiz-template/core";
13611
- import { clone as clone15 } from "ramda";
13648
+ import { clone as clone16 } from "ramda";
13612
13649
  function handleSrcVal2(ctx, srcValParams) {
13613
13650
  const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
13614
13651
  const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
@@ -13635,7 +13672,7 @@ function handleSrcVal2(ctx, srcValParams) {
13635
13672
  value = ctx.parameters.context;
13636
13673
  break;
13637
13674
  case "ENVPARAM":
13638
- value = clone15(ibiz.env);
13675
+ value = clone16(ibiz.env);
13639
13676
  break;
13640
13677
  default:
13641
13678
  throw new ModelError17(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
@@ -13700,7 +13737,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
13700
13737
  switch (this.type) {
13701
13738
  case "ENTITYFIELD": {
13702
13739
  if (!this.value) {
13703
- throw new RuntimeModelError28(
13740
+ throw new RuntimeModelError29(
13704
13741
  this.model,
13705
13742
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
13706
13743
  );
@@ -13710,7 +13747,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
13710
13747
  }
13711
13748
  case "SRCENTITYFIELD": {
13712
13749
  if (!this.value) {
13713
- throw new RuntimeModelError28(
13750
+ throw new RuntimeModelError29(
13714
13751
  this.model,
13715
13752
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
13716
13753
  );
@@ -13776,7 +13813,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
13776
13813
  test(ctx, context, data) {
13777
13814
  let bol = true;
13778
13815
  if (this.conds.length === 0) {
13779
- throw new RuntimeModelError29(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
13816
+ throw new RuntimeModelError30(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
13780
13817
  }
13781
13818
  for (let i = 0; i < this.conds.length; i++) {
13782
13819
  const cond = this.conds[i];
@@ -13902,10 +13939,10 @@ var DEActionNode2 = class extends UILogicNode {
13902
13939
  retDEUILogicParamId
13903
13940
  } = this.model;
13904
13941
  if (!dstAppDataEntityId) {
13905
- throw new RuntimeModelError30(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
13942
+ throw new RuntimeModelError31(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
13906
13943
  }
13907
13944
  if (!dstAppDEActionId) {
13908
- throw new RuntimeModelError30(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
13945
+ throw new RuntimeModelError31(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
13909
13946
  }
13910
13947
  const requestData = ctx.params[dstDEUILogicParamId];
13911
13948
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -13923,13 +13960,13 @@ var DEActionNode2 = class extends UILogicNode {
13923
13960
  };
13924
13961
 
13925
13962
  // src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
13926
- import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
13963
+ import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
13927
13964
  var DEUIActionNode = class extends UILogicNode {
13928
13965
  async exec(ctx) {
13929
13966
  const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
13930
13967
  const { data, parameters } = ctx;
13931
13968
  if (!dstAppDEUIActionId) {
13932
- throw new RuntimeModelError31(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
13969
+ throw new RuntimeModelError32(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
13933
13970
  }
13934
13971
  let actionData = [data];
13935
13972
  if (dstDEUILogicParamId) {
@@ -13990,7 +14027,7 @@ var EndNode2 = class extends UILogicNode {
13990
14027
 
13991
14028
  // src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
13992
14029
  import { ModelError as ModelError21, RuntimeError as RuntimeError35 } from "@ibiz-template/core";
13993
- import { clone as clone16 } from "ramda";
14030
+ import { clone as clone17 } from "ramda";
13994
14031
  var PrepareJSParamNode = class extends UILogicNode {
13995
14032
  async exec(ctx) {
13996
14033
  const nodeParams = this.model.deuilogicNodeParams;
@@ -14079,7 +14116,7 @@ var PrepareJSParamNode = class extends UILogicNode {
14079
14116
  copyParam(nodeParam, ctx) {
14080
14117
  const { dstDEUILogicParamId } = nodeParam;
14081
14118
  const srcVal = handleSrcVal2(ctx, nodeParam);
14082
- ctx.params[dstDEUILogicParamId] = clone16(srcVal);
14119
+ ctx.params[dstDEUILogicParamId] = clone17(srcVal);
14083
14120
  }
14084
14121
  /**
14085
14122
  * 绑定参数
@@ -14156,20 +14193,20 @@ var PrepareJSParamNode = class extends UILogicNode {
14156
14193
  };
14157
14194
 
14158
14195
  // src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
14159
- import { RuntimeError as RuntimeError36, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
14196
+ import { RuntimeError as RuntimeError36, RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
14160
14197
  import { isFunction } from "lodash-es";
14161
14198
  var ViewCtrlInvokeNode = class extends UILogicNode {
14162
14199
  async exec(ctx) {
14163
14200
  ctx.isEndNode = true;
14164
14201
  const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
14165
14202
  if (!invokeCtrlId) {
14166
- throw new RuntimeModelError32(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
14203
+ throw new RuntimeModelError33(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
14167
14204
  }
14168
14205
  if (!invokeParamId) {
14169
- throw new RuntimeModelError32(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
14206
+ throw new RuntimeModelError33(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
14170
14207
  }
14171
14208
  if (!invokeMethod) {
14172
- throw new RuntimeModelError32(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
14209
+ throw new RuntimeModelError33(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
14173
14210
  }
14174
14211
  const invokeParam = ctx.params[invokeParamId];
14175
14212
  if (!invokeParam) {
@@ -14187,12 +14224,12 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
14187
14224
  };
14188
14225
 
14189
14226
  // src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
14190
- import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
14227
+ import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
14191
14228
  var BindParamNode2 = class extends UILogicNode {
14192
14229
  async exec(ctx) {
14193
14230
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
14194
14231
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
14195
- throw new RuntimeModelError33(
14232
+ throw new RuntimeModelError34(
14196
14233
  this.model,
14197
14234
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
14198
14235
  );
@@ -14203,7 +14240,7 @@ var BindParamNode2 = class extends UILogicNode {
14203
14240
  };
14204
14241
 
14205
14242
  // src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
14206
- import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
14243
+ import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
14207
14244
  var MsgBoxNode = class extends UILogicNode {
14208
14245
  constructor() {
14209
14246
  super(...arguments);
@@ -14217,10 +14254,10 @@ var MsgBoxNode = class extends UILogicNode {
14217
14254
  async exec(ctx) {
14218
14255
  const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
14219
14256
  if (!msgBoxType) {
14220
- throw new RuntimeModelError34(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
14257
+ throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
14221
14258
  }
14222
14259
  if (!buttonsType) {
14223
- throw new RuntimeModelError34(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
14260
+ throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
14224
14261
  }
14225
14262
  let { title } = this.model;
14226
14263
  let { message } = this.model;
@@ -14280,12 +14317,12 @@ var PFPluginNode = class extends UILogicNode {
14280
14317
  };
14281
14318
 
14282
14319
  // src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
14283
- import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
14320
+ import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
14284
14321
  var DebugParamNode = class extends UILogicNode {
14285
14322
  async exec(ctx) {
14286
14323
  const { dstDEUILogicParamId, name } = this.model;
14287
14324
  if (!dstDEUILogicParamId) {
14288
- throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
14325
+ throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
14289
14326
  }
14290
14327
  const param = ctx.params[dstDEUILogicParamId];
14291
14328
  console.log("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
@@ -14293,36 +14330,36 @@ var DebugParamNode = class extends UILogicNode {
14293
14330
  };
14294
14331
 
14295
14332
  // src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
14296
- import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
14333
+ import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
14297
14334
  var ResetParamNode2 = class extends UILogicNode {
14298
14335
  async exec(ctx) {
14299
14336
  const { dstDEUILogicParamId } = this.model;
14300
14337
  if (!dstDEUILogicParamId) {
14301
- throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
14338
+ throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
14302
14339
  }
14303
14340
  ctx.resetParam(dstDEUILogicParamId);
14304
14341
  }
14305
14342
  };
14306
14343
 
14307
14344
  // src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
14308
- import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
14309
- import { clone as clone17 } from "ramda";
14345
+ import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
14346
+ import { clone as clone18 } from "ramda";
14310
14347
  var CopyParamNode2 = class extends UILogicNode {
14311
14348
  async exec(ctx) {
14312
14349
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
14313
14350
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
14314
- throw new RuntimeModelError37(
14351
+ throw new RuntimeModelError38(
14315
14352
  this.model,
14316
14353
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
14317
14354
  );
14318
14355
  }
14319
14356
  const srcVal = handleSrcVal2(ctx, this.model);
14320
- ctx.params[dstDEUILogicParamId] = clone17(srcVal);
14357
+ ctx.params[dstDEUILogicParamId] = clone18(srcVal);
14321
14358
  }
14322
14359
  };
14323
14360
 
14324
14361
  // src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
14325
- import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
14362
+ import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
14326
14363
  var AppendParamNode2 = class extends UILogicNode {
14327
14364
  async exec(ctx) {
14328
14365
  const {
@@ -14333,7 +14370,7 @@ var AppendParamNode2 = class extends UILogicNode {
14333
14370
  srcSize
14334
14371
  } = this.model;
14335
14372
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
14336
- throw new RuntimeModelError38(
14373
+ throw new RuntimeModelError39(
14337
14374
  this.model,
14338
14375
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
14339
14376
  );
@@ -14351,12 +14388,12 @@ var AppendParamNode2 = class extends UILogicNode {
14351
14388
  };
14352
14389
 
14353
14390
  // src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
14354
- import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
14391
+ import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
14355
14392
  var SortParamNode2 = class extends UILogicNode {
14356
14393
  async exec(ctx) {
14357
14394
  const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
14358
14395
  if (!dstDEUILogicParamId || !dstFieldName) {
14359
- throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
14396
+ throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
14360
14397
  }
14361
14398
  const key = dstFieldName;
14362
14399
  const arr = ctx.params[dstDEUILogicParamId];
@@ -14367,19 +14404,19 @@ var SortParamNode2 = class extends UILogicNode {
14367
14404
  };
14368
14405
 
14369
14406
  // src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
14370
- import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
14407
+ import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
14371
14408
  var RenewParamNode2 = class extends UILogicNode {
14372
14409
  async exec(ctx) {
14373
14410
  const { dstDEUILogicParamId } = this.model;
14374
14411
  if (!dstDEUILogicParamId) {
14375
- throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
14412
+ throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
14376
14413
  }
14377
14414
  ctx.renewParam(dstDEUILogicParamId);
14378
14415
  }
14379
14416
  };
14380
14417
 
14381
14418
  // src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
14382
- import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
14419
+ import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
14383
14420
  var DataSetNode2 = class extends UILogicNode {
14384
14421
  async exec(ctx) {
14385
14422
  const {
@@ -14389,7 +14426,7 @@ var DataSetNode2 = class extends UILogicNode {
14389
14426
  retDEUILogicParamId
14390
14427
  } = this.model;
14391
14428
  if (!dstDEUILogicParamId) {
14392
- throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
14429
+ throw new RuntimeModelError42(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
14393
14430
  }
14394
14431
  const queryParams = ctx.params[dstDEUILogicParamId];
14395
14432
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -14415,19 +14452,19 @@ var ThrowExceptionNode2 = class extends UILogicNode {
14415
14452
  };
14416
14453
 
14417
14454
  // src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
14418
- import { RuntimeError as RuntimeError38, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
14455
+ import { RuntimeError as RuntimeError38, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
14419
14456
  var ViewCtrlFireEventNode = class extends UILogicNode {
14420
14457
  async exec(ctx) {
14421
14458
  ctx.isEndNode = true;
14422
14459
  const { eventName, eventParamId, fireCtrlId } = this.model;
14423
14460
  if (!fireCtrlId) {
14424
- throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
14461
+ throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
14425
14462
  }
14426
14463
  if (!eventName) {
14427
- throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
14464
+ throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
14428
14465
  }
14429
14466
  if (!eventParamId) {
14430
- throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
14467
+ throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
14431
14468
  }
14432
14469
  const invokeCtrl = ctx.params[fireCtrlId];
14433
14470
  if (!invokeCtrl) {
@@ -14442,7 +14479,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
14442
14479
  };
14443
14480
 
14444
14481
  // src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
14445
- import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
14482
+ import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
14446
14483
  var ExecuteDELogicNode = class extends UILogicNode {
14447
14484
  async exec(ctx) {
14448
14485
  const {
@@ -14452,13 +14489,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
14452
14489
  retDEUILogicParamId
14453
14490
  } = this.model;
14454
14491
  if (!dstAppDataEntityId) {
14455
- throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
14492
+ throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
14456
14493
  }
14457
14494
  if (!dstAppDELogicId) {
14458
- throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
14495
+ throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
14459
14496
  }
14460
14497
  if (!dstDEUILogicParamId) {
14461
- throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
14498
+ throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
14462
14499
  }
14463
14500
  const dstParam = ctx.params[dstDEUILogicParamId];
14464
14501
  if (!dstParam) {
@@ -14603,7 +14640,7 @@ var UILogic = class {
14603
14640
  this.params = /* @__PURE__ */ new Map();
14604
14641
  var _a;
14605
14642
  if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
14606
- throw new RuntimeModelError44(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
14643
+ throw new RuntimeModelError45(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
14607
14644
  }
14608
14645
  model.deuilogicNodes.forEach((node) => {
14609
14646
  const { logicNodeType } = node;
@@ -14720,7 +14757,7 @@ var UILogic = class {
14720
14757
  const start = this.nodes.get(startDEUILogicNodeId);
14721
14758
  await this.deepExec(start, ctx);
14722
14759
  } else {
14723
- throw new RuntimeModelError44(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
14760
+ throw new RuntimeModelError45(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
14724
14761
  }
14725
14762
  if (ctx.isEndNode) {
14726
14763
  return ctx.result;
@@ -14856,7 +14893,7 @@ var UIActionProviderBase = class {
14856
14893
  const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
14857
14894
  if (uilogicAttachMode === "REPLACE") {
14858
14895
  if (!appDEUILogicId) {
14859
- throw new RuntimeModelError45(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
14896
+ throw new RuntimeModelError46(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
14860
14897
  }
14861
14898
  await execUILogic(appDEUILogicId, appDataEntityId, args);
14862
14899
  return result;
@@ -14888,7 +14925,7 @@ var UIActionProviderBase = class {
14888
14925
  }
14889
14926
  if (action.uilogicAttachMode === "AFTER") {
14890
14927
  if (!appDEUILogicId) {
14891
- throw new RuntimeModelError45(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
14928
+ throw new RuntimeModelError46(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
14892
14929
  }
14893
14930
  await execUILogic(appDEUILogicId, appDataEntityId, args);
14894
14931
  }
@@ -15076,7 +15113,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
15076
15113
  const entityName = action.appDataEntityId;
15077
15114
  const methodName = action.appDEMethodId;
15078
15115
  if (!entityName || !methodName) {
15079
- throw new RuntimeModelError46(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
15116
+ throw new RuntimeModelError47(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
15080
15117
  }
15081
15118
  const { resultContext, resultParams, resultData } = await this.handleParams(
15082
15119
  action,
@@ -15182,7 +15219,9 @@ var SysUIActionProvider = class extends UIActionProviderBase {
15182
15219
  ["GRIDVIEW_VIEWACTION", "View"],
15183
15220
  ["GRIDVIEW_SAVEROWACTION", "SaveRow"],
15184
15221
  ["APP_LOGIN", "Login"],
15185
- ["APP_LOGOUT", "logout"]
15222
+ ["APP_LOGOUT", "logout"],
15223
+ ["UTIL_RESET", "Reset"],
15224
+ ["UTIL_SEARCH", "Search"]
15186
15225
  ]);
15187
15226
  }
15188
15227
  async execAction(action, args) {
@@ -15197,7 +15236,12 @@ var SysUIActionProvider = class extends UIActionProviderBase {
15197
15236
  };
15198
15237
 
15199
15238
  // src/ui-action/provider/front-ui-action-provider.ts
15200
- import { StringUtil, RuntimeModelError as RuntimeModelError47, ModelError as ModelError25 } from "@ibiz-template/core";
15239
+ import {
15240
+ StringUtil,
15241
+ RuntimeModelError as RuntimeModelError48,
15242
+ ModelError as ModelError25,
15243
+ RuntimeError as RuntimeError42
15244
+ } from "@ibiz-template/core";
15201
15245
  var FrontUIActionProvider = class extends UIActionProviderBase {
15202
15246
  async execAction(action, args) {
15203
15247
  const { context, params, data, event, noWaitRoute } = args;
@@ -15212,7 +15256,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
15212
15256
  case "WIZARD": {
15213
15257
  const frontPSAppView = action.frontAppViewId;
15214
15258
  if (!frontPSAppView) {
15215
- throw new RuntimeModelError47(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
15259
+ throw new RuntimeModelError48(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
15216
15260
  }
15217
15261
  const { resultContext, resultParams } = await this.handleParams(
15218
15262
  action,
@@ -15237,6 +15281,15 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
15237
15281
  }
15238
15282
  break;
15239
15283
  }
15284
+ case "PRINT":
15285
+ await this.executePrint(action, args);
15286
+ break;
15287
+ case "DATAIMP":
15288
+ actionResult = await this.executeDataImport(action, args);
15289
+ break;
15290
+ case "DATAEXP":
15291
+ await this.executeDataExport(action, args);
15292
+ break;
15240
15293
  case "OTHER":
15241
15294
  actionResult = this.doOther(action, args);
15242
15295
  break;
@@ -15268,7 +15321,129 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
15268
15321
  );
15269
15322
  return result || {};
15270
15323
  }
15271
- throw new RuntimeModelError47(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
15324
+ throw new RuntimeModelError48(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
15325
+ }
15326
+ /**
15327
+ * 执行打印行为
15328
+ * @protected
15329
+ * @param {IAppDEUIAction} action
15330
+ * @param {IUILogicParams} args
15331
+ * @return {*}
15332
+ */
15333
+ async executePrint(action, args) {
15334
+ var _a, _b;
15335
+ const appDataEntity = await ibiz.hub.getAppDataEntity(
15336
+ action.appDataEntityId
15337
+ );
15338
+ const appDEPrint = (_a = appDataEntity.appDEPrints) == null ? void 0 : _a.find((print) => {
15339
+ return print.id === action.appDEPrintId;
15340
+ });
15341
+ if (appDEPrint) {
15342
+ let requestUrl = "";
15343
+ const { context } = args;
15344
+ if (context && context[appDataEntity.codeName.toLowerCase()]) {
15345
+ requestUrl += "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/printdata/").concat(context[appDataEntity.codeName.toLowerCase()], "?srfprinttag=").concat(appDEPrint.codeName);
15346
+ } else {
15347
+ throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
15348
+ }
15349
+ const res = await ibiz.net.request(requestUrl, {
15350
+ method: "get",
15351
+ responseType: "blob"
15352
+ });
15353
+ if (res.ok) {
15354
+ const link = window.URL.createObjectURL(res.data);
15355
+ window.open(link, "_blank");
15356
+ } else {
15357
+ throw new RuntimeError42("\u6253\u5370\u5931\u8D25");
15358
+ }
15359
+ } else {
15360
+ throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
15361
+ }
15362
+ }
15363
+ /**
15364
+ * 执行导入行为
15365
+ * @protected
15366
+ * @param {IAppDEUIAction} action
15367
+ * @param {IUILogicParams} args
15368
+ * @return {*}
15369
+ */
15370
+ async executeDataImport(action, _args) {
15371
+ var _a;
15372
+ const appDataEntity = await ibiz.hub.getAppDataEntity(
15373
+ action.appDataEntityId
15374
+ );
15375
+ const appDEDataImport = (_a = appDataEntity.appDEDataImports) == null ? void 0 : _a.find(
15376
+ (dataImport) => dataImport.id === action.appDEDataImportId
15377
+ );
15378
+ if (appDEDataImport) {
15379
+ const modal = ibiz.overlay.createModal(
15380
+ "DataImport",
15381
+ {
15382
+ dismiss: () => modal.dismiss(),
15383
+ appDataEntity,
15384
+ dataImport: appDEDataImport
15385
+ },
15386
+ {
15387
+ width: "auto",
15388
+ placement: "center"
15389
+ }
15390
+ );
15391
+ modal.present();
15392
+ await modal.onWillDismiss();
15393
+ return {
15394
+ refresh: true,
15395
+ refreshMode: 1
15396
+ };
15397
+ }
15398
+ throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
15399
+ }
15400
+ /**
15401
+ * 执行导出行为
15402
+ * @protected
15403
+ * @param {IAppDEUIAction} action
15404
+ * @param {IUILogicParams} args
15405
+ * @return {*}
15406
+ */
15407
+ async executeDataExport(action, _args) {
15408
+ var _a, _b;
15409
+ const appDataEntity = await ibiz.hub.getAppDataEntity(
15410
+ action.appDataEntityId
15411
+ );
15412
+ const appDEDataExport = (_a = appDataEntity.appDEDataExports) == null ? void 0 : _a.find((dataExport) => {
15413
+ return dataExport.id === action.appDEDataExportId;
15414
+ });
15415
+ if (appDEDataExport) {
15416
+ const url = "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/exportdata/fetchdefault?srfexporttag=").concat(appDEDataExport.codeName);
15417
+ const params = {
15418
+ page: 0,
15419
+ size: appDEDataExport.maxRowCount ? appDEDataExport.maxRowCount : 1e3,
15420
+ responseType: "blob"
15421
+ };
15422
+ const res = await ibiz.net.request(url, {
15423
+ method: "post",
15424
+ data: params,
15425
+ responseType: "blob"
15426
+ });
15427
+ if (res.status === 200) {
15428
+ let fileName = "".concat(appDataEntity.logicName, "\u8868.xlsx");
15429
+ fileName = decodeURIComponent(fileName);
15430
+ const blob = new Blob([res.data], {
15431
+ type: "application/vnd.ms-excel"
15432
+ });
15433
+ const elink = document.createElement("a");
15434
+ elink.download = fileName;
15435
+ elink.style.display = "none";
15436
+ elink.href = URL.createObjectURL(blob);
15437
+ document.body.appendChild(elink);
15438
+ elink.click();
15439
+ URL.revokeObjectURL(elink.href);
15440
+ document.body.removeChild(elink);
15441
+ } else {
15442
+ throw new RuntimeError42("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
15443
+ }
15444
+ } else {
15445
+ throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
15446
+ }
15272
15447
  }
15273
15448
  };
15274
15449
 
@@ -15335,7 +15510,7 @@ var ToolbarController = class extends ControlController {
15335
15510
  const actionId = item.uiactionId;
15336
15511
  const uiAction = await getUIActionById(actionId);
15337
15512
  if (!uiAction) {
15338
- throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
15513
+ throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
15339
15514
  }
15340
15515
  const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
15341
15516
  if (enableLoading) {
@@ -15898,7 +16073,7 @@ var RawItemPortletController = class extends PortletPartController {
15898
16073
  };
15899
16074
 
15900
16075
  // src/controller/control/data-view/data-view.controller.ts
15901
- import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
16076
+ import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
15902
16077
  import { isNil as isNil21 } from "ramda";
15903
16078
 
15904
16079
  // src/controller/control/data-view/data-view.service.ts
@@ -16113,7 +16288,7 @@ var DataViewControlController = class extends MDControlController {
16113
16288
  const optItemModel = this.getOptItemModel();
16114
16289
  if (optItemModel) {
16115
16290
  if (!optItemModel.deuiactionGroup) {
16116
- throw new RuntimeModelError48(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
16291
+ throw new RuntimeModelError49(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
16117
16292
  }
16118
16293
  if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
16119
16294
  ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -16162,7 +16337,7 @@ var DataViewControlController = class extends MDControlController {
16162
16337
  const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
16163
16338
  if (enableGroup && groupMode) {
16164
16339
  if (!groupAppDEFieldId) {
16165
- throw new RuntimeModelError48(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
16340
+ throw new RuntimeModelError49(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
16166
16341
  }
16167
16342
  if (groupMode === "AUTO") {
16168
16343
  this.handleAutoGroup();
@@ -16229,7 +16404,7 @@ var DataViewControlController = class extends MDControlController {
16229
16404
  async handleCodeListGroup() {
16230
16405
  const { groupAppDEFieldId, groupCodeListId } = this.model;
16231
16406
  if (!groupCodeListId) {
16232
- throw new RuntimeModelError48(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
16407
+ throw new RuntimeModelError49(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
16233
16408
  }
16234
16409
  const { items } = this.state;
16235
16410
  const groupMap = /* @__PURE__ */ new Map();
@@ -16336,7 +16511,7 @@ var DataViewControlController = class extends MDControlController {
16336
16511
  caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
16337
16512
  }
16338
16513
  if (!item.appDEFieldId) {
16339
- throw new RuntimeModelError48(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
16514
+ throw new RuntimeModelError49(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
16340
16515
  }
16341
16516
  const tempItem = {
16342
16517
  caption,
@@ -16354,10 +16529,10 @@ var DataViewControlController = class extends MDControlController {
16354
16529
  };
16355
16530
 
16356
16531
  // src/controller/control/exp-bar/calendar-exp-bar.controller.ts
16357
- import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
16532
+ import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
16358
16533
 
16359
16534
  // src/controller/control/exp-bar/exp-bar.controller.ts
16360
- import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
16535
+ import { RuntimeError as RuntimeError44, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
16361
16536
  var ExpBarControlController = class extends ControlController {
16362
16537
  constructor() {
16363
16538
  super(...arguments);
@@ -16412,7 +16587,7 @@ var ExpBarControlController = class extends ControlController {
16412
16587
  get xDataController() {
16413
16588
  const controller = this.view.getController(this.model.xdataControlName);
16414
16589
  if (!controller) {
16415
- throw new RuntimeModelError49(
16590
+ throw new RuntimeModelError50(
16416
16591
  this.model,
16417
16592
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
16418
16593
  );
@@ -16683,7 +16858,7 @@ var ExpBarControlController = class extends ControlController {
16683
16858
  if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
16684
16859
  return this.XDataModel.navAppViewId;
16685
16860
  }
16686
- throw new RuntimeError43("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
16861
+ throw new RuntimeError44("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
16687
16862
  }
16688
16863
  /**
16689
16864
  * 获取导航视图
@@ -16771,7 +16946,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
16771
16946
  get xDataController() {
16772
16947
  const controller = this.view.getController(this.model.xdataControlName);
16773
16948
  if (!controller) {
16774
- throw new RuntimeModelError50(
16949
+ throw new RuntimeModelError51(
16775
16950
  this.model,
16776
16951
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
16777
16952
  );
@@ -16826,7 +17001,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
16826
17001
  };
16827
17002
 
16828
17003
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
16829
- import { RuntimeError as RuntimeError44, RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
17004
+ import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
16830
17005
  var TreeExpBarController = class extends ExpBarControlController {
16831
17006
  constructor() {
16832
17007
  super(...arguments);
@@ -16849,7 +17024,7 @@ var TreeExpBarController = class extends ExpBarControlController {
16849
17024
  get xDataController() {
16850
17025
  const controller = this.view.getController(this.model.xdataControlName);
16851
17026
  if (!controller) {
16852
- throw new RuntimeModelError51(
17027
+ throw new RuntimeModelError52(
16853
17028
  this.model,
16854
17029
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
16855
17030
  );
@@ -16901,7 +17076,7 @@ var TreeExpBarController = class extends ExpBarControlController {
16901
17076
  const deData = node.deData || node;
16902
17077
  const nodeModel = this.getNodeModel(node.nodeId);
16903
17078
  if (!nodeModel) {
16904
- throw new RuntimeError44("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
17079
+ throw new RuntimeError45("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
16905
17080
  }
16906
17081
  const result = this.prepareParams(nodeModel, deData, context, params);
16907
17082
  result.context.currentSrfNav = nodeId;
@@ -17295,6 +17470,7 @@ var SearchFormService = class extends ControlService {
17295
17470
  var SearchFormController = class extends FormController {
17296
17471
  async onCreated() {
17297
17472
  await super.onCreated();
17473
+ this.preprocessLayoutPanel();
17298
17474
  this.service = new SearchFormService(this.model);
17299
17475
  await this.service.init(this.context);
17300
17476
  await this.load();
@@ -17404,6 +17580,57 @@ var SearchFormController = class extends FormController {
17404
17580
  await this.onSearchButtonClick();
17405
17581
  }
17406
17582
  }
17583
+ /**
17584
+ * 根据搜索表单的按钮位置和按钮样式
17585
+ * 预处理部件布局面板模型
17586
+ * @author lxm
17587
+ * @date 2023-11-21 04:17:43
17588
+ * @protected
17589
+ * @return {*}
17590
+ */
17591
+ preprocessLayoutPanel() {
17592
+ if (!this.controlPanel) {
17593
+ return;
17594
+ }
17595
+ const { searchButtonStyle } = this.model;
17596
+ let deleteRight = false;
17597
+ let deleteBottom = false;
17598
+ const searchButtonPos = this.model.searchButtonPos || "RIGHT";
17599
+ deleteRight = searchButtonPos === "BOTTOM";
17600
+ deleteBottom = searchButtonPos !== "BOTTOM";
17601
+ if (searchButtonStyle === "NONE") {
17602
+ deleteRight = true;
17603
+ deleteBottom = true;
17604
+ }
17605
+ const recursivePanelItems = (parent) => {
17606
+ let children;
17607
+ let childrenKey = "";
17608
+ ["rootPanelItems", "panelItems"].find((key) => {
17609
+ if (parent[key]) {
17610
+ children = parent[key];
17611
+ childrenKey = key;
17612
+ return true;
17613
+ }
17614
+ return false;
17615
+ });
17616
+ if (children && children.length > 0) {
17617
+ const newArr = [];
17618
+ children.forEach((item) => {
17619
+ const isDelete = deleteRight && item.id === "control_buttons_right" || deleteBottom && item.id === "control_buttons_bottom";
17620
+ if (!isDelete) {
17621
+ newArr.push(item);
17622
+ recursivePanelItems(item);
17623
+ }
17624
+ });
17625
+ if (newArr.length < children.length) {
17626
+ parent[childrenKey] = newArr;
17627
+ }
17628
+ }
17629
+ };
17630
+ if (deleteBottom || deleteRight) {
17631
+ recursivePanelItems(this.controlPanel);
17632
+ }
17633
+ }
17407
17634
  };
17408
17635
 
17409
17636
  // src/controller/control/form/form-detail/form-detail/form-detail.state.ts
@@ -18582,10 +18809,10 @@ var FormMDCtrlContentTypeController = class {
18582
18809
  };
18583
18810
 
18584
18811
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts
18585
- import { clone as clone19 } from "ramda";
18812
+ import { clone as clone20 } from "ramda";
18586
18813
 
18587
18814
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
18588
- import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
18815
+ import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
18589
18816
  var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
18590
18817
  /**
18591
18818
  * 初始化
@@ -18600,7 +18827,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
18600
18827
  const { model } = this.parent;
18601
18828
  const { contentControl } = model;
18602
18829
  if (!contentControl) {
18603
- throw new RuntimeError45("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
18830
+ throw new RuntimeError46("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
18604
18831
  }
18605
18832
  this.controlModel = contentControl;
18606
18833
  const controlProvider = await getControlProvider(this.controlModel);
@@ -18718,17 +18945,17 @@ import { isArray as isArray10 } from "lodash-es";
18718
18945
  import {
18719
18946
  awaitTimeout,
18720
18947
  mergeInLeft,
18721
- RuntimeError as RuntimeError46,
18948
+ RuntimeError as RuntimeError47,
18722
18949
  mergeDefaultInLeft as mergeDefaultInLeft2
18723
18950
  } from "@ibiz-template/core";
18724
18951
  import { debounce as debounce2 } from "lodash-es";
18725
18952
  import { createUUID as createUUID8 } from "qx-util";
18726
- import { clone as clone18 } from "ramda";
18953
+ import { clone as clone19 } from "ramda";
18727
18954
 
18728
18955
  // src/controller/control/form/edit-form/edit-form.service.ts
18729
18956
  import {
18730
18957
  recursiveIterate as recursiveIterate4,
18731
- RuntimeModelError as RuntimeModelError52
18958
+ RuntimeModelError as RuntimeModelError53
18732
18959
  } from "@ibiz-template/core";
18733
18960
  var EditFormService = class extends ControlService {
18734
18961
  /**
@@ -18846,7 +19073,7 @@ var EditFormService = class extends ControlService {
18846
19073
  const wizardForm = this.model;
18847
19074
  const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
18848
19075
  if (!methodName) {
18849
- throw new RuntimeModelError52(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
19076
+ throw new RuntimeModelError53(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
18850
19077
  }
18851
19078
  let res = await this.exec(
18852
19079
  methodName,
@@ -19070,8 +19297,8 @@ var EditFormController = class extends FormController {
19070
19297
  * @return {*} {Promise<IData>}
19071
19298
  */
19072
19299
  async copy() {
19073
- const context = clone18(this.context);
19074
- const queryParams = clone18(this.params);
19300
+ const context = clone19(this.context);
19301
+ const queryParams = clone19(this.params);
19075
19302
  const appDataEntity = await ibiz.hub.getAppDataEntity(
19076
19303
  this.model.appDataEntityId
19077
19304
  );
@@ -19127,7 +19354,7 @@ var EditFormController = class extends FormController {
19127
19354
  return this.loadDraft();
19128
19355
  }
19129
19356
  const { context, params } = this.handlerAbilityParams(args);
19130
- const queryParams = clone18(params);
19357
+ const queryParams = clone19(params);
19131
19358
  let res;
19132
19359
  try {
19133
19360
  await this.startLoading();
@@ -19164,7 +19391,7 @@ var EditFormController = class extends FormController {
19164
19391
  }
19165
19392
  const isValid = await this.validate();
19166
19393
  if (!isValid) {
19167
- throw new RuntimeError46("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
19394
+ throw new RuntimeError47("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
19168
19395
  }
19169
19396
  if (!silent) {
19170
19397
  await this.startLoading();
@@ -19290,7 +19517,7 @@ var EditFormController = class extends FormController {
19290
19517
  (item) => item.id === formItemUpdateId
19291
19518
  );
19292
19519
  if (!formItemUpdate) {
19293
- throw new RuntimeError46("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
19520
+ throw new RuntimeError47("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
19294
19521
  }
19295
19522
  const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
19296
19523
  const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
@@ -19334,7 +19561,7 @@ var EditFormController = class extends FormController {
19334
19561
  async wfStart(args) {
19335
19562
  const isValid = await this.validate();
19336
19563
  if (!isValid) {
19337
- throw new RuntimeError46("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
19564
+ throw new RuntimeError47("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
19338
19565
  }
19339
19566
  await this.startLoading();
19340
19567
  const { context, params } = this.handlerAbilityParams(args);
@@ -19365,7 +19592,7 @@ var EditFormController = class extends FormController {
19365
19592
  async wfSubmit(args) {
19366
19593
  const isValid = await this.validate();
19367
19594
  if (!isValid) {
19368
- throw new RuntimeError46("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
19595
+ throw new RuntimeError47("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
19369
19596
  }
19370
19597
  await this.startLoading();
19371
19598
  const { context, params } = this.handlerAbilityParams(args);
@@ -19597,7 +19824,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
19597
19824
  };
19598
19825
 
19599
19826
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
19600
- import { RuntimeError as RuntimeError47, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
19827
+ import { RuntimeError as RuntimeError48, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
19601
19828
  var FormMDCtrlGridController = class extends FormMDCtrlControlController {
19602
19829
  constructor() {
19603
19830
  super(...arguments);
@@ -19709,7 +19936,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
19709
19936
  const { model } = this.parent;
19710
19937
  const { contentControl } = model;
19711
19938
  if (!contentControl) {
19712
- throw new RuntimeError47("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
19939
+ throw new RuntimeError48("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
19713
19940
  }
19714
19941
  mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
19715
19942
  this.controlModel = contentControl;
@@ -20132,7 +20359,7 @@ var FormMDCtrlController = class extends FormDetailController {
20132
20359
  setFormDataValue() {
20133
20360
  const name = this.model.appDEFieldId || this.model.fieldName || this.model.id;
20134
20361
  if (name) {
20135
- this.form.setDataValue(name, clone19(this.state.contentCtrlData));
20362
+ this.form.setDataValue(name, clone20(this.state.contentCtrlData));
20136
20363
  }
20137
20364
  }
20138
20365
  /**
@@ -20200,10 +20427,10 @@ var FormMDCtrlController = class extends FormDetailController {
20200
20427
  };
20201
20428
 
20202
20429
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-item.controller.ts
20203
- import { clone as clone20 } from "ramda";
20430
+ import { clone as clone21 } from "ramda";
20204
20431
  var FormMDCtrlItemController = class extends EditFormController {
20205
20432
  constructor(model, context, params, ctx, data, form) {
20206
- const tempModel = clone20(form.model);
20433
+ const tempModel = clone21(form.model);
20207
20434
  Object.assign(tempModel, model, { name: void 0 });
20208
20435
  super(tempModel, context, params, ctx);
20209
20436
  this.state.data = data;
@@ -20503,10 +20730,10 @@ import {
20503
20730
  debounceAndAsyncMerge as debounceAndAsyncMerge2,
20504
20731
  mergeDefaultInLeft as mergeDefaultInLeft3,
20505
20732
  recursiveIterate as recursiveIterate5,
20506
- RuntimeError as RuntimeError48,
20507
- RuntimeModelError as RuntimeModelError53
20733
+ RuntimeError as RuntimeError49,
20734
+ RuntimeModelError as RuntimeModelError54
20508
20735
  } from "@ibiz-template/core";
20509
- import { clone as clone21 } from "ramda";
20736
+ import { clone as clone22 } from "ramda";
20510
20737
 
20511
20738
  // src/controller/control/grid/grid/grid.service.ts
20512
20739
  var GridService = class extends MDControlService {
@@ -20710,11 +20937,11 @@ var GridController = class extends MDControlController {
20710
20937
  (item) => item.model.appDEFieldId === groupAppDEFieldId
20711
20938
  );
20712
20939
  if (!this.groupFieldColumn) {
20713
- throw new RuntimeModelError53(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
20940
+ throw new RuntimeModelError54(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
20714
20941
  }
20715
20942
  const groupFieldName = this.groupFieldColumn.model.id;
20716
20943
  if (!this.groupFieldColumn.model.appCodeListId) {
20717
- throw new RuntimeModelError53(
20944
+ throw new RuntimeModelError54(
20718
20945
  this.groupFieldColumn.model,
20719
20946
  "\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
20720
20947
  );
@@ -20724,7 +20951,7 @@ var GridController = class extends MDControlController {
20724
20951
  );
20725
20952
  if (index !== -1 && index !== 0) {
20726
20953
  if (this.isMultistageHeader) {
20727
- throw new RuntimeModelError53(
20954
+ throw new RuntimeModelError54(
20728
20955
  this.model,
20729
20956
  "\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
20730
20957
  );
@@ -20734,10 +20961,10 @@ var GridController = class extends MDControlController {
20734
20961
  }
20735
20962
  if (groupMode === "CODELIST") {
20736
20963
  if (!groupCodeListId) {
20737
- throw new RuntimeModelError53(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
20964
+ throw new RuntimeModelError54(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
20738
20965
  }
20739
20966
  if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
20740
- throw new RuntimeModelError53(
20967
+ throw new RuntimeModelError54(
20741
20968
  this.model,
20742
20969
  "\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
20743
20970
  );
@@ -20819,7 +21046,7 @@ var GridController = class extends MDControlController {
20819
21046
  return;
20820
21047
  }
20821
21048
  if (!aggAppDEDataSetId || !aggAppDataEntityId) {
20822
- throw new RuntimeModelError53(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
21049
+ throw new RuntimeModelError54(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
20823
21050
  }
20824
21051
  const params = await this.getFetchParams();
20825
21052
  const app = ibiz.hub.getApp(this.context.srfappid);
@@ -20887,7 +21114,7 @@ var GridController = class extends MDControlController {
20887
21114
  if (editShowMode === "row") {
20888
21115
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
20889
21116
  if (editingRow) {
20890
- throw new RuntimeError48("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
21117
+ throw new RuntimeError49("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
20891
21118
  }
20892
21119
  }
20893
21120
  const queryParams = { ...this.params };
@@ -20928,7 +21155,7 @@ var GridController = class extends MDControlController {
20928
21155
  const isCreate = data.srfuf === 0 /* CREATE */;
20929
21156
  const rowState = this.findRowState(data);
20930
21157
  if (!rowState) {
20931
- throw new RuntimeError48("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
21158
+ throw new RuntimeError49("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
20932
21159
  }
20933
21160
  if (!rowState.modified) {
20934
21161
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -20940,7 +21167,7 @@ var GridController = class extends MDControlController {
20940
21167
  }
20941
21168
  const isValid = await this.validate(rowState);
20942
21169
  if (!isValid) {
20943
- throw new RuntimeError48("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
21170
+ throw new RuntimeError49("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
20944
21171
  }
20945
21172
  let res;
20946
21173
  const deName = calcDeCodeNameById(this.model.appDataEntityId);
@@ -21137,7 +21364,7 @@ var GridController = class extends MDControlController {
21137
21364
  }
21138
21365
  async toggleRowEdit() {
21139
21366
  if (!this.model.enableRowNew) {
21140
- throw new RuntimeError48("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
21367
+ throw new RuntimeError49("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
21141
21368
  }
21142
21369
  this.state.rowEditOpen = !this.state.rowEditOpen;
21143
21370
  }
@@ -21170,10 +21397,10 @@ var GridController = class extends MDControlController {
21170
21397
  } else {
21171
21398
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
21172
21399
  if (editingRow) {
21173
- throw new RuntimeError48("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
21400
+ throw new RuntimeError49("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
21174
21401
  }
21175
21402
  if (row.data.srfuf === 1 /* UPDATE */) {
21176
- row.cacheData = clone21(row.data);
21403
+ row.cacheData = clone22(row.data);
21177
21404
  const defaultVal = this.calcDefaultValue(row.data, false);
21178
21405
  Object.assign(row.data, defaultVal);
21179
21406
  }
@@ -21220,7 +21447,7 @@ var GridController = class extends MDControlController {
21220
21447
  (item) => item.id === updateId
21221
21448
  );
21222
21449
  if (!findUpdate) {
21223
- throw new RuntimeError48("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
21450
+ throw new RuntimeError49("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
21224
21451
  }
21225
21452
  const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
21226
21453
  const updateItems = degeiupdateDetails.map((item) => item.id);
@@ -21274,6 +21501,30 @@ var GridController = class extends MDControlController {
21274
21501
  }
21275
21502
  return res.data;
21276
21503
  }
21504
+ /**
21505
+ * 初始化数据导出列
21506
+ * @return {*}
21507
+ * @author: zhujiamin
21508
+ * @Date: 2023-11-21 18:54:16
21509
+ */
21510
+ async findAllExportColumns(dataExport) {
21511
+ var _a;
21512
+ const app = ibiz.hub.getApp(this.context.srfappid);
21513
+ const exportColumnsPromises = (_a = dataExport.dedataExportItems) == null ? void 0 : _a.map(async (item) => {
21514
+ const tempExportColumn = { ...item };
21515
+ if (item.codeListId) {
21516
+ tempExportColumn.codeList = app.codeList.getCodeList(item.codeListId);
21517
+ tempExportColumn.codeListItems = await app.codeList.get(
21518
+ item.codeListId
21519
+ );
21520
+ }
21521
+ return tempExportColumn;
21522
+ });
21523
+ if (exportColumnsPromises) {
21524
+ return Promise.all(exportColumnsPromises);
21525
+ }
21526
+ return void 0;
21527
+ }
21277
21528
  /**
21278
21529
  * 数据导出
21279
21530
  *
@@ -21282,18 +21533,57 @@ var GridController = class extends MDControlController {
21282
21533
  * @memberof MDControlController
21283
21534
  */
21284
21535
  async exportData(_args) {
21285
- const items = this.fieldColumns;
21536
+ var _a;
21537
+ if (this.model.dedataExportId && !this.dataExport) {
21538
+ this.dataExport = (_a = this.dataEntity.appDEDataExports) == null ? void 0 : _a.find((dataExport) => {
21539
+ return dataExport.id === this.model.dedataExportId;
21540
+ });
21541
+ if (this.dataExport) {
21542
+ this.allExportColumns = await this.findAllExportColumns(
21543
+ this.dataExport
21544
+ );
21545
+ }
21546
+ }
21286
21547
  const formatExcelData = (data2) => {
21287
- const cloneData = clone21(
21548
+ var _a2;
21549
+ const codeListMap = /* @__PURE__ */ new Map();
21550
+ if (this.allExportColumns && this.allExportColumns.length > 0) {
21551
+ (_a2 = this.allExportColumns) == null ? void 0 : _a2.forEach((exportColumn) => {
21552
+ if (exportColumn.codeListItems) {
21553
+ codeListMap.set(
21554
+ exportColumn.appDEFieldId,
21555
+ exportColumn.codeListItems
21556
+ );
21557
+ }
21558
+ });
21559
+ } else {
21560
+ Object.keys(this.fieldColumns).forEach((key) => {
21561
+ if (this.fieldColumns[key].codeList) {
21562
+ codeListMap.set(key, this.fieldColumns[key].codeListItems);
21563
+ }
21564
+ });
21565
+ }
21566
+ const cloneData = clone22(
21288
21567
  data2.map((item) => {
21289
21568
  return item.getOrigin();
21290
21569
  })
21291
21570
  );
21571
+ cloneData.forEach((item) => {
21572
+ const fields = Object.keys(item);
21573
+ fields.forEach((key) => {
21574
+ var _a3;
21575
+ if (codeListMap.get(key)) {
21576
+ item[key] = ((_a3 = codeListMap.get(key).find((_item) => {
21577
+ return _item.value === item[key];
21578
+ })) == null ? void 0 : _a3.text) || item[key];
21579
+ }
21580
+ });
21581
+ });
21292
21582
  return cloneData;
21293
21583
  };
21294
21584
  const getExportData = async () => {
21295
- var _a;
21296
- const type = (_a = _args.params) == null ? void 0 : _a.type;
21585
+ var _a2;
21586
+ const type = (_a2 = _args.params) == null ? void 0 : _a2.type;
21297
21587
  let data2 = [];
21298
21588
  if (type === "activatedPage") {
21299
21589
  data2 = this.state.rows.map((row) => row.data);
@@ -21312,7 +21602,7 @@ var GridController = class extends MDControlController {
21312
21602
  data2 = this.getData();
21313
21603
  }
21314
21604
  if (data2.length === 0) {
21315
- throw new RuntimeError48("\u65E0\u5BFC\u51FA\u6570\u636E");
21605
+ throw new RuntimeError49("\u65E0\u5BFC\u51FA\u6570\u636E");
21316
21606
  }
21317
21607
  return formatExcelData(data2);
21318
21608
  };
@@ -21323,12 +21613,23 @@ var GridController = class extends MDControlController {
21323
21613
  });
21324
21614
  });
21325
21615
  };
21326
- const filterVal = Object.keys(items).map(
21327
- (key) => items[key].model.id
21328
- );
21329
- const header = Object.keys(items).map(
21330
- (key) => items[key].model.caption
21331
- );
21616
+ let filterVal = [];
21617
+ let header = [];
21618
+ if (this.allExportColumns && this.allExportColumns.length > 0) {
21619
+ filterVal = this.allExportColumns.map(
21620
+ (column) => column.appDEFieldId
21621
+ );
21622
+ header = this.allExportColumns.map(
21623
+ (column) => column.caption
21624
+ );
21625
+ } else {
21626
+ filterVal = Object.keys(this.fieldColumns).map(
21627
+ (key) => this.fieldColumns[key].model.id
21628
+ );
21629
+ header = Object.keys(this.fieldColumns).map(
21630
+ (key) => this.fieldColumns[key].model.caption
21631
+ );
21632
+ }
21332
21633
  const data = formatArrayData(filterVal, await getExportData());
21333
21634
  await exportData(header, data, this.model.logicName);
21334
21635
  }
@@ -21393,7 +21694,7 @@ var GridController = class extends MDControlController {
21393
21694
  import { DataTypes as DataTypes3, ModelError as ModelError26, plus as plus2 } from "@ibiz-template/core";
21394
21695
  import dayjs4 from "dayjs";
21395
21696
  import { debounce as debounce3 } from "lodash-es";
21396
- import { clone as clone22, isNil as isNil22 } from "ramda";
21697
+ import { clone as clone23, isNil as isNil22 } from "ramda";
21397
21698
  var GridFieldColumnController = class extends GridColumnController {
21398
21699
  constructor() {
21399
21700
  super(...arguments);
@@ -21497,7 +21798,7 @@ var GridFieldColumnController = class extends GridColumnController {
21497
21798
  srfkey: value,
21498
21799
  ...wfContext
21499
21800
  });
21500
- const tempParams = clone22(this.params);
21801
+ const tempParams = clone23(this.params);
21501
21802
  const { context: newContext, params: newParams } = this.handlePublicParams(
21502
21803
  row.data,
21503
21804
  tempContext,
@@ -21639,7 +21940,7 @@ var GridFieldColumnController = class extends GridColumnController {
21639
21940
  };
21640
21941
 
21641
21942
  // src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
21642
- import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
21943
+ import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
21643
21944
  var GridUAColumnController = class extends GridColumnController {
21644
21945
  /**
21645
21946
  * 给rowController初始化操作列的状态
@@ -21652,7 +21953,7 @@ var GridUAColumnController = class extends GridColumnController {
21652
21953
  var _a;
21653
21954
  const { deuiactionGroup } = this.model;
21654
21955
  if (!deuiactionGroup) {
21655
- throw new RuntimeModelError54(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
21956
+ throw new RuntimeModelError55(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
21656
21957
  }
21657
21958
  if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
21658
21959
  ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -21693,7 +21994,7 @@ var GridUAColumnController = class extends GridColumnController {
21693
21994
  };
21694
21995
 
21695
21996
  // src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
21696
- import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
21997
+ import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
21697
21998
  import Schema2 from "async-validator";
21698
21999
  import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
21699
22000
  var GridFieldEditColumnController = class extends GridFieldColumnController {
@@ -21830,7 +22131,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
21830
22131
  if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
21831
22132
  const result = await this.validate(row);
21832
22133
  if (!result) {
21833
- throw new RuntimeError49(
22134
+ throw new RuntimeError50(
21834
22135
  "".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
21835
22136
  );
21836
22137
  }
@@ -22188,10 +22489,10 @@ var ListController = class extends MDControlController {
22188
22489
  };
22189
22490
 
22190
22491
  // src/controller/control/panel/panel/panel.controller.ts
22191
- import { recursiveIterate as recursiveIterate6, RuntimeError as RuntimeError50 } from "@ibiz-template/core";
22492
+ import { recursiveIterate as recursiveIterate6, RuntimeError as RuntimeError51 } from "@ibiz-template/core";
22192
22493
  var PanelController = class extends ControlController {
22193
- constructor() {
22194
- super(...arguments);
22494
+ constructor(model, context, params, ctx, container) {
22495
+ super(model, context, params, ctx);
22195
22496
  /**
22196
22497
  * 所有面板成员的控制器
22197
22498
  *
@@ -22208,6 +22509,7 @@ var PanelController = class extends ControlController {
22208
22509
  * @type {{ [key: string]: IPanelItemProvider | IControlProvider}}
22209
22510
  */
22210
22511
  this.providers = {};
22512
+ this.container = container;
22211
22513
  }
22212
22514
  get _evt() {
22213
22515
  return this.evt;
@@ -22311,7 +22613,7 @@ var PanelController = class extends ControlController {
22311
22613
  var _a, _b;
22312
22614
  const data = await this.prepareData();
22313
22615
  if (!data) {
22314
- throw new RuntimeError50("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
22616
+ throw new RuntimeError51("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
22315
22617
  }
22316
22618
  const panelData = this.convertData(data);
22317
22619
  (_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
@@ -22910,7 +23212,7 @@ import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
22910
23212
  import { isNil as isNil23 } from "ramda";
22911
23213
 
22912
23214
  // src/controller/control/search-bar/search-bar-filter.controller.ts
22913
- import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
23215
+ import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
22914
23216
  var SearchBarFilterController = class {
22915
23217
  constructor(model, searchBar) {
22916
23218
  this.model = model;
@@ -22938,7 +23240,7 @@ var SearchBarFilterController = class {
22938
23240
  */
22939
23241
  async init() {
22940
23242
  if (!this.model.editor) {
22941
- throw new RuntimeModelError55(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
23243
+ throw new RuntimeModelError56(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
22942
23244
  }
22943
23245
  this.editorProvider = await getEditorProvider(this.model.editor);
22944
23246
  if (this.editorProvider) {
@@ -23968,7 +24270,7 @@ var TreeController = class extends MDControlController {
23968
24270
  };
23969
24271
 
23970
24272
  // src/controller/control/wizard-panel/wizard-panel.controller.ts
23971
- import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
24273
+ import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
23972
24274
 
23973
24275
  // src/controller/control/wizard-panel/wizard-panel.service.ts
23974
24276
  var WizardPanelService = class extends ControlService {
@@ -24127,7 +24429,7 @@ var WizardPanelController = class extends ControlController {
24127
24429
  const { activeFormTag } = this.state;
24128
24430
  const controller = this.formControllers.get(activeFormTag);
24129
24431
  if (!controller) {
24130
- throw new RuntimeError51("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
24432
+ throw new RuntimeError52("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
24131
24433
  }
24132
24434
  return controller;
24133
24435
  }
@@ -24167,7 +24469,7 @@ var WizardPanelController = class extends ControlController {
24167
24469
  getWizardFormByTag(tag) {
24168
24470
  var _a;
24169
24471
  if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
24170
- throw new RuntimeError51("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
24472
+ throw new RuntimeError52("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
24171
24473
  return;
24172
24474
  }
24173
24475
  const wizardForm = this.model.dewizard.dewizardForms.find(
@@ -24176,7 +24478,7 @@ var WizardPanelController = class extends ControlController {
24176
24478
  }
24177
24479
  );
24178
24480
  if (!wizardForm) {
24179
- throw new RuntimeError51("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
24481
+ throw new RuntimeError52("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
24180
24482
  }
24181
24483
  return wizardForm;
24182
24484
  }
@@ -24243,7 +24545,7 @@ var WizardPanelController = class extends ControlController {
24243
24545
  this.tagHistory.pop();
24244
24546
  }
24245
24547
  if (!prevTag) {
24246
- throw new RuntimeError51("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
24548
+ throw new RuntimeError52("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
24247
24549
  }
24248
24550
  this.state.activeFormTag = prevTag;
24249
24551
  }
@@ -24279,7 +24581,7 @@ var WizardPanelController = class extends ControlController {
24279
24581
  });
24280
24582
  const nextWizardStep = wizardSteps[index + 1];
24281
24583
  if (!nextWizardStep) {
24282
- throw new RuntimeError51("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
24584
+ throw new RuntimeError52("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
24283
24585
  }
24284
24586
  const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
24285
24587
  if (nextWizardForm && nextWizardForm.formTag) {
@@ -24288,7 +24590,7 @@ var WizardPanelController = class extends ControlController {
24288
24590
  }
24289
24591
  }
24290
24592
  if (!nextTag) {
24291
- throw new RuntimeError51("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
24593
+ throw new RuntimeError52("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
24292
24594
  }
24293
24595
  this.state.activeFormTag = nextTag;
24294
24596
  this.tagHistory.push(nextTag);
@@ -24307,7 +24609,7 @@ var WizardPanelController = class extends ControlController {
24307
24609
  };
24308
24610
 
24309
24611
  // src/controller/control/md-ctrl/md-ctrl.controller.ts
24310
- import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
24612
+ import { RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
24311
24613
  import { isNil as isNil24 } from "ramda";
24312
24614
 
24313
24615
  // src/controller/control/md-ctrl/md-ctrl.service.ts
@@ -24530,7 +24832,7 @@ var MDCtrlController = class extends MDControlController {
24530
24832
  const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
24531
24833
  if (enableGroup && groupMode) {
24532
24834
  if (!groupAppDEFieldId) {
24533
- throw new RuntimeModelError56(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
24835
+ throw new RuntimeModelError57(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
24534
24836
  }
24535
24837
  if (groupMode === "AUTO") {
24536
24838
  this.handleAutoGroup();
@@ -24597,7 +24899,7 @@ var MDCtrlController = class extends MDControlController {
24597
24899
  async handleCodeListGroup() {
24598
24900
  const { groupAppDEFieldId, groupCodeListId } = this.model;
24599
24901
  if (!groupCodeListId) {
24600
- throw new RuntimeModelError56(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
24902
+ throw new RuntimeModelError57(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
24601
24903
  }
24602
24904
  const { items } = this.state;
24603
24905
  const groupMap = /* @__PURE__ */ new Map();
@@ -24627,7 +24929,7 @@ var MDCtrlController = class extends MDControlController {
24627
24929
  };
24628
24930
 
24629
24931
  // src/controller/control/kanban/kanban.controller.ts
24630
- import { RuntimeError as RuntimeError52, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
24932
+ import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
24631
24933
  import { isNil as isNil25 } from "ramda";
24632
24934
 
24633
24935
  // src/controller/control/kanban/kanban.service.ts
@@ -24702,10 +25004,10 @@ var KanbanController = class extends DataViewControlController {
24702
25004
  const sortField = this.model.minorSortAppDEFieldId;
24703
25005
  const { minorSortDir } = this.model;
24704
25006
  if (!sortField) {
24705
- throw new RuntimeModelError57(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
25007
+ throw new RuntimeModelError58(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
24706
25008
  }
24707
25009
  if (!minorSortDir) {
24708
- throw new RuntimeModelError57(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
25010
+ throw new RuntimeModelError58(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
24709
25011
  }
24710
25012
  const isAsc = minorSortDir === "ASC";
24711
25013
  items.forEach((item) => {
@@ -24715,7 +25017,7 @@ var KanbanController = class extends DataViewControlController {
24715
25017
  } else {
24716
25018
  const toNum = Number(sortValue);
24717
25019
  if (Number.isNaN(toNum)) {
24718
- throw new RuntimeError52(
25020
+ throw new RuntimeError53(
24719
25021
  "".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
24720
25022
  );
24721
25023
  }
@@ -24731,7 +25033,7 @@ var KanbanController = class extends DataViewControlController {
24731
25033
  }
24732
25034
  handleDataGroup() {
24733
25035
  if (!this.model.enableGroup || this.model.groupMode === "NONE") {
24734
- throw new RuntimeError52("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
25036
+ throw new RuntimeError53("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
24735
25037
  }
24736
25038
  return super.handleDataGroup();
24737
25039
  }
@@ -25225,7 +25527,7 @@ var TreeGridService = class extends GridService {
25225
25527
  };
25226
25528
 
25227
25529
  // src/controller/control/medit-view-panel/medit-view-panel.controller.ts
25228
- import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
25530
+ import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
25229
25531
  import { createUUID as createUUID9 } from "qx-util";
25230
25532
 
25231
25533
  // src/controller/control/medit-view-panel/medit-view-panel.service.ts
@@ -25440,7 +25742,7 @@ var MEditViewPanelController = class extends MDControlController {
25440
25742
  (item) => item.id === id
25441
25743
  );
25442
25744
  if (panelUiItemIndex < 0) {
25443
- throw new RuntimeError53("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
25745
+ throw new RuntimeError54("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
25444
25746
  }
25445
25747
  const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
25446
25748
  if (tempUiItem.id.startsWith("mockId:")) {
@@ -25855,7 +26157,7 @@ var AppHub = class {
25855
26157
  this.registerAppView(appView);
25856
26158
  return appView;
25857
26159
  }
25858
- throw new RuntimeError54("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
26160
+ throw new RuntimeError55("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
25859
26161
  }
25860
26162
  /**
25861
26163
  * 根据应用实体代码名称查找应用视图
@@ -25886,7 +26188,7 @@ var AppHub = class {
25886
26188
  this.registerAppDataEntity(entity, appId);
25887
26189
  return entity;
25888
26190
  }
25889
- throw new RuntimeError54("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
26191
+ throw new RuntimeError55("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
25890
26192
  }
25891
26193
  /**
25892
26194
  * 新建 hub 应用
@@ -25907,7 +26209,7 @@ var AppHub = class {
25907
26209
  appModel = await this.modelLoaderProvider.getApp(id);
25908
26210
  this.registerApp(appModel);
25909
26211
  } else {
25910
- throw new RuntimeError54("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
26212
+ throw new RuntimeError55("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
25911
26213
  }
25912
26214
  const app = new Application(appModel);
25913
26215
  this.appMap.set(id, app);
@@ -25927,7 +26229,7 @@ var AppHub = class {
25927
26229
  * @author chitanda
25928
26230
  * @date 2023-04-17 21:04:41
25929
26231
  * @param {string} [key=ibiz.env.appId]
25930
- * @return {*} {Promise<Application>}
26232
+ * @return {*} {Promise<IAppService>}
25931
26233
  */
25932
26234
  async getAppAsync(key = ibiz.env.appId) {
25933
26235
  return this.createApp(key);
@@ -25938,7 +26240,7 @@ var AppHub = class {
25938
26240
  * @author chitanda
25939
26241
  * @date 2023-04-17 22:04:42
25940
26242
  * @param {(string | IApplication)} [app]
25941
- * @return {*} {Application}
26243
+ * @return {*} {IAppService}
25942
26244
  */
25943
26245
  getApp(app) {
25944
26246
  let key = null;
@@ -26005,7 +26307,7 @@ var EngineFactory = class {
26005
26307
  };
26006
26308
 
26007
26309
  // src/engine/view-base.engine.ts
26008
- import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
26310
+ import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
26009
26311
  var ViewEngineBase = class {
26010
26312
  /**
26011
26313
  * 构造函数在视图控制器的构造函数逻辑内部执行
@@ -26193,7 +26495,7 @@ var ViewEngineBase = class {
26193
26495
  const { appDataEntityId } = this.view.model;
26194
26496
  const { evt, context, params } = this.view;
26195
26497
  if (!appDataEntityId) {
26196
- throw new RuntimeError55("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
26498
+ throw new RuntimeError56("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
26197
26499
  }
26198
26500
  const app = ibiz.hub.getApp(context.srfappid);
26199
26501
  const res = await app.deService.exec(
@@ -26214,8 +26516,8 @@ var ViewEngineBase = class {
26214
26516
  };
26215
26517
 
26216
26518
  // src/engine/md-view.engine.ts
26217
- import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
26218
- import { clone as clone23 } from "ramda";
26519
+ import { RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
26520
+ import { clone as clone24 } from "ramda";
26219
26521
  var MDViewEngine = class extends ViewEngineBase {
26220
26522
  /**
26221
26523
  * 多数据部件名称
@@ -26353,6 +26655,14 @@ var MDViewEngine = class extends ViewEngineBase {
26353
26655
  await this.exportData(args);
26354
26656
  return null;
26355
26657
  }
26658
+ if (key === "Search" /* SEARCH */) {
26659
+ await this.searchForm.search();
26660
+ return null;
26661
+ }
26662
+ if (key === "Reset" /* RESET */) {
26663
+ await this.searchForm.reset();
26664
+ return null;
26665
+ }
26356
26666
  if (key === "Copy" /* COPY */) {
26357
26667
  this.copy(args);
26358
26668
  return null;
@@ -26390,7 +26700,7 @@ var MDViewEngine = class extends ViewEngineBase {
26390
26700
  view: this.view
26391
26701
  }));
26392
26702
  if (result === -1) {
26393
- throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
26703
+ throw new RuntimeModelError59(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
26394
26704
  } else {
26395
26705
  return {
26396
26706
  cancel: !result.ok
@@ -26413,9 +26723,9 @@ var MDViewEngine = class extends ViewEngineBase {
26413
26723
  (item) => item.id === "newdata"
26414
26724
  );
26415
26725
  if (!openAppViewLogic) {
26416
- throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
26726
+ throw new RuntimeModelError59(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
26417
26727
  }
26418
- const params = clone23(this.view.params);
26728
+ const params = clone24(this.view.params);
26419
26729
  if (copyMode) {
26420
26730
  params.srfcopymode = copyMode;
26421
26731
  }
@@ -26427,7 +26737,7 @@ var MDViewEngine = class extends ViewEngineBase {
26427
26737
  view: this.view
26428
26738
  }));
26429
26739
  if (result === -1) {
26430
- throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
26740
+ throw new RuntimeModelError59(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
26431
26741
  } else {
26432
26742
  return {
26433
26743
  cancel: !result.ok
@@ -26546,15 +26856,15 @@ var MDViewEngine = class extends ViewEngineBase {
26546
26856
 
26547
26857
  // src/utils/error-handler/default-error-handler.ts
26548
26858
  import {
26549
- RuntimeModelError as RuntimeModelError59,
26859
+ RuntimeModelError as RuntimeModelError60,
26550
26860
  ModelError as ModelError28,
26551
26861
  HttpError as HttpError4,
26552
26862
  NoticeError as NoticeError2,
26553
- RuntimeError as RuntimeError56
26863
+ RuntimeError as RuntimeError57
26554
26864
  } from "@ibiz-template/core";
26555
26865
  var DefaultErrorHandler = class {
26556
26866
  handle(error) {
26557
- if (error instanceof RuntimeModelError59 || error instanceof ModelError28) {
26867
+ if (error instanceof RuntimeModelError60 || error instanceof ModelError28) {
26558
26868
  ibiz.message.error(error.message, 10, true);
26559
26869
  } else if (error instanceof HttpError4) {
26560
26870
  if (error.status === 401) {
@@ -26568,7 +26878,7 @@ var DefaultErrorHandler = class {
26568
26878
  }
26569
26879
  } else if (error instanceof NoticeError2) {
26570
26880
  ibiz.message.error(error.message, error.duration, error.duration === 0);
26571
- } else if (error instanceof RuntimeError56) {
26881
+ } else if (error instanceof RuntimeError57) {
26572
26882
  ibiz.message.error(error.message, 10, true);
26573
26883
  }
26574
26884
  ibiz.log.error(error);
@@ -26696,7 +27006,7 @@ var GlobalUtil = class {
26696
27006
  };
26697
27007
 
26698
27008
  // src/logic-scheduler/executor/logic-executor.ts
26699
- import { RuntimeError as RuntimeError57 } from "@ibiz-template/core";
27009
+ import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
26700
27010
  var LogicExecutor = class {
26701
27011
  /**
26702
27012
  * @author lxm
@@ -26717,7 +27027,7 @@ var LogicExecutor = class {
26717
27027
  */
26718
27028
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
26719
27029
  execute(_executeParams) {
26720
- throw new RuntimeError57("Method not implemented.");
27030
+ throw new RuntimeError58("Method not implemented.");
26721
27031
  }
26722
27032
  /**
26723
27033
  * 销毁方法
@@ -26808,13 +27118,13 @@ var ScriptExecutor = class extends LogicExecutor {
26808
27118
  };
26809
27119
 
26810
27120
  // src/logic-scheduler/executor/app-de-ui-logic-executor.ts
26811
- import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
27121
+ import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
26812
27122
  var AppDEUILogicExecutor = class extends LogicExecutor {
26813
27123
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
26814
27124
  execute(executeParams) {
26815
27125
  const { appDEUILogicId, appDataEntityId } = this.logic;
26816
27126
  if (!appDEUILogicId) {
26817
- throw new RuntimeModelError60(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
27127
+ throw new RuntimeModelError61(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
26818
27128
  }
26819
27129
  execUILogic(appDEUILogicId, appDataEntityId, executeParams);
26820
27130
  }
@@ -27154,7 +27464,7 @@ var LogicSchedulerCenter = class {
27154
27464
  };
27155
27465
 
27156
27466
  // src/logic-scheduler/trigger/logic-trigger.ts
27157
- import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
27467
+ import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
27158
27468
  var LogicTrigger = class {
27159
27469
  /**
27160
27470
  * @author lxm
@@ -27214,7 +27524,7 @@ var LogicTrigger = class {
27214
27524
  if (this.executor) {
27215
27525
  return this.executor.execute(executeParams);
27216
27526
  }
27217
- throw new RuntimeError58("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
27527
+ throw new RuntimeError59("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
27218
27528
  }
27219
27529
  /**
27220
27530
  * 销毁方法
@@ -27231,12 +27541,12 @@ var CustomTrigger = class extends LogicTrigger {
27231
27541
  };
27232
27542
 
27233
27543
  // src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
27234
- import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
27544
+ import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
27235
27545
  var ItemDynaLogicTrigger = class extends LogicTrigger {
27236
27546
  bindExecutor(executor) {
27237
27547
  super.bindExecutor(executor);
27238
27548
  if (this.executor.type !== "SCRIPT") {
27239
- throw new RuntimeError59(
27549
+ throw new RuntimeError60(
27240
27550
  "\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
27241
27551
  );
27242
27552
  }
@@ -27272,7 +27582,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
27272
27582
  };
27273
27583
 
27274
27584
  // src/logic-scheduler/trigger/timer-trigger.ts
27275
- import { RuntimeError as RuntimeError60, RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
27585
+ import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
27276
27586
  var TimerTrigger = class extends LogicTrigger {
27277
27587
  constructor() {
27278
27588
  super(...arguments);
@@ -27280,11 +27590,11 @@ var TimerTrigger = class extends LogicTrigger {
27280
27590
  }
27281
27591
  start() {
27282
27592
  if (!this.logic.timer) {
27283
- throw new RuntimeModelError61(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
27593
+ throw new RuntimeModelError62(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
27284
27594
  }
27285
27595
  this.timer = setInterval(() => {
27286
27596
  if (!this.scheduler.defaultParamsCb) {
27287
- throw new RuntimeError60("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
27597
+ throw new RuntimeError61("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
27288
27598
  }
27289
27599
  const params = this.scheduler.defaultParamsCb();
27290
27600
  this.executor.execute(params);
@@ -27301,8 +27611,8 @@ var TimerTrigger = class extends LogicTrigger {
27301
27611
  // src/logic-scheduler/executor/app-ui-logic-executor.ts
27302
27612
  import {
27303
27613
  ModelError as ModelError31,
27304
- RuntimeError as RuntimeError61,
27305
- RuntimeModelError as RuntimeModelError62
27614
+ RuntimeError as RuntimeError62,
27615
+ RuntimeModelError as RuntimeModelError63
27306
27616
  } from "@ibiz-template/core";
27307
27617
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
27308
27618
  var AppUILogicExecutor = class extends LogicExecutor {
@@ -27334,7 +27644,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27334
27644
  const { context, params, ...rest } = parameters;
27335
27645
  const { data } = parameters;
27336
27646
  if (!(data == null ? void 0 : data[0])) {
27337
- throw new RuntimeError61("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
27647
+ throw new RuntimeError62("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
27338
27648
  }
27339
27649
  const openViewRefs = appUILogic.openDataAppViews;
27340
27650
  let openViewRef;
@@ -27343,7 +27653,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27343
27653
  } else {
27344
27654
  openViewRef = appUILogic.openDataAppView;
27345
27655
  if (!openViewRef) {
27346
- throw new RuntimeModelError62(
27656
+ throw new RuntimeModelError63(
27347
27657
  appUILogic,
27348
27658
  "opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
27349
27659
  );
@@ -27351,7 +27661,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27351
27661
  }
27352
27662
  const openView = openViewRef.refAppViewId;
27353
27663
  if (!openView) {
27354
- throw new RuntimeModelError62(
27664
+ throw new RuntimeModelError63(
27355
27665
  appUILogic,
27356
27666
  "opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
27357
27667
  );
@@ -27380,7 +27690,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27380
27690
  );
27381
27691
  const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
27382
27692
  if (!typeFileName) {
27383
- throw new RuntimeModelError62(
27693
+ throw new RuntimeModelError63(
27384
27694
  appUILogic,
27385
27695
  "".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
27386
27696
  );
@@ -27388,12 +27698,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
27388
27698
  const { data } = parameters;
27389
27699
  const formTypeValue = data[0][typeFileName];
27390
27700
  if (!formTypeValue) {
27391
- throw new RuntimeModelError62(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
27701
+ throw new RuntimeModelError63(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
27392
27702
  }
27393
27703
  const openViewRefs = appUILogic.openDataAppViews;
27394
27704
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
27395
27705
  if (!findView) {
27396
- throw new RuntimeError61(
27706
+ throw new RuntimeError62(
27397
27707
  "\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
27398
27708
  );
27399
27709
  }
@@ -27430,7 +27740,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27430
27740
  return viewRef.refMode.toLowerCase() !== parentDeName;
27431
27741
  });
27432
27742
  if (!newViewRef) {
27433
- throw new RuntimeModelError62(
27743
+ throw new RuntimeModelError63(
27434
27744
  appUILogic,
27435
27745
  "\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
27436
27746
  );
@@ -27440,7 +27750,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27440
27750
  } else {
27441
27751
  newViewRef = newDataAppView;
27442
27752
  if (!newViewRef || !newViewRef.refAppViewId) {
27443
- throw new RuntimeModelError62(
27753
+ throw new RuntimeModelError63(
27444
27754
  appUILogic,
27445
27755
  "newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
27446
27756
  );
@@ -27497,7 +27807,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27497
27807
  const { wizardAppView, newDataAppViews } = appUILogic;
27498
27808
  const { context, params, ...rest } = parameters;
27499
27809
  if (!wizardAppView || !wizardAppView.refAppViewId) {
27500
- throw new RuntimeModelError62(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
27810
+ throw new RuntimeModelError63(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
27501
27811
  }
27502
27812
  const result = await ibiz.commands.execute(
27503
27813
  OpenAppViewCommand.TAG,
@@ -27511,12 +27821,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
27511
27821
  }
27512
27822
  const selectData = (_a = result.data) == null ? void 0 : _a[0];
27513
27823
  if (!selectData) {
27514
- throw new RuntimeError61("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
27824
+ throw new RuntimeError62("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
27515
27825
  }
27516
27826
  const indexType = selectData.srfkey;
27517
27827
  const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
27518
27828
  if (!findView) {
27519
- throw new RuntimeError61(
27829
+ throw new RuntimeError62(
27520
27830
  "\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
27521
27831
  );
27522
27832
  }
@@ -27543,7 +27853,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27543
27853
  const minorDERs = selfDe.minorAppDERSs;
27544
27854
  const pickParentDeName = newViewRef.refMode.toLowerCase();
27545
27855
  if (!minorDERs) {
27546
- throw new RuntimeModelError62(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
27856
+ throw new RuntimeModelError63(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
27547
27857
  }
27548
27858
  let pickParentFieldName;
27549
27859
  minorDERs == null ? void 0 : minorDERs.forEach((item) => {
@@ -27642,12 +27952,12 @@ var ControlEventTrigger = class extends LogicTrigger {
27642
27952
  };
27643
27953
 
27644
27954
  // src/logic-scheduler/executor/app-ui-action-executor.ts
27645
- import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
27955
+ import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
27646
27956
  var AppDEUIActionExecutor = class extends LogicExecutor {
27647
27957
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27648
27958
  execute(executeParams) {
27649
27959
  if (!this.logic.appDEUIActionId) {
27650
- throw new RuntimeModelError63(
27960
+ throw new RuntimeModelError64(
27651
27961
  this.logic,
27652
27962
  "\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
27653
27963
  );