@ibiz-template/runtime 0.6.1-alpha.0 → 0.6.1-alpha.2

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 (44) hide show
  1. package/dist/index.esm.js +189 -114
  2. package/dist/index.system.min.js +1 -1
  3. package/out/controller/common/control/md-control.controller.d.ts +15 -0
  4. package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
  5. package/out/controller/common/control/md-control.controller.js +22 -3
  6. package/out/controller/common/view/view.controller.d.ts.map +1 -1
  7. package/out/controller/common/view/view.controller.js +1 -0
  8. package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
  9. package/out/controller/control/form/edit-form/edit-form.controller.js +3 -1
  10. package/out/controller/control/gantt/gantt.controller.d.ts +3 -3
  11. package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
  12. package/out/controller/control/gantt/gantt.controller.js +1 -4
  13. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  14. package/out/controller/control/grid/grid/grid.controller.js +1 -0
  15. package/out/controller/control/tree/tree.controller.d.ts +8 -0
  16. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  17. package/out/controller/control/tree/tree.controller.js +14 -0
  18. package/out/controller/notification/internal-message.controller.d.ts +7 -0
  19. package/out/controller/notification/internal-message.controller.d.ts.map +1 -1
  20. package/out/controller/notification/internal-message.controller.js +14 -4
  21. package/out/engine/md-view.engine.d.ts.map +1 -1
  22. package/out/engine/md-view.engine.js +2 -1
  23. package/out/interface/controller/controller/control/i-gantt.controller.d.ts +31 -2
  24. package/out/interface/controller/controller/control/i-gantt.controller.d.ts.map +1 -1
  25. package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts +7 -0
  26. package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts.map +1 -1
  27. package/out/interface/controller/state/view/i-view.state.d.ts +7 -0
  28. package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
  29. package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts +8 -0
  30. package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts.map +1 -1
  31. package/out/plugin/plugin-static-resource/plugin-static-resource.js +12 -1
  32. package/out/service/service/internal-message/internal-message.service.d.ts +8 -0
  33. package/out/service/service/internal-message/internal-message.service.d.ts.map +1 -1
  34. package/out/service/service/internal-message/internal-message.service.js +10 -0
  35. package/out/ui-action/provider/ui-action-provider-base.d.ts +2 -2
  36. package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
  37. package/out/ui-action/provider/ui-action-provider-base.js +9 -4
  38. package/out/utils/handlebars/helpers/not/not.d.ts.map +1 -1
  39. package/out/utils/handlebars/helpers/not/not.js +2 -1
  40. package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
  41. package/out/utils/open-redirect-view/open-redirect-view.js +3 -0
  42. package/out/utils/script/script-function.d.ts.map +1 -1
  43. package/out/utils/script/script-function.js +1 -0
  44. package/package.json +6 -6
package/dist/index.esm.js CHANGED
@@ -233,8 +233,8 @@ var HelperBase = class {
233
233
  * @date 2021-12-29 14:12:47
234
234
  * @param {string} tag 助手标识
235
235
  */
236
- constructor(Handlebars2, tag) {
237
- Handlebars2.registerHelper(tag, this.onExecute);
236
+ constructor(Handlebars, tag) {
237
+ Handlebars.registerHelper(tag, this.onExecute);
238
238
  }
239
239
  };
240
240
 
@@ -408,12 +408,13 @@ var HelperNeq = class extends HelperBase {
408
408
  };
409
409
 
410
410
  // src/utils/handlebars/helpers/not/not.ts
411
+ import { isEmpty, isNil } from "ramda";
411
412
  var HelperNot = class extends HelperBase {
412
413
  constructor(hbs) {
413
414
  super(hbs, "not");
414
415
  }
415
416
  onExecute(param, options) {
416
- const bol = Handlebars.Utils.isEmpty(param);
417
+ const bol = isEmpty(param) || isNil(param);
417
418
  return HelperUtil.handleJudgmentExecute(this, bol, options);
418
419
  }
419
420
  };
@@ -595,7 +596,7 @@ var HandlebarsUtil = class {
595
596
  };
596
597
 
597
598
  // src/utils/nav-params/nav-params.ts
598
- import { isEmpty, isNil } from "lodash-es";
599
+ import { isEmpty as isEmpty2, isNil as isNil2 } from "lodash-es";
599
600
  import { isNilOrEmpty, notNilEmpty } from "qx-util";
600
601
  function convertObjectToNavParams(navParams) {
601
602
  const result = [];
@@ -616,7 +617,7 @@ function convertObjectToNavParams(navParams) {
616
617
  return result;
617
618
  }
618
619
  function convertNavData(navParams, ...origins) {
619
- if (!navParams || isEmpty(navParams)) {
620
+ if (!navParams || isEmpty2(navParams)) {
620
621
  return {};
621
622
  }
622
623
  const navParamsArr = Array.isArray(navParams) ? navParams : convertObjectToNavParams(navParams);
@@ -650,7 +651,7 @@ function convertNavDataByArray(naviDatas, ...origins) {
650
651
  key.slice(2, -1).toLowerCase()
651
652
  );
652
653
  if (find) {
653
- valueStr = valueStr.replace(key, "".concat(isNil(value) ? "" : value));
654
+ valueStr = valueStr.replace(key, "".concat(isNil2(value) ? "" : value));
654
655
  }
655
656
  });
656
657
  result[naviData.key.toLowerCase()] = valueStr;
@@ -1294,6 +1295,9 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
1294
1295
  });
