@ibiz-template/runtime 0.7.26-alpha.2 → 0.7.26

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 (62) hide show
  1. package/dist/index.esm.js +720 -370
  2. package/dist/index.system.min.js +1 -1
  3. package/out/app-hub.d.ts +1 -0
  4. package/out/app-hub.d.ts.map +1 -1
  5. package/out/app-hub.js +5 -0
  6. package/out/controller/control/chart/generator/chart-options-generator.d.ts +39 -0
  7. package/out/controller/control/chart/generator/chart-options-generator.d.ts.map +1 -1
  8. package/out/controller/control/chart/generator/chart-options-generator.js +217 -174
  9. package/out/controller/control/chart/generator/radar-series-generator.d.ts.map +1 -1
  10. package/out/controller/control/chart/generator/radar-series-generator.js +5 -2
  11. package/out/controller/control/dashboard/custom-dashboard.controller.d.ts +1 -8
  12. package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
  13. package/out/controller/control/dashboard/custom-dashboard.controller.js +1 -9
  14. package/out/controller/control/dashboard/dashboard.controller.d.ts +25 -0
  15. package/out/controller/control/dashboard/dashboard.controller.d.ts.map +1 -1
  16. package/out/controller/control/dashboard/dashboard.controller.js +52 -0
  17. package/out/controller/control/grid/grid/entity-schema.d.ts.map +1 -1
  18. package/out/controller/control/grid/grid/entity-schema.js +1 -0
  19. package/out/controller/control/grid/grid/grid.controller.d.ts +15 -2
  20. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  21. package/out/controller/control/grid/grid/grid.controller.js +32 -2
  22. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
  23. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +2 -1
  24. package/out/controller/control/report-panel/generator/base-generator.d.ts +4 -4
  25. package/out/controller/control/report-panel/generator/base-generator.d.ts.map +1 -1
  26. package/out/controller/control/report-panel/generator/base-generator.js +4 -5
  27. package/out/controller/control/report-panel/generator/bi-generator.d.ts +14 -4
  28. package/out/controller/control/report-panel/generator/bi-generator.d.ts.map +1 -1
  29. package/out/controller/control/report-panel/generator/bi-generator.js +66 -16
  30. package/out/controller/control/report-panel/generator/user-generator.d.ts +2 -2
  31. package/out/controller/control/report-panel/generator/user-generator.d.ts.map +1 -1
  32. package/out/controller/control/report-panel/generator/user-generator.js +2 -2
  33. package/out/controller/control/report-panel/report-panel.controller.d.ts.map +1 -1
  34. package/out/controller/control/report-panel/report-panel.controller.js +3 -0
  35. package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
  36. package/out/controller/control/toolbar/toolbar.controllerr.js +7 -0
  37. package/out/global/global-util/global-util.d.ts +8 -1
  38. package/out/global/global-util/global-util.d.ts.map +1 -1
  39. package/out/global/global-util/global-util.js +8 -1
  40. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +10 -0
  41. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  42. package/out/interface/controller/controller/control/i-report-panel.controller.d.ts +8 -0
  43. package/out/interface/controller/controller/control/i-report-panel.controller.d.ts.map +1 -1
  44. package/out/interface/controller/state/control/i-grid.state.d.ts +7 -0
  45. package/out/interface/controller/state/control/i-grid.state.d.ts.map +1 -1
  46. package/out/interface/provider/model-loader.provider.d.ts +10 -0
  47. package/out/interface/provider/model-loader.provider.d.ts.map +1 -1
  48. package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
  49. package/out/service/vo/tree-node-data/tree-data-set-node-data.js +2 -1
  50. package/out/ui-action/provider/front-ui-action-provider.js +1 -1
  51. package/out/utils/bi-report-util/bi-report-util.d.ts +59 -0
  52. package/out/utils/bi-report-util/bi-report-util.d.ts.map +1 -0
  53. package/out/utils/bi-report-util/bi-report-util.js +108 -0
  54. package/out/utils/bi-report-util/index.d.ts +2 -0
  55. package/out/utils/bi-report-util/index.d.ts.map +1 -0
  56. package/out/utils/bi-report-util/index.js +1 -0
  57. package/out/utils/index.d.ts +1 -0
  58. package/out/utils/index.d.ts.map +1 -1
  59. package/out/utils/index.js +1 -0
  60. package/out/utils/script/script-factory.d.ts.map +1 -1
  61. package/out/utils/script/script-factory.js +1 -1
  62. package/package.json +5 -5
package/dist/index.esm.js CHANGED
@@ -80,7 +80,7 @@ var RegisterCenter = class {
80
80
  };
81
81
 
82
82
  // src/command/app/app-func/app-func.ts
83
- import { ModelError as ModelError16, RuntimeError as RuntimeError26 } from "@ibiz-template/core";
83
+ import { ModelError as ModelError16, RuntimeError as RuntimeError27 } from "@ibiz-template/core";
84
84
 
85
85
  // src/utils/error-handler/default-error-handler.ts
