@ibiz-template/runtime 0.5.2 → 0.5.3-beta.1

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 (81) hide show
  1. package/dist/index.esm.js +886 -900
  2. package/dist/index.system.min.js +1 -1
  3. package/out/app-hub.d.ts +12 -1
  4. package/out/app-hub.d.ts.map +1 -1
  5. package/out/app-hub.js +14 -0
  6. package/out/constant/control-type.d.ts +5 -1
  7. package/out/constant/control-type.d.ts.map +1 -1
  8. package/out/constant/control-type.js +4 -0
  9. package/out/controller/control/grid/grid/grid.controller.js +1 -1
  10. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts +0 -9
  11. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts.map +1 -1
  12. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.js +0 -20
  13. package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts.map +1 -1
  14. package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.js +0 -4
  15. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +12 -1
  16. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  17. package/out/interface/service/index.d.ts +0 -1
  18. package/out/interface/service/index.d.ts.map +1 -1
  19. package/out/interface/service/service/i-app-de.service.d.ts +17 -0
  20. package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
  21. package/out/interface/service/service/i-wf.service.d.ts +5 -4
  22. package/out/interface/service/service/i-wf.service.d.ts.map +1 -1
  23. package/out/service/dto/method.dto.d.ts +0 -10
  24. package/out/service/dto/method.dto.d.ts.map +1 -1
  25. package/out/service/dto/method.dto.js +42 -44
  26. package/out/service/service/entity/de.service.d.ts +6 -9
  27. package/out/service/service/entity/de.service.d.ts.map +1 -1
  28. package/out/service/service/entity/de.service.js +4 -10
  29. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  30. package/out/service/service/entity/method/de-action.js +9 -7
  31. package/out/service/service/entity/method/fetch.d.ts.map +1 -1
  32. package/out/service/service/entity/method/fetch.js +17 -21
  33. package/out/service/service/entity/method/method-input.d.ts.map +1 -1
  34. package/out/service/service/entity/method/method-input.js +3 -2
  35. package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
  36. package/out/service/service/entity/method/method-renturn.js +3 -2
  37. package/out/service/service/work-flow/work-flow.service.d.ts +1 -1
  38. package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
  39. package/out/service/service/work-flow/work-flow.service.js +2 -2
  40. package/out/service/utils/de-cache/de-cache.d.ts +0 -10
  41. package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
  42. package/out/service/utils/de-cache/de-cache.js +1 -78
  43. package/out/service/utils/de-dq-cond-util/de-dq-cond-util.d.ts.map +1 -1
  44. package/out/service/utils/de-dq-cond-util/de-dq-cond-util.js +16 -9
  45. package/out/service/utils/search-filter/search-filter.d.ts +0 -14
  46. package/out/service/utils/search-filter/search-filter.d.ts.map +1 -1
  47. package/out/service/utils/search-filter/search-filter.js +0 -8
  48. package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
  49. package/out/service/vo/tree-node-data/tree-data-set-node-data.js +33 -8
  50. package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
  51. package/out/utils/open-redirect-view/open-redirect-view.js +70 -35
  52. package/out/utils/ui-domain/ui-domain.d.ts +7 -7
  53. package/out/utils/ui-domain/ui-domain.d.ts.map +1 -1
  54. package/out/utils/ui-domain/ui-domain.js +5 -9
  55. package/package.json +2 -2
  56. package/src/app-hub.ts +25 -1
  57. package/src/constant/control-type.ts +5 -0
  58. package/src/controller/control/grid/grid/grid.controller.ts +1 -1
  59. package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts +2 -35
  60. package/src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts +0 -4
  61. package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +17 -1
  62. package/src/interface/service/index.ts +0 -1
  63. package/src/interface/service/service/i-app-de.service.ts +21 -0
  64. package/src/interface/service/service/i-wf.service.ts +5 -4
  65. package/src/service/dto/method.dto.ts +55 -50
  66. package/src/service/service/entity/de.service.ts +22 -15
  67. package/src/service/service/entity/method/de-action.ts +9 -7
  68. package/src/service/service/entity/method/fetch.ts +17 -21
  69. package/src/service/service/entity/method/method-input.ts +3 -1
  70. package/src/service/service/entity/method/method-renturn.ts +3 -1
  71. package/src/service/service/work-flow/work-flow.service.ts +8 -2
  72. package/src/service/utils/de-cache/de-cache.ts +1 -78
  73. package/src/service/utils/de-dq-cond-util/de-dq-cond-util.ts +14 -9
  74. package/src/service/utils/search-filter/search-filter.ts +0 -24
  75. package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +32 -7
  76. package/src/utils/open-redirect-view/open-redirect-view.ts +76 -43
  77. package/src/utils/ui-domain/ui-domain.ts +8 -12
  78. package/out/interface/service/i-parent-config/i-parent-config.d.ts +0 -67
  79. package/out/interface/service/i-parent-config/i-parent-config.d.ts.map +0 -1
  80. package/out/interface/service/i-parent-config/i-parent-config.js +0 -1
  81. package/src/interface/service/i-parent-config/i-parent-config.ts +0 -66
package/dist/index.esm.js CHANGED
@@ -1239,46 +1239,73 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
1239
1239
  }
1240
1240
  const entity = await ibiz.hub.getAppDataEntity(entityId, appView.appId);
1241
1241
  const rdTag = await calcDERdTag(entity, appView, params, curData);
