@ibiz-template/runtime 0.6.14 → 0.6.16

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 (46) hide show
  1. package/dist/index.esm.js +497 -228
  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/interface/controller/controller/control/i-control.controller.d.ts +15 -0
  30. package/out/interface/controller/controller/control/i-control.controller.d.ts.map +1 -1
  31. package/out/interface/service/service/i-mark-open-data.service.d.ts +10 -1
  32. package/out/interface/service/service/i-mark-open-data.service.d.ts.map +1 -1
  33. package/out/model/utils/util.d.ts +9 -0
  34. package/out/model/utils/util.d.ts.map +1 -1
  35. package/out/model/utils/util.js +12 -0
  36. package/out/service/service/mark-open-data/mark-open-data.service.d.ts +16 -0
  37. package/out/service/service/mark-open-data/mark-open-data.service.d.ts.map +1 -1
  38. package/out/service/service/mark-open-data/mark-open-data.service.js +19 -0
  39. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +1 -0
  40. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
  41. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +12 -5
  42. package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
  43. package/out/ui-action/provider/front-ui-action-provider.js +6 -2
  44. package/out/ui-logic/ui-logic-param/ui-logic-param.d.ts.map +1 -1
  45. package/out/ui-logic/ui-logic-param/ui-logic-param.js +16 -2
  46. 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
  }
@@ -12008,12 +12017,34 @@ var MarkOpenDataService = class {
12008
12017
  }
12009
12018
  });
12010
12019
  }
12020
+ /**
12021
+ * 获取站内信的集合
12022
+ * @author lxm
12023
+ * @date 2023-11-15 10:55:25
12024
+ * @param {IParams} [params={}]
12025
+ * @return {*} {Promise<IHttpResponse>}
12026
+ */
12011
12027
  async action(deName, key, action) {
12012
12028
  const res = await ibiz.net.get(
12013
12029
  "".concat(this.baseUrl, "/").concat(deName, "/").concat(key, "/").concat(action)
12014
12030
  );
12015
12031
  return res;
12016
12032
  }
12033
+ /**
12034
+ * 发送系统消息
12035
+ * @param name
12036
+ * @param key
12037
+ * @param action
12038
+ * @param data
12039
+ * @return {*} {Promise<IHttpResponse>}
12040
+ */
12041
+ async send(name, key, action, data) {
12042
+ const res = await ibiz.net.post(
12043
+ "".concat(this.baseUrl, "/").concat(name, "/").concat(key, "/").concat(action),
12044
+ data
12045
+ );
12046
+ return res;
12047
+ }
12017
12048
  /**
12018
12049
  * 监听指定实体指定主键的消息
12019
12050
  * @author lxm
@@ -13413,7 +13444,7 @@ function installCommand() {
13413
13444
  }
13414
13445
 
13415
13446
  // src/app-hub.ts
13416
- import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
13447
+ import { RuntimeError as RuntimeError68 } from "@ibiz-template/core";
13417
13448
 
13418
13449
  // src/application.ts
13419
13450
  import { Net, getToken } from "@ibiz-template/core";
@@ -14673,7 +14704,8 @@ async function asyncImportData(file, appDataEntity, dataImport, context) {
14673
14704
  await listenAsyncAction(res.data.asyncacitonid);
14674
14705
  ibiz.mc.command.send(
14675
14706
  { srfdecodename: appDataEntity.codeName },
14676
- "OBJECTCREATED"
14707
+ "OBJECTCREATED",
14708
+ "DATAIMPORT"
14677
14709
  );
14678
14710
  }
14679
14711
  async function importData(file, appDataEntity, dataImport, context) {
@@ -15803,7 +15835,8 @@ import {
15803
15835
  HttpError as HttpError6,
15804
15836
  IBizContext as IBizContext3,
15805
15837
  IBizParams,
15806
- NoticeError as NoticeError2
15838
+ NoticeError as NoticeError2,
15839
+ RuntimeError as RuntimeError35
15807
15840
  } from "@ibiz-template/core";
15808
15841
  import { clone as clone18, isNil as isNil23 } from "ramda";
15809
15842
  import { notNilEmpty as notNilEmpty7 } from "qx-util";
@@ -15840,6 +15873,28 @@ var ControlController = class extends BaseController {
15840
15873
  * @type {{ [key: string]: IProvider }}
15841
15874
  */
15842
15875
  this.providers = {};
15876
+ /**
15877
+ * 触发源key
15878
+ *
15879
+ * @author tony001
15880
+ * @date 2024-03-28 17:03:03
15881
+ * @type {string}
15882
+ */
15883
+ this.triggerKey = "";
15884
+ /**
15885
+ * 等到激活的回调函数集合
15886
+ *
15887
+ * @author tony001
15888
+ * @date 2024-03-28 17:03:15
15889
+ */
15890
+ this.awaitActiveCbs = /* @__PURE__ */ new Map();
15891
+ /**
15892
+ * 延迟执行(防抖用)
15893
+ *
15894
+ * @author tony001
15895
+ * @date 2024-03-28 17:03:27
15896
+ */
15897
+ this.delayCbs = /* @__PURE__ */ new Map();
15843
15898
  this.registerToCtx();
15844
15899
  this.controlPanel = getControlPanel(model);
15845
15900
  if (!this.controlPanel) {
@@ -15905,6 +15960,12 @@ var ControlController = class extends BaseController {
15905
15960
  );
15906
15961
  });
15907
15962
  }
15963
+ if (this.model.appDataEntityId) {
15964
+ const codeName = calcDeCodeNameById(this.model.appDataEntityId);
15965
+ this.triggerKey = "".concat(codeName, "@").concat(this.model.controlType, "@").concat(this.model.codeName);
15966
+ }
15967
+ this.onDEDataChange = this.onDEDataChange.bind(this);
15968
+ ibiz.mc.command.change.on(this.onDEDataChange);
15908
15969
  }
