@ibiz-template/runtime 0.6.14 → 0.6.15

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 (37) hide show
  1. package/dist/index.esm.js +463 -226
  2. package/dist/index.system.min.js +1 -1
  3. package/out/controller/common/control/control.controller.d.ts +58 -1
  4. package/out/controller/common/control/control.controller.d.ts.map +1 -1
  5. package/out/controller/common/control/control.controller.js +111 -2
  6. package/out/controller/common/control/md-control.controller.d.ts +16 -22
  7. package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
  8. package/out/controller/common/control/md-control.controller.js +59 -48
  9. package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
  10. package/out/controller/control/chart/generator/base-series-generator.js +1 -0
  11. package/out/controller/control/form/edit-form/edit-form.controller.d.ts +11 -0
  12. package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
  13. package/out/controller/control/form/edit-form/edit-form.controller.js +37 -7
  14. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  15. package/out/controller/control/grid/grid/grid.controller.js +2 -0
  16. package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +4 -4
  17. package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
  18. package/out/controller/control/md-ctrl/md-ctrl.controller.js +3 -1
  19. package/out/controller/control/report-panel/report-panel.controller.d.ts.map +1 -1
  20. package/out/controller/control/report-panel/report-panel.controller.js +3 -1
  21. package/out/controller/control/tree/tree.controller.d.ts +11 -1
  22. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  23. package/out/controller/control/tree/tree.controller.js +32 -2
  24. package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -1
  25. package/out/controller/utils/data-file-util/data-file-util.js +1 -1
  26. package/out/engine/md-view.engine.d.ts +24 -1
  27. package/out/engine/md-view.engine.d.ts.map +1 -1
  28. package/out/engine/md-view.engine.js +60 -7
  29. package/out/model/utils/util.d.ts +9 -0
  30. package/out/model/utils/util.d.ts.map +1 -1
  31. package/out/model/utils/util.js +12 -0
  32. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +1 -0
  33. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
  34. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +12 -5
  35. package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
  36. package/out/ui-action/provider/front-ui-action-provider.js +6 -2
  37. package/package.json +4 -4
package/dist/index.esm.js CHANGED
@@ -831,6 +831,10 @@ function findAppDEMethod(appDataEntity, id) {
831
831
  }
832
832
  return null;
833
833
  }
834
+ function getCtrlTeleportTag(control) {
835
+ var _a, _b;
836
+ return (_b = (_a = control.controlParam) == null ? void 0 : _a.ctrlParams) == null ? void 0 : _b.TELEPORTTAG;
837
+ }
834
838
 
835
839
  // src/model/layout/layout.ts
836
840
  import { isArray as isArray2, isObject, isString } from "lodash-es";
@@ -6581,6 +6585,14 @@ var DynamicCodeListCache = class {
6581
6585
  result.cls = cls;
6582
6586
  return result;
6583
6587
  }
6588
+ sortShoworder(arr) {
6589
+ arr.forEach((item) => {
6590
+ if (!("showorder" in item)) {
6591
+ Object.assign(item, { showorder: 1e3 });
6592
+ }
6593
+ });
6594
+ return arr.sort((a, b) => a.showorder - b.showorder);
6595
+ }
6584
6596
  /**
6585
6597
  * 加载服务获取数据,返回代码项
6586
6598
  *
@@ -6626,13 +6638,10 @@ var DynamicCodeListCache = class {
6626
6638
  tempParams
6627
6639
  );
6628
6640
  const presetresultItems = [];
6629
- if (res2.data.items.every((item) => "showorder" in item)) {
6630
- return res2.data.items.sort(
6631
- (a, b) => (b.showorder || 0) - (a.showorder || 0)
6632
- );
6633
- }
6634
- if (res2.data.items.length) {
6635
- res2.data.items.forEach((item) => {
6641
+ const { items } = res2.data;
6642
+ const sortItems = this.sortShoworder(items);
6643
+ if (sortItems.length) {
6644
+ items.forEach((item) => {
6636
6645
  presetresultItems.push(this.presetconvertData(item));
6637
6646
  });
6638
6647
  }
@@ -13413,7 +13422,7 @@ function installCommand() {
13413
13422
  }
13414
13423
 
13415
13424
  // src/app-hub.ts
13416
- import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
13425
+ import { RuntimeError as RuntimeError68 } from "@ibiz-template/core";
13417
13426
 
13418
13427
  // src/application.ts
13419
13428
  import { Net, getToken } from "@ibiz-template/core";
@@ -14673,7 +14682,8 @@ async function asyncImportData(file, appDataEntity, dataImport, context) {
14673
14682
  await listenAsyncAction(res.data.asyncacitonid);
14674
14683
  ibiz.mc.command.send(
14675
14684
  { srfdecodename: appDataEntity.codeName },
14676
- "OBJECTCREATED"
14685
+ "OBJECTCREATED",
14686
+ "DATAIMPORT"
14677
14687
  );
14678
14688
  }
14679
14689
  async function importData(file, appDataEntity, dataImport, context) {
@@ -15803,7 +15813,8 @@ import {
15803
15813
  HttpError as HttpError6,
15804
15814
  IBizContext as IBizContext3,
15805
15815
  IBizParams,
15806
- NoticeError as NoticeError2
15816
+ NoticeError as NoticeError2,
15817
+ RuntimeError as RuntimeError35
15807
15818
  } from "@ibiz-template/core";
15808
15819
  import { clone as clone18, isNil as isNil23 } from "ramda";
15809
15820
  import { notNilEmpty as notNilEmpty7 } from "qx-util";
@@ -15840,6 +15851,28 @@ var ControlController = class extends BaseController {
15840
15851
  * @type {{ [key: string]: IProvider }}
15841
15852
  */
15842
15853
  this.providers = {};
15854
+ /**
15855
+ * 触发源key
15856
+ *
15857
+ * @author tony001
15858
+ * @date 2024-03-28 17:03:03
15859
+ * @type {string}
15860
+ */
15861
+ this.triggerKey = "";
15862
+ /**
15863
+ * 等到激活的回调函数集合
15864
+ *
15865
+ * @author tony001
15866
+ * @date 2024-03-28 17:03:15
15867
+ */
15868
+ this.awaitActiveCbs = /* @__PURE__ */ new Map();
15869
+ /**
15870
+ * 延迟执行(防抖用)
15871
+ *
15872
+ * @author tony001
15873
+ * @date 2024-03-28 17:03:27
15874
+ */
15875
+ this.delayCbs = /* @__PURE__ */ new Map();
15843
15876
  this.registerToCtx();
15844
15877
  this.controlPanel = getControlPanel(model);
15845
15878
  if (!this.controlPanel) {
@@ -15905,6 +15938,12 @@ var ControlController = class extends BaseController {
15905
15938
  );
15906
15939
  });
15907
15940
  }
15941
+ if (this.model.appDataEntityId) {
15942
+ const codeName = calcDeCodeNameById(this.model.appDataEntityId);
15943
+ this.triggerKey = "".concat(codeName, "@").concat(this.model.controlType, "@").concat(this.model.codeName);
15944
+ }
15945
+ this.onDEDataChange = this.onDEDataChange.bind(this);
15946
+ ibiz.mc.command.change.on(this.onDEDataChange);
15908
15947
  }