1242
- const rdTagItems = rdTag.split(":");
1243
- const wfRdTag = rdTagItems.length === 2 ? rdTag : rdTagItems.slice(0, 2).join(":");
1244
- const deRdTag = "".concat(entity.name.toUpperCase(), ":").concat(rdTag);
1245
- const allRefViews = [];
1246
- if (appView.redirectAppViewRefs) {
1247
- allRefViews.push(...appView.redirectAppViewRefs);
1248
- }
1249
- if (appView.appViewRefs) {
1250
- allRefViews.push(...appView.appViewRefs);
1251
- }
1252
- const refView = allRefViews.find((view) => {
1253
- const matchKey = view.name || view.id;
1254
- return matchKey === deRdTag || matchKey === rdTag || matchKey === wfRdTag;
1255
- });
1256
- if (refView) {
1257
- const viewId = refView.refAppViewId;
1258
- if (viewId) {
1259
- return {
1260
- type: "view",
1261
- viewId,
1262
- context,
1263
- params,
1264
- opts: { ...opts, data: [curData] }
1265
- };
1242
+ let viewId = "";
1243
+ if (rdTag.startsWith("view://")) {
1244
+ const url = new URL(rdTag);
1245
+ if (url.searchParams.size > 0) {
1246
+ url.searchParams.forEach((value, _key) => {
1247
+ params[_key] = value;
1248
+ });
1249
+ }
1250
+ const rdTagItems = url.pathname.replace("//", "").split("/");
1251
+ const [appOrViewTag, viewTag] = rdTagItems;
1252
+ if (viewTag) {
1253
+ viewId = viewTag;
1254
+ } else {
1255
+ viewId = appOrViewTag;
1266
1256
  }
1267
- throw new RuntimeModelError3(refView, "\u672A\u914D\u7F6E\u5B9E\u9645\u5F15\u7528\u89C6\u56FE");
1268
1257
  } else {
1269
- ibiz.log.error(
1270
- "\u91CD\u5B9A\u5411\u89C6\u56FE\u5F15\u7528\u6709\uFF1A",
1271
- allRefViews == null ? void 0 : allRefViews.map(({ refAppViewId, name, realTitle }) => ({
1272
- viewId: refAppViewId,
1273
- tag: name,
1274
- title: realTitle
1275
- }))
1276
- );
1277
- throw new RuntimeModelError3(
1278
- appView,
1279
- "\u672A\u627E\u5230\u91CD\u5B9A\u5411\u6807\u8BC6[".concat(rdTag, "]\u6216[").concat(deRdTag, "]\u6216\u5DE5\u4F5C\u6D41[").concat(wfRdTag, "]\u5BF9\u5E94\u89C6\u56FE")
1280
- );
1258
+ const rdTagItems = rdTag.split(":");
1259
+ const wfRdTag = rdTagItems.length === 2 ? rdTag : rdTagItems.slice(0, 2).join(":");
1260
+ const deRdTag = "".concat(entity.name.toUpperCase(), ":").concat(rdTag);
1261
+ const allRefViews = [];
1262
+ if (appView.redirectAppViewRefs) {
1263
+ allRefViews.push(...appView.redirectAppViewRefs);
1264
+ }
1265
+ if (appView.appViewRefs) {
1266
+ allRefViews.push(...appView.appViewRefs);
1267
+ }
1268
+ const refView = allRefViews.find((view) => {
1269
+ const matchKey = view.name || view.id;
1270
+ return matchKey === deRdTag || matchKey === rdTag || matchKey === wfRdTag;
1271
+ });
1272
+ if (refView) {
1273
+ viewId = refView.refAppViewId;
1274
+ if (viewId) {
1275
+ return {
1276
+ type: "view",
1277
+ viewId,
1278
+ context,
1279
+ params,
1280
+ opts: { ...opts, data: [curData] }
1281
+ };
1282
+ }
1283
+ throw new RuntimeModelError3(refView, "\u672A\u914D\u7F6E\u5B9E\u9645\u5F15\u7528\u89C6\u56FE");
1284
+ } else {
1285
+ ibiz.log.error(
1286
+ "\u91CD\u5B9A\u5411\u89C6\u56FE\u5F15\u7528\u6709\uFF1A",
1287
+ allRefViews == null ? void 0 : allRefViews.map(({ refAppViewId, name, realTitle }) => ({
1288
+ viewId: refAppViewId,
1289
+ tag: name,
1290
+ title: realTitle
1291
+ }))
1292
+ );
1293
+ throw new RuntimeModelError3(
1294
+ appView,
1295
+ "\u672A\u627E\u5230\u91CD\u5B9A\u5411\u6807\u8BC6[".concat(rdTag, "]\u6216[").concat(deRdTag, "]\u6216\u5DE5\u4F5C\u6D41[").concat(wfRdTag, "]\u5BF9\u5E94\u89C6\u56FE")
1296
+ );
1297
+ }
1298
+ }
1299
+ if (viewId) {
1300
+ return {
1301
+ type: "view",
1302
+ viewId,
1303
+ context,
1304
+ params,
1305
+ opts: { ...opts, data: [curData] }
1306
+ };
1281
1307
  }
1308
+ throw new RuntimeModelError3(appView, "\u6807\u8BC6[".concat(rdTag, "]\u672A\u5339\u914D\u5230\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"));
1282
1309
  }
1283
1310
  async function openDERedirectView(appView, context, params = {}, opts = {}) {
1284
1311
  let toView;
@@ -1315,6 +1342,9 @@ async function calcDERdTag(entity, rdView, params, data) {
1315
1342
  const { codeName } = findFieldById(entity, typeFieldId);
1316
1343
  const value = data[codeName.toLowerCase()];
1317
1344
  if (notNilEmpty3(value)) {
1345
+ if (value.startsWith("view://")) {
1346
+ return value;
1347
+ }
1318
1348
  return "".concat(value.toUpperCase());
1319
1349
  }
1320
1350
  ibiz.log.warn(
@@ -2250,6 +2280,7 @@ var ControlType = /* @__PURE__ */ ((ControlType2) => {
2250
2280
  ControlType2["TAB_EXP_PANEL"] = "TABEXPPANEL";
2251
2281
  ControlType2["CUSTOM"] = "CUSTOM";
2252
2282
  ControlType2["CAPTIONBAR"] = "CAPTIONBAR";
2283
+ ControlType2["CONTEXT_MENU"] = "CONTEXTMENU";
2253
2284
  return ControlType2;
2254
2285
  })(ControlType || {});
2255
2286
 
@@ -2835,7 +2866,7 @@ var UIDomain = class {
2835
2866
  * @author chitanda
2836
2867
  * @date 2023-12-26 15:12:13
2837
2868
  * @protected
2838
- * @type {Map<string, IParentConfig[]>}
2869
+ * @type {Map<string, IAppDERS[]>}
2839
2870
  */
2840
2871
  this.rsMap = /* @__PURE__ */ new Map();
2841
2872
  if (id) {
@@ -2850,14 +2881,10 @@ var UIDomain = class {
2850
2881
  * @author chitanda
2851
2882
  * @date 2023-12-26 15:12:31
2852
2883
  * @param {string} entity
2853
- * @param {IParentConfig} config
2884
+ * @param {IAppDERS} configs
2854
2885
  */
2855
- setDERConfig(deCodeName, config) {
2856
- if (!this.rsMap.has(deCodeName)) {
2857
- this.rsMap.set(deCodeName, []);
2858
- }
2859
- const arr = this.rsMap.get(deCodeName);
2860
- arr.push(config);
2886
+ setDERConfig(deCodeName, configs) {
2887
+ this.rsMap.set(deCodeName, configs);
2861
2888
  }
2862
2889
  /**
2863
2890
  * 获取当前界面域下,具体实体的关系(在数据加载完成之后才有值)
@@ -2865,7 +2892,7 @@ var UIDomain = class {
2865
2892
  * @author chitanda
2866
2893
  * @date 2023-12-26 16:12:07
2867
2894
  * @param {string} deCodeName
2868
- * @return {*} {IParentConfig[]}
2895
+ * @return {*} {IAppDERS[]}
2869
2896
  */
2870
2897
  getDERConfig(deCodeName) {
2871
2898
  if (this.rsMap.has(deCodeName)) {
@@ -3001,7 +3028,7 @@ async function handleAllSettled(values, isThrow = true) {
3001
3028
 
3002
3029
  // src/command/app/open-app-view/open-app-view.ts
3003
3030
  import { ModelError as ModelError15, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
3004
- import { clone as clone14 } from "ramda";
3031
+ import { clone as clone15 } from "ramda";
3005
3032
 
3006
3033
  // src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
3007
3034
  import { isEmpty as isEmpty3 } from "ramda";
@@ -4275,7 +4302,11 @@ var DEDQCondUtil = class {
4275
4302
  const groups = dataSet.dedqgroupConditions;
4276
4303
  if (groups) {
4277
4304
  const cond = new PSDEDQCondEngine();
4278
- cond.parse(["OR", this.calcCond(groups)]);
4305
+ if (groups.length === 1) {
4306
+ cond.parse(this.calcCond(groups)[0]);
4307
+ } else if (groups.length > 1) {
4308
+ cond.parse(["AND", this.calcCond(groups)][0]);
4309
+ }
4279
4310
  this.map.set(dataSet, cond);
4280
4311
  return cond;
4281
4312
  }
@@ -4308,8 +4339,17 @@ var DEDQCondUtil = class {
4308
4339
  }
4309
4340
  } else if (item.condType === "SINGLE") {
4310
4341
  const cond = item;
4342
+ condArr.push(cond.condOp);
4311
4343
  condArr.push(cond.fieldName);
4312
4344
  if (cond.condValue) {
4345
+ if (cond.vartypeId) {
4346
+ condArr.push({
4347
+ type: cond.vartypeId,
4348
+ value: cond.condValue
4349
+ });
4350
+ } else {
4351
+ condArr.push(cond.condValue);
4352
+ }
4313
4353
  } else {
4314
4354
  condArr.push("");
4315
4355
  }
@@ -4572,7 +4612,7 @@ var DynamicCodeListCache = class {
4572
4612
 
4573
4613
  // src/service/utils/de-cache/de-cache.ts
4574
4614
  import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
4575
- import { ascSort, createUUID as createUUID2 } from "qx-util";
4615
+ import { createUUID as createUUID2 } from "qx-util";
4576
4616
  import { RuntimeError as RuntimeError14 } from "@ibiz-template/core";
4577
4617
 
4578
4618
  // src/service/utils/service-exist-util/service-exist-util.ts
@@ -4897,64 +4937,6 @@ var DECache = class {
4897
4937
  const values = this.cacheMap.values();
4898
4938
  return Array.from(values);
4899
4939
  }
4900
- /**
4901
- * 根据条件查找数据,未设置条件默认返回全部
4902
- *
4903
- * @author chitanda
4904
- * @date 2023-12-22 13:12:28
4905
- * @param {IContext} context
4906
- * @param {IParams} [params={}]
4907
- * @return {*} {IDataEntity[]}
4908
- */
4909
- select(context, params = {}) {
4910
- try {
4911
- isExistSessionId("getList", context);
4912
- const values = this.cacheMap.values();
4913
- let items = Array.from(values);
4914
- items = ascSort(items, "srfordervalue");
4915
- const data = {};
4916
- const nullData = {};
4917
- const undefinedData = {};
4918
- const emptyData = {};
4919
- if (params.srfkey) {
4920
- data.srfkey = equals(params.srfkey);
4921
- delete params.srfkey;
4922
- }
4923
- for (const key in params) {
4924
- if (Object.prototype.hasOwnProperty.call(params, key)) {
4925
- const val = params[key];
4926
- if (val == null) {
4927
- nullData[key] = equals(null);
4928
- undefinedData[key] = equals(void 0);
4929
- emptyData[key] = equals("");
4930
- } else {
4931
- data[key] = equals(val);
4932
- }
4933
- }
4934
- }
4935
- if (!isEmpty5(data)) {
4936
- const pred = where(data);
4937
- const nullPred = where(nullData);
4938
- const undefinedPred = where(undefinedData);
4939
- const emptyPred = where(emptyData);
4940
- items = items.filter((obj) => {
4941
- if (isEmpty5(nullData)) {
4942
- if (pred(obj)) {
4943
- return true;
4944
- }
4945
- } else if (pred(obj) && (nullPred(obj) || undefinedPred(obj) || emptyPred(obj))) {
4946
- return true;
4947
- }
4948
- return false;
4949
- });
4950
- }
4951
- const list = items.map((obj) => obj.clone());
4952
- return list;
4953
- } catch (err) {
4954
- ibiz.log.error(err);
4955
- return [];
4956
- }
4957
- }
4958
4940
  /**
4959
4941
  * 根据条件生成查询
4960
4942
  *
@@ -5124,19 +5106,11 @@ var SearchFilter = class {
5124
5106
  this.sortMode = arr[1].toUpperCase();
5125
5107
  }
5126
5108
  }
5127
- if (!isNil6(data.srfparentkey) && !isEmpty6(data.srfparentkey)) {
5128
- this.srfparentkey = data.srfparentkey;
5129
- }
5130
- if (!isNil6(data.srfparentdename) && !isEmpty6(data.srfparentdename)) {
5131
- this.srfparentdename = data.srfparentdename;
5132
- }
5133
5109
  this.data = { ...data };
5134
5110
  delete this.data.page;
5135
5111
  delete this.data.size;
5136
5112
  delete this.data.query;
5137
5113
  delete this.data.sort;
5138
- delete this.data.srfparentkey;
5139
- delete this.data.srfparentdename;
5140
5114
  }
5141
5115
  }
5142
5116
  /**
@@ -5429,7 +5403,7 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
5429
5403
 
5430
5404
  // src/service/service/entity/de.service.ts
5431
5405
  import {
5432
- ModelError as ModelError6,
5406
+ ModelError as ModelError7,
5433
5407
  RuntimeError as RuntimeError17
5434
5408
  } from "@ibiz-template/core";
5435
5409
 
@@ -5571,8 +5545,10 @@ var WorkFlowService = class {
5571
5545
  * @date 2022-09-29 14:09:45
5572
5546
  * @returns {*} {Promise<IHttpResponse<IData>>}
5573
5547
  */
5574
- async getWFVersion() {
5575
- return this.app.net.get("".concat(this.getBaseUrl(), "/process-definitions2"));
5548
+ async getWFVersion(srfWFTag) {
5549
+ return this.app.net.get(
5550
+ "/wfcore/".concat(ibiz.appData.context.srfsystemid, "-app-").concat(this.app.model.codeName.toLowerCase(), "/").concat(this.model.name.toLowerCase()).concat(srfWFTag ? "-".concat(srfWFTag) : "", "/process-definitions2")
5551
+ );
5576
5552
  }
5577
5553
  /**
5578
5554
  * 启动工作流
@@ -5992,181 +5968,439 @@ var AppDataEntity = class _AppDataEntity {
5992
5968
  }
5993
5969
  };
5994
5970
 
5995
- // src/service/service/entity/de.service.ts
5996
- var DEService = class {
5971
+ // src/service/dto/method.dto.ts
5972
+ import { ModelError as ModelError6, RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
5973
+ import { clone as clone6 } from "ramda";
5974
+ var MethodDto = class {
5997
5975
  /**
5998
- * Creates an instance of DEService.
5999
- *
6000
- * @author chitanda
6001
- * @date 2023-12-22 13:12:21
6002
- * @param {string} srfSessionId 当前实体会话标识
6003
- * @param {IAppDataEntity} model 实体模型
5976
+ * Creates an instance of MethodDto.
5977
+ * @author lxm
5978
+ * @date 2024-01-04 05:39:07
5979
+ * @param {IAppDEService} service
5980
+ * @param {IAppDataEntity} entity
5981
+ * @param {boolean} [isLocalMode]
5982
+ * @param {IAppDEMethodDTO} [dto]
5983
+ * @param {boolean} [inSelfLoop] 是否在自关系循环中
6004
5984
  */
6005
- constructor(srfSessionId, model) {
6006
- this.srfSessionId = srfSessionId;
6007
- this.model = model;
5985
+ constructor(service, entity, isLocalMode, dto, inSelfLoop) {
5986
+ this.service = service;
5987
+ this.entity = entity;
5988
+ this.isLocalMode = isLocalMode;
5989
+ this.dto = dto;
5990
+ this.inSelfLoop = inSelfLoop;
5991
+ this.dtoMap = /* @__PURE__ */ new Map();
6008
5992
  /**
6009
- * 请求方法实例
5993
+ * 当前 DTO 是否已经计算过关系相关逻辑
6010
5994
  *
5995
+ * @link this.calcRs
6011
5996
  * @author chitanda
6012
- * @date 2022-10-10 12:10:13
5997
+ * @date 2023-12-26 16:12:18
6013
5998
  * @protected
6014
- * @type {Map<string, Method>}
6015
- */
6016
- this.methodMap = /* @__PURE__ */ new Map();
6017
- /**
6018
- * 是否为本地模式(临时数据模式)服务
6019
- *
6020
- * @author chitanda
6021
- * @date 2023-12-22 16:12:13
6022
- * @type {boolean}
6023
5999
  */
6024
- this.isLocalMode = false;
6025
- this.local = new DECache(model);
6026
- this.configCache = new ConfigService(
6027
- model.appId,
6028
- "PSAppDataEntity",
6029
- model.codeName
6030
- );
6031
- this.wf = new WorkFlowService(model);
6032
- this.file = new FileService(model);
6033
- }
6034
- /**
6035
- * 获取实体服务方法实例
6036
- *
6037
- * @author chitanda
6038
- * @date 2023-10-12 17:10:10
6039
- * @protected
6040
- * @param {string} id
6041
- * @param {boolean} [acMode=false]
6042
- * @return {*} {Method}
6043
- */
6044
- async getMethod(id, acMode = false) {
6045
- const cacheId = acMode ? "ac-".concat(id) : id;
6046
- if (this.methodMap.has(cacheId)) {
6047
- return this.methodMap.get(cacheId);
6048
- }
6049
- const model = findModelChild(this.model.appDEMethods, id);
6050
- const provider = await getDEMethodProvider(model);
6051
- if (!provider) {
6052
- throw new ModelError6(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
6053
- }
6054
- const method = provider.create(this, this.model, model, {
6055
- acMode,
6056
- localMode: this.isLocalMode
6057
- });
6058
- this.methodMap.set(cacheId, method);
6059
- return method;
6060
- }
6061
- /**
6062
- * 执行服务方法
6063
- *
6064
- * @author chitanda
6065
- * @date 2022-09-13 19:09:55
6066
- * @param {string} id 执行服务方法标识
6067
- * @param {IContext} context
6068
- * @param {IData} [params={}] 请求参数
6069
- * @param {IParams} [params2={}] 查询参数
6070
- * @return {*} {Promise<IHttpResponse>}
6071
- */
6072
- async exec(id, context, params, params2) {
6073
- const method = await this.getMethod(id);
6074
- if (method) {
6075
- return method.exec(context, params, params2);
6000
+ this.isCalcRs = false;
6001
+ if (dto) {
6002
+ this.app = ibiz.hub.getApp(entity.appId);
6003
+ this.fields = dto.appDEMethodDTOFields || [];
6004
+ } else {
6005
+ this.fields = [];
6076
6006
  }
6077
- throw new RuntimeError17("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
6078
- }
6079
- getDraft(context, params, params2) {
6080
- return this.exec("GetDraft", context, params, params2);
6081
- }
6082
- create(context, params, params2) {
6083
- return this.exec("Create", context, params, params2);
6084
- }
6085
- get(context, params, params2) {
6086
- return this.exec("Get", context, params, params2);
6087
- }
6088
- update(context, params, params2) {
6089
- return this.exec("Update", context, params, params2);
6090
- }
6091
- remove(context, params, params2) {
6092
- return this.exec("Remove", context, params, params2);
6093
- }
6094
- fetchDefault(context, params, params2) {
6095
- return this.exec("FetchDefault", context, params, params2);
6096
- }
6097
- getDraftTemp(context, params, params2) {
6098
- return this.exec("GetDraftTemp", context, params, params2);
6099
- }
6100
- createTemp(context, params, params2) {
6101
- return this.exec("CreateTemp", context, params, params2);
6102
- }
6103
- getTemp(context, params, params2) {
6104
- return this.exec("GetTemp", context, params, params2);
6105
- }
6106
- updateTemp(context, params, params2) {
6107
- return this.exec("UpdateTemp", context, params, params2);
6108
- }
6109
- removeTemp(context, params, params2) {
6110
- return this.exec("RemoveTemp", context, params, params2);
6111
- }
6112
- fetchTempDefault(context, params, params2) {
6113
- return this.exec("FetchTempDefault", context, params, params2);
6114
6007
  }
6115
6008
  /**
6116
- * 查询本地数据,根据属性
6009
+ * 转换数组成ListMap
6117
6010
  *
6118
- * @param {IContext} context
6119
- * @param {IParams} params 根据多实体属性查找,例:{ name: '张三', age: 18, parent: null }
6120
- * @return {*} {Promise<IDataEntity[]>}
6011
+ * @param {IData[]} arr
6012
+ * @return {*} listMap
6121
6013
  */
6122
- async selectLocal(context, params = {}) {
6123
- return this.local.select(context, params);
6014
+ convertArrayToListMap(arr) {
6015
+ const result = {};
6016
+ arr.forEach((obj, index) => {
6017
+ result[index + 1] = obj;
6018
+ });
6019
+ return result;
6124
6020
  }
6125
6021
  /**
6126
- * 执行服务方法 ac 模式
6022
+ * 转换ListMap成数组
6127
6023
  *
6128
- * @author chitanda
6129
- * @date 2022-09-13 19:09:55
6130
- * @param {string} id 执行服务方法标识
6131
- * @param {IContext} context
6132
- * @param {IData} [params={}] 请求参数
6133
- * @param {IParams} [params2={}] 查询参数
6134
- * @return {*} {Promise<IHttpResponse>}
6024
+ * @param {listMap} obj
6025
+ * @return {*} IData[]
6135
6026
  */
6136
- async execAc(id, context, params, params2 = {}) {
6137
- const method = await this.getMethod(id, true);
6138
- if (method) {
6139
- return method.exec(context, params, params2);
6140
- }
6141
- throw new RuntimeError17("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
6027
+ convertListMapToArray(obj) {
6028
+ const result = [];
6029
+ Object.keys(obj).forEach((key) => {
6030
+ const index = parseInt(key, 10);
6031
+ result[index - 1] = obj[index];
6032
+ });
6033
+ return result;
6142
6034
  }
6143
6035
  /**
6144
- * 实体级别 AI 聊天会话
6036
+ * 请求参数组合 DTO
6145
6037
  *
6146
6038
  * @author chitanda
6147
- * @date 2023-10-16 16:10:16
6148
- * @param {(data: IPortalAsyncAction) => void} onmessage
6039
+ * @date 2022-10-10 23:10:33
6149
6040
  * @param {IContext} context
6150
- * @param {IParams} [params={}]
6151
- * @param {IData} [data={}]
6152
- * @return {*} {Promise<void>}
6041
+ * @param {IData} data
6042
+ * @return {*} {Promise<IData>}
6153
6043
  */
6154
- aiChatSse(onmessage, context, params = {}, data = {}) {
6155
- const app = ibiz.hub.getApp(this.model.appId);
6156
- const path2 = this.calcSsePath(context);
6157
- return new Promise((resolve, reject) => {
6158
- app.net.sse(
6159
- "/".concat(path2),
6160
- { srfactag: "AIChat", ...params },
6161
- {
6162
- headers: {
6163
- "Content-Type": "application/json"
6164
- },
6165
- body: JSON.stringify(data),
6166
- onmessage: (e) => {
6167
- if (e.data) {
6168
- const json = JSON.parse(e.data);
6169
- onmessage(json);
6044
+ async get(context, data, ignore = false) {
6045
+ const params = {};
6046
+ const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
6047
+ for (let i = 0; i < this.fields.length; i++) {
6048
+ const field = this.fields[i];
6049
+ const key = field.codeName.toLowerCase();
6050
+ switch (field.type) {
6051
+ case "SIMPLE":
6052
+ case "SIMPLES":
6053
+ case "DTO": {
6054
+ break;
6055
+ }
6056
+ case "DTOS": {
6057
+ if (field.listMap) {
6058
+ if (data[key]) {
6059
+ params[key] = data[key].length === 0 ? null : this.convertArrayToListMap(data[key]);
6060
+ }
6061
+ } else {
6062
+ if (data[key] !== void 0 && ignore === false) {
6063
+ break;
6064
+ }
6065
+ if (!field.refAppDataEntityId) {
6066
+ break;
6067
+ }
6068
+ const configs = uiDomain.getDERConfig(field.refAppDataEntityId);
6069
+ const dto = await this.getFieldDto(context, field);
6070
+ const service = await ibiz.hub.getAppDEService(
6071
+ dto.entity.appId,
6072
+ field.refAppDataEntityId,
6073
+ context
6074
+ );
6075
+ const deRs = configs.find((rs) => {
6076
+ return rs.majorAppDataEntityId === this.entity.id;
6077
+ });
6078
+ let res;
6079
+ if (deRs && deRs.nestedAppDEDataSetId) {
6080
+ const _context = clone6(context);
6081
+ _context[this.entity.codeName.toLowerCase()] = data.srfkey;
6082
+ const _params = {};
6083
+ if (deRs.parentAppDEFieldId) {
6084
+ _params[deRs.parentAppDEFieldId] = data.srfkey;
6085
+ }
6086
+ res = await service.exec(
6087
+ deRs.nestedAppDEDataSetId,
6088
+ _context,
6089
+ _params
6090
+ );
6091
+ } else if (dto.entity.id !== this.entity.id) {
6092
+ res = await service.exec("FetchDefault", context);
6093
+ } else {
6094
+ throw new RuntimeModelError9(
6095
+ field,
6096
+ "\u5B50\u5173\u7CFB\u672A\u914D\u7F6E\u5D4C\u5957\u5173\u7CFB\u6570\u636E\u96C6, \u4F1A\u5BFC\u81F4\u9012\u5F52\u67E5\u8BE2\u6B7B\u5FAA\u73AF\uFF0C\u8BF7\u914D\u7F6E!"
6097
+ );
6098
+ }
6099
+ if (res.ok) {
6100
+ const items = res.data;
6101
+ const arr = [];
6102
+ for (let j = 0; j < items.length; j++) {
6103
+ arr.push(await dto.get(context, items[j], true));
6104
+ }
6105
+ params[key] = arr;
6106
+ }
6107
+ }
6108
+ break;
6109
+ }
6110
+ default:
6111
+ throw new ModelError6(
6112
+ field,
6113
+ "\u672A\u652F\u6301\u7684\u5E94\u7528\u5B9E\u4F53\u65B9\u6CD5\u8F93\u5165\u5C5E\u6027\u7C7B\u578B: ".concat(field.type)
6114
+ );
6115
+ }
6116
+ }
6117
+ return { ...data, ...params };
6118
+ }
6119
+ /**
6120
+ * 设置本地 DTO 存储
6121
+ *
6122
+ * @author chitanda
6123
+ * @date 2022-10-10 23:10:50
6124
+ * @param {IContext} context
6125
+ * @param {IData[]} data
6126
+ * @return {*} {Promise<IDataEntity[]>}
6127
+ */
6128
+ async sets(context, data) {
6129
+ if (this.isLocalMode && !this.inSelfLoop) {
6130
+ this.service.local.clear();
6131
+ }
6132
+ await this.calcRs(context);
6133
+ return Promise.all(
6134
+ data.map(async (datum) => {
6135
+ const all = this.fields.filter((field) => field.type === "DTOS").map(async (field) => {
6136
+ const key = field.codeName.toLowerCase();
6137
+ if (field.listMap && typeof datum[key] === "object") {
6138
+ datum[key] = this.convertListMapToArray(datum[key]);
6139
+ } else {
6140
+ if (!field.refAppDataEntityId) {
6141
+ return;
6142
+ }
6143
+ const dto = await this.getFieldDto(context, field);
6144
+ const items = datum[key];
6145
+ if (items) {
6146
+ const pKey = datum[this.entity.keyAppDEFieldId];
6147
+ if (field.refPickupAppDEFieldId) {
6148
+ items.forEach((item) => {
6149
+ item[field.refPickupAppDEFieldId] = pKey;
6150
+ });
6151
+ }
6152
+ await dto.sets(context, items);
6153
+ } else {
6154
+ await dto.sets(context, []);
6155
+ }
6156
+ }
6157
+ });
6158
+ for (let i = 0; i < all.length; i++) {
6159
+ await all[i];
6160
+ }
6161
+ const entityData = this.service.createEntity(datum);
6162
+ if (this.isLocalMode) {
6163
+ await this.service.local.add(context, entityData);
6164
+ }
6165
+ return entityData;
6166
+ })
6167
+ );
6168
+ }
6169
+ /**
6170
+ * 递归计算当前 DTO 相关实体的父关系配置
6171
+ *
6172
+ * @author chitanda
6173
+ * @date 2023-12-26 16:12:13
6174
+ * @protected
6175
+ * @param {IContext} context
6176
+ * @param {number} [depth=0] 递归层级,避免进入死循环。最大递归层级为 10
6177
+ * @return {*} {Promise<void>}
6178
+ */
6179
+ async calcRs(context, depth = 0) {
6180
+ if (this.isCalcRs || depth > 10) {
6181
+ return;
6182
+ }
6183
+ this.isCalcRs = true;
6184
+ depth += 1;
6185
+ const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
6186
+ const dtoFields = this.fields.filter((field) => field.type === "DTOS");
6187
+ for (let i = 0; i < dtoFields.length; i++) {
6188
+ const field = dtoFields[i];
6189
+ if (!field.refAppDataEntityId) {
6190
+ continue;
6191
+ }
6192
+ const configs = uiDomain.getDERConfig(field.refAppDataEntityId);
6193
+ if (configs.length === 0) {
6194
+ const dto = await this.getFieldDto(context, field);
6195
+ if (dto.entity.minorAppDERSs) {
6196
+ uiDomain.setDERConfig(
6197
+ field.refAppDataEntityId,
6198
+ dto.entity.minorAppDERSs.filter((rs) => rs.rsmode === 1)
6199
+ );
6200
+ }
6201
+ await dto.calcRs(context, depth);
6202
+ }
6203
+ }
6204
+ }
6205
+ /**
6206
+ * 获取子属性 DTO
6207
+ *
6208
+ * @author chitanda
6209
+ * @date 2023-12-22 13:12:06
6210
+ * @protected
6211
+ * @param {IContext} context
6212
+ * @param {IAppDEMethodDTOField} field
6213
+ * @return {*} {Promise<MethodDto>}
6214
+ */
6215
+ async getFieldDto(context, field) {
6216
+ if (this.dtoMap.has(field.codeName)) {
6217
+ return this.dtoMap.get(field.codeName);
6218
+ }
6219
+ const entity = await ibiz.hub.getAppDataEntity(
6220
+ field.refAppDataEntityId,
6221
+ this.entity.appId
6222
+ );
6223
+ const methodDto = findModelChild(
6224
+ entity.appDEMethodDTOs || [],
6225
+ field.refAppDEMethodDTOId
6226
+ );
6227
+ const inSelfLoop = this.entity.codeName === entity.codeName;
6228
+ const service = await this.app.deService.getService(context, entity.id);
6229
+ service.isLocalMode = true;
6230
+ const dto = service.createMethodDto(methodDto, {
6231
+ isLocalMode: true,
6232
+ inSelfLoop
6233
+ });
6234
+ this.dtoMap.set(field.codeName, dto);
6235
+ return dto;
6236
+ }
6237
+ };
6238
+
6239
+ // src/service/service/entity/de.service.ts
6240
+ var DEService = class {
6241
+ /**
6242
+ * Creates an instance of DEService.
6243
+ *
6244
+ * @author chitanda
6245
+ * @date 2023-12-22 13:12:21
6246
+ * @param {string} srfSessionId 当前实体会话标识
6247
+ * @param {IAppDataEntity} model 实体模型
6248
+ */
6249
+ constructor(srfSessionId, model) {
6250
+ this.srfSessionId = srfSessionId;
6251
+ this.model = model;
6252
+ /**
6253
+ * 请求方法实例
6254
+ *
6255
+ * @author chitanda
6256
+ * @date 2022-10-10 12:10:13
6257
+ * @protected
6258
+ * @type {Map<string, Method>}
6259
+ */
6260
+ this.methodMap = /* @__PURE__ */ new Map();
6261
+ /**
6262
+ * 是否为本地模式(临时数据模式)服务
6263
+ *
6264
+ * @author chitanda
6265
+ * @date 2023-12-22 16:12:13
6266
+ * @type {boolean}
6267
+ */
6268
+ this.isLocalMode = false;
6269
+ this.local = new DECache(model);
6270
+ this.configCache = new ConfigService(
6271
+ model.appId,
6272
+ "PSAppDataEntity",
6273
+ model.codeName
6274
+ );
6275
+ this.wf = new WorkFlowService(model);
6276
+ this.file = new FileService(model);
6277
+ }
6278
+ /**
6279
+ * 获取实体服务方法实例
6280
+ *
6281
+ * @author chitanda
6282
+ * @date 2023-10-12 17:10:10
6283
+ * @protected
6284
+ * @param {string} id
6285
+ * @param {boolean} [acMode=false]
6286
+ * @return {*} {Method}
6287
+ */
6288
+ async getMethod(id, acMode = false) {
6289
+ const cacheId = acMode ? "ac-".concat(id) : id;
6290
+ if (this.methodMap.has(cacheId)) {
6291
+ return this.methodMap.get(cacheId);
6292
+ }
6293
+ const model = findModelChild(this.model.appDEMethods, id);
6294
+ const provider = await getDEMethodProvider(model);
6295
+ if (!provider) {
6296
+ throw new ModelError7(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
6297
+ }
6298
+ const method = provider.create(this, this.model, model, {
6299
+ acMode,
6300
+ localMode: this.isLocalMode
6301
+ });
6302
+ this.methodMap.set(cacheId, method);
6303
+ return method;
6304
+ }
6305
+ /**
6306
+ * 执行服务方法
6307
+ *
6308
+ * @author chitanda
6309
+ * @date 2022-09-13 19:09:55
6310
+ * @param {string} id 执行服务方法标识
6311
+ * @param {IContext} context
6312
+ * @param {IData} [params={}] 请求参数
6313
+ * @param {IParams} [params2={}] 查询参数
6314
+ * @return {*} {Promise<IHttpResponse>}
6315
+ */
6316
+ async exec(id, context, params, params2) {
6317
+ const method = await this.getMethod(id);
6318
+ if (method) {
6319
+ return method.exec(context, params, params2);
6320
+ }
6321
+ throw new RuntimeError17("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
6322
+ }
6323
+ getDraft(context, params, params2) {
6324
+ return this.exec("GetDraft", context, params, params2);
6325
+ }
6326
+ create(context, params, params2) {
6327
+ return this.exec("Create", context, params, params2);
6328
+ }
6329
+ get(context, params, params2) {
6330
+ return this.exec("Get", context, params, params2);
6331
+ }
6332
+ update(context, params, params2) {
6333
+ return this.exec("Update", context, params, params2);
6334
+ }
6335
+ remove(context, params, params2) {
6336
+ return this.exec("Remove", context, params, params2);
6337
+ }
6338
+ fetchDefault(context, params, params2) {
6339
+ return this.exec("FetchDefault", context, params, params2);
6340
+ }
6341
+ getDraftTemp(context, params, params2) {
6342
+ return this.exec("GetDraftTemp", context, params, params2);
6343
+ }
6344
+ createTemp(context, params, params2) {
6345
+ return this.exec("CreateTemp", context, params, params2);
6346
+ }
6347
+ getTemp(context, params, params2) {
6348
+ return this.exec("GetTemp", context, params, params2);
6349
+ }
6350
+ updateTemp(context, params, params2) {
6351
+ return this.exec("UpdateTemp", context, params, params2);
6352
+ }
6353
+ removeTemp(context, params, params2) {
6354
+ return this.exec("RemoveTemp", context, params, params2);
6355
+ }
6356
+ fetchTempDefault(context, params, params2) {
6357
+ return this.exec("FetchTempDefault", context, params, params2);
6358
+ }
6359
+ /**
6360
+ * 执行服务方法 ac 模式
6361
+ *
6362
+ * @author chitanda
6363
+ * @date 2022-09-13 19:09:55
6364
+ * @param {string} id 执行服务方法标识
6365
+ * @param {IContext} context
6366
+ * @param {IData} [params={}] 请求参数
6367
+ * @param {IParams} [params2={}] 查询参数
6368
+ * @return {*} {Promise<IHttpResponse>}
6369
+ */
6370
+ async execAc(id, context, params, params2 = {}) {
6371
+ const method = await this.getMethod(id, true);
6372
+ if (method) {
6373
+ return method.exec(context, params, params2);
6374
+ }
6375
+ throw new RuntimeError17("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
6376
+ }
6377
+ /**
6378
+ * 实体级别 AI 聊天会话
6379
+ *
6380
+ * @author chitanda
6381
+ * @date 2023-10-16 16:10:16
6382
+ * @param {(data: IPortalAsyncAction) => void} onmessage
6383
+ * @param {IContext} context
6384
+ * @param {IParams} [params={}]
6385
+ * @param {IData} [data={}]
6386
+ * @return {*} {Promise<void>}
6387
+ */
6388
+ aiChatSse(onmessage, context, params = {}, data = {}) {
6389
+ const app = ibiz.hub.getApp(this.model.appId);
6390
+ const path2 = this.calcSsePath(context);
6391
+ return new Promise((resolve, reject) => {
6392
+ app.net.sse(
6393
+ "/".concat(path2),
6394
+ { srfactag: "AIChat", ...params },
6395
+ {
6396
+ headers: {
6397
+ "Content-Type": "application/json"
6398
+ },
6399
+ body: JSON.stringify(data),
6400
+ onmessage: (e) => {
6401
+ if (e.data) {
6402
+ const json = JSON.parse(e.data);
6403
+ onmessage(json);
6170
6404
  }
6171
6405
  },
6172
6406
  onclose: () => {
@@ -6240,14 +6474,23 @@ var DEService = class {
6240
6474
  async destroy() {
6241
6475
  this.local.clear();
6242
6476
  }
6477
+ createMethodDto(dto, opts) {
6478
+ return new MethodDto(
6479
+ this,
6480
+ this.model,
6481
+ opts == null ? void 0 : opts.isLocalMode,
6482
+ dto,
6483
+ opts == null ? void 0 : opts.inSelfLoop
6484
+ );
6485
+ }
6243
6486
  };
6244
6487
 
6245
6488
  // src/service/service/control/control.service.ts
6246
- import { clone as clone7 } from "@ibiz-template/core";
6489
+ import { clone as clone8 } from "@ibiz-template/core";
6247
6490
 
6248
6491
  // src/service/vo/control.vo.ts
6249
6492
  import { createUUID as createUUID4 } from "qx-util";
6250
- import { clone as clone6, isNil as isNil8 } from "ramda";
6493
+ import { clone as clone7, isNil as isNil8 } from "ramda";
6251
6494
  var BuildInKeys = [
6252
6495
  "srfkey",
6253
6496
  "srfmajortext",
@@ -6435,7 +6678,7 @@ var ControlVO = class _ControlVO {
6435
6678
  * @return {*} {ControlVO}
6436
6679
  */
6437
6680
  clone() {
6438
- const cloneOrigin = clone6(this.$origin);
6681
+ const cloneOrigin = clone7(this.$origin);
6439
6682
  const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
6440
6683
  Object.keys(this).forEach((key) => {
6441
6684
  newVal[key] = this[key];
@@ -6512,7 +6755,7 @@ var ControlService = class {
6512
6755
  * @returns {*} {IHttpResponse}
6513
6756
  */
6514
6757
  handleResponse(res) {
6515
- return clone7(res);
6758
+ return clone8(res);
6516
6759
  }
6517
6760
  /**
6518
6761
  * 实体数据转ui数据
@@ -6984,330 +7227,68 @@ var V7AuthService = class {
6984
7227
  setCookie(CoreConst.TOKEN, res.data.token, remember ? 7 : 0, true);
6985
7228
  const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (res.data.expirein || 7199) * 1e3;
6986
7229
  setCookie(
6987
- CoreConst.TOKEN_EXPIRES,
6988
- "".concat(expiredDate),
6989
- remember ? 7 : 0,
6990
- true
6991
- );
6992
- }
6993
- this.extendLogin();
6994
- }, wait);
6995
- }
6996
- }
6997
- getAuthInfo() {
6998
- const token = getCookie(CoreConst.TOKEN);
6999
- const isAnonymous = !!getCookie(CoreConst.IS_ANONYMOUS);
7000
- return token ? {
7001
- token,
7002
- isAnonymous
7003
- } : void 0;
7004
- }
7005
- };
7006
-
7007
- // src/service/service/async-action/async-action.service.ts
7008
- import { isNil as isNil9 } from "ramda";
7009
- var AsyncActionService = class {
7010
- /**
7011
- * 获取异步操作的集合
7012
- * @author lxm
7013
- * @date 2023-11-15 10:55:25
7014
- * @param {IParams} [params={}]
7015
- * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
7016
- */
7017
- async fetch(params = {}) {
7018
- const res = await ibiz.net.post("/portal/asyncaction/all", params);
7019
- if (isNil9(res.data)) {
7020
- res.data = [];
7021
- }
7022
- return res;
7023
- }
7024
- /**
7025
- * 获取单条异步操作
7026
- * @author lxm
7027
- * @date 2023-11-15 10:57:08
7028
- * @param {string} actionID
7029
- * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
7030
- */
7031
- async get(actionID) {
7032
- const res = await ibiz.net.get("/portal/asyncaction/".concat(actionID));
7033
- return res;
7034
- }
7035
- };
7036
-
7037
- // src/service/service/entity/method/de-action.ts
7038
- import {
7039
- HttpError as HttpError5,
7040
- HttpResponse as HttpResponse3,
7041
- RuntimeError as RuntimeError21,
7042
- RuntimeModelError as RuntimeModelError20
7043
- } from "@ibiz-template/core";
7044
- import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
7045
-
7046
- // src/service/service/entity/method/method.ts
7047
- import { RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
7048
-
7049
- // src/service/dto/method.dto.ts
7050
- import { ModelError as ModelError7 } from "@ibiz-template/core";
7051
- var MethodDto = class _MethodDto {
7052
- /**
7053
- * Creates an instance of MethodDto.
7054
- * @author lxm
7055
- * @date 2024-01-04 05:39:07
7056
- * @param {IAppDEService} service
7057
- * @param {IAppDataEntity} entity
7058
- * @param {boolean} [isLocalMode]
7059
- * @param {IAppDEMethodDTO} [dto]
7060
- * @param {boolean} [inSelfLoop] 是否在自关系循环中
7061
- */
7062
- constructor(service, entity, isLocalMode, dto, inSelfLoop) {
7063
- this.service = service;
7064
- this.entity = entity;
7065
- this.isLocalMode = isLocalMode;
7066
- this.dto = dto;
7067
- this.inSelfLoop = inSelfLoop;
7068
- this.dtoMap = /* @__PURE__ */ new Map();
7069
- /**
7070
- * 当前 DTO 是否已经计算过关系相关逻辑
7071
- *
7072
- * @link this.calcRs
7073
- * @author chitanda
7074
- * @date 2023-12-26 16:12:18
7075
- * @protected
7076
- */
7077
- this.isCalcRs = false;
7078
- if (dto) {
7079
- this.app = ibiz.hub.getApp(entity.appId);
7080
- this.fields = dto.appDEMethodDTOFields || [];
7081
- } else {
7082
- this.fields = [];
7083
- }
7084
- }
7085
- /**
7086
- * 查找本地 DTO 存储数据
7087
- *
7088
- * @author chitanda
7089
- * @date 2023-12-22 14:12:19
7090
- * @param {IContext} context
7091
- * @param {IParams} [params]
7092
- * @return {*} {IDataEntity[]}
7093
- */
7094
- select(context, params) {
7095
- return this.service.local.select(context, params);
7096
- }
7097
- /**
7098
- * 转换数组成ListMap
7099
- *
7100
- * @param {IData[]} arr
7101
- * @return {*} listMap
7102
- */
7103
- convertArrayToListMap(arr) {
7104
- const result = {};
7105
- arr.forEach((obj, index) => {
7106
- result[index + 1] = obj;
7107
- });
7108
- return result;
7109
- }
7110
- /**
7111
- * 转换ListMap成数组
7112
- *
7113
- * @param {listMap} obj
7114
- * @return {*} IData[]
7115
- */
7116
- convertListMapToArray(obj) {
7117
- const result = [];
7118
- Object.keys(obj).forEach((key) => {
7119
- const index = parseInt(key, 10);
7120
- result[index - 1] = obj[index];
7121
- });
7122
- return result;
7123
- }
7124
- /**
7125
- * 请求参数组合 DTO
7126
- *
7127
- * @author chitanda
7128
- * @date 2022-10-10 23:10:33
7129
- * @param {IContext} context
7130
- * @param {IData} data
7131
- * @return {*} {Promise<IData>}
7132
- */
7133
- async get(context, data, ignore = false) {
7134
- const params = {};
7135
- const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
7136
- for (let i = 0; i < this.fields.length; i++) {
7137
- const field = this.fields[i];
7138
- const key = field.codeName.toLowerCase();
7139
- switch (field.type) {
7140
- case "SIMPLE":
7141
- case "SIMPLES":
7142
- case "DTO": {
7143
- break;
7144
- }
7145
- case "DTOS": {
7146
- if (field.listMap) {
7147
- if (data[key]) {
7148
- params[key] = data[key].length === 0 ? null : this.convertArrayToListMap(data[key]);
7149
- }
7150
- } else {
7151
- if (data[key] !== void 0 && ignore === false) {
7152
- break;
7153
- }
7154
- if (!field.refAppDataEntityId) {
7155
- break;
7156
- }
7157
- let configs = uiDomain.getDERConfig(field.refAppDataEntityId);
7158
- const index = configs.findIndex(
7159
- (config) => config.majorDECodeName === this.entity.codeName
7160
- );
7161
- configs = configs.slice(index + 1);
7162
- const dto = await this.getFieldDto(context, field);
7163
- const filterParams = {};
7164
- if (field.refPickupAppDEFieldId) {
7165
- filterParams[field.refPickupAppDEFieldId] = data.srfkey;
7166
- }
7167
- configs.forEach((config) => {
7168
- filterParams[config.pickupDEFName.toLowerCase()] = null;
7169
- });
7170
- const items = await dto.select(context, filterParams);
7171
- if (items) {
7172
- const arr = [];
7173
- for (let j = 0; j < items.length; j++) {
7174
- arr.push(await dto.get(context, items[j], true));
7175
- }
7176
- params[key] = arr;
7177
- }
7178
- }
7179
- break;
7180
- }
7181
- default:
7182
- throw new ModelError7(
7183
- field,
7184
- "\u672A\u652F\u6301\u7684\u5E94\u7528\u5B9E\u4F53\u65B9\u6CD5\u8F93\u5165\u5C5E\u6027\u7C7B\u578B: ".concat(field.type)
7185
- );
7186
- }
7187
- }
7188
- return { ...data, ...params };
7189
- }
7190
- /**
7191
- * 设置本地 DTO 存储
7192
- *
7193
- * @author chitanda
7194
- * @date 2022-10-10 23:10:50
7195
- * @param {IContext} context
7196
- * @param {IData[]} data
7197
- * @return {*} {Promise<IDataEntity[]>}
7198
- */
7199
- async sets(context, data) {
7200
- if (this.isLocalMode && !this.inSelfLoop) {
7201
- this.service.local.clear();
7202
- }
7203
- await this.calcRs(context);
7204
- return Promise.all(
7205
- data.map(async (datum) => {
7206
- const all = this.fields.filter((field) => field.type === "DTOS").map(async (field) => {
7207
- const key = field.codeName.toLowerCase();
7208
- if (field.listMap && typeof datum[key] === "object") {
7209
- datum[key] = this.convertListMapToArray(datum[key]);
7210
- } else {
7211
- if (!field.refAppDataEntityId) {
7212
- return;
7213
- }
7214
- const dto = await this.getFieldDto(context, field);
7215
- const items = datum[key];
7216
- if (items) {
7217
- const pKey = datum[this.entity.keyAppDEFieldId];
7218
- items.forEach((item) => {
7219
- item[field.refPickupAppDEFieldId] = pKey;
7220
- });
7221
- await dto.sets(context, items);
7222
- } else {
7223
- await dto.sets(context, []);
7224
- }
7225
- }
7226
- });
7227
- for (let i = 0; i < all.length; i++) {
7228
- await all[i];
7229
- }
7230
- const entityData = this.service.createEntity(datum);
7231
- if (this.isLocalMode) {
7232
- await this.service.local.add(context, entityData);
7230
+ CoreConst.TOKEN_EXPIRES,
7231
+ "".concat(expiredDate),
7232
+ remember ? 7 : 0,
7233
+ true
7234
+ );
7233
7235
  }
7234
- return entityData;
7235
- })
7236
- );
7236
+ this.extendLogin();
7237
+ }, wait);
7238
+ }
7239
+ }
7240
+ getAuthInfo() {
7241
+ const token = getCookie(CoreConst.TOKEN);
7242
+ const isAnonymous = !!getCookie(CoreConst.IS_ANONYMOUS);
7243
+ return token ? {
7244
+ token,
7245
+ isAnonymous
7246
+ } : void 0;
7237
7247
  }
7248
+ };
7249
+
7250
+ // src/service/service/async-action/async-action.service.ts
7251
+ import { isNil as isNil9 } from "ramda";
7252
+ var AsyncActionService = class {
7238
7253
  /**
7239
- * 递归计算当前 DTO 相关实体的父关系配置
7240
- *
7241
- * @author chitanda
7242
- * @date 2023-12-26 16:12:13
7243
- * @protected
7244
- * @param {IContext} context
7245
- * @param {number} [depth=0] 递归层级,避免进入死循环。最大递归层级为 10
7246
- * @return {*} {Promise<void>}
7254
+ * 获取异步操作的集合
7255
+ * @author lxm
7256
+ * @date 2023-11-15 10:55:25
7257
+ * @param {IParams} [params={}]
7258
+ * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
7247
7259
  */
7248
- async calcRs(context, depth = 0) {
7249
- if (this.isCalcRs || depth > 10) {
7250
- return;
7251
- }
7252
- this.isCalcRs = true;
7253
- depth += 1;
7254
- const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
7255
- const dtoFields = this.fields.filter((field) => field.type === "DTOS");
7256
- for (let i = 0; i < dtoFields.length; i++) {
7257
- const field = dtoFields[i];
7258
- if (!field.refAppDataEntityId) {
7259
- continue;
7260
- }
7261
- const configs = uiDomain.getDERConfig(field.refAppDataEntityId);
7262
- const index = configs.findIndex(
7263
- (config) => config.pickupDEFName === field.refPickupAppDEFieldId
7264
- );
7265
- if (index === -1) {
7266
- const dto = await this.getFieldDto(context, field);
7267
- uiDomain.setDERConfig(field.refAppDataEntityId, {
7268
- majorDEName: this.entity.name,
7269
- majorDECodeName: this.entity.codeName,
7270
- majorDECodeName2: this.entity.codeName2,
7271
- minorDEName: dto.entity.name,
7272
- minorDECodeName: dto.entity.codeName,
7273
- minorDECodeName2: dto.entity.codeName2,
7274
- pickupDEFName: field.refPickupAppDEFieldId
7275
- });
7276
- await dto.calcRs(context, depth);
7277
- }
7260
+ async fetch(params = {}) {
7261
+ const res = await ibiz.net.post("/portal/asyncaction/all", params);
7262
+ if (isNil9(res.data)) {
7263
+ res.data = [];
7278
7264
  }
7265
+ return res;
7279
7266
  }
7280
7267
  /**
7281
- * 获取子属性 DTO
7282
- *
7283
- * @author chitanda
7284
- * @date 2023-12-22 13:12:06
7285
- * @protected
7286
- * @param {IContext} context
7287
- * @param {IAppDEMethodDTOField} field
7288
- * @return {*} {Promise<MethodDto>}
7268
+ * 获取单条异步操作
7269
+ * @author lxm
7270
+ * @date 2023-11-15 10:57:08
7271
+ * @param {string} actionID
7272
+ * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
7289
7273
  */
7290
- async getFieldDto(context, field) {
7291
- if (this.dtoMap.has(field.codeName)) {
7292
- return this.dtoMap.get(field.codeName);
7293
- }
7294
- const entity = await ibiz.hub.getAppDataEntity(
7295
- field.refAppDataEntityId,
7296
- this.entity.appId
7297
- );
7298
- const methodDto = findModelChild(
7299
- entity.appDEMethodDTOs || [],
7300
- field.refAppDEMethodDTOId
7301
- );
7302
- const inSelfLoop = this.entity.codeName === entity.codeName;
7303
- const service = await this.app.deService.getService(context, entity.id);
7304
- service.isLocalMode = true;
7305
- const dto = new _MethodDto(service, entity, true, methodDto, inSelfLoop);
7306
- this.dtoMap.set(field.codeName, dto);
7307
- return dto;
7274
+ async get(actionID) {
7275
+ const res = await ibiz.net.get("/portal/asyncaction/".concat(actionID));
7276
+ return res;
7308
7277
  }
7309
7278
  };
7310
7279
 
7280
+ // src/service/service/entity/method/de-action.ts
7281
+ import {
7282
+ HttpError as HttpError5,
7283
+ HttpResponse as HttpResponse3,
7284
+ RuntimeError as RuntimeError21,
7285
+ RuntimeModelError as RuntimeModelError21
7286
+ } from "@ibiz-template/core";
7287
+ import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
7288
+
7289
+ // src/service/service/entity/method/method.ts
7290
+ import { RuntimeModelError as RuntimeModelError10 } from "@ibiz-template/core";
7291
+
7311
7292
  // src/service/service/entity/method/method-input.ts
7312
7293
  var MethodInput = class {
7313
7294
  /**
@@ -7332,7 +7313,9 @@ var MethodInput = class {
7332
7313
  input.appDEMethodDTOId
7333
7314
  );
7334
7315
  if (methodDto) {
7335
- this.dto = new MethodDto(service, entity, this.isLocalMode, methodDto);
7316
+ this.dto = service.createMethodDto(methodDto, {
7317
+ isLocalMode: this.isLocalMode
7318
+ });
7336
7319
  }
7337
7320
  }
7338
7321
  }
@@ -7378,7 +7361,9 @@ var MethodReturn = class {
7378
7361
  output.appDEMethodDTOId
7379
7362
  );
7380
7363
  if (methodDto) {
7381
- this.dto = new MethodDto(service, entity, this.isLocalMode, methodDto);
7364
+ this.dto = service.createMethodDto(methodDto, {
7365
+ isLocalMode: this.isLocalMode
7366
+ });
7382
7367
  }
7383
7368
  }
7384
7369
  }
@@ -7468,17 +7453,17 @@ var Method = class {
7468
7453
  break;
7469
7454
  default:
7470
7455
  if (requestMethod) {
7471
- throw new RuntimeModelError9(
7456
+ throw new RuntimeModelError10(
7472
7457
  this.method,
7473
7458
  "\u672A\u652F\u6301\u7684\u8BF7\u6C42\u65B9\u5F0F: ".concat(requestMethod)
7474
7459
  );
7475
7460
  } else {
7476
- throw new RuntimeModelError9(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
7461
+ throw new RuntimeModelError10(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
7477
7462
  }
7478
7463
  }
7479
7464
  return res;
7480
7465
  }
7481
- throw new RuntimeModelError9(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
7466
+ throw new RuntimeModelError10(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
7482
7467
  }
7483
7468
  mergeRequestPath(path2, methodName) {
7484
7469
  return "".concat(path2, "/").concat(methodName);
@@ -7513,10 +7498,10 @@ var Method = class {
7513
7498
  // src/de-logic/index.ts
7514
7499
  import { HttpError as HttpError4, HttpResponse as HttpResponse2, RuntimeError as RuntimeError20 } from "@ibiz-template/core";
7515
7500
  import { isArray as isArray5 } from "lodash-es";
7516
- import { clone as clone12 } from "ramda";
7501
+ import { clone as clone13 } from "ramda";
7517
7502
 
7518
7503
  // src/de-logic/de-logic.ts
7519
- import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError19 } from "@ibiz-template/core";
7504
+ import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
7520
7505
 
7521
7506
  // src/de-logic/de-logic-context.ts
7522
7507
  import { isArray as isArray4 } from "lodash-es";
@@ -7648,17 +7633,17 @@ var DELogicContext = class {
7648
7633
  };
7649
7634
 
7650
7635
  // src/de-logic/de-logic-node/de-action-node/de-action-node.ts
7651
- import { RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
7636
+ import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
7652
7637
 
7653
7638
  // src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts
7654
- import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
7639
+ import { RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
7655
7640
 
7656
7641
  // src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts
7657
7642
  var DELogicLinkCond = class {
7658
7643
  };
7659
7644
 
7660
7645
  // src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts
7661
- import { ModelError as ModelError8, RuntimeModelError as RuntimeModelError10 } from "@ibiz-template/core";
7646
+ import { ModelError as ModelError8, RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
7662
7647
  var DELogicLinkSingleCond = class extends DELogicLinkCond {
7663
7648
  constructor(model) {
7664
7649
  super();
@@ -7705,7 +7690,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
7705
7690
  switch (this.type) {
7706
7691
  case "ENTITYFIELD": {
7707
7692
  if (!this.value) {
7708
- throw new RuntimeModelError10(
7693
+ throw new RuntimeModelError11(
7709
7694
  this.model,
7710
7695
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
7711
7696
  );
@@ -7715,7 +7700,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
7715
7700
  }
7716
7701
  case "SRCENTITYFIELD": {
7717
7702
  if (!this.value) {
7718
- throw new RuntimeModelError10(
7703
+ throw new RuntimeModelError11(
7719
7704
  this.model,
7720
7705
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
7721
7706
  );
@@ -7778,7 +7763,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
7778
7763
  test(ctx, context, data) {
7779
7764
  let bol = true;
7780
7765
  if (this.conds.length === 0) {
7781
- throw new RuntimeModelError11(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
7766
+ throw new RuntimeModelError12(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
7782
7767
  }
7783
7768
  for (let i = 0; i < this.conds.length; i++) {
7784
7769
  const cond = this.conds[i];
@@ -7881,10 +7866,10 @@ var DEActionNode = class extends DELogicNode {
7881
7866
  retDELogicParamId
7882
7867
  } = this.model;
7883
7868
  if (!dstAppDataEntityId) {
7884
- throw new RuntimeModelError12(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
7869
+ throw new RuntimeModelError13(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
7885
7870
  }
7886
7871
  if (!dstAppDEActionId) {
7887
- throw new RuntimeModelError12(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
7872
+ throw new RuntimeModelError13(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
7888
7873
  }
7889
7874
  const requestData = ctx.params[dstDELogicParamId];
7890
7875
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -7942,11 +7927,11 @@ var EndNode = class extends DELogicNode {
7942
7927
 
7943
7928
  // src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts
7944
7929
  import { ModelError as ModelError11 } from "@ibiz-template/core";
7945
- import { clone as clone9 } from "ramda";
7930
+ import { clone as clone10 } from "ramda";
7946
7931
 
7947
7932
  // src/de-logic/utils/handle-src-val.ts
7948
7933
  import { ModelError as ModelError10 } from "@ibiz-template/core";
7949
- import { clone as clone8 } from "ramda";
7934
+ import { clone as clone9 } from "ramda";
7950
7935
  function handleSrcVal(ctx, srcValParams) {
7951
7936
  const { srcDELogicParamId, srcFieldName, srcValue } = srcValParams;
7952
7937
  const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
@@ -7976,7 +7961,7 @@ function handleSrcVal(ctx, srcValParams) {
7976
7961
  value = ctx.parameters.context;
7977
7962
  break;
7978
7963
  case "ENVPARAM":
7979
- value = clone8(ibiz.env);
7964
+ value = clone9(ibiz.env);
7980
7965
  break;
7981
7966
  default:
7982
7967
  throw new ModelError10(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
@@ -8047,7 +8032,7 @@ var PrepareParamNode = class extends DELogicNode {
8047
8032
  copyParam(nodeParam, ctx) {
8048
8033
  const { dstDELogicParamId } = nodeParam;
8049
8034
  const srcVal = handleSrcVal(ctx, nodeParam);
8050
- ctx.params[dstDELogicParamId] = clone9(srcVal);
8035
+ ctx.params[dstDELogicParamId] = clone10(srcVal);
8051
8036
  }
8052
8037
  /**
8053
8038
  * 绑定参数
@@ -8168,12 +8153,12 @@ var DataSetNode = class extends DELogicNode {
8168
8153
  };
8169
8154
 
8170
8155
  // src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts
8171
- import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
8156
+ import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
8172
8157
  var BindParamNode = class extends DELogicNode {
8173
8158
  async exec(ctx) {
8174
8159
  const { dstDELogicParamId, srcDELogicParamId } = this.model;
8175
8160
  if (!dstDELogicParamId || !srcDELogicParamId) {
8176
- throw new RuntimeModelError13(
8161
+ throw new RuntimeModelError14(
8177
8162
  this.model,
8178
8163
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
8179
8164
  );
@@ -8184,53 +8169,53 @@ var BindParamNode = class extends DELogicNode {
8184
8169
  };
8185
8170
 
8186
8171
  // src/de-logic/de-logic-node/reset-param-node/reset-param-node.ts
8187
- import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
8172
+ import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
8188
8173
  var ResetParamNode = class extends DELogicNode {
8189
8174
  async exec(ctx) {
8190
8175
  const { dstDELogicParamId } = this.model;
8191
8176
  if (!dstDELogicParamId) {
8192
- throw new RuntimeModelError14(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8177
+ throw new RuntimeModelError15(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8193
8178
  }
8194
8179
  ctx.resetParam(dstDELogicParamId);
8195
8180
  }
8196
8181
  };
8197
8182
 
8198
8183
  // src/de-logic/de-logic-node/renew-param-node/renew-param-node.ts
8199
- import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
8184
+ import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
8200
8185
  var RenewParamNode = class extends DELogicNode {
8201
8186
  async exec(ctx) {
8202
8187
  const { dstDELogicParamId } = this.model;
8203
8188
  if (!dstDELogicParamId) {
8204
- throw new RuntimeModelError15(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8189
+ throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
8205
8190
  }
8206
8191
  ctx.renewParam(dstDELogicParamId);
8207
8192
  }
8208
8193
  };
8209
8194
 
8210
8195
  // src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
8211
- import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
8212
- import { clone as clone10 } from "ramda";
8196
+ import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
8197
+ import { clone as clone11 } from "ramda";
8213
8198
  var CopyParamNode = class extends DELogicNode {
8214
8199
  async exec(ctx) {
8215
8200
  const { dstDELogicParamId, srcDELogicParamId } = this.model;
8216
8201
  if (!dstDELogicParamId || !srcDELogicParamId) {
8217
- throw new RuntimeModelError16(
8202
+ throw new RuntimeModelError17(
8218
8203
  this.model,
8219
8204
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
8220
8205
  );
8221
8206
  }
8222
8207
  const srcVal = handleSrcVal(ctx, this.model);
8223
- ctx.params[dstDELogicParamId] = clone10(srcVal);
8208
+ ctx.params[dstDELogicParamId] = clone11(srcVal);
8224
8209
  }
8225
8210
  };
8226
8211
 
8227
8212
  // src/de-logic/de-logic-node/sort-param-node/sort-param-node.ts
8228
- import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
8213
+ import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
8229
8214
  var SortParamNode = class extends DELogicNode {
8230
8215
  async exec(ctx) {
8231
8216
  const { dstDELogicParamId, dstSortDir, dstFieldName } = this.model;
8232
8217
  if (!dstDELogicParamId || !dstFieldName) {
8233
- throw new RuntimeModelError17(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
8218
+ throw new RuntimeModelError18(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
8234
8219
  }
8235
8220
  const key = dstFieldName.toLowerCase();
8236
8221
  const arr = ctx.params[dstDELogicParamId];
@@ -8241,7 +8226,7 @@ var SortParamNode = class extends DELogicNode {
8241
8226
  };
8242
8227
 
8243
8228
  // src/de-logic/de-logic-node/append-param-node/append-param-node.ts
8244
- import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
8229
+ import { RuntimeModelError as RuntimeModelError19 } from "@ibiz-template/core";
8245
8230
  var AppendParamNode = class extends DELogicNode {
8246
8231
  async exec(ctx) {
8247
8232
  const {
@@ -8252,7 +8237,7 @@ var AppendParamNode = class extends DELogicNode {
8252
8237
  srcSize
8253
8238
  } = this.model;
8254
8239
  if (!dstDELogicParamId || !srcDELogicParamId) {
8255
- throw new RuntimeModelError18(
8240
+ throw new RuntimeModelError19(
8256
8241
  this.model,
8257
8242
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
8258
8243
  );
@@ -8286,7 +8271,7 @@ var ThrowExceptionNode = class extends DELogicNode {
8286
8271
 
8287
8272
  // src/de-logic/de-logic-param/de-logic-param.ts
8288
8273
  import { ModelError as ModelError12 } from "@ibiz-template/core";
8289
- import { clone as clone11 } from "ramda";
8274
+ import { clone as clone12 } from "ramda";
8290
8275
  var DELogicParam = class {
8291
8276
  /**
8292
8277
  * Creates an instance of DELogicParam.
@@ -8318,7 +8303,7 @@ var DELogicParam = class {
8318
8303
  ctx.params[tag] = ctx.data[0] || {};
8319
8304
  }
8320
8305
  } else if (m.appGlobalParam) {
8321
- ctx.params[tag] = clone11(ibiz.env);
8306
+ ctx.params[tag] = clone12(ibiz.env);
8322
8307
  } else if (m.entityListParam) {
8323
8308
  ctx.params[tag] = [];
8324
8309
  } else if (m.entityPageParam) {
@@ -8334,7 +8319,7 @@ var DELogicParam = class {
8334
8319
  } else if (m.simpleParam) {
8335
8320
  ctx.params[tag] = {};
8336
8321
  } else if (m.cloneParam) {
8337
- ctx.params[tag] = clone11(ctx.data || {});
8322
+ ctx.params[tag] = clone12(ctx.data || {});
8338
8323
  } else if (m.envParam) {
8339
8324
  throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF");
8340
8325
  } else if (m.fileListParam) {
@@ -8401,7 +8386,7 @@ var DELogic = class {
8401
8386
  var _a, _b;
8402
8387
  if (model.customCode) {
8403
8388
  if (!model.scriptCode) {
8404
- throw new RuntimeModelError19(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
8389
+ throw new RuntimeModelError20(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
8405
8390
  }
8406
8391
  this.scriptFn = ScriptFactory.createScriptFn([], model.scriptCode, {
8407
8392
  isAsync: true
@@ -8409,7 +8394,7 @@ var DELogic = class {
8409
8394
  return;
8410
8395
  }
8411
8396
  if (!((_a = model.delogicNodes) == null ? void 0 : _a.length)) {
8412
- throw new RuntimeModelError19(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
8397
+ throw new RuntimeModelError20(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
8413
8398
  }
8414
8399
  model.delogicNodes.forEach((node) => {
8415
8400
  const { logicNodeType } = node;
@@ -8508,7 +8493,7 @@ var DELogic = class {
8508
8493
  const start = this.nodes.get(startDELogicNodeId);
8509
8494
  await this.deepExec(start, ctx);
8510
8495
  } else {
8511
- throw new RuntimeModelError19(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
8496
+ throw new RuntimeModelError20(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
8512
8497
  }
8513
8498
  if (ctx.isEndNode) {
8514
8499
  return ctx.result;
@@ -8569,9 +8554,9 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
8569
8554
  return execDELogic(deLogic, context, data, params);
8570
8555
  }
8571
8556
  async function execDELogicAction(deDELogic, context, data, params) {
8572
- const _context = clone12(context);
8573
- const _data = data ? clone12(data) : data;
8574
- const _params = params ? clone12(params) : params;
8557
+ const _context = clone13(context);
8558
+ const _data = data ? clone13(data) : data;
8559
+ const _params = params ? clone13(params) : params;
8575
8560
  try {
8576
8561
  const result = await execDELogic(deDELogic, _context, _data, _params);
8577
8562
  return new HttpResponse2(result);
@@ -8633,7 +8618,7 @@ var DEActionMethod = class extends Method {
8633
8618
  if (this.method.actionType === "DELOGIC") {
8634
8619
  const deLogic = findDELogic(this.method.appDELogicId, this.entity);
8635
8620
  if (!deLogic) {
8636
- throw new RuntimeModelError20(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
8621
+ throw new RuntimeModelError21(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
8637
8622
  }
8638
8623
  return execDELogicAction(deLogic, context, data, params);
8639
8624
  }
@@ -8969,12 +8954,14 @@ var DEActionMethod = class extends Method {
8969
8954
  const configs = uiDomain.getDERConfig(this.entity.id);
8970
8955
  if (configs.length > 0) {
8971
8956
  configs.forEach((config) => {
8972
- const { majorDECodeName, pickupDEFName } = config;
8973
- const majorLowerCodeName = majorDECodeName.toLowerCase();
8974
- const pickupLowerDEFName = pickupDEFName.toLowerCase();
8975
- const majorkey = context[majorLowerCodeName];
8976
- if (majorkey && majorkey !== data.srfkey) {
8977
- data[pickupLowerDEFName] = majorkey;
8957
+ if (config.parentAppDEFieldId) {
8958
+ const { majorDECodeName, parentAppDEFieldId } = config;
8959
+ const majorLowerCodeName = majorDECodeName.toLowerCase();
8960
+ const pickupLowerDEFName = parentAppDEFieldId.toLowerCase();
8961
+ const majorkey = context[majorLowerCodeName];
8962
+ if (majorkey && majorkey !== data.srfkey) {
8963
+ data[pickupLowerDEFName] = majorkey;
8964
+ }
8978
8965
  }
8979
8966
  });
8980
8967
  }
@@ -8993,17 +8980,18 @@ var DeActionDeMethodProvider = class {
8993
8980
  import {
8994
8981
  HttpResponse as HttpResponse4,
8995
8982
  ModelError as ModelError14,
8996
- RuntimeModelError as RuntimeModelError21
8983
+ RuntimeModelError as RuntimeModelError22
8997
8984
  } from "@ibiz-template/core";
8998
8985
  import { isArray as isArray7 } from "lodash-es";
8999
- import { clone as clone13, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
9000
- import { ascSort as ascSort2, descSort } from "qx-util";
8986
+ import { clone as clone14, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
8987
+ import { ascSort, descSort } from "qx-util";
9001
8988
  var FetchMethod = class extends Method {
9002
8989
  async exec(context, params, params2) {
9003
8990
  const searchParams = params && !isArray7(params) ? params : params2 || {};
9004
8991
  if (this.isLocalMode) {
8992
+ const cond = DEDQCondUtil.getCond(this.method);
9005
8993
  const items2 = await this.searchLocal(
9006
- null,
8994
+ cond,
9007
8995
  new SearchFilter(context, searchParams)
9008
8996
  );
9009
8997
  return new HttpResponse4(items2, 200);
@@ -9051,29 +9039,25 @@ var FetchMethod = class extends Method {
9051
9039
  * @return {*} {Promise<IDataEntity[]>}
9052
9040
  */
9053
9041
  async searchLocal(cond, filter, queryParamKeys = this.entity.quickSearchAppDEFieldIds) {
9054
- let list = [];
9042
+ let list = this.service.local.getList();
9055
9043
  if (cond) {
9056
- list = this.service.local.getList();
9057
9044
  if (list.length > 0) {
9058
9045
  list = list.filter((obj) => cond.test(obj, filter));
9059
9046
  }
9060
- } else {
9061
- list = await this.service.local.select(filter.context, filter.data);
9062
- if (list.length > 0) {
9063
- if (filter.query && filter.query !== "") {
9064
- if (queryParamKeys) {
9065
- list = list.filter((obj) => {
9066
- const reg2 = new RegExp(filter.query);
9067
- for (let i = 0; i < queryParamKeys.length; i += 1) {
9068
- const key = queryParamKeys[i];
9069
- const val = obj[key];
9070
- if (reg2.test(val)) {
9071
- return true;
9072
- }
9047
+ } else if (list.length > 0) {
9048
+ if (filter.query && filter.query !== "") {
9049
+ if (queryParamKeys) {
9050
+ list = list.filter((obj) => {
9051
+ const reg2 = new RegExp(filter.query);
9052
+ for (let i = 0; i < queryParamKeys.length; i += 1) {
9053
+ const key = queryParamKeys[i];
9054
+ const val = obj[key];
9055
+ if (reg2.test(val)) {
9056
+ return true;
9073
9057
  }
9074
- return false;
9075
- });
9076
- }
9058
+ }
9059
+ return false;
9060
+ });
9077
9061
  }
9078
9062
  }
9079
9063
  }
@@ -9081,13 +9065,13 @@ var FetchMethod = class extends Method {
9081
9065
  if (filter.sortMode === "DESC") {
9082
9066
  list = descSort(list, filter.sortField);
9083
9067
  } else {
9084
- list = ascSort2(list, filter.sortField);
9068
+ list = ascSort(list, filter.sortField);
9085
9069
  }
9086
9070
  }
9087
9071
  const { page, size } = filter;
9088
9072
  const start = page * size;
9089
9073
  const end = (page + 1) * size - 1;
9090
- const items = list.slice(start, end).map((item) => clone13(item));
9074
+ const items = list.slice(start, end).map((item) => clone14(item));
9091
9075
  return items;
9092
9076
  }
9093
9077
  /**
@@ -9101,7 +9085,7 @@ var FetchMethod = class extends Method {
9101
9085
  async fetchCodeListSet(context, params) {
9102
9086
  const { appCodeListId } = this.method;
9103
9087
  if (!appCodeListId) {
9104
- throw new RuntimeModelError21(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
9088
+ throw new RuntimeModelError22(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
9105
9089
  }
9106
9090
  const codeItems = await this.app.codeList.get(
9107
9091
  appCodeListId,
@@ -9215,9 +9199,10 @@ var TreeCodeListNodeData = class extends TreeNodeData {
9215
9199
 
9216
9200
  // src/service/vo/tree-node-data/tree-data-set-node-data.ts
9217
9201
  import { updateKeyDefine } from "@ibiz-template/core";
9202
+ import { isNil as isNil12 } from "ramda";
9218
9203
  var TreeDataSetNodeData = class extends TreeNodeData {
9219
9204
  constructor(model, parentNodeData, opts) {
9220
- var _a;
9205
+ var _a, _b;
9221
9206
  super(model, parentNodeData, opts);
9222
9207
  const { data } = opts;
9223
9208
  this._deData = data;
@@ -9245,21 +9230,32 @@ var TreeDataSetNodeData = class extends TreeNodeData {
9245
9230
  const dataItemKeyMap = /* @__PURE__ */ new Map();
9246
9231
  dataItemKeyMap.set("srfkey", "srfkey");
9247
9232
  dataItemKeyMap.set("srfmajortext", "srfmajortext");
9248
- const dataItemDefaults = {};
9249
9233
  (_a = model.detreeNodeDataItems) == null ? void 0 : _a.forEach((dataItem) => {
9250
9234
  const uiKey = dataItem.id.toLowerCase();
9251
9235
  const deFieldKey = dataItem.appDEFieldId.toLowerCase();
9252
9236
  dataItemKeyMap.set(uiKey, deFieldKey);
9253
- if (dataItem.defaultValue) {
9254
- dataItemDefaults[uiKey] = dataItem.defaultValue;
9237
+ if (dataItem.defaultValue && isNil12(data[deFieldKey])) {
9238
+ data[deFieldKey] = dataItem.defaultValue;
9239
+ }
9240
+ });
9241
+ const nodeColumnKeyMap = /* @__PURE__ */ new Map();
9242
+ (_b = model.detreeNodeColumns) == null ? void 0 : _b.forEach((column) => {
9243
+ const columnKey = column.detreeColumnId;
9244
+ const dataItemKey = column.dataItemName;
9245
+ if (!columnKey || !dataItemKey) {
9246
+ ibiz.log.error("\u6A21\u578B\u5F02\u5E38\u7F3A\u5C11detreeColumnId\u6216\u8005dataItemName", column);
9247
+ } else {
9248
+ nodeColumnKeyMap.set(columnKey, dataItemKeyMap.get(dataItemKey));
9255
9249
  }
9256
9250
  });
9257
9251
  return new Proxy(this, {
9258
9252
  set(target, p, value) {
9259
- if (Object.prototype.hasOwnProperty.call(target._deData, p)) {
9260
- target._deData[p] = value;
9253
+ if (nodeColumnKeyMap.has(p)) {
9254
+ target._deData[nodeColumnKeyMap.get(p)] = value;
9261
9255
  } else if (dataItemKeyMap.has(p)) {
9262
9256
  target._deData[dataItemKeyMap.get(p)] = value;
9257
+ } else if (Object.prototype.hasOwnProperty.call(target._deData, p)) {
9258
+ target._deData[p] = value;
9263
9259
  } else {
9264
9260
  target[p] = value;
9265
9261
  }
@@ -9269,8 +9265,11 @@ var TreeDataSetNodeData = class extends TreeNodeData {
9269
9265
  if (target[p] !== void 0) {
9270
9266
  return target[p];
9271
9267
  }
9268
+ if (nodeColumnKeyMap.has(p)) {
9269
+ return target._deData[nodeColumnKeyMap.get(p)];
9270
+ }
9272
9271
  if (dataItemKeyMap.has(p)) {
9273
- return target._deData[dataItemKeyMap.get(p)] || dataItemDefaults[p];
9272
+ return target._deData[dataItemKeyMap.get(p)];
9274
9273
  }
9275
9274
  if (target._deData[p] !== void 0) {
9276
9275
  return target._deData[p];
@@ -9376,7 +9375,7 @@ var TreeStaticNodeData = class extends TreeNodeData {
9376
9375
 
9377
9376
  // src/service/vo/ui-map-field.ts
9378
9377
  import { DataTypes as DataTypes2 } from "@ibiz-template/core";
9379
- import { isNil as isNil12 } from "ramda";
9378
+ import { isNil as isNil13 } from "ramda";
9380
9379
  var UIMapField = class {
9381
9380
  constructor(uiKey, dataKey, opts = {}) {
9382
9381
  /**
@@ -9397,10 +9396,10 @@ var UIMapField = class {
9397
9396
  this.isRequestNeed = true;
9398
9397
  this.uiKey = uiKey;
9399
9398
  this.dataKey = dataKey;
9400
- if (!isNil12(opts.isOriginField)) {
9399
+ if (!isNil13(opts.isOriginField)) {
9401
9400
  this.isOriginField = opts.isOriginField;
9402
9401
  }
9403
- if (!isNil12(opts.dataType)) {
9402
+ if (!isNil13(opts.dataType)) {
9404
9403
  this.dataType = opts.dataType;
9405
9404
  }
9406
9405
  }
@@ -9415,7 +9414,7 @@ var UIMapField = class {
9415
9414
  return value;
9416
9415
  }
9417
9416
  if (DataTypes2.isNumber(this.dataType)) {
9418
- const numVal = !isNil12(value) && value !== "" ? Number(value) : value;
9417
+ const numVal = !isNil13(value) && value !== "" ? Number(value) : value;
9419
9418
  if (Number.isNaN(numVal)) {
9420
9419
  ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
9421
9420
  return value;
@@ -10062,7 +10061,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
10062
10061
  * @return {*} {(Promise<IModalData | void>)}
10063
10062
  */
10064
10063
  async exec(appViewId, _context, params = {}, opts = {}) {
10065
- const context = clone14(_context);
10064
+ const context = clone15(_context);
10066
10065
  const appView = await ibiz.hub.config.view.get(appViewId);
10067
10066
  if (!appView) {
10068
10067
  throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
@@ -10619,7 +10618,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
10619
10618
  // src/controller/common/view/view.controller.ts
10620
10619
  import { notNilEmpty as notNilEmpty6 } from "qx-util";
10621
10620
  import { IBizContext as IBizContext2, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
10622
- import { isEmpty as isEmpty8, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
10621
+ import { isEmpty as isEmpty8, isNil as isNil19, isNotNil as isNotNil2 } from "ramda";
10623
10622
 
10624
10623
  // src/controller/utils/loading/loading.state.ts
10625
10624
  import { NOOP } from "@ibiz-template/core";
@@ -11251,9 +11250,9 @@ function hasSubRoute(routeDepth) {
11251
11250
  }
11252
11251
 
11253
11252
  // src/controller/utils/util/util.ts
11254
- import { isNil as isNil13 } from "ramda";
11253
+ import { isNil as isNil14 } from "ramda";
11255
11254
  function isValueChange(value, value2) {
11256
- if ((isNil13(value) || value === "") && (isNil13(value2) || value2 === "")) {
11255
+ if ((isNil14(value) || value === "") && (isNil14(value2) || value2 === "")) {
11257
11256
  return false;
11258
11257
  }
11259
11258
  return value !== value2;
@@ -11269,7 +11268,7 @@ function getOriginData(data) {
11269
11268
  // src/controller/utils/value-rule/value-rule.ts
11270
11269
  import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
11271
11270
  import { isNilOrEmpty as isNilOrEmpty7, isNumber } from "qx-util";
11272
- import { isNil as isNil14 } from "ramda";
11271
+ import { isNil as isNil15 } from "ramda";
11273
11272
  function generateRules(itemVRs, name, valueItemName) {
11274
11273
  const rules = [];
11275
11274
  itemVRs.forEach((item) => {
@@ -11334,7 +11333,7 @@ function generateEditorRules(editor) {
11334
11333
  if (maxLength) {
11335
11334
  rules.push({
11336
11335
  validator: (rule, value, callback) => {
11337
- if (!isNil14(value) && value.length > maxLength) {
11336
+ if (!isNil15(value) && value.length > maxLength) {
11338
11337
  callback(
11339
11338
  new Error(
11340
11339
  "\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
@@ -11349,7 +11348,7 @@ function generateEditorRules(editor) {
11349
11348
  if (minLength) {
11350
11349
  rules.push({
11351
11350
  validator: (rule, value, callback) => {
11352
- if (!isNil14(value) && value.length < minLength) {
11351
+ if (!isNil15(value) && value.length < minLength) {
11353
11352
  callback(
11354
11353
  new Error(
11355
11354
  "\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
@@ -11361,10 +11360,10 @@ function generateEditorRules(editor) {
11361
11360
  }
11362
11361
  });
11363
11362
  }
11364
- if (!isNil14(maxValue)) {
11363
+ if (!isNil15(maxValue)) {
11365
11364
  rules.push({
11366
11365
  validator: (rule, value, callback) => {
11367
- if (!isNil14(value) && isNumber(value) && value > maxValue) {
11366
+ if (!isNil15(value) && isNumber(value) && value > maxValue) {
11368
11367
  callback(new Error("\u503C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxValue)));
11369
11368
  } else {
11370
11369
  return true;
@@ -11372,10 +11371,10 @@ function generateEditorRules(editor) {
11372
11371
  }
11373
11372
  });
11374
11373
  }
11375
- if (!isNil14(minValue)) {
11374
+ if (!isNil15(minValue)) {
11376
11375
  rules.push({
11377
11376
  validator: (rule, value, callback) => {
11378
- if (!isNil14(value) && isNumber(value) && value < minValue) {
11377
+ if (!isNil15(value) && isNumber(value) && value < minValue) {
11379
11378
  callback(new Error("\u503C\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minValue)));
11380
11379
  } else {
11381
11380
  return true;
@@ -11388,7 +11387,7 @@ function generateEditorRules(editor) {
11388
11387
 
11389
11388
  // src/controller/utils/value-ex/value-ex.ts
11390
11389
  import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
11391
- import { isNil as isNil15, mergeLeft } from "ramda";
11390
+ import { isNil as isNil16, mergeLeft } from "ramda";
11392
11391
  var ValueExUtil = class {
11393
11392
  /**
11394
11393
  * 合并默认值
@@ -11413,7 +11412,7 @@ var ValueExUtil = class {
11413
11412
  * @return {*} {string}
11414
11413
  */
11415
11414
  static toText(options, value) {
11416
- if (isNil15(value) || value === "") {
11415
+ if (isNil16(value) || value === "") {
11417
11416
  return "";
11418
11417
  }
11419
11418
  const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
@@ -11438,12 +11437,12 @@ var ValueExUtil = class {
11438
11437
  import { RuntimeError as RuntimeError29, ModelError as ModelError17 } from "@ibiz-template/core";
11439
11438
  import dayjs from "dayjs";
11440
11439
  import { createUUID as createUUID8 } from "qx-util";
11441
- import { isNil as isNil16, isNotNil } from "ramda";
11440
+ import { isNil as isNil17, isNotNil } from "ramda";
11442
11441
  function getDefaultValue(opts, origins) {
11443
11442
  var _a;
11444
11443
  const { name, valueType, defaultValue, valueFormat } = opts;
11445
11444
  const { data, context, params } = origins;
11446
- if (isNil16(valueType) && isNil16(defaultValue)) {
11445
+ if (isNil17(valueType) && isNil17(defaultValue)) {
11447
11446
  return;
11448
11447
  }
11449
11448
  if (valueType === "RESET") {
@@ -11793,8 +11792,8 @@ var BaseController = class {
11793
11792
  };
11794
11793
 
11795
11794
  // src/controller/utils/view-msg/view-msg-controller.ts
11796
- import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError22 } from "@ibiz-template/core";
11797
- import { isNil as isNil17, mergeRight as mergeRight2 } from "ramda";
11795
+ import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError23 } from "@ibiz-template/core";
11796
+ import { isNil as isNil18, mergeRight as mergeRight2 } from "ramda";
11798
11797
  var ViewMsgController = class _ViewMsgController {
11799
11798
  constructor(msgGroupId) {
11800
11799
  this.msgGroupId = msgGroupId;
@@ -11858,7 +11857,7 @@ var ViewMsgController = class _ViewMsgController {
11858
11857
  static async fetchDataSet(msgModel, context, params) {
11859
11858
  const { appDataEntityId, appDEDataSetId } = msgModel;
11860
11859
  if (!appDEDataSetId) {
11861
- throw new RuntimeModelError22(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
11860
+ throw new RuntimeModelError23(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
11862
11861
  }
11863
11862
  const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
11864
11863
  if (res.data.length) {
@@ -11952,7 +11951,7 @@ var ViewMsgController = class _ViewMsgController {
11952
11951
  msgPosAppDEFieldId
11953
11952
  } = msgModel;
11954
11953
  if (!appDataEntityId) {
11955
- throw new RuntimeModelError22(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
11954
+ throw new RuntimeModelError23(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
11956
11955
  }
11957
11956
  const entity = await ibiz.hub.getAppDataEntity(
11958
11957
  appDataEntityId,
@@ -11979,19 +11978,19 @@ var ViewMsgController = class _ViewMsgController {
11979
11978
  const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
11980
11979
  const deViewMessages = dataSet.map((item) => {
11981
11980
  const message = {};
11982
- if (positionField && !isNil17(item[positionField])) {
11981
+ if (positionField && !isNil18(item[positionField])) {
11983
11982
  message.position = item[positionField];
11984
11983
  }
11985
- if (titleField && !isNil17(item[titleField])) {
11984
+ if (titleField && !isNil18(item[titleField])) {
11986
11985
  message.title = item[titleField];
11987
11986
  }
11988
- if (messageField && !isNil17(item[messageField])) {
11987
+ if (messageField && !isNil18(item[messageField])) {
11989
11988
  message.message = item[messageField];
11990
11989
  }
11991
- if (typeField && !isNil17(item[typeField])) {
11990
+ if (typeField && !isNil18(item[typeField])) {
11992
11991
  message.messageType = item[typeField];
11993
11992
  }
11994
- if (removeModeField && !isNil17(item[removeModeField])) {
11993
+ if (removeModeField && !isNil18(item[removeModeField])) {
11995
11994
  message.removeMode = item[removeModeField];
11996
11995
  }
11997
11996
  return mergeRight2(basicMsg, message);
@@ -12228,7 +12227,7 @@ var ViewController = class extends BaseController {
12228
12227
  */
12229
12228
  handleContextParams() {
12230
12229
  this.context.srfappid = this.model.appId;
12231
- if (isNil18(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
12230
+ if (isNil19(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
12232
12231
  const domain = ibiz.uiDomainManager.create(this.id);
12233
12232
  this.context.srfsessionid = domain.id;
12234
12233
  }
@@ -12532,7 +12531,7 @@ var EditorController = class {
12532
12531
  };
12533
12532
 
12534
12533
  // src/controller/common/editor/code-list-editor.controller.ts
12535
- import { RuntimeModelError as RuntimeModelError23 } from "@ibiz-template/core";
12534
+ import { RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
12536
12535
  var CodeListEditorController = class extends EditorController {
12537
12536
  /**
12538
12537
  * 加载代码表数据
@@ -12556,7 +12555,7 @@ var CodeListEditorController = class extends EditorController {
12556
12555
  );
12557
12556
  return dataItems;
12558
12557
  }
12559
- throw new RuntimeModelError23(
12558
+ throw new RuntimeModelError24(
12560
12559
  this.model,
12561
12560
  "\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
12562
12561
  );
@@ -12565,7 +12564,7 @@ var CodeListEditorController = class extends EditorController {
12565
12564
 
12566
12565
  // src/controller/common/control/control.controller.ts
12567
12566
  import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
12568
- import { clone as clone15, isNil as isNil19 } from "ramda";
12567
+ import { clone as clone16, isNil as isNil20 } from "ramda";
12569
12568
  import { notNilEmpty as notNilEmpty7 } from "qx-util";
12570
12569
  var ControlController = class extends BaseController {
12571
12570
  /**
@@ -12607,7 +12606,7 @@ var ControlController = class extends BaseController {
12607
12606
  "".concat(model.controlType, "_DEFAULT")
12608
12607
  );
12609
12608
  if (panelModel) {
12610
- this.controlPanel = clone15(panelModel);
12609
+ this.controlPanel = clone16(panelModel);
12611
12610
  }
12612
12611
  }
12613
12612
  this.updateContextParams({});
@@ -12853,7 +12852,7 @@ var ControlController = class extends BaseController {
12853
12852
  let message;
12854
12853
  let duration;
12855
12854
  if (msgItem && msgItem.content) {
12856
- duration = isNil19(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
12855
+ duration = isNil20(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
12857
12856
  const scriptParams = { ...this.getEventArgs() };
12858
12857
  if (opts == null ? void 0 : opts.data) {
12859
12858
  scriptParams.data = opts.data;
@@ -13359,7 +13358,7 @@ var MDControlController = class extends ControlController {
13359
13358
  import {
13360
13359
  findRecursiveChild,
13361
13360
  RuntimeError as RuntimeError34,
13362
- RuntimeModelError as RuntimeModelError24
13361
+ RuntimeModelError as RuntimeModelError25
13363
13362
  } from "@ibiz-template/core";
13364
13363
  var AppMenuController = class extends ControlController {
13365
13364
  constructor(model, context, params, ctx) {
@@ -13438,7 +13437,7 @@ var AppMenuController = class extends ControlController {
13438
13437
  return provider.onClick(menuItem, event, this);
13439
13438
  }
13440
13439
  if (!menuItem.appFuncId) {
13441
- throw new RuntimeModelError24(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13440
+ throw new RuntimeModelError25(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13442
13441
  }
13443
13442
  const tempContext = this.context.clone();
13444
13443
  tempContext.srfappid = menuItem.appId;
@@ -13557,7 +13556,7 @@ var AppMenuController = class extends ControlController {
13557
13556
  import {
13558
13557
  findRecursiveChild as findRecursiveChild2,
13559
13558
  RuntimeError as RuntimeError35,
13560
- RuntimeModelError as RuntimeModelError25
13559
+ RuntimeModelError as RuntimeModelError26
13561
13560
  } from "@ibiz-template/core";
13562
13561
  var AppMenuIconViewController = class extends AppMenuController {
13563
13562
  async onClickMenuItem(id, event) {
@@ -13573,7 +13572,7 @@ var AppMenuIconViewController = class extends AppMenuController {
13573
13572
  event
13574
13573
  });
13575
13574
  if (!menuItem.appFuncId) {
13576
- throw new RuntimeModelError25(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13575
+ throw new RuntimeModelError26(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
13577
13576
  }
13578
13577
  const tempContext = this.context.clone();
13579
13578
  if (this.routeDepth === 1) {
@@ -13869,17 +13868,17 @@ import { mergeDeepRight as mergeDeepRight3 } from "ramda";
13869
13868
  import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
13870
13869
 
13871
13870
  // src/controller/control/chart/generator/line-series-generator.ts
13872
- import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
13871
+ import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
13873
13872
 
13874
13873
  // src/controller/control/chart/generator/base-series-generator.ts
13875
- import { plus, RuntimeModelError as RuntimeModelError26, toNumberOrNil } from "@ibiz-template/core";
13874
+ import { plus, RuntimeModelError as RuntimeModelError27, toNumberOrNil } from "@ibiz-template/core";
13876
13875
  import dayjs3 from "dayjs";
13877
13876
  import minMax from "dayjs/plugin/minMax";
13878
13877
  import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
13879
13878
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
13880
13879
  import weekOfYear from "dayjs/plugin/weekOfYear";
13881
13880
  import isoWeek from "dayjs/plugin/isoWeek";
13882
- import { clone as clone16, isNil as isNil20, mergeDeepRight } from "ramda";
13881
+ import { clone as clone17, isNil as isNil21, mergeDeepRight } from "ramda";
13883
13882
  dayjs3.extend(minMax);
13884
13883
  dayjs3.extend(isSameOrBefore);
13885
13884
  dayjs3.extend(quarterOfYear);
@@ -13922,10 +13921,10 @@ var BaseSeriesGenerator = class {
13922
13921
  this.chartGenerator = chartGenerator;
13923
13922
  const { chartSeriesEncode, caption, id, userParam } = model;
13924
13923
  if (!model.catalogField) {
13925
- throw new RuntimeModelError26(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
13924
+ throw new RuntimeModelError27(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
13926
13925
  }
13927
13926
  if (!model.valueField) {
13928
- throw new RuntimeModelError26(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
13927
+ throw new RuntimeModelError27(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
13929
13928
  }
13930
13929
  this.catalogField = chartGenerator.getFieldKey(model.catalogField);
13931
13930
  this.valueField = chartGenerator.getFieldKey(model.valueField);
@@ -13975,10 +13974,10 @@ var BaseSeriesGenerator = class {
13975
13974
  * @return {*} {(string | undefined)}
13976
13975
  */
13977
13976
  translateVal(codeListKey, val, isExclude = false) {
13978
- if (isNil20(val)) {
13977
+ if (isNil21(val)) {
13979
13978
  return void 0;
13980
13979
  }
13981
- if (isNil20(codeListKey)) {
13980
+ if (isNil21(codeListKey)) {
13982
13981
  return val;
13983
13982
  }
13984
13983
  const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
@@ -14027,7 +14026,7 @@ var BaseSeriesGenerator = class {
14027
14026
  seriesCodeListId,
14028
14027
  item[this.groupField]
14029
14028
  );
14030
- if (isNil20(groupVal)) {
14029
+ if (isNil21(groupVal)) {
14031
14030
  return;
14032
14031
  }
14033
14032
  group = groupVal;
@@ -14154,7 +14153,7 @@ var BaseSeriesGenerator = class {
14154
14153
  dataPreprocess(data) {
14155
14154
  const tempData = [];
14156
14155
  data.forEach((singleData) => {
14157
- tempData.push(clone16(singleData));
14156
+ tempData.push(clone17(singleData));
14158
14157
  });
14159
14158
  const { groupMode } = this.model;
14160
14159
  if (groupMode) {
@@ -14348,10 +14347,10 @@ var BaseSeriesGenerator = class {
14348
14347
  var LineSeriesGenerator = class extends BaseSeriesGenerator {
14349
14348
  calcStaticOptions() {
14350
14349
  if (this.xAxisIndex === void 0) {
14351
- throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14350
+ throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14352
14351
  }
14353
14352
  if (this.yAxisIndex === void 0) {
14354
- throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14353
+ throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14355
14354
  }
14356
14355
  const options = super.calcStaticOptions();
14357
14356
  options.xAxisIndex = this.xAxisIndex;
@@ -14367,14 +14366,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
14367
14366
  };
14368
14367
 
14369
14368
  // src/controller/control/chart/generator/bar-series-generator.ts
14370
- import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
14369
+ import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
14371
14370
  var BarSeriesGenerator = class extends BaseSeriesGenerator {
14372
14371
  calcStaticOptions() {
14373
14372
  if (this.xAxisIndex === void 0) {
14374
- throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14373
+ throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14375
14374
  }
14376
14375
  if (this.yAxisIndex === void 0) {
14377
- throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14376
+ throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14378
14377
  }
14379
14378
  const options = super.calcStaticOptions();
14380
14379
  options.xAxisIndex = this.xAxisIndex;
@@ -14427,14 +14426,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
14427
14426
  };
14428
14427
 
14429
14428
  // src/controller/control/chart/generator/scatter-series-generator.ts
14430
- import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
14429
+ import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
14431
14430
  var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
14432
14431
  calcStaticOptions() {
14433
14432
  if (this.xAxisIndex === void 0) {
14434
- throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14433
+ throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
14435
14434
  }
14436
14435
  if (this.yAxisIndex === void 0) {
14437
- throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14436
+ throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
14438
14437
  }
14439
14438
  const options = super.calcStaticOptions();
14440
14439
  options.xAxisIndex = this.xAxisIndex;
@@ -15032,17 +15031,17 @@ var CaptionBarController = class extends ControlController {
15032
15031
  import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError47 } from "@ibiz-template/core";
15033
15032
 
15034
15033
  // src/ui-action/provider/backend-ui-action-provider.ts
15035
- import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
15034
+ import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
15036
15035
  import { isArray as isArray8 } from "qx-util";
15037
15036
 
15038
15037
  // src/ui-action/provider/ui-action-provider-base.ts
15039
- import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
15038
+ import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
15040
15039
 
15041
15040
  // src/ui-logic/index.ts
15042
15041
  import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
15043
15042
 
15044
15043
  // src/ui-logic/ui-logic.ts
15045
- import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
15044
+ import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
15046
15045
 
15047
15046
  // src/ui-logic/ui-logic-context.ts
15048
15047
  var UILogicContext = class {
@@ -15188,24 +15187,24 @@ var UILogicContext = class {
15188
15187
  };
15189
15188
 
15190
15189
  // src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
15191
- import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
15190
+ import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
15192
15191
 
15193
15192
  // src/ui-logic/ui-logic-link/ui-logic-link.ts
15194
15193
  import { ModelError as ModelError20 } from "@ibiz-template/core";
15195
15194
 
15196
15195
  // src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
15197
- import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
15196
+ import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
15198
15197
 
15199
15198
  // src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
15200
15199
  var UILogicLinkCond = class {
15201
15200
  };
15202
15201
 
15203
15202
  // src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
15204
- import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
15203
+ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
15205
15204
 
15206
15205
  // src/ui-logic/utils/handle-src-val.ts
15207
15206
  import { ModelError as ModelError18 } from "@ibiz-template/core";
15208
- import { clone as clone17 } from "ramda";
15207
+ import { clone as clone18 } from "ramda";
15209
15208
  function handleSrcVal2(ctx, srcValParams) {
15210
15209
  const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
15211
15210
  const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
@@ -15232,7 +15231,7 @@ function handleSrcVal2(ctx, srcValParams) {
15232
15231
  value = ctx.parameters.context;
15233
15232
  break;
15234
15233
  case "ENVPARAM":
15235
- value = clone17(ibiz.env);
15234
+ value = clone18(ibiz.env);
15236
15235
  break;
15237
15236
  default:
15238
15237
  throw new ModelError18(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
@@ -15297,7 +15296,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
15297
15296
  switch (this.type) {
15298
15297
  case "ENTITYFIELD": {
15299
15298
  if (!this.value) {
15300
- throw new RuntimeModelError30(
15299
+ throw new RuntimeModelError31(
15301
15300
  this.model,
15302
15301
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
15303
15302
  );
@@ -15307,7 +15306,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
15307
15306
  }
15308
15307
  case "SRCENTITYFIELD": {
15309
15308
  if (!this.value) {
15310
- throw new RuntimeModelError30(
15309
+ throw new RuntimeModelError31(
15311
15310
  this.model,
15312
15311
  "\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
15313
15312
  );
@@ -15373,7 +15372,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
15373
15372
  test(ctx, context, data) {
15374
15373
  let bol = true;
15375
15374
  if (this.conds.length === 0) {
15376
- throw new RuntimeModelError31(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
15375
+ throw new RuntimeModelError32(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
15377
15376
  }
15378
15377
  for (let i = 0; i < this.conds.length; i++) {
15379
15378
  const cond = this.conds[i];
@@ -15499,10 +15498,10 @@ var DEActionNode2 = class extends UILogicNode {
15499
15498
  retDEUILogicParamId
15500
15499
  } = this.model;
15501
15500
  if (!dstAppDataEntityId) {
15502
- throw new RuntimeModelError32(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
15501
+ throw new RuntimeModelError33(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
15503
15502
  }
15504
15503
  if (!dstAppDEActionId) {
15505
- throw new RuntimeModelError32(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
15504
+ throw new RuntimeModelError33(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
15506
15505
  }
15507
15506
  const requestData = ctx.params[dstDEUILogicParamId];
15508
15507
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -15520,13 +15519,13 @@ var DEActionNode2 = class extends UILogicNode {
15520
15519
  };
15521
15520
 
15522
15521
  // src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
15523
- import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
15522
+ import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
15524
15523
  var DEUIActionNode = class extends UILogicNode {
15525
15524
  async exec(ctx) {
15526
15525
  const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
15527
15526
  const { data, parameters } = ctx;
15528
15527
  if (!dstAppDEUIActionId) {
15529
- throw new RuntimeModelError33(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
15528
+ throw new RuntimeModelError34(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
15530
15529
  }
15531
15530
  let actionData = [data];
15532
15531
  if (dstDEUILogicParamId) {
@@ -15591,7 +15590,7 @@ var EndNode2 = class extends UILogicNode {
15591
15590
 
15592
15591
  // src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
15593
15592
  import { ModelError as ModelError22, RuntimeError as RuntimeError39 } from "@ibiz-template/core";
15594
- import { clone as clone18 } from "ramda";
15593
+ import { clone as clone19 } from "ramda";
15595
15594
  var PrepareJSParamNode = class extends UILogicNode {
15596
15595
  async exec(ctx) {
15597
15596
  const nodeParams = this.model.deuilogicNodeParams;
@@ -15680,7 +15679,7 @@ var PrepareJSParamNode = class extends UILogicNode {
15680
15679
  copyParam(nodeParam, ctx) {
15681
15680
  const { dstDEUILogicParamId } = nodeParam;
15682
15681
  const srcVal = handleSrcVal2(ctx, nodeParam);
15683
- ctx.params[dstDEUILogicParamId] = clone18(srcVal);
15682
+ ctx.params[dstDEUILogicParamId] = clone19(srcVal);
15684
15683
  }
15685
15684
  /**
15686
15685
  * 绑定参数
@@ -15757,20 +15756,20 @@ var PrepareJSParamNode = class extends UILogicNode {
15757
15756
  };
15758
15757
 
15759
15758
  // src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
15760
- import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
15759
+ import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
15761
15760
  import { isFunction } from "lodash-es";
15762
15761
  var ViewCtrlInvokeNode = class extends UILogicNode {
15763
15762
  async exec(ctx) {
15764
15763
  ctx.isEndNode = true;
15765
15764
  const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
15766
15765
  if (!invokeCtrlId) {
15767
- throw new RuntimeModelError34(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
15766
+ throw new RuntimeModelError35(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
15768
15767
  }
15769
15768
  if (!invokeParamId) {
15770
- throw new RuntimeModelError34(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
15769
+ throw new RuntimeModelError35(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
15771
15770
  }
15772
15771
  if (!invokeMethod) {
15773
- throw new RuntimeModelError34(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
15772
+ throw new RuntimeModelError35(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
15774
15773
  }
15775
15774
  const invokeParam = ctx.params[invokeParamId];
15776
15775
  if (!invokeParam) {
@@ -15788,12 +15787,12 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
15788
15787
  };
15789
15788
 
15790
15789
  // src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
15791
- import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
15790
+ import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
15792
15791
  var BindParamNode2 = class extends UILogicNode {
15793
15792
  async exec(ctx) {
15794
15793
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
15795
15794
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
15796
- throw new RuntimeModelError35(
15795
+ throw new RuntimeModelError36(
15797
15796
  this.model,
15798
15797
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
15799
15798
  );
@@ -15804,7 +15803,7 @@ var BindParamNode2 = class extends UILogicNode {
15804
15803
  };
15805
15804
 
15806
15805
  // src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
15807
- import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
15806
+ import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
15808
15807
  var MsgBoxNode = class extends UILogicNode {
15809
15808
  constructor() {
15810
15809
  super(...arguments);
@@ -15818,10 +15817,10 @@ var MsgBoxNode = class extends UILogicNode {
15818
15817
  async exec(ctx) {
15819
15818
  const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
15820
15819
  if (!msgBoxType) {
15821
- throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
15820
+ throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
15822
15821
  }
15823
15822
  if (!buttonsType) {
15824
- throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
15823
+ throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
15825
15824
  }
15826
15825
  let { title } = this.model;
15827
15826
  let { message } = this.model;
@@ -15881,12 +15880,12 @@ var PFPluginNode = class extends UILogicNode {
15881
15880
  };
15882
15881
 
15883
15882
  // src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
15884
- import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
15883
+ import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
15885
15884
  var DebugParamNode = class extends UILogicNode {
15886
15885
  async exec(ctx) {
15887
15886
  const { dstDEUILogicParamId, name } = this.model;
15888
15887
  if (!dstDEUILogicParamId) {
15889
- throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15888
+ throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15890
15889
  }
15891
15890
  const param = ctx.params[dstDEUILogicParamId];
15892
15891
  console.log("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
@@ -15894,36 +15893,36 @@ var DebugParamNode = class extends UILogicNode {
15894
15893
  };
15895
15894
 
15896
15895
  // src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
15897
- import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
15896
+ import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
15898
15897
  var ResetParamNode2 = class extends UILogicNode {
15899
15898
  async exec(ctx) {
15900
15899
  const { dstDEUILogicParamId } = this.model;
15901
15900
  if (!dstDEUILogicParamId) {
15902
- throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15901
+ throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15903
15902
  }
15904
15903
  ctx.resetParam(dstDEUILogicParamId);
15905
15904
  }
15906
15905
  };
15907
15906
 
15908
15907
  // src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
15909
- import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
15910
- import { clone as clone19 } from "ramda";
15908
+ import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
15909
+ import { clone as clone20 } from "ramda";
15911
15910
  var CopyParamNode2 = class extends UILogicNode {
15912
15911
  async exec(ctx) {
15913
15912
  const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
15914
15913
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
15915
- throw new RuntimeModelError39(
15914
+ throw new RuntimeModelError40(
15916
15915
  this.model,
15917
15916
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
15918
15917
  );
15919
15918
  }
15920
15919
  const srcVal = handleSrcVal2(ctx, this.model);
15921
- ctx.params[dstDEUILogicParamId] = clone19(srcVal);
15920
+ ctx.params[dstDEUILogicParamId] = clone20(srcVal);
15922
15921
  }
15923
15922
  };
15924
15923
 
15925
15924
  // src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
15926
- import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
15925
+ import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
15927
15926
  var AppendParamNode2 = class extends UILogicNode {
15928
15927
  async exec(ctx) {
15929
15928
  const {
@@ -15934,7 +15933,7 @@ var AppendParamNode2 = class extends UILogicNode {
15934
15933
  srcSize
15935
15934
  } = this.model;
15936
15935
  if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
15937
- throw new RuntimeModelError40(
15936
+ throw new RuntimeModelError41(
15938
15937
  this.model,
15939
15938
  "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
15940
15939
  );
@@ -15952,12 +15951,12 @@ var AppendParamNode2 = class extends UILogicNode {
15952
15951
  };
15953
15952
 
15954
15953
  // src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
15955
- import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
15954
+ import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
15956
15955
  var SortParamNode2 = class extends UILogicNode {
15957
15956
  async exec(ctx) {
15958
15957
  const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
15959
15958
  if (!dstDEUILogicParamId || !dstFieldName) {
15960
- throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
15959
+ throw new RuntimeModelError42(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
15961
15960
  }
15962
15961
  const key = dstFieldName;
15963
15962
  const arr = ctx.params[dstDEUILogicParamId];
@@ -15968,19 +15967,19 @@ var SortParamNode2 = class extends UILogicNode {
15968
15967
  };
15969
15968
 
15970
15969
  // src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
15971
- import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
15970
+ import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
15972
15971
  var RenewParamNode2 = class extends UILogicNode {
15973
15972
  async exec(ctx) {
15974
15973
  const { dstDEUILogicParamId } = this.model;
15975
15974
  if (!dstDEUILogicParamId) {
15976
- throw new RuntimeModelError42(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15975
+ throw new RuntimeModelError43(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
15977
15976
  }
15978
15977
  ctx.renewParam(dstDEUILogicParamId);
15979
15978
  }
15980
15979
  };
15981
15980
 
15982
15981
  // src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
15983
- import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
15982
+ import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
15984
15983
  var DataSetNode2 = class extends UILogicNode {
15985
15984
  async exec(ctx) {
15986
15985
  const {
@@ -15990,7 +15989,7 @@ var DataSetNode2 = class extends UILogicNode {
15990
15989
  retDEUILogicParamId
15991
15990
  } = this.model;
15992
15991
  if (!dstDEUILogicParamId) {
15993
- throw new RuntimeModelError43(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
15992
+ throw new RuntimeModelError44(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
15994
15993
  }
15995
15994
  const queryParams = ctx.params[dstDEUILogicParamId];
15996
15995
  const app = ibiz.hub.getApp(ctx.context.srfappid);
@@ -16016,19 +16015,19 @@ var ThrowExceptionNode2 = class extends UILogicNode {
16016
16015
  };
16017
16016
 
16018
16017
  // src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
16019
- import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
16018
+ import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
16020
16019
  var ViewCtrlFireEventNode = class extends UILogicNode {
16021
16020
  async exec(ctx) {
16022
16021
  ctx.isEndNode = true;
16023
16022
  const { eventName, eventParamId, fireCtrlId } = this.model;
16024
16023
  if (!fireCtrlId) {
16025
- throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
16024
+ throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
16026
16025
  }
16027
16026
  if (!eventName) {
16028
- throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
16027
+ throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
16029
16028
  }
16030
16029
  if (!eventParamId) {
16031
- throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
16030
+ throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
16032
16031
  }
16033
16032
  const invokeCtrl = ctx.params[fireCtrlId];
16034
16033
  if (!invokeCtrl) {
@@ -16043,7 +16042,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
16043
16042
  };
16044
16043
 
16045
16044
  // src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
16046
- import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
16045
+ import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
16047
16046
  var ExecuteDELogicNode = class extends UILogicNode {
16048
16047
  async exec(ctx) {
16049
16048
  const {
@@ -16053,13 +16052,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
16053
16052
  retDEUILogicParamId
16054
16053
  } = this.model;
16055
16054
  if (!dstAppDataEntityId) {
16056
- throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
16055
+ throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
16057
16056
  }
16058
16057
  if (!dstAppDELogicId) {
16059
- throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
16058
+ throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
16060
16059
  }
16061
16060
  if (!dstDEUILogicParamId) {
16062
- throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
16061
+ throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
16063
16062
  }
16064
16063
  const dstParam = ctx.params[dstDEUILogicParamId];
16065
16064
  if (!dstParam) {
@@ -16221,7 +16220,7 @@ var UILogic = class {
16221
16220
  this.params = /* @__PURE__ */ new Map();
16222
16221
  var _a;
16223
16222
  if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
16224
- throw new RuntimeModelError46(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
16223
+ throw new RuntimeModelError47(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
16225
16224
  }
16226
16225
  model.deuilogicNodes.forEach((node) => {
16227
16226
  const { logicNodeType } = node;
@@ -16341,7 +16340,7 @@ var UILogic = class {
16341
16340
  const start = this.nodes.get(startDEUILogicNodeId);
16342
16341
  await this.deepExec(start, ctx);
16343
16342
  } else {
16344
- throw new RuntimeModelError46(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
16343
+ throw new RuntimeModelError47(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
16345
16344
  }
16346
16345
  if (ctx.isEndNode) {
16347
16346
  return ctx.result;
@@ -16476,7 +16475,7 @@ var UIActionProviderBase = class {
16476
16475
  const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
16477
16476
  if (uilogicAttachMode === "REPLACE") {
16478
16477
  if (!appDEUILogicId) {
16479
- throw new RuntimeModelError47(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16478
+ throw new RuntimeModelError48(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16480
16479
  }
16481
16480
  await execUILogic(appDEUILogicId, appDataEntityId, args);
16482
16481
  return result;
@@ -16491,7 +16490,7 @@ var UIActionProviderBase = class {
16491
16490
  }
16492
16491
  if (action.uilogicAttachMode === "AFTER") {
16493
16492
  if (!appDEUILogicId) {
16494
- throw new RuntimeModelError47(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16493
+ throw new RuntimeModelError48(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
16495
16494
  }
16496
16495
  await execUILogic(
16497
16496
  appDEUILogicId,
@@ -16716,7 +16715,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
16716
16715
  const entityName = action.appDataEntityId;
16717
16716
  const methodName = action.appDEMethodId;
16718
16717
  if (!entityName || !methodName) {
16719
- throw new RuntimeModelError48(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
16718
+ throw new RuntimeModelError49(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
16720
16719
  }
16721
16720
  const { resultContext, resultParams, resultData } = await this.handleParams(
16722
16721
  action,
@@ -16841,7 +16840,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
16841
16840
  // src/ui-action/provider/front-ui-action-provider.ts
16842
16841
  import {
16843
16842
  StringUtil,
16844
- RuntimeModelError as RuntimeModelError49,
16843
+ RuntimeModelError as RuntimeModelError50,
16845
16844
  ModelError as ModelError26,
16846
16845
  RuntimeError as RuntimeError46
16847
16846
  } from "@ibiz-template/core";
@@ -16859,7 +16858,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16859
16858
  case "WIZARD": {
16860
16859
  const frontPSAppView = action.frontAppViewId;
16861
16860
  if (!frontPSAppView) {
16862
- throw new RuntimeModelError49(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
16861
+ throw new RuntimeModelError50(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
16863
16862
  }
16864
16863
  const { resultContext, resultParams } = await this.handleParams(
16865
16864
  action,
@@ -16924,7 +16923,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
16924
16923
  );
16925
16924
  return result || {};
16926
16925
  }
16927
- throw new RuntimeModelError49(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
16926
+ throw new RuntimeModelError50(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
16928
16927
  }
16929
16928
  /**
16930
16929
  * 执行打印行为
@@ -17765,8 +17764,8 @@ var RawItemPortletController = class extends PortletPartController {
17765
17764
  };
17766
17765
 
17767
17766
  // src/controller/control/data-view/data-view.controller.ts
17768
- import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
17769
- import { isNil as isNil21 } from "ramda";
17767
+ import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
17768
+ import { isNil as isNil22 } from "ramda";
17770
17769
 
17771
17770
  // src/controller/control/data-view/data-view.service.ts
17772
17771
  var DataViewControlService = class extends MDControlService {
@@ -17980,7 +17979,7 @@ var DataViewControlController = class extends MDControlController {
17980
17979
  const optItemModel = this.getOptItemModel();
17981
17980
  if (optItemModel) {
17982
17981
  if (!optItemModel.deuiactionGroup) {
17983
- throw new RuntimeModelError50(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
17982
+ throw new RuntimeModelError51(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
17984
17983
  }
17985
17984
  if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
17986
17985
  ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -18033,7 +18032,7 @@ var DataViewControlController = class extends MDControlController {
18033
18032
  const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
18034
18033
  if (enableGroup && groupMode) {
18035
18034
  if (!groupAppDEFieldId) {
18036
- throw new RuntimeModelError50(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
18035
+ throw new RuntimeModelError51(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
18037
18036
  }
18038
18037
  if (groupMode === "AUTO") {
18039
18038
  this.handleAutoGroup();
@@ -18054,7 +18053,7 @@ var DataViewControlController = class extends MDControlController {
18054
18053
  const groupMap = /* @__PURE__ */ new Map();
18055
18054
  items.forEach((item) => {
18056
18055
  const groupVal = item[groupAppDEFieldId];
18057
- if (isNil21(groupVal)) {
18056
+ if (isNil22(groupVal)) {
18058
18057
  return;
18059
18058
  }
18060
18059
  if (!groupMap.has(groupVal)) {
@@ -18100,7 +18099,7 @@ var DataViewControlController = class extends MDControlController {
18100
18099
  async handleCodeListGroup() {
18101
18100
  const { groupAppDEFieldId, groupCodeListId } = this.model;
18102
18101
  if (!groupCodeListId) {
18103
- throw new RuntimeModelError50(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
18102
+ throw new RuntimeModelError51(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
18104
18103
  }
18105
18104
  const { items } = this.state;
18106
18105
  const groupMap = /* @__PURE__ */ new Map();
@@ -18206,7 +18205,7 @@ var DataViewControlController = class extends MDControlController {
18206
18205
  caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
18207
18206
  }
18208
18207
  if (!item.appDEFieldId) {
18209
- throw new RuntimeModelError50(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
18208
+ throw new RuntimeModelError51(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
18210
18209
  }
18211
18210
  const tempItem = {
18212
18211
  caption,
@@ -18224,10 +18223,10 @@ var DataViewControlController = class extends MDControlController {
18224
18223
  };
18225
18224
 
18226
18225
  // src/controller/control/exp-bar/calendar-exp-bar.controller.ts
18227
- import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
18226
+ import { RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
18228
18227
 
18229
18228
  // src/controller/control/exp-bar/exp-bar.controller.ts
18230
- import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
18229
+ import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
18231
18230
  var ExpBarControlController = class extends ControlController {
18232
18231
  constructor() {
18233
18232
  super(...arguments);
@@ -18282,7 +18281,7 @@ var ExpBarControlController = class extends ControlController {
18282
18281
  get xDataController() {
18283
18282
  const controller = this.view.getController(this.model.xdataControlName);
18284
18283
  if (!controller) {
18285
- throw new RuntimeModelError51(
18284
+ throw new RuntimeModelError52(
18286
18285
  this.model,
18287
18286
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
18288
18287
  );
@@ -18641,7 +18640,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
18641
18640
  get xDataController() {
18642
18641
  const controller = this.view.getController(this.model.xdataControlName);
18643
18642
  if (!controller) {
18644
- throw new RuntimeModelError52(
18643
+ throw new RuntimeModelError53(
18645
18644
  this.model,
18646
18645
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
18647
18646
  );
@@ -18696,7 +18695,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
18696
18695
  };
18697
18696
 
18698
18697
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
18699
- import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
18698
+ import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
18700
18699
  var TreeExpBarController = class extends ExpBarControlController {
18701
18700
  constructor() {
18702
18701
  super(...arguments);
@@ -18719,7 +18718,7 @@ var TreeExpBarController = class extends ExpBarControlController {
18719
18718
  get xDataController() {
18720
18719
  const controller = this.view.getController(this.model.xdataControlName);
18721
18720
  if (!controller) {
18722
- throw new RuntimeModelError53(
18721
+ throw new RuntimeModelError54(
18723
18722
  this.model,
18724
18723
  "\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
18725
18724
  );
@@ -20725,7 +20724,7 @@ var FormMDCtrlController = class extends FormDetailController {
20725
20724
  import {
20726
20725
  mergeInLeft,
20727
20726
  ModelError as ModelError27,
20728
- RuntimeModelError as RuntimeModelError54
20727
+ RuntimeModelError as RuntimeModelError55
20729
20728
  } from "@ibiz-template/core";
20730
20729
  var FormMDCtrlMDController = class extends FormMDCtrlController {
20731
20730
  constructor() {
@@ -20751,7 +20750,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
20751
20750
  await super.onInit();
20752
20751
  const { contentControl } = this.model;
20753
20752
  if (!contentControl) {
20754
- throw new RuntimeModelError54(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
20753
+ throw new RuntimeModelError55(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
20755
20754
  }
20756
20755
  if (contentControl.controlType === "GRID") {
20757
20756
  mergeInLeft(contentControl, {
@@ -20848,7 +20847,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
20848
20847
  };
20849
20848
 
20850
20849
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
20851
- import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
20850
+ import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
20852
20851
  import { createUUID as createUUID11 } from "qx-util";
20853
20852
 
20854
20853
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
@@ -20889,7 +20888,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
20889
20888
  super.onInit();
20890
20889
  const { contentControl } = this.model;
20891
20890
  if (!contentControl) {
20892
- throw new RuntimeModelError55(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
20891
+ throw new RuntimeModelError56(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
20893
20892
  }
20894
20893
  contentControl.enableAutoSave = this.enableCreate || this.enableUpdate;
20895
20894
  const controlProvider = await getControlProvider(contentControl);
@@ -21023,7 +21022,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
21023
21022
 
21024
21023
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
21025
21024
  import { ModelError as ModelError28 } from "@ibiz-template/core";
21026
- import { clone as clone20 } from "ramda";
21025
+ import { clone as clone21 } from "ramda";
21027
21026
  var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
21028
21027
  constructor() {
21029
21028
  super(...arguments);
@@ -21107,7 +21106,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
21107
21106
  copyFields.forEach((key) => {
21108
21107
  tempForm[key] = this.form.model[key];
21109
21108
  });
21110
- this.repeatedForm = clone20(tempForm);
21109
+ this.repeatedForm = clone21(tempForm);
21111
21110
  }
21112
21111
  /**
21113
21112
  * 设置重复器数据(修改主表单里重复器对应属性)
@@ -21237,12 +21236,12 @@ import {
21237
21236
  } from "@ibiz-template/core";
21238
21237
  import { debounce as debounce2 } from "lodash-es";
21239
21238
  import { createUUID as createUUID12 } from "qx-util";
21240
- import { clone as clone21 } from "ramda";
21239
+ import { clone as clone22 } from "ramda";
21241
21240
 
21242
21241
  // src/controller/control/form/edit-form/edit-form.service.ts
21243
21242
  import {
21244
21243
  recursiveIterate as recursiveIterate6,
21245
- RuntimeModelError as RuntimeModelError56
21244
+ RuntimeModelError as RuntimeModelError57
21246
21245
  } from "@ibiz-template/core";
21247
21246
  var EditFormService = class extends FormService {
21248
21247
  /**
@@ -21366,7 +21365,7 @@ var EditFormService = class extends FormService {
21366
21365
  const wizardForm = this.model;
21367
21366
  const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
21368
21367
  if (!methodName) {
21369
- throw new RuntimeModelError56(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
21368
+ throw new RuntimeModelError57(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
21370
21369
  }
21371
21370
  let res = await this.exec(
21372
21371
  methodName,
@@ -21602,8 +21601,8 @@ var EditFormController = class extends FormController {
21602
21601
  * @return {*} {Promise<IData>}
21603
21602
  */
21604
21603
  async copy() {
21605
- const context = clone21(this.context);
21606
- const queryParams = clone21(this.params);
21604
+ const context = clone22(this.context);
21605
+ const queryParams = clone22(this.params);
21607
21606
  const appDataEntity = await ibiz.hub.getAppDataEntity(
21608
21607
  this.model.appDataEntityId,
21609
21608
  this.model.appId
@@ -21660,7 +21659,7 @@ var EditFormController = class extends FormController {
21660
21659
  return this.loadDraft();
21661
21660
  }
21662
21661
  const { context, params } = this.handlerAbilityParams(args);
21663
- const queryParams = clone21(params);
21662
+ const queryParams = clone22(params);
21664
21663
  let res;
21665
21664
  try {
21666
21665
  await this.startLoading();
@@ -22226,12 +22225,12 @@ import {
22226
22225
  mergeDefaultInLeft,
22227
22226
  recursiveIterate as recursiveIterate7,
22228
22227
  RuntimeError as RuntimeError53,
22229
- RuntimeModelError as RuntimeModelError58
22228
+ RuntimeModelError as RuntimeModelError59
22230
22229
  } from "@ibiz-template/core";
22231
- import { clone as clone22 } from "ramda";
22230
+ import { clone as clone23 } from "ramda";
22232
22231
 
22233
22232
  // src/controller/control/grid/grid/grid.service.ts
22234
- import { RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
22233
+ import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
22235
22234
  var GridService = class extends MDControlService {
22236
22235
  /**
22237
22236
  * 初始化属性映射
@@ -22259,7 +22258,7 @@ var GridService = class extends MDControlService {
22259
22258
  dataType: dataItem.dataType
22260
22259
  });
22261
22260
  } else {
22262
- throw new RuntimeModelError57(
22261
+ throw new RuntimeModelError58(
22263
22262
  column,
22264
22263
  "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8868\u683C\u6570\u636E\u9879[".concat(deField, "]")
22265
22264
  );
@@ -22538,7 +22537,7 @@ var GridController = class extends MDControlController {
22538
22537
  const result = await calcColumnModelBySchema(json, this);
22539
22538
  if (result && result.degridColumns.length > 0) {
22540
22539
  const { degridColumns, degridDataItems } = result;
22541
- this.model = clone22(this.model);
22540
+ this.model = clone23(this.model);
22542
22541
  this.model.degridColumns = [
22543
22542
  ...(this.model.degridColumns || []).filter((item) => {
22544
22543
  return degridColumns.findIndex((x) => x.id === item.id) === -1;
@@ -22569,11 +22568,11 @@ var GridController = class extends MDControlController {
22569
22568
  (item) => item.model.appDEFieldId === groupAppDEFieldId
22570
22569
  );
22571
22570
  if (!this.groupFieldColumn) {
22572
- throw new RuntimeModelError58(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
22571
+ throw new RuntimeModelError59(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
22573
22572
  }
22574
22573
  const groupFieldName = this.groupFieldColumn.model.id;
22575
22574
  if (!this.groupFieldColumn.model.appCodeListId) {
22576
- throw new RuntimeModelError58(
22575
+ throw new RuntimeModelError59(
22577
22576
  this.groupFieldColumn.model,
22578
22577
  "\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
22579
22578
  );
@@ -22583,7 +22582,7 @@ var GridController = class extends MDControlController {
22583
22582
  );
22584
22583
  if (index !== -1 && index !== 0) {
22585
22584
  if (this.isMultistageHeader) {
22586
- throw new RuntimeModelError58(
22585
+ throw new RuntimeModelError59(
22587
22586
  this.model,
22588
22587
  "\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
22589
22588
  );
@@ -22593,10 +22592,10 @@ var GridController = class extends MDControlController {
22593
22592
  }
22594
22593
  if (groupMode === "CODELIST") {
22595
22594
  if (!groupCodeListId) {
22596
- throw new RuntimeModelError58(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
22595
+ throw new RuntimeModelError59(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
22597
22596
  }
22598
22597
  if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
22599
- throw new RuntimeModelError58(
22598
+ throw new RuntimeModelError59(
22600
22599
  this.model,
22601
22600
  "\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
22602
22601
  );
@@ -22683,7 +22682,7 @@ var GridController = class extends MDControlController {
22683
22682
  return;
22684
22683
  }
22685
22684
  if (!aggAppDEDataSetId || !aggAppDataEntityId) {
22686
- throw new RuntimeModelError58(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
22685
+ throw new RuntimeModelError59(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
22687
22686
  }
22688
22687
  const params = await this.getFetchParams();
22689
22688
  const app = ibiz.hub.getApp(this.context.srfappid);
@@ -22900,7 +22899,7 @@ var GridController = class extends MDControlController {
22900
22899
  this.state.columnStates.push({
22901
22900
  key: column.codeName,
22902
22901
  caption: column.caption,
22903
- hidden: !!column.hideDefault,
22902
+ hidden: !!column.hideDefault || !!column.hiddenDataItem,
22904
22903
  uaColumn: column.columnType === "UAGRIDCOLUMN"
22905
22904
  });
22906
22905
  }
@@ -23053,7 +23052,7 @@ var GridController = class extends MDControlController {
23053
23052
  throw new RuntimeError53("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
23054
23053
  }
23055
23054
  if (row.data.srfuf === 1 /* UPDATE */) {
23056
- row.cacheData = clone22(row.data);
23055
+ row.cacheData = clone23(row.data);
23057
23056
  const defaultVal = this.calcDefaultValue(row.data, false);
23058
23057
  Object.assign(row.data, defaultVal);
23059
23058
  }
@@ -23222,7 +23221,7 @@ var GridController = class extends MDControlController {
23222
23221
  }
23223
23222
  });
23224
23223
  }
23225
- const cloneData = clone22(
23224
+ const cloneData = clone23(
23226
23225
  data2.map((item) => {
23227
23226
  return item.getOrigin();
23228
23227
  })
@@ -23460,7 +23459,7 @@ var GridController = class extends MDControlController {
23460
23459
  import { DataTypes as DataTypes3, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
23461
23460
  import dayjs4 from "dayjs";
23462
23461
  import { debounce as debounce3 } from "lodash-es";
23463
- import { clone as clone23, isNil as isNil22 } from "ramda";
23462
+ import { clone as clone24, isNil as isNil23 } from "ramda";
23464
23463
  var GridFieldColumnController = class extends GridColumnController {
23465
23464
  constructor() {
23466
23465
  super(...arguments);
@@ -23589,7 +23588,7 @@ var GridFieldColumnController = class extends GridColumnController {
23589
23588
  srfkey: value,
23590
23589
  ...wfContext
23591
23590
  });
23592
- const tempParams = clone23(this.params);
23591
+ const tempParams = clone24(this.params);
23593
23592
  const { context: newContext, params: newParams } = this.handlePublicParams(
23594
23593
  row.data,
23595
23594
  tempContext,
@@ -23663,11 +23662,11 @@ var GridFieldColumnController = class extends GridColumnController {
23663
23662
  */
23664
23663
  calcFieldAgg(items) {
23665
23664
  const { aggField, aggMode, aggValueFormat, unitName } = this.model;
23666
- if (isNil22(aggMode) || aggMode === "NONE") {
23665
+ if (isNil23(aggMode) || aggMode === "NONE") {
23667
23666
  return;
23668
23667
  }
23669
23668
  const fieldName = aggField || this.model.id;
23670
- items = items.filter((item) => !isNil22(item[fieldName]));
23669
+ items = items.filter((item) => !isNil23(item[fieldName]));
23671
23670
  let aggValue;
23672
23671
  if (this.grid.model.aggMode === "PAGE") {
23673
23672
  switch (aggMode) {
@@ -23760,7 +23759,7 @@ var GridFieldColumnController = class extends GridColumnController {
23760
23759
  };
23761
23760
 
23762
23761
  // src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
23763
- import { RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
23762
+ import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
23764
23763
  var GridUAColumnController = class extends GridColumnController {
23765
23764
  /**
23766
23765
  * 给rowController初始化操作列的状态
@@ -23773,7 +23772,7 @@ var GridUAColumnController = class extends GridColumnController {
23773
23772
  var _a;
23774
23773
  const { deuiactionGroup } = this.model;
23775
23774
  if (!deuiactionGroup) {
23776
- throw new RuntimeModelError59(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
23775
+ throw new RuntimeModelError60(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
23777
23776
  }
23778
23777
  if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
23779
23778
  ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -24989,10 +24988,10 @@ import {
24989
24988
  mergeInLeft as mergeInLeft3,
24990
24989
  recursiveIterate as recursiveIterate9
24991
24990
  } from "@ibiz-template/core";
24992
- import { clone as clone24, isNil as isNil23 } from "ramda";
24991
+ import { clone as clone25, isNil as isNil24 } from "ramda";
24993
24992
 
24994
24993
  // src/controller/control/search-bar/search-bar-filter.controller.ts
24995
- import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
24994
+ import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
24996
24995
  var ExcludeOPs = [
24997
24996
  "ISNULL" /* IS_NULL */,
24998
24997
  "ISNOTNULL" /* IS_NOT_NULL */
@@ -25033,7 +25032,7 @@ var SearchBarFilterController = class {
25033
25032
  async init() {
25034
25033
  if (!this.noEditor) {
25035
25034
  if (!this.model.editor) {
25036
- throw new RuntimeModelError60(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
25035
+ throw new RuntimeModelError61(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
25037
25036
  }
25038
25037
  this.editorProvider = await getEditorProvider(this.model.editor);
25039
25038
  if (this.editorProvider) {
@@ -25493,7 +25492,7 @@ var SearchBarController = class extends ControlController {
25493
25492
  }
25494
25493
  });
25495
25494
  if (addSearchBarFilters.length > 0) {
25496
- this.model = clone24(this.model);
25495
+ this.model = clone25(this.model);
25497
25496
  this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
25498
25497
  this.model.enableFilter = true;
25499
25498
  }
@@ -25617,7 +25616,7 @@ var SearchBarController = class extends ControlController {
25617
25616
  let hasError = false;
25618
25617
  recursiveIterate9(this.state.filterNodes[0], (node) => {
25619
25618
  if (node.leaf) {
25620
- if (node.field && node.valueOP && !isNil23(node.value)) {
25619
+ if (node.field && node.valueOP && !isNil24(node.value)) {
25621
25620
  hasFilter = true;
25622
25621
  } else {
25623
25622
  hasError = true;
@@ -26077,7 +26076,7 @@ var TabExpPanelController = class extends ControlController {
26077
26076
  // src/controller/control/tree/tree.controller.ts
26078
26077
  import {
26079
26078
  RuntimeError as RuntimeError57,
26080
- RuntimeModelError as RuntimeModelError61,
26079
+ RuntimeModelError as RuntimeModelError62,
26081
26080
  recursiveIterate as recursiveIterate10
26082
26081
  } from "@ibiz-template/core";
26083
26082
 
@@ -26948,7 +26947,7 @@ var TreeController = class extends MDControlController {
26948
26947
  const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
26949
26948
  if (allowOrder === true) {
26950
26949
  if (!sortAppDEFieldId) {
26951
- throw new RuntimeModelError61(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
26950
+ throw new RuntimeModelError62(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
26952
26951
  }
26953
26952
  const sortField = sortAppDEFieldId.toLowerCase();
26954
26953
  const isAsc = sortDir === "ASC";
@@ -27029,7 +27028,7 @@ var TreeController = class extends MDControlController {
27029
27028
  async modifyNodeText(nodeData, text) {
27030
27029
  const model = this.getNodeModel(nodeData._nodeId);
27031
27030
  if (!model.allowEditText) {
27032
- throw new RuntimeModelError61(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
27031
+ throw new RuntimeModelError62(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
27033
27032
  }
27034
27033
  if (!nodeData._deData) {
27035
27034
  throw new RuntimeError57("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
@@ -27393,8 +27392,8 @@ var WizardPanelController = class extends ControlController {
27393
27392
  };
27394
27393
 
27395
27394
  // src/controller/control/md-ctrl/md-ctrl.controller.ts
27396
- import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
27397
- import { isNil as isNil24 } from "ramda";
27395
+ import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
27396
+ import { isNil as isNil25 } from "ramda";
27398
27397
 
27399
27398
  // src/controller/control/md-ctrl/md-ctrl.service.ts
27400
27399
  var MDCtrlService = class extends MDControlService {
@@ -27600,7 +27599,7 @@ var MDCtrlController = class extends MDControlController {
27600
27599
  const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
27601
27600
  if (enableGroup && groupMode) {
27602
27601
  if (!groupAppDEFieldId) {
27603
- throw new RuntimeModelError62(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
27602
+ throw new RuntimeModelError63(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
27604
27603
  }
27605
27604
  if (groupMode === "AUTO") {
27606
27605
  this.handleAutoGroup();
@@ -27621,7 +27620,7 @@ var MDCtrlController = class extends MDControlController {
27621
27620
  const groupMap = /* @__PURE__ */ new Map();
27622
27621
  items.forEach((item) => {
27623
27622
  const groupVal = item[groupAppDEFieldId];
27624
- if (isNil24(groupVal)) {
27623
+ if (isNil25(groupVal)) {
27625
27624
  return;
27626
27625
  }
27627
27626
  if (!groupMap.has(groupVal)) {
@@ -27667,7 +27666,7 @@ var MDCtrlController = class extends MDControlController {
27667
27666
  async handleCodeListGroup() {
27668
27667
  const { groupAppDEFieldId, groupCodeListId } = this.model;
27669
27668
  if (!groupCodeListId) {
27670
- throw new RuntimeModelError62(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
27669
+ throw new RuntimeModelError63(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
27671
27670
  }
27672
27671
  const { items } = this.state;
27673
27672
  const groupMap = /* @__PURE__ */ new Map();
@@ -27697,8 +27696,8 @@ var MDCtrlController = class extends MDControlController {
27697
27696
  };
27698
27697
 
27699
27698
  // src/controller/control/kanban/kanban.controller.ts
27700
- import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
27701
- import { isNil as isNil25 } from "ramda";
27699
+ import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
27700
+ import { isNil as isNil26 } from "ramda";
27702
27701
 
27703
27702
  // src/controller/control/kanban/kanban.service.ts
27704
27703
  var KanbanService = class extends DataViewControlService {
@@ -27775,15 +27774,15 @@ var KanbanController = class extends DataViewControlController {
27775
27774
  const sortField = this.model.minorSortAppDEFieldId;
27776
27775
  const { minorSortDir } = this.model;
27777
27776
  if (!sortField) {
27778
- throw new RuntimeModelError63(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
27777
+ throw new RuntimeModelError64(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
27779
27778
  }
27780
27779
  if (!minorSortDir) {
27781
- throw new RuntimeModelError63(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
27780
+ throw new RuntimeModelError64(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
27782
27781
  }
27783
27782
  const isAsc = minorSortDir === "ASC";
27784
27783
  items.forEach((item) => {
27785
27784
  const sortValue = item[sortField];
27786
- if (isNil25(sortValue)) {
27785
+ if (isNil26(sortValue)) {
27787
27786
  item[sortField] = 0;
27788
27787
  } else {
27789
27788
  const toNum = Number(sortValue);
@@ -27890,7 +27889,7 @@ var KanbanController = class extends DataViewControlController {
27890
27889
  const groupMap = /* @__PURE__ */ new Map();
27891
27890
  items.forEach((item) => {
27892
27891
  const groupVal = item[groupAppDEFieldId];
27893
- if (isNil25(groupVal)) {
27892
+ if (isNil26(groupVal)) {
27894
27893
  return;
27895
27894
  }
27896
27895
  if (!groupMap.has(groupVal)) {
@@ -27922,7 +27921,7 @@ var KanbanController = class extends DataViewControlController {
27922
27921
  async handleCodeListGroup() {
27923
27922
  const { groupAppDEFieldId, groupCodeListId } = this.model;
27924
27923
  if (!groupCodeListId) {
27925
- throw new RuntimeModelError63(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
27924
+ throw new RuntimeModelError64(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
27926
27925
  }
27927
27926
  const { items } = this.state;
27928
27927
  const groupMap = /* @__PURE__ */ new Map();
@@ -28234,9 +28233,6 @@ var TreeGridExRowState = class {
28234
28233
  */
28235
28234
  this.uaColStates = {};
28236
28235
  this.data = data;
28237
- Object.values(treeGrid.fieldColumns).forEach((column) => {
28238
- column.initColumnStates(this);
28239
- });
28240
28236
  Object.values(treeGrid.uaColumns).forEach((column) => {
28241
28237
  column.initActionStates(this);
28242
28238
  });
@@ -28531,34 +28527,10 @@ var TreeGridExColumnController = class {
28531
28527
 
28532
28528
  // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts
28533
28529
  var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
28534
- /**
28535
- * 给rowController初始化属性列的状态
28536
- *
28537
- * @author zpc
28538
- * @date 2024-01-07 21:09:43
28539
- * @param {ITreeGridExRowState} row
28540
- */
28541
- initColumnStates(row) {
28542
- const { data } = row;
28543
- if (!this.model.id || !data._deData) {
28544
- return;
28545
- }
28546
- const { detreeNodeDataItems } = this.treeGrid.getNodeModel(
28547
- data._nodeId
28548
- );
28549
- const targetTreeNodeDataItem = detreeNodeDataItems == null ? void 0 : detreeNodeDataItems.find(
28550
- (treeNodeDataItem) => {
28551
- return treeNodeDataItem.detreeColumnId === this.model.id;
28552
- }
28553
- );
28554
- if (targetTreeNodeDataItem && targetTreeNodeDataItem.appDEFieldId) {
28555
- data[this.model.id.toLowerCase()] = data._deData[targetTreeNodeDataItem.appDEFieldId.toLowerCase()];
28556
- }
28557
- }
28558
28530
  };
28559
28531
 
28560
28532
  // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
28561
- import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
28533
+ import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
28562
28534
  var TreeGridExUAColumnController = class extends TreeGridExColumnController {
28563
28535
  /**
28564
28536
  * 给rowController初始化操作列的状态
@@ -28571,7 +28543,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
28571
28543
  var _a;
28572
28544
  const { deuiactionGroup } = this.model;
28573
28545
  if (!deuiactionGroup) {
28574
- throw new RuntimeModelError64(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
28546
+ throw new RuntimeModelError65(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
28575
28547
  }
28576
28548
  if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
28577
28549
  ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -28616,7 +28588,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
28616
28588
  };
28617
28589
 
28618
28590
  // src/controller/control/tree-grid/tree-grid.controller.ts
28619
- import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
28591
+ import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
28620
28592
  var TreeGridController = class extends GridController {
28621
28593
  constructor() {
28622
28594
  super(...arguments);
@@ -28661,10 +28633,10 @@ var TreeGridController = class extends GridController {
28661
28633
  return item.treeColumnMode === 2 || item.treeColumnMode === 3;
28662
28634
  });
28663
28635
  if (!treeGridParent) {
28664
- throw new RuntimeModelError65(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
28636
+ throw new RuntimeModelError66(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
28665
28637
  }
28666
28638
  if (!treeGridValue) {
28667
- throw new RuntimeModelError65(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
28639
+ throw new RuntimeModelError66(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
28668
28640
  }
28669
28641
  this.treeGridValueField = treeGridValue.appDEFieldId.toLowerCase();
28670
28642
  this.treeGridParentField = treeGridParent.appDEFieldId.toLowerCase();
@@ -30091,6 +30063,20 @@ var AppHub = class {
30091
30063
  }
30092
30064
  return [];
30093
30065
  }
30066
+ /**
30067
+ * 获取应用实体服务
30068
+ *
30069
+ * @author chitanda
30070
+ * @date 2024-01-10 13:01:01
30071
+ * @param {string} appId
30072
+ * @param {string} entityId
30073
+ * @param {IContext} context
30074
+ * @return {*} {Promise<IAppDEService>}
30075
+ */
30076
+ async getAppDEService(appId2, entityId, context) {
30077
+ const app = await this.getAppAsync(appId2);
30078
+ return app.deService.getService(context, entityId);
30079
+ }
30094
30080
  reset() {
30095
30081
  this.appMap.clear();
30096
30082
  this.configCache = void 0;
@@ -30356,8 +30342,8 @@ var ViewEngineBase = class {
30356
30342
  };
30357
30343
 
30358
30344
  // src/engine/md-view.engine.ts
30359
- import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
30360
- import { clone as clone25 } from "ramda";
30345
+ import { RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
30346
+ import { clone as clone26 } from "ramda";
30361
30347
  var MDViewEngine = class extends ViewEngineBase {
30362
30348
  /**
30363
30349
  * 多数据部件名称
@@ -30540,7 +30526,7 @@ var MDViewEngine = class extends ViewEngineBase {
30540
30526
  view: this.view
30541
30527
  }));
30542
30528
  if (result === -1) {
30543
- throw new RuntimeModelError66(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30529
+ throw new RuntimeModelError67(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30544
30530
  } else {
30545
30531
  return {
30546
30532
  cancel: !result.ok
@@ -30563,9 +30549,9 @@ var MDViewEngine = class extends ViewEngineBase {
30563
30549
  (item) => item.id === "newdata"
30564
30550
  );
30565
30551
  if (!openAppViewLogic) {
30566
- throw new RuntimeModelError66(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30552
+ throw new RuntimeModelError67(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30567
30553
  }
30568
- const params = clone25(this.view.params);
30554
+ const params = clone26(this.view.params);
30569
30555
  if (copyMode) {
30570
30556
  params.srfcopymode = copyMode;
30571
30557
  }
@@ -30577,7 +30563,7 @@ var MDViewEngine = class extends ViewEngineBase {
30577
30563
  view: this.view
30578
30564
  }));
30579
30565
  if (result === -1) {
30580
- throw new RuntimeModelError66(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30566
+ throw new RuntimeModelError67(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30581
30567
  } else {
30582
30568
  return {
30583
30569
  cancel: !result.ok
@@ -30888,13 +30874,13 @@ var ScriptExecutor = class extends LogicExecutor {
30888
30874
  };
30889
30875
 
30890
30876
  // src/logic-scheduler/executor/app-de-ui-logic-executor.ts
30891
- import { RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
30877
+ import { RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
30892
30878
  var AppDEUILogicExecutor = class extends LogicExecutor {
30893
30879
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30894
30880
  execute(executeParams) {
30895
30881
  const { appDEUILogicId, appDataEntityId } = this.logic;
30896
30882
  if (!appDEUILogicId) {
30897
- throw new RuntimeModelError67(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
30883
+ throw new RuntimeModelError68(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
30898
30884
  }
30899
30885
  execUILogic(appDEUILogicId, appDataEntityId, executeParams);
30900
30886
  }
@@ -31352,7 +31338,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
31352
31338
  };
31353
31339
 
31354
31340
  // src/logic-scheduler/trigger/timer-trigger.ts
31355
- import { RuntimeError as RuntimeError66, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
31341
+ import { RuntimeError as RuntimeError66, RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
31356
31342
  var TimerTrigger = class extends LogicTrigger {
31357
31343
  constructor() {
31358
31344
  super(...arguments);
@@ -31360,7 +31346,7 @@ var TimerTrigger = class extends LogicTrigger {
31360
31346
  }
31361
31347
  start() {
31362
31348
  if (!this.logic.timer) {
31363
- throw new RuntimeModelError68(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
31349
+ throw new RuntimeModelError69(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
31364
31350
  }
31365
31351
  this.timer = setInterval(() => {
31366
31352
  if (!this.scheduler.defaultParamsCb) {
@@ -31382,7 +31368,7 @@ var TimerTrigger = class extends LogicTrigger {
31382
31368
  import {
31383
31369
  ModelError as ModelError34,
31384
31370
  RuntimeError as RuntimeError67,
31385
- RuntimeModelError as RuntimeModelError69
31371
+ RuntimeModelError as RuntimeModelError70
31386
31372
  } from "@ibiz-template/core";
31387
31373
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
31388
31374
  var AppUILogicExecutor = class extends LogicExecutor {
@@ -31428,7 +31414,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31428
31414
  } else {
31429
31415
  openViewRef = appUILogic.openDataAppView;
31430
31416
  if (!openViewRef) {
31431
- throw new RuntimeModelError69(
31417
+ throw new RuntimeModelError70(
31432
31418
  appUILogic,
31433
31419
  "opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
31434
31420
  );
@@ -31436,7 +31422,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31436
31422
  }
31437
31423
  const openView = openViewRef.refAppViewId;
31438
31424
  if (!openView) {
31439
- throw new RuntimeModelError69(
31425
+ throw new RuntimeModelError70(
31440
31426
  appUILogic,
31441
31427
  "opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
31442
31428
  );
@@ -31466,7 +31452,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31466
31452
  );
31467
31453
  const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
31468
31454
  if (!typeFileName) {
31469
- throw new RuntimeModelError69(
31455
+ throw new RuntimeModelError70(
31470
31456
  appUILogic,
31471
31457
  "".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
31472
31458
  );
@@ -31474,7 +31460,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31474
31460
  const { data } = parameters;
31475
31461
  const formTypeValue = data[0][typeFileName];
31476
31462
  if (!formTypeValue) {
31477
- throw new RuntimeModelError69(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
31463
+ throw new RuntimeModelError70(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
31478
31464
  }
31479
31465
  const openViewRefs = appUILogic.openDataAppViews;
31480
31466
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
@@ -31516,7 +31502,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31516
31502
  return viewRef.refMode.toLowerCase() !== parentDeName;
31517
31503
  });
31518
31504
  if (!newViewRef) {
31519
- throw new RuntimeModelError69(
31505
+ throw new RuntimeModelError70(
31520
31506
  appUILogic,
31521
31507
  "\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
31522
31508
  );
@@ -31526,7 +31512,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31526
31512
  } else {
31527
31513
  newViewRef = newDataAppView;
31528
31514
  if (!newViewRef || !newViewRef.refAppViewId) {
31529
- throw new RuntimeModelError69(
31515
+ throw new RuntimeModelError70(
31530
31516
  appUILogic,
31531
31517
  "newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
31532
31518
  );
@@ -31590,7 +31576,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31590
31576
  const { wizardAppView, newDataAppViews } = appUILogic;
31591
31577
  const { context, params, ...rest } = parameters;
31592
31578
  if (!wizardAppView || !wizardAppView.refAppViewId) {
31593
- throw new RuntimeModelError69(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
31579
+ throw new RuntimeModelError70(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
31594
31580
  }
31595
31581
  const result = await ibiz.commands.execute(
31596
31582
  OpenAppViewCommand.TAG,
@@ -31641,7 +31627,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31641
31627
  const minorDERs = selfDe.minorAppDERSs;
31642
31628
  const pickParentDeName = newViewRef.refMode.toLowerCase();
31643
31629
  if (!minorDERs) {
31644
- throw new RuntimeModelError69(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
31630
+ throw new RuntimeModelError70(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
31645
31631
  }
31646
31632
  let pickParentFieldName = "";
31647
31633
  minorDERs == null ? void 0 : minorDERs.forEach((item) => {
@@ -31738,12 +31724,12 @@ var ControlEventTrigger = class extends LogicTrigger {
31738
31724
  };
31739
31725
 
31740
31726
  // src/logic-scheduler/executor/app-ui-action-executor.ts
31741
- import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
31727
+ import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
31742
31728
  var AppDEUIActionExecutor = class extends LogicExecutor {
31743
31729
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
31744
31730
  execute(executeParams) {
31745
31731
  if (!this.logic.appDEUIActionId) {
31746
- throw new RuntimeModelError70(
31732
+ throw new RuntimeModelError71(
31747
31733
  this.logic,
31748
31734
  "\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
31749
31735
  );