86
86
  import {
@@ -1829,7 +1829,7 @@ var ScriptFactory = class {
1829
1829
  * @param {IScriptFunctionOpts} options 选项
1830
1830
  * @return {*}
1831
1831
  */
1832
- static execScriptFn(args, scriptCode, options = {}) {
1832
+ static execScriptFn(args, scriptCode, options) {
1833
1833
  return this.createScriptFn(Object.keys(args), scriptCode, options).exec(
1834
1834
  args
1835
1835
  );
@@ -11463,10 +11463,11 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
11463
11463
  });
11464
11464
  }
11465
11465
  calcIcon(model) {
11466
- const icon = super.calcIcon(model) || {};
11466
+ let icon = super.calcIcon(model) || {};
11467
11467
  const { iconAppDEFieldId, detreeNodeDataItems } = model;
11468
11468
  if (iconAppDEFieldId && this._deData[iconAppDEFieldId]) {
11469
11469
  const value = this._deData[iconAppDEFieldId];
11470
+ icon = {};
11470
11471
  if (value.indexOf("fa-") !== -1) {
11471
11472
  icon.cssClass = value;
11472
11473
  } else {
@@ -13091,8 +13092,8 @@ var baseStyle = {
13091
13092
  position: "fixed",
13092
13093
  zIndex: "10000"
13093
13094
  };
13094
- function cloneElement(clone37, teleport = document.body, isRemoveChild = true) {
13095
- const element = getAnimationElement(clone37);
13095
+ function cloneElement(clone41, teleport = document.body, isRemoveChild = true) {
13096
+ const element = getAnimationElement(clone41);
13096
13097
  if (element == null) {
13097
13098
  throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
13098
13099
  }
@@ -13511,11 +13512,11 @@ function arrayContains(arr, val) {
13511
13512
  });
13512
13513
  }
13513
13514
  function cloneObject(o) {
13514
- var clone37 = {};
13515
+ var clone41 = {};
13515
13516
  for (var p in o) {
13516
- clone37[p] = o[p];
13517
+ clone41[p] = o[p];
13517
13518
  }
13518
- return clone37;
13519
+ return clone41;
13519
13520
  }
13520
13521
  function replaceObjectProps(o1, o2) {
13521
13522
  var o = cloneObject(o1);
@@ -15076,6 +15077,122 @@ var ShortCutUtil = class {
15076
15077
  }
15077
15078
  };
15078
15079
 
15080
+ // src/utils/bi-report-util/bi-report-util.ts
15081
+ import { clone as clone18 } from "ramda";
15082
+ import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
15083
+ var BIReportUtil = class {
15084
+ /**
15085
+ * 打开设计界面
15086
+ *
15087
+ * @author tony001
15088
+ * @date 2024-06-30 11:06:21
15089
+ * @param {IContext} context
15090
+ * @param {IParams} params
15091
+ * @param {IData} data
15092
+ * @return {*} {Promise<IModalData>}
15093
+ */
15094
+ async openDesignPage(context, params, data) {
15095
+ if (!data.mode)
15096
+ data.mode = "DATA";
15097
+ const tempContext = clone18(context);
15098
+ let config = {};
15099
+ if (data.mode === "DATA") {
15100
+ const app = ibiz.hub.getApp(ibiz.env.appId);
15101
+ try {
15102
+ Object.assign(tempContext, { pssysbireport: data.reportId });
15103
+ const res = await app.deService.exec(
15104
+ "pssysbireport",
15105
+ "get",
15106
+ tempContext,
15107
+ params
15108
+ );
15109
+ if (res.data) {
15110
+ config = this.translateReportToConfig(res.data);
15111
+ }
15112
+ } catch (error) {
15113
+ throw new RuntimeError25(error.message);
15114
+ }
15115
+ } else if (data.mode === "UI") {
15116
+ config = data.reportPanel.generator.config;
15117
+ }
15118
+ const modal = ibiz.overlay.createModal(
15119
+ "iBizBIReportDesign",
15120
+ {
15121
+ dismiss: (_data) => modal.dismiss(_data),
15122
+ context: tempContext,
15123
+ viewParams: params,
15124
+ config
15125
+ },
15126
+ {
15127
+ width: "90%",
15128
+ height: "90%",
15129
+ footerHide: true
15130
+ }
15131
+ );
15132
+ modal.present();
15133
+ const result = await modal.onWillDismiss();
15134
+ return result;
15135
+ }
15136
+ /**
15137
+ * 报表数据转化配置数据
15138
+ *
15139
+ * @author tony001
15140
+ * @date 2024-06-30 11:06:00
15141
+ * @private
15142
+ * @param {IData} data
15143
+ * @return {*} {IData}
15144
+ */
15145
+ translateReportToConfig(data) {
15146
+ const config = {};
15147
+ let biReportUIModel = {};
15148
+ if (data.bireportuimodel) {
15149
+ biReportUIModel = JSON.parse(data.bireportuimodel);
15150
+ }
15151
+ config.selectChartType = (biReportUIModel == null ? void 0 : biReportUIModel.selectChartType) || "NUMBER";
15152
+ config.reportTag = "bi_report";
15153
+ config.selectCubeId = data.pssysbicubeid;
15154
+ const biReportItems = {};
15155
+ if (data.pssysbireportitems && data.pssysbireportitems.length > 0) {
15156
+ data.pssysbireportitems.forEach((item) => {
15157
+ var _a, _b;
15158
+ if (item.birepitemtype === "MEASURE") {
15159
+ if (!biReportItems.measure) {
15160
+ biReportItems.measure = [];
15161
+ }
15162
+ biReportItems.measure.push({
15163
+ pssysbischemeid: item.pssysbischemeid,
15164
+ pssysbicubemeasureid: item.pssysbicubemeasureid,
15165
+ pssysbicubeid: item.pssysbicubeid,
15166
+ codename: (_a = item.pssysbicubemeasureid) == null ? void 0 : _a.split(".").pop()
15167
+ });
15168
+ }
15169
+ if (item.birepitemtype === "DIMENSION") {
15170
+ if (!biReportItems.dimension) {
15171
+ biReportItems.dimension = [];
15172
+ }
15173
+ biReportItems.dimension.push({
15174
+ pssysbischemeid: item.pssysbischemeid,
15175
+ pssysbicubedimensionid: item.pssysbicubedimensionid,
15176
+ pssysbicubeid: item.pssysbicubeid,
15177
+ codename: (_b = item.pssysbicubedimensionid) == null ? void 0 : _b.split(".").pop()
15178
+ });
15179
+ }
15180
+ });
15181
+ }
15182
+ const propertyData = {
15183
+ caption: data.pssysbireportname
15184
+ };
15185
+ if (Object.keys(biReportItems).length > 0) {
15186
+ Object.assign(propertyData, { data: biReportItems });
15187
+ }
15188
+ if (biReportUIModel.style) {
15189
+ Object.assign(propertyData, { style: biReportUIModel.style });
15190
+ }
15191
+ config.propertyData = propertyData;
15192
+ return config;
15193
+ }
15194
+ };
15195
+
15079
15196
  // src/utils/dr-ctrl-util/index.ts
15080
15197
  function calcItemVisibleByCounter(item, counter) {
15081
15198
  const { enableMode, counterId } = item;
@@ -15133,8 +15250,8 @@ async function calcItemVisible(item, context, params, appDeId, appId2, data) {
15133
15250
  }
15134
15251
 
15135
15252
  // src/command/app/open-app-view/open-app-view.ts
15136
- import { ModelError as ModelError15, RuntimeError as RuntimeError25 } from "@ibiz-template/core";
15137
- import { clone as clone18 } from "ramda";
15253
+ import { ModelError as ModelError15, RuntimeError as RuntimeError26 } from "@ibiz-template/core";
15254
+ import { clone as clone19 } from "ramda";
15138
15255
  var _OpenAppViewCommand = class _OpenAppViewCommand {
15139
15256
  constructor() {
15140
15257
  ibiz.commands.register(_OpenAppViewCommand.TAG, this.exec.bind(this));
@@ -15151,13 +15268,13 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
15151
15268
  * @return {*} {(Promise<IModalData | void>)}
15152
15269
  */
15153
15270
  async exec(appViewId, _context, params = {}, opts = {}) {
15154
- const context = clone18(_context);
15271
+ const context = clone19(_context);
15155
15272
  if (context.srfsimple) {
15156
15273
  delete context.srfsimple;
15157
15274
  }
15158
15275
  const appView = await ibiz.hub.config.view.get(appViewId);
15159
15276
  if (!appView) {
15160
- throw new RuntimeError25(
15277
+ throw new RuntimeError26(
15161
15278
  ibiz.i18n.t("runtime.command.app.noFindApplicationView", {
15162
15279
  appViewId
15163
15280
  })
@@ -15280,7 +15397,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
15280
15397
  async openPopover(appView, context, params = {}, opts = {}) {
15281
15398
  const { event, modalOption } = opts;
15282
15399
  if (!event) {
15283
- throw new RuntimeError25(ibiz.i18n.t("runtime.command.app.missingEvent"));
15400
+ throw new RuntimeError26(ibiz.i18n.t("runtime.command.app.missingEvent"));
15284
15401
  }
15285
15402
  return ibiz.openView.popover(appView.id, event, context, params, {
15286
15403
  ...modalOption
@@ -15338,7 +15455,7 @@ var _AppFuncCommand = class _AppFuncCommand {
15338
15455
  const app = await ibiz.hub.getAppAsync(context.srfappid);
15339
15456
  const appFunc = app.getAppFunc(appFuncId);
15340
15457
  if (!appFunc) {
15341
- throw new RuntimeError26(
15458
+ throw new RuntimeError27(
15342
15459
  ibiz.i18n.t("runtime.command.app.noFindApplicationFunction", {
15343
15460
  appFuncId
15344
15461
  })
@@ -15382,7 +15499,7 @@ var _AppFuncCommand = class _AppFuncCommand {
15382
15499
  */
15383
15500
  async openAppView(appFunc, context, params, opts) {
15384
15501
  if (!appFunc.appViewId) {
15385
- throw new RuntimeError26(
15502
+ throw new RuntimeError27(
15386
15503
  ibiz.i18n.t("runtime.command.app.noFindApplicationView", {
15387
15504
  appViewId: appFunc.appViewId
15388
15505
  })
@@ -15420,7 +15537,7 @@ var _AppFuncCommand = class _AppFuncCommand {
15420
15537
  */
15421
15538
  openPdAppFunc(appFunc, context, params) {
15422
15539
  ibiz.log.warn("openPdAppFunc", appFunc, context, params);
15423
- throw new RuntimeError26(ibiz.i18n.t("runtime.common.unrealized"));
15540
+ throw new RuntimeError27(ibiz.i18n.t("runtime.common.unrealized"));
15424
15541
  }
15425
15542
  /**
15426
15543
  * 执行 JavaScript 脚本
@@ -15434,7 +15551,7 @@ var _AppFuncCommand = class _AppFuncCommand {
15434
15551
  */
15435
15552
  executeJavaScript(appFunc, context, params) {
15436
15553
  ibiz.log.warn("executeJavaScript", appFunc, context, params);
15437
- throw new RuntimeError26(ibiz.i18n.t("runtime.common.unrealized"));
15554
+ throw new RuntimeError27(ibiz.i18n.t("runtime.common.unrealized"));
15438
15555
  }
15439
15556
  /**
15440
15557
  * 自定义应用功能
@@ -15448,7 +15565,7 @@ var _AppFuncCommand = class _AppFuncCommand {
15448
15565
  */
15449
15566
  custom(appFunc, context, params) {
15450
15567
  ibiz.log.warn("custom", appFunc, context, params);
15451
- throw new RuntimeError26(ibiz.i18n.t("runtime.common.unrealized"));
15568
+ throw new RuntimeError27(ibiz.i18n.t("runtime.common.unrealized"));
15452
15569
  }
15453
15570
  };
15454
15571
  /**
@@ -15725,7 +15842,7 @@ var Convert = class {
15725
15842
  };
15726
15843
 
15727
15844
  // src/hub/config/app-view-config-service.ts
15728
- import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
15845
+ import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
15729
15846
  var AppViewConfigService = class {
15730
15847
  constructor() {
15731
15848
  /**
@@ -15796,7 +15913,7 @@ var AppViewConfigService = class {
15796
15913
  if (!this.viewConfigs.has(id)) {
15797
15914
  const model = await ibiz.hub.getAppView(id);
15798
15915
  if (!model) {
15799
- throw new RuntimeError27(ibiz.i18n.t("runtime.hub.noExist", { id }));
15916
+ throw new RuntimeError28(ibiz.i18n.t("runtime.hub.noExist", { id }));
15800
15917
  }
15801
15918
  this.set(model.id, {
15802
15919
  id: model.id,
@@ -15866,7 +15983,7 @@ import {
15866
15983
  HttpError as HttpError7,
15867
15984
  IBizContext as IBizContext3,
15868
15985
  Namespace,
15869
- RuntimeError as RuntimeError34
15986
+ RuntimeError as RuntimeError35
15870
15987
  } from "@ibiz-template/core";
15871
15988
  import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ramda";
15872
15989
 
@@ -15874,7 +15991,7 @@ import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ra
15874
15991
  import { NOOP } from "@ibiz-template/core";
15875
15992
 
15876
15993
  // src/controller/utils/counter/counter.ts
15877
- import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
15994
+ import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
15878
15995
  var Counter = class {
15879
15996
  /**
15880
15997
  * Creates an instance of Counter.
@@ -15936,7 +16053,7 @@ var Counter = class {
15936
16053
  return;
15937
16054
  }
15938
16055
  if (this.count === 0) {
15939
- throw new RuntimeError28(
16056
+ throw new RuntimeError29(
15940
16057
  ibiz.i18n.t("runtime.controller.utils.counter.decrement")
15941
16058
  );
15942
16059
  }
@@ -16545,7 +16662,7 @@ function getOriginData(data) {
16545
16662
  }
16546
16663
 
16547
16664
  // src/controller/utils/value-rule/value-rule.ts
16548
- import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
16665
+ import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
16549
16666
  import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
16550
16667
  import { isNil as isNil18 } from "ramda";
16551
16668
  function generateRules(itemVRs, name, valueItemName) {
@@ -16595,7 +16712,7 @@ function generateRules(itemVRs, name, valueItemName) {
16595
16712
  deRule.groupCond
16596
16713
  );
16597
16714
  if (!isPast) {
16598
- callback(new RuntimeError29(infoMessage || deRule.ruleInfo));
16715
+ callback(new RuntimeError30(infoMessage || deRule.ruleInfo));
16599
16716
  }
16600
16717
  return true;
16601
16718
  },
@@ -16668,7 +16785,7 @@ function generateEditorRules(editor) {
16668
16785
  }
16669
16786
 
16670
16787
  // src/controller/utils/value-ex/value-ex.ts
16671
- import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
16788
+ import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
16672
16789
  import { isNil as isNil19, mergeLeft } from "ramda";
16673
16790
  var ValueExUtil = class {
16674
16791
  /**
@@ -16700,7 +16817,7 @@ var ValueExUtil = class {
16700
16817
  const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
16701
16818
  if (["OBJECTS", "OBJECT"].includes(valueType)) {
16702
16819
  if (!objectNameField) {
16703
- throw new RuntimeError30(
16820
+ throw new RuntimeError31(
16704
16821
  ibiz.i18n.t("runtime.controller.utils.valueEx.objectNameField")
16705
16822
  );
16706
16823
  }
@@ -16718,7 +16835,7 @@ var ValueExUtil = class {
16718
16835
  };
16719
16836
 
16720
16837
  // src/controller/utils/value-default/value-default.ts
16721
- import { RuntimeError as RuntimeError31, ModelError as ModelError17 } from "@ibiz-template/core";
16838
+ import { RuntimeError as RuntimeError32, ModelError as ModelError17 } from "@ibiz-template/core";
16722
16839
  import dayjs from "dayjs";
16723
16840
  import { createUUID as createUUID8 } from "qx-util";
16724
16841
  import { isNil as isNil20, isNotNil } from "ramda";
@@ -16759,7 +16876,7 @@ function getDefaultValue(opts, origins) {
16759
16876
  case "SESSION":
16760
16877
  case "APPLICATION":
16761
16878
  if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
16762
- throw new RuntimeError31(
16879
+ throw new RuntimeError32(
16763
16880
  ibiz.i18n.t("runtime.controller.utils.valueDefault.noExist")
16764
16881
  );
16765
16882
  }
@@ -16780,7 +16897,7 @@ function getDefaultValue(opts, origins) {
16780
16897
 
16781
16898
  // src/controller/utils/data-file-util/data-file-util.ts
16782
16899
  import {
16783
- RuntimeError as RuntimeError32,
16900
+ RuntimeError as RuntimeError33,
16784
16901
  selectFile
16785
16902
  } from "@ibiz-template/core";
16786
16903
  import { mergeRight as mergeRight2 } from "ramda";
@@ -16885,13 +17002,13 @@ async function importData2(opts) {
16885
17002
  }
16886
17003
  async function exportData(header, data, fileName) {
16887
17004
  if (!ibiz.util.getExcelUtil) {
16888
- throw new RuntimeError32(
17005
+ throw new RuntimeError33(
16889
17006
  ibiz.i18n.t("runtime.controller.utils.dataFileUtil.noExist")
16890
17007
  );
16891
17008
  }
16892
17009
  const exportExcel = await ibiz.util.getExcelUtil();
16893
17010
  if (!exportExcel) {
16894
- throw new RuntimeError32(
17011
+ throw new RuntimeError33(
16895
17012
  ibiz.i18n.t("runtime.controller.utils.dataFileUtil.loadError")
16896
17013
  );
16897
17014
  }
@@ -16921,7 +17038,7 @@ async function getDataImportModels(opts) {
16921
17038
  (item) => item.id === opts.deDataImportId
16922
17039
  );
16923
17040
  if (!deDataImport) {
16924
- throw new RuntimeError32(
17041
+ throw new RuntimeError33(
16925
17042
  ibiz.i18n.t("runtime.controller.utils.dataFileUtil.importData")
16926
17043
  );
16927
17044
  }
@@ -17118,7 +17235,7 @@ async function getEntitySchema(entityId, context) {
17118
17235
  }
17119
17236
 
17120
17237
  // src/controller/utils/view-msg/view-msg-controller.ts
17121
- import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
17238
+ import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
17122
17239
  import { isNil as isNil21, mergeRight as mergeRight3 } from "ramda";
17123
17240
  var VIEW_MSG_PREFIX = "VIEW_MSG";
17124
17241
  var ViewMsgController = class _ViewMsgController {
@@ -17153,7 +17270,7 @@ var ViewMsgController = class _ViewMsgController {
17153
17270
  (item) => item.id === this.msgGroupId
17154
17271
  );
17155
17272
  if (!msgGroup) {
17156
- throw new RuntimeError33(
17273
+ throw new RuntimeError34(
17157
17274
  ibiz.i18n.t("runtime.controller.utils.viewMsg.message", {
17158
17275
  msgGroupId: this.msgGroupId
17159
17276
  })
@@ -17171,7 +17288,7 @@ var ViewMsgController = class _ViewMsgController {
17171
17288
  }
17172
17289
  });
17173
17290
  if (msgDetailsViewMsgIds.length) {
17174
- throw new RuntimeError33(
17291
+ throw new RuntimeError34(
17175
17292
  ibiz.i18n.t("runtime.controller.utils.viewMsg.noFound", {
17176
17293
  message: msgDetailsViewMsgIds.join(",")
17177
17294
  })
@@ -18059,7 +18176,7 @@ var ViewController = class extends BaseController {
18059
18176
  async callUIAction(key, args) {
18060
18177
  const result = this.call(key, args);
18061
18178
  if (result === void 0) {
18062
- throw new RuntimeError34(
18179
+ throw new RuntimeError35(
18063
18180
  ibiz.i18n.t("runtime.controller.common.view.noSupportBehavior", {
18064
18181
  key
18065
18182
  })
@@ -18548,9 +18665,9 @@ import {
18548
18665
  IBizContext as IBizContext4,
18549
18666
  IBizParams,
18550
18667
  NoticeError as NoticeError2,
18551
- RuntimeError as RuntimeError35
18668
+ RuntimeError as RuntimeError36
18552
18669
  } from "@ibiz-template/core";
18553
- import { clone as clone19, isNil as isNil23 } from "ramda";
18670
+ import { clone as clone20, isNil as isNil23 } from "ramda";
18554
18671
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
18555
18672
  var ControlController = class extends BaseController {
18556
18673
  /**
@@ -18614,7 +18731,7 @@ var ControlController = class extends BaseController {
18614
18731
  "".concat(model.controlType, "_DEFAULT")
18615
18732
  );
18616
18733
  if (panelModel) {
18617
- this.controlPanel = clone19(panelModel);
18734
+ this.controlPanel = clone20(panelModel);
18618
18735
  }
18619
18736
  }
18620
18737
  this.updateContextParams({});
@@ -18975,7 +19092,7 @@ var ControlController = class extends BaseController {
18975
19092
  ibiz.mc.command.remove.send(msg, meta);
18976
19093
  break;
18977
19094
  default:
18978
- throw new RuntimeError35(
19095
+ throw new RuntimeError36(
18979
19096
  ibiz.i18n.t("runtime.controller.common.control.unsupportedType", {
18980
19097
  type
18981
19098
  })
@@ -19016,7 +19133,7 @@ var ControlController = class extends BaseController {
19016
19133
  // src/controller/common/control/md-control.controller.ts
19017
19134
  import {
19018
19135
  isElementSame,
19019
- RuntimeError as RuntimeError36,
19136
+ RuntimeError as RuntimeError37,
19020
19137
  RuntimeModelError as RuntimeModelError26
19021
19138
  } from "@ibiz-template/core";
19022
19139
  import { isNil as isNil24 } from "ramda";
@@ -19289,7 +19406,7 @@ var MDControlController = class extends ControlController {
19289
19406
  async remove(args) {
19290
19407
  const { context, params, data } = this.handlerAbilityParams(args);
19291
19408
  if (!(data == null ? void 0 : data.length)) {
19292
- throw new RuntimeError36(
19409
+ throw new RuntimeError37(
19293
19410
  ibiz.i18n.t("runtime.controller.common.control.uncheckedData")
19294
19411
  );
19295
19412
  }
@@ -19526,7 +19643,7 @@ var MDControlController = class extends ControlController {
19526
19643
  // src/controller/control/app-menu/app-menu.controller.ts
19527
19644
  import {
19528
19645
  findRecursiveChild,
19529
- RuntimeError as RuntimeError37,
19646
+ RuntimeError as RuntimeError38,
19530
19647
  RuntimeModelError as RuntimeModelError27
19531
19648
  } from "@ibiz-template/core";
19532
19649
 
@@ -19782,7 +19899,7 @@ var AppMenuController = class extends ControlController {
19782
19899
  childrenFields: ["appMenuItems"]
19783
19900
  });
19784
19901
  if (!menuItem) {
19785
- throw new RuntimeError37(
19902
+ throw new RuntimeError38(
19786
19903
  ibiz.i18n.t("runtime.controller.control.menu.noFindMenu", { id })
19787
19904
  );
19788
19905
  }
@@ -19917,7 +20034,7 @@ var AppMenuController = class extends ControlController {
19917
20034
  // src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
19918
20035
  import {
19919
20036
  findRecursiveChild as findRecursiveChild2,
19920
- RuntimeError as RuntimeError38,
20037
+ RuntimeError as RuntimeError39,
19921
20038
  RuntimeModelError as RuntimeModelError28
19922
20039
  } from "@ibiz-template/core";
19923
20040
  var AppMenuIconViewController = class extends AppMenuController {
@@ -19927,7 +20044,7 @@ var AppMenuIconViewController = class extends AppMenuController {
19927
20044
  childrenFields: ["appMenuItems"]
19928
20045
  });
19929
20046
  if (!menuItem) {
19930
- throw new RuntimeError38(
20047
+ throw new RuntimeError39(
19931
20048
  ibiz.i18n.t("runtime.controller.control.menu.noFindMenu", { id })
19932
20049
  );
19933
20050
  }
@@ -19958,11 +20075,11 @@ var AppMenuIconViewController = class extends AppMenuController {
19958
20075
 
19959
20076
  // src/controller/control/calendar/calendar.controller.ts
19960
20077
  import dayjs3 from "dayjs";
19961
- import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
20078
+ import { RuntimeError as RuntimeError41, RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
19962
20079
 
19963
20080
  // src/controller/control/calendar/calendar.service.ts
19964
- import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
19965
- import { clone as clone20 } from "ramda";
20081
+ import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
20082
+ import { clone as clone21 } from "ramda";
19966
20083
  var CalendarService = class extends MDControlService {
19967
20084
  /**
19968
20085
  * 执行查询多条数据的方法
@@ -20017,13 +20134,13 @@ var CalendarService = class extends MDControlService {
20017
20134
  setCalendarConfigData(items, index) {
20018
20135
  const { sysCalendarItems } = this.model;
20019
20136
  if (!sysCalendarItems) {
20020
- throw new RuntimeError39(
20137
+ throw new RuntimeError40(
20021
20138
  ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
20022
20139
  );
20023
20140
  }
20024
20141
  const calendarItem = sysCalendarItems[index];
20025
20142
  if (!calendarItem) {
20026
- throw new RuntimeError39(
20143
+ throw new RuntimeError40(
20027
20144
  ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
20028
20145
  );
20029
20146
  }
@@ -20064,7 +20181,7 @@ var CalendarService = class extends MDControlService {
20064
20181
  * @memberof CalendarService
20065
20182
  */
20066
20183
  handleRequestParams(item, params) {
20067
- const tempParams = clone20(params);
20184
+ const tempParams = clone21(params);
20068
20185
  const { srfstartdate, srfenddate } = tempParams;
20069
20186
  Object.assign(tempParams, {
20070
20187
  ["n_".concat(item.beginTimeAppDEFieldId, "_gtandeq")]: srfstartdate,
@@ -20120,7 +20237,7 @@ var CalendarController = class extends MDControlController {
20120
20237
  initCalendarLegends() {
20121
20238
  const { sysCalendarItems } = this.model;
20122
20239
  if (!sysCalendarItems) {
20123
- throw new RuntimeError40(
20240
+ throw new RuntimeError41(
20124
20241
  ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
20125
20242
  );
20126
20243
  }
@@ -20437,12 +20554,12 @@ var CalendarController = class extends MDControlController {
20437
20554
  };
20438
20555
 
20439
20556
  // src/controller/control/chart/chart.controller.ts
20440
- import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
20557
+ import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
20441
20558
 
20442
20559
  // src/controller/control/chart/generator/chart-options-generator.ts
20443
- import { mergeDeepRight as mergeDeepRight3 } from "ramda";
20560
+ import { clone as clone24, mergeDeepRight as mergeDeepRight3 } from "ramda";
20444
20561
  import { isObject as isObject2, isString as isString2 } from "qx-util";
20445
- import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
20562
+ import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
20446
20563
 
20447
20564
  // src/controller/control/chart/generator/line-series-generator.ts
20448
20565
  import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
@@ -20455,7 +20572,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
20455
20572
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
20456
20573
  import weekOfYear from "dayjs/plugin/weekOfYear";
20457
20574
  import isoWeek from "dayjs/plugin/isoWeek";
20458
- import { clone as clone21, isNil as isNil25, mergeDeepRight } from "ramda";
20575
+ import { clone as clone22, isNil as isNil25, mergeDeepRight } from "ramda";
20459
20576
  dayjs4.extend(minMax2);
20460
20577
  dayjs4.extend(isSameOrBefore);
20461
20578
  dayjs4.extend(quarterOfYear);
@@ -20689,7 +20806,7 @@ var BaseSeriesGenerator = class {
20689
20806
  const { codelistId } = catalog2;
20690
20807
  if (codelistId && this.autoCompleteCategory) {
20691
20808
  const codeListItems = this.chartGenerator.codeListMap.get(codelistId);
20692
- tempCodeLists.push(clone21(codeListItems));
20809
+ tempCodeLists.push(clone22(codeListItems));
20693
20810
  }
20694
20811
  });
20695
20812
  for (let i = 0; i < tempCodeLists.length; i++) {
@@ -20855,7 +20972,7 @@ var BaseSeriesGenerator = class {
20855
20972
  dataPreprocess(data) {
20856
20973
  const tempData = [];
20857
20974
  data.forEach((singleData) => {
20858
- tempData.push(clone21(singleData));
20975
+ tempData.push(clone22(singleData));
20859
20976
  });
20860
20977
  const { groupMode } = this.model;
20861
20978
  if (groupMode) {
@@ -21163,7 +21280,7 @@ var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
21163
21280
  };
21164
21281
 
21165
21282
  // src/controller/control/chart/generator/radar-series-generator.ts
21166
- import { mergeDeepRight as mergeDeepRight2 } from "ramda";
21283
+ import { clone as clone23, mergeDeepRight as mergeDeepRight2 } from "ramda";
21167
21284
 
21168
21285
  // src/controller/control/chart/generator/radar-coord-system.ts
21169
21286
  var RadarCoordSystem = class {
@@ -21238,7 +21355,10 @@ var RadarSeriesGenerator = class extends BaseSeriesGenerator {
21238
21355
  * @param {IData[]} data
21239
21356
  */
21240
21357
  calcRadarCoordSystem(data) {
21241
- const groupData = this.calcGroupData(data);
21358
+ const tempItems = data.map((item) => {
21359
+ return clone23(item);
21360
+ });
21361
+ const groupData = this.calcGroupData(tempItems);
21242
21362
  if (!this.chartGenerator.radarMap.has(this.catalogField)) {
21243
21363
  this.chartGenerator.radarMap.set(
21244
21364
  this.catalogField,
@@ -21498,6 +21618,112 @@ var ChartOptionsGenerator2 = class {
21498
21618
  });
21499
21619
  return AxisOption;
21500
21620
  }
21621
+ /**
21622
+ * 处理轴布局位置
21623
+ *
21624
+ * @param {CodeListItem[]} items
21625
+ * @param {number} padding
21626
+ * @param {number} total
21627
+ * @param {number} index
21628
+ * @param {boolean} isRow 是否横向
21629
+ * @return {*}
21630
+ * @memberof ChartOptionsGenerator
21631
+ */
21632
+ handleAxisLayout(items, padding, total, index, isRow = true) {
21633
+ const axisData = items.map((code) => {
21634
+ if (isRow) {
21635
+ return {
21636
+ value: code.text,
21637
+ textStyle: {
21638
+ padding: [0, padding * (total - 1 - index), 0, 0]
21639
+ }
21640
+ };
21641
+ }
21642
+ return {
21643
+ value: code.text,
21644
+ textStyle: {
21645
+ padding: [padding * (total - 1 - index), 0, 0, 0]
21646
+ }
21647
+ };
21648
+ });
21649
+ return axisData;
21650
+ }
21651
+ /**
21652
+ * 处理轴层级
21653
+ *
21654
+ * @param {IData[]} tempaxis
21655
+ * @param {number} index
21656
+ * @param {IData[]} axisData
21657
+ * @return {*}
21658
+ * @memberof ChartOptionsGenerator
21659
+ */
21660
+ handleAxisLevel(tempaxis, index, axisData) {
21661
+ const tempAxisData = [];
21662
+ if (index === 0) {
21663
+ return axisData;
21664
+ }
21665
+ let length = 1;
21666
+ for (let i = 0; i < tempaxis.length; i++) {
21667
+ length *= tempaxis[i].data.length;
21668
+ }
21669
+ for (let i = 0; i < length; i++) {
21670
+ tempAxisData.push(...axisData);
21671
+ }
21672
+ return tempAxisData;
21673
+ }
21674
+ /**
21675
+ * 合并轴参数
21676
+ *
21677
+ * @param {(IData[] | IData)} axisData
21678
+ * @param {IData[]} tempAxis
21679
+ * @return {*}
21680
+ * @memberof ChartOptionsGenerator
21681
+ */
21682
+ mergeAxisData(axisData, tempAxis) {
21683
+ if (axisData && Array.isArray(axisData)) {
21684
+ return [...axisData, ...tempAxis];
21685
+ }
21686
+ return [axisData, ...tempAxis];
21687
+ }
21688
+ /**
21689
+ * 处理分区模式下序列模型的坐标轴位置
21690
+ *
21691
+ * @param {IData[]} seriesModel
21692
+ * @param {IData} opts
21693
+ * @memberof ChartOptionsGenerator
21694
+ */
21695
+ handleSeriesModelCoordinateAxis(seriesModel, opts) {
21696
+ const { xAxisParam, yAxisParam } = opts;
21697
+ const xaxis = [];
21698
+ const yaxis = [];
21699
+ for (let i = 0; i < seriesModel.length; i++) {
21700
+ const tempXAxis = clone24(xAxisParam);
21701
+ const tempYAxis = clone24(yAxisParam);
21702
+ Object.assign(tempXAxis, { gridIndex: i });
21703
+ Object.assign(tempYAxis, { gridIndex: i });
21704
+ tempYAxis.axisLabel.formatter = function(_param) {
21705
+ if (_param === 0) {
21706
+ return "{top|".concat(_param, "}");
21707
+ }
21708
+ return "{bottom|".concat(_param, "}");
21709
+ };
21710
+ if (i !== seriesModel.length - 1) {
21711
+ tempXAxis.name = "";
21712
+ tempXAxis.axisLine.show = false;
21713
+ tempXAxis.axisLabel.show = false;
21714
+ tempXAxis.axisTick.show = false;
21715
+ }
21716
+ if (tempYAxis.showTitle) {
21717
+ Object.assign(tempYAxis, {
21718
+ name: seriesModel[i].serieText
21719
+ });
21720
+ }
21721
+ xaxis.push(tempXAxis);
21722
+ yaxis.push(tempYAxis);
21723
+ }
21724
+ this.chartUserParam.xAxis = xaxis;
21725
+ this.chartUserParam.yAxis = yaxis;
21726
+ }
21501
21727
  /**
21502
21728
  * 初始化多分类的X轴配置
21503
21729
  *
@@ -21505,9 +21731,32 @@ var ChartOptionsGenerator2 = class {
21505
21731
  * @memberof ChartOptionsGenerator
21506
21732
  */
21507
21733
  async initMultiCatalogxAxis(context, params) {
21508
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
21734
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
21509
21735
  const { controlParam } = this.model;
21510
- if (controlParam && ((_a = controlParam.ctrlParams) == null ? void 0 : _a.CATALOGFIELDS)) {
21736
+ if (controlParam && ((_a = controlParam.ctrlParams) == null ? void 0 : _a.ZONE)) {
21737
+ const length = (_b = this.model.dechartSerieses) == null ? void 0 : _b.length;
21738
+ if (length) {
21739
+ const height = 90 / length;
21740
+ const items = [];
21741
+ for (let i = 0; i < length; i++) {
21742
+ const top = i * height + 5;
21743
+ const bottom = 100 - (height + top);
21744
+ items.push({
21745
+ top: "".concat(top, "%"),
21746
+ bottom: "".concat(bottom, "%"),
21747
+ containLabel: true
21748
+ });
21749
+ }
21750
+ if (this.chartUserParam) {
21751
+ this.chartUserParam.grid = items;
21752
+ this.handleSeriesModelCoordinateAxis(this.model.dechartSerieses, {
21753
+ xAxisParam: ((_c = this.chartUserParam) == null ? void 0 : _c.xAxis) || {},
21754
+ yAxisParam: ((_d = this.chartUserParam) == null ? void 0 : _d.yAxis) || {}
21755
+ });
21756
+ }
21757
+ }
21758
+ }
21759
+ if (controlParam && ((_e = controlParam.ctrlParams) == null ? void 0 : _e.CATALOGFIELDS)) {
21511
21760
  try {
21512
21761
  const tempCatalogFields = JSON.parse(
21513
21762
  controlParam.ctrlParams.CATALOGFIELDS
@@ -21518,23 +21767,22 @@ var ChartOptionsGenerator2 = class {
21518
21767
  let gridIndex = 0;
21519
21768
  if (Array.isArray(tempCatalogFields)) {
21520
21769
  const app = ibiz.hub.getApp(context.srfappid);
21521
- if (this.chartUserParam && this.chartUserParam.xAxis) {
21522
- if (((_b = controlParam.ctrlParams) == null ? void 0 : _b.MODE) === "ROW") {
21770
+ if (this.chartUserParam) {
21771
+ let tempconfig = {};
21772
+ if (((_f = controlParam.ctrlParams) == null ? void 0 : _f.MODE) === "ROW") {
21523
21773
  if (Array.isArray(this.chartUserParam.yAxis)) {
21524
- const tempconfig = this.chartUserParam.yAxis[this.chartUserParam.yAxis.length - 1];
21525
- titleshow = tempconfig.name === void 0 ? true : !!tempconfig.name;
21526
- labelshow = ((_c = tempconfig.axisLabel) == null ? void 0 : _c.show) === void 0 ? true : (_d = tempconfig.axisLabel) == null ? void 0 : _d.show;
21774
+ tempconfig = this.chartUserParam.yAxis[this.chartUserParam.yAxis.length - 1];
21527
21775
  } else {
21528
- titleshow = ((_e = this.chartUserParam.yAxis) == null ? void 0 : _e.name) === void 0 ? true : !!this.chartUserParam.yAxis.name;
21529
- labelshow = ((_g = (_f = this.chartUserParam.yAxis) == null ? void 0 : _f.axisLabel) == null ? void 0 : _g.show) === void 0 ? true : (_h = this.chartUserParam.yAxis.axisLabel) == null ? void 0 : _h.show;
21776
+ tempconfig = this.chartUserParam.yAxis;
21530
21777
  }
21531
21778
  } else if (Array.isArray(this.chartUserParam.xAxis)) {
21532
- const tempconfig = this.chartUserParam.xAxis[this.chartUserParam.xAxis.length - 1];
21533
- titleshow = tempconfig.name === void 0 ? true : !!tempconfig.name;
21534
- labelshow = ((_i = tempconfig.axisLabel) == null ? void 0 : _i.show) === void 0 ? true : (_j = tempconfig.axisLabel) == null ? void 0 : _j.show;
21779
+ tempconfig = this.chartUserParam.xAxis[this.chartUserParam.xAxis.length - 1];
21535
21780
  } else {
21536
- titleshow = this.chartUserParam.xAxis.name === void 0 ? true : !!this.chartUserParam.xAxis.name;
21537
- labelshow = ((_k = this.chartUserParam.xAxis.axisLabel) == null ? void 0 : _k.show) === void 0 ? true : (_l = this.chartUserParam.xAxis.axisLabel) == null ? void 0 : _l.show;
21781
+ tempconfig = this.chartUserParam.xAxis;
21782
+ }
21783
+ if (tempconfig) {
21784
+ titleshow = tempconfig.name === void 0 ? true : !!tempconfig.name;
21785
+ labelshow = ((_g = tempconfig.axisLabel) == null ? void 0 : _g.show) === void 0 ? true : (_h = tempconfig.axisLabel) == null ? void 0 : _h.show;
21538
21786
  }
21539
21787
  }
21540
21788
  if (this.chartUserParam && this.chartUserParam.grid && Array.isArray(this.chartUserParam.grid)) {
@@ -21550,78 +21798,45 @@ var ChartOptionsGenerator2 = class {
21550
21798
  params
21551
21799
  );
21552
21800
  if (codeListItems) {
21553
- const tempxAxisData = [];
21554
21801
  if (((_a2 = controlParam.ctrlParams) == null ? void 0 : _a2.MODE) === "ROW") {
21555
- const yAxisData = codeListItems.map((code) => {
21556
- return {
21557
- value: code.text,
21558
- textStyle: {
21559
- padding: [
21560
- 0,
21561
- 40 + 40 * (tempCatalogFields.length - index - 1),
21562
- 0,
21563
- 0
21564
- ]
21565
- }
21566
- };
21802
+ const yAxisData = this.handleAxisLayout(
21803
+ codeListItems,
21804
+ 40,
21805
+ tempCatalogFields.length,
21806
+ index
21807
+ );
21808
+ const tempxAxisData = this.handleAxisLevel(
21809
+ tempaxis,
21810
+ index,
21811
+ yAxisData
21812
+ );
21813
+ tempaxis.push({
21814
+ show: labelshow,
21815
+ gridIndex,
21816
+ type: "category",
21817
+ data: tempxAxisData,
21818
+ position: "left"
21567
21819
  });
21568
- if (index === 0) {
21569
- tempaxis.push({
21570
- show: labelshow,
21571
- gridIndex,
21572
- type: "category",
21573
- data: yAxisData,
21574
- position: "left"
21575
- });
21576
- } else {
21577
- let length = 1;
21578
- for (let i = 0; i < tempaxis.length; i++) {
21579
- length *= tempaxis[i].data.length;
21580
- }
21581
- for (let i = 0; i < length; i++) {
21582
- tempxAxisData.push(...yAxisData);
21583
- }
21584
- tempaxis.push({
21585
- show: labelshow,
21586
- gridIndex,
21587
- type: "category",
21588
- data: tempxAxisData,
21589
- position: "left"
21590
- });
21591
- }
21592
21820
  } else {
21593
- const xAxisData = codeListItems.map((code) => {
21594
- return {
21595
- value: code.text,
21596
- textStyle: {
21597
- lineHeight: 45 * (tempCatalogFields.length - 1 - index)
21598
- }
21599
- };
21821
+ const xAxisData = this.handleAxisLayout(
21822
+ codeListItems,
21823
+ 24,
21824
+ tempCatalogFields.length,
21825
+ index,
21826
+ false
21827
+ );
21828
+ const tempxAxisData = this.handleAxisLevel(
21829
+ tempaxis,
21830
+ index,
21831
+ xAxisData
21832
+ );
21833
+ tempaxis.push({
21834
+ show: labelshow,
21835
+ gridIndex,
21836
+ type: "category",
21837
+ data: tempxAxisData,
21838
+ position: "bottom"
21600
21839
  });
21601
- if (index === 0) {
21602
- tempaxis.push({
21603
- show: labelshow,
21604
- gridIndex,
21605
- type: "category",
21606
- data: xAxisData,
21607
- position: "bottom"
21608
- });
21609
- } else {
21610
- let length = 1;
21611
- for (let i = 0; i < tempaxis.length; i++) {
21612
- length *= tempaxis[i].data.length;
21613
- }
21614
- for (let i = 0; i < length; i++) {
21615
- tempxAxisData.push(...xAxisData);
21616
- }
21617
- tempaxis.push({
21618
- show: labelshow,
21619
- gridIndex,
21620
- type: "category",
21621
- data: tempxAxisData,
21622
- position: "bottom"
21623
- });
21624
- }
21625
21840
  }
21626
21841
  }
21627
21842
  }
@@ -21629,42 +21844,26 @@ var ChartOptionsGenerator2 = class {
21629
21844
  );
21630
21845
  const mergeName = tempCatalogFields.map((catalog) => {
21631
21846
  return catalog.name;
21632
- }).join("/").split("").join("\n");
21633
- if (((_m = controlParam.ctrlParams) == null ? void 0 : _m.MODE) !== "ROW") {
21634
- tempaxis.push({
21635
- type: "category",
21636
- gridIndex,
21637
- show: titleshow,
21638
- data: [
21639
- {
21640
- value: mergeName,
21641
- textStyle: {
21642
- lineHeight: labelshow ? 45 * tempCatalogFields.length : 45
21643
- }
21644
- }
21645
- ],
21646
- position: "bottom"
21647
- });
21847
+ }).join("/");
21848
+ let catalogLength = tempCatalogFields.length;
21849
+ if (!labelshow) {
21850
+ catalogLength = 1;
21851
+ }
21852
+ if (!titleshow) {
21853
+ catalogLength -= 1;
21648
21854
  }
21649
21855
  if (this.chartUserParam) {
21650
- if (((_n = controlParam.ctrlParams) == null ? void 0 : _n.MODE) === "ROW") {
21651
- if (!this.chartUserParam.grid) {
21652
- this.chartUserParam.grid = {};
21653
- }
21654
- let { length } = tempCatalogFields;
21655
- if (!labelshow) {
21656
- length = 1;
21657
- }
21658
- if (!titleshow) {
21659
- length -= 1;
21660
- }
21661
- if (length === 0) {
21856
+ if (!this.chartUserParam.grid) {
21857
+ this.chartUserParam.grid = {};
21858
+ }
21859
+ if (((_i = controlParam.ctrlParams) == null ? void 0 : _i.MODE) === "ROW") {
21860
+ if (catalogLength === 0) {
21662
21861
  Object.assign(this.chartUserParam.grid, {
21663
21862
  bottom: 45
21664
21863
  });
21665
21864
  } else {
21666
21865
  Object.assign(this.chartUserParam.grid, {
21667
- left: (length + 1) * 60
21866
+ left: (catalogLength + 1) * 40
21668
21867
  });
21669
21868
  }
21670
21869
  tempaxis.push({
@@ -21673,56 +21872,50 @@ var ChartOptionsGenerator2 = class {
21673
21872
  show: titleshow,
21674
21873
  data: [
21675
21874
  {
21676
- value: mergeName,
21875
+ value: mergeName.split("").join("\n"),
21677
21876
  textStyle: {
21678
- padding: [0, length * 60, 0, 0]
21877
+ padding: [0, catalogLength * 40, 0, 0]
21679
21878
  }
21680
21879
  }
21681
21880
  ],
21682
21881
  position: "left"
21683
21882
  });
21684
- if (this.chartUserParam.yAxis && Array.isArray(this.chartUserParam.yAxis)) {
21685
- this.chartUserParam.yAxis = [
21686
- ...this.chartUserParam.yAxis,
21687
- ...tempaxis
21688
- ];
21689
- } else if (this.chartUserParam.yAxis) {
21690
- this.chartUserParam.yAxis = [
21883
+ if (this.chartUserParam.yAxis) {
21884
+ this.chartUserParam.yAxis = this.mergeAxisData(
21691
21885
  this.chartUserParam.yAxis,
21692
- ...tempaxis
21693
- ];
21886
+ tempaxis
21887
+ );
21694
21888
  }
21695
21889
  } else {
21696
- if (this.chartUserParam.xAxis && Array.isArray(this.chartUserParam.xAxis)) {
21697
- this.chartUserParam.xAxis = [
21698
- ...this.chartUserParam.xAxis,
21699
- ...tempaxis
21700
- ];
21701
- } else if (this.chartUserParam.xAxis) {
21702
- this.chartUserParam.xAxis = [
21703
- this.chartUserParam.xAxis,
21704
- ...tempaxis
21705
- ];
21706
- }
21707
- if (!this.chartUserParam.grid) {
21708
- this.chartUserParam.grid = {};
21709
- }
21710
- let { length } = tempCatalogFields;
21711
- if (!labelshow) {
21712
- length = 1;
21713
- }
21714
- if (!titleshow) {
21715
- length -= 1;
21716
- }
21717
- if (length === 0) {
21890
+ if (catalogLength === 0) {
21718
21891
  Object.assign(this.chartUserParam.grid, {
21719
- bottom: 45
21892
+ bottom: 30
21720
21893
  });
21721
21894
  } else {
21722
21895
  Object.assign(this.chartUserParam.grid, {
21723
- bottom: (length > 2 ? length - 1 : length) * 45
21896
+ bottom: (catalogLength + 1) * 24
21724
21897
  });
21725
21898
  }
21899
+ tempaxis.push({
21900
+ type: "category",
21901
+ gridIndex,
21902
+ show: titleshow,
21903
+ data: [
21904
+ {
21905
+ value: mergeName,
21906
+ textStyle: {
21907
+ padding: [24 * catalogLength, 0, 0, 0]
21908
+ }
21909
+ }
21910
+ ],
21911
+ position: "bottom"
21912
+ });
21913
+ if (this.chartUserParam.xAxis) {
21914
+ this.chartUserParam.xAxis = this.mergeAxisData(
21915
+ this.chartUserParam.xAxis,
21916
+ tempaxis
21917
+ );
21918
+ }
21726
21919
  }
21727
21920
  }
21728
21921
  }
@@ -21872,7 +22065,7 @@ var ChartOptionsGenerator2 = class {
21872
22065
  getChartDataByParams(params) {
21873
22066
  const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
21874
22067
  if (!generator) {
21875
- throw new RuntimeError41(
22068
+ throw new RuntimeError42(
21876
22069
  ibiz.i18n.t("runtime.controller.control.chart.noFindSequence", {
21877
22070
  seriesIndex: params.seriesIndex
21878
22071
  })
@@ -22156,12 +22349,12 @@ var ChartController = class extends MDControlController {
22156
22349
  */
22157
22350
  updateChart() {
22158
22351
  if (!this.chart) {
22159
- throw new RuntimeError42(
22352
+ throw new RuntimeError43(
22160
22353
  ibiz.i18n.t("runtime.controller.control.chart.noInitialised")
22161
22354
  );
22162
22355
  }
22163
22356
  if (!this.options) {
22164
- throw new RuntimeError42(
22357
+ throw new RuntimeError43(
22165
22358
  ibiz.i18n.t("runtime.controller.control.chart.noCalculated")
22166
22359
  );
22167
22360
  }
@@ -22213,7 +22406,7 @@ var CaptionBarController = class extends ControlController {
22213
22406
  };
22214
22407
 
22215
22408
  // src/controller/control/toolbar/toolbar.controllerr.ts
22216
- import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError51 } from "@ibiz-template/core";
22409
+ import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError52 } from "@ibiz-template/core";
22217
22410
 
22218
22411
  // src/ui-action/provider/backend-ui-action-provider.ts
22219
22412
  import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
@@ -22223,7 +22416,7 @@ import { isArray as isArray8 } from "qx-util";
22223
22416
  import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
22224
22417
 
22225
22418
  // src/ui-logic/index.ts
22226
- import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
22419
+ import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
22227
22420
 
22228
22421
  // src/ui-logic/ui-logic.ts
22229
22422
  import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
@@ -22396,7 +22589,7 @@ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError34 }
22396
22589
 
22397
22590
  // src/ui-logic/utils/handle-src-val.ts
22398
22591
  import { ModelError as ModelError18 } from "@ibiz-template/core";
22399
- import { clone as clone22 } from "ramda";
22592
+ import { clone as clone25 } from "ramda";
22400
22593
  function handleSrcVal2(ctx, srcValParams) {
22401
22594
  const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
22402
22595
  const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
@@ -22423,7 +22616,7 @@ function handleSrcVal2(ctx, srcValParams) {
22423
22616
  value = ctx.parameters.context;
22424
22617
  break;
22425
22618
  case "ENVPARAM":
22426
- value = clone22(ibiz.env);
22619
+ value = clone25(ibiz.env);
22427
22620
  break;
22428
22621
  default:
22429
22622
  throw new ModelError18(
@@ -22879,8 +23072,8 @@ var EndNode2 = class extends UILogicNode {
22879
23072
  };
22880
23073
 
22881
23074
  // src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
22882
- import { ModelError as ModelError22, RuntimeError as RuntimeError43 } from "@ibiz-template/core";
22883
- import { clone as clone23 } from "ramda";
23075
+ import { ModelError as ModelError22, RuntimeError as RuntimeError44 } from "@ibiz-template/core";
23076
+ import { clone as clone26 } from "ramda";
22884
23077
  var PrepareJSParamNode = class extends UILogicNode {
22885
23078
  async exec(ctx) {
22886
23079
  const nodeParams = this.model.deuilogicNodeParams;
@@ -22890,7 +23083,7 @@ var PrepareJSParamNode = class extends UILogicNode {
22890
23083
  for (const nodeParam of nodeParams) {
22891
23084
  let originValue;
22892
23085
  if (nodeParam.dstDEUILogicParamId && ibiz.env.logLevel === "DEBUG") {
22893
- originValue = clone23(ctx.params[nodeParam.dstDEUILogicParamId]);
23086
+ originValue = clone26(ctx.params[nodeParam.dstDEUILogicParamId]);
22894
23087
  }
22895
23088
  switch (nodeParam.paramAction) {
22896
23089
  case "SETPARAMVALUE":
@@ -22945,7 +23138,7 @@ var PrepareJSParamNode = class extends UILogicNode {
22945
23138
  setParamValue(nodeParam, ctx) {
22946
23139
  const { dstFieldName, dstDEUILogicParamId } = nodeParam;
22947
23140
  if (!dstDEUILogicParamId) {
22948
- throw new RuntimeError43(ibiz.i18n.t("runtime.uiLogic.noTargetParameter"));
23141
+ throw new RuntimeError44(ibiz.i18n.t("runtime.uiLogic.noTargetParameter"));
22949
23142
  }
22950
23143
  let dstField = dstFieldName;
22951
23144
  if (ctx.isEntityParam(dstDEUILogicParamId)) {
@@ -22985,7 +23178,7 @@ var PrepareJSParamNode = class extends UILogicNode {
22985
23178
  copyParam(nodeParam, ctx) {
22986
23179
  const { dstDEUILogicParamId } = nodeParam;
22987
23180
  const srcVal = handleSrcVal2(ctx, nodeParam);
22988
- ctx.params[dstDEUILogicParamId] = clone23(srcVal);
23181
+ ctx.params[dstDEUILogicParamId] = clone26(srcVal);
22989
23182
  }
22990
23183
  /**
22991
23184
  * 绑定参数
@@ -23062,7 +23255,7 @@ var PrepareJSParamNode = class extends UILogicNode {
23062
23255
  };
23063
23256
 
23064
23257
  // src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
23065
- import { RuntimeError as RuntimeError44, RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
23258
+ import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
23066
23259
  import { isFunction } from "lodash-es";
23067
23260
  var ViewCtrlInvokeNode = class extends UILogicNode {
23068
23261
  async exec(ctx) {
@@ -23088,7 +23281,7 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
23088
23281
  }
23089
23282
  const invokeParam = ctx.params[invokeParamId];
23090
23283
  if (!invokeParam) {
23091
- throw new RuntimeError44(
23284
+ throw new RuntimeError45(
23092
23285
  ibiz.i18n.t("runtime.uiLogic.noFoundOperationParameter", {
23093
23286
  invokeParamId
23094
23287
  })
@@ -23096,14 +23289,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
23096
23289
  }
23097
23290
  const invokeCtrl = ctx.params[invokeCtrlId];
23098
23291
  if (!invokeCtrl) {
23099
- throw new RuntimeError44(
23292
+ throw new RuntimeError45(
23100
23293
  ibiz.i18n.t("runtime.uiLogic.noFoundInterfaceObject", {
23101
23294
  invokeCtrlId
23102
23295
  })
23103
23296
  );
23104
23297
  }
23105
23298
  if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
23106
- throw new RuntimeError44(
23299
+ throw new RuntimeError45(
23107
23300
  ibiz.i18n.t("runtime.uiLogic.noFoundInvokeMethod", {
23108
23301
  invokeMethod
23109
23302
  })
@@ -23292,7 +23485,7 @@ var ResetParamNode2 = class extends UILogicNode {
23292
23485
 
23293
23486
  // src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
23294
23487
  import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
23295
- import { clone as clone24 } from "ramda";
23488
+ import { clone as clone27 } from "ramda";
23296
23489
  var CopyParamNode2 = class extends UILogicNode {
23297
23490
  async exec(ctx) {
23298
23491
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
@@ -23303,7 +23496,7 @@ var CopyParamNode2 = class extends UILogicNode {
23303
23496
  );
23304
23497
  }
23305
23498
  const srcVal = handleSrcVal2(ctx, this.model);
23306
- ctx.params[dstDEUILogicParamId] = clone24(srcVal);
23499
+ ctx.params[dstDEUILogicParamId] = clone27(srcVal);
23307
23500
  ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
23308
23501
  ibiz.log.debug(
23309
23502
  ibiz.i18n.t("runtime.uiLogic.copyParameter", {
@@ -23443,7 +23636,7 @@ var DataSetNode2 = class extends UILogicNode {
23443
23636
  };
23444
23637
 
23445
23638
  // src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
23446
- import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
23639
+ import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
23447
23640
  var ThrowExceptionNode2 = class extends UILogicNode {
23448
23641
  async exec(_ctx) {
23449
23642
  const { errorInfo } = this.model;
@@ -23453,12 +23646,12 @@ var ThrowExceptionNode2 = class extends UILogicNode {
23453
23646
  errorInfo
23454
23647
  })
23455
23648
  );
23456
- throw new RuntimeError45(errorInfo);
23649
+ throw new RuntimeError46(errorInfo);
23457
23650
  }
23458
23651
  };
23459
23652
 
23460
23653
  // src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
23461
- import { RuntimeError as RuntimeError46, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
23654
+ import { RuntimeError as RuntimeError47, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
23462
23655
  var ViewCtrlFireEventNode = class extends UILogicNode {
23463
23656
  async exec(ctx) {
23464
23657
  ctx.isEndNode = true;
@@ -23483,13 +23676,13 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
23483
23676
  }
23484
23677
  const invokeCtrl = ctx.params[fireCtrlId];
23485
23678
  if (!invokeCtrl) {
23486
- throw new RuntimeError46(
23679
+ throw new RuntimeError47(
23487
23680
  ibiz.i18n.t("runtime.uiLogic.noFoundTriggerObject", { fireCtrlId })
23488
23681
  );
23489
23682
  }
23490
23683
  const eventParam = ctx.params[eventParamId];
23491
23684
  if (!eventParam) {
23492
- throw new RuntimeError46(
23685
+ throw new RuntimeError47(
23493
23686
  ibiz.i18n.t("runtime.uiLogic.noFoundEventParameterObject", {
23494
23687
  eventParamId
23495
23688
  })
@@ -23511,7 +23704,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
23511
23704
  };
23512
23705
 
23513
23706
  // src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
23514
- import { RuntimeError as RuntimeError47, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
23707
+ import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
23515
23708
  var ExecuteDELogicNode = class extends UILogicNode {
23516
23709
  async exec(ctx) {
23517
23710
  const {
@@ -23540,7 +23733,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
23540
23733
  }
23541
23734
  const dstParam = ctx.params[dstDEUILogicParamId];
23542
23735
  if (!dstParam) {
23543
- throw new RuntimeError47(
23736
+ throw new RuntimeError48(
23544
23737
  ibiz.i18n.t("runtime.uiLogic.passedParameter", { dstDEUILogicParamId })
23545
23738
  );
23546
23739
  }
@@ -23939,7 +24132,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
23939
24132
  const app = ibiz.hub.getApp(parameters.context.srfappid);
23940
24133
  const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
23941
24134
  if (!deUILogic) {
23942
- throw new RuntimeError48(
24135
+ throw new RuntimeError49(
23943
24136
  ibiz.i18n.t("runtime.uiLogic.interfaceLogic", {
23944
24137
  appDataEntityId,
23945
24138
  deUILogicId
@@ -23967,7 +24160,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
23967
24160
  }
23968
24161
 
23969
24162
  // src/ui-action/uiaction-util.ts
23970
- import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
24163
+ import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
23971
24164
  var UIActionUtil = class {
23972
24165
  /**
23973
24166
  * 执行界面行为
@@ -23982,7 +24175,7 @@ var UIActionUtil = class {
23982
24175
  static async exec(actionId, params, appId2) {
23983
24176
  const action = await getUIActionById(actionId, appId2);
23984
24177
  if (!action) {
23985
- throw new RuntimeError49(
24178
+ throw new RuntimeError50(
23986
24179
  ibiz.i18n.t("runtime.uiAction.noFoundBehaviorModel", { actionId })
23987
24180
  );
23988
24181
  }
@@ -24490,7 +24683,7 @@ import {
24490
24683
  StringUtil,
24491
24684
  RuntimeModelError as RuntimeModelError53,
24492
24685
  ModelError as ModelError26,
24493
- RuntimeError as RuntimeError50
24686
+ RuntimeError as RuntimeError51
24494
24687
  } from "@ibiz-template/core";
24495
24688
  import { mergeRight as mergeRight4 } from "ramda";
24496
24689
  var FrontUIActionProvider = class extends UIActionProviderBase {
@@ -24578,7 +24771,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
24578
24771
  return result || {};
24579
24772
  }
24580
24773
  if (scriptCode) {
24581
- const result = ScriptFactory.execScriptFn(
24774
+ const result = await ScriptFactory.asyncExecScriptFn(
24582
24775
  { context, params, data, el: event == null ? void 0 : event.target, view },
24583
24776
  scriptCode
24584
24777
  );
@@ -24616,7 +24809,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
24616
24809
  if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
24617
24810
  requestUrl += "/".concat(appDataEntity.deapicodeName2, "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
24618
24811
  } else {
24619
- throw new RuntimeError50(ibiz.i18n.t("runtime.uiAction.dataPrimaryKey"));
24812
+ throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.dataPrimaryKey"));
24620
24813
  }
24621
24814
  const res = await ibiz.net.request(requestUrl, {
24622
24815
  method: "get",
@@ -24642,10 +24835,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
24642
24835
  window.open(link, "_blank");
24643
24836
  }
24644
24837
  } else {
24645
- throw new RuntimeError50(ibiz.i18n.t("runtime.uiAction.printFailure"));
24838
+ throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.printFailure"));
24646
24839
  }
24647
24840
  } else {
24648
- throw new RuntimeError50(ibiz.i18n.t("runtime.uiAction.physicalPrint"));
24841
+ throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.physicalPrint"));
24649
24842
  }
24650
24843
  }
24651
24844
  /**
@@ -24730,12 +24923,12 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
24730
24923
  URL.revokeObjectURL(elink.href);
24731
24924
  document.body.removeChild(elink);
24732
24925
  } else {
24733
- throw new RuntimeError50(
24926
+ throw new RuntimeError51(
24734
24927
  ibiz.i18n.t("runtime.uiAction.exportRequestFailed")
24735
24928
  );
24736
24929
  }
24737
24930
  } else {
24738
- throw new RuntimeError50(
24931
+ throw new RuntimeError51(
24739
24932
  ibiz.i18n.t("runtime.uiAction.noEntityExportsFound")
24740
24933
  );
24741
24934
  }
@@ -24753,7 +24946,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
24753
24946
  const actionResult = {};
24754
24947
  const { context, params, data, event } = args;
24755
24948
  if (!event) {
24756
- throw new RuntimeError50(ibiz.i18n.t("runtime.uiAction.lackNativeEvent"));
24949
+ throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.lackNativeEvent"));
24757
24950
  }
24758
24951
  const { resultContext, resultParams } = await this.handleParams(
24759
24952
  action,
@@ -24892,7 +25085,7 @@ var ToolbarController = class extends ControlController {
24892
25085
  const actionId = item.uiactionId;
24893
25086
  const uiAction = await getUIActionById(actionId, item.appId);
24894
25087
  if (!uiAction) {
24895
- throw new RuntimeError51(
25088
+ throw new RuntimeError52(
24896
25089
  ibiz.i18n.t("runtime.controller.control.toolbar.noFound", {
24897
25090
  actionId
24898
25091
  })
@@ -25005,6 +25198,12 @@ var ToolbarController = class extends ControlController {
25005
25198
  _data = data.getOrigin();
25006
25199
  }
25007
25200
  await this.state.buttonsState.update(this.context, _data, appDeId);
25201
+ this.allToolbarItems.forEach((item) => {
25202
+ const itemState = this.state.buttonsState[item.id];
25203
+ if (item.hiddenItem) {
25204
+ itemState.visible = false;
25205
+ }
25206
+ });
25008
25207
  if (this.scheduler) {
25009
25208
  const logicParams = {};
25010
25209
  if (_data) {
@@ -25097,6 +25296,7 @@ var ContextMenuController = class extends ToolbarController {
25097
25296
  };
25098
25297
 
25099
25298
  // src/controller/control/dashboard/dashboard.controller.ts
25299
+ import { clone as clone28 } from "ramda";
25100
25300
  var DashboardController = class extends ControlController {
25101
25301
  constructor() {
25102
25302
  super(...arguments);
@@ -25116,13 +25316,25 @@ var DashboardController = class extends ControlController {
25116
25316
  * @type {{ [key: string]: IPortletController }}
25117
25317
  */
25118
25318
  this.portlets = {};
25319
+ /**
25320
+ * 启用动态
25321
+ *
25322
+ * @author tony001
25323
+ * @date 2024-06-27 11:06:24
25324
+ * @type {boolean}
25325
+ */
25326
+ this.enableDynamic = false;
25119
25327
  }
25120
25328
  initState() {
25121
25329
  super.initState();
25122
25330
  }
25123
25331
  async onCreated() {
25332
+ this.model.enableCustomized = true;
25124
25333
  await super.onCreated();
25125
25334
  await this.initPortlets(this.model.controls);
25335
+ if (this.controlParams.enabledynamic === "true") {
25336
+ this.enableDynamic = true;
25337
+ }
25126
25338
  const { appDataEntityId } = this.view.model;
25127
25339
  if (appDataEntityId) {
25128
25340
  this.view.evt.on("onDataChange", (event) => {
@@ -25208,6 +25420,57 @@ var DashboardController = class extends ControlController {
25208
25420
  });
25209
25421
  this.evt.emit("onResetPortlet", void 0);
25210
25422
  }
25423
+ /**
25424
+ * 加载动态
25425
+ *
25426
+ * @author tony001
25427
+ * @date 2024-06-27 16:06:21
25428
+ * @return {*} {Promise<IData[]>}
25429
+ */
25430
+ async loadAllDynaPortlet() {
25431
+ var _a;
25432
+ const app = ibiz.hub.getApp(ibiz.env.appId);
25433
+ const res = await app.deService.exec(
25434
+ "psappportlet",
25435
+ "fetchdefault",
25436
+ this.context,
25437
+ {
25438
+ size: 1e3,
25439
+ n_pssysappid_eq: app.model.codeName,
25440
+ n_dynamodelflag_noteq: 0
25441
+ }
25442
+ );
25443
+ if (res && ((_a = res.data) == null ? void 0 : _a.length) > 0) {
25444
+ return res.data;
25445
+ }
25446
+ return [];
25447
+ }
25448
+ /**
25449
+ * 通过指定标识加载门户部件
25450
+ *
25451
+ * @author tony001
25452
+ * @date 2024-06-27 17:06:12
25453
+ * @param {string} id
25454
+ * @return {*} {(Promise<IDBPortletPart | undefined>)}
25455
+ */
25456
+ async loadDynaPortletById(id) {
25457
+ const app = ibiz.hub.getApp(ibiz.env.appId);
25458
+ const tempContext = clone28(this.context);
25459
+ Object.assign(tempContext, { psappportlet: id });
25460
+ const res = await app.deService.exec(
25461
+ "psappportlet",
25462
+ "get",
25463
+ tempContext,
25464
+ this.params
25465
+ );
25466
+ if (res && res.data && res.data.controlmodel) {
25467
+ const controlModel = JSON.parse(res.data.controlmodel);
25468
+ return await ibiz.hub.translationModelToDsl(
25469
+ controlModel,
25470
+ "CTRL"
25471
+ );
25472
+ }
25473
+ }
25211
25474
  /**
25212
25475
  * 通知所有表单成员表单操作过程中的数据变更
25213
25476
  *
@@ -25264,7 +25527,7 @@ var CustomDashboardController = class {
25264
25527
  */
25265
25528
  this.portletConfig = {};
25266
25529
  /**
25267
- * 自定义定制范围类型(public:公开,personal:个人,data:数据,默认是按照个人区分,配置了应用功能组件才生效)
25530
+ * 自定义定制范围类型(public:公开,personal:个人,data:数据,dynamic: 自定义动态,默认是按照个人区分,配置了应用功能组件才生效)
25268
25531
  *
25269
25532
  * @author tony001
25270
25533
  * @date 2024-04-24 19:04:47
@@ -25287,13 +25550,6 @@ var CustomDashboardController = class {
25287
25550
  * @type {string}
25288
25551
  */
25289
25552
  this.ownerId = "";
25290
- /**
25291
- * 是否多模式
25292
- *
25293
- * @type {boolean}
25294
- * @memberof CustomDashboardController
25295
- */
25296
- this.multiMode = false;
25297
25553
  this.context = dashboard.context;
25298
25554
  this.params = dashboard.params;
25299
25555
  this.init(dashboard.controlParams);
@@ -25319,7 +25575,6 @@ var CustomDashboardController = class {
25319
25575
  this.ownerId = this.context[controlParams.owner_id];
25320
25576
  }
25321
25577
  if (controlParams.multimode === "true") {
25322
- this.multiMode = true;
25323
25578
  this.type = "dynamic";
25324
25579
  }
25325
25580
  if (this.model.appDynaDashboardUtilId) {
@@ -26333,7 +26588,7 @@ var DataViewControlController = class extends MDControlController {
26333
26588
  import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
26334
26589
 
26335
26590
  // src/controller/control/exp-bar/exp-bar.controller.ts
26336
- import { RuntimeError as RuntimeError52, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
26591
+ import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
26337
26592
  var ExpBarControlController = class extends ControlController {
26338
26593
  constructor() {
26339
26594
  super(...arguments);
@@ -26666,7 +26921,7 @@ var ExpBarControlController = class extends ControlController {
26666
26921
  if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
26667
26922
  return this.XDataModel.navAppViewId;
26668
26923
  }
26669
- throw new RuntimeError52(
26924
+ throw new RuntimeError53(
26670
26925
  ibiz.i18n.t("runtime.controller.control.expBar.multiNode")
26671
26926
  );
26672
26927
  }
@@ -26813,7 +27068,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
26813
27068
  };
26814
27069
 
26815
27070
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
26816
- import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
27071
+ import { RuntimeError as RuntimeError54, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
26817
27072
  var TreeExpBarController = class extends ExpBarControlController {
26818
27073
  constructor() {
26819
27074
  super(...arguments);
@@ -26904,7 +27159,7 @@ var TreeExpBarController = class extends ExpBarControlController {
26904
27159
  const deData = node._deData || node;
26905
27160
  const nodeModel = this.getNodeModel(node._nodeId);
26906
27161
  if (!nodeModel) {
26907
- throw new RuntimeError53(
27162
+ throw new RuntimeError54(
26908
27163
  ibiz.i18n.t("runtime.controller.control.expBar.noFindNodeModel", {
26909
27164
  nodeId: node._nodeId
26910
27165
  })
@@ -27099,7 +27354,7 @@ var ChartExpBarController = class extends ExpBarControlController {
27099
27354
  };
27100
27355
 
27101
27356
  // src/controller/control/form/search-form/search-form.controller.ts
27102
- import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
27357
+ import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
27103
27358
 
27104
27359
  // src/controller/control/form/form/form.controller.ts
27105
27360
  import {
@@ -27745,7 +28000,7 @@ var SearchFormController = class extends FormController {
27745
28000
  applyStoredFilter(index) {
27746
28001
  const filter = this.state.storedFilters[index];
27747
28002
  if (!filter) {
27748
- throw new RuntimeError54(
28003
+ throw new RuntimeError55(
27749
28004
  ibiz.i18n.t("runtime.controller.control.form.searchTerms")
27750
28005
  );
27751
28006
  }
@@ -27763,7 +28018,7 @@ var SearchFormController = class extends FormController {
27763
28018
  async removeStoredFilter(index) {
27764
28019
  const filter = this.state.storedFilters[index];
27765
28020
  if (!filter) {
27766
- throw new RuntimeError54(
28021
+ throw new RuntimeError55(
27767
28022
  ibiz.i18n.t("runtime.controller.control.form.saveSearch")
27768
28023
  );
27769
28024
  }
@@ -29253,7 +29508,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
29253
29508
  };
29254
29509
 
29255
29510
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
29256
- import { RuntimeError as RuntimeError55, RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
29511
+ import { RuntimeError as RuntimeError56, RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
29257
29512
  import { createUUID as createUUID11 } from "qx-util";
29258
29513
 
29259
29514
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
@@ -29426,7 +29681,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
29426
29681
  async remove(id) {
29427
29682
  const controller = this.formMap.get(id);
29428
29683
  if (!controller) {
29429
- throw new RuntimeError55(
29684
+ throw new RuntimeError56(
29430
29685
  ibiz.i18n.t("runtime.controller.control.form.noFoundFormController", {
29431
29686
  id
29432
29687
  })
@@ -29489,7 +29744,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
29489
29744
 
29490
29745
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
29491
29746
  import { ModelError as ModelError28 } from "@ibiz-template/core";
29492
- import { clone as clone25 } from "ramda";
29747
+ import { clone as clone29 } from "ramda";
29493
29748
  var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
29494
29749
  constructor() {
29495
29750
  super(...arguments);
@@ -29581,7 +29836,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
29581
29836
  copyFields.forEach((key) => {
29582
29837
  tempForm[key] = this.form.model[key];
29583
29838
  });
29584
- this.repeatedForm = clone25(tempForm);
29839
+ this.repeatedForm = clone29(tempForm);
29585
29840
  }
29586
29841
  /**
29587
29842
  * 设置重复器控制器
@@ -29778,11 +30033,11 @@ import {
29778
30033
  IBizContext as IBizContext6,
29779
30034
  isElementSame as isElementSame2,
29780
30035
  mergeInLeft as mergeInLeft2,
29781
- RuntimeError as RuntimeError56
30036
+ RuntimeError as RuntimeError57
29782
30037
  } from "@ibiz-template/core";
29783
30038
  import { debounce } from "lodash-es";
29784
30039
  import { createUUID as createUUID12 } from "qx-util";
29785
- import { clone as clone26, isNil as isNil27 } from "ramda";
30040
+ import { clone as clone30, isNil as isNil27 } from "ramda";
29786
30041
 
29787
30042
  // src/controller/control/form/edit-form/edit-form.service.ts
29788
30043
  import {
@@ -30151,8 +30406,8 @@ var EditFormController = class extends FormController {
30151
30406
  * @return {*} {Promise<IData>}
30152
30407
  */
30153
30408
  async copy() {
30154
- const context = clone26(this.context);
30155
- const queryParams = clone26(this.params);
30409
+ const context = clone30(this.context);
30410
+ const queryParams = clone30(this.params);
30156
30411
  const appDataEntity = await ibiz.hub.getAppDataEntity(
30157
30412
  this.model.appDataEntityId,
30158
30413
  this.model.appId
@@ -30209,7 +30464,7 @@ var EditFormController = class extends FormController {
30209
30464
  return this.loadDraft();
30210
30465
  }
30211
30466
  const { context, params } = this.handlerAbilityParams(args);
30212
- const queryParams = clone26(params);
30467
+ const queryParams = clone30(params);
30213
30468
  let res;
30214
30469
  try {
30215
30470
  await this.startLoading();
@@ -30247,7 +30502,7 @@ var EditFormController = class extends FormController {
30247
30502
  }
30248
30503
  const isValid = await this.validate();
30249
30504
  if (!isValid) {
30250
- throw new RuntimeError56(
30505
+ throw new RuntimeError57(
30251
30506
  ibiz.i18n.t("runtime.controller.control.form.formCompletion")
30252
30507
  );
30253
30508
  }
@@ -30383,7 +30638,7 @@ var EditFormController = class extends FormController {
30383
30638
  (item) => item.id === formItemUpdateId
30384
30639
  );
30385
30640
  if (!formItemUpdate) {
30386
- throw new RuntimeError56(
30641
+ throw new RuntimeError57(
30387
30642
  ibiz.i18n.t("runtime.controller.control.form.itemUpdate", {
30388
30643
  formItemUpdateId
30389
30644
  })
@@ -30446,7 +30701,7 @@ var EditFormController = class extends FormController {
30446
30701
  async wfStart(args) {
30447
30702
  const isValid = await this.validate();
30448
30703
  if (!isValid) {
30449
- throw new RuntimeError56(
30704
+ throw new RuntimeError57(
30450
30705
  ibiz.i18n.t("runtime.controller.control.form.formCompletion")
30451
30706
  );
30452
30707
  }
@@ -30479,7 +30734,7 @@ var EditFormController = class extends FormController {
30479
30734
  async wfSubmit(args) {
30480
30735
  const isValid = await this.validate();
30481
30736
  if (!isValid) {
30482
- throw new RuntimeError56(
30737
+ throw new RuntimeError57(
30483
30738
  ibiz.i18n.t("runtime.controller.control.form.formCompletion")
30484
30739
  );
30485
30740
  }
@@ -30891,11 +31146,12 @@ import {
30891
31146
  debounceAndAsyncMerge as debounceAndAsyncMerge2,
30892
31147
  EntityError as EntityError2,
30893
31148
  mergeDefaultInLeft,
31149
+ plus as plus2,
30894
31150
  recursiveIterate as recursiveIterate7,
30895
- RuntimeError as RuntimeError57,
31151
+ RuntimeError as RuntimeError58,
30896
31152
  RuntimeModelError as RuntimeModelError63
30897
31153
  } from "@ibiz-template/core";
30898
- import { clone as clone27, isNil as isNil28 } from "ramda";
31154
+ import { clone as clone31, isNil as isNil28 } from "ramda";
30899
31155
  import dayjs5 from "dayjs";
30900
31156
 
30901
31157
  // src/controller/control/grid/grid/grid.service.ts
@@ -31032,6 +31288,7 @@ async function calcColumnModelBySchema(json, c) {
31032
31288
  widthUnit: "PX",
31033
31289
  valueType: "SIMPLE",
31034
31290
  caption: item.description,
31291
+ hideDefault: true,
31035
31292
  dataItemName: item.key
31036
31293
  });
31037
31294
  addDataItems.push({
@@ -31070,6 +31327,13 @@ var GridController = class extends MDControlController {
31070
31327
  * @type {boolean}
31071
31328
  */
31072
31329
  this.addSchemaColumn = false;
31330
+ /**
31331
+ * 是否显示百分比
31332
+ *
31333
+ * @type {boolean}
31334
+ * @memberof GridController
31335
+ */
31336
+ this.showPercent = false;
31073
31337
  /**
31074
31338
  * 所有表格列控制器集合
31075
31339
  *
@@ -31232,6 +31496,7 @@ var GridController = class extends MDControlController {
31232
31496
  */
31233
31497
  async onCreated() {
31234
31498
  this.addSchemaColumn = this.controlParams.enablejsonschema === "true";
31499
+ this.showPercent = this.controlParams.showpercent === "true";
31235
31500
  await this.initByEntitySchema();
31236
31501
  await super.onCreated();
31237
31502
  this.service = new GridService(this.model);
@@ -31295,7 +31560,7 @@ var GridController = class extends MDControlController {
31295
31560
  const result = await calcColumnModelBySchema(json, this);
31296
31561
  if (result && result.degridColumns.length > 0) {
31297
31562
  const { degridColumns, degridDataItems } = result;
31298
- this.model = clone27(this.model);
31563
+ this.model = clone31(this.model);
31299
31564
  this.model.degridColumns = [
31300
31565
  ...this.model.degridColumns || [],
31301
31566
  ...degridColumns
@@ -31463,7 +31728,7 @@ var GridController = class extends MDControlController {
31463
31728
  } else {
31464
31729
  const toNum = Number(sortValue);
31465
31730
  if (Number.isNaN(toNum)) {
31466
- throw new RuntimeError57(
31731
+ throw new RuntimeError58(
31467
31732
  ibiz.i18n.t("runtime.controller.control.grid.convertedValue", {
31468
31733
  srfmajortext: item.srfmajortext
31469
31734
  })
@@ -31497,6 +31762,7 @@ var GridController = class extends MDControlController {
31497
31762
  await this.loadRemoteAgg();
31498
31763
  this.calcAggResult(this.state.items);
31499
31764
  this.calcShowMode(this.state.items);
31765
+ this.calcTotalData();
31500
31766
  return items;
31501
31767
  }
31502
31768
  /**
@@ -31605,7 +31871,6 @@ var GridController = class extends MDControlController {
31605
31871
  * 计算当前页的聚合数据
31606
31872
  * @author lxm
31607
31873
  * @date 2023-08-07 04:22:09
31608
- * @protected
31609
31874
  * @param {IData[]} items
31610
31875
  */
31611
31876
  calcAggResult(items) {
@@ -31654,7 +31919,7 @@ var GridController = class extends MDControlController {
31654
31919
  if (editShowMode === "row") {
31655
31920
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
31656
31921
  if (editingRow) {
31657
- throw new RuntimeError57(
31922
+ throw new RuntimeError58(
31658
31923
  ibiz.i18n.t("runtime.controller.common.md.firstComplete")
31659
31924
  );
31660
31925
  }
@@ -31697,7 +31962,7 @@ var GridController = class extends MDControlController {
31697
31962
  const isCreate = data.srfuf === 0 /* CREATE */;
31698
31963
  const rowState = this.findRowState(data);
31699
31964
  if (!rowState) {
31700
- throw new RuntimeError57(
31965
+ throw new RuntimeError58(
31701
31966
  ibiz.i18n.t("runtime.controller.common.md.rowData")
31702
31967
  );
31703
31968
  }
@@ -31711,7 +31976,7 @@ var GridController = class extends MDControlController {
31711
31976
  }
31712
31977
  const isValid = await this.validate(rowState);
31713
31978
  if (!isValid) {
31714
- throw new RuntimeError57(
31979
+ throw new RuntimeError58(
31715
31980
  ibiz.i18n.t("runtime.controller.control.grid.saveCancel")
31716
31981
  );
31717
31982
  }
@@ -31967,7 +32232,7 @@ var GridController = class extends MDControlController {
31967
32232
  }
31968
32233
  async toggleRowEdit() {
31969
32234
  if (!this.model.enableRowNew) {
31970
- throw new RuntimeError57(
32235
+ throw new RuntimeError58(
31971
32236
  ibiz.i18n.t("runtime.controller.control.grid.noSupportRowEditing")
31972
32237
  );
31973
32238
  }
@@ -32002,12 +32267,12 @@ var GridController = class extends MDControlController {
32002
32267
  } else {
32003
32268
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
32004
32269
  if (editingRow) {
32005
- throw new RuntimeError57(
32270
+ throw new RuntimeError58(
32006
32271
  ibiz.i18n.t("runtime.controller.control.grid.lineEditing")
32007
32272
  );
32008
32273
  }
32009
32274
  if (row.data.srfuf === 1 /* UPDATE */) {
32010
- row.cacheData = clone27(row.data);
32275
+ row.cacheData = clone31(row.data);
32011
32276
  const defaultVal = this.calcDefaultValue(row.data, false);
32012
32277
  Object.assign(row.data, defaultVal);
32013
32278
  }
@@ -32059,7 +32324,7 @@ var GridController = class extends MDControlController {
32059
32324
  (item) => item.id === updateId
32060
32325
  );
32061
32326
  if (!findUpdate) {
32062
- throw new RuntimeError57(
32327
+ throw new RuntimeError58(
32063
32328
  ibiz.i18n.t("runtime.controller.control.grid.updateColumns", {
32064
32329
  updateId
32065
32330
  })
@@ -32150,7 +32415,7 @@ var GridController = class extends MDControlController {
32150
32415
  */
32151
32416
  formatExcelData(data) {
32152
32417
  const { fields = [] } = this.dataExportParam;
32153
- const cloneData = clone27(
32418
+ const cloneData = clone31(
32154
32419
  data.map((item) => {
32155
32420
  return fields.reduce((obj, key) => {
32156
32421
  obj[key] = item[key];
@@ -32203,7 +32468,7 @@ var GridController = class extends MDControlController {
32203
32468
  data = this.getData();
32204
32469
  }
32205
32470
  if (data.length === 0) {
32206
- throw new RuntimeError57(
32471
+ throw new RuntimeError58(
32207
32472
  ibiz.i18n.t("runtime.controller.control.grid.exported")
32208
32473
  );
32209
32474
  }
@@ -32219,7 +32484,7 @@ var GridController = class extends MDControlController {
32219
32484
  async exportData(args) {
32220
32485
  const { header } = this.dataExportParam;
32221
32486
  if (!header) {
32222
- throw new RuntimeError57(
32487
+ throw new RuntimeError58(
32223
32488
  ibiz.i18n.t("runtime.controller.control.grid.tabularColumns")
32224
32489
  );
32225
32490
  }
@@ -32476,13 +32741,34 @@ var GridController = class extends MDControlController {
32476
32741
  await this.afterLoad({}, this.state.items);
32477
32742
  }
32478
32743
  }
32744
+ /**
32745
+ * 计算统计数据
32746
+ * @author: zzq
32747
+ * @date 2024-06-28 17:12:58
32748
+ * @return {*} {Promise<void>}
32749
+ */
32750
+ calcTotalData() {
32751
+ if (!this.showPercent) {
32752
+ return;
32753
+ }
32754
+ const totalResult = {};
32755
+ Object.values(this.fieldColumns).forEach((column) => {
32756
+ const fieldName = column.model.id;
32757
+ const result = this.state.items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0);
32758
+ if (result) {
32759
+ totalResult[fieldName] = result;
32760
+ }
32761
+ });
32762
+ this.state.totalResult = totalResult;
32763
+ }
32479
32764
  };
32480
32765
 
32481
32766
  // src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
32482
- import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
32767
+ import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus3 } from "@ibiz-template/core";
32483
32768
  import dayjs6 from "dayjs";
32484
32769
  import { debounce as debounce2 } from "lodash-es";
32485
- import { clone as clone28, isNil as isNil29 } from "ramda";
32770
+ import { clone as clone32, isNil as isNil29 } from "ramda";
32771
+ import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
32486
32772
  var GridFieldColumnController = class extends GridColumnController {
32487
32773
  constructor() {
32488
32774
  super(...arguments);
@@ -32625,7 +32911,7 @@ var GridFieldColumnController = class extends GridColumnController {
32625
32911
  srfkey: value,
32626
32912
  ...wfContext
32627
32913
  });
32628
- const tempParams = clone28(this.params);
32914
+ const tempParams = clone32(this.params);
32629
32915
  const { context: newContext, params: newParams } = this.handlePublicParams(
32630
32916
  row.data,
32631
32917
  tempContext,
@@ -32714,10 +33000,10 @@ var GridFieldColumnController = class extends GridColumnController {
32714
33000
  if (this.grid.model.aggMode === "PAGE") {
32715
33001
  switch (aggMode) {
32716
33002
  case "SUM":
32717
- aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0);
33003
+ aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus3(a, b), 0);
32718
33004
  break;
32719
33005
  case "AVG":
32720
- aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0) / items.length;
33006
+ aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus3(a, b), 0) / items.length;
32721
33007
  break;
32722
33008
  case "MAX":
32723
33009
  aggValue = Math.max(
@@ -32774,7 +33060,7 @@ var GridFieldColumnController = class extends GridColumnController {
32774
33060
  if (this.model.valueType !== "SIMPLE") {
32775
33061
  return ValueExUtil.toText(this.model, value);
32776
33062
  }
32777
- const strVal = "".concat(value || "");
33063
+ const strVal = "".concat(isNilOrEmpty8(value) ? "" : value);
32778
33064
  if (!this.valueFormat) {
32779
33065
  return strVal;
32780
33066
  }
@@ -32879,9 +33165,9 @@ var GridUAColumnController = class extends GridColumnController {
32879
33165
  };
32880
33166
 
32881
33167
  // src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
32882
- import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
33168
+ import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
32883
33169
  import Schema2 from "async-validator";
32884
- import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
33170
+ import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
32885
33171
  var GridFieldEditColumnController = class extends GridFieldColumnController {
32886
33172
  constructor() {
32887
33173
  super(...arguments);
@@ -33019,7 +33305,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
33019
33305
  if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
33020
33306
  const result = await this.validate(row);
33021
33307
  if (!result) {
33022
- throw new RuntimeError58(
33308
+ throw new RuntimeError59(
33023
33309
  ibiz.i18n.t("runtime.controller.control.grid.checksumErrors", {
33024
33310
  codeName: this.editItem.codeName,
33025
33311
  fieldName: row.errors[this.fieldName]
@@ -33125,7 +33411,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
33125
33411
  */
33126
33412
  async validate(row) {
33127
33413
  const editName = this.fieldName;
33128
- if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required === true && (typeof row.data[editName] === "string" ? isNilOrEmpty8(row.data[editName].trimEnd()) : isNilOrEmpty8(row.data[editName]))) {
33414
+ if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required === true && (typeof row.data[editName] === "string" ? isNilOrEmpty9(row.data[editName].trimEnd()) : isNilOrEmpty9(row.data[editName]))) {
33129
33415
  row.errors[editName] = ibiz.i18n.t(
33130
33416
  "runtime.controller.control.form.fillIn",
33131
33417
  {
@@ -33343,7 +33629,7 @@ var ListController = class extends MDControlController {
33343
33629
  };
33344
33630
 
33345
33631
  // src/controller/control/panel/panel/panel.controller.ts
33346
- import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError59 } from "@ibiz-template/core";
33632
+ import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError60 } from "@ibiz-template/core";
33347
33633
  import { AsyncSeriesHook as AsyncSeriesHook2 } from "qx-util";
33348
33634
  var PanelController = class extends ControlController {
33349
33635
  constructor(model, context, params, ctx, container) {
@@ -33500,7 +33786,7 @@ var PanelController = class extends ControlController {
33500
33786
  var _a, _b;
33501
33787
  const data = await this.prepareData();
33502
33788
  if (!data) {
33503
- throw new RuntimeError59(
33789
+ throw new RuntimeError60(
33504
33790
  ibiz.i18n.t("runtime.controller.control.panel.panelData")
33505
33791
  );
33506
33792
  }
@@ -34146,7 +34432,7 @@ var PickupViewPanelController = class extends ControlController {
34146
34432
 
34147
34433
  // src/controller/control/search-bar/search-bar.controller.ts
34148
34434
  import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
34149
- import { clone as clone30 } from "ramda";
34435
+ import { clone as clone34 } from "ramda";
34150
34436
  import { isString as isString3 } from "lodash-es";
34151
34437
 
34152
34438
  // src/controller/control/search-bar/search-bar-filter.controller.ts
@@ -34634,8 +34920,8 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
34634
34920
  }
34635
34921
 
34636
34922
  // src/controller/control/search-bar/search-bar-filter-items.controller.ts
34637
- import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
34638
- import { clone as clone29 } from "ramda";
34923
+ import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
34924
+ import { clone as clone33 } from "ramda";
34639
34925
  var SubFieldRegex2 = /^N_(.\w+)_(.\w+)$/;
34640
34926
  var SearchBarFilterItemsController = class extends SearchBarFilterController {
34641
34927
  constructor(filterModels, appDataEntity, context, params) {
@@ -34693,7 +34979,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
34693
34979
  return false;
34694
34980
  });
34695
34981
  if (!minorDEId) {
34696
- throw new RuntimeError60(
34982
+ throw new RuntimeError61(
34697
34983
  ibiz.i18n.t("runtime.controller.control.searchBar.noFoundEntity", {
34698
34984
  targetField
34699
34985
  })
@@ -34720,7 +35006,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
34720
35006
  const matches = subStr.match(SubFieldRegex2);
34721
35007
  const subField = matches[1];
34722
35008
  const subOP = matches[2];
34723
- const cloneItem = clone29(item);
35009
+ const cloneItem = clone33(item);
34724
35010
  cloneItem.defsearchMode.valueOP = subOP;
34725
35011
  cloneItem.id = subField;
34726
35012
  const filterC = new SearchBarFilterController(
@@ -35172,7 +35458,7 @@ var SearchBarController = class extends ControlController {
35172
35458
  }
35173
35459
  });
35174
35460
  if (addSearchBarFilters.length > 0) {
35175
- this.model = clone30(this.model);
35461
+ this.model = clone34(this.model);
35176
35462
  this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
35177
35463
  this.model.enableFilter = true;
35178
35464
  }
@@ -35892,7 +36178,7 @@ var TabExpPanelController = class extends ControlController {
35892
36178
 
35893
36179
  // src/controller/control/tree/tree.controller.ts
35894
36180
  import {
35895
- RuntimeError as RuntimeError61,
36181
+ RuntimeError as RuntimeError62,
35896
36182
  RuntimeModelError as RuntimeModelError66,
35897
36183
  recursiveIterate as recursiveIterate11
35898
36184
  } from "@ibiz-template/core";
@@ -36978,7 +37264,7 @@ var TreeController = class extends MDControlController {
36978
37264
  );
36979
37265
  }
36980
37266
  if (nodeData._nodeType !== "DE") {
36981
- throw new RuntimeError61(
37267
+ throw new RuntimeError62(
36982
37268
  ibiz.i18n.t("runtime.controller.control.tree.nodeData")
36983
37269
  );
36984
37270
  }
@@ -36996,7 +37282,7 @@ var TreeController = class extends MDControlController {
36996
37282
  let needRefresh = false;
36997
37283
  const treeNode = this.getNodeModel(item._nodeId);
36998
37284
  if (!treeNode) {
36999
- throw new RuntimeError61(
37285
+ throw new RuntimeError62(
37000
37286
  ibiz.i18n.t("runtime.controller.control.tree.noFoundTreeNode")
37001
37287
  );
37002
37288
  }
@@ -37042,7 +37328,7 @@ var TreeController = class extends MDControlController {
37042
37328
  };
37043
37329
 
37044
37330
  // src/controller/control/wizard-panel/wizard-panel.controller.ts
37045
- import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
37331
+ import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
37046
37332
 
37047
37333
  // src/controller/control/wizard-panel/wizard-panel.service.ts
37048
37334
  var WizardPanelService = class extends ControlService {
@@ -37230,7 +37516,7 @@ var WizardPanelController = class extends ControlController {
37230
37516
  const { activeFormTag } = this.state;
37231
37517
  const controller = this.formControllers.get(activeFormTag);
37232
37518
  if (!controller) {
37233
- throw new RuntimeError62(
37519
+ throw new RuntimeError63(
37234
37520
  ibiz.i18n.t("runtime.controller.control.wizardPanel.formController", {
37235
37521
  activeFormTag
37236
37522
  })
@@ -37280,7 +37566,7 @@ var WizardPanelController = class extends ControlController {
37280
37566
  getWizardFormByTag(tag) {
37281
37567
  var _a;
37282
37568
  if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
37283
- throw new RuntimeError62(
37569
+ throw new RuntimeError63(
37284
37570
  ibiz.i18n.t("runtime.controller.control.wizardPanel.noConfiguration")
37285
37571
  );
37286
37572
  return;
@@ -37291,7 +37577,7 @@ var WizardPanelController = class extends ControlController {
37291
37577
  }
37292
37578
  );
37293
37579
  if (!wizardForm) {
37294
- throw new RuntimeError62(
37580
+ throw new RuntimeError63(
37295
37581
  ibiz.i18n.t(
37296
37582
  "runtime.controller.control.wizardPanel.wizardFormIdentifier",
37297
37583
  { tag }
@@ -37383,7 +37669,7 @@ var WizardPanelController = class extends ControlController {
37383
37669
  prevTag = this.tagHistory[this.tagHistory.length - 1];
37384
37670
  }
37385
37671
  if (!prevTag) {
37386
- throw new RuntimeError62(
37672
+ throw new RuntimeError63(
37387
37673
  ibiz.i18n.t("runtime.controller.control.wizardPanel.noPreviousForm")
37388
37674
  );
37389
37675
  }
@@ -37421,7 +37707,7 @@ var WizardPanelController = class extends ControlController {
37421
37707
  });
37422
37708
  const nextWizardStep = wizardSteps[index + 1];
37423
37709
  if (!nextWizardStep) {
37424
- throw new RuntimeError62(
37710
+ throw new RuntimeError63(
37425
37711
  ibiz.i18n.t("runtime.controller.control.wizardPanel.nextStep")
37426
37712
  );
37427
37713
  }
@@ -37432,7 +37718,7 @@ var WizardPanelController = class extends ControlController {
37432
37718
  }
37433
37719
  }
37434
37720
  if (!nextTag) {
37435
- throw new RuntimeError62(
37721
+ throw new RuntimeError63(
37436
37722
  ibiz.i18n.t("runtime.controller.control.wizardPanel.nextForm")
37437
37723
  );
37438
37724
  }
@@ -37818,11 +38104,11 @@ var MDCtrlController = class extends MDControlController {
37818
38104
  };
37819
38105
 
37820
38106
  // src/controller/control/kanban/kanban.controller.ts
37821
- import { RuntimeError as RuntimeError63, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
37822
- import { clone as clone32, isNil as isNil33 } from "ramda";
38107
+ import { RuntimeError as RuntimeError64, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
38108
+ import { clone as clone36, isNil as isNil33 } from "ramda";
37823
38109
 
37824
38110
  // src/controller/control/kanban/kanban.service.ts
37825
- import { clone as clone31 } from "ramda";
38111
+ import { clone as clone35 } from "ramda";
37826
38112
  var KanbanService = class extends DataViewControlService {
37827
38113
  /**
37828
38114
  * 更新分组数据
@@ -37851,7 +38137,7 @@ var KanbanService = class extends DataViewControlService {
37851
38137
  */
37852
38138
  async moveOrderItem(context, data, args) {
37853
38139
  const moveAction = this.model.moveControlAction.appDEMethodId;
37854
- const params = clone31(data.getOrigin());
38140
+ const params = clone35(data.getOrigin());
37855
38141
  Object.assign(params, args);
37856
38142
  let res = await this.exec(moveAction, context, params, {
37857
38143
  srfupdateitem: true
@@ -37937,7 +38223,7 @@ var KanbanController = class extends DataViewControlController {
37937
38223
  } else {
37938
38224
  const toNum = Number(sortValue);
37939
38225
  if (Number.isNaN(toNum)) {
37940
- throw new RuntimeError63(
38226
+ throw new RuntimeError64(
37941
38227
  ibiz.i18n.t("runtime.controller.control.grid.convertedValue", {
37942
38228
  srfmajortext: item.srfmajortext
37943
38229
  })
@@ -38061,7 +38347,7 @@ var KanbanController = class extends DataViewControlController {
38061
38347
  }
38062
38348
  handleDataGroup() {
38063
38349
  if (!this.model.enableGroup || this.model.groupMode === "NONE") {
38064
- throw new RuntimeError63(
38350
+ throw new RuntimeError64(
38065
38351
  ibiz.i18n.t("runtime.controller.control.kanban.groupedOn")
38066
38352
  );
38067
38353
  }
@@ -38183,7 +38469,7 @@ var KanbanController = class extends DataViewControlController {
38183
38469
  }
38184
38470
  return moveData;
38185
38471
  };
38186
- const draggedItem = clone32(fromGroup.children[fromIndex]);
38472
+ const draggedItem = clone36(fromGroup.children[fromIndex]);
38187
38473
  const removeItems = fromGroup.children.splice(fromIndex, 1);
38188
38474
  toGroup.children.splice(toIndex, 0, ...removeItems);
38189
38475
  if (info.from !== info.to) {
@@ -38451,12 +38737,12 @@ var KanbanController = class extends DataViewControlController {
38451
38737
 
38452
38738
  // src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
38453
38739
  import {
38454
- RuntimeError as RuntimeError64,
38740
+ RuntimeError as RuntimeError65,
38455
38741
  RuntimeModelError as RuntimeModelError69,
38456
38742
  awaitTimeout as awaitTimeout3,
38457
38743
  recursiveIterate as recursiveIterate12
38458
38744
  } from "@ibiz-template/core";
38459
- import { clone as clone33 } from "ramda";
38745
+ import { clone as clone37 } from "ramda";
38460
38746
 
38461
38747
  // src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
38462
38748
  var TreeGridExService = class extends TreeService {
@@ -38736,13 +39022,13 @@ var TreeGridExController = class extends TreeController {
38736
39022
  return;
38737
39023
  }
38738
39024
  if (nodeData._nodeType !== "DE") {
38739
- throw new RuntimeError64(
39025
+ throw new RuntimeError65(
38740
39026
  ibiz.i18n.t("runtime.controller.control.gantt.nonentity")
38741
39027
  );
38742
39028
  }
38743
39029
  const rowState = this.state.rows[nodeData._uuid];
38744
39030
  if (!rowState) {
38745
- throw new RuntimeError64(
39031
+ throw new RuntimeError65(
38746
39032
  ibiz.i18n.t("runtime.controller.common.md.rowData")
38747
39033
  );
38748
39034
  }
@@ -38758,7 +39044,7 @@ var TreeGridExController = class extends TreeController {
38758
39044
  const { appDataEntityId, updateAppDEActionId } = nodeModel;
38759
39045
  const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
38760
39046
  if (isCreate) {
38761
- throw new RuntimeError64(
39047
+ throw new RuntimeError65(
38762
39048
  ibiz.i18n.t("runtime.controller.control.treeGridEx.noSupportCreation")
38763
39049
  );
38764
39050
  }
@@ -38923,12 +39209,12 @@ var TreeGridExController = class extends TreeController {
38923
39209
  (item) => item.showRowEdit
38924
39210
  );
38925
39211
  if (editingRow) {
38926
- throw new RuntimeError64(
39212
+ throw new RuntimeError65(
38927
39213
  ibiz.i18n.t("runtime.controller.control.grid.lineEditing")
38928
39214
  );
38929
39215
  }
38930
39216
  if (row.data._deData.srfuf === 1 /* UPDATE */) {
38931
- row.cacheData = clone33(row.data);
39217
+ row.cacheData = clone37(row.data);
38932
39218
  const defaultVal = this.calcDefaultValue(row.data, false);
38933
39219
  Object.assign(row.data, defaultVal);
38934
39220
  }
@@ -39038,10 +39324,10 @@ var TreeGridExColumnController = class {
39038
39324
  // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
39039
39325
  import {
39040
39326
  DataTypes as DataTypes5,
39041
- RuntimeError as RuntimeError65,
39327
+ RuntimeError as RuntimeError66,
39042
39328
  RuntimeModelError as RuntimeModelError70
39043
39329
  } from "@ibiz-template/core";
39044
- import { clone as clone34 } from "ramda";
39330
+ import { clone as clone38 } from "ramda";
39045
39331
  import dayjs7 from "dayjs";
39046
39332
  var TreeGridExNodeColumnController = class {
39047
39333
  /**
@@ -39243,7 +39529,7 @@ var TreeGridExNodeColumnController = class {
39243
39529
  const valueItem = this.nodeColumn.linkValueItem || "srfkey";
39244
39530
  const value = row.data[valueItem];
39245
39531
  if (value == null) {
39246
- throw new RuntimeError65(
39532
+ throw new RuntimeError66(
39247
39533
  ibiz.i18n.t("runtime.controller.control.treeGridEx.noPickedUp", {
39248
39534
  valueItem
39249
39535
  })
@@ -39258,7 +39544,7 @@ var TreeGridExNodeColumnController = class {
39258
39544
  srfkey: value,
39259
39545
  ...wfContext
39260
39546
  });
39261
- const tempParams = clone34(this.params);
39547
+ const tempParams = clone38(this.params);
39262
39548
  const { userParam } = this.nodeColumn;
39263
39549
  if (userParam) {
39264
39550
  const { navigateContexts, navigateParams } = parseUserParams(userParam);
@@ -39672,7 +39958,7 @@ var TreeGridService = class extends GridService {
39672
39958
  };
39673
39959
 
39674
39960
  // src/controller/control/medit-view-panel/medit-view-panel.controller.ts
39675
- import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
39961
+ import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
39676
39962
  import { createUUID as createUUID14 } from "qx-util";
39677
39963
 
39678
39964
  // src/controller/control/medit-view-panel/medit-view-panel.service.ts
@@ -39892,7 +40178,7 @@ var MEditViewPanelController = class extends MDControlController {
39892
40178
  (item) => item.id === id
39893
40179
  );
39894
40180
  if (panelUiItemIndex < 0) {
39895
- throw new RuntimeError66(
40181
+ throw new RuntimeError67(
39896
40182
  ibiz.i18n.t("runtime.controller.control.meditViewPanel.dataExist")
39897
40183
  );
39898
40184
  }
@@ -40135,15 +40421,14 @@ var ReportPanelBaseGenerator = class {
40135
40421
  this.config = {};
40136
40422
  this.model = model;
40137
40423
  this.reportPanel = reportPanel;
40138
- this.setConfig();
40139
40424
  }
40140
40425
  /**
40141
- * 设置配置
40426
+ * 初始化配置
40142
40427
  *
40143
- * @protected
40144
- * @memberof ReportPanelBaseGenerator
40428
+ * @author tony001
40429
+ * @date 2024-06-26 16:06:01
40145
40430
  */
40146
- setConfig() {
40431
+ async initConfig() {
40147
40432
  }
40148
40433
  /**
40149
40434
  * 初始化
@@ -40169,12 +40454,12 @@ var ReportPanelBaseGenerator = class {
40169
40454
  // src/controller/control/report-panel/generator/user-generator.ts
40170
40455
  var UserReportPanelGenerator = class extends ReportPanelBaseGenerator {
40171
40456
  /**
40172
- * 设置配置,临时使用,后续需更新 todo
40457
+ * 初始化配置
40173
40458
  *
40174
40459
  * @protected
40175
40460
  * @memberof UserReportPanelGenerator
40176
40461
  */
40177
- setConfig() {
40462
+ async initConfig() {
40178
40463
  this.config = {
40179
40464
  CONFIG: {
40180
40465
  fitView: true,
@@ -40232,32 +40517,16 @@ var User2ReportPanelGenerator = class extends ReportPanelBaseGenerator {
40232
40517
  };
40233
40518
 
40234
40519
  // src/controller/control/report-panel/generator/bi-generator.ts
40235
- import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
40236
40520
  var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
40237
40521
  /**
40238
- * 设置配置
40522
+ * 初始化配置
40239
40523
  *
40240
40524
  * @author tony001
40241
- * @date 2024-06-18 14:06:38
40242
- * @protected
40525
+ * @date 2024-06-26 16:06:54
40526
+ * @return {*} {Promise<void>}
40243
40527
  */
40244
- setConfig() {
40245
- var _a;
40246
- if (!((_a = this.model.appDEReport) == null ? void 0 : _a.reportUIModel)) {
40247
- throw new RuntimeError67(
40248
- ibiz.i18n.t("runtime.controller.control.reportPanel.noReportUIModel")
40249
- );
40250
- }
40251
- const sourceModel = ScriptFactory.execScriptFn(
40252
- {},
40253
- this.model.appDEReport.reportUIModel,
40254
- {
40255
- isAsync: false,
40256
- singleRowReturn: true
40257
- }
40258
- );
40259
- sourceModel.reportTag = this.model.appDEReport.id;
40260
- this.config = sourceModel;
40528
+ async initConfig() {
40529
+ this.config = this.translateReportToConfig(this.model);
40261
40530
  }
40262
40531
  /**
40263
40532
  * 加载数据
@@ -40273,6 +40542,71 @@ var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
40273
40542
  }
40274
40543
  return Promise.resolve(data);
40275
40544
  }
40545
+ /**
40546
+ * 转化报表数据到配置数据
40547
+ *
40548
+ * @author tony001
40549
+ * @date 2024-06-28 14:06:43
40550
+ * @private
40551
+ * @param {IModel} model
40552
+ * @return {*} {IData}
40553
+ */
40554
+ translateReportToConfig(model) {
40555
+ const config = {};
40556
+ const biReportDatas = {};
40557
+ const propertyData = {
40558
+ caption: model.logicName,
40559
+ data: biReportDatas
40560
+ };
40561
+ const { appDEReport } = model;
40562
+ console.log(appDEReport);
40563
+ config.reportTag = appDEReport.id;
40564
+ const tempAppBISchemeId = appDEReport.appBISchemeId.split(".").pop();
40565
+ config.selectedSchemeId = tempAppBISchemeId;
40566
+ const {
40567
+ appBICubeId,
40568
+ appBIReportDimensions,
40569
+ appBIReportMeasures,
40570
+ reportUIModel
40571
+ } = appDEReport.appBIReport;
40572
+ config.selectCubeId = "".concat(tempAppBISchemeId, ".").concat(appBICubeId);
40573
+ if (reportUIModel) {
40574
+ const reportUIModelObj = JSON.parse(reportUIModel);
40575
+ config.selectChartType = reportUIModelObj.selectChartType;
40576
+ propertyData.style = reportUIModelObj.style;
40577
+ } else {
40578
+ config.selectChartType = "NUMBER";
40579
+ }
40580
+ if (appBIReportMeasures && appBIReportMeasures.length > 0) {
40581
+ appBIReportMeasures.forEach((measure) => {
40582
+ if (!biReportDatas.measure) {
40583
+ biReportDatas.measure = [];
40584
+ }
40585
+ biReportDatas.measure.push({
40586
+ pssysbischemeid: tempAppBISchemeId,
40587
+ pssysbicubemeasureid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(measure.measureTag),
40588
+ pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
40589
+ codename: measure.measureTag
40590
+ });
40591
+ });
40592
+ }
40593
+ if (appBIReportDimensions && appBIReportDimensions.length > 0) {
40594
+ appBIReportDimensions.forEach((dimension) => {
40595
+ if (!biReportDatas.dimension) {
40596
+ biReportDatas.dimension = [];
40597
+ }
40598
+ biReportDatas.dimension.push({
40599
+ pssysbischemeid: tempAppBISchemeId,
40600
+ pssysbicubedimensionid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(dimension.dimensionTag),
40601
+ pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
40602
+ codename: dimension.dimensionTag,
40603
+ pscodelistid: dimension.appCodeListId
40604
+ });
40605
+ });
40606
+ }
40607
+ config.propertyData = propertyData;
40608
+ return config;
40609
+ }
40276
40610
  };
40277
40611
 
40278
40612
  // src/controller/control/report-panel/generator/generator-factory.ts
@@ -40363,6 +40697,9 @@ var ReportPanelController = class extends ControlController {
40363
40697
  async onCreated() {
40364
40698
  await super.onCreated();
40365
40699
  this.generator = ReportPanelGeneratorFactory.getInstance(this.model, this);
40700
+ if (this.generator) {
40701
+ await this.generator.initConfig();
40702
+ }
40366
40703
  this.dataEntity = await ibiz.hub.getAppDataEntity(
40367
40704
  this.model.appDataEntityId,
40368
40705
  this.model.appId
@@ -41527,7 +41864,7 @@ import { QXEvent as QXEvent11 } from "qx-util";
41527
41864
 
41528
41865
  // src/controller/notification/async-action.controller.ts
41529
41866
  import { QXEvent as QXEvent9 } from "qx-util";
41530
- import { clone as clone35 } from "ramda";
41867
+ import { clone as clone39 } from "ramda";
41531
41868
  import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
41532
41869
  import dayjs8 from "dayjs";
41533
41870
  var AsyncActionController = class {
@@ -41638,7 +41975,7 @@ var AsyncActionController = class {
41638
41975
  } else {
41639
41976
  this.noticeResult(action);
41640
41977
  }
41641
- this.evt.emit("add", clone35(action));
41978
+ this.evt.emit("add", clone39(action));
41642
41979
  this.evt.emit("dataChange");
41643
41980
  }
41644
41981
  /**
@@ -41660,7 +41997,7 @@ var AsyncActionController = class {
41660
41997
  }
41661
41998
  this.noticeResult(action);
41662
41999
  }
41663
- this.evt.emit("change", clone35(action));
42000
+ this.evt.emit("change", clone39(action));
41664
42001
  this.evt.emit("dataChange");
41665
42002
  }
41666
42003
  noticeResult(action) {
@@ -42302,6 +42639,11 @@ var AppHub = class {
42302
42639
  const app = await this.getAppAsync(appId2);
42303
42640
  return app.deService.getService(context, entityId);
42304
42641
  }
42642
+ async translationModelToDsl(data, type) {
42643
+ if (this.modelLoaderProvider) {
42644
+ return this.modelLoaderProvider.translationModelToDsl(data, type);
42645
+ }
42646
+ }
42305
42647
  reset() {
42306
42648
  this.appMap.clear();
42307
42649
  this.configCache = void 0;
@@ -42820,7 +43162,7 @@ var ViewEngineBase = class {
42820
43162
 
42821
43163
  // src/engine/md-view.engine.ts
42822
43164
  import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
42823
- import { clone as clone36 } from "ramda";
43165
+ import { clone as clone40 } from "ramda";
42824
43166
  var MDViewEngine = class extends ViewEngineBase {
42825
43167
  /**
42826
43168
  * 多数据部件名称
@@ -43075,7 +43417,7 @@ var MDViewEngine = class extends ViewEngineBase {
43075
43417
  ibiz.i18n.t("runtime.engine.logicNewdata")
43076
43418
  );
43077
43419
  }
43078
- const params = clone36(this.view.params);
43420
+ const params = clone40(this.view.params);
43079
43421
  if (copyMode) {
43080
43422
  params.srfcopymode = copyMode;
43081
43423
  }
@@ -43323,6 +43665,13 @@ var GlobalUtil = class {
43323
43665
  * @memberof GlobalUtil
43324
43666
  */
43325
43667
  this.file = new FileUtil();
43668
+ /**
43669
+ * bi报表工具类
43670
+ *
43671
+ * @author tony001
43672
+ * @date 2024-06-30 11:06:13
43673
+ */
43674
+ this.biReport = new BIReportUtil();
43326
43675
  this.error.register(new DefaultErrorHandler());
43327
43676
  }
43328
43677
  /**
@@ -45788,6 +46137,7 @@ export {
45788
46137
  Application,
45789
46138
  AsyncActionService,
45790
46139
  AuthorityService,
46140
+ BIReportUtil,
45791
46141
  BackendUIActionProvider,
45792
46142
  BaseController,
45793
46143
  BrowserPlatformProvider,