15909
15948
  async onMounted() {
15910
15949
  var _a;
@@ -15912,6 +15951,7 @@ var ControlController = class extends BaseController {
15912
15951
  (_a = this.scheduler) == null ? void 0 : _a.startTimerTrigger();
15913
15952
  }
15914
15953
  async onDestroyed() {
15954
+ ibiz.mc.command.change.off(this.onDEDataChange);
15915
15955
  await super.onDestroyed();
15916
15956
  if (this.scheduler) {
15917
15957
  this.scheduler.destroy();
@@ -15992,6 +16032,12 @@ var ControlController = class extends BaseController {
15992
16032
  */
15993
16033
  onActivated() {
15994
16034
  this.state.activated = true;
16035
+ if (this.awaitActiveCbs.size > 0) {
16036
+ this.awaitActiveCbs.forEach((cb) => {
16037
+ cb();
16038
+ });
16039
+ }
16040
+ this.awaitActiveCbs.clear();
15995
16041
  ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u6FC0\u6D3B"));
15996
16042
  }
15997
16043
  /**
@@ -16140,22 +16186,82 @@ var ControlController = class extends BaseController {
16140
16186
  ibiz.message.success(message, duration, duration === 0);
16141
16187
  }
16142
16188
  }
16189
+ /**
16190
+ * 监听实体数据变更
16191
+ *
16192
+ * @author tony001
16193
+ * @date 2024-03-28 18:03:33
16194
+ * @protected
16195
+ * @param {IPortalMessage} msg
16196
+ */
16197
+ onDEDataChange(msg) {
16198
+ ibiz.log.debug("onDEDataChange", msg);
16199
+ }
16200
+ /**
16201
+ * 触发实体数据变更的通知
16202
+ *
16203
+ * @author tony001
16204
+ * @date 2024-03-28 18:03:44
16205
+ * @param {('create' | 'update' | 'remove')} type
16206
+ * @param {IData} data
16207
+ */
16208
+ emitDEDataChange(type, data) {
16209
+ const msg = data instanceof ControlVO ? data.$origin : data;
16210
+ const meta = { triggerKey: this.triggerKey };
16211
+ switch (type) {
16212
+ case "create":
16213
+ ibiz.mc.command.create.send(msg, meta);
16214
+ break;
16215
+ case "update":
16216
+ ibiz.mc.command.update.send(msg, meta);
16217
+ break;
16218
+ case "remove":
16219
+ ibiz.mc.command.remove.send(msg, meta);
16220
+ break;
16221
+ default:
16222
+ throw new RuntimeError35("\u4E0D\u652F\u6301\u7684\u5B9E\u4F53\u6570\u636E\u53D8\u66F4\u7C7B\u578B: ".concat(type));
16223
+ }
16224
+ }
16225
+ /**
16226
+ * 如果当前视图没有激活,则等待激活后执行回调函数
16227
+ * - 在执行之前key相同的会替换
16228
+ * 如果当前视图已经激活,则立即执行回调函数
16229
+ * - delay参数指定延迟执行时间,可以防抖
16230
+ *
16231
+ * @author tony001
16232
+ * @date 2024-03-28 18:03:00
16233
+ * @param {() => void} cb
16234
+ * @param {{ key: string; delay?: number }} opts
16235
+ */
16236
+ doNextActive(cb, opts) {
16237
+ if (isNil23(opts.delay)) {
16238
+ opts.delay = 300;
16239
+ }
16240
+ if (this.state.activated === false) {
16241
+ this.awaitActiveCbs.set(opts.key, cb);
16242
+ } else if (opts.delay) {
16243
+ const _timer = this.delayCbs.get(opts.key);
16244
+ clearTimeout(_timer);
16245
+ const timer = setTimeout(() => {
16246
+ cb();
16247
+ clearTimeout(this.delayCbs.get(opts.key));
16248
+ }, opts.delay);
16249
+ this.delayCbs.set(opts.key, timer);
16250
+ } else {
16251
+ cb();
16252
+ }
16253
+ }
16143
16254
  };
16144
16255
 
16145
16256
  // src/controller/common/control/md-control.controller.ts
16146
- import { isElementSame, RuntimeError as RuntimeError35 } from "@ibiz-template/core";
16147
- import { debounce } from "lodash-es";
16257
+ import {
16258
+ isElementSame,
16259
+ RuntimeError as RuntimeError36
16260
+ } from "@ibiz-template/core";
16261
+ import { isNil as isNil24 } from "ramda";
16148
16262
  var MDControlController = class extends ControlController {
16149
16263
  constructor() {
16150
16264
  super(...arguments);
16151
- /**
16152
- * 在未激活时记录是否有 command 数据变更事件,有就记录。等待激活时刷新
16153
- *
16154
- * @author chitanda
16155
- * @date 2023-12-13 11:12:19
16156
- * @protected
16157
- */
16158
- this.commandDataChange = false;
16159
16265
  /**
16160
16266
  * 是否设置过排序条件,比如searchBars默认点击分组时设置了
16161
16267
  * @return {*}
@@ -16229,11 +16335,6 @@ var MDControlController = class extends ControlController {
16229
16335
  (_a = this.dataEntity.appDEFields) == null ? void 0 : _a.forEach((field) => {
16230
16336
  this.fieldIdNameMap.set(field.id, field.name);
16231
16337
  });
16232
- const fn = this.onDataChange.bind(this);
16233
- this.onDataChange = debounce((msg) => {
16234
- fn(msg);
16235
- }, 300);
16236
- ibiz.mc.command.change.on(this.onDataChange);
16237
16338
  if (!this.isSetSort) {
16238
16339
  this.setSort();
16239
16340
  }
@@ -16244,34 +16345,6 @@ var MDControlController = class extends ControlController {
16244
16345
  this.load({ isInitialLoad: true });
16245
16346
  }
16246
16347
  }
16247
- onDestroyed() {
16248
- ibiz.mc.command.change.off(this.onDataChange);
16249
- return super.onDestroyed();
16250
- }
16251
- /**
16252
- * 当数据放生变更时,若为当前应用实体数据。则多数据部件进行刷新
16253
- *
16254
- * @author chitanda
16255
- * @date 2023-09-13 17:09:04
16256
- * @protected
16257
- * @param {IData} msg
16258
- */
16259
- onDataChange(msg) {
16260
- if (msg.data && msg.data.srfdecodename === this.dataEntity.codeName) {
16261
- if (this.state.activated) {
16262
- this.refresh();
16263
- } else {
16264
- this.commandDataChange = true;
16265
- }
16266
- }
16267
- }
16268
- onActivated() {
16269
- super.onActivated();
16270
- if (this.commandDataChange) {
16271
- this.refresh();
16272
- this.commandDataChange = false;
16273
- }
16274
- }
16275
16348
  /**
16276
16349
  * 获取部件默认排序模型
16277
16350
  * @return {*}
@@ -16418,12 +16491,16 @@ var MDControlController = class extends ControlController {
16418
16491
  return items;
16419
16492
  }
16420
16493
  /**
16421
- * 部件刷新,走初始加载
16422
- * @author lxm
16423
- * @date 2023-05-23 03:42:41
16494
+ * 部件刷新,走初始加载(规避预置后续刷新和通知刷新同时进行)
16495
+ *
16496
+ * @author tony001
16497
+ * @date 2024-03-28 18:03:00
16498
+ * @return {*} {Promise<void>}
16424
16499
  */
16425
16500
  async refresh() {
16426
- await this.load({ isInitialLoad: false });
16501
+ this.doNextActive(() => this.load({ isInitialLoad: false }), {
16502
+ key: "refresh"
16503
+ });
16427
16504
  }
16428
16505
  /**
16429
16506
  * 删除选中的数据
@@ -16435,7 +16512,7 @@ var MDControlController = class extends ControlController {
16435
16512
  async remove(args) {
16436
16513
  const { context, params, data } = this.handlerAbilityParams(args);
16437
16514
  if (!(data == null ? void 0 : data.length)) {
16438
- throw new RuntimeError35("\u672A\u9009\u4E2D\u6570\u636E");
16515
+ throw new RuntimeError36("\u672A\u9009\u4E2D\u6570\u636E");
16439
16516
  }
16440
16517
  if ((args == null ? void 0 : args.silent) !== true) {
16441
16518
  const del = await ibiz.confirm.error({
@@ -16477,6 +16554,9 @@ var MDControlController = class extends ControlController {
16477
16554
  }
16478
16555
  this.state.selectedData = [];
16479
16556
  await this._evt.emit("onRemoveSuccess", void 0);
16557
+ data.forEach((item) => {
16558
+ this.emitDEDataChange("remove", item);
16559
+ });
16480
16560
  }
16481
16561
  /**
16482
16562
  * 删除每一项
@@ -16595,7 +16675,7 @@ var MDControlController = class extends ControlController {
16595
16675
  (importItem) => importItem.id === dedataImportId
16596
16676
  );
16597
16677
  if (!dataImport) {
16598
- throw new RuntimeError35("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
16678
+ throw new RuntimeError36("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
16599
16679
  }
16600
16680
  let importName = "DataImport";
16601
16681
  if (dataImport.enableCustomized) {
@@ -16627,12 +16707,53 @@ var MDControlController = class extends ControlController {
16627
16707
  */
16628
16708
  async exportData(_args) {
16629
16709
  }
16710
+ /**
16711
+ * 检测实体数据变更
16712
+ *
16713
+ * @author tony001
16714
+ * @date 2024-03-28 18:03:30
16715
+ * @protected
16716
+ * @param {IPortalMessage} msg
16717
+ * @return {*} {void}
16718
+ */
16719
+ onDEDataChange(msg) {
16720
+ if (!isNil24(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
16721
+ return;
16722
+ }
16723
+ if (!msg.data || msg.data.srfdecodename !== this.dataEntity.codeName) {
16724
+ return;
16725
+ }
16726
+ let isRefresh = false;
16727
+ const { srfkey } = msg.data;
16728
+ switch (msg.subtype) {
16729
+ case "OBJECTCREATED":
16730
+ isRefresh = true;
16731
+ break;
16732
+ case "OBJECTUPDATED":
16733
+ if (this.state.items.findIndex((item) => item.srfkey === srfkey) !== -1) {
16734
+ isRefresh = true;
16735
+ }
16736
+ break;
16737
+ case "OBJECTREMOVED":
16738
+ if (this.state.items.findIndex((item) => item.srfkey === srfkey) !== -1) {
16739
+ isRefresh = true;
16740
+ }
16741
+ break;
16742
+ default:
16743
+ break;
16744
+ }
16745
+ if (isRefresh) {
16746
+ this.doNextActive(() => this.load({ isInitialLoad: !!ibiz.env.isMob }), {
16747
+ key: "refresh"
16748
+ });
16749
+ }
16750
+ }
16630
16751
  };
16631
16752
 
16632
16753
  // src/controller/control/app-menu/app-menu.controller.ts
16633
16754
  import {
16634
16755
  findRecursiveChild,
16635
- RuntimeError as RuntimeError36,
16756
+ RuntimeError as RuntimeError37,
16636
16757
  RuntimeModelError as RuntimeModelError26
16637
16758
  } from "@ibiz-template/core";
16638
16759
  var AppMenuController = class extends ControlController {
@@ -16701,7 +16822,7 @@ var AppMenuController = class extends ControlController {
16701
16822
  childrenFields: ["appMenuItems"]
16702
16823
  });
16703
16824
  if (!menuItem) {
16704
- throw new RuntimeError36("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16825
+ throw new RuntimeError37("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16705
16826
  }
16706
16827
  this.evt.emit("onClick", {
16707
16828
  eventArg: id,
@@ -16831,7 +16952,7 @@ var AppMenuController = class extends ControlController {
16831
16952
  // src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
16832
16953
  import {
16833
16954
  findRecursiveChild as findRecursiveChild2,
16834
- RuntimeError as RuntimeError37,
16955
+ RuntimeError as RuntimeError38,
16835
16956
  RuntimeModelError as RuntimeModelError27
16836
16957
  } from "@ibiz-template/core";
16837
16958
  var AppMenuIconViewController = class extends AppMenuController {
@@ -16841,7 +16962,7 @@ var AppMenuIconViewController = class extends AppMenuController {
16841
16962
  childrenFields: ["appMenuItems"]
16842
16963
  });
16843
16964
  if (!menuItem) {
16844
- throw new RuntimeError37("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16965
+ throw new RuntimeError38("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16845
16966
  }
16846
16967
  this.evt.emit("onClick", {
16847
16968
  eventArg: id,
@@ -16870,7 +16991,7 @@ import dayjs3 from "dayjs";
16870
16991
  import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
16871
16992
 
16872
16993
  // src/controller/control/calendar/calendar.service.ts
16873
- import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
16994
+ import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
16874
16995
  import { clone as clone19 } from "ramda";
16875
16996
  var CalendarService = class extends MDControlService {
16876
16997
  /**
@@ -16926,11 +17047,11 @@ var CalendarService = class extends MDControlService {
16926
17047
  setCalendarConfigData(items, index) {
16927
17048
  const { sysCalendarItems } = this.model;
16928
17049
  if (!sysCalendarItems) {
16929
- throw new RuntimeError38("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
17050
+ throw new RuntimeError39("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16930
17051
  }
16931
17052
  const calendarItem = sysCalendarItems[index];
16932
17053
  if (!calendarItem) {
16933
- throw new RuntimeError38("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
17054
+ throw new RuntimeError39("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16934
17055
  }
16935
17056
  return items.map((item) => {
16936
17057
  return new CalendarItemData(calendarItem, item);
@@ -17211,11 +17332,11 @@ var CalendarController = class extends MDControlController {
17211
17332
  };
17212
17333
 
17213
17334
  // src/controller/control/chart/chart.controller.ts
17214
- import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
17335
+ import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
17215
17336
 
17216
17337
  // src/controller/control/chart/generator/chart-options-generator.ts
17217
17338
  import { mergeDeepRight as mergeDeepRight3 } from "ramda";
17218
- import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
17339
+ import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
17219
17340
 
17220
17341
  // src/controller/control/chart/generator/line-series-generator.ts
17221
17342
  import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
@@ -17228,7 +17349,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
17228
17349
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
17229
17350
  import weekOfYear from "dayjs/plugin/weekOfYear";
17230
17351
  import isoWeek from "dayjs/plugin/isoWeek";
17231
- import { clone as clone20, isNil as isNil24, mergeDeepRight } from "ramda";
17352
+ import { clone as clone20, isNil as isNil25, mergeDeepRight } from "ramda";
17232
17353
  dayjs4.extend(minMax2);
17233
17354
  dayjs4.extend(isSameOrBefore);
17234
17355
  dayjs4.extend(quarterOfYear);
@@ -17324,10 +17445,10 @@ var BaseSeriesGenerator = class {
17324
17445
  * @return {*} {(string | undefined)}
17325
17446
  */
17326
17447
  translateVal(codeListKey, val, isExclude = false) {
17327
- if (isNil24(val)) {
17448
+ if (isNil25(val)) {
17328
17449
  return void 0;
17329
17450
  }
17330
- if (isNil24(codeListKey)) {
17451
+ if (isNil25(codeListKey)) {
17331
17452
  return val;
17332
17453
  }
17333
17454
  const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
@@ -17336,6 +17457,7 @@ var BaseSeriesGenerator = class {
17336
17457
  if (find) {
17337
17458
  return find.text;
17338
17459
  }
17460
+ return "\u672A\u5B9A\u4E49";
17339
17461
  }
17340
17462
  return isExclude ? void 0 : val;
17341
17463
  }
@@ -17376,7 +17498,7 @@ var BaseSeriesGenerator = class {
17376
17498
  seriesCodeListId,
17377
17499
  item[this.groupField]
17378
17500
  );
17379
- if (isNil24(groupVal)) {
17501
+ if (isNil25(groupVal)) {
17380
17502
  return;
17381
17503
  }
17382
17504
  group = groupVal;
@@ -18224,7 +18346,7 @@ var ChartOptionsGenerator2 = class {
18224
18346
  getChartDataByParams(params) {
18225
18347
  const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
18226
18348
  if (!generator) {
18227
- throw new RuntimeError39("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
18349
+ throw new RuntimeError40("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
18228
18350
  }
18229
18351
  return generator.getChartDataByParams(params);
18230
18352
  }
@@ -18338,10 +18460,10 @@ var ChartController = class extends MDControlController {
18338
18460
  */
18339
18461
  updateChart() {
18340
18462
  if (!this.chart) {
18341
- throw new RuntimeError40("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
18463
+ throw new RuntimeError41("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
18342
18464
  }
18343
18465
  if (!this.options) {
18344
- throw new RuntimeError40("options\u8FD8\u6CA1\u8BA1\u7B97");
18466
+ throw new RuntimeError41("options\u8FD8\u6CA1\u8BA1\u7B97");
18345
18467
  }
18346
18468
  this.chart.setOption(this.options, { notMerge: true });
18347
18469
  this.resizeChart();
@@ -18391,7 +18513,7 @@ var CaptionBarController = class extends ControlController {
18391
18513
  };
18392
18514
 
18393
18515
  // src/controller/control/toolbar/toolbar.controllerr.ts
18394
- import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError49 } from "@ibiz-template/core";
18516
+ import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError50 } from "@ibiz-template/core";
18395
18517
 
18396
18518
  // src/ui-action/provider/backend-ui-action-provider.ts
18397
18519
  import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
@@ -18401,7 +18523,7 @@ import { isArray as isArray8 } from "qx-util";
18401
18523
  import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
18402
18524
 
18403
18525
  // src/ui-logic/index.ts
18404
- import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
18526
+ import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
18405
18527
 
18406
18528
  // src/ui-logic/ui-logic.ts
18407
18529
  import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
@@ -18987,7 +19109,7 @@ var EndNode2 = class extends UILogicNode {
18987
19109
  };
18988
19110
 
18989
19111
  // src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
18990
- import { ModelError as ModelError22, RuntimeError as RuntimeError41 } from "@ibiz-template/core";
19112
+ import { ModelError as ModelError22, RuntimeError as RuntimeError42 } from "@ibiz-template/core";
18991
19113
  import { clone as clone22 } from "ramda";
18992
19114
  var PrepareJSParamNode = class extends UILogicNode {
18993
19115
  async exec(ctx) {
@@ -19047,7 +19169,7 @@ var PrepareJSParamNode = class extends UILogicNode {
19047
19169
  setParamValue(nodeParam, ctx) {
19048
19170
  const { dstFieldName, dstDEUILogicParamId } = nodeParam;
19049
19171
  if (!dstDEUILogicParamId) {
19050
- throw new RuntimeError41("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
19172
+ throw new RuntimeError42("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
19051
19173
  }
19052
19174
  let dstField = dstFieldName;
19053
19175
  if (ctx.isEntityParam(dstDEUILogicParamId)) {
@@ -19164,7 +19286,7 @@ var PrepareJSParamNode = class extends UILogicNode {
19164
19286
  };
19165
19287
 
19166
19288
  // src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
19167
- import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
19289
+ import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
19168
19290
  import { isFunction } from "lodash-es";
19169
19291
  var ViewCtrlInvokeNode = class extends UILogicNode {
19170
19292
  async exec(ctx) {
@@ -19181,14 +19303,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
19181
19303
  }
19182
19304
  const invokeParam = ctx.params[invokeParamId];
19183
19305
  if (!invokeParam) {
19184
- throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
19306
+ throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
19185
19307
  }
19186
19308
  const invokeCtrl = ctx.params[invokeCtrlId];
19187
19309
  if (!invokeCtrl) {
19188
- throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
19310
+ throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
19189
19311
  }
19190
19312
  if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
19191
- throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
19313
+ throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
19192
19314
  }
19193
19315
  ibiz.log.debug(
19194
19316
  "\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u89C6\u56FE\u90E8\u4EF6\u8C03\u7528\uFF09\uFF1A".concat(this.model.id, "-\u8C03\u7528\u89C6\u56FE\u90E8\u4EF6\u540D\u79F0\uFF1A").concat(invokeCtrlId, "-\u8C03\u7528\u65B9\u6CD5\u540D\u79F0\uFF1A").concat(invokeMethod, "-\u89E6\u53D1\u53C2\u6570\uFF1A"),
@@ -19458,19 +19580,19 @@ var DataSetNode2 = class extends UILogicNode {
19458
19580
  };
19459
19581
 
19460
19582
  // src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
19461
- import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
19583
+ import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
19462
19584
  var ThrowExceptionNode2 = class extends UILogicNode {
19463
19585
  async exec(_ctx) {
19464
19586
  const { errorInfo } = this.model;
19465
19587
  ibiz.log.debug(
19466
19588
  "\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u629B\u51FA\u5F02\u5E38\uFF09\uFF1A".concat(this.model.id, "-\u9519\u8BEF\u4FE1\u606F\uFF1A").concat(errorInfo)
19467
19589
  );
19468
- throw new RuntimeError43(errorInfo);
19590
+ throw new RuntimeError44(errorInfo);
19469
19591
  }
19470
19592
  };
19471
19593
 
19472
19594
  // src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
19473
- import { RuntimeError as RuntimeError44, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
19595
+ import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
19474
19596
  var ViewCtrlFireEventNode = class extends UILogicNode {
19475
19597
  async exec(ctx) {
19476
19598
  ctx.isEndNode = true;
@@ -19486,11 +19608,11 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
19486
19608
  }
19487
19609
  const invokeCtrl = ctx.params[fireCtrlId];
19488
19610
  if (!invokeCtrl) {
19489
- throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
19611
+ throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
19490
19612
  }
19491
19613
  const eventParam = ctx.params[eventParamId];
19492
19614
  if (!eventParam) {
19493
- throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
19615
+ throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
19494
19616
  }
19495
19617
  ibiz.log.debug(
19496
19618
  "\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u89C6\u56FE\u90E8\u4EF6\u4E8B\u4EF6\u89E6\u53D1\u903B\u8F91\uFF09\uFF1A".concat(this.model.id, "-\u8C03\u7528\u89C6\u56FE\u90E8\u4EF6\u540D\u79F0\uFF1A").concat(fireCtrlId, "-\u89E6\u53D1\u4E8B\u4EF6\u540D\u79F0\uFF1A").concat(eventName, "-\u89E6\u53D1\u53C2\u6570\uFF1A"),
@@ -19501,7 +19623,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
19501
19623
  };
19502
19624
 
19503
19625
  // src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
19504
- import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
19626
+ import { RuntimeError as RuntimeError46, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
19505
19627
  var ExecuteDELogicNode = class extends UILogicNode {
19506
19628
  async exec(ctx) {
19507
19629
  const {
@@ -19521,7 +19643,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
19521
19643
  }
19522
19644
  const dstParam = ctx.params[dstDEUILogicParamId];
19523
19645
  if (!dstParam) {
19524
- throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
19646
+ throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
19525
19647
  }
19526
19648
  const result = await execDELogicById(
19527
19649
  dstAppDELogicId,
@@ -19859,7 +19981,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
19859
19981
  const app = ibiz.hub.getApp(parameters.context.srfappid);
19860
19982
  const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
19861
19983
  if (!deUILogic) {
19862
- throw new RuntimeError46(
19984
+ throw new RuntimeError47(
19863
19985
  "\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
19864
19986
  );
19865
19987
  }
@@ -19878,7 +20000,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
19878
20000
  }
19879
20001
 
19880
20002
  // src/ui-action/uiaction-util.ts
19881
- import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
20003
+ import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
19882
20004
  var UIActionUtil = class {
19883
20005
  /**
19884
20006
  * 执行界面行为
@@ -19893,7 +20015,7 @@ var UIActionUtil = class {
19893
20015
  static async exec(actionId, params, appId2) {
19894
20016
  const action = await getUIActionById(actionId, appId2);
19895
20017
  if (!action) {
19896
- throw new RuntimeError47("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
20018
+ throw new RuntimeError48("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
19897
20019
  }
19898
20020
  if (action.actionTarget === "SINGLEDATA") {
19899
20021
  const validateResult = await params.view.call("Validate" /* VALIDATE */);
@@ -20385,7 +20507,7 @@ import {
20385
20507
  StringUtil,
20386
20508
  RuntimeModelError as RuntimeModelError52,
20387
20509
  ModelError as ModelError26,
20388
- RuntimeError as RuntimeError48
20510
+ RuntimeError as RuntimeError49
20389
20511
  } from "@ibiz-template/core";
20390
20512
  import { mergeRight as mergeRight3 } from "ramda";
20391
20513
  var FrontUIActionProvider = class extends UIActionProviderBase {
@@ -20499,7 +20621,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20499
20621
  if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
20500
20622
  requestUrl += "/".concat(appDataEntity.deapicodeName2, "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
20501
20623
  } else {
20502
- throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
20624
+ throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
20503
20625
  }
20504
20626
  const res = await ibiz.net.request(requestUrl, {
20505
20627
  method: "get",
@@ -20526,10 +20648,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20526
20648
  window.open(link, "_blank");
20527
20649
  }
20528
20650
  } else {
20529
- throw new RuntimeError48("\u6253\u5370\u5931\u8D25");
20651
+ throw new RuntimeError49("\u6253\u5370\u5931\u8D25");
20530
20652
  }
20531
20653
  } else {
20532
- throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
20654
+ throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
20533
20655
  }
20534
20656
  }
20535
20657
  /**
@@ -20580,7 +20702,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20580
20702
  refreshMode: 1
20581
20703
  };
20582
20704
  }
20583
- throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
20705
+ throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
20584
20706
  }
20585
20707
  /**
20586
20708
  * 执行导出行为
@@ -20631,10 +20753,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20631
20753
  URL.revokeObjectURL(elink.href);
20632
20754
  document.body.removeChild(elink);
20633
20755
  } else {
20634
- throw new RuntimeError48("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
20756
+ throw new RuntimeError49("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
20635
20757
  }
20636
20758
  } else {
20637
- throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
20759
+ throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
20638
20760
  }
20639
20761
  }
20640
20762
  /**
@@ -20651,7 +20773,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20651
20773
  const actionResult = {};
20652
20774
  const { context, params, data, event } = args;
20653
20775
  if (!event) {
20654
- throw new RuntimeError48("\u7F3A\u5C11\u539F\u751FJS\u4E8B\u4EF6\u5BF9\u8C61");
20776
+ throw new RuntimeError49("\u7F3A\u5C11\u539F\u751FJS\u4E8B\u4EF6\u5BF9\u8C61");
20655
20777
  }
20656
20778
  const { resultContext, resultParams } = await this.handleParams(
20657
20779
  action,
@@ -20667,20 +20789,23 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20667
20789
  options
20668
20790
  );
20669
20791
  let hasSave = false;
20670
- await ibiz.overlay.popover(
20671
- event.target,
20792
+ const overlay = ibiz.overlay.createPopover(
20672
20793
  "IBizControlShell",
20673
20794
  {
20674
20795
  context: resultContext,
20675
20796
  params: resultParams,
20676
20797
  modelData: action.deeditForm,
20677
20798
  onSaveSuccess: () => {
20678
- console.log("\u4FDD\u5B58\u6210\u529F");
20799
+ if (overlay) {
20800
+ overlay.dismiss();
20801
+ }
20679
20802
  hasSave = true;
20680
20803
  }
20681
20804
  },
20682
20805
  popoverOpts
20683
20806
  );
20807
+ overlay.present(event.target);
20808
+ await overlay.onWillDismiss();
20684
20809
  if (!hasSave) {
20685
20810
  actionResult.cancel = true;
20686
20811
  }
@@ -20770,7 +20895,7 @@ var ToolbarController = class extends ControlController {
20770
20895
  const actionId = item.uiactionId;
20771
20896
  const uiAction = await getUIActionById(actionId, item.appId);
20772
20897
  if (!uiAction) {
20773
- throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
20898
+ throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
20774
20899
  }
20775
20900
  const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
20776
20901
  if (enableLoading) {
@@ -21384,7 +21509,7 @@ var RawItemPortletController = class extends PortletPartController {
21384
21509
 
21385
21510
  // src/controller/control/data-view/data-view.controller.ts
21386
21511
  import { RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
21387
- import { isNil as isNil25 } from "ramda";
21512
+ import { isNil as isNil26 } from "ramda";
21388
21513
 
21389
21514
  // src/controller/control/data-view/data-view.service.ts
21390
21515
  var DataViewControlService = class extends MDControlService {
@@ -21675,7 +21800,7 @@ var DataViewControlController = class extends MDControlController {
21675
21800
  const groupMap = /* @__PURE__ */ new Map();
21676
21801
  items.forEach((item) => {
21677
21802
  const groupVal = item[groupAppDEFieldId];
21678
- if (isNil25(groupVal)) {
21803
+ if (isNil26(groupVal)) {
21679
21804
  return;
21680
21805
  }
21681
21806
  if (!groupMap.has(groupVal)) {
@@ -21848,7 +21973,7 @@ var DataViewControlController = class extends MDControlController {
21848
21973
  import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
21849
21974
 
21850
21975
  // src/controller/control/exp-bar/exp-bar.controller.ts
21851
- import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
21976
+ import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
21852
21977
  var ExpBarControlController = class extends ControlController {
21853
21978
  constructor() {
21854
21979
  super(...arguments);
@@ -22179,7 +22304,7 @@ var ExpBarControlController = class extends ControlController {
22179
22304
  if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
22180
22305
  return this.XDataModel.navAppViewId;
22181
22306
  }
22182
- throw new RuntimeError50("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
22307
+ throw new RuntimeError51("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
22183
22308
  }
22184
22309
  /**
22185
22310
  * 获取导航视图
@@ -22322,7 +22447,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
22322
22447
  };
22323
22448
 
22324
22449
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
22325
- import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
22450
+ import { RuntimeError as RuntimeError52, RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
22326
22451
  var TreeExpBarController = class extends ExpBarControlController {
22327
22452
  constructor() {
22328
22453
  super(...arguments);
@@ -22411,7 +22536,7 @@ var TreeExpBarController = class extends ExpBarControlController {
22411
22536
  const deData = node._deData || node;
22412
22537
  const nodeModel = this.getNodeModel(node._nodeId);
22413
22538
  if (!nodeModel) {
22414
- throw new RuntimeError51("\u627E\u4E0D\u5230".concat(node._nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
22539
+ throw new RuntimeError52("\u627E\u4E0D\u5230".concat(node._nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
22415
22540
  }
22416
22541
  const result = this.prepareParams(nodeModel, deData, context, params);
22417
22542
  result.context.currentSrfNav = nodeId;
@@ -22602,7 +22727,7 @@ var ChartExpBarController = class extends ExpBarControlController {
22602
22727
  };
22603
22728
 
22604
22729
  // src/controller/control/form/search-form/search-form.controller.ts
22605
- import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
22730
+ import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
22606
22731
 
22607
22732
  // src/controller/control/form/form/form.controller.ts
22608
22733
  import {
@@ -23211,7 +23336,7 @@ var SearchFormController = class extends FormController {
23211
23336
  applyStoredFilter(index) {
23212
23337
  const filter = this.state.storedFilters[index];
23213
23338
  if (!filter) {
23214
- throw new RuntimeError52("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
23339
+ throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
23215
23340
  }
23216
23341
  if (filter.data) {
23217
23342
  Object.assign(this.data, filter.data);
@@ -23227,7 +23352,7 @@ var SearchFormController = class extends FormController {
23227
23352
  async removeStoredFilter(index) {
23228
23353
  const filter = this.state.storedFilters[index];
23229
23354
  if (!filter) {
23230
- throw new RuntimeError52("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
23355
+ throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
23231
23356
  }
23232
23357
  this.state.storedFilters.splice(index, 1);
23233
23358
  await this.saveConfig();
@@ -24608,7 +24733,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
24608
24733
  };
24609
24734
 
24610
24735
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
24611
- import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
24736
+ import { RuntimeError as RuntimeError54, RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
24612
24737
  import { createUUID as createUUID11 } from "qx-util";
24613
24738
 
24614
24739
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
@@ -24725,7 +24850,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
24725
24850
  async remove(id) {
24726
24851
  const controller = this.formMap.get(id);
24727
24852
  if (!controller) {
24728
- throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
24853
+ throw new RuntimeError54("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
24729
24854
  }
24730
24855
  await controller.remove();
24731
24856
  const index = this.state.items.findIndex((item) => item.id === id);
@@ -25042,11 +25167,11 @@ import {
25042
25167
  IBizContext as IBizContext4,
25043
25168
  isElementSame as isElementSame2,
25044
25169
  mergeInLeft as mergeInLeft2,
25045
- RuntimeError as RuntimeError54
25170
+ RuntimeError as RuntimeError55
25046
25171
  } from "@ibiz-template/core";
25047
- import { debounce as debounce2 } from "lodash-es";
25172
+ import { debounce } from "lodash-es";
25048
25173
  import { createUUID as createUUID12 } from "qx-util";
25049
- import { clone as clone25 } from "ramda";
25174
+ import { clone as clone25, isNil as isNil27 } from "ramda";
25050
25175
 
25051
25176
  // src/controller/control/form/edit-form/edit-form.service.ts
25052
25177
  import {
@@ -25364,7 +25489,7 @@ var EditFormController = class extends FormController {
25364
25489
  await super.onCreated();
25365
25490
  this.service = new EditFormService(this.model);
25366
25491
  await this.service.init(this.context);
25367
- this.autoSave = debounce2(this.autoSave.bind(this), 500, {
25492
+ this.autoSave = debounce(this.autoSave.bind(this), 500, {
25368
25493
  trailing: true
25369
25494
  });
25370
25495
  }
@@ -25507,7 +25632,7 @@ var EditFormController = class extends FormController {
25507
25632
  }
25508
25633
  const isValid = await this.validate();
25509
25634
  if (!isValid) {
25510
- throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25635
+ throw new RuntimeError55("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25511
25636
  }
25512
25637
  if (!silent) {
25513
25638
  await this.startLoading();
@@ -25551,10 +25676,7 @@ var EditFormController = class extends FormController {
25551
25676
  default: "".concat(this.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F")
25552
25677
  });
25553
25678
  }
25554
- ibiz.mc.command.send(
25555
- res.data.$origin,
25556
- isCreate ? "OBJECTCREATED" : "OBJECTUPDATED"
25557
- );
25679
+ this.emitDEDataChange(isCreate ? "create" : "update", res.data);
25558
25680
  return this.data;
25559
25681
  }
25560
25682
  /**
@@ -25591,11 +25713,11 @@ var EditFormController = class extends FormController {
25591
25713
  }
25592
25714
  ok = res.ok;
25593
25715
  }
25716
+ this.emitDEDataChange("remove", this.data);
25594
25717
  this.state.data = new ControlVO();
25595
25718
  this.state.modified = false;
25596
25719
  await this.evt.emit("onRemoveSuccess", void 0);
25597
25720
  this.actionNotification("REMOVESUCCESS");
25598
- ibiz.mc.command.send(this.data.$origin, "OBJECTREMOVED");
25599
25721
  return ok;
25600
25722
  }
25601
25723
  /**
@@ -25632,7 +25754,7 @@ var EditFormController = class extends FormController {
25632
25754
  (item) => item.id === formItemUpdateId
25633
25755
  );
25634
25756
  if (!formItemUpdate) {
25635
- throw new RuntimeError54("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
25757
+ throw new RuntimeError55("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
25636
25758
  }
25637
25759
  const {
25638
25760
  appDEMethodId,
@@ -25691,14 +25813,14 @@ var EditFormController = class extends FormController {
25691
25813
  async wfStart(args) {
25692
25814
  const isValid = await this.validate();
25693
25815
  if (!isValid) {
25694
- throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25816
+ throw new RuntimeError55("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25695
25817
  }
25696
25818
  await this.startLoading();
25697
25819
  const { context, params } = this.handlerAbilityParams(args);
25698
25820
  try {
25699
25821
  await this.service.wfStart(context, params, this.data);
25700
- ibiz.mc.command.send(this.data.$origin, "OBJECTUPDATED");
25701
- ibiz.mc.command.send({ srfdecodename: "SysTodo" }, "OBJECTUPDATED");
25822
+ this.emitDEDataChange("update", this.data);
25823
+ this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
25702
25824
  } catch (error) {
25703
25825
  this.actionNotification("WFSTARTERROR", {
25704
25826
  error
@@ -25720,14 +25842,14 @@ var EditFormController = class extends FormController {
25720
25842
  async wfSubmit(args) {
25721
25843
  const isValid = await this.validate();
25722
25844
  if (!isValid) {
25723
- throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25845
+ throw new RuntimeError55("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25724
25846
  }
25725
25847
  await this.startLoading();
25726
25848
  const { context, params } = this.handlerAbilityParams(args);
25727
25849
  try {
25728
25850
  await this.service.wfSubmit(context, params, this.data);
25729
- ibiz.mc.command.send(this.data.$origin, "OBJECTUPDATED");
25730
- ibiz.mc.command.send({ srfdecodename: "SysTodo" }, "OBJECTUPDATED");
25851
+ this.emitDEDataChange("update", this.data);
25852
+ this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
25731
25853
  } catch (error) {
25732
25854
  this.actionNotification("WFSUBMITERROR", {
25733
25855
  error
@@ -25814,6 +25936,29 @@ var EditFormController = class extends FormController {
25814
25936
  this.dataChangeNotify(Object.keys(this.state.data));
25815
25937
  }
25816
25938
  }
25939
+ /**
25940
+ * 检测实体数据变更
25941
+ *
25942
+ * @author tony001
25943
+ * @date 2024-03-28 18:03:14
25944
+ * @protected
25945
+ * @param {IPortalMessage} msg
25946
+ * @return {*} {void}
25947
+ */
25948
+ onDEDataChange(msg) {
25949
+ var _a;
25950
+ if (msg.subtype !== "OBJECTUPDATED") {
25951
+ return;
25952
+ }
25953
+ if (!isNil27(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
25954
+ return;
25955
+ }
25956
+ const dename = calcDeCodeNameById(this.model.appDataEntityId);
25957
+ if (!msg.data || ((_a = msg.data.srfdecodename) == null ? void 0 : _a.toLowerCase()) !== dename || msg.data.srfkey !== this.data.srfkey) {
25958
+ return;
25959
+ }
25960
+ this.doNextActive(() => this.load(), { key: "load" });
25961
+ }
25817
25962
  };
25818
25963
 
25819
25964
  // src/controller/control/grid/grid/grid-column.controller.ts
@@ -26056,7 +26201,7 @@ import {
26056
26201
  debounceAndAsyncMerge as debounceAndAsyncMerge2,
26057
26202
  mergeDefaultInLeft,
26058
26203
  recursiveIterate as recursiveIterate7,
26059
- RuntimeError as RuntimeError55,
26204
+ RuntimeError as RuntimeError56,
26060
26205
  RuntimeModelError as RuntimeModelError62
26061
26206
  } from "@ibiz-template/core";
26062
26207
  import { clone as clone26 } from "ramda";
@@ -26683,7 +26828,7 @@ var GridController = class extends MDControlController {
26683
26828
  if (editShowMode === "row") {
26684
26829
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
26685
26830
  if (editingRow) {
26686
- throw new RuntimeError55("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
26831
+ throw new RuntimeError56("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
26687
26832
  }
26688
26833
  }
26689
26834
  const queryParams = { ...this.params };
@@ -26724,7 +26869,7 @@ var GridController = class extends MDControlController {
26724
26869
  const isCreate = data.srfuf === 0 /* CREATE */;
26725
26870
  const rowState = this.findRowState(data);
26726
26871
  if (!rowState) {
26727
- throw new RuntimeError55("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
26872
+ throw new RuntimeError56("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
26728
26873
  }
26729
26874
  if (!rowState.modified) {
26730
26875
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -26736,7 +26881,7 @@ var GridController = class extends MDControlController {
26736
26881
  }
26737
26882
  const isValid = await this.validate(rowState);
26738
26883
  if (!isValid) {
26739
- throw new RuntimeError55("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
26884
+ throw new RuntimeError56("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
26740
26885
  }
26741
26886
  if (this.model.enableRowEditChangedOnly) {
26742
26887
  data = rowState.getDiffData();
@@ -26762,6 +26907,7 @@ var GridController = class extends MDControlController {
26762
26907
  rowState.modified = false;
26763
26908
  this.gridStateNotify(rowState, "SAVE" /* SAVE */);
26764
26909
  await this._evt.emit("onSaveSuccess", void 0);
26910
+ this.emitDEDataChange(isCreate ? "create" : "update", res.data);
26765
26911
  }
26766
26912
  async saveAll() {
26767
26913
  const needSaveData = this.state.rows.filter((row) => row.modified).map((row) => row.data);
@@ -26958,7 +27104,7 @@ var GridController = class extends MDControlController {
26958
27104
  }
26959
27105
  async toggleRowEdit() {
26960
27106
  if (!this.model.enableRowNew) {
26961
- throw new RuntimeError55("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
27107
+ throw new RuntimeError56("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
26962
27108
  }
26963
27109
  this.state.rowEditOpen = !this.state.rowEditOpen;
26964
27110
  }
@@ -26991,7 +27137,7 @@ var GridController = class extends MDControlController {
26991
27137
  } else {
26992
27138
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
26993
27139
  if (editingRow) {
26994
- throw new RuntimeError55("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
27140
+ throw new RuntimeError56("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
26995
27141
  }
26996
27142
  if (row.data.srfuf === 1 /* UPDATE */) {
26997
27143
  row.cacheData = clone26(row.data);
@@ -27046,7 +27192,7 @@ var GridController = class extends MDControlController {
27046
27192
  (item) => item.id === updateId
27047
27193
  );
27048
27194
  if (!findUpdate) {
27049
- throw new RuntimeError55("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
27195
+ throw new RuntimeError56("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
27050
27196
  }
27051
27197
  const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
27052
27198
  const updateItems = degeiupdateDetails.map((item) => item.id);
@@ -27186,7 +27332,7 @@ var GridController = class extends MDControlController {
27186
27332
  data = this.getData();
27187
27333
  }
27188
27334
  if (data.length === 0) {
27189
- throw new RuntimeError55("\u65E0\u5BFC\u51FA\u6570\u636E");
27335
+ throw new RuntimeError56("\u65E0\u5BFC\u51FA\u6570\u636E");
27190
27336
  }
27191
27337
  return data;
27192
27338
  }
@@ -27200,7 +27346,7 @@ var GridController = class extends MDControlController {
27200
27346
  async exportData(args) {
27201
27347
  const { header } = this.dataExportParam;
27202
27348
  if (!header) {
27203
- throw new RuntimeError55("\u65E0\u8868\u683C\u5217");
27349
+ throw new RuntimeError56("\u65E0\u8868\u683C\u5217");
27204
27350
  }
27205
27351
  const data = await this.getExportData(args.params);
27206
27352
  const formatData = this.formatExcelData(data);
@@ -27378,8 +27524,8 @@ var GridController = class extends MDControlController {
27378
27524
  // src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
27379
27525
  import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
27380
27526
  import dayjs6 from "dayjs";
27381
- import { debounce as debounce3 } from "lodash-es";
27382
- import { clone as clone27, isNil as isNil26 } from "ramda";
27527
+ import { debounce as debounce2 } from "lodash-es";
27528
+ import { clone as clone27, isNil as isNil28 } from "ramda";
27383
27529
  var GridFieldColumnController = class extends GridColumnController {
27384
27530
  constructor() {
27385
27531
  super(...arguments);
@@ -27423,7 +27569,7 @@ var GridFieldColumnController = class extends GridColumnController {
27423
27569
  }
27424
27570
  async onInit() {
27425
27571
  await super.onInit();
27426
- this.loadCodeList = debounce3(this.loadCodeList, 300, {
27572
+ this.loadCodeList = debounce2(this.loadCodeList, 300, {
27427
27573
  leading: true,
27428
27574
  trailing: false
27429
27575
  });
@@ -27591,11 +27737,11 @@ var GridFieldColumnController = class extends GridColumnController {
27591
27737
  */
27592
27738
  calcFieldAgg(items) {
27593
27739
  const { aggField, aggMode, aggValueFormat, unitName } = this.model;
27594
- if (isNil26(aggMode) || aggMode === "NONE") {
27740
+ if (isNil28(aggMode) || aggMode === "NONE") {
27595
27741
  return;
27596
27742
  }
27597
27743
  const fieldName = aggField || this.model.id;
27598
- items = items.filter((item) => !isNil26(item[fieldName]));
27744
+ items = items.filter((item) => !isNil28(item[fieldName]));
27599
27745
  let aggValue;
27600
27746
  if (this.grid.model.aggMode === "PAGE") {
27601
27747
  switch (aggMode) {
@@ -27746,7 +27892,7 @@ var GridUAColumnController = class extends GridColumnController {
27746
27892
  };
27747
27893
 
27748
27894
  // src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
27749
- import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
27895
+ import { RuntimeError as RuntimeError57 } from "@ibiz-template/core";
27750
27896
  import Schema2 from "async-validator";
27751
27897
  import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
27752
27898
  var GridFieldEditColumnController = class extends GridFieldColumnController {
@@ -27886,7 +28032,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
27886
28032
  if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
27887
28033
  const result = await this.validate(row);
27888
28034
  if (!result) {
27889
- throw new RuntimeError56(
28035
+ throw new RuntimeError57(
27890
28036
  "".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
27891
28037
  );
27892
28038
  }
@@ -27987,7 +28133,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
27987
28133
  */
27988
28134
  async validate(row) {
27989
28135
  const editName = this.fieldName;
27990
- if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required && typeof row.data[editName] === "string" ? isNilOrEmpty8(row.data[editName].trimEnd()) : isNilOrEmpty8(row.data[editName])) {
28136
+ 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]))) {
27991
28137
  row.errors[editName] = "\u8BF7\u586B\u5199".concat(this.model.caption || "");
27992
28138
  return false;
27993
28139
  }
@@ -28184,7 +28330,7 @@ var ListController = class extends MDControlController {
28184
28330
  };
28185
28331
 
28186
28332
  // src/controller/control/panel/panel/panel.controller.ts
28187
- import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError57 } from "@ibiz-template/core";
28333
+ import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError58 } from "@ibiz-template/core";
28188
28334
  var PanelController = class extends ControlController {
28189
28335
  constructor(model, context, params, ctx, container) {
28190
28336
  super(model, context, params, ctx);
@@ -28308,7 +28454,7 @@ var PanelController = class extends ControlController {
28308
28454
  var _a, _b;
28309
28455
  const data = await this.prepareData();
28310
28456
  if (!data) {
28311
- throw new RuntimeError57("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
28457
+ throw new RuntimeError58("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
28312
28458
  }
28313
28459
  const panelData = this.convertData(data);
28314
28460
  (_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
@@ -28934,7 +29080,7 @@ var PickupViewPanelController = class extends ControlController {
28934
29080
 
28935
29081
  // src/controller/control/search-bar/search-bar.controller.ts
28936
29082
  import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
28937
- import { clone as clone29, isNil as isNil28 } from "ramda";
29083
+ import { clone as clone29, isNil as isNil30 } from "ramda";
28938
29084
  import { isString as isString2 } from "lodash-es";
28939
29085
 
28940
29086
  // src/controller/control/search-bar/search-bar-filter.controller.ts
@@ -29377,8 +29523,8 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
29377
29523
  }
29378
29524
 
29379
29525
  // src/controller/control/search-bar/use-searchcond.ts
29380
- import { RuntimeError as RuntimeError58, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
29381
- import { isNil as isNil27 } from "ramda";
29526
+ import { RuntimeError as RuntimeError59, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
29527
+ import { isNil as isNil29 } from "ramda";
29382
29528
  var ExcludeOPs2 = ["ISNULL" /* IS_NULL */, "ISNOTNULL" /* IS_NOT_NULL */];
29383
29529
  function getOriginFilterNodes() {
29384
29530
  return [
@@ -29448,14 +29594,14 @@ function parseFilters(data) {
29448
29594
  valueItem: data.valueItem || void 0
29449
29595
  };
29450
29596
  }
29451
- throw new RuntimeError58("\u65E0\u6548\u7684condtype:".concat(data.condtype));
29597
+ throw new RuntimeError59("\u65E0\u6548\u7684condtype:".concat(data.condtype));
29452
29598
  }
29453
29599
  function calcSearchConds(filterNodes) {
29454
29600
  let hasFilter = false;
29455
29601
  let hasError = false;
29456
29602
  recursiveIterate9(filterNodes[0], (node) => {
29457
29603
  if (node.leaf) {
29458
- if (node.field && node.valueOP && !isNil27(node.value) || node.field && node.valueOP && ExcludeOPs2.includes(node.valueOP)) {
29604
+ if (node.field && node.valueOP && !isNil29(node.value) || node.field && node.valueOP && ExcludeOPs2.includes(node.valueOP)) {
29459
29605
  hasFilter = true;
29460
29606
  } else {
29461
29607
  hasError = true;
@@ -29469,7 +29615,7 @@ function calcSearchConds(filterNodes) {
29469
29615
  }
29470
29616
 
29471
29617
  // src/controller/control/search-bar/search-bar-filter-items.controller.ts
29472
- import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
29618
+ import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
29473
29619
  import { clone as clone28 } from "ramda";
29474
29620
  var ExcludeOPs3 = [
29475
29621
  "ISNULL" /* IS_NULL */,
@@ -29531,7 +29677,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
29531
29677
  return false;
29532
29678
  });
29533
29679
  if (!minorDEId) {
29534
- throw new RuntimeError59("\u627E\u4E0D\u5230\u5C5E\u6027".concat(targetField, "\u5BF9\u5E94\u7684\u5173\u8054\u5B9E\u4F53"));
29680
+ throw new RuntimeError60("\u627E\u4E0D\u5230\u5C5E\u6027".concat(targetField, "\u5BF9\u5E94\u7684\u5173\u8054\u5B9E\u4F53"));
29535
29681
  }
29536
29682
  this.minorAppDE = await ibiz.hub.getAppDataEntity(
29537
29683
  minorDEId,
@@ -29909,7 +30055,7 @@ var SearchBarController = class extends ControlController {
29909
30055
  recursiveIterate10(
29910
30056
  searchconds[0],
29911
30057
  (node, parent) => {
29912
- if (node.condtype === "DEFIELD" && !isNil28(node.value)) {
30058
+ if (node.condtype === "DEFIELD" && !isNil30(node.value)) {
29913
30059
  let controller = this.findFilterController(
29914
30060
  node.fieldname,
29915
30061
  node.condop
@@ -30368,10 +30514,11 @@ var TabExpPanelController = class extends ControlController {
30368
30514
 
30369
30515
  // src/controller/control/tree/tree.controller.ts
30370
30516
  import {
30371
- RuntimeError as RuntimeError60,
30517
+ RuntimeError as RuntimeError61,
30372
30518
  RuntimeModelError as RuntimeModelError65,
30373
30519
  recursiveIterate as recursiveIterate11
30374
30520
  } from "@ibiz-template/core";
30521
+ import { isNil as isNil31 } from "ramda";
30375
30522
 
30376
30523
  // src/controller/control/tree/tree.service.ts
30377
30524
  import { ModelError as ModelError30 } from "@ibiz-template/core";
@@ -31409,10 +31556,11 @@ var TreeController = class extends MDControlController {
31409
31556
  throw new RuntimeModelError65(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
31410
31557
  }
31411
31558
  if (nodeData._nodeType !== "DE") {
31412
- throw new RuntimeError60("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
31559
+ throw new RuntimeError61("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
31413
31560
  }
31414
31561
  nodeData._text = text;
31415
31562
  await this.updateDeNodeData([nodeData]);
31563
+ this.emitDEDataChange("update", nodeData._deData);
31416
31564
  }
31417
31565
  /**
31418
31566
  * 删除每一项
@@ -31424,7 +31572,7 @@ var TreeController = class extends MDControlController {
31424
31572
  let needRefresh = false;
31425
31573
  const treeNode = this.getNodeModel(item._nodeId);
31426
31574
  if (!treeNode) {
31427
- throw new RuntimeError60("\u672A\u627E\u5230\u6811\u8282\u70B9");
31575
+ throw new RuntimeError61("\u672A\u627E\u5230\u6811\u8282\u70B9");
31428
31576
  }
31429
31577
  const nodeAppDataEntityId = treeNode.appDataEntityId;
31430
31578
  if (nodeAppDataEntityId) {
@@ -31438,12 +31586,37 @@ var TreeController = class extends MDControlController {
31438
31586
  }
31439
31587
  return needRefresh;
31440
31588
  }
31441
- onDataChange(_msg) {
31589
+ /**
31590
+ * 检测实体数据变更
31591
+ *
31592
+ * @author tony001
31593
+ * @date 2024-03-28 18:03:09
31594
+ * @protected
31595
+ * @param {IPortalMessage} msg
31596
+ * @return {*} {void}
31597
+ */
31598
+ onDEDataChange(msg) {
31599
+ if (!isNil31(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
31600
+ return;
31601
+ }
31602
+ if (msg.subtype === "OBJECTCREATED") {
31603
+ return;
31604
+ }
31605
+ const data = msg.data;
31606
+ const findNode = this.state.items.find(
31607
+ (item) => item._nodeType === "DE" && item._deData && item._deData.srfdecodename === data.srfdecodename && item._deData.srfkey === data.srfkey
31608
+ );
31609
+ if (!findNode) {
31610
+ return;
31611
+ }
31612
+ this.doNextActive(() => this.refreshNodeChildren(findNode, true), {
31613
+ key: "refresh".concat(findNode._id)
31614
+ });
31442
31615
  }
31443
31616
  };
31444
31617
 
31445
31618
  // src/controller/control/wizard-panel/wizard-panel.controller.ts
31446
- import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
31619
+ import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
31447
31620
 
31448
31621
  // src/controller/control/wizard-panel/wizard-panel.service.ts
31449
31622
  var WizardPanelService = class extends ControlService {
@@ -31609,7 +31782,7 @@ var WizardPanelController = class extends ControlController {
31609
31782
  const { activeFormTag } = this.state;
31610
31783
  const controller = this.formControllers.get(activeFormTag);
31611
31784
  if (!controller) {
31612
- throw new RuntimeError61("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
31785
+ throw new RuntimeError62("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
31613
31786
  }
31614
31787
  return controller;
31615
31788
  }
@@ -31651,7 +31824,7 @@ var WizardPanelController = class extends ControlController {
31651
31824
  getWizardFormByTag(tag) {
31652
31825
  var _a;
31653
31826
  if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
31654
- throw new RuntimeError61("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
31827
+ throw new RuntimeError62("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
31655
31828
  return;
31656
31829
  }
31657
31830
  const wizardForm = this.model.dewizard.dewizardForms.find(
@@ -31660,7 +31833,7 @@ var WizardPanelController = class extends ControlController {
31660
31833
  }
31661
31834
  );
31662
31835
  if (!wizardForm) {
31663
- throw new RuntimeError61("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
31836
+ throw new RuntimeError62("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
31664
31837
  }
31665
31838
  return wizardForm;
31666
31839
  }
@@ -31731,7 +31904,7 @@ var WizardPanelController = class extends ControlController {
31731
31904
  prevTag = this.tagHistory[this.tagHistory.length - 1];
31732
31905
  }
31733
31906
  if (!prevTag) {
31734
- throw new RuntimeError61("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
31907
+ throw new RuntimeError62("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
31735
31908
  }
31736
31909
  this.state.activeFormTag = prevTag;
31737
31910
  }
@@ -31767,7 +31940,7 @@ var WizardPanelController = class extends ControlController {
31767
31940
  });
31768
31941
  const nextWizardStep = wizardSteps[index + 1];
31769
31942
  if (!nextWizardStep) {
31770
- throw new RuntimeError61("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
31943
+ throw new RuntimeError62("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
31771
31944
  }
31772
31945
  const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
31773
31946
  if (nextWizardForm && nextWizardForm.formTag) {
@@ -31776,7 +31949,7 @@ var WizardPanelController = class extends ControlController {
31776
31949
  }
31777
31950
  }
31778
31951
  if (!nextTag) {
31779
- throw new RuntimeError61("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
31952
+ throw new RuntimeError62("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
31780
31953
  }
31781
31954
  this.state.activeFormTag = nextTag;
31782
31955
  this.tagHistory.push(nextTag);
@@ -31796,7 +31969,7 @@ var WizardPanelController = class extends ControlController {
31796
31969
 
31797
31970
  // src/controller/control/md-ctrl/md-ctrl.controller.ts
31798
31971
  import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
31799
- import { isNil as isNil29 } from "ramda";
31972
+ import { isNil as isNil32 } from "ramda";
31800
31973
 
31801
31974
  // src/controller/control/md-ctrl/md-ctrl.service.ts
31802
31975
  var MDCtrlService = class extends MDControlService {
@@ -31886,7 +32059,9 @@ var MDCtrlController = class extends MDControlController {
31886
32059
  * @memberof MDCtrlController
31887
32060
  */
31888
32061
  async refresh() {
31889
- await this.load({ isInitialLoad: true });
32062
+ this.doNextActive(() => this.load({ isInitialLoad: true }), {
32063
+ key: "refresh"
32064
+ });
31890
32065
  }
31891
32066
  async afterLoad(args, items) {
31892
32067
  if (args.isInitialLoad) {
@@ -32023,7 +32198,7 @@ var MDCtrlController = class extends MDControlController {
32023
32198
  const groupMap = /* @__PURE__ */ new Map();
32024
32199
  items.forEach((item) => {
32025
32200
  const groupVal = item[groupAppDEFieldId];
32026
- if (isNil29(groupVal)) {
32201
+ if (isNil32(groupVal)) {
32027
32202
  return;
32028
32203
  }
32029
32204
  if (!groupMap.has(groupVal)) {
@@ -32099,8 +32274,8 @@ var MDCtrlController = class extends MDControlController {
32099
32274
  };
32100
32275
 
32101
32276
  // src/controller/control/kanban/kanban.controller.ts
32102
- import { RuntimeError as RuntimeError62, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
32103
- import { isNil as isNil30 } from "ramda";
32277
+ import { RuntimeError as RuntimeError63, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
32278
+ import { isNil as isNil33 } from "ramda";
32104
32279
 
32105
32280
  // src/controller/control/kanban/kanban.service.ts
32106
32281
  var KanbanService = class extends DataViewControlService {
@@ -32186,12 +32361,12 @@ var KanbanController = class extends DataViewControlController {
32186
32361
  const isAsc = minorSortDir === "ASC";
32187
32362
  items.forEach((item) => {
32188
32363
  const sortValue = item[sortField];
32189
- if (isNil30(sortValue)) {
32364
+ if (isNil33(sortValue)) {
32190
32365
  item[sortField] = 0;
32191
32366
  } else {
32192
32367
  const toNum = Number(sortValue);
32193
32368
  if (Number.isNaN(toNum)) {
32194
- throw new RuntimeError62(
32369
+ throw new RuntimeError63(
32195
32370
  "".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
32196
32371
  );
32197
32372
  }
@@ -32313,7 +32488,7 @@ var KanbanController = class extends DataViewControlController {
32313
32488
  }
32314
32489
  handleDataGroup() {
32315
32490
  if (!this.model.enableGroup || this.model.groupMode === "NONE") {
32316
- throw new RuntimeError62("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
32491
+ throw new RuntimeError63("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
32317
32492
  }
32318
32493
  return super.handleDataGroup();
32319
32494
  }
@@ -32329,7 +32504,7 @@ var KanbanController = class extends DataViewControlController {
32329
32504
  const groupMap = /* @__PURE__ */ new Map();
32330
32505
  items.forEach((item) => {
32331
32506
  const groupVal = item[groupAppDEFieldId];
32332
- if (isNil30(groupVal)) {
32507
+ if (isNil33(groupVal)) {
32333
32508
  return;
32334
32509
  }
32335
32510
  if (!groupMap.has(groupVal)) {
@@ -32656,7 +32831,7 @@ var KanbanController = class extends DataViewControlController {
32656
32831
 
32657
32832
  // src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
32658
32833
  import {
32659
- RuntimeError as RuntimeError63,
32834
+ RuntimeError as RuntimeError64,
32660
32835
  RuntimeModelError as RuntimeModelError68,
32661
32836
  awaitTimeout as awaitTimeout3,
32662
32837
  recursiveIterate as recursiveIterate12
@@ -32916,11 +33091,11 @@ var TreeGridExController = class extends TreeController {
32916
33091
  return;
32917
33092
  }
32918
33093
  if (nodeData._nodeType !== "DE") {
32919
- throw new RuntimeError63("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
33094
+ throw new RuntimeError64("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
32920
33095
  }
32921
33096
  const rowState = this.state.rows[nodeData._uuid];
32922
33097
  if (!rowState) {
32923
- throw new RuntimeError63("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
33098
+ throw new RuntimeError64("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
32924
33099
  }
32925
33100
  if (!rowState.modified) {
32926
33101
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -32934,7 +33109,7 @@ var TreeGridExController = class extends TreeController {
32934
33109
  const { appDataEntityId, updateAppDEActionId } = nodeModel;
32935
33110
  const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
32936
33111
  if (isCreate) {
32937
- throw new RuntimeError63("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
33112
+ throw new RuntimeError64("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
32938
33113
  }
32939
33114
  if (!updateAppDEActionId) {
32940
33115
  throw new RuntimeModelError68(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
@@ -33094,7 +33269,7 @@ var TreeGridExController = class extends TreeController {
33094
33269
  (item) => item.showRowEdit
33095
33270
  );
33096
33271
  if (editingRow) {
33097
- throw new RuntimeError63("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
33272
+ throw new RuntimeError64("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
33098
33273
  }
33099
33274
  if (row.data._deData.srfuf === 1 /* UPDATE */) {
33100
33275
  row.cacheData = clone30(row.data);
@@ -33207,7 +33382,7 @@ var TreeGridExColumnController = class {
33207
33382
  // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
33208
33383
  import {
33209
33384
  DataTypes as DataTypes5,
33210
- RuntimeError as RuntimeError64,
33385
+ RuntimeError as RuntimeError65,
33211
33386
  RuntimeModelError as RuntimeModelError69
33212
33387
  } from "@ibiz-template/core";
33213
33388
  import { clone as clone31 } from "ramda";
@@ -33408,7 +33583,7 @@ var TreeGridExNodeColumnController = class {
33408
33583
  const valueItem = this.nodeColumn.linkValueItem || "srfkey";
33409
33584
  const value = row.data[valueItem];
33410
33585
  if (value == null) {
33411
- throw new RuntimeError64("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
33586
+ throw new RuntimeError65("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
33412
33587
  }
33413
33588
  const { linkAppViewId } = this.nodeColumn;
33414
33589
  if (!linkAppViewId) {
@@ -33821,7 +33996,7 @@ var TreeGridService = class extends GridService {
33821
33996
  };
33822
33997
 
33823
33998
  // src/controller/control/medit-view-panel/medit-view-panel.controller.ts
33824
- import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
33999
+ import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
33825
34000
  import { createUUID as createUUID14 } from "qx-util";
33826
34001
 
33827
34002
  // src/controller/control/medit-view-panel/medit-view-panel.service.ts
@@ -34037,7 +34212,7 @@ var MEditViewPanelController = class extends MDControlController {
34037
34212
  (item) => item.id === id
34038
34213
  );
34039
34214
  if (panelUiItemIndex < 0) {
34040
- throw new RuntimeError65("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
34215
+ throw new RuntimeError66("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
34041
34216
  }
34042
34217
  const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
34043
34218
  if (tempUiItem.id.startsWith("mockId:")) {
@@ -34538,14 +34713,16 @@ var ReportPanelController = class extends ControlController {
34538
34713
  * @date 2023-05-23 03:42:41
34539
34714
  */
34540
34715
  async refresh() {
34541
- await this.load({ isInitialLoad: false });
34716
+ this.doNextActive(() => this.load({ isInitialLoad: false }), {
34717
+ key: "refresh"
34718
+ });
34542
34719
  }
34543
34720
  };
34544
34721
 
34545
34722
  // src/controller/control/gantt/gantt.controller.ts
34546
34723
  import {
34547
34724
  awaitTimeout as awaitTimeout4,
34548
- RuntimeError as RuntimeError66,
34725
+ RuntimeError as RuntimeError67,
34549
34726
  RuntimeModelError as RuntimeModelError71
34550
34727
  } from "@ibiz-template/core";
34551
34728
 
@@ -34989,11 +35166,11 @@ var GanttController = class extends TreeGridExController {
34989
35166
  */
34990
35167
  async modifyNodeTime(nodeData, { begin, end }) {
34991
35168
  if (nodeData._nodeType !== "DE") {
34992
- throw new RuntimeError66("\u4E0D\u662F\u5B9E\u4F53\u7518\u7279\u8282\u70B9\u6570\u636E");
35169
+ throw new RuntimeError67("\u4E0D\u662F\u5B9E\u4F53\u7518\u7279\u8282\u70B9\u6570\u636E");
34993
35170
  }
34994
35171
  const rowState = this.getRowState(nodeData._id);
34995
35172
  if (!rowState) {
34996
- throw new RuntimeError66("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
35173
+ throw new RuntimeError67("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
34997
35174
  }
34998
35175
  const { beginDataItemName, endDataItemName } = this.model;
34999
35176
  this.setRowValue(rowState, beginDataItemName, begin);
@@ -35013,11 +35190,11 @@ var GanttController = class extends TreeGridExController {
35013
35190
  return;
35014
35191
  }
35015
35192
  if (nodeData._nodeType !== "DE") {
35016
- throw new RuntimeError66("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
35193
+ throw new RuntimeError67("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
35017
35194
  }
35018
35195
  const rowState = this.state.rows[nodeData._uuid];
35019
35196
  if (!rowState) {
35020
- throw new RuntimeError66("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
35197
+ throw new RuntimeError67("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
35021
35198
  }
35022
35199
  if (!rowState.modified) {
35023
35200
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -35065,7 +35242,7 @@ var GanttController = class extends TreeGridExController {
35065
35242
  async remove(args) {
35066
35243
  const { context, params, data } = this.handlerAbilityParams(args);
35067
35244
  if (!(data == null ? void 0 : data.length)) {
35068
- throw new RuntimeError66("\u672A\u9009\u4E2D\u6570\u636E");
35245
+ throw new RuntimeError67("\u672A\u9009\u4E2D\u6570\u636E");
35069
35246
  }
35070
35247
  if ((args == null ? void 0 : args.silent) !== true) {
35071
35248
  const del = await ibiz.confirm.error({
@@ -35174,7 +35351,7 @@ var GanttController = class extends TreeGridExController {
35174
35351
  (item) => item.showRowEdit
35175
35352
  );
35176
35353
  if (editingRow) {
35177
- throw new RuntimeError66("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
35354
+ throw new RuntimeError67("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
35178
35355
  }
35179
35356
  }
35180
35357
  let parentModel;
@@ -35269,7 +35446,7 @@ import { QXEvent as QXEvent9 } from "qx-util";
35269
35446
  // src/controller/notification/async-action.controller.ts
35270
35447
  import { QXEvent as QXEvent7 } from "qx-util";
35271
35448
  import { clone as clone32 } from "ramda";
35272
- import { isNil as isNil31, isNumber as isNumber2 } from "lodash-es";
35449
+ import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
35273
35450
  import dayjs8 from "dayjs";
35274
35451
  var AsyncActionController = class {
35275
35452
  constructor() {
@@ -35344,14 +35521,14 @@ var AsyncActionController = class {
35344
35521
  data[key] = dayjs8(data[key]).format("YYYY-MM-DD HH:mm:ss");
35345
35522
  }
35346
35523
  });
35347
- if (!isNil31(data.actionresult)) {
35524
+ if (!isNil34(data.actionresult)) {
35348
35525
  try {
35349
35526
  const json = JSON.parse(data.actionresult);
35350
35527
  data.actionresult = json;
35351
35528
  } catch (error) {
35352
35529
  }
35353
35530
  }
35354
- if (!isNil31(data.completionrate)) {
35531
+ if (!isNil34(data.completionrate)) {
35355
35532
  const num = Number(data.completionrate);
35356
35533
  if (Number.isNaN(num)) {
35357
35534
  data.completionrate = void 0;
@@ -35794,7 +35971,7 @@ var AppHub = class {
35794
35971
  this.registerAppView(appView);
35795
35972
  return appView;
35796
35973
  }
35797
- throw new RuntimeError67("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
35974
+ throw new RuntimeError68("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
35798
35975
  }
35799
35976
  /**
35800
35977
  * 根据视图模型路径,加参数重新计算视图模型
@@ -35815,7 +35992,7 @@ var AppHub = class {
35815
35992
  );
35816
35993
  return model;
35817
35994
  }
35818
- throw new RuntimeError67("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
35995
+ throw new RuntimeError68("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
35819
35996
  }
35820
35997
  /**
35821
35998
  * 根据应用实体代码名称查找应用视图
@@ -35846,7 +36023,7 @@ var AppHub = class {
35846
36023
  this.registerAppDataEntity(entity, appId2);
35847
36024
  return entity;
35848
36025
  }
35849
- throw new RuntimeError67("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
36026
+ throw new RuntimeError68("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
35850
36027
  }
35851
36028
  /**
35852
36029
  * 新建 hub 应用
@@ -35861,7 +36038,7 @@ var AppHub = class {
35861
36038
  return this.appMap.get(id);
35862
36039
  }
35863
36040
  if (!this.modelLoaderProvider) {
35864
- throw new RuntimeError67("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
36041
+ throw new RuntimeError68("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
35865
36042
  }
35866
36043
  const appModel = await this.modelLoaderProvider.getApp(id);
35867
36044
  const app = new Application(appModel);
@@ -35992,7 +36169,7 @@ var EngineFactory = class {
35992
36169
  };
35993
36170
 
35994
36171
  // src/engine/view-base.engine.ts
35995
- import { RuntimeError as RuntimeError68, findRecursiveChild as findRecursiveChild3 } from "@ibiz-template/core";
36172
+ import { RuntimeError as RuntimeError69, findRecursiveChild as findRecursiveChild3 } from "@ibiz-template/core";
35996
36173
  var ViewEngineBase = class {
35997
36174
  /**
35998
36175
  * 构造函数在视图控制器的构造函数逻辑内部执行
@@ -36265,7 +36442,7 @@ var ViewEngineBase = class {
36265
36442
  const { appDataEntityId } = this.view.model;
36266
36443
  const { evt, context, params } = this.view;
36267
36444
  if (!appDataEntityId) {
36268
- throw new RuntimeError68("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
36445
+ throw new RuntimeError69("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
36269
36446
  }
36270
36447
  const app = ibiz.hub.getApp(context.srfappid);
36271
36448
  const res = await app.deService.exec(
@@ -36317,6 +36494,35 @@ var MDViewEngine = class extends ViewEngineBase {
36317
36494
  get searchBar() {
36318
36495
  return this.view.getController("searchbar");
36319
36496
  }
36497
+ /**
36498
+ * 获取分页搜索视图上移的工具栏控制器
36499
+ * @author lxm
36500
+ * @date 2023-05-22 03:47:43
36501
+ * @readonly
36502
+ * @protected
36503
+ * @type {(IToolbarController | undefined)}
36504
+ */
36505
+ get tabToolbar() {
36506
+ return this.view.getController("tabtoolbar");
36507
+ }
36508
+ /**
36509
+ * 获取分页搜索视图上移的搜索表单控制器
36510
+ * @author lxm
36511
+ * @date 2023-05-22 01:56:25
36512
+ * @readonly
36513
+ */
36514
+ get tabSearchForm() {
36515
+ return this.view.getController("tabsearchform");
36516
+ }
36517
+ /**
36518
+ * 获取分页搜索视图上移的搜索栏控制器
36519
+ * @author lxm
36520
+ * @date 2023-05-22 01:56:25
36521
+ * @readonly
36522
+ */
36523
+ get tabSearchBar() {
36524
+ return this.view.getController("tabsearchbar");
36525
+ }
36320
36526
  /**
36321
36527
  * 数据部件控制器(多数据)
36322
36528
  * @author lxm
@@ -36332,7 +36538,14 @@ var MDViewEngine = class extends ViewEngineBase {
36332
36538
  async onCreated() {
36333
36539
  await super.onCreated();
36334
36540
  const { childNames } = this.view;
36335
- childNames.push(this.xdataControlName, "searchform", "searchbar");
36541
+ childNames.push(
36542
+ this.xdataControlName,
36543
+ "searchform",
36544
+ "searchbar",
36545
+ "tabtoolbar",
36546
+ "tabsearchform",
36547
+ "tabsearchbar"
36548
+ );
36336
36549
  if (this.xdataControlName) {
36337
36550
  if (!this.view.slotProps[this.xdataControlName]) {
36338
36551
  this.view.slotProps[this.xdataControlName] = {};
@@ -36345,11 +36558,15 @@ var MDViewEngine = class extends ViewEngineBase {
36345
36558
  const { model } = this.view;
36346
36559
  this.xdataControl.evt.on("onActive", this.onXDataActive.bind(this));
36347
36560
  this.xdataControl.evt.on("onSelectionChange", async (event) => {
36348
- var _a;
36561
+ var _a, _b;
36349
36562
  (_a = this.toolbar) == null ? void 0 : _a.calcButtonState(
36350
36563
  event.data[0],
36351
36564
  this.xdataControl.model.appDataEntityId
36352
36565
  );
36566
+ (_b = this.tabToolbar) == null ? void 0 : _b.calcButtonState(
36567
+ event.data[0],
36568
+ this.xdataControl.model.appDataEntityId
36569
+ );
36353
36570
  });
36354
36571
  this.xdataControl.evt.on("onBeforeLoad", () => {
36355
36572
  this.xdataControl.state.searchParams = this.getSearchParams();
@@ -36379,9 +36596,20 @@ var MDViewEngine = class extends ViewEngineBase {
36379
36596
  this.reLoad();
36380
36597
  });
36381
36598
  }
36599
+ if (this.tabSearchForm) {
36600
+ this.tabSearchForm.evt.on("onSearch", () => {
36601
+ this.reLoad();
36602
+ });
36603
+ }
36604
+ if (this.tabSearchBar) {
36605
+ this.tabSearchBar.evt.on("onSearch", () => {
36606
+ this.reLoad();
36607
+ });
36608
+ }
36382
36609
  if (!this.view.state.noLoadDefault && model.loadDefault) {
36383
- if (this.searchBar && this.searchBar.hasDefaultSelect && (this.xdataControlName === "grid" || this.xdataControlName === "treegrid")) {
36384
- this.searchBar.setDefaultSelect();
36610
+ const searchbar = this.searchBar || this.tabSearchBar;
36611
+ if (searchbar && searchbar.hasDefaultSelect && (this.xdataControlName === "grid" || this.xdataControlName === "treegrid")) {
36612
+ searchbar.setDefaultSelect();
36385
36613
  } else {
36386
36614
  this.load();
36387
36615
  }
@@ -36442,11 +36670,13 @@ var MDViewEngine = class extends ViewEngineBase {
36442
36670
  return null;
36443
36671
  }
36444
36672
  if (key === "Search" /* SEARCH */) {
36445
- await this.searchForm.search();
36673
+ const searchForm = this.searchForm || this.tabSearchForm;
36674
+ await searchForm.search();
36446
36675
  return null;
36447
36676
  }
36448
36677
  if (key === "Reset" /* RESET */) {
36449
- await this.searchForm.reset();
36678
+ const searchForm = this.searchForm || this.tabSearchForm;
36679
+ await searchForm.reset();
36450
36680
  return null;
36451
36681
  }
36452
36682
  if (key === "Copy" /* COPY */) {
@@ -36581,6 +36811,12 @@ var MDViewEngine = class extends ViewEngineBase {
36581
36811
  if (this.searchBar) {
36582
36812
  Object.assign(params, this.searchBar.getFilterParams());
36583
36813
  }
36814
+ if (this.tabSearchForm) {
36815
+ Object.assign(params, this.tabSearchForm.getFilterParams());
36816
+ }
36817
+ if (this.tabSearchBar) {
36818
+ Object.assign(params, this.tabSearchBar.getFilterParams());
36819
+ }
36584
36820
  return params;
36585
36821
  }
36586
36822
  /**
@@ -36809,7 +37045,7 @@ var GlobalUtil = class {
36809
37045
  };
36810
37046
 
36811
37047
  // src/logic-scheduler/executor/logic-executor.ts
36812
- import { RuntimeError as RuntimeError69 } from "@ibiz-template/core";
37048
+ import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
36813
37049
  var LogicExecutor = class {
36814
37050
  /**
36815
37051
  * @author lxm
@@ -36830,7 +37066,7 @@ var LogicExecutor = class {
36830
37066
  */
36831
37067
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
36832
37068
  execute(_executeParams) {
36833
- throw new RuntimeError69("Method not implemented.");
37069
+ throw new RuntimeError70("Method not implemented.");
36834
37070
  }
36835
37071
  /**
36836
37072
  * 销毁方法
@@ -37267,7 +37503,7 @@ var LogicSchedulerCenter = class {
37267
37503
  };
37268
37504
 
37269
37505
  // src/logic-scheduler/trigger/logic-trigger.ts
37270
- import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
37506
+ import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
37271
37507
  var LogicTrigger = class {
37272
37508
  /**
37273
37509
  * @author lxm
@@ -37327,7 +37563,7 @@ var LogicTrigger = class {
37327
37563
  if (this.executor) {
37328
37564
  return this.executor.execute(executeParams);
37329
37565
  }
37330
- throw new RuntimeError70("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
37566
+ throw new RuntimeError71("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
37331
37567
  }
37332
37568
  /**
37333
37569
  * 销毁方法
@@ -37344,12 +37580,12 @@ var CustomTrigger = class extends LogicTrigger {
37344
37580
  };
37345
37581
 
37346
37582
  // src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
37347
- import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
37583
+ import { RuntimeError as RuntimeError72 } from "@ibiz-template/core";
37348
37584
  var ItemDynaLogicTrigger = class extends LogicTrigger {
37349
37585
  bindExecutor(executor) {
37350
37586
  super.bindExecutor(executor);
37351
37587
  if (this.executor.type !== "SCRIPT") {
37352
- throw new RuntimeError71(
37588
+ throw new RuntimeError72(
37353
37589
  "\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
37354
37590
  );
37355
37591
  }
@@ -37386,7 +37622,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
37386
37622
  };
37387
37623
 
37388
37624
  // src/logic-scheduler/trigger/timer-trigger.ts
37389
- import { RuntimeError as RuntimeError72, RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
37625
+ import { RuntimeError as RuntimeError73, RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
37390
37626
  var TimerTrigger = class extends LogicTrigger {
37391
37627
  constructor() {
37392
37628
  super(...arguments);
@@ -37398,7 +37634,7 @@ var TimerTrigger = class extends LogicTrigger {
37398
37634
  }
37399
37635
  this.timer = setInterval(() => {
37400
37636
  if (!this.scheduler.defaultParamsCb) {
37401
- throw new RuntimeError72("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
37637
+ throw new RuntimeError73("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
37402
37638
  }
37403
37639
  const params = this.scheduler.defaultParamsCb();
37404
37640
  this.executor.execute(params);
@@ -37415,7 +37651,7 @@ var TimerTrigger = class extends LogicTrigger {
37415
37651
  // src/logic-scheduler/executor/app-ui-logic-executor.ts
37416
37652
  import {
37417
37653
  ModelError as ModelError34,
37418
- RuntimeError as RuntimeError73,
37654
+ RuntimeError as RuntimeError74,
37419
37655
  RuntimeModelError as RuntimeModelError75
37420
37656
  } from "@ibiz-template/core";
37421
37657
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
@@ -37453,7 +37689,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37453
37689
  const { context, params, ...rest } = parameters;
37454
37690
  const { data } = parameters;
37455
37691
  if (!(data == null ? void 0 : data[0])) {
37456
- throw new RuntimeError73("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
37692
+ throw new RuntimeError74("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
37457
37693
  }
37458
37694
  const openViewRefs = appUILogic.openDataAppViews;
37459
37695
  let openViewRef;
@@ -37513,7 +37749,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37513
37749
  const openViewRefs = appUILogic.openDataAppViews;
37514
37750
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
37515
37751
  if (!findView) {
37516
- throw new RuntimeError73(
37752
+ throw new RuntimeError74(
37517
37753
  "\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
37518
37754
  );
37519
37755
  }
@@ -37638,7 +37874,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37638
37874
  }
37639
37875
  const selectData = (_a = result.data) == null ? void 0 : _a[0];
37640
37876
  if (!selectData) {
37641
- throw new RuntimeError73("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
37877
+ throw new RuntimeError74("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
37642
37878
  }
37643
37879
  const indexType = selectData.srfkey;
37644
37880
  const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
@@ -37648,7 +37884,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37648
37884
  }
37649
37885
  );
37650
37886
  if (!findView) {
37651
- throw new RuntimeError73(
37887
+ throw new RuntimeError74(
37652
37888
  "\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
37653
37889
  );
37654
37890
  }
@@ -37685,7 +37921,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37685
37921
  }
37686
37922
  });
37687
37923
  if (pickParentFieldName === void 0) {
37688
- throw new RuntimeError73(
37924
+ throw new RuntimeError74(
37689
37925
  "\u6CA1\u6709\u627E\u5230".concat(pickParentDeName, "\u5728\u5F53\u524D\u5B9E\u4F53\u7684\u5916\u952E\u5C5E\u6027")
37690
37926
  );
37691
37927
  }
@@ -38236,6 +38472,7 @@ export {
38236
38472
  getControlPanel,
38237
38473
  getControlProvider,
38238
38474
  getControlsByView,
38475
+ getCtrlTeleportTag,
38239
38476
  getDEMethodProvider,
38240
38477
  getDERedirectToView,
38241
38478
  getDeACMode,