1295
1296
  if (refView) {
1296
1297
  viewId = refView.refAppViewId;
1298
+ if (refView.openMode) {
1299
+ opts.openMode = refView.openMode;
1300
+ }
1297
1301
  if (viewId) {
1298
1302
  return {
1299
1303
  type: "view",
@@ -1405,7 +1409,7 @@ async function calcDERdTag(entity, rdView, params, data) {
1405
1409
  // src/utils/verify/verify.ts
1406
1410
  import { RuntimeError as RuntimeError3 } from "@ibiz-template/core";
1407
1411
  import { isNilOrEmpty as isNilOrEmpty3, notNilEmpty as notNilEmpty4 } from "qx-util";
1408
- import { isNil as isNil2 } from "ramda";
1412
+ import { isNil as isNil3 } from "ramda";
1409
1413
  function testCond(value, op, value2) {
1410
1414
  if (Object.is(op, "IN")) {
1411
1415
  return contains(value, value2);
@@ -1431,7 +1435,7 @@ function testCond(value, op, value2) {
1431
1435
  case "ISNOTNULL":
1432
1436
  return notNilEmpty4(value);
1433
1437
  case "TESTNULL":
1434
- return isNil2(value);
1438
+ return isNil3(value);
1435
1439
  case "IN":
1436
1440
  return contains(value, value2);
1437
1441
  case "NOTIN":
@@ -1504,7 +1508,7 @@ function strContain(value, value2, mode) {
1504
1508
  // src/utils/verify/de-rule-verify.ts
1505
1509
  import { RuntimeError as RuntimeError4 } from "@ibiz-template/core";
1506
1510
  import { isNilOrEmpty as isNilOrEmpty4 } from "qx-util";
1507
- import { isEmpty as isEmpty2, isNil as isNil3 } from "ramda";
1511
+ import { isEmpty as isEmpty3, isNil as isNil4 } from "ramda";
1508
1512
 
1509
1513
  // src/utils/script/script-function.ts
1510
1514
  import { mergeRight } from "ramda";
@@ -1576,7 +1580,8 @@ var ScriptFunction = class {
1576
1580
  "parentView",
1577
1581
  "view",
1578
1582
  "parent",
1579
- "util"
1583
+ "util",
1584
+ "ctrl"
1580
1585
  ];
1581
1586
  keys.push(...presetArgsKeys);
1582
1587
  this.argKeys = Array.from(new Set(keys));
@@ -1858,7 +1863,7 @@ function checkFieldSimpleRule(value, op, value2, errorInfo, paramType, form, pri
1858
1863
  const _value2Field = form[value2] ? form[value2] : value2;
1859
1864
  value2 = _value2Field;
1860
1865
  }
1861
- if (isNil3(errorInfo) || isEmpty2(errorInfo)) {
1866
+ if (isNil4(errorInfo) || isEmpty3(errorInfo)) {
1862
1867
  errorInfo = "\u5185\u5BB9\u5FC5\u987B\u7B26\u5408\u503C\u89C4\u5219";
1863
1868
  }
1864
1869
  const result = testCond(value, op, value2);
@@ -4988,7 +4993,7 @@ import { ModelError as ModelError15, RuntimeError as RuntimeError25 } from "@ibi
4988
4993
  import { clone as clone17 } from "ramda";
4989
4994
 
4990
4995
  // src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
4991
- import { isEmpty as isEmpty3 } from "ramda";
4996
+ import { isEmpty as isEmpty4 } from "ramda";
4992
4997
 
4993
4998
  // src/service/utils/de-dq-cond/ps-model-cond-engine-base.ts
4994
4999
  var PSModelCondEngineBase = class {
@@ -5295,7 +5300,7 @@ var _PSDEDQCondEngine = class _PSDEDQCondEngine extends PSModelCondEngineBase {
5295
5300
  testCond(cond, data, filter) {
5296
5301
  if (cond instanceof PSModelGroupCondBase) {
5297
5302
  const list = cond.getChildPSModelCondBases();
5298
- if (list == null || isEmpty3(list)) {
5303
+ if (list == null || isEmpty4(list)) {
5299
5304
  return !cond.isNotMode();
5300
5305
  }
5301
5306
  const bAnd = "AND" /* CONDOP_AND */ === cond.getCondOp();
@@ -5318,15 +5323,15 @@ var _PSDEDQCondEngine = class _PSDEDQCondEngine extends PSModelCondEngineBase {
5318
5323
  return bRet;
5319
5324
  }
5320
5325
  if (cond instanceof PSModelSingleCondBase) {
5321
- if (isEmpty3(cond.getParam())) {
5326
+ if (isEmpty4(cond.getParam())) {
5322
5327
  ibiz.log.warn("\u6CA1\u6709\u6307\u5B9A\u5C5E\u6027\u540D\u79F0", cond);
5323
5328
  }
5324
5329
  const objValue = data[cond.getParam().toLowerCase()];
5325
5330
  let objCondValue = null;
5326
5331
  const valType = cond.getValueType();
5327
5332
  const val = cond.getValue();
5328
- if (valType != null && !isEmpty3(valType)) {
5329
- if (isEmpty3(val)) {
5333
+ if (valType != null && !isEmpty4(valType)) {
5334
+ if (isEmpty4(val)) {
5330
5335
  ibiz.log.warn("\u6CA1\u6709\u6307\u5B9A\u4E0A\u4E0B\u6587\u53C2\u6570\u540D\u79F0");
5331
5336
  }
5332
5337
  if (_PSDEDQCondEngine.PARAMTYPE_WEBCONTEXT === valType) {
@@ -6361,7 +6366,7 @@ DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
6361
6366
 
6362
6367
  // src/service/utils/dynamic-code-list/dynamic-code-list.ts
6363
6368
  import { ModelError as ModelError5, RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
6364
- import { isNil as isNil4 } from "ramda";
6369
+ import { isNil as isNil5 } from "ramda";
6365
6370
  var DynamicCodeListCache = class {
6366
6371
  constructor(codeList) {
6367
6372
  /**
@@ -6594,7 +6599,7 @@ var DynamicCodeListCache = class {
6594
6599
  }
6595
6600
  const promise = this.load(context, params);
6596
6601
  const { cacheTimeout } = this.codeList;
6597
- const waitTime = cacheTimeout === -1 || isNil4(cacheTimeout) ? ibiz.config.codeList.timeout : this.codeList.cacheTimeout;
6602
+ const waitTime = cacheTimeout === -1 || isNil5(cacheTimeout) ? ibiz.config.codeList.timeout : this.codeList.cacheTimeout;
6598
6603
  const cacheData = {
6599
6604
  expirationTime: (/* @__PURE__ */ new Date()).getTime() + waitTime,
6600
6605
  promise
@@ -6608,17 +6613,17 @@ var DynamicCodeListCache = class {
6608
6613
  };
6609
6614
 
6610
6615
  // src/service/utils/de-cache/de-cache.ts
6611
- import { where, equals, clone as clone4, isNil as isNil6, isEmpty as isEmpty5 } from "ramda";
6616
+ import { where, equals, clone as clone4, isNil as isNil7, isEmpty as isEmpty6 } from "ramda";
6612
6617
  import { createUUID as createUUID2 } from "qx-util";
6613
6618
  import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
6614
6619
 
6615
6620
  // src/service/utils/service-exist-util/service-exist-util.ts
6616
6621
  import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
6617
- import { isEmpty as isEmpty4, isNil as isNil5 } from "ramda";
6622
+ import { isEmpty as isEmpty5, isNil as isNil6 } from "ramda";
6618
6623
  function isExistSrfKey(funcName, entity) {
6619
6624
  if (entity != null) {
6620
6625
  const { srfkey } = entity;
6621
- if (!isNil5(srfkey) && !isEmpty4(srfkey)) {
6626
+ if (!isNil6(srfkey) && !isEmpty5(srfkey)) {
6622
6627
  return true;
6623
6628
  }
6624
6629
  }
@@ -6626,7 +6631,7 @@ function isExistSrfKey(funcName, entity) {
6626
6631
  }
6627
6632
  function isExistSessionId(funcName, context) {
6628
6633
  const { srfsessionid } = context;
6629
- if (!isNil5(srfsessionid) && !isEmpty4(srfsessionid)) {
6634
+ if (!isNil6(srfsessionid) && !isEmpty5(srfsessionid)) {
6630
6635
  return true;
6631
6636
  }
6632
6637
  throw new RuntimeError15("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
@@ -6722,7 +6727,7 @@ var DECache = class {
6722
6727
  }
6723
6728
  try {
6724
6729
  isExistSessionId("add", context);
6725
- if (isNil6(entity.srfkey) || isEmpty5(entity.srfkey)) {
6730
+ if (isNil7(entity.srfkey) || isEmpty6(entity.srfkey)) {
6726
6731
  entity.srfkey = createUUID2();
6727
6732
  }
6728
6733
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
@@ -6866,7 +6871,7 @@ var DECache = class {
6866
6871
  const t = this.getTransaction(context);
6867
6872
  for (let i = 0; i < entities.length; i++) {
6868
6873
  const entity = entities[i];
6869
- if (isNil6(entity.srfkey) || isEmpty5(entity.srfkey)) {
6874
+ if (isNil7(entity.srfkey) || isEmpty6(entity.srfkey)) {
6870
6875
  entity.srfkey = createUUID2();
6871
6876
  }
6872
6877
  entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
@@ -7057,7 +7062,7 @@ var DECache = class {
7057
7062
  }
7058
7063
  );
7059
7064
  const unionValues = unionKeys.map((key) => {
7060
- if (isNil6(data[key])) {
7065
+ if (isNil7(data[key])) {
7061
7066
  return "__empty__";
7062
7067
  }
7063
7068
  return data[key];
@@ -7131,7 +7136,7 @@ function calcResPath(context, entity) {
7131
7136
  }
7132
7137
 
7133
7138
  // src/service/utils/search-filter/search-filter.ts
7134
- import { isEmpty as isEmpty6, isNil as isNil7 } from "ramda";
7139
+ import { isEmpty as isEmpty7, isNil as isNil8 } from "ramda";
7135
7140
  var SearchFilter = class {
7136
7141
  /**
7137
7142
  * Creates an instance of SearchFilter.
@@ -7179,16 +7184,16 @@ var SearchFilter = class {
7179
7184
  this.sortMode = "ASC";
7180
7185
  this.context = context;
7181
7186
  if (data) {
7182
- if (!isNil7(data.page) && !isEmpty6(data.page)) {
7187
+ if (!isNil8(data.page) && !isEmpty7(data.page)) {
7183
7188
  this.page = data.page;
7184
7189
  }
7185
- if (!isNil7(data.size) && !isEmpty6(data.size)) {
7190
+ if (!isNil8(data.size) && !isEmpty7(data.size)) {
7186
7191
  this.size = data.size;
7187
7192
  }
7188
- if (!isNil7(data.query) && !isEmpty6(data.query)) {
7193
+ if (!isNil8(data.query) && !isEmpty7(data.query)) {
7189
7194
  this.query = data.query;
7190
7195
  }
7191
- if (!isNil7(data.sort) && !isEmpty6(data.sort)) {
7196
+ if (!isNil8(data.sort) && !isEmpty7(data.sort)) {
7192
7197
  const arr = data.sort.split(",");
7193
7198
  if (arr.length >= 1) {
7194
7199
  [this.sortField] = arr;
@@ -7910,7 +7915,7 @@ var FileService = class {
7910
7915
  };
7911
7916
 
7912
7917
  // src/service/app-data-entity/app-data-entity.ts
7913
- import { clone as clone5, isNil as isNil8 } from "ramda";
7918
+ import { clone as clone5, isNil as isNil9 } from "ramda";
7914
7919
  import { DataTypes } from "@ibiz-template/core";
7915
7920
  import { createUUID as createUUID3 } from "qx-util";
7916
7921
 
@@ -8003,7 +8008,7 @@ var AppDataEntity = class _AppDataEntity {
8003
8008
  enumerable: false,
8004
8009
  configurable: true,
8005
8010
  writable: true,
8006
- value: isNil8(this.srfkey) ? createUUID3() : this.srfkey
8011
+ value: isNil9(this.srfkey) ? createUUID3() : this.srfkey
8007
8012
  });
8008
8013
  this.defineProperties();
8009
8014
  }
@@ -8093,11 +8098,11 @@ var AppDataEntity = class _AppDataEntity {
8093
8098
  if (value == null) {
8094
8099
  return value;
8095
8100
  }
8096
- if (isNil8(dataType)) {
8101
+ if (isNil9(dataType)) {
8097
8102
  return value;
8098
8103
  }
8099
8104
  if (DataTypes.isNumber(dataType)) {
8100
- const numVal = !isNil8(value) && value !== "" ? Number(value) : value;
8105
+ const numVal = !isNil9(value) && value !== "" ? Number(value) : value;
8101
8106
  if (Number.isNaN(numVal)) {
8102
8107
  ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
8103
8108
  return value;
@@ -8616,7 +8621,7 @@ import { clone as clone8 } from "@ibiz-template/core";
8616
8621
 
8617
8622
  // src/service/vo/control.vo.ts
8618
8623
  import { createUUID as createUUID4 } from "qx-util";
8619
- import { clone as clone7, isNil as isNil9 } from "ramda";
8624
+ import { clone as clone7, isNil as isNil10 } from "ramda";
8620
8625
  var BuildInKeys = [
8621
8626
  "srfkey",
8622
8627
  "srfmajortext",
@@ -8705,7 +8710,7 @@ var ControlVO = class _ControlVO {
8705
8710
  enumerable: false,
8706
8711
  configurable: true,
8707
8712
  writable: true,
8708
- value: isNil9(this.srfkey) ? createUUID4() : this.srfkey
8713
+ value: isNil10(this.srfkey) ? createUUID4() : this.srfkey
8709
8714
  });
8710
8715
  }
8711
8716
  Object.defineProperty(this, "srfuf", {
@@ -9429,7 +9434,7 @@ var V7AuthService = class {
9429
9434
  };
9430
9435
 
9431
9436
  // src/service/service/async-action/async-action.service.ts
9432
- import { isNil as isNil10 } from "ramda";
9437
+ import { isNil as isNil11 } from "ramda";
9433
9438
  var AsyncActionService = class {
9434
9439
  /**
9435
9440
  * 获取异步操作的集合
@@ -9440,7 +9445,7 @@ var AsyncActionService = class {
9440
9445
  */
9441
9446
  async fetch(params = {}) {
9442
9447
  const res = await ibiz.net.post("/portal/asyncaction/all", params);
9443
- if (isNil10(res.data)) {
9448
+ if (isNil11(res.data)) {
9444
9449
  res.data = [];
9445
9450
  }
9446
9451
  return res;
@@ -9465,7 +9470,7 @@ import {
9465
9470
  RuntimeError as RuntimeError23,
9466
9471
  RuntimeModelError as RuntimeModelError22
9467
9472
  } from "@ibiz-template/core";
9468
- import { isArray as isArray6, isNil as isNil11 } from "lodash-es";
9473
+ import { isArray as isArray6, isNil as isNil12 } from "lodash-es";
9469
9474
  import { ascSort } from "qx-util";
9470
9475
  import { clone as clone14 } from "ramda";
9471
9476
 
@@ -10870,7 +10875,7 @@ var DEActionMethod = class extends Method {
10870
10875
  let path2 = this.calcPath(context);
10871
10876
  if (this.method.needResourceKey) {
10872
10877
  let srfkey = context[this.entity.codeName.toLowerCase()];
10873
- if (isNil11(srfkey)) {
10878
+ if (isNil12(srfkey)) {
10874
10879
  srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
10875
10880
  }
10876
10881
  path2 = "".concat(path2, "/").concat(srfkey);
@@ -11295,7 +11300,7 @@ import {
11295
11300
  RuntimeModelError as RuntimeModelError23
11296
11301
  } from "@ibiz-template/core";
11297
11302
  import { isArray as isArray7 } from "lodash-es";
11298
- import { clone as clone15, isEmpty as isEmpty7, isNil as isNil12 } from "ramda";
11303
+ import { clone as clone15, isEmpty as isEmpty8, isNil as isNil13 } from "ramda";
11299
11304
  import { ascSort as ascSort2, descSort } from "qx-util";
11300
11305
  var FetchMethod = class extends Method {
11301
11306
  async exec(context, params, params2, header) {
@@ -11372,7 +11377,7 @@ var FetchMethod = class extends Method {
11372
11377
  }
11373
11378
  }
11374
11379
  }
11375
- if (!isNil12(filter.sortField) && !isEmpty7(filter.sortField)) {
11380
+ if (!isNil13(filter.sortField) && !isEmpty8(filter.sortField)) {
11376
11381
  if (filter.sortMode === "DESC") {
11377
11382
  list = descSort(list, filter.sortField);
11378
11383
  } else {
@@ -11439,7 +11444,7 @@ function presetDEMethodProvider() {
11439
11444
  }
11440
11445
 
11441
11446
  // src/service/service/internal-message/internal-message.service.ts
11442
- import { isNil as isNil13 } from "ramda";
11447
+ import { isNil as isNil14 } from "ramda";
11443
11448
  var InternalMessageService = class {
11444
11449
  constructor() {
11445
11450
  /**
@@ -11478,7 +11483,7 @@ var InternalMessageService = class {
11478
11483
  res.total = Number(res.headers["x-total"]);
11479
11484
  }
11480
11485
  }
11481
- if (isNil13(res.data)) {
11486
+ if (isNil14(res.data)) {
11482
11487
  res.data = [];
11483
11488
  }
11484
11489
  return res;
@@ -11504,6 +11509,16 @@ var InternalMessageService = class {
11504
11509
  async markRead(messageId) {
11505
11510
  await ibiz.net.post("".concat(this.baseUrl, "/").concat(messageId, "/mark_read"), {});
11506
11511
  }
11512
+ /**
11513
+ * 批量设置已读
11514
+ * @author lxm
11515
+ * @date 2024-02-04 03:59:52
11516
+ * @param {string} messageId
11517
+ * @return {*} {Promise<void>}
11518
+ */
11519
+ async batchMarkRead() {
11520
+ await ibiz.net.post("".concat(this.baseUrl, "/mark_all_read"), {});
11521
+ }
11507
11522
  /**
11508
11523
  * 获取未读数据的总条数
11509
11524
  * @author lxm
@@ -11684,7 +11699,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
11684
11699
 
11685
11700
  // src/service/vo/tree-node-data/tree-data-set-node-data.ts
11686
11701
  import { updateKeyDefine } from "@ibiz-template/core";
11687
- import { clone as clone16, isNil as isNil14 } from "ramda";
11702
+ import { clone as clone16, isNil as isNil15 } from "ramda";
11688
11703
  var CloneExcludeKeys = [
11689
11704
  "_id",
11690
11705
  "srfnodeid",
@@ -11808,7 +11823,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
11808
11823
  });
11809
11824
  Object.keys(this).forEach((key) => {
11810
11825
  const deKey = getDeKey(key);
11811
- if (isNil14(deKey) && !CloneExcludeKeys.includes(key)) {
11826
+ if (isNil15(deKey) && !CloneExcludeKeys.includes(key)) {
11812
11827
  cloneNodeData[key] = this[key];
11813
11828
  }
11814
11829
  });
@@ -11817,7 +11832,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
11817
11832
  return new Proxy(this, {
11818
11833
  set(target, p, value) {
11819
11834
  const deKey = getDeKey(p);
11820
- if (!isNil14(deKey)) {
11835
+ if (!isNil15(deKey)) {
11821
11836
  target._deData[deKey] = value;
11822
11837
  } else {
11823
11838
  target[p] = value;
@@ -11826,8 +11841,8 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
11826
11841
  },
11827
11842
  get(target, p, _receiver) {
11828
11843
  const deKey = getDeKey(p);
11829
- if (!isNil14(deKey)) {
11830
- return isNil14(target._deData[deKey]) ? getKeyDefault(p) : target._deData[deKey];
11844
+ if (!isNil15(deKey)) {
11845
+ return isNil15(target._deData[deKey]) ? getKeyDefault(p) : target._deData[deKey];
11831
11846
  }
11832
11847
  return target[p];
11833
11848
  },
@@ -11931,7 +11946,7 @@ var TreeStaticNodeData = class extends TreeNodeData {
11931
11946
 
11932
11947
  // src/service/vo/ui-map-field.ts
11933
11948
  import { DataTypes as DataTypes2 } from "@ibiz-template/core";
11934
- import { isNil as isNil15 } from "ramda";
11949
+ import { isNil as isNil16 } from "ramda";
11935
11950
  var UIMapField = class {
11936
11951
  constructor(uiKey, dataKey, opts = {}) {
11937
11952
  /**
@@ -11952,10 +11967,10 @@ var UIMapField = class {
11952
11967
  this.isRequestNeed = true;
11953
11968
  this.uiKey = uiKey;
11954
11969
  this.dataKey = dataKey;
11955
- if (!isNil15(opts.isOriginField)) {
11970
+ if (!isNil16(opts.isOriginField)) {
11956
11971
  this.isOriginField = opts.isOriginField;
11957
11972
  }
11958
- if (!isNil15(opts.dataType)) {
11973
+ if (!isNil16(opts.dataType)) {
11959
11974
  this.dataType = opts.dataType;
11960
11975
  }
11961
11976
  }
@@ -11970,7 +11985,7 @@ var UIMapField = class {
11970
11985
  return value;
11971
11986
  }
11972
11987
  if (DataTypes2.isNumber(this.dataType)) {
11973
- const numVal = !isNil15(value) && value !== "" ? Number(value) : value;
11988
+ const numVal = !isNil16(value) && value !== "" ? Number(value) : value;
11974
11989
  if (Number.isNaN(numVal)) {
11975
11990
  ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
11976
11991
  return value;
@@ -13281,7 +13296,7 @@ var TreeGridExNotifyState = /* @__PURE__ */ ((TreeGridExNotifyState2) => {
13281
13296
  // src/controller/common/view/view.controller.ts
13282
13297
  import { notNilEmpty as notNilEmpty6 } from "qx-util";
13283
13298
  import { IBizContext as IBizContext2, RuntimeError as RuntimeError34 } from "@ibiz-template/core";
13284
- import { isEmpty as isEmpty8, isNil as isNil21, isNotNil as isNotNil2 } from "ramda";
13299
+ import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ramda";
13285
13300
 
13286
13301
  // src/controller/utils/loading/loading.state.ts
13287
13302
  import { NOOP } from "@ibiz-template/core";
@@ -13923,9 +13938,9 @@ function hasSubRoute(routeDepth) {
13923
13938
  }
13924
13939
 
13925
13940
  // src/controller/utils/util/util.ts
13926
- import { isNil as isNil16 } from "ramda";
13941
+ import { isNil as isNil17 } from "ramda";
13927
13942
  function isValueChange(value, value2) {
13928
- if ((isNil16(value) || value === "") && (isNil16(value2) || value2 === "")) {
13943
+ if ((isNil17(value) || value === "") && (isNil17(value2) || value2 === "")) {
13929
13944
  return false;
13930
13945
  }
13931
13946
  return value !== value2;
@@ -13941,7 +13956,7 @@ function getOriginData(data) {
13941
13956
  // src/controller/utils/value-rule/value-rule.ts
13942
13957
  import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
13943
13958
  import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
13944
- import { isNil as isNil17 } from "ramda";
13959
+ import { isNil as isNil18 } from "ramda";
13945
13960
  function generateRules(itemVRs, name, valueItemName) {
13946
13961
  const rules = [];
13947
13962
  itemVRs.forEach((item) => {
@@ -14006,7 +14021,7 @@ function generateEditorRules(editor) {
14006
14021
  if (maxLength) {
14007
14022
  rules.push({
14008
14023
  validator: (rule, value, callback) => {
14009
- if (!isNil17(value) && value.length > maxLength) {
14024
+ if (!isNil18(value) && value.length > maxLength) {
14010
14025
  callback(
14011
14026
  new Error(
14012
14027
  "\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
@@ -14021,7 +14036,7 @@ function generateEditorRules(editor) {
14021
14036
  if (minLength) {
14022
14037
  rules.push({
14023
14038
  validator: (rule, value, callback) => {
14024
- if (!isNil17(value) && value.length < minLength) {
14039
+ if (!isNil18(value) && value.length < minLength) {
14025
14040
  callback(
14026
14041
  new Error(
14027
14042
  "\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
@@ -14033,10 +14048,10 @@ function generateEditorRules(editor) {
14033
14048
  }
14034
14049
  });
14035
14050
  }
14036
- if (!isNil17(maxValue)) {
14051
+ if (!isNil18(maxValue)) {
14037
14052
  rules.push({
14038
14053
  validator: (rule, value, callback) => {
14039
- if (!isNil17(value) && isNumber(value) && value > maxValue) {
14054
+ if (!isNil18(value) && isNumber(value) && value > maxValue) {
14040
14055
  callback(new Error("\u503C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxValue)));
14041
14056
  } else {
14042
14057
  return true;
@@ -14044,10 +14059,10 @@ function generateEditorRules(editor) {
14044
14059
  }
14045
14060
  });
14046
14061
  }
14047
- if (!isNil17(minValue)) {
14062
+ if (!isNil18(minValue)) {
14048
14063
  rules.push({
14049
14064
  validator: (rule, value, callback) => {
14050
- if (!isNil17(value) && isNumber(value) && value < minValue) {
14065
+ if (!isNil18(value) && isNumber(value) && value < minValue) {
14051
14066
  callback(new Error("\u503C\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minValue)));
14052
14067
  } else {
14053
14068
  return true;
@@ -14060,7 +14075,7 @@ function generateEditorRules(editor) {
14060
14075
 
14061
14076
  // src/controller/utils/value-ex/value-ex.ts
14062
14077
  import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
14063
- import { isNil as isNil18, mergeLeft } from "ramda";
14078
+ import { isNil as isNil19, mergeLeft } from "ramda";
14064
14079
  var ValueExUtil = class {
14065
14080
  /**
14066
14081
  * 合并默认值
@@ -14085,7 +14100,7 @@ var ValueExUtil = class {
14085
14100
  * @return {*} {string}
14086
14101
  */
14087
14102
  static toText(options, value) {
14088
- if (isNil18(value) || value === "") {
14103
+ if (isNil19(value) || value === "") {
14089
14104
  return "";
14090
14105
  }
14091
14106
  const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
@@ -14110,12 +14125,12 @@ var ValueExUtil = class {
14110
14125
  import { RuntimeError as RuntimeError31, ModelError as ModelError17 } from "@ibiz-template/core";
14111
14126
  import dayjs from "dayjs";
14112
14127
  import { createUUID as createUUID8 } from "qx-util";
14113
- import { isNil as isNil19, isNotNil } from "ramda";
14128
+ import { isNil as isNil20, isNotNil } from "ramda";
14114
14129
  function getDefaultValue(opts, origins) {
14115
14130
  var _a;
14116
14131
  const { name, valueType, defaultValue, valueFormat } = opts;
14117
14132
  const { data, context, params } = origins;
14118
- if (isNil19(valueType) && isNil19(defaultValue)) {
14133
+ if (isNil20(valueType) && isNil20(defaultValue)) {
14119
14134
  return;
14120
14135
  }
14121
14136
  if (valueType === "RESET") {
@@ -14469,7 +14484,7 @@ var BaseController = class {
14469
14484
 
14470
14485
  // src/controller/utils/view-msg/view-msg-controller.ts
14471
14486
  import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
14472
- import { isNil as isNil20, mergeRight as mergeRight2 } from "ramda";
14487
+ import { isNil as isNil21, mergeRight as mergeRight2 } from "ramda";
14473
14488
  var ViewMsgController = class _ViewMsgController {
14474
14489
  constructor(msgGroupId) {
14475
14490
  this.msgGroupId = msgGroupId;
@@ -14654,19 +14669,19 @@ var ViewMsgController = class _ViewMsgController {
14654
14669
  const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
14655
14670
  const deViewMessages = dataSet.map((item) => {
14656
14671
  const message = {};
14657
- if (positionField && !isNil20(item[positionField])) {
14672
+ if (positionField && !isNil21(item[positionField])) {
14658
14673
  message.position = item[positionField];
14659
14674
  }
14660
- if (titleField && !isNil20(item[titleField])) {
14675
+ if (titleField && !isNil21(item[titleField])) {
14661
14676
  message.title = item[titleField];
14662
14677
  }
14663
- if (messageField && !isNil20(item[messageField])) {
14678
+ if (messageField && !isNil21(item[messageField])) {
14664
14679
  message.message = item[messageField];
14665
14680
  }
14666
- if (typeField && !isNil20(item[typeField])) {
14681
+ if (typeField && !isNil21(item[typeField])) {
14667
14682
  message.messageType = item[typeField];
14668
14683
  }
14669
- if (removeModeField && !isNil20(item[removeModeField])) {
14684
+ if (removeModeField && !isNil21(item[removeModeField])) {
14670
14685
  message.removeMode = item[removeModeField];
14671
14686
  }
14672
14687
  return mergeRight2(basicMsg, message);
@@ -14825,6 +14840,7 @@ var ViewController = class extends BaseController {
14825
14840
  this.state.caption = this.model.caption;
14826
14841
  this.state.srfactiveviewdata = null;
14827
14842
  this.state.viewMessages = {};
14843
+ this.state.isClosing = false;
14828
14844
  }
14829
14845
  async onCreated() {
14830
14846
  await super.onCreated();
@@ -14905,7 +14921,7 @@ var ViewController = class extends BaseController {
14905
14921
  */
14906
14922
  handleContextParams() {
14907
14923
  this.context.srfappid = this.model.appId;
14908
- if (isNil21(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
14924
+ if (isNil22(this.context.srfsessionid) || isEmpty9(this.context.srfsessionid)) {
14909
14925
  const domain = ibiz.uiDomainManager.create(this.id);
14910
14926
  this.context.srfsessionid = domain.id;
14911
14927
  }
@@ -15305,7 +15321,7 @@ var CodeListEditorController = class extends EditorController {
15305
15321
 
15306
15322
  // src/controller/common/control/control.controller.ts
15307
15323
  import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
15308
- import { clone as clone18, isNil as isNil22 } from "ramda";
15324
+ import { clone as clone18, isNil as isNil23 } from "ramda";
15309
15325
  import { notNilEmpty as notNilEmpty7 } from "qx-util";
15310
15326
  var ControlController = class extends BaseController {
15311
15327
  /**
@@ -15593,7 +15609,7 @@ var ControlController = class extends BaseController {
15593
15609
  let message;
15594
15610
  let duration;
15595
15611
  if (msgItem && msgItem.content) {
15596
- duration = isNil22(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
15612
+ duration = isNil23(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
15597
15613
  const scriptParams = { ...this.getEventArgs() };
15598
15614
  if (opts == null ? void 0 : opts.data) {
15599
15615
  scriptParams.data = opts.data;
@@ -15645,6 +15661,13 @@ var MDControlController = class extends ControlController {
15645
15661
  * @protected
15646
15662
  */
15647
15663
  this.commandDataChange = false;
15664
+ /**
15665
+ * 是否设置过排序条件,比如searchBars默认点击分组时设置了
15666
+ * @return {*}
15667
+ * @author: zhujiamin
15668
+ * @Date: 2024-02-22 16:10:23
15669
+ */
15670
+ this.isSetSort = false;
15648
15671
  /**
15649
15672
  * 实体属性映射,key是id,value是name
15650
15673
  * @author lxm
@@ -15716,7 +15739,9 @@ var MDControlController = class extends ControlController {
15716
15739
  fn(msg);
15717
15740
  }, 300);
15718
15741
  ibiz.mc.command.change.on(this.onDataChange);
15719
- this.setSort();
15742
+ if (!this.isSetSort) {
15743
+ this.setSort();
15744
+ }
15720
15745
  }
15721
15746
  async onMounted() {
15722
15747
  await super.onMounted();
@@ -15930,9 +15955,9 @@ var MDControlController = class extends ControlController {
15930
15955
  await this.startLoading();
15931
15956
  let needRefresh = false;
15932
15957
  try {
15933
- const deName = calcDeCodeNameById(this.model.appDataEntityId);
15934
15958
  await handleAllSettled(
15935
15959
  data.map(async (item) => {
15960
+ const deName = this.getRemoveDeName(item);
15936
15961
  if (item.srfuf !== 0 /* CREATE */) {
15937
15962
  const tempContext = context.clone();
15938
15963
  tempContext[deName] = item.srfkey;
@@ -15964,6 +15989,16 @@ var MDControlController = class extends ControlController {
15964
15989
  this.state.selectedData = [];
15965
15990
  await this._evt.emit("onRemoveSuccess", void 0);
15966
15991
  }
15992
+ /**
15993
+ * 获取删除实体codeName
15994
+ * @param {IData} _item
15995
+ * @return {*}
15996
+ * @author: zhujiamin
15997
+ * @Date: 2024-02-22 16:47:44
15998
+ */
15999
+ getRemoveDeName(_item) {
16000
+ return calcDeCodeNameById(this.model.appDataEntityId);
16001
+ }
15967
16002
  /**
15968
16003
  * 后台删除结束后界面删除逻辑
15969
16004
  *
@@ -16626,7 +16661,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
16626
16661
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
16627
16662
  import weekOfYear from "dayjs/plugin/weekOfYear";
16628
16663
  import isoWeek from "dayjs/plugin/isoWeek";
16629
- import { clone as clone20, isNil as isNil23, mergeDeepRight } from "ramda";
16664
+ import { clone as clone20, isNil as isNil24, mergeDeepRight } from "ramda";
16630
16665
  dayjs4.extend(minMax2);
16631
16666
  dayjs4.extend(isSameOrBefore);
16632
16667
  dayjs4.extend(quarterOfYear);
@@ -16722,10 +16757,10 @@ var BaseSeriesGenerator = class {
16722
16757
  * @return {*} {(string | undefined)}
16723
16758
  */
16724
16759
  translateVal(codeListKey, val, isExclude = false) {
16725
- if (isNil23(val)) {
16760
+ if (isNil24(val)) {
16726
16761
  return void 0;
16727
16762
  }
16728
- if (isNil23(codeListKey)) {
16763
+ if (isNil24(codeListKey)) {
16729
16764
  return val;
16730
16765
  }
16731
16766
  const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
@@ -16774,7 +16809,7 @@ var BaseSeriesGenerator = class {
16774
16809
  seriesCodeListId,
16775
16810
  item[this.groupField]
16776
16811
  );
16777
- if (isNil23(groupVal)) {
16812
+ if (isNil24(groupVal)) {
16778
16813
  return;
16779
16814
  }
16780
16815
  group = groupVal;
@@ -19258,6 +19293,10 @@ var UIActionProviderBase = class {
19258
19293
  refreshMode: action.refreshMode,
19259
19294
  closeView: action.closeEditView
19260
19295
  };
19296
+ const { view } = args;
19297
+ if (action.closeEditView) {
19298
+ view.state.isClosing = true;
19299
+ }
19261
19300
  const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
19262
19301
  if (uilogicAttachMode === "REPLACE") {
19263
19302
  if (!appDEUILogicId) {
@@ -19267,12 +19306,12 @@ var UIActionProviderBase = class {
19267
19306
  return result;
19268
19307
  }
19269
19308
  if (!await this.isConfirm(action, args)) {
19270
- return this.returnError(result);
19309
+ return this.returnError(result, view);
19271
19310
  }
19272
19311
  const _result = await this.execAction(action, args);
19273
19312
  Object.assign(result, _result);
19274
19313
  if (result.cancel === true) {
19275
- return this.returnError(result);
19314
+ return this.returnError(result, view);
19276
19315
  }
19277
19316
  if (action.uilogicAttachMode === "AFTER") {
19278
19317
  if (!appDEUILogicId) {
@@ -19296,7 +19335,7 @@ var UIActionProviderBase = class {
19296
19335
  if (nextResult) {
19297
19336
  Object.assign(result, nextResult);
19298
19337
  if (nextResult.cancel === true) {
19299
- return this.returnError(result);
19338
+ return this.returnError(result, view);
19300
19339
  }
19301
19340
  }
19302
19341
  }
@@ -19328,7 +19367,8 @@ var UIActionProviderBase = class {
19328
19367
  * @returns {*} {IUIActionResult}
19329
19368
  * @memberof UIActionHandler
19330
19369
  */
19331
- returnError(result) {
19370
+ returnError(result, view) {
19371
+ view.state.isClosing = false;
19332
19372
  return Object.assign(result, {
19333
19373
  refresh: false,
19334
19374
  closeView: false
@@ -20586,7 +20626,7 @@ var RawItemPortletController = class extends PortletPartController {
20586
20626
 
20587
20627
  // src/controller/control/data-view/data-view.controller.ts
20588
20628
  import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
20589
- import { isNil as isNil24 } from "ramda";
20629
+ import { isNil as isNil25 } from "ramda";
20590
20630
 
20591
20631
  // src/controller/control/data-view/data-view.service.ts
20592
20632
  var DataViewControlService = class extends MDControlService {
@@ -20874,7 +20914,7 @@ var DataViewControlController = class extends MDControlController {
20874
20914
  const groupMap = /* @__PURE__ */ new Map();
20875
20915
  items.forEach((item) => {
20876
20916
  const groupVal = item[groupAppDEFieldId];
20877
- if (isNil24(groupVal)) {
20917
+ if (isNil25(groupVal)) {
20878
20918
  return;
20879
20919
  }
20880
20920
  if (!groupMap.has(groupVal)) {
@@ -24597,7 +24637,9 @@ var EditFormController = class extends FormController {
24597
24637
  }
24598
24638
  this.state.modified = false;
24599
24639
  await this.evt.emit("onSaveSuccess", void 0);
24600
- this.formStateNotify("SAVE" /* SAVE */);
24640
+ if (!this.view.state.isClosing) {
24641
+ this.formStateNotify("SAVE" /* SAVE */);
24642
+ }
24601
24643
  if (!silent) {
24602
24644
  this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "SUCCESS"), {
24603
24645
  default: "".concat(this.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F")
@@ -26279,6 +26321,7 @@ var GridController = class extends MDControlController {
26279
26321
  setGroupParams(data) {
26280
26322
  if (data.sort) {
26281
26323
  this.state.sortQuery = data.sort;
26324
+ this.isSetSort = true;
26282
26325
  } else {
26283
26326
  this.state.sortQuery = "";
26284
26327
  }
@@ -26336,7 +26379,7 @@ var GridController = class extends MDControlController {
26336
26379
  import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
26337
26380
  import dayjs5 from "dayjs";
26338
26381
  import { debounce as debounce3 } from "lodash-es";
26339
- import { clone as clone27, isNil as isNil25 } from "ramda";
26382
+ import { clone as clone27, isNil as isNil26 } from "ramda";
26340
26383
  var GridFieldColumnController = class extends GridColumnController {
26341
26384
  constructor() {
26342
26385
  super(...arguments);
@@ -26548,11 +26591,11 @@ var GridFieldColumnController = class extends GridColumnController {
26548
26591
  */
26549
26592
  calcFieldAgg(items) {
26550
26593
  const { aggField, aggMode, aggValueFormat, unitName } = this.model;
26551
- if (isNil25(aggMode) || aggMode === "NONE") {
26594
+ if (isNil26(aggMode) || aggMode === "NONE") {
26552
26595
  return;
26553
26596
  }
26554
26597
  const fieldName = aggField || this.model.id;
26555
- items = items.filter((item) => !isNil25(item[fieldName]));
26598
+ items = items.filter((item) => !isNil26(item[fieldName]));
26556
26599
  let aggValue;
26557
26600
  if (this.grid.model.aggMode === "PAGE") {
26558
26601
  switch (aggMode) {
@@ -27868,7 +27911,7 @@ var PickupViewPanelController = class extends ControlController {
27868
27911
 
27869
27912
  // src/controller/control/search-bar/search-bar.controller.ts
27870
27913
  import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
27871
- import { clone as clone28, isNil as isNil27 } from "ramda";
27914
+ import { clone as clone28, isNil as isNil28 } from "ramda";
27872
27915
  import { isString as isString2 } from "lodash-es";
27873
27916
 
27874
27917
  // src/controller/control/search-bar/search-bar-filter.controller.ts
@@ -28310,7 +28353,7 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
28310
28353
 
28311
28354
  // src/controller/control/search-bar/use-searchcond.ts
28312
28355
  import { RuntimeError as RuntimeError58, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
28313
- import { isNil as isNil26 } from "ramda";
28356
+ import { isNil as isNil27 } from "ramda";
28314
28357
  function getOriginFilterNodes() {
28315
28358
  return [
28316
28359
  {
@@ -28367,7 +28410,7 @@ function calcSearchConds(filterNodes) {
28367
28410
  let hasError = false;
28368
28411
  recursiveIterate9(filterNodes[0], (node) => {
28369
28412
  if (node.leaf) {
28370
- if (node.field && node.valueOP && !isNil26(node.value)) {
28413
+ if (node.field && node.valueOP && !isNil27(node.value)) {
28371
28414
  hasFilter = true;
28372
28415
  } else {
28373
28416
  hasError = true;
@@ -28666,7 +28709,7 @@ var SearchBarController = class extends ControlController {
28666
28709
  recursiveIterate10(
28667
28710
  searchconds[0],
28668
28711
  (node) => {
28669
- if (node.condtype === "DEFIELD" && !isNil27(node.value)) {
28712
+ if (node.condtype === "DEFIELD" && !isNil28(node.value)) {
28670
28713
  const controller = this.findFilterController(
28671
28714
  node.fieldname,
28672
28715
  node.condop
@@ -30107,6 +30150,20 @@ var TreeController = class extends MDControlController {
30107
30150
  nodeData._text = text;
30108
30151
  await this.updateDeNodeData([nodeData]);
30109
30152
  }
30153
+ /**
30154
+ * 获取删除实体codeName
30155
+ * @param {IData} item
30156
+ * @return {*}
30157
+ * @author: zhujiamin
30158
+ * @Date: 2024-02-22 16:47:44
30159
+ */
30160
+ getRemoveDeName(item) {
30161
+ const treeNode = this.getNodeModel(item._nodeId);
30162
+ if (treeNode) {
30163
+ return calcDeCodeNameById(treeNode.appDataEntityId);
30164
+ }
30165
+ return calcDeCodeNameById(this.model.appDataEntityId);
30166
+ }
30110
30167
  };
30111
30168
 
30112
30169
  // src/controller/control/wizard-panel/wizard-panel.controller.ts
@@ -30463,7 +30520,7 @@ var WizardPanelController = class extends ControlController {
30463
30520
 
30464
30521
  // src/controller/control/md-ctrl/md-ctrl.controller.ts
30465
30522
  import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
30466
- import { isNil as isNil28 } from "ramda";
30523
+ import { isNil as isNil29 } from "ramda";
30467
30524
 
30468
30525
  // src/controller/control/md-ctrl/md-ctrl.service.ts
30469
30526
  var MDCtrlService = class extends MDControlService {
@@ -30690,7 +30747,7 @@ var MDCtrlController = class extends MDControlController {
30690
30747
  const groupMap = /* @__PURE__ */ new Map();
30691
30748
  items.forEach((item) => {
30692
30749
  const groupVal = item[groupAppDEFieldId];
30693
- if (isNil28(groupVal)) {
30750
+ if (isNil29(groupVal)) {
30694
30751
  return;
30695
30752
  }
30696
30753
  if (!groupMap.has(groupVal)) {
@@ -30767,7 +30824,7 @@ var MDCtrlController = class extends MDControlController {
30767
30824
 
30768
30825
  // src/controller/control/kanban/kanban.controller.ts
30769
30826
  import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
30770
- import { isNil as isNil29 } from "ramda";
30827
+ import { isNil as isNil30 } from "ramda";
30771
30828
 
30772
30829
  // src/controller/control/kanban/kanban.service.ts
30773
30830
  var KanbanService = class extends DataViewControlService {
@@ -30852,7 +30909,7 @@ var KanbanController = class extends DataViewControlController {
30852
30909
  const isAsc = minorSortDir === "ASC";
30853
30910
  items.forEach((item) => {
30854
30911
  const sortValue = item[sortField];
30855
- if (isNil29(sortValue)) {
30912
+ if (isNil30(sortValue)) {
30856
30913
  item[sortField] = 0;
30857
30914
  } else {
30858
30915
  const toNum = Number(sortValue);
@@ -30959,7 +31016,7 @@ var KanbanController = class extends DataViewControlController {
30959
31016
  const groupMap = /* @__PURE__ */ new Map();
30960
31017
  items.forEach((item) => {
30961
31018
  const groupVal = item[groupAppDEFieldId];
30962
- if (isNil29(groupVal)) {
31019
+ if (isNil30(groupVal)) {
30963
31020
  return;
30964
31021
  }
30965
31022
  if (!groupMap.has(groupVal)) {
@@ -33540,7 +33597,7 @@ var GanttController = class extends TreeGridExController {
33540
33597
  /**
33541
33598
  * 保存
33542
33599
  *
33543
- * @param {ITreeNodeData} nodeData
33600
+ * @param {IGanttNodeData} nodeData
33544
33601
  * @return {*} {Promise<void>}
33545
33602
  * @memberof GanttController
33546
33603
  */
@@ -33567,9 +33624,6 @@ var GanttController = class extends TreeGridExController {
33567
33624
  const nodeModel = this.getNodeModel(nodeData._nodeId);
33568
33625
  const { appDataEntityId } = nodeModel;
33569
33626
  const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
33570
- if (isCreate) {
33571
- return;
33572
- }
33573
33627
  const deName = calcDeCodeNameById(appDataEntityId);
33574
33628
  const tempContext = this.context.clone();
33575
33629
  tempContext[deName] = nodeData._deData.srfkey;
@@ -33806,7 +33860,7 @@ import { QXEvent as QXEvent9 } from "qx-util";
33806
33860
  // src/controller/notification/async-action.controller.ts
33807
33861
  import { QXEvent as QXEvent7 } from "qx-util";
33808
33862
  import { clone as clone31 } from "ramda";
33809
- import { isNil as isNil30, isNumber as isNumber2 } from "lodash-es";
33863
+ import { isNil as isNil31, isNumber as isNumber2 } from "lodash-es";
33810
33864
  import dayjs7 from "dayjs";
33811
33865
  var AsyncActionController = class {
33812
33866
  constructor() {
@@ -33881,14 +33935,14 @@ var AsyncActionController = class {
33881
33935
  data[key] = dayjs7(data[key]).format("YYYY-MM-DD HH:mm:ss");
33882
33936
  }
33883
33937
  });
33884
- if (!isNil30(data.actionresult)) {
33938
+ if (!isNil31(data.actionresult)) {
33885
33939
  try {
33886
33940
  const json = JSON.parse(data.actionresult);
33887
33941
  data.actionresult = json;
33888
33942
  } catch (error) {
33889
33943
  }
33890
33944
  }
33891
- if (!isNil30(data.completionrate)) {
33945
+ if (!isNil31(data.completionrate)) {
33892
33946
  const num = Number(data.completionrate);
33893
33947
  if (Number.isNaN(num)) {
33894
33948
  data.completionrate = void 0;
@@ -34062,14 +34116,12 @@ var InternalMessageController = class {
34062
34116
  position: "bottom-right"
34063
34117
  });
34064
34118
  }
34119
+ this.refreshUnreadCount();
34065
34120
  });
34066
34121
  }
34067
34122
  async markRead(message) {
34068
- if (message.status !== "RECEIVED") {
34069
- return;
34070
- }
34071
34123
  const find = this.messages.find((msg) => msg.id === message.id);
34072
- if (!find) {
34124
+ if (!find || find.status !== "RECEIVED") {
34073
34125
  return;
34074
34126
  }
34075
34127
  await this.service.markRead(message.id);
@@ -34078,6 +34130,18 @@ var InternalMessageController = class {
34078
34130
  this.evt.emit("unreadCountChange", this.unreadCount);
34079
34131
  this.evt.emit("dataChange");
34080
34132
  }
34133
+ /**
34134
+ * 把所有未读消息标记为已读
34135
+ * @return {*}
34136
+ * @author: zhujiamin
34137
+ * @Date: 2024-02-21 15:38:25
34138
+ */
34139
+ async batchMarkRead() {
34140
+ await this.service.batchMarkRead();
34141
+ await this.fetch();
34142
+ this.unreadCount = 0;
34143
+ this.evt.emit("unreadCountChange", this.unreadCount);
34144
+ }
34081
34145
  /**
34082
34146
  * 获取完整信息
34083
34147
  * @author lxm
@@ -34880,7 +34944,7 @@ var MDViewEngine = class extends ViewEngineBase {
34880
34944
  });
34881
34945
  }
34882
34946
  if (!this.view.state.noLoadDefault && model.loadDefault) {
34883
- if (this.searchBar && this.searchBar.hasDefaultSelect && this.xdataControlName === "grid") {
34947
+ if (this.searchBar && this.searchBar.hasDefaultSelect && (this.xdataControlName === "grid" || this.xdataControlName === "treegrid")) {
34884
34948
  this.searchBar.setDefaultSelect();
34885
34949
  } else {
34886
34950
  this.load();
@@ -36353,6 +36417,14 @@ var PluginStaticResource = class {
36353
36417
  * @param {string} mateUrl import.mate.url
36354
36418
  */
36355
36419
  constructor(mateUrl) {
36420
+ /**
36421
+ * 是否为 http || https 开头
36422
+ *
36423
+ * @author chitanda
36424
+ * @date 2022-11-07 14:11:28
36425
+ * @protected
36426
+ */
36427
+ this.urlReg = /^http[s]?:\/\/[^\s]*/;
36356
36428
  /**
36357
36429
  * 已经输出过路径的 style 标签
36358
36430
  *
@@ -36374,6 +36446,9 @@ var PluginStaticResource = class {
36374
36446
  * @return {*} {string}
36375
36447
  */
36376
36448
  dir(pathStr) {
36449
+ if (this.urlReg.test(pathStr)) {
36450
+ return pathStr;
36451
+ }
36377
36452
  return this.url.origin + path.resolve(this.baseDir, pathStr);
36378
36453
  }
36379
36454
  /**
@@ -36386,7 +36461,7 @@ var PluginStaticResource = class {
36386
36461
  */
36387
36462
  async loadStyle(urls) {
36388
36463
  const all = urls.map((styleUrl) => {
36389
- const url = this.dir(styleUrl);
36464
+ const url = this.urlReg.test(styleUrl) ? styleUrl : this.dir(styleUrl);
36390
36465
  if (this.styleElementMap.has(url)) {
36391
36466
  return false;
36392
36467
  }