15909
15970
  async onMounted() {
15910
15971
  var _a;
@@ -15912,6 +15973,7 @@ var ControlController = class extends BaseController {
15912
15973
  (_a = this.scheduler) == null ? void 0 : _a.startTimerTrigger();
15913
15974
  }
15914
15975
  async onDestroyed() {
15976
+ ibiz.mc.command.change.off(this.onDEDataChange);
15915
15977
  await super.onDestroyed();
15916
15978
  if (this.scheduler) {
15917
15979
  this.scheduler.destroy();
@@ -15992,6 +16054,12 @@ var ControlController = class extends BaseController {
15992
16054
  */
15993
16055
  onActivated() {
15994
16056
  this.state.activated = true;
16057
+ if (this.awaitActiveCbs.size > 0) {
16058
+ this.awaitActiveCbs.forEach((cb) => {
16059
+ cb();
16060
+ });
16061
+ }
16062
+ this.awaitActiveCbs.clear();
15995
16063
  ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u6FC0\u6D3B"));
15996
16064
  }
15997
16065
  /**
@@ -16140,22 +16208,82 @@ var ControlController = class extends BaseController {
16140
16208
  ibiz.message.success(message, duration, duration === 0);
16141
16209
  }
16142
16210
  }
16211
+ /**
16212
+ * 监听实体数据变更
16213
+ *
16214
+ * @author tony001
16215
+ * @date 2024-03-28 18:03:33
16216
+ * @protected
16217
+ * @param {IPortalMessage} msg
16218
+ */
16219
+ onDEDataChange(msg) {
16220
+ ibiz.log.debug("onDEDataChange", msg);
16221
+ }
16222
+ /**
16223
+ * 触发实体数据变更的通知
16224
+ *
16225
+ * @author tony001
16226
+ * @date 2024-03-28 18:03:44
16227
+ * @param {('create' | 'update' | 'remove')} type
16228
+ * @param {IData} data
16229
+ */
16230
+ emitDEDataChange(type, data) {
16231
+ const msg = data instanceof ControlVO ? data.$origin : data;
16232
+ const meta = { triggerKey: this.triggerKey };
16233
+ switch (type) {
16234
+ case "create":
16235
+ ibiz.mc.command.create.send(msg, meta);
16236
+ break;
16237
+ case "update":
16238
+ ibiz.mc.command.update.send(msg, meta);
16239
+ break;
16240
+ case "remove":
16241
+ ibiz.mc.command.remove.send(msg, meta);
16242
+ break;
16243
+ default:
16244
+ throw new RuntimeError35("\u4E0D\u652F\u6301\u7684\u5B9E\u4F53\u6570\u636E\u53D8\u66F4\u7C7B\u578B: ".concat(type));
16245
+ }
16246
+ }
16247
+ /**
16248
+ * 如果当前视图没有激活,则等待激活后执行回调函数
16249
+ * - 在执行之前key相同的会替换
16250
+ * 如果当前视图已经激活,则立即执行回调函数
16251
+ * - delay参数指定延迟执行时间,可以防抖
16252
+ *
16253
+ * @author tony001
16254
+ * @date 2024-03-28 18:03:00
16255
+ * @param {() => void} cb
16256
+ * @param {{ key: string; delay?: number }} opts
16257
+ */
16258
+ doNextActive(cb, opts) {
16259
+ if (isNil23(opts.delay)) {
16260
+ opts.delay = 300;
16261
+ }
16262
+ if (this.state.activated === false) {
16263
+ this.awaitActiveCbs.set(opts.key, cb);
16264
+ } else if (opts.delay) {
16265
+ const _timer = this.delayCbs.get(opts.key);
16266
+ clearTimeout(_timer);
16267
+ const timer = setTimeout(() => {
16268
+ cb();
16269
+ clearTimeout(this.delayCbs.get(opts.key));
16270
+ }, opts.delay);
16271
+ this.delayCbs.set(opts.key, timer);
16272
+ } else {
16273
+ cb();
16274
+ }
16275
+ }
16143
16276
  };
16144
16277
 
16145
16278
  // src/controller/common/control/md-control.controller.ts
16146
- import { isElementSame, RuntimeError as RuntimeError35 } from "@ibiz-template/core";
16147
- import { debounce } from "lodash-es";
16279
+ import {
16280
+ isElementSame,
16281
+ RuntimeError as RuntimeError36
16282
+ } from "@ibiz-template/core";
16283
+ import { isNil as isNil24 } from "ramda";
16148
16284
  var MDControlController = class extends ControlController {
16149
16285
  constructor() {
16150
16286
  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
16287
  /**
16160
16288
  * 是否设置过排序条件,比如searchBars默认点击分组时设置了
16161
16289
  * @return {*}
@@ -16229,11 +16357,6 @@ var MDControlController = class extends ControlController {
16229
16357
  (_a = this.dataEntity.appDEFields) == null ? void 0 : _a.forEach((field) => {
16230
16358
  this.fieldIdNameMap.set(field.id, field.name);
16231
16359
  });
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
16360
  if (!this.isSetSort) {
16238
16361
  this.setSort();
16239
16362
  }
@@ -16244,34 +16367,6 @@ var MDControlController = class extends ControlController {
16244
16367
  this.load({ isInitialLoad: true });
16245
16368
  }
16246
16369
  }
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
16370
  /**
16276
16371
  * 获取部件默认排序模型
16277
16372
  * @return {*}
@@ -16418,12 +16513,16 @@ var MDControlController = class extends ControlController {
16418
16513
  return items;
16419
16514
  }
16420
16515
  /**
16421
- * 部件刷新,走初始加载
16422
- * @author lxm
16423
- * @date 2023-05-23 03:42:41
16516
+ * 部件刷新,走初始加载(规避预置后续刷新和通知刷新同时进行)
16517
+ *
16518
+ * @author tony001
16519
+ * @date 2024-03-28 18:03:00
16520
+ * @return {*} {Promise<void>}
16424
16521
  */
16425
16522
  async refresh() {
16426
- await this.load({ isInitialLoad: false });
16523
+ this.doNextActive(() => this.load({ isInitialLoad: false }), {
16524
+ key: "refresh"
16525
+ });
16427
16526
  }
16428
16527
  /**
16429
16528
  * 删除选中的数据
@@ -16435,7 +16534,7 @@ var MDControlController = class extends ControlController {
16435
16534
  async remove(args) {
16436
16535
  const { context, params, data } = this.handlerAbilityParams(args);
16437
16536
  if (!(data == null ? void 0 : data.length)) {
16438
- throw new RuntimeError35("\u672A\u9009\u4E2D\u6570\u636E");
16537
+ throw new RuntimeError36("\u672A\u9009\u4E2D\u6570\u636E");
16439
16538
  }
16440
16539
  if ((args == null ? void 0 : args.silent) !== true) {
16441
16540
  const del = await ibiz.confirm.error({
@@ -16477,6 +16576,9 @@ var MDControlController = class extends ControlController {
16477
16576
  }
16478
16577
  this.state.selectedData = [];
16479
16578
  await this._evt.emit("onRemoveSuccess", void 0);
16579
+ data.forEach((item) => {
16580
+ this.emitDEDataChange("remove", item);
16581
+ });
16480
16582
  }
16481
16583
  /**
16482
16584
  * 删除每一项
@@ -16595,7 +16697,7 @@ var MDControlController = class extends ControlController {
16595
16697
  (importItem) => importItem.id === dedataImportId
16596
16698
  );
16597
16699
  if (!dataImport) {
16598
- throw new RuntimeError35("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
16700
+ throw new RuntimeError36("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
16599
16701
  }
16600
16702
  let importName = "DataImport";
16601
16703
  if (dataImport.enableCustomized) {
@@ -16627,12 +16729,53 @@ var MDControlController = class extends ControlController {
16627
16729
  */
16628
16730
  async exportData(_args) {
16629
16731
  }
16732
+ /**
16733
+ * 检测实体数据变更
16734
+ *
16735
+ * @author tony001
16736
+ * @date 2024-03-28 18:03:30
16737
+ * @protected
16738
+ * @param {IPortalMessage} msg
16739
+ * @return {*} {void}
16740
+ */
16741
+ onDEDataChange(msg) {
16742
+ if (!isNil24(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
16743
+ return;
16744
+ }
16745
+ if (!msg.data || msg.data.srfdecodename !== this.dataEntity.codeName) {
16746
+ return;
16747
+ }
16748
+ let isRefresh = false;
16749
+ const { srfkey } = msg.data;
16750
+ switch (msg.subtype) {
16751
+ case "OBJECTCREATED":
16752
+ isRefresh = true;
16753
+ break;
16754
+ case "OBJECTUPDATED":
16755
+ if (this.state.items.findIndex((item) => item.srfkey === srfkey) !== -1) {
16756
+ isRefresh = true;
16757
+ }
16758
+ break;
16759
+ case "OBJECTREMOVED":
16760
+ if (this.state.items.findIndex((item) => item.srfkey === srfkey) !== -1) {
16761
+ isRefresh = true;
16762
+ }
16763
+ break;
16764
+ default:
16765
+ break;
16766
+ }
16767
+ if (isRefresh) {
16768
+ this.doNextActive(() => this.load({ isInitialLoad: !!ibiz.env.isMob }), {
16769
+ key: "refresh"
16770
+ });
16771
+ }
16772
+ }
16630
16773
  };
16631
16774
 
16632
16775
  // src/controller/control/app-menu/app-menu.controller.ts
16633
16776
  import {
16634
16777
  findRecursiveChild,
16635
- RuntimeError as RuntimeError36,
16778
+ RuntimeError as RuntimeError37,
16636
16779
  RuntimeModelError as RuntimeModelError26
16637
16780
  } from "@ibiz-template/core";
16638
16781
  var AppMenuController = class extends ControlController {
@@ -16701,7 +16844,7 @@ var AppMenuController = class extends ControlController {
16701
16844
  childrenFields: ["appMenuItems"]
16702
16845
  });
16703
16846
  if (!menuItem) {
16704
- throw new RuntimeError36("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16847
+ throw new RuntimeError37("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16705
16848
  }
16706
16849
  this.evt.emit("onClick", {
16707
16850
  eventArg: id,
@@ -16831,7 +16974,7 @@ var AppMenuController = class extends ControlController {
16831
16974
  // src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
16832
16975
  import {
16833
16976
  findRecursiveChild as findRecursiveChild2,
16834
- RuntimeError as RuntimeError37,
16977
+ RuntimeError as RuntimeError38,
16835
16978
  RuntimeModelError as RuntimeModelError27
16836
16979
  } from "@ibiz-template/core";
16837
16980
  var AppMenuIconViewController = class extends AppMenuController {
@@ -16841,7 +16984,7 @@ var AppMenuIconViewController = class extends AppMenuController {
16841
16984
  childrenFields: ["appMenuItems"]
16842
16985
  });
16843
16986
  if (!menuItem) {
16844
- throw new RuntimeError37("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16987
+ throw new RuntimeError38("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16845
16988
  }
16846
16989
  this.evt.emit("onClick", {
16847
16990
  eventArg: id,
@@ -16870,7 +17013,7 @@ import dayjs3 from "dayjs";
16870
17013
  import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
16871
17014
 
16872
17015
  // src/controller/control/calendar/calendar.service.ts
16873
- import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
17016
+ import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
16874
17017
  import { clone as clone19 } from "ramda";
16875
17018
  var CalendarService = class extends MDControlService {
16876
17019
  /**
@@ -16926,11 +17069,11 @@ var CalendarService = class extends MDControlService {
16926
17069
  setCalendarConfigData(items, index) {
16927
17070
  const { sysCalendarItems } = this.model;
16928
17071
  if (!sysCalendarItems) {
16929
- throw new RuntimeError38("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
17072
+ throw new RuntimeError39("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16930
17073
  }
16931
17074
  const calendarItem = sysCalendarItems[index];
16932
17075
  if (!calendarItem) {
16933
- throw new RuntimeError38("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
17076
+ throw new RuntimeError39("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16934
17077
  }
16935
17078
  return items.map((item) => {
16936
17079
  return new CalendarItemData(calendarItem, item);
@@ -17211,11 +17354,11 @@ var CalendarController = class extends MDControlController {
17211
17354
  };
17212
17355
 
17213
17356
  // src/controller/control/chart/chart.controller.ts
17214
- import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
17357
+ import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
17215
17358
 
17216
17359
  // src/controller/control/chart/generator/chart-options-generator.ts
17217
17360
  import { mergeDeepRight as mergeDeepRight3 } from "ramda";
17218
- import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
17361
+ import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
17219
17362
 
17220
17363
  // src/controller/control/chart/generator/line-series-generator.ts
17221
17364
  import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
@@ -17228,7 +17371,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
17228
17371
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
17229
17372
  import weekOfYear from "dayjs/plugin/weekOfYear";
17230
17373
  import isoWeek from "dayjs/plugin/isoWeek";
17231
- import { clone as clone20, isNil as isNil24, mergeDeepRight } from "ramda";
17374
+ import { clone as clone20, isNil as isNil25, mergeDeepRight } from "ramda";
17232
17375
  dayjs4.extend(minMax2);
17233
17376
  dayjs4.extend(isSameOrBefore);
17234
17377
  dayjs4.extend(quarterOfYear);
@@ -17324,10 +17467,10 @@ var BaseSeriesGenerator = class {
17324
17467
  * @return {*} {(string | undefined)}
17325
17468
  */
17326
17469
  translateVal(codeListKey, val, isExclude = false) {
17327
- if (isNil24(val)) {
17470
+ if (isNil25(val)) {
17328
17471
  return void 0;
17329
17472
  }
17330
- if (isNil24(codeListKey)) {
17473
+ if (isNil25(codeListKey)) {
17331
17474
  return val;
17332
17475
  }
17333
17476
  const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
@@ -17336,6 +17479,7 @@ var BaseSeriesGenerator = class {
17336
17479
  if (find) {
17337
17480
  return find.text;
17338
17481
  }
17482
+ return "\u672A\u5B9A\u4E49";
17339
17483
  }
17340
17484
  return isExclude ? void 0 : val;
17341
17485
  }
@@ -17376,7 +17520,7 @@ var BaseSeriesGenerator = class {
17376
17520
  seriesCodeListId,
17377
17521
  item[this.groupField]
17378
17522
  );
17379
- if (isNil24(groupVal)) {
17523
+ if (isNil25(groupVal)) {
17380
17524
  return;
17381
17525
  }
17382
17526
  group = groupVal;
@@ -18224,7 +18368,7 @@ var ChartOptionsGenerator2 = class {
18224
18368
  getChartDataByParams(params) {
18225
18369
  const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
18226
18370
  if (!generator) {
18227
- throw new RuntimeError39("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
18371
+ throw new RuntimeError40("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
18228
18372
  }
18229
18373
  return generator.getChartDataByParams(params);
18230
18374
  }
@@ -18338,10 +18482,10 @@ var ChartController = class extends MDControlController {
18338
18482
  */
18339
18483
  updateChart() {
18340
18484
  if (!this.chart) {
18341
- throw new RuntimeError40("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
18485
+ throw new RuntimeError41("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
18342
18486
  }
18343
18487
  if (!this.options) {
18344
- throw new RuntimeError40("options\u8FD8\u6CA1\u8BA1\u7B97");
18488
+ throw new RuntimeError41("options\u8FD8\u6CA1\u8BA1\u7B97");
18345
18489
  }
18346
18490
  this.chart.setOption(this.options, { notMerge: true });
18347
18491
  this.resizeChart();
@@ -18391,7 +18535,7 @@ var CaptionBarController = class extends ControlController {
18391
18535
  };
18392
18536
 
18393
18537
  // src/controller/control/toolbar/toolbar.controllerr.ts
18394
- import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError49 } from "@ibiz-template/core";
18538
+ import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError50 } from "@ibiz-template/core";
18395
18539
 
18396
18540
  // src/ui-action/provider/backend-ui-action-provider.ts
18397
18541
  import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
@@ -18401,7 +18545,7 @@ import { isArray as isArray8 } from "qx-util";
18401
18545
  import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
18402
18546
 
18403
18547
  // src/ui-logic/index.ts
18404
- import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
18548
+ import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
18405
18549
 
18406
18550
  // src/ui-logic/ui-logic.ts
18407
18551
  import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
@@ -18987,7 +19131,7 @@ var EndNode2 = class extends UILogicNode {
18987
19131
  };
18988
19132
 
18989
19133
  // 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";
19134
+ import { ModelError as ModelError22, RuntimeError as RuntimeError42 } from "@ibiz-template/core";
18991
19135
  import { clone as clone22 } from "ramda";
18992
19136
  var PrepareJSParamNode = class extends UILogicNode {
18993
19137
  async exec(ctx) {
@@ -19047,7 +19191,7 @@ var PrepareJSParamNode = class extends UILogicNode {
19047
19191
  setParamValue(nodeParam, ctx) {
19048
19192
  const { dstFieldName, dstDEUILogicParamId } = nodeParam;
19049
19193
  if (!dstDEUILogicParamId) {
19050
- throw new RuntimeError41("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
19194
+ throw new RuntimeError42("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
19051
19195
  }
19052
19196
  let dstField = dstFieldName;
19053
19197
  if (ctx.isEntityParam(dstDEUILogicParamId)) {
@@ -19164,7 +19308,7 @@ var PrepareJSParamNode = class extends UILogicNode {
19164
19308
  };
19165
19309
 
19166
19310
  // 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";
19311
+ import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
19168
19312
  import { isFunction } from "lodash-es";
19169
19313
  var ViewCtrlInvokeNode = class extends UILogicNode {
19170
19314
  async exec(ctx) {
@@ -19181,14 +19325,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
19181
19325
  }
19182
19326
  const invokeParam = ctx.params[invokeParamId];
19183
19327
  if (!invokeParam) {
19184
- throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
19328
+ throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
19185
19329
  }
19186
19330
  const invokeCtrl = ctx.params[invokeCtrlId];
19187
19331
  if (!invokeCtrl) {
19188
- throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
19332
+ throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
19189
19333
  }
19190
19334
  if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
19191
- throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
19335
+ throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
19192
19336
  }
19193
19337
  ibiz.log.debug(
19194
19338
  "\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 +19602,19 @@ var DataSetNode2 = class extends UILogicNode {
19458
19602
  };
19459
19603
 
19460
19604
  // src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
19461
- import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
19605
+ import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
19462
19606
  var ThrowExceptionNode2 = class extends UILogicNode {
19463
19607
  async exec(_ctx) {
19464
19608
  const { errorInfo } = this.model;
19465
19609
  ibiz.log.debug(
19466
19610
  "\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
19611
  );
19468
- throw new RuntimeError43(errorInfo);
19612
+ throw new RuntimeError44(errorInfo);
19469
19613
  }
19470
19614
  };
19471
19615
 
19472
19616
  // 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";
19617
+ import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
19474
19618
  var ViewCtrlFireEventNode = class extends UILogicNode {
19475
19619
  async exec(ctx) {
19476
19620
  ctx.isEndNode = true;
@@ -19486,11 +19630,11 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
19486
19630
  }
19487
19631
  const invokeCtrl = ctx.params[fireCtrlId];
19488
19632
  if (!invokeCtrl) {
19489
- throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
19633
+ throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
19490
19634
  }
19491
19635
  const eventParam = ctx.params[eventParamId];
19492
19636
  if (!eventParam) {
19493
- throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
19637
+ throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
19494
19638
  }
19495
19639
  ibiz.log.debug(
19496
19640
  "\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 +19645,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
19501
19645
  };
19502
19646
 
19503
19647
  // 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";
19648
+ import { RuntimeError as RuntimeError46, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
19505
19649
  var ExecuteDELogicNode = class extends UILogicNode {
19506
19650
  async exec(ctx) {
19507
19651
  const {
@@ -19521,7 +19665,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
19521
19665
  }
19522
19666
  const dstParam = ctx.params[dstDEUILogicParamId];
19523
19667
  if (!dstParam) {
19524
- throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
19668
+ throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
19525
19669
  }
19526
19670
  const result = await execDELogicById(
19527
19671
  dstAppDELogicId,
@@ -19627,7 +19771,11 @@ var UILogicParam = class {
19627
19771
  } else if (m.navViewParamParam) {
19628
19772
  throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u89C6\u56FE\u8DEF\u7531\u53C2\u6570");
19629
19773
  } else if (m.routeViewSessionParam) {
19630
- throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u8DEF\u7531\u89C6\u56FE\u4F1A\u8BDD");
19774
+ let value = parameters.view.getTopView().state;
19775
+ if (m.paramFieldName) {
19776
+ value = value[m.paramFieldName];
19777
+ }
19778
+ ctx.params[tag] = value;
19631
19779
  } else if (m.simpleListParam) {
19632
19780
  ctx.params[tag] = [];
19633
19781
  } else if (m.simpleParam) {
@@ -19635,7 +19783,13 @@ var UILogicParam = class {
19635
19783
  } else if (m.viewNavDataParam) {
19636
19784
  ctx.params[tag] = params;
19637
19785
  } else if (m.viewSessionParam) {
19638
- throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5F53\u524D\u89C6\u56FE\u4F1A\u8BDD");
19786
+ let value = parameters.view.state;
19787
+ if (m.paramFieldName) {
19788
+ value = value[m.paramFieldName];
19789
+ }
19790
+ ctx.params[tag] = value;
19791
+ } else if (m.filterParam) {
19792
+ ctx.params[tag] = {};
19639
19793
  }
19640
19794
  ibiz.log.debug("\u8BA1\u7B97\u754C\u9762\u903B\u8F91\u53C2\u6570\uFF0C\u6807\u8BC6\uFF1A".concat(tag), "-\u503C\uFF1A", ctx.params[tag]);
19641
19795
  }
@@ -19859,7 +20013,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
19859
20013
  const app = ibiz.hub.getApp(parameters.context.srfappid);
19860
20014
  const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
19861
20015
  if (!deUILogic) {
19862
- throw new RuntimeError46(
20016
+ throw new RuntimeError47(
19863
20017
  "\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
19864
20018
  );
19865
20019
  }
@@ -19878,7 +20032,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
19878
20032
  }
19879
20033
 
19880
20034
  // src/ui-action/uiaction-util.ts
19881
- import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
20035
+ import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
19882
20036
  var UIActionUtil = class {
19883
20037
  /**
19884
20038
  * 执行界面行为
@@ -19893,7 +20047,7 @@ var UIActionUtil = class {
19893
20047
  static async exec(actionId, params, appId2) {
19894
20048
  const action = await getUIActionById(actionId, appId2);
19895
20049
  if (!action) {
19896
- throw new RuntimeError47("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
20050
+ throw new RuntimeError48("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
19897
20051
  }
19898
20052
  if (action.actionTarget === "SINGLEDATA") {
19899
20053
  const validateResult = await params.view.call("Validate" /* VALIDATE */);
@@ -20385,7 +20539,7 @@ import {
20385
20539
  StringUtil,
20386
20540
  RuntimeModelError as RuntimeModelError52,
20387
20541
  ModelError as ModelError26,
20388
- RuntimeError as RuntimeError48
20542
+ RuntimeError as RuntimeError49
20389
20543
  } from "@ibiz-template/core";
20390
20544
  import { mergeRight as mergeRight3 } from "ramda";
20391
20545
  var FrontUIActionProvider = class extends UIActionProviderBase {
@@ -20499,7 +20653,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20499
20653
  if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
20500
20654
  requestUrl += "/".concat(appDataEntity.deapicodeName2, "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
20501
20655
  } else {
20502
- throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
20656
+ throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
20503
20657
  }
20504
20658
  const res = await ibiz.net.request(requestUrl, {
20505
20659
  method: "get",
@@ -20526,10 +20680,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20526
20680
  window.open(link, "_blank");
20527
20681
  }
20528
20682
  } else {
20529
- throw new RuntimeError48("\u6253\u5370\u5931\u8D25");
20683
+ throw new RuntimeError49("\u6253\u5370\u5931\u8D25");
20530
20684
  }
20531
20685
  } else {
20532
- throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
20686
+ throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
20533
20687
  }
20534
20688
  }
20535
20689
  /**
@@ -20580,7 +20734,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20580
20734
  refreshMode: 1
20581
20735
  };
20582
20736
  }
20583
- throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
20737
+ throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
20584
20738
  }
20585
20739
  /**
20586
20740
  * 执行导出行为
@@ -20631,10 +20785,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20631
20785
  URL.revokeObjectURL(elink.href);
20632
20786
  document.body.removeChild(elink);
20633
20787
  } else {
20634
- throw new RuntimeError48("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
20788
+ throw new RuntimeError49("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
20635
20789
  }
20636
20790
  } else {
20637
- throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
20791
+ throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
20638
20792
  }
20639
20793
  }
20640
20794
  /**
@@ -20651,7 +20805,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20651
20805
  const actionResult = {};
20652
20806
  const { context, params, data, event } = args;
20653
20807
  if (!event) {
20654
- throw new RuntimeError48("\u7F3A\u5C11\u539F\u751FJS\u4E8B\u4EF6\u5BF9\u8C61");
20808
+ throw new RuntimeError49("\u7F3A\u5C11\u539F\u751FJS\u4E8B\u4EF6\u5BF9\u8C61");
20655
20809
  }
20656
20810
  const { resultContext, resultParams } = await this.handleParams(
20657
20811
  action,
@@ -20667,20 +20821,23 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
20667
20821
  options
20668
20822
  );
20669
20823
  let hasSave = false;
20670
- await ibiz.overlay.popover(
20671
- event.target,
20824
+ const overlay = ibiz.overlay.createPopover(
20672
20825
  "IBizControlShell",
20673
20826
  {
20674
20827
  context: resultContext,
20675
20828
  params: resultParams,
20676
20829
  modelData: action.deeditForm,
20677
20830
  onSaveSuccess: () => {
20678
- console.log("\u4FDD\u5B58\u6210\u529F");
20831
+ if (overlay) {
20832
+ overlay.dismiss();
20833
+ }
20679
20834
  hasSave = true;
20680
20835
  }
20681
20836
  },
20682
20837
  popoverOpts
20683
20838
  );
20839
+ overlay.present(event.target);
20840
+ await overlay.onWillDismiss();
20684
20841
  if (!hasSave) {
20685
20842
  actionResult.cancel = true;
20686
20843
  }
@@ -20770,7 +20927,7 @@ var ToolbarController = class extends ControlController {
20770
20927
  const actionId = item.uiactionId;
20771
20928
  const uiAction = await getUIActionById(actionId, item.appId);
20772
20929
  if (!uiAction) {
20773
- throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
20930
+ throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
20774
20931
  }
20775
20932
  const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
20776
20933
  if (enableLoading) {
@@ -21384,7 +21541,7 @@ var RawItemPortletController = class extends PortletPartController {
21384
21541
 
21385
21542
  // src/controller/control/data-view/data-view.controller.ts
21386
21543
  import { RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
21387
- import { isNil as isNil25 } from "ramda";
21544
+ import { isNil as isNil26 } from "ramda";
21388
21545
 
21389
21546
  // src/controller/control/data-view/data-view.service.ts
21390
21547
  var DataViewControlService = class extends MDControlService {
@@ -21675,7 +21832,7 @@ var DataViewControlController = class extends MDControlController {
21675
21832
  const groupMap = /* @__PURE__ */ new Map();
21676
21833
  items.forEach((item) => {
21677
21834
  const groupVal = item[groupAppDEFieldId];
21678
- if (isNil25(groupVal)) {
21835
+ if (isNil26(groupVal)) {
21679
21836
  return;
21680
21837
  }
21681
21838
  if (!groupMap.has(groupVal)) {
@@ -21848,7 +22005,7 @@ var DataViewControlController = class extends MDControlController {
21848
22005
  import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
21849
22006
 
21850
22007
  // src/controller/control/exp-bar/exp-bar.controller.ts
21851
- import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
22008
+ import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
21852
22009
  var ExpBarControlController = class extends ControlController {
21853
22010
  constructor() {
21854
22011
  super(...arguments);
@@ -22179,7 +22336,7 @@ var ExpBarControlController = class extends ControlController {
22179
22336
  if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
22180
22337
  return this.XDataModel.navAppViewId;
22181
22338
  }
22182
- throw new RuntimeError50("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
22339
+ throw new RuntimeError51("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
22183
22340
  }
22184
22341
  /**
22185
22342
  * 获取导航视图
@@ -22322,7 +22479,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
22322
22479
  };
22323
22480
 
22324
22481
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
22325
- import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
22482
+ import { RuntimeError as RuntimeError52, RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
22326
22483
  var TreeExpBarController = class extends ExpBarControlController {
22327
22484
  constructor() {
22328
22485
  super(...arguments);
@@ -22411,7 +22568,7 @@ var TreeExpBarController = class extends ExpBarControlController {
22411
22568
  const deData = node._deData || node;
22412
22569
  const nodeModel = this.getNodeModel(node._nodeId);
22413
22570
  if (!nodeModel) {
22414
- throw new RuntimeError51("\u627E\u4E0D\u5230".concat(node._nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
22571
+ throw new RuntimeError52("\u627E\u4E0D\u5230".concat(node._nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
22415
22572
  }
22416
22573
  const result = this.prepareParams(nodeModel, deData, context, params);
22417
22574
  result.context.currentSrfNav = nodeId;
@@ -22602,7 +22759,7 @@ var ChartExpBarController = class extends ExpBarControlController {
22602
22759
  };
22603
22760
 
22604
22761
  // src/controller/control/form/search-form/search-form.controller.ts
22605
- import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
22762
+ import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
22606
22763
 
22607
22764
  // src/controller/control/form/form/form.controller.ts
22608
22765
  import {
@@ -23211,7 +23368,7 @@ var SearchFormController = class extends FormController {
23211
23368
  applyStoredFilter(index) {
23212
23369
  const filter = this.state.storedFilters[index];
23213
23370
  if (!filter) {
23214
- throw new RuntimeError52("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
23371
+ throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
23215
23372
  }
23216
23373
  if (filter.data) {
23217
23374
  Object.assign(this.data, filter.data);
@@ -23227,7 +23384,7 @@ var SearchFormController = class extends FormController {
23227
23384
  async removeStoredFilter(index) {
23228
23385
  const filter = this.state.storedFilters[index];
23229
23386
  if (!filter) {
23230
- throw new RuntimeError52("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
23387
+ throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
23231
23388
  }
23232
23389
  this.state.storedFilters.splice(index, 1);
23233
23390
  await this.saveConfig();
@@ -24608,7 +24765,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
24608
24765
  };
24609
24766
 
24610
24767
  // 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";
24768
+ import { RuntimeError as RuntimeError54, RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
24612
24769
  import { createUUID as createUUID11 } from "qx-util";
24613
24770
 
24614
24771
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
@@ -24725,7 +24882,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
24725
24882
  async remove(id) {
24726
24883
  const controller = this.formMap.get(id);
24727
24884
  if (!controller) {
24728
- throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
24885
+ throw new RuntimeError54("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
24729
24886
  }
24730
24887
  await controller.remove();
24731
24888
  const index = this.state.items.findIndex((item) => item.id === id);
@@ -25042,11 +25199,11 @@ import {
25042
25199
  IBizContext as IBizContext4,
25043
25200
  isElementSame as isElementSame2,
25044
25201
  mergeInLeft as mergeInLeft2,
25045
- RuntimeError as RuntimeError54
25202
+ RuntimeError as RuntimeError55
25046
25203
  } from "@ibiz-template/core";
25047
- import { debounce as debounce2 } from "lodash-es";
25204
+ import { debounce } from "lodash-es";
25048
25205
  import { createUUID as createUUID12 } from "qx-util";
25049
- import { clone as clone25 } from "ramda";
25206
+ import { clone as clone25, isNil as isNil27 } from "ramda";
25050
25207
 
25051
25208
  // src/controller/control/form/edit-form/edit-form.service.ts
25052
25209
  import {
@@ -25364,7 +25521,7 @@ var EditFormController = class extends FormController {
25364
25521
  await super.onCreated();
25365
25522
  this.service = new EditFormService(this.model);
25366
25523
  await this.service.init(this.context);
25367
- this.autoSave = debounce2(this.autoSave.bind(this), 500, {
25524
+ this.autoSave = debounce(this.autoSave.bind(this), 500, {
25368
25525
  trailing: true
25369
25526
  });
25370
25527
  }
@@ -25507,7 +25664,7 @@ var EditFormController = class extends FormController {
25507
25664
  }
25508
25665
  const isValid = await this.validate();
25509
25666
  if (!isValid) {
25510
- throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25667
+ throw new RuntimeError55("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25511
25668
  }
25512
25669
  if (!silent) {
25513
25670
  await this.startLoading();
@@ -25551,10 +25708,7 @@ var EditFormController = class extends FormController {
25551
25708
  default: "".concat(this.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F")
25552
25709
  });
25553
25710
  }
25554
- ibiz.mc.command.send(
25555
- res.data.$origin,
25556
- isCreate ? "OBJECTCREATED" : "OBJECTUPDATED"
25557
- );
25711
+ this.emitDEDataChange(isCreate ? "create" : "update", res.data);
25558
25712
  return this.data;
25559
25713
  }
25560
25714
  /**
@@ -25591,11 +25745,11 @@ var EditFormController = class extends FormController {
25591
25745
  }
25592
25746
  ok = res.ok;
25593
25747
  }
25748
+ this.emitDEDataChange("remove", this.data);
25594
25749
  this.state.data = new ControlVO();
25595
25750
  this.state.modified = false;
25596
25751
  await this.evt.emit("onRemoveSuccess", void 0);
25597
25752
  this.actionNotification("REMOVESUCCESS");
25598
- ibiz.mc.command.send(this.data.$origin, "OBJECTREMOVED");
25599
25753
  return ok;
25600
25754
  }
25601
25755
  /**
@@ -25632,7 +25786,7 @@ var EditFormController = class extends FormController {
25632
25786
  (item) => item.id === formItemUpdateId
25633
25787
  );
25634
25788
  if (!formItemUpdate) {
25635
- throw new RuntimeError54("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
25789
+ throw new RuntimeError55("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
25636
25790
  }
25637
25791
  const {
25638
25792
  appDEMethodId,
@@ -25691,14 +25845,14 @@ var EditFormController = class extends FormController {
25691
25845
  async wfStart(args) {
25692
25846
  const isValid = await this.validate();
25693
25847
  if (!isValid) {
25694
- throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25848
+ throw new RuntimeError55("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25695
25849
  }
25696
25850
  await this.startLoading();
25697
25851
  const { context, params } = this.handlerAbilityParams(args);
25698
25852
  try {
25699
25853
  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");
25854
+ this.emitDEDataChange("update", this.data);
25855
+ this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
25702
25856
  } catch (error) {
25703
25857
  this.actionNotification("WFSTARTERROR", {
25704
25858
  error
@@ -25720,14 +25874,14 @@ var EditFormController = class extends FormController {
25720
25874
  async wfSubmit(args) {
25721
25875
  const isValid = await this.validate();
25722
25876
  if (!isValid) {
25723
- throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25877
+ throw new RuntimeError55("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
25724
25878
  }
25725
25879
  await this.startLoading();
25726
25880
  const { context, params } = this.handlerAbilityParams(args);
25727
25881
  try {
25728
25882
  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");
25883
+ this.emitDEDataChange("update", this.data);
25884
+ this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
25731
25885
  } catch (error) {
25732
25886
  this.actionNotification("WFSUBMITERROR", {
25733
25887
  error
@@ -25814,6 +25968,29 @@ var EditFormController = class extends FormController {
25814
25968
  this.dataChangeNotify(Object.keys(this.state.data));
25815
25969
  }
25816
25970
  }
25971
+ /**
25972
+ * 检测实体数据变更
25973
+ *
25974
+ * @author tony001
25975
+ * @date 2024-03-28 18:03:14
25976
+ * @protected
25977
+ * @param {IPortalMessage} msg
25978
+ * @return {*} {void}
25979
+ */
25980
+ onDEDataChange(msg) {
25981
+ var _a;
25982
+ if (msg.subtype !== "OBJECTUPDATED") {
25983
+ return;
25984
+ }
25985
+ if (!isNil27(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
25986
+ return;
25987
+ }
25988
+ const dename = calcDeCodeNameById(this.model.appDataEntityId);
25989
+ if (!msg.data || ((_a = msg.data.srfdecodename) == null ? void 0 : _a.toLowerCase()) !== dename || msg.data.srfkey !== this.data.srfkey) {
25990
+ return;
25991
+ }
25992
+ this.doNextActive(() => this.load(), { key: "load" });
25993
+ }
25817
25994
  };
25818
25995
 
25819
25996
  // src/controller/control/grid/grid/grid-column.controller.ts
@@ -26056,7 +26233,7 @@ import {
26056
26233
  debounceAndAsyncMerge as debounceAndAsyncMerge2,
26057
26234
  mergeDefaultInLeft,
26058
26235
  recursiveIterate as recursiveIterate7,
26059
- RuntimeError as RuntimeError55,
26236
+ RuntimeError as RuntimeError56,
26060
26237
  RuntimeModelError as RuntimeModelError62
26061
26238
  } from "@ibiz-template/core";
26062
26239
  import { clone as clone26 } from "ramda";
@@ -26683,7 +26860,7 @@ var GridController = class extends MDControlController {
26683
26860
  if (editShowMode === "row") {
26684
26861
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
26685
26862
  if (editingRow) {
26686
- throw new RuntimeError55("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
26863
+ throw new RuntimeError56("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
26687
26864
  }
26688
26865
  }
26689
26866
  const queryParams = { ...this.params };
@@ -26724,7 +26901,7 @@ var GridController = class extends MDControlController {
26724
26901
  const isCreate = data.srfuf === 0 /* CREATE */;
26725
26902
  const rowState = this.findRowState(data);
26726
26903
  if (!rowState) {
26727
- throw new RuntimeError55("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
26904
+ throw new RuntimeError56("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
26728
26905
  }
26729
26906
  if (!rowState.modified) {
26730
26907
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -26736,7 +26913,7 @@ var GridController = class extends MDControlController {
26736
26913
  }
26737
26914
  const isValid = await this.validate(rowState);
26738
26915
  if (!isValid) {
26739
- throw new RuntimeError55("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
26916
+ throw new RuntimeError56("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
26740
26917
  }
26741
26918
  if (this.model.enableRowEditChangedOnly) {
26742
26919
  data = rowState.getDiffData();
@@ -26762,6 +26939,7 @@ var GridController = class extends MDControlController {
26762
26939
  rowState.modified = false;
26763
26940
  this.gridStateNotify(rowState, "SAVE" /* SAVE */);
26764
26941
  await this._evt.emit("onSaveSuccess", void 0);
26942
+ this.emitDEDataChange(isCreate ? "create" : "update", res.data);
26765
26943
  }
26766
26944
  async saveAll() {
26767
26945
  const needSaveData = this.state.rows.filter((row) => row.modified).map((row) => row.data);
@@ -26958,7 +27136,7 @@ var GridController = class extends MDControlController {
26958
27136
  }
26959
27137
  async toggleRowEdit() {
26960
27138
  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");
27139
+ throw new RuntimeError56("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
26962
27140
  }
26963
27141
  this.state.rowEditOpen = !this.state.rowEditOpen;
26964
27142
  }
@@ -26991,7 +27169,7 @@ var GridController = class extends MDControlController {
26991
27169
  } else {
26992
27170
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
26993
27171
  if (editingRow) {
26994
- throw new RuntimeError55("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
27172
+ throw new RuntimeError56("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
26995
27173
  }
26996
27174
  if (row.data.srfuf === 1 /* UPDATE */) {
26997
27175
  row.cacheData = clone26(row.data);
@@ -27046,7 +27224,7 @@ var GridController = class extends MDControlController {
27046
27224
  (item) => item.id === updateId
27047
27225
  );
27048
27226
  if (!findUpdate) {
27049
- throw new RuntimeError55("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
27227
+ throw new RuntimeError56("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
27050
27228
  }
27051
27229
  const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
27052
27230
  const updateItems = degeiupdateDetails.map((item) => item.id);
@@ -27186,7 +27364,7 @@ var GridController = class extends MDControlController {
27186
27364
  data = this.getData();
27187
27365
  }
27188
27366
  if (data.length === 0) {
27189
- throw new RuntimeError55("\u65E0\u5BFC\u51FA\u6570\u636E");
27367
+ throw new RuntimeError56("\u65E0\u5BFC\u51FA\u6570\u636E");
27190
27368
  }
27191
27369
  return data;
27192
27370
  }
@@ -27200,7 +27378,7 @@ var GridController = class extends MDControlController {
27200
27378
  async exportData(args) {
27201
27379
  const { header } = this.dataExportParam;
27202
27380
  if (!header) {
27203
- throw new RuntimeError55("\u65E0\u8868\u683C\u5217");
27381
+ throw new RuntimeError56("\u65E0\u8868\u683C\u5217");
27204
27382
  }
27205
27383
  const data = await this.getExportData(args.params);
27206
27384
  const formatData = this.formatExcelData(data);
@@ -27378,8 +27556,8 @@ var GridController = class extends MDControlController {
27378
27556
  // src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
27379
27557
  import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
27380
27558
  import dayjs6 from "dayjs";
27381
- import { debounce as debounce3 } from "lodash-es";
27382
- import { clone as clone27, isNil as isNil26 } from "ramda";
27559
+ import { debounce as debounce2 } from "lodash-es";
27560
+ import { clone as clone27, isNil as isNil28 } from "ramda";
27383
27561
  var GridFieldColumnController = class extends GridColumnController {
27384
27562
  constructor() {
27385
27563
  super(...arguments);
@@ -27423,7 +27601,7 @@ var GridFieldColumnController = class extends GridColumnController {
27423
27601
  }
27424
27602
  async onInit() {
27425
27603
  await super.onInit();
27426
- this.loadCodeList = debounce3(this.loadCodeList, 300, {
27604
+ this.loadCodeList = debounce2(this.loadCodeList, 300, {
27427
27605
  leading: true,
27428
27606
  trailing: false
27429
27607
  });
@@ -27591,11 +27769,11 @@ var GridFieldColumnController = class extends GridColumnController {
27591
27769
  */
27592
27770
  calcFieldAgg(items) {
27593
27771
  const { aggField, aggMode, aggValueFormat, unitName } = this.model;
27594
- if (isNil26(aggMode) || aggMode === "NONE") {
27772
+ if (isNil28(aggMode) || aggMode === "NONE") {
27595
27773
  return;
27596
27774
  }
27597
27775
  const fieldName = aggField || this.model.id;
27598
- items = items.filter((item) => !isNil26(item[fieldName]));
27776
+ items = items.filter((item) => !isNil28(item[fieldName]));
27599
27777
  let aggValue;
27600
27778
  if (this.grid.model.aggMode === "PAGE") {
27601
27779
  switch (aggMode) {
@@ -27746,7 +27924,7 @@ var GridUAColumnController = class extends GridColumnController {
27746
27924
  };
27747
27925
 
27748
27926
  // 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";
27927
+ import { RuntimeError as RuntimeError57 } from "@ibiz-template/core";
27750
27928
  import Schema2 from "async-validator";
27751
27929
  import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
27752
27930
  var GridFieldEditColumnController = class extends GridFieldColumnController {
@@ -27886,7 +28064,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
27886
28064
  if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
27887
28065
  const result = await this.validate(row);
27888
28066
  if (!result) {
27889
- throw new RuntimeError56(
28067
+ throw new RuntimeError57(
27890
28068
  "".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
27891
28069
  );
27892
28070
  }
@@ -27987,7 +28165,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
27987
28165
  */
27988
28166
  async validate(row) {
27989
28167
  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])) {
28168
+ 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
28169
  row.errors[editName] = "\u8BF7\u586B\u5199".concat(this.model.caption || "");
27992
28170
  return false;
27993
28171
  }
@@ -28184,7 +28362,7 @@ var ListController = class extends MDControlController {
28184
28362
  };
28185
28363
 
28186
28364
  // src/controller/control/panel/panel/panel.controller.ts
28187
- import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError57 } from "@ibiz-template/core";
28365
+ import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError58 } from "@ibiz-template/core";
28188
28366
  var PanelController = class extends ControlController {
28189
28367
  constructor(model, context, params, ctx, container) {
28190
28368
  super(model, context, params, ctx);
@@ -28308,7 +28486,7 @@ var PanelController = class extends ControlController {
28308
28486
  var _a, _b;
28309
28487
  const data = await this.prepareData();
28310
28488
  if (!data) {
28311
- throw new RuntimeError57("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
28489
+ throw new RuntimeError58("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
28312
28490
  }
28313
28491
  const panelData = this.convertData(data);
28314
28492
  (_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
@@ -28934,7 +29112,7 @@ var PickupViewPanelController = class extends ControlController {
28934
29112
 
28935
29113
  // src/controller/control/search-bar/search-bar.controller.ts
28936
29114
  import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
28937
- import { clone as clone29, isNil as isNil28 } from "ramda";
29115
+ import { clone as clone29, isNil as isNil30 } from "ramda";
28938
29116
  import { isString as isString2 } from "lodash-es";
28939
29117
 
28940
29118
  // src/controller/control/search-bar/search-bar-filter.controller.ts
@@ -29377,8 +29555,8 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
29377
29555
  }
29378
29556
 
29379
29557
  // 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";
29558
+ import { RuntimeError as RuntimeError59, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
29559
+ import { isNil as isNil29 } from "ramda";
29382
29560
  var ExcludeOPs2 = ["ISNULL" /* IS_NULL */, "ISNOTNULL" /* IS_NOT_NULL */];
29383
29561
  function getOriginFilterNodes() {
29384
29562
  return [
@@ -29448,14 +29626,14 @@ function parseFilters(data) {
29448
29626
  valueItem: data.valueItem || void 0
29449
29627
  };
29450
29628
  }
29451
- throw new RuntimeError58("\u65E0\u6548\u7684condtype:".concat(data.condtype));
29629
+ throw new RuntimeError59("\u65E0\u6548\u7684condtype:".concat(data.condtype));
29452
29630
  }
29453
29631
  function calcSearchConds(filterNodes) {
29454
29632
  let hasFilter = false;
29455
29633
  let hasError = false;
29456
29634
  recursiveIterate9(filterNodes[0], (node) => {
29457
29635
  if (node.leaf) {
29458
- if (node.field && node.valueOP && !isNil27(node.value) || node.field && node.valueOP && ExcludeOPs2.includes(node.valueOP)) {
29636
+ if (node.field && node.valueOP && !isNil29(node.value) || node.field && node.valueOP && ExcludeOPs2.includes(node.valueOP)) {
29459
29637
  hasFilter = true;
29460
29638
  } else {
29461
29639
  hasError = true;
@@ -29469,7 +29647,7 @@ function calcSearchConds(filterNodes) {
29469
29647
  }
29470
29648
 
29471
29649
  // src/controller/control/search-bar/search-bar-filter-items.controller.ts
29472
- import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
29650
+ import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
29473
29651
  import { clone as clone28 } from "ramda";
29474
29652
  var ExcludeOPs3 = [
29475
29653
  "ISNULL" /* IS_NULL */,
@@ -29531,7 +29709,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
29531
29709
  return false;
29532
29710
  });
29533
29711
  if (!minorDEId) {
29534
- throw new RuntimeError59("\u627E\u4E0D\u5230\u5C5E\u6027".concat(targetField, "\u5BF9\u5E94\u7684\u5173\u8054\u5B9E\u4F53"));
29712
+ throw new RuntimeError60("\u627E\u4E0D\u5230\u5C5E\u6027".concat(targetField, "\u5BF9\u5E94\u7684\u5173\u8054\u5B9E\u4F53"));
29535
29713
  }
29536
29714
  this.minorAppDE = await ibiz.hub.getAppDataEntity(
29537
29715
  minorDEId,
@@ -29909,7 +30087,7 @@ var SearchBarController = class extends ControlController {
29909
30087
  recursiveIterate10(
29910
30088
  searchconds[0],
29911
30089
  (node, parent) => {
29912
- if (node.condtype === "DEFIELD" && !isNil28(node.value)) {
30090
+ if (node.condtype === "DEFIELD" && !isNil30(node.value)) {
29913
30091
  let controller = this.findFilterController(
29914
30092
  node.fieldname,
29915
30093
  node.condop
@@ -30368,10 +30546,11 @@ var TabExpPanelController = class extends ControlController {
30368
30546
 
30369
30547
  // src/controller/control/tree/tree.controller.ts
30370
30548
  import {
30371
- RuntimeError as RuntimeError60,
30549
+ RuntimeError as RuntimeError61,
30372
30550
  RuntimeModelError as RuntimeModelError65,
30373
30551
  recursiveIterate as recursiveIterate11
30374
30552
  } from "@ibiz-template/core";
30553
+ import { isNil as isNil31 } from "ramda";
30375
30554
 
30376
30555
  // src/controller/control/tree/tree.service.ts
30377
30556
  import { ModelError as ModelError30 } from "@ibiz-template/core";
@@ -31409,10 +31588,11 @@ var TreeController = class extends MDControlController {
31409
31588
  throw new RuntimeModelError65(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
31410
31589
  }
31411
31590
  if (nodeData._nodeType !== "DE") {
31412
- throw new RuntimeError60("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
31591
+ throw new RuntimeError61("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
31413
31592
  }
31414
31593
  nodeData._text = text;
31415
31594
  await this.updateDeNodeData([nodeData]);
31595
+ this.emitDEDataChange("update", nodeData._deData);
31416
31596
  }
31417
31597
  /**
31418
31598
  * 删除每一项
@@ -31424,7 +31604,7 @@ var TreeController = class extends MDControlController {
31424
31604
  let needRefresh = false;
31425
31605
  const treeNode = this.getNodeModel(item._nodeId);
31426
31606
  if (!treeNode) {
31427
- throw new RuntimeError60("\u672A\u627E\u5230\u6811\u8282\u70B9");
31607
+ throw new RuntimeError61("\u672A\u627E\u5230\u6811\u8282\u70B9");
31428
31608
  }
31429
31609
  const nodeAppDataEntityId = treeNode.appDataEntityId;
31430
31610
  if (nodeAppDataEntityId) {
@@ -31438,12 +31618,37 @@ var TreeController = class extends MDControlController {
31438
31618
  }
31439
31619
  return needRefresh;
31440
31620
  }
31441
- onDataChange(_msg) {
31621
+ /**
31622
+ * 检测实体数据变更
31623
+ *
31624
+ * @author tony001
31625
+ * @date 2024-03-28 18:03:09
31626
+ * @protected
31627
+ * @param {IPortalMessage} msg
31628
+ * @return {*} {void}
31629
+ */
31630
+ onDEDataChange(msg) {
31631
+ if (!isNil31(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
31632
+ return;
31633
+ }
31634
+ if (msg.subtype === "OBJECTCREATED") {
31635
+ return;
31636
+ }
31637
+ const data = msg.data;
31638
+ const findNode = this.state.items.find(
31639
+ (item) => item._nodeType === "DE" && item._deData && item._deData.srfdecodename === data.srfdecodename && item._deData.srfkey === data.srfkey
31640
+ );
31641
+ if (!findNode) {
31642
+ return;
31643
+ }
31644
+ this.doNextActive(() => this.refreshNodeChildren(findNode, true), {
31645
+ key: "refresh".concat(findNode._id)
31646
+ });
31442
31647
  }
31443
31648
  };
31444
31649
 
31445
31650
  // src/controller/control/wizard-panel/wizard-panel.controller.ts
31446
- import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
31651
+ import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
31447
31652
 
31448
31653
  // src/controller/control/wizard-panel/wizard-panel.service.ts
31449
31654
  var WizardPanelService = class extends ControlService {
@@ -31609,7 +31814,7 @@ var WizardPanelController = class extends ControlController {
31609
31814
  const { activeFormTag } = this.state;
31610
31815
  const controller = this.formControllers.get(activeFormTag);
31611
31816
  if (!controller) {
31612
- throw new RuntimeError61("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
31817
+ throw new RuntimeError62("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
31613
31818
  }
31614
31819
  return controller;
31615
31820
  }
@@ -31651,7 +31856,7 @@ var WizardPanelController = class extends ControlController {
31651
31856
  getWizardFormByTag(tag) {
31652
31857
  var _a;
31653
31858
  if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
31654
- throw new RuntimeError61("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
31859
+ throw new RuntimeError62("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
31655
31860
  return;
31656
31861
  }
31657
31862
  const wizardForm = this.model.dewizard.dewizardForms.find(
@@ -31660,7 +31865,7 @@ var WizardPanelController = class extends ControlController {
31660
31865
  }
31661
31866
  );
31662
31867
  if (!wizardForm) {
31663
- throw new RuntimeError61("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
31868
+ throw new RuntimeError62("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
31664
31869
  }
31665
31870
  return wizardForm;
31666
31871
  }
@@ -31731,7 +31936,7 @@ var WizardPanelController = class extends ControlController {
31731
31936
  prevTag = this.tagHistory[this.tagHistory.length - 1];
31732
31937
  }
31733
31938
  if (!prevTag) {
31734
- throw new RuntimeError61("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
31939
+ throw new RuntimeError62("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
31735
31940
  }
31736
31941
  this.state.activeFormTag = prevTag;
31737
31942
  }
@@ -31767,7 +31972,7 @@ var WizardPanelController = class extends ControlController {
31767
31972
  });
31768
31973
  const nextWizardStep = wizardSteps[index + 1];
31769
31974
  if (!nextWizardStep) {
31770
- throw new RuntimeError61("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
31975
+ throw new RuntimeError62("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
31771
31976
  }
31772
31977
  const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
31773
31978
  if (nextWizardForm && nextWizardForm.formTag) {
@@ -31776,7 +31981,7 @@ var WizardPanelController = class extends ControlController {
31776
31981
  }
31777
31982
  }
31778
31983
  if (!nextTag) {
31779
- throw new RuntimeError61("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
31984
+ throw new RuntimeError62("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
31780
31985
  }
31781
31986
  this.state.activeFormTag = nextTag;
31782
31987
  this.tagHistory.push(nextTag);
@@ -31796,7 +32001,7 @@ var WizardPanelController = class extends ControlController {
31796
32001
 
31797
32002
  // src/controller/control/md-ctrl/md-ctrl.controller.ts
31798
32003
  import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
31799
- import { isNil as isNil29 } from "ramda";
32004
+ import { isNil as isNil32 } from "ramda";
31800
32005
 
31801
32006
  // src/controller/control/md-ctrl/md-ctrl.service.ts
31802
32007
  var MDCtrlService = class extends MDControlService {
@@ -31886,7 +32091,9 @@ var MDCtrlController = class extends MDControlController {
31886
32091
  * @memberof MDCtrlController
31887
32092
  */
31888
32093
  async refresh() {
31889
- await this.load({ isInitialLoad: true });
32094
+ this.doNextActive(() => this.load({ isInitialLoad: true }), {
32095
+ key: "refresh"
32096
+ });
31890
32097
  }
31891
32098
  async afterLoad(args, items) {
31892
32099
  if (args.isInitialLoad) {
@@ -32023,7 +32230,7 @@ var MDCtrlController = class extends MDControlController {
32023
32230
  const groupMap = /* @__PURE__ */ new Map();
32024
32231
  items.forEach((item) => {
32025
32232
  const groupVal = item[groupAppDEFieldId];
32026
- if (isNil29(groupVal)) {
32233
+ if (isNil32(groupVal)) {
32027
32234
  return;
32028
32235
  }
32029
32236
  if (!groupMap.has(groupVal)) {
@@ -32099,8 +32306,8 @@ var MDCtrlController = class extends MDControlController {
32099
32306
  };
32100
32307
 
32101
32308
  // 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";
32309
+ import { RuntimeError as RuntimeError63, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
32310
+ import { isNil as isNil33 } from "ramda";
32104
32311
 
32105
32312
  // src/controller/control/kanban/kanban.service.ts
32106
32313
  var KanbanService = class extends DataViewControlService {
@@ -32186,12 +32393,12 @@ var KanbanController = class extends DataViewControlController {
32186
32393
  const isAsc = minorSortDir === "ASC";
32187
32394
  items.forEach((item) => {
32188
32395
  const sortValue = item[sortField];
32189
- if (isNil30(sortValue)) {
32396
+ if (isNil33(sortValue)) {
32190
32397
  item[sortField] = 0;
32191
32398
  } else {
32192
32399
  const toNum = Number(sortValue);
32193
32400
  if (Number.isNaN(toNum)) {
32194
- throw new RuntimeError62(
32401
+ throw new RuntimeError63(
32195
32402
  "".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
32196
32403
  );
32197
32404
  }
@@ -32313,7 +32520,7 @@ var KanbanController = class extends DataViewControlController {
32313
32520
  }
32314
32521
  handleDataGroup() {
32315
32522
  if (!this.model.enableGroup || this.model.groupMode === "NONE") {
32316
- throw new RuntimeError62("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
32523
+ throw new RuntimeError63("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
32317
32524
  }
32318
32525
  return super.handleDataGroup();
32319
32526
  }
@@ -32329,7 +32536,7 @@ var KanbanController = class extends DataViewControlController {
32329
32536
  const groupMap = /* @__PURE__ */ new Map();
32330
32537
  items.forEach((item) => {
32331
32538
  const groupVal = item[groupAppDEFieldId];
32332
- if (isNil30(groupVal)) {
32539
+ if (isNil33(groupVal)) {
32333
32540
  return;
32334
32541
  }
32335
32542
  if (!groupMap.has(groupVal)) {
@@ -32656,7 +32863,7 @@ var KanbanController = class extends DataViewControlController {
32656
32863
 
32657
32864
  // src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
32658
32865
  import {
32659
- RuntimeError as RuntimeError63,
32866
+ RuntimeError as RuntimeError64,
32660
32867
  RuntimeModelError as RuntimeModelError68,
32661
32868
  awaitTimeout as awaitTimeout3,
32662
32869
  recursiveIterate as recursiveIterate12
@@ -32916,11 +33123,11 @@ var TreeGridExController = class extends TreeController {
32916
33123
  return;
32917
33124
  }
32918
33125
  if (nodeData._nodeType !== "DE") {
32919
- throw new RuntimeError63("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
33126
+ throw new RuntimeError64("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
32920
33127
  }
32921
33128
  const rowState = this.state.rows[nodeData._uuid];
32922
33129
  if (!rowState) {
32923
- throw new RuntimeError63("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
33130
+ throw new RuntimeError64("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
32924
33131
  }
32925
33132
  if (!rowState.modified) {
32926
33133
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -32934,7 +33141,7 @@ var TreeGridExController = class extends TreeController {
32934
33141
  const { appDataEntityId, updateAppDEActionId } = nodeModel;
32935
33142
  const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
32936
33143
  if (isCreate) {
32937
- throw new RuntimeError63("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
33144
+ throw new RuntimeError64("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
32938
33145
  }
32939
33146
  if (!updateAppDEActionId) {
32940
33147
  throw new RuntimeModelError68(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
@@ -33094,7 +33301,7 @@ var TreeGridExController = class extends TreeController {
33094
33301
  (item) => item.showRowEdit
33095
33302
  );
33096
33303
  if (editingRow) {
33097
- throw new RuntimeError63("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
33304
+ throw new RuntimeError64("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
33098
33305
  }
33099
33306
  if (row.data._deData.srfuf === 1 /* UPDATE */) {
33100
33307
  row.cacheData = clone30(row.data);
@@ -33207,7 +33414,7 @@ var TreeGridExColumnController = class {
33207
33414
  // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
33208
33415
  import {
33209
33416
  DataTypes as DataTypes5,
33210
- RuntimeError as RuntimeError64,
33417
+ RuntimeError as RuntimeError65,
33211
33418
  RuntimeModelError as RuntimeModelError69
33212
33419
  } from "@ibiz-template/core";
33213
33420
  import { clone as clone31 } from "ramda";
@@ -33408,7 +33615,7 @@ var TreeGridExNodeColumnController = class {
33408
33615
  const valueItem = this.nodeColumn.linkValueItem || "srfkey";
33409
33616
  const value = row.data[valueItem];
33410
33617
  if (value == null) {
33411
- throw new RuntimeError64("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
33618
+ throw new RuntimeError65("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
33412
33619
  }
33413
33620
  const { linkAppViewId } = this.nodeColumn;
33414
33621
  if (!linkAppViewId) {
@@ -33821,7 +34028,7 @@ var TreeGridService = class extends GridService {
33821
34028
  };
33822
34029
 
33823
34030
  // src/controller/control/medit-view-panel/medit-view-panel.controller.ts
33824
- import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
34031
+ import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
33825
34032
  import { createUUID as createUUID14 } from "qx-util";
33826
34033
 
33827
34034
  // src/controller/control/medit-view-panel/medit-view-panel.service.ts
@@ -34037,7 +34244,7 @@ var MEditViewPanelController = class extends MDControlController {
34037
34244
  (item) => item.id === id
34038
34245
  );
34039
34246
  if (panelUiItemIndex < 0) {
34040
- throw new RuntimeError65("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
34247
+ throw new RuntimeError66("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
34041
34248
  }
34042
34249
  const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
34043
34250
  if (tempUiItem.id.startsWith("mockId:")) {
@@ -34538,14 +34745,16 @@ var ReportPanelController = class extends ControlController {
34538
34745
  * @date 2023-05-23 03:42:41
34539
34746
  */
34540
34747
  async refresh() {
34541
- await this.load({ isInitialLoad: false });
34748
+ this.doNextActive(() => this.load({ isInitialLoad: false }), {
34749
+ key: "refresh"
34750
+ });
34542
34751
  }
34543
34752
  };
34544
34753
 
34545
34754
  // src/controller/control/gantt/gantt.controller.ts
34546
34755
  import {
34547
34756
  awaitTimeout as awaitTimeout4,
34548
- RuntimeError as RuntimeError66,
34757
+ RuntimeError as RuntimeError67,
34549
34758
  RuntimeModelError as RuntimeModelError71
34550
34759
  } from "@ibiz-template/core";
34551
34760
 
@@ -34989,11 +35198,11 @@ var GanttController = class extends TreeGridExController {
34989
35198
  */
34990
35199
  async modifyNodeTime(nodeData, { begin, end }) {
34991
35200
  if (nodeData._nodeType !== "DE") {
34992
- throw new RuntimeError66("\u4E0D\u662F\u5B9E\u4F53\u7518\u7279\u8282\u70B9\u6570\u636E");
35201
+ throw new RuntimeError67("\u4E0D\u662F\u5B9E\u4F53\u7518\u7279\u8282\u70B9\u6570\u636E");
34993
35202
  }
34994
35203
  const rowState = this.getRowState(nodeData._id);
34995
35204
  if (!rowState) {
34996
- throw new RuntimeError66("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
35205
+ throw new RuntimeError67("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
34997
35206
  }
34998
35207
  const { beginDataItemName, endDataItemName } = this.model;
34999
35208
  this.setRowValue(rowState, beginDataItemName, begin);
@@ -35013,11 +35222,11 @@ var GanttController = class extends TreeGridExController {
35013
35222
  return;
35014
35223
  }
35015
35224
  if (nodeData._nodeType !== "DE") {
35016
- throw new RuntimeError66("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
35225
+ throw new RuntimeError67("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
35017
35226
  }
35018
35227
  const rowState = this.state.rows[nodeData._uuid];
35019
35228
  if (!rowState) {
35020
- throw new RuntimeError66("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
35229
+ throw new RuntimeError67("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
35021
35230
  }
35022
35231
  if (!rowState.modified) {
35023
35232
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -35065,7 +35274,7 @@ var GanttController = class extends TreeGridExController {
35065
35274
  async remove(args) {
35066
35275
  const { context, params, data } = this.handlerAbilityParams(args);
35067
35276
  if (!(data == null ? void 0 : data.length)) {
35068
- throw new RuntimeError66("\u672A\u9009\u4E2D\u6570\u636E");
35277
+ throw new RuntimeError67("\u672A\u9009\u4E2D\u6570\u636E");
35069
35278
  }
35070
35279
  if ((args == null ? void 0 : args.silent) !== true) {
35071
35280
  const del = await ibiz.confirm.error({
@@ -35174,7 +35383,7 @@ var GanttController = class extends TreeGridExController {
35174
35383
  (item) => item.showRowEdit
35175
35384
  );
35176
35385
  if (editingRow) {
35177
- throw new RuntimeError66("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
35386
+ throw new RuntimeError67("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
35178
35387
  }
35179
35388
  }
35180
35389
  let parentModel;
@@ -35269,7 +35478,7 @@ import { QXEvent as QXEvent9 } from "qx-util";
35269
35478
  // src/controller/notification/async-action.controller.ts
35270
35479
  import { QXEvent as QXEvent7 } from "qx-util";
35271
35480
  import { clone as clone32 } from "ramda";
35272
- import { isNil as isNil31, isNumber as isNumber2 } from "lodash-es";
35481
+ import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
35273
35482
  import dayjs8 from "dayjs";
35274
35483
  var AsyncActionController = class {
35275
35484
  constructor() {
@@ -35344,14 +35553,14 @@ var AsyncActionController = class {
35344
35553
  data[key] = dayjs8(data[key]).format("YYYY-MM-DD HH:mm:ss");
35345
35554
  }
35346
35555
  });
35347
- if (!isNil31(data.actionresult)) {
35556
+ if (!isNil34(data.actionresult)) {
35348
35557
  try {
35349
35558
  const json = JSON.parse(data.actionresult);
35350
35559
  data.actionresult = json;
35351
35560
  } catch (error) {
35352
35561
  }
35353
35562
  }
35354
- if (!isNil31(data.completionrate)) {
35563
+ if (!isNil34(data.completionrate)) {
35355
35564
  const num = Number(data.completionrate);
35356
35565
  if (Number.isNaN(num)) {
35357
35566
  data.completionrate = void 0;
@@ -35794,7 +36003,7 @@ var AppHub = class {
35794
36003
  this.registerAppView(appView);
35795
36004
  return appView;
35796
36005
  }
35797
- throw new RuntimeError67("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
36006
+ throw new RuntimeError68("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
35798
36007
  }
35799
36008
  /**
35800
36009
  * 根据视图模型路径,加参数重新计算视图模型
@@ -35815,7 +36024,7 @@ var AppHub = class {
35815
36024
  );
35816
36025
  return model;
35817
36026
  }
35818
- throw new RuntimeError67("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
36027
+ throw new RuntimeError68("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
35819
36028
  }
35820
36029
  /**
35821
36030
  * 根据应用实体代码名称查找应用视图
@@ -35846,7 +36055,7 @@ var AppHub = class {
35846
36055
  this.registerAppDataEntity(entity, appId2);
35847
36056
  return entity;
35848
36057
  }
35849
- throw new RuntimeError67("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
36058
+ throw new RuntimeError68("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
35850
36059
  }
35851
36060
  /**
35852
36061
  * 新建 hub 应用
@@ -35861,7 +36070,7 @@ var AppHub = class {
35861
36070
  return this.appMap.get(id);
35862
36071
  }
35863
36072
  if (!this.modelLoaderProvider) {
35864
- throw new RuntimeError67("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
36073
+ throw new RuntimeError68("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
35865
36074
  }
35866
36075
  const appModel = await this.modelLoaderProvider.getApp(id);
35867
36076
  const app = new Application(appModel);
@@ -35992,7 +36201,7 @@ var EngineFactory = class {
35992
36201
  };
35993
36202
 
35994
36203
  // src/engine/view-base.engine.ts
35995
- import { RuntimeError as RuntimeError68, findRecursiveChild as findRecursiveChild3 } from "@ibiz-template/core";
36204
+ import { RuntimeError as RuntimeError69, findRecursiveChild as findRecursiveChild3 } from "@ibiz-template/core";
35996
36205
  var ViewEngineBase = class {
35997
36206
  /**
35998
36207
  * 构造函数在视图控制器的构造函数逻辑内部执行
@@ -36265,7 +36474,7 @@ var ViewEngineBase = class {
36265
36474
  const { appDataEntityId } = this.view.model;
36266
36475
  const { evt, context, params } = this.view;
36267
36476
  if (!appDataEntityId) {
36268
- throw new RuntimeError68("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
36477
+ throw new RuntimeError69("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
36269
36478
  }
36270
36479
  const app = ibiz.hub.getApp(context.srfappid);
36271
36480
  const res = await app.deService.exec(
@@ -36317,6 +36526,35 @@ var MDViewEngine = class extends ViewEngineBase {
36317
36526
  get searchBar() {
36318
36527
  return this.view.getController("searchbar");
36319
36528
  }
36529
+ /**
36530
+ * 获取分页搜索视图上移的工具栏控制器
36531
+ * @author lxm
36532
+ * @date 2023-05-22 03:47:43
36533
+ * @readonly
36534
+ * @protected
36535
+ * @type {(IToolbarController | undefined)}
36536
+ */
36537
+ get tabToolbar() {
36538
+ return this.view.getController("tabtoolbar");
36539
+ }
36540
+ /**
36541
+ * 获取分页搜索视图上移的搜索表单控制器
36542
+ * @author lxm
36543
+ * @date 2023-05-22 01:56:25
36544
+ * @readonly
36545
+ */
36546
+ get tabSearchForm() {
36547
+ return this.view.getController("tabsearchform");
36548
+ }
36549
+ /**
36550
+ * 获取分页搜索视图上移的搜索栏控制器
36551
+ * @author lxm
36552
+ * @date 2023-05-22 01:56:25
36553
+ * @readonly
36554
+ */
36555
+ get tabSearchBar() {
36556
+ return this.view.getController("tabsearchbar");
36557
+ }
36320
36558
  /**
36321
36559
  * 数据部件控制器(多数据)
36322
36560
  * @author lxm
@@ -36332,7 +36570,14 @@ var MDViewEngine = class extends ViewEngineBase {
36332
36570
  async onCreated() {
36333
36571
  await super.onCreated();
36334
36572
  const { childNames } = this.view;
36335
- childNames.push(this.xdataControlName, "searchform", "searchbar");
36573
+ childNames.push(
36574
+ this.xdataControlName,
36575
+ "searchform",
36576
+ "searchbar",
36577
+ "tabtoolbar",
36578
+ "tabsearchform",
36579
+ "tabsearchbar"
36580
+ );
36336
36581
  if (this.xdataControlName) {
36337
36582
  if (!this.view.slotProps[this.xdataControlName]) {
36338
36583
  this.view.slotProps[this.xdataControlName] = {};
@@ -36345,11 +36590,15 @@ var MDViewEngine = class extends ViewEngineBase {
36345
36590
  const { model } = this.view;
36346
36591
  this.xdataControl.evt.on("onActive", this.onXDataActive.bind(this));
36347
36592
  this.xdataControl.evt.on("onSelectionChange", async (event) => {
36348
- var _a;
36593
+ var _a, _b;
36349
36594
  (_a = this.toolbar) == null ? void 0 : _a.calcButtonState(
36350
36595
  event.data[0],
36351
36596
  this.xdataControl.model.appDataEntityId
36352
36597
  );
36598
+ (_b = this.tabToolbar) == null ? void 0 : _b.calcButtonState(
36599
+ event.data[0],
36600
+ this.xdataControl.model.appDataEntityId
36601
+ );
36353
36602
  });
36354
36603
  this.xdataControl.evt.on("onBeforeLoad", () => {
36355
36604
  this.xdataControl.state.searchParams = this.getSearchParams();
@@ -36379,9 +36628,20 @@ var MDViewEngine = class extends ViewEngineBase {
36379
36628
  this.reLoad();
36380
36629
  });
36381
36630
  }
36631
+ if (this.tabSearchForm) {
36632
+ this.tabSearchForm.evt.on("onSearch", () => {
36633
+ this.reLoad();
36634
+ });
36635
+ }
36636
+ if (this.tabSearchBar) {
36637
+ this.tabSearchBar.evt.on("onSearch", () => {
36638
+ this.reLoad();
36639
+ });
36640
+ }
36382
36641
  if (!this.view.state.noLoadDefault && model.loadDefault) {
36383
- if (this.searchBar && this.searchBar.hasDefaultSelect && (this.xdataControlName === "grid" || this.xdataControlName === "treegrid")) {
36384
- this.searchBar.setDefaultSelect();
36642
+ const searchbar = this.searchBar || this.tabSearchBar;
36643
+ if (searchbar && searchbar.hasDefaultSelect && (this.xdataControlName === "grid" || this.xdataControlName === "treegrid")) {
36644
+ searchbar.setDefaultSelect();
36385
36645
  } else {
36386
36646
  this.load();
36387
36647
  }
@@ -36442,11 +36702,13 @@ var MDViewEngine = class extends ViewEngineBase {
36442
36702
  return null;
36443
36703
  }
36444
36704
  if (key === "Search" /* SEARCH */) {
36445
- await this.searchForm.search();
36705
+ const searchForm = this.searchForm || this.tabSearchForm;
36706
+ await searchForm.search();
36446
36707
  return null;
36447
36708
  }
36448
36709
  if (key === "Reset" /* RESET */) {
36449
- await this.searchForm.reset();
36710
+ const searchForm = this.searchForm || this.tabSearchForm;
36711
+ await searchForm.reset();
36450
36712
  return null;
36451
36713
  }
36452
36714
  if (key === "Copy" /* COPY */) {
@@ -36581,6 +36843,12 @@ var MDViewEngine = class extends ViewEngineBase {
36581
36843
  if (this.searchBar) {
36582
36844
  Object.assign(params, this.searchBar.getFilterParams());
36583
36845
  }
36846
+ if (this.tabSearchForm) {
36847
+ Object.assign(params, this.tabSearchForm.getFilterParams());
36848
+ }
36849
+ if (this.tabSearchBar) {
36850
+ Object.assign(params, this.tabSearchBar.getFilterParams());
36851
+ }
36584
36852
  return params;
36585
36853
  }
36586
36854
  /**
@@ -36809,7 +37077,7 @@ var GlobalUtil = class {
36809
37077
  };
36810
37078
 
36811
37079
  // src/logic-scheduler/executor/logic-executor.ts
36812
- import { RuntimeError as RuntimeError69 } from "@ibiz-template/core";
37080
+ import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
36813
37081
  var LogicExecutor = class {
36814
37082
  /**
36815
37083
  * @author lxm
@@ -36830,7 +37098,7 @@ var LogicExecutor = class {
36830
37098
  */
36831
37099
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
36832
37100
  execute(_executeParams) {
36833
- throw new RuntimeError69("Method not implemented.");
37101
+ throw new RuntimeError70("Method not implemented.");
36834
37102
  }
36835
37103
  /**
36836
37104
  * 销毁方法
@@ -37267,7 +37535,7 @@ var LogicSchedulerCenter = class {
37267
37535
  };
37268
37536
 
37269
37537
  // src/logic-scheduler/trigger/logic-trigger.ts
37270
- import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
37538
+ import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
37271
37539
  var LogicTrigger = class {
37272
37540
  /**
37273
37541
  * @author lxm
@@ -37327,7 +37595,7 @@ var LogicTrigger = class {
37327
37595
  if (this.executor) {
37328
37596
  return this.executor.execute(executeParams);
37329
37597
  }
37330
- throw new RuntimeError70("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
37598
+ throw new RuntimeError71("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
37331
37599
  }
37332
37600
  /**
37333
37601
  * 销毁方法
@@ -37344,12 +37612,12 @@ var CustomTrigger = class extends LogicTrigger {
37344
37612
  };
37345
37613
 
37346
37614
  // src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
37347
- import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
37615
+ import { RuntimeError as RuntimeError72 } from "@ibiz-template/core";
37348
37616
  var ItemDynaLogicTrigger = class extends LogicTrigger {
37349
37617
  bindExecutor(executor) {
37350
37618
  super.bindExecutor(executor);
37351
37619
  if (this.executor.type !== "SCRIPT") {
37352
- throw new RuntimeError71(
37620
+ throw new RuntimeError72(
37353
37621
  "\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
37354
37622
  );
37355
37623
  }
@@ -37386,7 +37654,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
37386
37654
  };
37387
37655
 
37388
37656
  // src/logic-scheduler/trigger/timer-trigger.ts
37389
- import { RuntimeError as RuntimeError72, RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
37657
+ import { RuntimeError as RuntimeError73, RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
37390
37658
  var TimerTrigger = class extends LogicTrigger {
37391
37659
  constructor() {
37392
37660
  super(...arguments);
@@ -37398,7 +37666,7 @@ var TimerTrigger = class extends LogicTrigger {
37398
37666
  }
37399
37667
  this.timer = setInterval(() => {
37400
37668
  if (!this.scheduler.defaultParamsCb) {
37401
- throw new RuntimeError72("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
37669
+ throw new RuntimeError73("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
37402
37670
  }
37403
37671
  const params = this.scheduler.defaultParamsCb();
37404
37672
  this.executor.execute(params);
@@ -37415,7 +37683,7 @@ var TimerTrigger = class extends LogicTrigger {
37415
37683
  // src/logic-scheduler/executor/app-ui-logic-executor.ts
37416
37684
  import {
37417
37685
  ModelError as ModelError34,
37418
- RuntimeError as RuntimeError73,
37686
+ RuntimeError as RuntimeError74,
37419
37687
  RuntimeModelError as RuntimeModelError75
37420
37688
  } from "@ibiz-template/core";
37421
37689
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
@@ -37453,7 +37721,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37453
37721
  const { context, params, ...rest } = parameters;
37454
37722
  const { data } = parameters;
37455
37723
  if (!(data == null ? void 0 : data[0])) {
37456
- throw new RuntimeError73("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
37724
+ throw new RuntimeError74("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
37457
37725
  }
37458
37726
  const openViewRefs = appUILogic.openDataAppViews;
37459
37727
  let openViewRef;
@@ -37513,7 +37781,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37513
37781
  const openViewRefs = appUILogic.openDataAppViews;
37514
37782
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
37515
37783
  if (!findView) {
37516
- throw new RuntimeError73(
37784
+ throw new RuntimeError74(
37517
37785
  "\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
37518
37786
  );
37519
37787
  }
@@ -37638,7 +37906,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37638
37906
  }
37639
37907
  const selectData = (_a = result.data) == null ? void 0 : _a[0];
37640
37908
  if (!selectData) {
37641
- throw new RuntimeError73("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
37909
+ throw new RuntimeError74("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
37642
37910
  }
37643
37911
  const indexType = selectData.srfkey;
37644
37912
  const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
@@ -37648,7 +37916,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37648
37916
  }
37649
37917
  );
37650
37918
  if (!findView) {
37651
- throw new RuntimeError73(
37919
+ throw new RuntimeError74(
37652
37920
  "\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
37653
37921
  );
37654
37922
  }
@@ -37685,7 +37953,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
37685
37953
  }
37686
37954
  });
37687
37955
  if (pickParentFieldName === void 0) {
37688
- throw new RuntimeError73(
37956
+ throw new RuntimeError74(
37689
37957
  "\u6CA1\u6709\u627E\u5230".concat(pickParentDeName, "\u5728\u5F53\u524D\u5B9E\u4F53\u7684\u5916\u952E\u5C5E\u6027")
37690
37958
  );
37691
37959
  }
@@ -38236,6 +38504,7 @@ export {
38236
38504
  getControlPanel,
38237
38505
  getControlProvider,
38238
38506
  getControlsByView,
38507
+ getCtrlTeleportTag,
38239
38508
  getDEMethodProvider,
38240
38509
  getDERedirectToView,
38241
38510
  getDeACMode,