@ibiz-template/runtime 0.6.1-dev.2 → 0.6.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.
- package/dist/index.esm.js +904 -307
- package/dist/index.system.min.js +1 -1
- package/out/application.js +7 -7
- package/out/controller/common/base.controller.d.ts +9 -0
- package/out/controller/common/base.controller.d.ts.map +1 -1
- package/out/controller/common/base.controller.js +12 -0
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +20 -15
- package/out/controller/common/control/md-control.controller.d.ts +14 -0
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +30 -10
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +2 -1
- package/out/controller/control/app-menu/app-menu.controller.js +1 -1
- package/out/controller/control/calendar/calendar.controller.d.ts +31 -1
- package/out/controller/control/calendar/calendar.controller.d.ts.map +1 -1
- package/out/controller/control/calendar/calendar.controller.js +67 -0
- package/out/controller/control/chart/chart.controller.d.ts.map +1 -1
- package/out/controller/control/chart/chart.controller.js +1 -0
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +3 -1
- package/out/controller/control/form/form/form.controller.d.ts +18 -1
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +69 -0
- package/out/controller/control/gantt/gantt.controller.d.ts +50 -3
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +91 -11
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +7 -2
- package/out/controller/control/tree/tree.controller.d.ts +7 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +26 -1
- package/out/controller/control/tree/tree.service.d.ts +22 -0
- package/out/controller/control/tree/tree.service.d.ts.map +1 -1
- package/out/controller/control/tree/tree.service.js +30 -0
- package/out/controller/notification/internal-message.controller.d.ts +7 -0
- package/out/controller/notification/internal-message.controller.d.ts.map +1 -1
- package/out/controller/notification/internal-message.controller.js +24 -2
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.js +3 -1
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.js +12 -3
- package/out/de-logic/de-logic-node/append-param-node/append-param-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/append-param-node/append-param-node.js +1 -0
- package/out/de-logic/de-logic-node/bind-param-node/bind-param-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/bind-param-node/bind-param-node.js +1 -0
- package/out/de-logic/de-logic-node/copy-param-node/copy-param-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/copy-param-node/copy-param-node.js +1 -0
- package/out/de-logic/de-logic-node/data-set-node/data-set-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/data-set-node/data-set-node.js +1 -0
- package/out/de-logic/de-logic-node/de-action-node/de-action-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/de-action-node/de-action-node.js +1 -0
- package/out/de-logic/de-logic-node/end-node/end-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/end-node/end-node.js +1 -0
- package/out/de-logic/de-logic-node/prepare-param-node/prepare-param-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/prepare-param-node/prepare-param-node.js +22 -7
- package/out/de-logic/de-logic-node/renew-param-node/renew-param-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/renew-param-node/renew-param-node.js +1 -0
- package/out/de-logic/de-logic-node/reset-param-node/reset-param-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/reset-param-node/reset-param-node.js +1 -0
- package/out/de-logic/de-logic-node/sort-param-node/sort-param-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/sort-param-node/sort-param-node.js +1 -0
- package/out/de-logic/de-logic-node/start-node/start-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/start-node/start-node.js +1 -0
- package/out/de-logic/de-logic-node/throw-exception-node/throw-exception-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/throw-exception-node/throw-exception-node.js +1 -0
- package/out/de-logic/de-logic-param/de-logic-param.d.ts.map +1 -1
- package/out/de-logic/de-logic-param/de-logic-param.js +2 -0
- package/out/de-logic/index.d.ts.map +1 -1
- package/out/de-logic/index.js +4 -1
- package/out/engine/md-view.engine.js +1 -1
- package/out/hub/config/app-view-config-service.d.ts.map +1 -1
- package/out/hub/config/app-view-config-service.js +1 -0
- package/out/interface/controller/controller/control/i-gantt.controller.d.ts +31 -2
- package/out/interface/controller/controller/control/i-gantt.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts +7 -0
- package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts.map +1 -1
- package/out/interface/controller/state/view/i-view.state.d.ts +7 -0
- package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
- package/out/interface/util/i-notification-util/i-notification-util.d.ts +14 -0
- package/out/interface/util/i-notification-util/i-notification-util.d.ts.map +1 -1
- package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts +8 -0
- package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts.map +1 -1
- package/out/plugin/plugin-static-resource/plugin-static-resource.js +12 -1
- package/out/service/service/internal-message/internal-message.service.d.ts +8 -0
- package/out/service/service/internal-message/internal-message.service.d.ts.map +1 -1
- package/out/service/service/internal-message/internal-message.service.js +10 -0
- package/out/types.d.ts +1 -1
- package/out/types.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.d.ts +2 -2
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +9 -4
- package/out/ui-logic/index.d.ts.map +1 -1
- package/out/ui-logic/index.js +4 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.js +3 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.js +12 -3
- package/out/ui-logic/ui-logic-node/append-param-node/append-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/append-param-node/append-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/copy-param-node/copy-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/copy-param-node/copy-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/data-set-node/data-set-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/data-set-node/data-set-node.js +1 -0
- package/out/ui-logic/ui-logic-node/de-action-node/de-action-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/de-action-node/de-action-node.js +1 -0
- package/out/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.js +2 -1
- package/out/ui-logic/ui-logic-node/end-node/end-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/end-node/end-node.js +1 -0
- package/out/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.js +1 -0
- package/out/ui-logic/ui-logic-node/msg-box-node/msg-box-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/msg-box-node/msg-box-node.js +1 -0
- package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.js +1 -0
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.js +6 -0
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.js +1 -0
- package/out/ui-logic/ui-logic-node/renew-param-node/renew-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/renew-param-node/renew-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/reset-param-node/reset-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/reset-param-node/reset-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/sort-param-node/sort-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/sort-param-node/sort-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/start-node/start-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/start-node/start-node.js +1 -0
- package/out/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.js +1 -0
- package/out/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.js +1 -0
- package/out/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.js +1 -0
- package/out/ui-logic/ui-logic-param/ui-logic-param.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +2 -0
- package/out/utils/handlebars/helpers/not/not.d.ts.map +1 -1
- package/out/utils/handlebars/helpers/not/not.js +2 -1
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +3 -0
- package/out/utils/script/script-function.d.ts.map +1 -1
- package/out/utils/script/script-function.js +1 -0
- 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(
|
|
237
|
-
|
|
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 =
|
|
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 ||
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
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 (
|
|
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
|
|
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 ||
|
|
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 (
|
|
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 && !
|
|
5329
|
-
if (
|
|
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
|
|
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 ||
|
|
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
|
|
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
|
|
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 (!
|
|
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 (!
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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
|
|
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 (!
|
|
7187
|
+
if (!isNil8(data.page) && !isEmpty7(data.page)) {
|
|
7183
7188
|
this.page = data.page;
|
|
7184
7189
|
}
|
|
7185
|
-
if (!
|
|
7190
|
+
if (!isNil8(data.size) && !isEmpty7(data.size)) {
|
|
7186
7191
|
this.size = data.size;
|
|
7187
7192
|
}
|
|
7188
|
-
if (!
|
|
7193
|
+
if (!isNil8(data.query) && !isEmpty7(data.query)) {
|
|
7189
7194
|
this.query = data.query;
|
|
7190
7195
|
}
|
|
7191
|
-
if (!
|
|
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
|
|
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:
|
|
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 (
|
|
8101
|
+
if (isNil9(dataType)) {
|
|
8097
8102
|
return value;
|
|
8098
8103
|
}
|
|
8099
8104
|
if (DataTypes.isNumber(dataType)) {
|
|
8100
|
-
const numVal = !
|
|
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
|
|
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:
|
|
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
|
|
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 (
|
|
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
|
|
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
|
|
|
@@ -9887,6 +9892,8 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
9887
9892
|
*/
|
|
9888
9893
|
test(ctx, context, data) {
|
|
9889
9894
|
const dst = ctx.params[this.dstParam];
|
|
9895
|
+
let result;
|
|
9896
|
+
let compareValue;
|
|
9890
9897
|
switch (this.type) {
|
|
9891
9898
|
case "ENTITYFIELD": {
|
|
9892
9899
|
if (!this.value) {
|
|
@@ -9896,7 +9903,9 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
9896
9903
|
);
|
|
9897
9904
|
}
|
|
9898
9905
|
const value = data[this.value] != null ? data[this.value] : context[this.value];
|
|
9899
|
-
|
|
9906
|
+
compareValue = value;
|
|
9907
|
+
result = testCond(dst[this.dstField], this.op, value);
|
|
9908
|
+
break;
|
|
9900
9909
|
}
|
|
9901
9910
|
case "SRCENTITYFIELD": {
|
|
9902
9911
|
if (!this.value) {
|
|
@@ -9906,13 +9915,26 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
9906
9915
|
);
|
|
9907
9916
|
}
|
|
9908
9917
|
const src = ctx.params[this.srcParam];
|
|
9909
|
-
|
|
9918
|
+
compareValue = src[this.value];
|
|
9919
|
+
result = testCond(dst[this.dstField], this.op, src[this.value]);
|
|
9920
|
+
break;
|
|
9910
9921
|
}
|
|
9911
9922
|
case "CURTIME":
|
|
9912
9923
|
throw new ModelError8(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
|
|
9913
9924
|
default:
|
|
9914
|
-
|
|
9925
|
+
compareValue = this.value;
|
|
9926
|
+
result = testCond(dst[this.dstField], this.op, this.value);
|
|
9915
9927
|
}
|
|
9928
|
+
ibiz.log.debug(
|
|
9929
|
+
"\u5B9E\u4F53\u903B\u8F91\u8FDE\u63A5\u6761\u4EF6\u9879\uFF1A".concat(this.model.name, "-\u6761\u4EF6\u503C\u7C7B\u578B\uFF1A").concat(this.type, "-\u6E90\u5C5E\u6027\u540D\u79F0\uFF1A").concat(this.dstField, "-\u6E90\u5BF9\u8C61\u503C\uFF1A"),
|
|
9930
|
+
dst[this.dstField],
|
|
9931
|
+
"-\u5BF9\u6BD4\u6761\u4EF6\uFF1A".concat(this.op),
|
|
9932
|
+
"-\u5BF9\u6BD4\u503C",
|
|
9933
|
+
compareValue,
|
|
9934
|
+
"-\u5BF9\u6BD4\u7ED3\u679C\uFF1A",
|
|
9935
|
+
result
|
|
9936
|
+
);
|
|
9937
|
+
return result;
|
|
9916
9938
|
}
|
|
9917
9939
|
};
|
|
9918
9940
|
|
|
@@ -9977,7 +9999,12 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
|
|
|
9977
9999
|
break;
|
|
9978
10000
|
}
|
|
9979
10001
|
}
|
|
9980
|
-
|
|
10002
|
+
const result = this.notMode ? !bol : bol;
|
|
10003
|
+
ibiz.log.debug(
|
|
10004
|
+
"\u5B9E\u4F53\u903B\u8F91\u8FDE\u63A5\u6761\u4EF6\u7EC4\u540D\u79F0\uFF1A".concat(this.model.name, "-\u6761\u4EF6\u7EC4\u6807\u8BC6\uFF1A").concat(this.model.id, "-\u8FD0\u884C\u7ED3\u679C\uFF1A"),
|
|
10005
|
+
result
|
|
10006
|
+
);
|
|
10007
|
+
return result;
|
|
9981
10008
|
}
|
|
9982
10009
|
};
|
|
9983
10010
|
|
|
@@ -10083,12 +10110,17 @@ var DEActionNode = class extends DELogicNode {
|
|
|
10083
10110
|
if (res.ok) {
|
|
10084
10111
|
ctx.params[retDELogicParamId] = res.data;
|
|
10085
10112
|
}
|
|
10113
|
+
ibiz.log.debug(
|
|
10114
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u5B9E\u4F53\u884C\u4E3A\uFF09\uFF1A".concat(this.model.id, "-\u754C\u9762\u884C\u4E3A\u6240\u5C5E\u5B9E\u4F53\uFF1A").concat(dstAppDataEntityId, "-\u5B9E\u4F53\u884C\u4E3A\u6807\u8BC6\uFF1A").concat(dstAppDEActionId, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(retDELogicParamId, "-\u503C\uFF1A"),
|
|
10115
|
+
ctx.params[retDELogicParamId]
|
|
10116
|
+
);
|
|
10086
10117
|
}
|
|
10087
10118
|
};
|
|
10088
10119
|
|
|
10089
10120
|
// src/de-logic/de-logic-node/start-node/start-node.ts
|
|
10090
10121
|
var StartNode = class extends DELogicNode {
|
|
10091
10122
|
async exec(_ctx) {
|
|
10123
|
+
ibiz.log.debug("\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u542F\u52A8\u8282\u70B9\uFF09\uFF1A".concat(this.model.id));
|
|
10092
10124
|
}
|
|
10093
10125
|
};
|
|
10094
10126
|
|
|
@@ -10122,6 +10154,10 @@ var EndNode = class extends DELogicNode {
|
|
|
10122
10154
|
"\u6682\u672A\u652F\u6301\u7684\u7ED3\u675F\u8282\u70B9\u8FD4\u56DE\u503C\u7C7B\u578B: ".concat(returnType)
|
|
10123
10155
|
);
|
|
10124
10156
|
}
|
|
10157
|
+
ibiz.log.debug(
|
|
10158
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u7ED3\u675F\u8282\u70B9\uFF09\uFF1A".concat(this.model.id, "-\u8FD4\u56DE\u503C\u7C7B\u578B\uFF1A").concat(returnType, "-\u8FD4\u56DE\u503C\uFF1A"),
|
|
10159
|
+
ctx.result
|
|
10160
|
+
);
|
|
10125
10161
|
}
|
|
10126
10162
|
};
|
|
10127
10163
|
|
|
@@ -10204,27 +10240,46 @@ var PrepareParamNode = class extends DELogicNode {
|
|
|
10204
10240
|
if (nodeParams == null ? void 0 : nodeParams.length) {
|
|
10205
10241
|
await Promise.all(
|
|
10206
10242
|
nodeParams.map((nodeParam) => {
|
|
10243
|
+
let result;
|
|
10244
|
+
let originValue;
|
|
10245
|
+
if (nodeParam.dstDELogicParamId) {
|
|
10246
|
+
originValue = clone10(ctx.params[nodeParam.dstDELogicParamId]);
|
|
10247
|
+
}
|
|
10207
10248
|
switch (nodeParam.paramAction) {
|
|
10208
10249
|
case "SETPARAMVALUE":
|
|
10209
|
-
|
|
10250
|
+
result = this.setParamValue(nodeParam, ctx);
|
|
10251
|
+
break;
|
|
10210
10252
|
case "RESETPARAM":
|
|
10211
|
-
|
|
10253
|
+
result = this.resetParam(nodeParam, ctx);
|
|
10254
|
+
break;
|
|
10212
10255
|
case "COPYPARAM":
|
|
10213
|
-
|
|
10256
|
+
result = this.copyParam(nodeParam, ctx);
|
|
10257
|
+
break;
|
|
10214
10258
|
case "BINDPARAM":
|
|
10215
|
-
|
|
10259
|
+
result = this.bindParam(nodeParam, ctx);
|
|
10260
|
+
break;
|
|
10216
10261
|
case "RENEWPARAM":
|
|
10217
|
-
|
|
10262
|
+
result = this.renewParam(nodeParam, ctx);
|
|
10263
|
+
break;
|
|
10218
10264
|
case "APPENDPARAM":
|
|
10219
|
-
|
|
10265
|
+
result = this.appendParam(nodeParam, ctx);
|
|
10266
|
+
break;
|
|
10220
10267
|
case "SORTPARAM":
|
|
10221
|
-
|
|
10268
|
+
result = this.sortParam(nodeParam, ctx);
|
|
10269
|
+
break;
|
|
10222
10270
|
default:
|
|
10223
10271
|
throw new ModelError11(
|
|
10224
10272
|
nodeParam,
|
|
10225
10273
|
"\u6682\u672A\u652F\u6301\u903B\u8F91\u5904\u7406\u53C2\u6570\u64CD\u4F5C".concat(nodeParam.paramAction)
|
|
10226
10274
|
);
|
|
10227
10275
|
}
|
|
10276
|
+
ibiz.log.debug(
|
|
10277
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u51C6\u5907\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u5904\u7406\u64CD\u4F5C\uFF1A").concat(nodeParam.paramAction, "-\u76EE\u6807\u903B\u8F91\u53C2\u6570\uFF1A").concat(nodeParam.dstDELogicParamId, "-\u6E90\u53C2\u6570\uFF08\u503C\uFF09\uFF1A"),
|
|
10278
|
+
originValue,
|
|
10279
|
+
"-\u76EE\u6807\u53C2\u6570\uFF08\u503C\uFF09\uFF1A",
|
|
10280
|
+
ctx.params[nodeParam.dstDELogicParamId]
|
|
10281
|
+
);
|
|
10282
|
+
return result;
|
|
10228
10283
|
})
|
|
10229
10284
|
);
|
|
10230
10285
|
}
|
|
@@ -10358,6 +10413,10 @@ var DataSetNode = class extends DELogicNode {
|
|
|
10358
10413
|
if (res.ok) {
|
|
10359
10414
|
ctx.params[retDELogicParamId] = res.data;
|
|
10360
10415
|
}
|
|
10416
|
+
ibiz.log.debug(
|
|
10417
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u6570\u636E\u96C6\u5408\uFF09\uFF1A".concat(this.model.id, "-\u6570\u636E\u96C6\u5B9E\u4F53\u6807\u8BC6\uFF1A").concat(dstAppDataEntityId, "-\u6570\u636E\u96C6\u6807\u8BC6\uFF1A").concat(dstAppDEDataSetId, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(retDELogicParamId, "-\u503C\uFF1A"),
|
|
10418
|
+
ctx.params[retDELogicParamId]
|
|
10419
|
+
);
|
|
10361
10420
|
}
|
|
10362
10421
|
};
|
|
10363
10422
|
|
|
@@ -10374,6 +10433,10 @@ var BindParamNode = class extends DELogicNode {
|
|
|
10374
10433
|
}
|
|
10375
10434
|
const srcVal = handleSrcVal(ctx, this.model);
|
|
10376
10435
|
ctx.params[dstDELogicParamId] = srcVal;
|
|
10436
|
+
ibiz.log.debug(
|
|
10437
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u7ED1\u5B9A\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDELogicParamId, "-\u503C\uFF1A"),
|
|
10438
|
+
srcVal
|
|
10439
|
+
);
|
|
10377
10440
|
}
|
|
10378
10441
|
};
|
|
10379
10442
|
|
|
@@ -10386,6 +10449,9 @@ var ResetParamNode = class extends DELogicNode {
|
|
|
10386
10449
|
throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
10387
10450
|
}
|
|
10388
10451
|
ctx.resetParam(dstDELogicParamId);
|
|
10452
|
+
ibiz.log.debug(
|
|
10453
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u91CD\u7F6E\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u91CD\u7F6E\u53C2\u6570\uFF1A").concat(dstDELogicParamId)
|
|
10454
|
+
);
|
|
10389
10455
|
}
|
|
10390
10456
|
};
|
|
10391
10457
|
|
|
@@ -10398,6 +10464,9 @@ var RenewParamNode = class extends DELogicNode {
|
|
|
10398
10464
|
throw new RuntimeModelError17(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
10399
10465
|
}
|
|
10400
10466
|
ctx.renewParam(dstDELogicParamId);
|
|
10467
|
+
ibiz.log.debug(
|
|
10468
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u91CD\u65B0\u5EFA\u7ACB\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u91CD\u5EFA\u53C2\u6570\uFF1A").concat(dstDELogicParamId)
|
|
10469
|
+
);
|
|
10401
10470
|
}
|
|
10402
10471
|
};
|
|
10403
10472
|
|
|
@@ -10415,6 +10484,10 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
10415
10484
|
}
|
|
10416
10485
|
const srcVal = handleSrcVal(ctx, this.model);
|
|
10417
10486
|
ctx.params[dstDELogicParamId] = clone11(srcVal);
|
|
10487
|
+
ibiz.log.debug(
|
|
10488
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u62F7\u8D1D\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDELogicParamId, "-\u503C\uFF1A"),
|
|
10489
|
+
srcVal
|
|
10490
|
+
);
|
|
10418
10491
|
}
|
|
10419
10492
|
};
|
|
10420
10493
|
|
|
@@ -10431,6 +10504,10 @@ var SortParamNode = class extends DELogicNode {
|
|
|
10431
10504
|
arr.sort((a, b) => {
|
|
10432
10505
|
return dstSortDir === "ASC" ? a[key] - b[key] : b[key] - a[key];
|
|
10433
10506
|
});
|
|
10507
|
+
ibiz.log.debug(
|
|
10508
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u6392\u5E8F\u6570\u7EC4\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u6392\u5E8F\u5C5E\u6027\uFF1A").concat(dstFieldName, "-\u6392\u5E8F\u6A21\u5F0F\uFF1A").concat(dstSortDir, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDELogicParamId, "-\u6392\u5E8F\u540E\u6570\u7EC4\uFF1A"),
|
|
10509
|
+
arr
|
|
10510
|
+
);
|
|
10434
10511
|
}
|
|
10435
10512
|
};
|
|
10436
10513
|
|
|
@@ -10460,6 +10537,12 @@ var AppendParamNode = class extends DELogicNode {
|
|
|
10460
10537
|
0,
|
|
10461
10538
|
...srcVal.slice(_srcIndex, _srcSize)
|
|
10462
10539
|
);
|
|
10540
|
+
ibiz.log.debug(
|
|
10541
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u9644\u52A0\u5230\u6570\u7EC4\uFF09\uFF1A".concat(this.model.id, "-\u9644\u52A0\u53C2\u6570\uFF1A"),
|
|
10542
|
+
ctx.params,
|
|
10543
|
+
"-\u9644\u52A0\u503C\uFF1A",
|
|
10544
|
+
srcVal.slice(_srcIndex, _srcSize)
|
|
10545
|
+
);
|
|
10463
10546
|
}
|
|
10464
10547
|
};
|
|
10465
10548
|
|
|
@@ -10468,6 +10551,9 @@ import { HttpError as HttpError3 } from "@ibiz-template/core";
|
|
|
10468
10551
|
var ThrowExceptionNode = class extends DELogicNode {
|
|
10469
10552
|
async exec(_ctx) {
|
|
10470
10553
|
const { errorCode, errorInfo } = this.model;
|
|
10554
|
+
ibiz.log.debug(
|
|
10555
|
+
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u629B\u51FA\u5F02\u5E38\uFF09\uFF1A".concat(this.model.id, "-\u9519\u8BEF\u4EE3\u7801\uFF1A").concat(errorCode, "-\u9519\u8BEF\u4FE1\u606F\uFF1A").concat(errorInfo)
|
|
10556
|
+
);
|
|
10471
10557
|
throw new HttpError3({
|
|
10472
10558
|
response: {
|
|
10473
10559
|
status: errorCode,
|
|
@@ -10544,6 +10630,7 @@ var DELogicParam = class {
|
|
|
10544
10630
|
} else if (m.sessionParam) {
|
|
10545
10631
|
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u64CD\u4F5C\u4F1A\u8BDD\u53D8\u91CF");
|
|
10546
10632
|
}
|
|
10633
|
+
ibiz.log.debug("\u8BA1\u7B97\u5B9E\u4F53\u903B\u8F91\u53C2\u6570\uFF0C\u6807\u8BC6\uFF1A".concat(tag), "-\u503C\uFF1A", ctx.params[tag]);
|
|
10547
10634
|
}
|
|
10548
10635
|
/**
|
|
10549
10636
|
* 重新建立变量
|
|
@@ -10561,6 +10648,11 @@ var DELogicParam = class {
|
|
|
10561
10648
|
} else {
|
|
10562
10649
|
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
|
|
10563
10650
|
}
|
|
10651
|
+
ibiz.log.debug(
|
|
10652
|
+
"\u91CD\u65B0\u5EFA\u7ACB\u5B9E\u4F53\u903B\u8F91\u53C2\u6570\uFF0C\u6807\u8BC6\uFF1A".concat(tag),
|
|
10653
|
+
"-\u503C\uFF1A",
|
|
10654
|
+
ctx.params[tag]
|
|
10655
|
+
);
|
|
10564
10656
|
}
|
|
10565
10657
|
};
|
|
10566
10658
|
|
|
@@ -10748,8 +10840,15 @@ async function execDELogic(deDELogic, context, data = {}, params = {}) {
|
|
|
10748
10840
|
if (!deLogicMap.has(deDELogic)) {
|
|
10749
10841
|
deLogicMap.set(deDELogic, new DELogic(deDELogic));
|
|
10750
10842
|
}
|
|
10843
|
+
ibiz.log.debug(
|
|
10844
|
+
"\u5F00\u59CB\u6267\u884C\u5B9E\u4F53\u903B\u8F91\uFF0C\u903B\u8F91\u6807\u8BC6\uFF1A".concat(deDELogic.id, "-\u903B\u8F91\u540D\u79F0\uFF1A").concat(deDELogic.name)
|
|
10845
|
+
);
|
|
10751
10846
|
const deLogic = deLogicMap.get(deDELogic);
|
|
10752
|
-
|
|
10847
|
+
const result = await deLogic.exec(context, data, params);
|
|
10848
|
+
ibiz.log.debug(
|
|
10849
|
+
"\u7ED3\u675F\u6267\u884C\u5B9E\u4F53\u903B\u8F91\uFF0C\u903B\u8F91\u6807\u8BC6\uFF1A".concat(deDELogic.id, "-\u903B\u8F91\u540D\u79F0\uFF1A").concat(deDELogic.name)
|
|
10850
|
+
);
|
|
10851
|
+
return result;
|
|
10753
10852
|
}
|
|
10754
10853
|
async function execDELogicById(deDELogicId, dataEntityId, context, data, params) {
|
|
10755
10854
|
const deLogic = await findDeLogic(
|
|
@@ -10870,7 +10969,7 @@ var DEActionMethod = class extends Method {
|
|
|
10870
10969
|
let path2 = this.calcPath(context);
|
|
10871
10970
|
if (this.method.needResourceKey) {
|
|
10872
10971
|
let srfkey = context[this.entity.codeName.toLowerCase()];
|
|
10873
|
-
if (
|
|
10972
|
+
if (isNil12(srfkey)) {
|
|
10874
10973
|
srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
10875
10974
|
}
|
|
10876
10975
|
path2 = "".concat(path2, "/").concat(srfkey);
|
|
@@ -11295,7 +11394,7 @@ import {
|
|
|
11295
11394
|
RuntimeModelError as RuntimeModelError23
|
|
11296
11395
|
} from "@ibiz-template/core";
|
|
11297
11396
|
import { isArray as isArray7 } from "lodash-es";
|
|
11298
|
-
import { clone as clone15, isEmpty as
|
|
11397
|
+
import { clone as clone15, isEmpty as isEmpty8, isNil as isNil13 } from "ramda";
|
|
11299
11398
|
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
11300
11399
|
var FetchMethod = class extends Method {
|
|
11301
11400
|
async exec(context, params, params2, header) {
|
|
@@ -11372,7 +11471,7 @@ var FetchMethod = class extends Method {
|
|
|
11372
11471
|
}
|
|
11373
11472
|
}
|
|
11374
11473
|
}
|
|
11375
|
-
if (!
|
|
11474
|
+
if (!isNil13(filter.sortField) && !isEmpty8(filter.sortField)) {
|
|
11376
11475
|
if (filter.sortMode === "DESC") {
|
|
11377
11476
|
list = descSort(list, filter.sortField);
|
|
11378
11477
|
} else {
|
|
@@ -11439,7 +11538,7 @@ function presetDEMethodProvider() {
|
|
|
11439
11538
|
}
|
|
11440
11539
|
|
|
11441
11540
|
// src/service/service/internal-message/internal-message.service.ts
|
|
11442
|
-
import { isNil as
|
|
11541
|
+
import { isNil as isNil14 } from "ramda";
|
|
11443
11542
|
var InternalMessageService = class {
|
|
11444
11543
|
constructor() {
|
|
11445
11544
|
/**
|
|
@@ -11478,7 +11577,7 @@ var InternalMessageService = class {
|
|
|
11478
11577
|
res.total = Number(res.headers["x-total"]);
|
|
11479
11578
|
}
|
|
11480
11579
|
}
|
|
11481
|
-
if (
|
|
11580
|
+
if (isNil14(res.data)) {
|
|
11482
11581
|
res.data = [];
|
|
11483
11582
|
}
|
|
11484
11583
|
return res;
|
|
@@ -11504,6 +11603,16 @@ var InternalMessageService = class {
|
|
|
11504
11603
|
async markRead(messageId) {
|
|
11505
11604
|
await ibiz.net.post("".concat(this.baseUrl, "/").concat(messageId, "/mark_read"), {});
|
|
11506
11605
|
}
|
|
11606
|
+
/**
|
|
11607
|
+
* 批量设置已读
|
|
11608
|
+
* @author lxm
|
|
11609
|
+
* @date 2024-02-04 03:59:52
|
|
11610
|
+
* @param {string} messageId
|
|
11611
|
+
* @return {*} {Promise<void>}
|
|
11612
|
+
*/
|
|
11613
|
+
async batchMarkRead() {
|
|
11614
|
+
await ibiz.net.post("".concat(this.baseUrl, "/mark_all_read"), {});
|
|
11615
|
+
}
|
|
11507
11616
|
/**
|
|
11508
11617
|
* 获取未读数据的总条数
|
|
11509
11618
|
* @author lxm
|
|
@@ -11684,7 +11793,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
11684
11793
|
|
|
11685
11794
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
11686
11795
|
import { updateKeyDefine } from "@ibiz-template/core";
|
|
11687
|
-
import { clone as clone16, isNil as
|
|
11796
|
+
import { clone as clone16, isNil as isNil15 } from "ramda";
|
|
11688
11797
|
var CloneExcludeKeys = [
|
|
11689
11798
|
"_id",
|
|
11690
11799
|
"srfnodeid",
|
|
@@ -11808,7 +11917,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11808
11917
|
});
|
|
11809
11918
|
Object.keys(this).forEach((key) => {
|
|
11810
11919
|
const deKey = getDeKey(key);
|
|
11811
|
-
if (
|
|
11920
|
+
if (isNil15(deKey) && !CloneExcludeKeys.includes(key)) {
|
|
11812
11921
|
cloneNodeData[key] = this[key];
|
|
11813
11922
|
}
|
|
11814
11923
|
});
|
|
@@ -11817,7 +11926,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11817
11926
|
return new Proxy(this, {
|
|
11818
11927
|
set(target, p, value) {
|
|
11819
11928
|
const deKey = getDeKey(p);
|
|
11820
|
-
if (!
|
|
11929
|
+
if (!isNil15(deKey)) {
|
|
11821
11930
|
target._deData[deKey] = value;
|
|
11822
11931
|
} else {
|
|
11823
11932
|
target[p] = value;
|
|
@@ -11826,8 +11935,8 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11826
11935
|
},
|
|
11827
11936
|
get(target, p, _receiver) {
|
|
11828
11937
|
const deKey = getDeKey(p);
|
|
11829
|
-
if (!
|
|
11830
|
-
return
|
|
11938
|
+
if (!isNil15(deKey)) {
|
|
11939
|
+
return isNil15(target._deData[deKey]) ? getKeyDefault(p) : target._deData[deKey];
|
|
11831
11940
|
}
|
|
11832
11941
|
return target[p];
|
|
11833
11942
|
},
|
|
@@ -11931,7 +12040,7 @@ var TreeStaticNodeData = class extends TreeNodeData {
|
|
|
11931
12040
|
|
|
11932
12041
|
// src/service/vo/ui-map-field.ts
|
|
11933
12042
|
import { DataTypes as DataTypes2 } from "@ibiz-template/core";
|
|
11934
|
-
import { isNil as
|
|
12043
|
+
import { isNil as isNil16 } from "ramda";
|
|
11935
12044
|
var UIMapField = class {
|
|
11936
12045
|
constructor(uiKey, dataKey, opts = {}) {
|
|
11937
12046
|
/**
|
|
@@ -11952,10 +12061,10 @@ var UIMapField = class {
|
|
|
11952
12061
|
this.isRequestNeed = true;
|
|
11953
12062
|
this.uiKey = uiKey;
|
|
11954
12063
|
this.dataKey = dataKey;
|
|
11955
|
-
if (!
|
|
12064
|
+
if (!isNil16(opts.isOriginField)) {
|
|
11956
12065
|
this.isOriginField = opts.isOriginField;
|
|
11957
12066
|
}
|
|
11958
|
-
if (!
|
|
12067
|
+
if (!isNil16(opts.dataType)) {
|
|
11959
12068
|
this.dataType = opts.dataType;
|
|
11960
12069
|
}
|
|
11961
12070
|
}
|
|
@@ -11970,7 +12079,7 @@ var UIMapField = class {
|
|
|
11970
12079
|
return value;
|
|
11971
12080
|
}
|
|
11972
12081
|
if (DataTypes2.isNumber(this.dataType)) {
|
|
11973
|
-
const numVal = !
|
|
12082
|
+
const numVal = !isNil16(value) && value !== "" ? Number(value) : value;
|
|
11974
12083
|
if (Number.isNaN(numVal)) {
|
|
11975
12084
|
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
11976
12085
|
return value;
|
|
@@ -12965,10 +13074,10 @@ var Application = class {
|
|
|
12965
13074
|
*/
|
|
12966
13075
|
this.deName2DeCodeName = /* @__PURE__ */ new Map();
|
|
12967
13076
|
this.net = new Net({
|
|
12968
|
-
baseURL: "".concat(ibiz.env.baseUrl, "/").concat(
|
|
13077
|
+
baseURL: "".concat(ibiz.env.baseUrl, "/").concat(this.appId)
|
|
12969
13078
|
});
|
|
12970
13079
|
this.configCache = new ConfigService(
|
|
12971
|
-
|
|
13080
|
+
this.appId,
|
|
12972
13081
|
"PSSysApp",
|
|
12973
13082
|
model.codeName
|
|
12974
13083
|
);
|
|
@@ -12985,7 +13094,7 @@ var Application = class {
|
|
|
12985
13094
|
* @type {string}
|
|
12986
13095
|
*/
|
|
12987
13096
|
get appId() {
|
|
12988
|
-
return this.model.appId;
|
|
13097
|
+
return this.model.appId || ibiz.env.appId;
|
|
12989
13098
|
}
|
|
12990
13099
|
/**
|
|
12991
13100
|
* 初始化应用
|
|
@@ -13043,7 +13152,7 @@ var Application = class {
|
|
|
13043
13152
|
if (appDeId) {
|
|
13044
13153
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
13045
13154
|
appDeId,
|
|
13046
|
-
this.
|
|
13155
|
+
this.appId
|
|
13047
13156
|
);
|
|
13048
13157
|
const find = appDataEntity.appDEUIActions.find((action) => {
|
|
13049
13158
|
return action.id === actionId;
|
|
@@ -13070,7 +13179,7 @@ var Application = class {
|
|
|
13070
13179
|
if (!result && appDataEntityId) {
|
|
13071
13180
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
13072
13181
|
appDataEntityId,
|
|
13073
|
-
this.
|
|
13182
|
+
this.appId
|
|
13074
13183
|
);
|
|
13075
13184
|
result = (_b = appDataEntity.deopprivs) == null ? void 0 : _b.find((item) => item.name === id);
|
|
13076
13185
|
}
|
|
@@ -13087,7 +13196,7 @@ var Application = class {
|
|
|
13087
13196
|
async getDEUILogic(deUILogicId, appDataEntityId) {
|
|
13088
13197
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
13089
13198
|
appDataEntityId,
|
|
13090
|
-
this.
|
|
13199
|
+
this.appId
|
|
13091
13200
|
);
|
|
13092
13201
|
return appDataEntity.appDEUILogics.find((logic) => {
|
|
13093
13202
|
return logic.id === deUILogicId;
|
|
@@ -13107,7 +13216,7 @@ var Application = class {
|
|
|
13107
13216
|
this.mqtt = new MqttService(
|
|
13108
13217
|
ibiz.appData.mqtttopic,
|
|
13109
13218
|
getToken(),
|
|
13110
|
-
this.
|
|
13219
|
+
this.appId
|
|
13111
13220
|
);
|
|
13112
13221
|
this.mqtt.evt.on("message", (message) => {
|
|
13113
13222
|
ibiz.mc.command.next(message);
|
|
@@ -13281,7 +13390,7 @@ var TreeGridExNotifyState = /* @__PURE__ */ ((TreeGridExNotifyState2) => {
|
|
|
13281
13390
|
// src/controller/common/view/view.controller.ts
|
|
13282
13391
|
import { notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
13283
13392
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError34 } from "@ibiz-template/core";
|
|
13284
|
-
import { isEmpty as
|
|
13393
|
+
import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ramda";
|
|
13285
13394
|
|
|
13286
13395
|
// src/controller/utils/loading/loading.state.ts
|
|
13287
13396
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -13923,9 +14032,9 @@ function hasSubRoute(routeDepth) {
|
|
|
13923
14032
|
}
|
|
13924
14033
|
|
|
13925
14034
|
// src/controller/utils/util/util.ts
|
|
13926
|
-
import { isNil as
|
|
14035
|
+
import { isNil as isNil17 } from "ramda";
|
|
13927
14036
|
function isValueChange(value, value2) {
|
|
13928
|
-
if ((
|
|
14037
|
+
if ((isNil17(value) || value === "") && (isNil17(value2) || value2 === "")) {
|
|
13929
14038
|
return false;
|
|
13930
14039
|
}
|
|
13931
14040
|
return value !== value2;
|
|
@@ -13941,7 +14050,7 @@ function getOriginData(data) {
|
|
|
13941
14050
|
// src/controller/utils/value-rule/value-rule.ts
|
|
13942
14051
|
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
13943
14052
|
import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
|
|
13944
|
-
import { isNil as
|
|
14053
|
+
import { isNil as isNil18 } from "ramda";
|
|
13945
14054
|
function generateRules(itemVRs, name, valueItemName) {
|
|
13946
14055
|
const rules = [];
|
|
13947
14056
|
itemVRs.forEach((item) => {
|
|
@@ -14006,7 +14115,7 @@ function generateEditorRules(editor) {
|
|
|
14006
14115
|
if (maxLength) {
|
|
14007
14116
|
rules.push({
|
|
14008
14117
|
validator: (rule, value, callback) => {
|
|
14009
|
-
if (!
|
|
14118
|
+
if (!isNil18(value) && value.length > maxLength) {
|
|
14010
14119
|
callback(
|
|
14011
14120
|
new Error(
|
|
14012
14121
|
"\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
|
|
@@ -14021,7 +14130,7 @@ function generateEditorRules(editor) {
|
|
|
14021
14130
|
if (minLength) {
|
|
14022
14131
|
rules.push({
|
|
14023
14132
|
validator: (rule, value, callback) => {
|
|
14024
|
-
if (!
|
|
14133
|
+
if (!isNil18(value) && value.length < minLength) {
|
|
14025
14134
|
callback(
|
|
14026
14135
|
new Error(
|
|
14027
14136
|
"\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
|
|
@@ -14033,10 +14142,10 @@ function generateEditorRules(editor) {
|
|
|
14033
14142
|
}
|
|
14034
14143
|
});
|
|
14035
14144
|
}
|
|
14036
|
-
if (!
|
|
14145
|
+
if (!isNil18(maxValue)) {
|
|
14037
14146
|
rules.push({
|
|
14038
14147
|
validator: (rule, value, callback) => {
|
|
14039
|
-
if (!
|
|
14148
|
+
if (!isNil18(value) && isNumber(value) && value > maxValue) {
|
|
14040
14149
|
callback(new Error("\u503C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxValue)));
|
|
14041
14150
|
} else {
|
|
14042
14151
|
return true;
|
|
@@ -14044,10 +14153,10 @@ function generateEditorRules(editor) {
|
|
|
14044
14153
|
}
|
|
14045
14154
|
});
|
|
14046
14155
|
}
|
|
14047
|
-
if (!
|
|
14156
|
+
if (!isNil18(minValue)) {
|
|
14048
14157
|
rules.push({
|
|
14049
14158
|
validator: (rule, value, callback) => {
|
|
14050
|
-
if (!
|
|
14159
|
+
if (!isNil18(value) && isNumber(value) && value < minValue) {
|
|
14051
14160
|
callback(new Error("\u503C\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minValue)));
|
|
14052
14161
|
} else {
|
|
14053
14162
|
return true;
|
|
@@ -14060,7 +14169,7 @@ function generateEditorRules(editor) {
|
|
|
14060
14169
|
|
|
14061
14170
|
// src/controller/utils/value-ex/value-ex.ts
|
|
14062
14171
|
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
14063
|
-
import { isNil as
|
|
14172
|
+
import { isNil as isNil19, mergeLeft } from "ramda";
|
|
14064
14173
|
var ValueExUtil = class {
|
|
14065
14174
|
/**
|
|
14066
14175
|
* 合并默认值
|
|
@@ -14085,7 +14194,7 @@ var ValueExUtil = class {
|
|
|
14085
14194
|
* @return {*} {string}
|
|
14086
14195
|
*/
|
|
14087
14196
|
static toText(options, value) {
|
|
14088
|
-
if (
|
|
14197
|
+
if (isNil19(value) || value === "") {
|
|
14089
14198
|
return "";
|
|
14090
14199
|
}
|
|
14091
14200
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
@@ -14110,12 +14219,12 @@ var ValueExUtil = class {
|
|
|
14110
14219
|
import { RuntimeError as RuntimeError31, ModelError as ModelError17 } from "@ibiz-template/core";
|
|
14111
14220
|
import dayjs from "dayjs";
|
|
14112
14221
|
import { createUUID as createUUID8 } from "qx-util";
|
|
14113
|
-
import { isNil as
|
|
14222
|
+
import { isNil as isNil20, isNotNil } from "ramda";
|
|
14114
14223
|
function getDefaultValue(opts, origins) {
|
|
14115
14224
|
var _a;
|
|
14116
14225
|
const { name, valueType, defaultValue, valueFormat } = opts;
|
|
14117
14226
|
const { data, context, params } = origins;
|
|
14118
|
-
if (
|
|
14227
|
+
if (isNil20(valueType) && isNil20(defaultValue)) {
|
|
14119
14228
|
return;
|
|
14120
14229
|
}
|
|
14121
14230
|
if (valueType === "RESET") {
|
|
@@ -14298,6 +14407,7 @@ var BaseController = class {
|
|
|
14298
14407
|
*/
|
|
14299
14408
|
this.childNames = [];
|
|
14300
14409
|
this.name = model.name || model.id;
|
|
14410
|
+
this.preprocessModel(model);
|
|
14301
14411
|
this.initState();
|
|
14302
14412
|
this.convertMultipleLanguages();
|
|
14303
14413
|
}
|
|
@@ -14311,6 +14421,16 @@ var BaseController = class {
|
|
|
14311
14421
|
get _evt() {
|
|
14312
14422
|
return this.evt;
|
|
14313
14423
|
}
|
|
14424
|
+
/**
|
|
14425
|
+
* 根据需求对model进行预处理
|
|
14426
|
+
*
|
|
14427
|
+
* @author chitanda
|
|
14428
|
+
* @date 2024-02-27 11:02:00
|
|
14429
|
+
* @protected
|
|
14430
|
+
* @param {T} _model
|
|
14431
|
+
*/
|
|
14432
|
+
preprocessModel(_model) {
|
|
14433
|
+
}
|
|
14314
14434
|
/**
|
|
14315
14435
|
* 初始化state的属性放,一般情况下只需要把对应的默认值直接赋值给state
|
|
14316
14436
|
* 如果需要构造特殊class类型的state,可以重写该方法时,
|
|
@@ -14469,7 +14589,7 @@ var BaseController = class {
|
|
|
14469
14589
|
|
|
14470
14590
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
14471
14591
|
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
14472
|
-
import { isNil as
|
|
14592
|
+
import { isNil as isNil21, mergeRight as mergeRight2 } from "ramda";
|
|
14473
14593
|
var ViewMsgController = class _ViewMsgController {
|
|
14474
14594
|
constructor(msgGroupId) {
|
|
14475
14595
|
this.msgGroupId = msgGroupId;
|
|
@@ -14654,19 +14774,19 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
14654
14774
|
const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
|
|
14655
14775
|
const deViewMessages = dataSet.map((item) => {
|
|
14656
14776
|
const message = {};
|
|
14657
|
-
if (positionField && !
|
|
14777
|
+
if (positionField && !isNil21(item[positionField])) {
|
|
14658
14778
|
message.position = item[positionField];
|
|
14659
14779
|
}
|
|
14660
|
-
if (titleField && !
|
|
14780
|
+
if (titleField && !isNil21(item[titleField])) {
|
|
14661
14781
|
message.title = item[titleField];
|
|
14662
14782
|
}
|
|
14663
|
-
if (messageField && !
|
|
14783
|
+
if (messageField && !isNil21(item[messageField])) {
|
|
14664
14784
|
message.message = item[messageField];
|
|
14665
14785
|
}
|
|
14666
|
-
if (typeField && !
|
|
14786
|
+
if (typeField && !isNil21(item[typeField])) {
|
|
14667
14787
|
message.messageType = item[typeField];
|
|
14668
14788
|
}
|
|
14669
|
-
if (removeModeField && !
|
|
14789
|
+
if (removeModeField && !isNil21(item[removeModeField])) {
|
|
14670
14790
|
message.removeMode = item[removeModeField];
|
|
14671
14791
|
}
|
|
14672
14792
|
return mergeRight2(basicMsg, message);
|
|
@@ -14825,6 +14945,7 @@ var ViewController = class extends BaseController {
|
|
|
14825
14945
|
this.state.caption = this.model.caption;
|
|
14826
14946
|
this.state.srfactiveviewdata = null;
|
|
14827
14947
|
this.state.viewMessages = {};
|
|
14948
|
+
this.state.isClosing = false;
|
|
14828
14949
|
}
|
|
14829
14950
|
async onCreated() {
|
|
14830
14951
|
await super.onCreated();
|
|
@@ -14904,8 +15025,8 @@ var ViewController = class extends BaseController {
|
|
|
14904
15025
|
* @protected
|
|
14905
15026
|
*/
|
|
14906
15027
|
handleContextParams() {
|
|
14907
|
-
this.context.srfappid = this.model.appId;
|
|
14908
|
-
if (
|
|
15028
|
+
this.context.srfappid = this.model.appId || ibiz.env.appId;
|
|
15029
|
+
if (isNil22(this.context.srfsessionid) || isEmpty9(this.context.srfsessionid)) {
|
|
14909
15030
|
const domain = ibiz.uiDomainManager.create(this.id);
|
|
14910
15031
|
this.context.srfsessionid = domain.id;
|
|
14911
15032
|
}
|
|
@@ -15305,7 +15426,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
15305
15426
|
|
|
15306
15427
|
// src/controller/common/control/control.controller.ts
|
|
15307
15428
|
import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
|
|
15308
|
-
import { clone as clone18, isNil as
|
|
15429
|
+
import { clone as clone18, isNil as isNil23 } from "ramda";
|
|
15309
15430
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
15310
15431
|
var ControlController = class extends BaseController {
|
|
15311
15432
|
/**
|
|
@@ -15587,26 +15708,34 @@ var ControlController = class extends BaseController {
|
|
|
15587
15708
|
* @return {*} {void}
|
|
15588
15709
|
*/
|
|
15589
15710
|
actionNotification(tag, opts) {
|
|
15590
|
-
|
|
15591
|
-
const { ctrlMsg } = this.model;
|
|
15592
|
-
const msgItem = (_a = ctrlMsg == null ? void 0 : ctrlMsg.ctrlMsgItems) == null ? void 0 : _a.find((item) => item.name === tag);
|
|
15593
|
-
let message;
|
|
15711
|
+
let message = "";
|
|
15594
15712
|
let duration;
|
|
15595
|
-
|
|
15596
|
-
|
|
15597
|
-
const
|
|
15598
|
-
|
|
15599
|
-
scriptParams.data = opts.data;
|
|
15600
|
-
}
|
|
15601
|
-
message = ScriptFactory.execScriptFn(
|
|
15602
|
-
scriptParams,
|
|
15603
|
-
"`".concat(msgItem.content, "`"),
|
|
15604
|
-
{
|
|
15605
|
-
isAsync: false,
|
|
15606
|
-
singleRowReturn: true
|
|
15607
|
-
}
|
|
15713
|
+
const { ctrlMsg } = this.model;
|
|
15714
|
+
if (ctrlMsg && ctrlMsg.ctrlMsgItems) {
|
|
15715
|
+
const hiddenSsgItem = ctrlMsg.ctrlMsgItems.find(
|
|
15716
|
+
(item) => item.name === "".concat(tag, "_HIDDEN")
|
|
15608
15717
|
);
|
|
15609
|
-
|
|
15718
|
+
if (hiddenSsgItem) {
|
|
15719
|
+
return;
|
|
15720
|
+
}
|
|
15721
|
+
const msgItem = ctrlMsg.ctrlMsgItems.find((item) => item.name === tag);
|
|
15722
|
+
if (msgItem && msgItem.content) {
|
|
15723
|
+
duration = isNil23(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
|
|
15724
|
+
const scriptParams = { ...this.getEventArgs() };
|
|
15725
|
+
if (opts == null ? void 0 : opts.data) {
|
|
15726
|
+
scriptParams.data = opts.data;
|
|
15727
|
+
}
|
|
15728
|
+
message = ScriptFactory.execScriptFn(
|
|
15729
|
+
scriptParams,
|
|
15730
|
+
"`".concat(msgItem.content, "`"),
|
|
15731
|
+
{
|
|
15732
|
+
isAsync: false,
|
|
15733
|
+
singleRowReturn: true
|
|
15734
|
+
}
|
|
15735
|
+
);
|
|
15736
|
+
}
|
|
15737
|
+
}
|
|
15738
|
+
if (!message && ibiz.i18n) {
|
|
15610
15739
|
const resTag = "CONTROL.".concat(this.model.controlType, ".").concat(tag).toUpperCase();
|
|
15611
15740
|
message = ibiz.i18n.t(resTag, "");
|
|
15612
15741
|
if (message === resTag) {
|
|
@@ -15645,6 +15774,13 @@ var MDControlController = class extends ControlController {
|
|
|
15645
15774
|
* @protected
|
|
15646
15775
|
*/
|
|
15647
15776
|
this.commandDataChange = false;
|
|
15777
|
+
/**
|
|
15778
|
+
* 是否设置过排序条件,比如searchBars默认点击分组时设置了
|
|
15779
|
+
* @return {*}
|
|
15780
|
+
* @author: zhujiamin
|
|
15781
|
+
* @Date: 2024-02-22 16:10:23
|
|
15782
|
+
*/
|
|
15783
|
+
this.isSetSort = false;
|
|
15648
15784
|
/**
|
|
15649
15785
|
* 实体属性映射,key是id,value是name
|
|
15650
15786
|
* @author lxm
|
|
@@ -15716,7 +15852,9 @@ var MDControlController = class extends ControlController {
|
|
|
15716
15852
|
fn(msg);
|
|
15717
15853
|
}, 300);
|
|
15718
15854
|
ibiz.mc.command.change.on(this.onDataChange);
|
|
15719
|
-
this.
|
|
15855
|
+
if (!this.isSetSort) {
|
|
15856
|
+
this.setSort();
|
|
15857
|
+
}
|
|
15720
15858
|
}
|
|
15721
15859
|
async onMounted() {
|
|
15722
15860
|
await super.onMounted();
|
|
@@ -15930,15 +16068,9 @@ var MDControlController = class extends ControlController {
|
|
|
15930
16068
|
await this.startLoading();
|
|
15931
16069
|
let needRefresh = false;
|
|
15932
16070
|
try {
|
|
15933
|
-
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
15934
16071
|
await handleAllSettled(
|
|
15935
16072
|
data.map(async (item) => {
|
|
15936
|
-
|
|
15937
|
-
const tempContext = context.clone();
|
|
15938
|
-
tempContext[deName] = item.srfkey;
|
|
15939
|
-
await this.service.remove(tempContext, params);
|
|
15940
|
-
needRefresh = true;
|
|
15941
|
-
}
|
|
16073
|
+
needRefresh = await this.handleItemRemove(item, context, params);
|
|
15942
16074
|
this.afterRemove(item);
|
|
15943
16075
|
})
|
|
15944
16076
|
);
|
|
@@ -15964,6 +16096,23 @@ var MDControlController = class extends ControlController {
|
|
|
15964
16096
|
this.state.selectedData = [];
|
|
15965
16097
|
await this._evt.emit("onRemoveSuccess", void 0);
|
|
15966
16098
|
}
|
|
16099
|
+
/**
|
|
16100
|
+
* 删除每一项
|
|
16101
|
+
* @return {*}
|
|
16102
|
+
* @author: zhujiamin
|
|
16103
|
+
* @Date: 2024-02-27 09:47:52
|
|
16104
|
+
*/
|
|
16105
|
+
async handleItemRemove(item, context, params) {
|
|
16106
|
+
let needRefresh = false;
|
|
16107
|
+
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
16108
|
+
if (item.srfuf !== 0 /* CREATE */) {
|
|
16109
|
+
const tempContext = context.clone();
|
|
16110
|
+
tempContext[deName] = item.srfkey;
|
|
16111
|
+
await this.service.remove(tempContext, params);
|
|
16112
|
+
needRefresh = true;
|
|
16113
|
+
}
|
|
16114
|
+
return needRefresh;
|
|
16115
|
+
}
|
|
15967
16116
|
/**
|
|
15968
16117
|
* 后台删除结束后界面删除逻辑
|
|
15969
16118
|
*
|
|
@@ -16181,7 +16330,7 @@ var AppMenuController = class extends ControlController {
|
|
|
16181
16330
|
throw new RuntimeModelError26(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
16182
16331
|
}
|
|
16183
16332
|
const tempContext = this.context.clone();
|
|
16184
|
-
tempContext.srfappid = menuItem.appId;
|
|
16333
|
+
tempContext.srfappid = menuItem.appId || ibiz.env.appId;
|
|
16185
16334
|
if (this.routeDepth && useDepth) {
|
|
16186
16335
|
Object.assign(tempContext, {
|
|
16187
16336
|
toRouteDepth: this.routeDepth + 1
|
|
@@ -16333,6 +16482,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
16333
16482
|
|
|
16334
16483
|
// src/controller/control/calendar/calendar.controller.ts
|
|
16335
16484
|
import dayjs3 from "dayjs";
|
|
16485
|
+
import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
16336
16486
|
|
|
16337
16487
|
// src/controller/control/calendar/calendar.service.ts
|
|
16338
16488
|
import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
@@ -16454,6 +16604,73 @@ var CalendarController = class extends MDControlController {
|
|
|
16454
16604
|
await super.onCreated();
|
|
16455
16605
|
this.service = new CalendarService(this.model);
|
|
16456
16606
|
await this.service.init(this.context);
|
|
16607
|
+
this.initViewScheduler();
|
|
16608
|
+
}
|
|
16609
|
+
/**
|
|
16610
|
+
* 初始化视图触发器
|
|
16611
|
+
*
|
|
16612
|
+
* @protected
|
|
16613
|
+
* @memberof CalendarService
|
|
16614
|
+
*/
|
|
16615
|
+
initViewScheduler() {
|
|
16616
|
+
const viewLogics = this.model.appViewLogics || [];
|
|
16617
|
+
if (viewLogics.length !== 0) {
|
|
16618
|
+
this.viewScheduler = ibiz.scheduler.createViewScheduler(viewLogics);
|
|
16619
|
+
this.viewScheduler.defaultParamsCb = () => {
|
|
16620
|
+
return this.getEventArgs();
|
|
16621
|
+
};
|
|
16622
|
+
if (this.viewScheduler.hasViewEventTrigger) {
|
|
16623
|
+
this.evt.onAll((_eventName, event) => {
|
|
16624
|
+
this.viewScheduler.triggerViewEvent(event);
|
|
16625
|
+
});
|
|
16626
|
+
}
|
|
16627
|
+
}
|
|
16628
|
+
}
|
|
16629
|
+
/**
|
|
16630
|
+
* 设置激活数据
|
|
16631
|
+
*
|
|
16632
|
+
* @param {ICalendarItemData} item
|
|
16633
|
+
* @return {*} {Promise<void>}
|
|
16634
|
+
* @memberof CalendarService
|
|
16635
|
+
*/
|
|
16636
|
+
async setActive(item) {
|
|
16637
|
+
this.openData(item);
|
|
16638
|
+
return this._evt.emit("onActive", {
|
|
16639
|
+
data: [item]
|
|
16640
|
+
});
|
|
16641
|
+
}
|
|
16642
|
+
/**
|
|
16643
|
+
* 打开编辑数据视图
|
|
16644
|
+
*
|
|
16645
|
+
* @param {ICalendarItemData} item
|
|
16646
|
+
* @memberof CalendarService
|
|
16647
|
+
*/
|
|
16648
|
+
async openData(item) {
|
|
16649
|
+
var _a, _b;
|
|
16650
|
+
const context = this.context.clone();
|
|
16651
|
+
const deName = ((_a = item.deData.srfdecodename) == null ? void 0 : _a.toLowerCase()) || calcDeCodeNameById(this.model.appDataEntityId);
|
|
16652
|
+
context[deName.toLowerCase()] = item.deData.srfkey;
|
|
16653
|
+
const result = await ((_b = this.viewScheduler) == null ? void 0 : _b.triggerCustom(
|
|
16654
|
+
"".concat(item.itemType.toLowerCase(), "_opendata"),
|
|
16655
|
+
{
|
|
16656
|
+
context,
|
|
16657
|
+
params: this.params,
|
|
16658
|
+
data: [item.deData],
|
|
16659
|
+
event: void 0,
|
|
16660
|
+
view: this.view,
|
|
16661
|
+
ctrl: this
|
|
16662
|
+
}
|
|
16663
|
+
));
|
|
16664
|
+
if (result === -1) {
|
|
16665
|
+
throw new RuntimeModelError28(
|
|
16666
|
+
this.model,
|
|
16667
|
+
"\u7F3A\u5C11".concat(item.itemType.toLowerCase(), "_opendata\u7684\u89C6\u56FE\u903B\u8F91")
|
|
16668
|
+
);
|
|
16669
|
+
} else {
|
|
16670
|
+
return {
|
|
16671
|
+
cancel: result ? result.ok : true
|
|
16672
|
+
};
|
|
16673
|
+
}
|
|
16457
16674
|
}
|
|
16458
16675
|
/**
|
|
16459
16676
|
* 日历加载
|
|
@@ -16616,17 +16833,17 @@ import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
|
16616
16833
|
import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
16617
16834
|
|
|
16618
16835
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
16619
|
-
import { RuntimeModelError as
|
|
16836
|
+
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
16620
16837
|
|
|
16621
16838
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
16622
|
-
import { plus, RuntimeModelError as
|
|
16839
|
+
import { plus, RuntimeModelError as RuntimeModelError29, toNumberOrNil } from "@ibiz-template/core";
|
|
16623
16840
|
import dayjs4 from "dayjs";
|
|
16624
16841
|
import minMax2 from "dayjs/plugin/minMax";
|
|
16625
16842
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
16626
16843
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
16627
16844
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
16628
16845
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
16629
|
-
import { clone as clone20, isNil as
|
|
16846
|
+
import { clone as clone20, isNil as isNil24, mergeDeepRight } from "ramda";
|
|
16630
16847
|
dayjs4.extend(minMax2);
|
|
16631
16848
|
dayjs4.extend(isSameOrBefore);
|
|
16632
16849
|
dayjs4.extend(quarterOfYear);
|
|
@@ -16669,10 +16886,10 @@ var BaseSeriesGenerator = class {
|
|
|
16669
16886
|
this.chartGenerator = chartGenerator;
|
|
16670
16887
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
16671
16888
|
if (!model.catalogField) {
|
|
16672
|
-
throw new
|
|
16889
|
+
throw new RuntimeModelError29(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
|
|
16673
16890
|
}
|
|
16674
16891
|
if (!model.valueField) {
|
|
16675
|
-
throw new
|
|
16892
|
+
throw new RuntimeModelError29(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
|
|
16676
16893
|
}
|
|
16677
16894
|
this.catalogField = chartGenerator.getFieldKey(model.catalogField);
|
|
16678
16895
|
this.valueField = chartGenerator.getFieldKey(model.valueField);
|
|
@@ -16722,10 +16939,10 @@ var BaseSeriesGenerator = class {
|
|
|
16722
16939
|
* @return {*} {(string | undefined)}
|
|
16723
16940
|
*/
|
|
16724
16941
|
translateVal(codeListKey, val, isExclude = false) {
|
|
16725
|
-
if (
|
|
16942
|
+
if (isNil24(val)) {
|
|
16726
16943
|
return void 0;
|
|
16727
16944
|
}
|
|
16728
|
-
if (
|
|
16945
|
+
if (isNil24(codeListKey)) {
|
|
16729
16946
|
return val;
|
|
16730
16947
|
}
|
|
16731
16948
|
const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
|
|
@@ -16774,7 +16991,7 @@ var BaseSeriesGenerator = class {
|
|
|
16774
16991
|
seriesCodeListId,
|
|
16775
16992
|
item[this.groupField]
|
|
16776
16993
|
);
|
|
16777
|
-
if (
|
|
16994
|
+
if (isNil24(groupVal)) {
|
|
16778
16995
|
return;
|
|
16779
16996
|
}
|
|
16780
16997
|
group = groupVal;
|
|
@@ -17095,10 +17312,10 @@ var BaseSeriesGenerator = class {
|
|
|
17095
17312
|
var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
17096
17313
|
calcStaticOptions() {
|
|
17097
17314
|
if (this.xAxisIndex === void 0) {
|
|
17098
|
-
throw new
|
|
17315
|
+
throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
17099
17316
|
}
|
|
17100
17317
|
if (this.yAxisIndex === void 0) {
|
|
17101
|
-
throw new
|
|
17318
|
+
throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
17102
17319
|
}
|
|
17103
17320
|
const options = super.calcStaticOptions();
|
|
17104
17321
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -17114,14 +17331,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
17114
17331
|
};
|
|
17115
17332
|
|
|
17116
17333
|
// src/controller/control/chart/generator/bar-series-generator.ts
|
|
17117
|
-
import { RuntimeModelError as
|
|
17334
|
+
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
17118
17335
|
var BarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
17119
17336
|
calcStaticOptions() {
|
|
17120
17337
|
if (this.xAxisIndex === void 0) {
|
|
17121
|
-
throw new
|
|
17338
|
+
throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
17122
17339
|
}
|
|
17123
17340
|
if (this.yAxisIndex === void 0) {
|
|
17124
|
-
throw new
|
|
17341
|
+
throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
17125
17342
|
}
|
|
17126
17343
|
const options = super.calcStaticOptions();
|
|
17127
17344
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -17174,14 +17391,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
17174
17391
|
};
|
|
17175
17392
|
|
|
17176
17393
|
// src/controller/control/chart/generator/scatter-series-generator.ts
|
|
17177
|
-
import { RuntimeModelError as
|
|
17394
|
+
import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
17178
17395
|
var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
17179
17396
|
calcStaticOptions() {
|
|
17180
17397
|
if (this.xAxisIndex === void 0) {
|
|
17181
|
-
throw new
|
|
17398
|
+
throw new RuntimeModelError32(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
17182
17399
|
}
|
|
17183
17400
|
if (this.yAxisIndex === void 0) {
|
|
17184
|
-
throw new
|
|
17401
|
+
throw new RuntimeModelError32(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
17185
17402
|
}
|
|
17186
17403
|
const options = super.calcStaticOptions();
|
|
17187
17404
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -17692,6 +17909,7 @@ var ChartController = class extends MDControlController {
|
|
|
17692
17909
|
await this.service.init(this.context);
|
|
17693
17910
|
this.generator = new ChartOptionsGenerator2(this.model);
|
|
17694
17911
|
await this.generator.init(this.context, this.params);
|
|
17912
|
+
this.resizeChart = this.resizeChart.bind(this);
|
|
17695
17913
|
window.addEventListener("resize", this.resizeChart);
|
|
17696
17914
|
}
|
|
17697
17915
|
async afterLoad(args, items) {
|
|
@@ -17782,17 +18000,17 @@ var CaptionBarController = class extends ControlController {
|
|
|
17782
18000
|
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
17783
18001
|
|
|
17784
18002
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
17785
|
-
import { RuntimeModelError as
|
|
18003
|
+
import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
17786
18004
|
import { isArray as isArray8 } from "qx-util";
|
|
17787
18005
|
|
|
17788
18006
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
17789
|
-
import { RuntimeModelError as
|
|
18007
|
+
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
17790
18008
|
|
|
17791
18009
|
// src/ui-logic/index.ts
|
|
17792
18010
|
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
17793
18011
|
|
|
17794
18012
|
// src/ui-logic/ui-logic.ts
|
|
17795
|
-
import { ModelError as ModelError25, RuntimeModelError as
|
|
18013
|
+
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
17796
18014
|
|
|
17797
18015
|
// src/ui-logic/ui-logic-context.ts
|
|
17798
18016
|
var UILogicContext = class {
|
|
@@ -17938,20 +18156,20 @@ var UILogicContext = class {
|
|
|
17938
18156
|
};
|
|
17939
18157
|
|
|
17940
18158
|
// src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
|
|
17941
|
-
import { RuntimeModelError as
|
|
18159
|
+
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
17942
18160
|
|
|
17943
18161
|
// src/ui-logic/ui-logic-link/ui-logic-link.ts
|
|
17944
18162
|
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
17945
18163
|
|
|
17946
18164
|
// src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
|
|
17947
|
-
import { RuntimeModelError as
|
|
18165
|
+
import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
17948
18166
|
|
|
17949
18167
|
// src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
|
|
17950
18168
|
var UILogicLinkCond = class {
|
|
17951
18169
|
};
|
|
17952
18170
|
|
|
17953
18171
|
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
17954
|
-
import { ModelError as ModelError19, RuntimeModelError as
|
|
18172
|
+
import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
17955
18173
|
|
|
17956
18174
|
// src/ui-logic/utils/handle-src-val.ts
|
|
17957
18175
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
@@ -18044,20 +18262,24 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18044
18262
|
srcDEUILogicParamId: this.dstParam,
|
|
18045
18263
|
srcFieldName: this.dstField
|
|
18046
18264
|
});
|
|
18265
|
+
let result;
|
|
18266
|
+
let compareValue;
|
|
18047
18267
|
switch (this.type) {
|
|
18048
18268
|
case "ENTITYFIELD": {
|
|
18049
18269
|
if (!this.value) {
|
|
18050
|
-
throw new
|
|
18270
|
+
throw new RuntimeModelError33(
|
|
18051
18271
|
this.model,
|
|
18052
18272
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
18053
18273
|
);
|
|
18054
18274
|
}
|
|
18055
18275
|
const value = data[this.value] != null ? data[this.value] : context[this.value];
|
|
18056
|
-
|
|
18276
|
+
compareValue = value;
|
|
18277
|
+
result = testCond(dstVal, this.op, value);
|
|
18278
|
+
break;
|
|
18057
18279
|
}
|
|
18058
18280
|
case "SRCENTITYFIELD": {
|
|
18059
18281
|
if (!this.value) {
|
|
18060
|
-
throw new
|
|
18282
|
+
throw new RuntimeModelError33(
|
|
18061
18283
|
this.model,
|
|
18062
18284
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
18063
18285
|
);
|
|
@@ -18066,13 +18288,26 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18066
18288
|
srcDEUILogicParamId: this.srcParam,
|
|
18067
18289
|
srcFieldName: this.value
|
|
18068
18290
|
});
|
|
18069
|
-
|
|
18291
|
+
compareValue = srcVal;
|
|
18292
|
+
result = testCond(dstVal, this.op, srcVal);
|
|
18293
|
+
break;
|
|
18070
18294
|
}
|
|
18071
18295
|
case "CURTIME":
|
|
18072
18296
|
throw new ModelError19(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
|
|
18073
18297
|
default:
|
|
18074
|
-
|
|
18298
|
+
compareValue = this.value;
|
|
18299
|
+
result = testCond(dstVal, this.op, this.value);
|
|
18075
18300
|
}
|
|
18301
|
+
ibiz.log.debug(
|
|
18302
|
+
"\u754C\u9762\u903B\u8F91\u8FDE\u63A5\u6761\u4EF6\u9879\uFF1A".concat(this.model.name, "-\u6761\u4EF6\u503C\u7C7B\u578B\uFF1A").concat(this.type, "-\u6E90\u5C5E\u6027\u540D\u79F0\uFF1A").concat(this.dstField, "-\u6E90\u5BF9\u8C61\u503C\uFF1A"),
|
|
18303
|
+
dstVal,
|
|
18304
|
+
"-\u5BF9\u6BD4\u6761\u4EF6\uFF1A".concat(this.op),
|
|
18305
|
+
"-\u5BF9\u6BD4\u503C\uFF1A",
|
|
18306
|
+
compareValue,
|
|
18307
|
+
"-\u5BF9\u6BD4\u7ED3\u679C\uFF1A",
|
|
18308
|
+
result
|
|
18309
|
+
);
|
|
18310
|
+
return result;
|
|
18076
18311
|
}
|
|
18077
18312
|
};
|
|
18078
18313
|
|
|
@@ -18123,7 +18358,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
|
|
|
18123
18358
|
test(ctx, context, data) {
|
|
18124
18359
|
let bol = true;
|
|
18125
18360
|
if (this.conds.length === 0) {
|
|
18126
|
-
throw new
|
|
18361
|
+
throw new RuntimeModelError34(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
18127
18362
|
}
|
|
18128
18363
|
for (let i = 0; i < this.conds.length; i++) {
|
|
18129
18364
|
const cond = this.conds[i];
|
|
@@ -18137,7 +18372,12 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
|
|
|
18137
18372
|
break;
|
|
18138
18373
|
}
|
|
18139
18374
|
}
|
|
18140
|
-
|
|
18375
|
+
const result = this.notMode ? !bol : bol;
|
|
18376
|
+
ibiz.log.debug(
|
|
18377
|
+
"\u754C\u9762\u903B\u8F91\u8FDE\u63A5\u6761\u4EF6\u7EC4\u540D\u79F0\uFF1A".concat(this.model.name, "-\u6761\u4EF6\u7EC4\u6807\u8BC6\uFF1A").concat(this.model.id, "-\u8FD0\u884C\u7ED3\u679C\uFF1A"),
|
|
18378
|
+
result
|
|
18379
|
+
);
|
|
18380
|
+
return result;
|
|
18141
18381
|
}
|
|
18142
18382
|
};
|
|
18143
18383
|
|
|
@@ -18249,10 +18489,10 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
18249
18489
|
retDEUILogicParamId
|
|
18250
18490
|
} = this.model;
|
|
18251
18491
|
if (!dstAppDataEntityId) {
|
|
18252
|
-
throw new
|
|
18492
|
+
throw new RuntimeModelError35(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
18253
18493
|
}
|
|
18254
18494
|
if (!dstAppDEActionId) {
|
|
18255
|
-
throw new
|
|
18495
|
+
throw new RuntimeModelError35(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
18256
18496
|
}
|
|
18257
18497
|
const requestData = ctx.params[dstDEUILogicParamId];
|
|
18258
18498
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -18266,17 +18506,21 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
18266
18506
|
if (res.ok) {
|
|
18267
18507
|
ctx.params[retDEUILogicParamId] = res.data;
|
|
18268
18508
|
}
|
|
18509
|
+
ibiz.log.debug(
|
|
18510
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u5B9E\u4F53\u884C\u4E3A\uFF09\uFF1A".concat(this.model.id, "-\u754C\u9762\u884C\u4E3A\u6240\u5C5E\u5B9E\u4F53\uFF1A").concat(dstAppDataEntityId, "-\u5B9E\u4F53\u884C\u4E3A\u6807\u8BC6\uFF1A").concat(dstAppDEActionId, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(retDEUILogicParamId, "-\u503C\uFF1A"),
|
|
18511
|
+
ctx.params[retDEUILogicParamId]
|
|
18512
|
+
);
|
|
18269
18513
|
}
|
|
18270
18514
|
};
|
|
18271
18515
|
|
|
18272
18516
|
// src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
|
|
18273
|
-
import { RuntimeModelError as
|
|
18517
|
+
import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
18274
18518
|
var DEUIActionNode = class extends UILogicNode {
|
|
18275
18519
|
async exec(ctx) {
|
|
18276
|
-
const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
|
|
18520
|
+
const { dstAppDEUIActionId, dstDEUILogicParamId, dstAppDataEntityId } = this.model;
|
|
18277
18521
|
const { data, parameters } = ctx;
|
|
18278
18522
|
if (!dstAppDEUIActionId) {
|
|
18279
|
-
throw new
|
|
18523
|
+
throw new RuntimeModelError36(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
18280
18524
|
}
|
|
18281
18525
|
let actionData = [data];
|
|
18282
18526
|
if (dstDEUILogicParamId) {
|
|
@@ -18287,6 +18531,9 @@ var DEUIActionNode = class extends UILogicNode {
|
|
|
18287
18531
|
actionData = [param];
|
|
18288
18532
|
}
|
|
18289
18533
|
}
|
|
18534
|
+
ibiz.log.debug(
|
|
18535
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u5B9E\u4F53\u754C\u9762\u884C\u4E3A\uFF09\uFF1A".concat(this.model.id, "-\u754C\u9762\u884C\u4E3A\u6807\u8BC6\uFF1A").concat(dstAppDEUIActionId, "-\u754C\u9762\u884C\u4E3A\u6240\u5C5E\u5B9E\u4F53\uFF1A").concat(dstAppDataEntityId, "-\u76EE\u6807\u903B\u8F91\u53C2\u6570\u5BF9\u8C61\uFF1A").concat(dstDEUILogicParamId)
|
|
18536
|
+
);
|
|
18290
18537
|
await UIActionUtil.execAndResolved(
|
|
18291
18538
|
dstAppDEUIActionId,
|
|
18292
18539
|
{
|
|
@@ -18303,6 +18550,7 @@ var DEUIActionNode = class extends UILogicNode {
|
|
|
18303
18550
|
// src/ui-logic/ui-logic-node/start-node/start-node.ts
|
|
18304
18551
|
var StartNode2 = class extends UILogicNode {
|
|
18305
18552
|
async exec(_ctx) {
|
|
18553
|
+
ibiz.log.debug("\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u542F\u52A8\u8282\u70B9\uFF09\uFF1A".concat(this.model.id));
|
|
18306
18554
|
}
|
|
18307
18555
|
};
|
|
18308
18556
|
|
|
@@ -18336,6 +18584,10 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18336
18584
|
"\u6682\u672A\u652F\u6301\u7684\u7ED3\u675F\u8282\u70B9\u8FD4\u56DE\u503C\u7C7B\u578B: ".concat(returnType)
|
|
18337
18585
|
);
|
|
18338
18586
|
}
|
|
18587
|
+
ibiz.log.debug(
|
|
18588
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u7ED3\u675F\u8282\u70B9\uFF09\uFF1A".concat(this.model.id, "-\u8FD4\u56DE\u503C\u7C7B\u578B\uFF1A").concat(returnType, "-\u8FD4\u56DE\u503C\uFF1A"),
|
|
18589
|
+
ctx.result
|
|
18590
|
+
);
|
|
18339
18591
|
}
|
|
18340
18592
|
};
|
|
18341
18593
|
|
|
@@ -18349,6 +18601,10 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18349
18601
|
return;
|
|
18350
18602
|
}
|
|
18351
18603
|
for (const nodeParam of nodeParams) {
|
|
18604
|
+
let originValue;
|
|
18605
|
+
if (nodeParam.dstDEUILogicParamId) {
|
|
18606
|
+
originValue = clone22(ctx.params[nodeParam.dstDEUILogicParamId]);
|
|
18607
|
+
}
|
|
18352
18608
|
switch (nodeParam.paramAction) {
|
|
18353
18609
|
case "SETPARAMVALUE":
|
|
18354
18610
|
await this.setParamValue(nodeParam, ctx);
|
|
@@ -18377,6 +18633,12 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18377
18633
|
"\u6682\u672A\u652F\u6301\u903B\u8F91\u5904\u7406\u53C2\u6570\u64CD\u4F5C".concat(nodeParam.paramAction)
|
|
18378
18634
|
);
|
|
18379
18635
|
}
|
|
18636
|
+
ibiz.log.debug(
|
|
18637
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u51C6\u5907\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u5904\u7406\u64CD\u4F5C\uFF1A").concat(nodeParam.paramAction, "-\u76EE\u6807\u903B\u8F91\u53C2\u6570\uFF1A").concat(nodeParam.dstDEUILogicParamId, "-\u6E90\u53C2\u6570\uFF08\u503C\uFF09\uFF1A"),
|
|
18638
|
+
originValue,
|
|
18639
|
+
"-\u76EE\u6807\u53C2\u6570\uFF08\u503C\uFF09\uFF1A",
|
|
18640
|
+
ctx.params[nodeParam.dstDEUILogicParamId]
|
|
18641
|
+
);
|
|
18380
18642
|
}
|
|
18381
18643
|
}
|
|
18382
18644
|
/**
|
|
@@ -18507,20 +18769,20 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18507
18769
|
};
|
|
18508
18770
|
|
|
18509
18771
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
18510
|
-
import { RuntimeError as RuntimeError42, RuntimeModelError as
|
|
18772
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
18511
18773
|
import { isFunction } from "lodash-es";
|
|
18512
18774
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
18513
18775
|
async exec(ctx) {
|
|
18514
18776
|
ctx.isEndNode = true;
|
|
18515
18777
|
const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
|
|
18516
18778
|
if (!invokeCtrlId) {
|
|
18517
|
-
throw new
|
|
18779
|
+
throw new RuntimeModelError37(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
|
|
18518
18780
|
}
|
|
18519
18781
|
if (!invokeParamId) {
|
|
18520
|
-
throw new
|
|
18782
|
+
throw new RuntimeModelError37(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
|
|
18521
18783
|
}
|
|
18522
18784
|
if (!invokeMethod) {
|
|
18523
|
-
throw new
|
|
18785
|
+
throw new RuntimeModelError37(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
|
|
18524
18786
|
}
|
|
18525
18787
|
const invokeParam = ctx.params[invokeParamId];
|
|
18526
18788
|
if (!invokeParam) {
|
|
@@ -18533,28 +18795,36 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
18533
18795
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
18534
18796
|
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
18535
18797
|
}
|
|
18798
|
+
ibiz.log.debug(
|
|
18799
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u89C6\u56FE\u90E8\u4EF6\u8C03\u7528\uFF09\uFF1A".concat(this.model.id, "-\u8C03\u7528\u89C6\u56FE\u90E8\u4EF6\u540D\u79F0\uFF1A").concat(invokeCtrlId, "-\u8C03\u7528\u65B9\u6CD5\u540D\u79F0\uFF1A").concat(invokeMethod, "-\u89E6\u53D1\u53C2\u6570\uFF1A"),
|
|
18800
|
+
invokeParam
|
|
18801
|
+
);
|
|
18536
18802
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
18537
18803
|
}
|
|
18538
18804
|
};
|
|
18539
18805
|
|
|
18540
18806
|
// src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
|
|
18541
|
-
import { RuntimeModelError as
|
|
18807
|
+
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
18542
18808
|
var BindParamNode2 = class extends UILogicNode {
|
|
18543
18809
|
async exec(ctx) {
|
|
18544
18810
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
18545
18811
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18546
|
-
throw new
|
|
18812
|
+
throw new RuntimeModelError38(
|
|
18547
18813
|
this.model,
|
|
18548
18814
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18549
18815
|
);
|
|
18550
18816
|
}
|
|
18551
18817
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
18552
18818
|
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
18819
|
+
ibiz.log.debug(
|
|
18820
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u7ED1\u5B9A\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDEUILogicParamId, "-\u503C\uFF1A"),
|
|
18821
|
+
srcVal
|
|
18822
|
+
);
|
|
18553
18823
|
}
|
|
18554
18824
|
};
|
|
18555
18825
|
|
|
18556
18826
|
// src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
|
|
18557
|
-
import { ModelError as ModelError23, RuntimeModelError as
|
|
18827
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
18558
18828
|
var MsgBoxNode = class extends UILogicNode {
|
|
18559
18829
|
constructor() {
|
|
18560
18830
|
super(...arguments);
|
|
@@ -18568,10 +18838,10 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
18568
18838
|
async exec(ctx) {
|
|
18569
18839
|
const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
|
|
18570
18840
|
if (!msgBoxType) {
|
|
18571
|
-
throw new
|
|
18841
|
+
throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
18572
18842
|
}
|
|
18573
18843
|
if (!buttonsType) {
|
|
18574
|
-
throw new
|
|
18844
|
+
throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
18575
18845
|
}
|
|
18576
18846
|
let { title } = this.model;
|
|
18577
18847
|
let { message } = this.model;
|
|
@@ -18615,6 +18885,9 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
18615
18885
|
default:
|
|
18616
18886
|
throw new ModelError23(this.model, "".concat(buttonsType, "\u6682\u672A\u652F\u6301"));
|
|
18617
18887
|
}
|
|
18888
|
+
ibiz.log.debug(
|
|
18889
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u6D88\u606F\u5F39\u7A97\uFF09\uFF1A".concat(this.model.id, "-\u6D88\u606F\u7C7B\u578B\uFF1A").concat(type, "-\u6D88\u606F\uFF1A").concat(message)
|
|
18890
|
+
);
|
|
18618
18891
|
const result = await ibiz.modal.confirm(modalParams);
|
|
18619
18892
|
ctx.setLastReturn(resultTags[result ? 0 : 1]);
|
|
18620
18893
|
}
|
|
@@ -18623,6 +18896,9 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
18623
18896
|
// src/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.ts
|
|
18624
18897
|
var PFPluginNode = class extends UILogicNode {
|
|
18625
18898
|
async exec(ctx) {
|
|
18899
|
+
ibiz.log.debug(
|
|
18900
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u524D\u7AEF\u63D2\u4EF6\uFF09\uFF1A".concat(this.model.id, "-\u63D2\u4EF6\u6807\u8BC6\uFF1A").concat(this.model.sysPFPluginId)
|
|
18901
|
+
);
|
|
18626
18902
|
const provider = await getUILogicNodeProvider(this.model);
|
|
18627
18903
|
if (provider) {
|
|
18628
18904
|
await provider.exec(this.model, ctx);
|
|
@@ -18631,12 +18907,12 @@ var PFPluginNode = class extends UILogicNode {
|
|
|
18631
18907
|
};
|
|
18632
18908
|
|
|
18633
18909
|
// src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
|
|
18634
|
-
import { RuntimeModelError as
|
|
18910
|
+
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
18635
18911
|
var DebugParamNode = class extends UILogicNode {
|
|
18636
18912
|
async exec(ctx) {
|
|
18637
18913
|
const { dstDEUILogicParamId, name } = this.model;
|
|
18638
18914
|
if (!dstDEUILogicParamId) {
|
|
18639
|
-
throw new
|
|
18915
|
+
throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18640
18916
|
}
|
|
18641
18917
|
const param = ctx.params[dstDEUILogicParamId];
|
|
18642
18918
|
ibiz.log.info("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
|
|
@@ -18644,36 +18920,43 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
18644
18920
|
};
|
|
18645
18921
|
|
|
18646
18922
|
// src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
|
|
18647
|
-
import { RuntimeModelError as
|
|
18923
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
18648
18924
|
var ResetParamNode2 = class extends UILogicNode {
|
|
18649
18925
|
async exec(ctx) {
|
|
18650
18926
|
const { dstDEUILogicParamId } = this.model;
|
|
18651
18927
|
if (!dstDEUILogicParamId) {
|
|
18652
|
-
throw new
|
|
18928
|
+
throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18653
18929
|
}
|
|
18654
18930
|
ctx.resetParam(dstDEUILogicParamId);
|
|
18931
|
+
ibiz.log.debug(
|
|
18932
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u91CD\u7F6E\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u91CD\u7F6E\u53C2\u6570\uFF1A").concat(dstDEUILogicParamId)
|
|
18933
|
+
);
|
|
18655
18934
|
}
|
|
18656
18935
|
};
|
|
18657
18936
|
|
|
18658
18937
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
18659
|
-
import { RuntimeModelError as
|
|
18938
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
18660
18939
|
import { clone as clone23 } from "ramda";
|
|
18661
18940
|
var CopyParamNode2 = class extends UILogicNode {
|
|
18662
18941
|
async exec(ctx) {
|
|
18663
18942
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
18664
18943
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18665
|
-
throw new
|
|
18944
|
+
throw new RuntimeModelError42(
|
|
18666
18945
|
this.model,
|
|
18667
18946
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18668
18947
|
);
|
|
18669
18948
|
}
|
|
18670
18949
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
18671
18950
|
ctx.params[dstDEUILogicParamId] = clone23(srcVal);
|
|
18951
|
+
ibiz.log.debug(
|
|
18952
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u62F7\u8D1D\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDEUILogicParamId, "-\u503C\uFF1A"),
|
|
18953
|
+
srcVal
|
|
18954
|
+
);
|
|
18672
18955
|
}
|
|
18673
18956
|
};
|
|
18674
18957
|
|
|
18675
18958
|
// src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
|
|
18676
|
-
import { RuntimeModelError as
|
|
18959
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
18677
18960
|
var AppendParamNode2 = class extends UILogicNode {
|
|
18678
18961
|
async exec(ctx) {
|
|
18679
18962
|
const {
|
|
@@ -18684,7 +18967,7 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
18684
18967
|
srcSize
|
|
18685
18968
|
} = this.model;
|
|
18686
18969
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18687
|
-
throw new
|
|
18970
|
+
throw new RuntimeModelError43(
|
|
18688
18971
|
this.model,
|
|
18689
18972
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18690
18973
|
);
|
|
@@ -18698,39 +18981,52 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
18698
18981
|
0,
|
|
18699
18982
|
...srcVal.slice(_srcIndex, _srcSize)
|
|
18700
18983
|
);
|
|
18984
|
+
ibiz.log.debug(
|
|
18985
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u9644\u52A0\u5230\u6570\u7EC4\uFF09\uFF1A".concat(this.model.id, "-\u9644\u52A0\u53C2\u6570\uFF1A"),
|
|
18986
|
+
ctx.params,
|
|
18987
|
+
"-\u9644\u52A0\u503C\uFF1A",
|
|
18988
|
+
srcVal.slice(_srcIndex, _srcSize)
|
|
18989
|
+
);
|
|
18701
18990
|
}
|
|
18702
18991
|
};
|
|
18703
18992
|
|
|
18704
18993
|
// src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
|
|
18705
|
-
import { RuntimeModelError as
|
|
18994
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
18706
18995
|
var SortParamNode2 = class extends UILogicNode {
|
|
18707
18996
|
async exec(ctx) {
|
|
18708
18997
|
const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
18709
18998
|
if (!dstDEUILogicParamId || !dstFieldName) {
|
|
18710
|
-
throw new
|
|
18999
|
+
throw new RuntimeModelError44(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
18711
19000
|
}
|
|
18712
19001
|
const key = dstFieldName;
|
|
18713
19002
|
const arr = ctx.params[dstDEUILogicParamId];
|
|
18714
19003
|
arr.sort((a, b) => {
|
|
18715
19004
|
return dstSortDir === "ASC" ? a[key] - b[key] : b[key] - a[key];
|
|
18716
19005
|
});
|
|
19006
|
+
ibiz.log.debug(
|
|
19007
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u6392\u5E8F\u6570\u7EC4\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u6392\u5E8F\u5C5E\u6027\uFF1A").concat(dstFieldName, "-\u6392\u5E8F\u6A21\u5F0F\uFF1A").concat(dstSortDir, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDEUILogicParamId, "-\u6392\u5E8F\u540E\u6570\u7EC4\uFF1A"),
|
|
19008
|
+
arr
|
|
19009
|
+
);
|
|
18717
19010
|
}
|
|
18718
19011
|
};
|
|
18719
19012
|
|
|
18720
19013
|
// src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
|
|
18721
|
-
import { RuntimeModelError as
|
|
19014
|
+
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
18722
19015
|
var RenewParamNode2 = class extends UILogicNode {
|
|
18723
19016
|
async exec(ctx) {
|
|
18724
19017
|
const { dstDEUILogicParamId } = this.model;
|
|
18725
19018
|
if (!dstDEUILogicParamId) {
|
|
18726
|
-
throw new
|
|
19019
|
+
throw new RuntimeModelError45(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18727
19020
|
}
|
|
18728
19021
|
ctx.renewParam(dstDEUILogicParamId);
|
|
19022
|
+
ibiz.log.debug(
|
|
19023
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u91CD\u65B0\u5EFA\u7ACB\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u91CD\u5EFA\u53C2\u6570\uFF1A").concat(dstDEUILogicParamId)
|
|
19024
|
+
);
|
|
18729
19025
|
}
|
|
18730
19026
|
};
|
|
18731
19027
|
|
|
18732
19028
|
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
18733
|
-
import { RuntimeModelError as
|
|
19029
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
18734
19030
|
var DataSetNode2 = class extends UILogicNode {
|
|
18735
19031
|
async exec(ctx) {
|
|
18736
19032
|
const {
|
|
@@ -18740,7 +19036,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
18740
19036
|
retDEUILogicParamId
|
|
18741
19037
|
} = this.model;
|
|
18742
19038
|
if (!dstDEUILogicParamId) {
|
|
18743
|
-
throw new
|
|
19039
|
+
throw new RuntimeModelError46(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
|
|
18744
19040
|
}
|
|
18745
19041
|
const queryParams = ctx.params[dstDEUILogicParamId];
|
|
18746
19042
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -18753,6 +19049,10 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
18753
19049
|
if (res.ok) {
|
|
18754
19050
|
ctx.params[retDEUILogicParamId] = res.data;
|
|
18755
19051
|
}
|
|
19052
|
+
ibiz.log.debug(
|
|
19053
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u6570\u636E\u96C6\u5408\uFF09\uFF1A".concat(this.model.id, "-\u6570\u636E\u96C6\u5B9E\u4F53\u6807\u8BC6\uFF1A").concat(dstAppDataEntityId, "-\u6570\u636E\u96C6\u6807\u8BC6\uFF1A").concat(dstAppDEDataSetId, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(retDEUILogicParamId, "-\u503C\uFF1A"),
|
|
19054
|
+
ctx.params[retDEUILogicParamId]
|
|
19055
|
+
);
|
|
18756
19056
|
}
|
|
18757
19057
|
};
|
|
18758
19058
|
|
|
@@ -18761,24 +19061,27 @@ import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
|
18761
19061
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
18762
19062
|
async exec(_ctx) {
|
|
18763
19063
|
const { errorInfo } = this.model;
|
|
19064
|
+
ibiz.log.debug(
|
|
19065
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u629B\u51FA\u5F02\u5E38\uFF09\uFF1A".concat(this.model.id, "-\u9519\u8BEF\u4FE1\u606F\uFF1A").concat(errorInfo)
|
|
19066
|
+
);
|
|
18764
19067
|
throw new RuntimeError43(errorInfo);
|
|
18765
19068
|
}
|
|
18766
19069
|
};
|
|
18767
19070
|
|
|
18768
19071
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
18769
|
-
import { RuntimeError as RuntimeError44, RuntimeModelError as
|
|
19072
|
+
import { RuntimeError as RuntimeError44, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
18770
19073
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
18771
19074
|
async exec(ctx) {
|
|
18772
19075
|
ctx.isEndNode = true;
|
|
18773
19076
|
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
18774
19077
|
if (!fireCtrlId) {
|
|
18775
|
-
throw new
|
|
19078
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
18776
19079
|
}
|
|
18777
19080
|
if (!eventName) {
|
|
18778
|
-
throw new
|
|
19081
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
18779
19082
|
}
|
|
18780
19083
|
if (!eventParamId) {
|
|
18781
|
-
throw new
|
|
19084
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
18782
19085
|
}
|
|
18783
19086
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
18784
19087
|
if (!invokeCtrl) {
|
|
@@ -18788,12 +19091,16 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
18788
19091
|
if (!eventParam) {
|
|
18789
19092
|
throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
18790
19093
|
}
|
|
19094
|
+
ibiz.log.debug(
|
|
19095
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u89C6\u56FE\u90E8\u4EF6\u4E8B\u4EF6\u89E6\u53D1\u903B\u8F91\uFF09\uFF1A".concat(this.model.id, "-\u8C03\u7528\u89C6\u56FE\u90E8\u4EF6\u540D\u79F0\uFF1A").concat(fireCtrlId, "-\u89E6\u53D1\u4E8B\u4EF6\u540D\u79F0\uFF1A").concat(eventName, "-\u89E6\u53D1\u53C2\u6570\uFF1A"),
|
|
19096
|
+
eventParam
|
|
19097
|
+
);
|
|
18791
19098
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
18792
19099
|
}
|
|
18793
19100
|
};
|
|
18794
19101
|
|
|
18795
19102
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
18796
|
-
import { RuntimeError as RuntimeError45, RuntimeModelError as
|
|
19103
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
18797
19104
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
18798
19105
|
async exec(ctx) {
|
|
18799
19106
|
const {
|
|
@@ -18803,13 +19110,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
18803
19110
|
retDEUILogicParamId
|
|
18804
19111
|
} = this.model;
|
|
18805
19112
|
if (!dstAppDataEntityId) {
|
|
18806
|
-
throw new
|
|
19113
|
+
throw new RuntimeModelError48(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
18807
19114
|
}
|
|
18808
19115
|
if (!dstAppDELogicId) {
|
|
18809
|
-
throw new
|
|
19116
|
+
throw new RuntimeModelError48(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
18810
19117
|
}
|
|
18811
19118
|
if (!dstDEUILogicParamId) {
|
|
18812
|
-
throw new
|
|
19119
|
+
throw new RuntimeModelError48(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
18813
19120
|
}
|
|
18814
19121
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
18815
19122
|
if (!dstParam) {
|
|
@@ -18825,12 +19132,20 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
18825
19132
|
if (retDEUILogicParamId) {
|
|
18826
19133
|
ctx.params[retDEUILogicParamId] = result;
|
|
18827
19134
|
}
|
|
19135
|
+
ibiz.log.debug(
|
|
19136
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u6267\u884C\u5B9E\u4F53\u903B\u8F91\uFF09\uFF1A".concat(this.model.id, "-\u5B9E\u4F53\u903B\u8F91\u6807\u8BC6\uFF1A").concat(dstAppDELogicId, "-\u5B9E\u4F53\u903B\u8F91\u6240\u5C5E\u5B9E\u4F53\uFF1A").concat(dstAppDataEntityId, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(retDEUILogicParamId, "-\u503C\uFF1A"),
|
|
19137
|
+
result
|
|
19138
|
+
);
|
|
18828
19139
|
}
|
|
18829
19140
|
};
|
|
18830
19141
|
|
|
18831
19142
|
// src/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.ts
|
|
18832
19143
|
var RawJSCodeNode = class extends UILogicNode {
|
|
18833
19144
|
async exec(ctx) {
|
|
19145
|
+
ibiz.log.debug(
|
|
19146
|
+
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u76F4\u63A5\u4EE3\u7801\uFF09\uFF1A".concat(this.model.id, "-\u76F4\u63A5\u4EE3\u7801\uFF1A"),
|
|
19147
|
+
this.model.code
|
|
19148
|
+
);
|
|
18834
19149
|
ScriptFactory.execScriptFn(
|
|
18835
19150
|
{
|
|
18836
19151
|
view: ctx.view,
|
|
@@ -18920,6 +19235,7 @@ var UILogicParam = class {
|
|
|
18920
19235
|
} else if (m.viewSessionParam) {
|
|
18921
19236
|
throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5F53\u524D\u89C6\u56FE\u4F1A\u8BDD");
|
|
18922
19237
|
}
|
|
19238
|
+
ibiz.log.debug("\u8BA1\u7B97\u754C\u9762\u903B\u8F91\u53C2\u6570\uFF0C\u6807\u8BC6\uFF1A".concat(tag), "-\u503C\uFF1A", ctx.params[tag]);
|
|
18923
19239
|
}
|
|
18924
19240
|
/**
|
|
18925
19241
|
* 重新建立变量
|
|
@@ -18937,6 +19253,11 @@ var UILogicParam = class {
|
|
|
18937
19253
|
} else {
|
|
18938
19254
|
throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
|
|
18939
19255
|
}
|
|
19256
|
+
ibiz.log.debug(
|
|
19257
|
+
"\u91CD\u65B0\u5EFA\u7ACB\u754C\u9762\u903B\u8F91\u53C2\u6570\uFF0C\u6807\u8BC6\uFF1A".concat(tag),
|
|
19258
|
+
"-\u503C\uFF1A",
|
|
19259
|
+
ctx.params[tag]
|
|
19260
|
+
);
|
|
18940
19261
|
}
|
|
18941
19262
|
};
|
|
18942
19263
|
|
|
@@ -18970,7 +19291,7 @@ var UILogic = class {
|
|
|
18970
19291
|
this.params = /* @__PURE__ */ new Map();
|
|
18971
19292
|
var _a;
|
|
18972
19293
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
18973
|
-
throw new
|
|
19294
|
+
throw new RuntimeModelError49(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
18974
19295
|
}
|
|
18975
19296
|
model.deuilogicNodes.forEach((node) => {
|
|
18976
19297
|
const { logicNodeType } = node;
|
|
@@ -19090,7 +19411,7 @@ var UILogic = class {
|
|
|
19090
19411
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
19091
19412
|
await this.deepExec(start, ctx);
|
|
19092
19413
|
} else {
|
|
19093
|
-
throw new
|
|
19414
|
+
throw new RuntimeModelError49(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
19094
19415
|
}
|
|
19095
19416
|
if (ctx.isEndNode) {
|
|
19096
19417
|
return ctx.result;
|
|
@@ -19143,8 +19464,15 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19143
19464
|
if (!uiLogicMap.has(deUILogic)) {
|
|
19144
19465
|
uiLogicMap.set(deUILogic, new UILogic(deUILogic));
|
|
19145
19466
|
}
|
|
19467
|
+
ibiz.log.debug(
|
|
19468
|
+
"\u5F00\u59CB\u6267\u884C\u754C\u9762\u903B\u8F91\uFF0C\u5B9E\u4F53\uFF1A".concat(appDataEntityId, "-\u903B\u8F91\u540D\u79F0\uFF1A").concat(deUILogic.name)
|
|
19469
|
+
);
|
|
19146
19470
|
const uiLogic = uiLogicMap.get(deUILogic);
|
|
19147
|
-
|
|
19471
|
+
const result = await uiLogic.exec(parameters);
|
|
19472
|
+
ibiz.log.debug(
|
|
19473
|
+
"\u7ED3\u675F\u6267\u884C\u754C\u9762\u903B\u8F91\uFF0C\u5B9E\u4F53\uFF1A".concat(appDataEntityId, "-\u903B\u8F91\u540D\u79F0\uFF1A").concat(deUILogic.name)
|
|
19474
|
+
);
|
|
19475
|
+
return result;
|
|
19148
19476
|
}
|
|
19149
19477
|
|
|
19150
19478
|
// src/ui-action/uiaction-util.ts
|
|
@@ -19258,25 +19586,29 @@ var UIActionProviderBase = class {
|
|
|
19258
19586
|
refreshMode: action.refreshMode,
|
|
19259
19587
|
closeView: action.closeEditView
|
|
19260
19588
|
};
|
|
19589
|
+
const { view } = args;
|
|
19590
|
+
if (action.closeEditView) {
|
|
19591
|
+
view.state.isClosing = true;
|
|
19592
|
+
}
|
|
19261
19593
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
19262
19594
|
if (uilogicAttachMode === "REPLACE") {
|
|
19263
19595
|
if (!appDEUILogicId) {
|
|
19264
|
-
throw new
|
|
19596
|
+
throw new RuntimeModelError50(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
19265
19597
|
}
|
|
19266
19598
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
19267
19599
|
return result;
|
|
19268
19600
|
}
|
|
19269
19601
|
if (!await this.isConfirm(action, args)) {
|
|
19270
|
-
return this.returnError(result);
|
|
19602
|
+
return this.returnError(result, view);
|
|
19271
19603
|
}
|
|
19272
19604
|
const _result = await this.execAction(action, args);
|
|
19273
19605
|
Object.assign(result, _result);
|
|
19274
19606
|
if (result.cancel === true) {
|
|
19275
|
-
return this.returnError(result);
|
|
19607
|
+
return this.returnError(result, view);
|
|
19276
19608
|
}
|
|
19277
19609
|
if (action.uilogicAttachMode === "AFTER") {
|
|
19278
19610
|
if (!appDEUILogicId) {
|
|
19279
|
-
throw new
|
|
19611
|
+
throw new RuntimeModelError50(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
19280
19612
|
}
|
|
19281
19613
|
await execUILogic(
|
|
19282
19614
|
appDEUILogicId,
|
|
@@ -19296,7 +19628,7 @@ var UIActionProviderBase = class {
|
|
|
19296
19628
|
if (nextResult) {
|
|
19297
19629
|
Object.assign(result, nextResult);
|
|
19298
19630
|
if (nextResult.cancel === true) {
|
|
19299
|
-
return this.returnError(result);
|
|
19631
|
+
return this.returnError(result, view);
|
|
19300
19632
|
}
|
|
19301
19633
|
}
|
|
19302
19634
|
}
|
|
@@ -19328,7 +19660,8 @@ var UIActionProviderBase = class {
|
|
|
19328
19660
|
* @returns {*} {IUIActionResult}
|
|
19329
19661
|
* @memberof UIActionHandler
|
|
19330
19662
|
*/
|
|
19331
|
-
returnError(result) {
|
|
19663
|
+
returnError(result, view) {
|
|
19664
|
+
view.state.isClosing = false;
|
|
19332
19665
|
return Object.assign(result, {
|
|
19333
19666
|
refresh: false,
|
|
19334
19667
|
closeView: false
|
|
@@ -19522,7 +19855,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
19522
19855
|
const entityName = action.appDataEntityId;
|
|
19523
19856
|
const methodName = action.appDEMethodId;
|
|
19524
19857
|
if (!entityName || !methodName) {
|
|
19525
|
-
throw new
|
|
19858
|
+
throw new RuntimeModelError51(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
19526
19859
|
}
|
|
19527
19860
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
19528
19861
|
action,
|
|
@@ -19648,7 +19981,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
19648
19981
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
19649
19982
|
import {
|
|
19650
19983
|
StringUtil,
|
|
19651
|
-
RuntimeModelError as
|
|
19984
|
+
RuntimeModelError as RuntimeModelError52,
|
|
19652
19985
|
ModelError as ModelError26,
|
|
19653
19986
|
RuntimeError as RuntimeError48
|
|
19654
19987
|
} from "@ibiz-template/core";
|
|
@@ -19666,7 +19999,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19666
19999
|
case "WIZARD": {
|
|
19667
20000
|
const frontPSAppView = action.frontAppViewId;
|
|
19668
20001
|
if (!frontPSAppView) {
|
|
19669
|
-
throw new
|
|
20002
|
+
throw new RuntimeModelError52(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
19670
20003
|
}
|
|
19671
20004
|
const { resultContext, resultParams } = await this.handleParams(
|
|
19672
20005
|
action,
|
|
@@ -19732,7 +20065,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19732
20065
|
);
|
|
19733
20066
|
return result || {};
|
|
19734
20067
|
}
|
|
19735
|
-
throw new
|
|
20068
|
+
throw new RuntimeModelError52(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
19736
20069
|
}
|
|
19737
20070
|
/**
|
|
19738
20071
|
* 执行打印行为
|
|
@@ -20585,8 +20918,8 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
20585
20918
|
};
|
|
20586
20919
|
|
|
20587
20920
|
// src/controller/control/data-view/data-view.controller.ts
|
|
20588
|
-
import { RuntimeModelError as
|
|
20589
|
-
import { isNil as
|
|
20921
|
+
import { RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
20922
|
+
import { isNil as isNil25 } from "ramda";
|
|
20590
20923
|
|
|
20591
20924
|
// src/controller/control/data-view/data-view.service.ts
|
|
20592
20925
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -20800,7 +21133,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20800
21133
|
const optItemModel = this.getOptItemModel();
|
|
20801
21134
|
if (optItemModel) {
|
|
20802
21135
|
if (!optItemModel.deuiactionGroup) {
|
|
20803
|
-
throw new
|
|
21136
|
+
throw new RuntimeModelError53(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
20804
21137
|
}
|
|
20805
21138
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
20806
21139
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -20853,7 +21186,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20853
21186
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
20854
21187
|
if (enableGroup && groupMode) {
|
|
20855
21188
|
if (!groupAppDEFieldId) {
|
|
20856
|
-
throw new
|
|
21189
|
+
throw new RuntimeModelError53(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
20857
21190
|
}
|
|
20858
21191
|
if (groupMode === "AUTO") {
|
|
20859
21192
|
this.handleAutoGroup();
|
|
@@ -20874,7 +21207,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20874
21207
|
const groupMap = /* @__PURE__ */ new Map();
|
|
20875
21208
|
items.forEach((item) => {
|
|
20876
21209
|
const groupVal = item[groupAppDEFieldId];
|
|
20877
|
-
if (
|
|
21210
|
+
if (isNil25(groupVal)) {
|
|
20878
21211
|
return;
|
|
20879
21212
|
}
|
|
20880
21213
|
if (!groupMap.has(groupVal)) {
|
|
@@ -20920,7 +21253,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20920
21253
|
async handleCodeListGroup() {
|
|
20921
21254
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
20922
21255
|
if (!groupCodeListId) {
|
|
20923
|
-
throw new
|
|
21256
|
+
throw new RuntimeModelError53(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
20924
21257
|
}
|
|
20925
21258
|
const { items } = this.state;
|
|
20926
21259
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -21026,7 +21359,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21026
21359
|
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
21027
21360
|
}
|
|
21028
21361
|
if (!item.appDEFieldId) {
|
|
21029
|
-
throw new
|
|
21362
|
+
throw new RuntimeModelError53(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
|
|
21030
21363
|
}
|
|
21031
21364
|
const tempItem = {
|
|
21032
21365
|
caption,
|
|
@@ -21044,10 +21377,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21044
21377
|
};
|
|
21045
21378
|
|
|
21046
21379
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
21047
|
-
import { RuntimeModelError as
|
|
21380
|
+
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
21048
21381
|
|
|
21049
21382
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
21050
|
-
import { RuntimeError as RuntimeError50, RuntimeModelError as
|
|
21383
|
+
import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
21051
21384
|
var ExpBarControlController = class extends ControlController {
|
|
21052
21385
|
constructor() {
|
|
21053
21386
|
super(...arguments);
|
|
@@ -21102,7 +21435,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21102
21435
|
get xDataController() {
|
|
21103
21436
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21104
21437
|
if (!controller) {
|
|
21105
|
-
throw new
|
|
21438
|
+
throw new RuntimeModelError54(
|
|
21106
21439
|
this.model,
|
|
21107
21440
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21108
21441
|
);
|
|
@@ -21466,7 +21799,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21466
21799
|
get xDataController() {
|
|
21467
21800
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21468
21801
|
if (!controller) {
|
|
21469
|
-
throw new
|
|
21802
|
+
throw new RuntimeModelError55(
|
|
21470
21803
|
this.model,
|
|
21471
21804
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21472
21805
|
);
|
|
@@ -21521,7 +21854,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21521
21854
|
};
|
|
21522
21855
|
|
|
21523
21856
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
21524
|
-
import { RuntimeError as RuntimeError51, RuntimeModelError as
|
|
21857
|
+
import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
21525
21858
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
21526
21859
|
constructor() {
|
|
21527
21860
|
super(...arguments);
|
|
@@ -21544,7 +21877,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21544
21877
|
get xDataController() {
|
|
21545
21878
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21546
21879
|
if (!controller) {
|
|
21547
|
-
throw new
|
|
21880
|
+
throw new RuntimeModelError56(
|
|
21548
21881
|
this.model,
|
|
21549
21882
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21550
21883
|
);
|
|
@@ -21805,7 +22138,7 @@ import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
|
21805
22138
|
|
|
21806
22139
|
// src/controller/control/form/form/form.controller.ts
|
|
21807
22140
|
import {
|
|
21808
|
-
RuntimeModelError as
|
|
22141
|
+
RuntimeModelError as RuntimeModelError57,
|
|
21809
22142
|
debounceAndAsyncMerge,
|
|
21810
22143
|
recursiveIterate as recursiveIterate3
|
|
21811
22144
|
} from "@ibiz-template/core";
|
|
@@ -21866,6 +22199,70 @@ var FormController = class extends ControlController {
|
|
|
21866
22199
|
this.state.processing = false;
|
|
21867
22200
|
this.state.modified = false;
|
|
21868
22201
|
}
|
|
22202
|
+
/**
|
|
22203
|
+
* 进行模型预处理
|
|
22204
|
+
*
|
|
22205
|
+
* @author chitanda
|
|
22206
|
+
* @date 2024-02-27 09:02:52
|
|
22207
|
+
* @protected
|
|
22208
|
+
*/
|
|
22209
|
+
preprocessModel(model) {
|
|
22210
|
+
if (this.context && (this.context.srfreadonly === true || this.context.srfreadonly === "true")) {
|
|
22211
|
+
const pages = model.deformPages;
|
|
22212
|
+
if (pages) {
|
|
22213
|
+
pages.forEach((page) => {
|
|
22214
|
+
page.infoGroupMode = true;
|
|
22215
|
+
if (page.deformDetails) {
|
|
22216
|
+
page.deformDetails.forEach((detail) => {
|
|
22217
|
+
this.deepPreprocessModel(detail);
|
|
22218
|
+
});
|
|
22219
|
+
}
|
|
22220
|
+
});
|
|
22221
|
+
}
|
|
22222
|
+
}
|
|
22223
|
+
}
|
|
22224
|
+
/**
|
|
22225
|
+
* 递归将表单模型修改为信息态
|
|
22226
|
+
*
|
|
22227
|
+
* @author chitanda
|
|
22228
|
+
* @date 2024-02-27 11:02:43
|
|
22229
|
+
* @protected
|
|
22230
|
+
* @param {IDEFormGroupBase} model
|
|
22231
|
+
*/
|
|
22232
|
+
deepPreprocessModel(model) {
|
|
22233
|
+
if (model.detailType === "GROUPPANEL") {
|
|
22234
|
+
model.infoGroupMode = true;
|
|
22235
|
+
} else if (model.detailType === "FORMITEM") {
|
|
22236
|
+
const { editor } = model;
|
|
22237
|
+
if (editor) {
|
|
22238
|
+
editor.readOnly = true;
|
|
22239
|
+
}
|
|
22240
|
+
}
|
|
22241
|
+
switch (model.detailType) {
|
|
22242
|
+
case "FORMITEM": {
|
|
22243
|
+
const { editor } = model;
|
|
22244
|
+
if (editor) {
|
|
22245
|
+
editor.readOnly = true;
|
|
22246
|
+
}
|
|
22247
|
+
break;
|
|
22248
|
+
}
|
|
22249
|
+
case "MDCTRL": {
|
|
22250
|
+
const detail = model;
|
|
22251
|
+
detail.buildInActions = 0;
|
|
22252
|
+
break;
|
|
22253
|
+
}
|
|
22254
|
+
case "GROUPPANEL":
|
|
22255
|
+
model.infoGroupMode = true;
|
|
22256
|
+
break;
|
|
22257
|
+
default:
|
|
22258
|
+
break;
|
|
22259
|
+
}
|
|
22260
|
+
if (model.deformDetails) {
|
|
22261
|
+
model.deformDetails.forEach((detail) => {
|
|
22262
|
+
this.deepPreprocessModel(detail);
|
|
22263
|
+
});
|
|
22264
|
+
}
|
|
22265
|
+
}
|
|
21869
22266
|
/**
|
|
21870
22267
|
* 通知所有表单成员表单操作过程中的数据变更
|
|
21871
22268
|
*
|
|
@@ -21933,7 +22330,7 @@ var FormController = class extends ControlController {
|
|
|
21933
22330
|
return;
|
|
21934
22331
|
}
|
|
21935
22332
|
if (form.details[detail.id]) {
|
|
21936
|
-
throw new
|
|
22333
|
+
throw new RuntimeModelError57(
|
|
21937
22334
|
detail,
|
|
21938
22335
|
"\u521D\u59CB\u5316\u5F02\u5E38: \u8868\u5355\u6210\u5458[".concat(detail.id, "](").concat(detail.detailType, ")\u5DF2\u5B58\u5728\uFF0C\u8868\u5355\u9879\u6807\u8BC6\u91CD\u590D\u8BF7\u68C0\u67E5\u914D\u7F6E")
|
|
21939
22336
|
);
|
|
@@ -23554,7 +23951,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
23554
23951
|
import {
|
|
23555
23952
|
mergeInLeft,
|
|
23556
23953
|
ModelError as ModelError27,
|
|
23557
|
-
RuntimeModelError as
|
|
23954
|
+
RuntimeModelError as RuntimeModelError58
|
|
23558
23955
|
} from "@ibiz-template/core";
|
|
23559
23956
|
var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
23560
23957
|
constructor() {
|
|
@@ -23580,7 +23977,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
23580
23977
|
await super.onInit();
|
|
23581
23978
|
const { contentControl } = this.model;
|
|
23582
23979
|
if (!contentControl) {
|
|
23583
|
-
throw new
|
|
23980
|
+
throw new RuntimeModelError58(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
23584
23981
|
}
|
|
23585
23982
|
if (contentControl.controlType === "GRID") {
|
|
23586
23983
|
mergeInLeft(contentControl, {
|
|
@@ -23677,7 +24074,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
23677
24074
|
};
|
|
23678
24075
|
|
|
23679
24076
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
23680
|
-
import { RuntimeError as RuntimeError53, RuntimeModelError as
|
|
24077
|
+
import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
|
|
23681
24078
|
import { createUUID as createUUID11 } from "qx-util";
|
|
23682
24079
|
|
|
23683
24080
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -23718,7 +24115,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
23718
24115
|
super.onInit();
|
|
23719
24116
|
const { contentControl } = this.model;
|
|
23720
24117
|
if (!contentControl) {
|
|
23721
|
-
throw new
|
|
24118
|
+
throw new RuntimeModelError59(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
23722
24119
|
}
|
|
23723
24120
|
contentControl.enableAutoSave = this.enableCreate || this.enableUpdate;
|
|
23724
24121
|
const controlProvider = await getControlProvider(contentControl);
|
|
@@ -24105,7 +24502,7 @@ import { clone as clone25 } from "ramda";
|
|
|
24105
24502
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
24106
24503
|
import {
|
|
24107
24504
|
recursiveIterate as recursiveIterate6,
|
|
24108
|
-
RuntimeModelError as
|
|
24505
|
+
RuntimeModelError as RuntimeModelError60
|
|
24109
24506
|
} from "@ibiz-template/core";
|
|
24110
24507
|
var EditFormService = class extends FormService {
|
|
24111
24508
|
/**
|
|
@@ -24229,7 +24626,7 @@ var EditFormService = class extends FormService {
|
|
|
24229
24626
|
const wizardForm = this.model;
|
|
24230
24627
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
24231
24628
|
if (!methodName) {
|
|
24232
|
-
throw new
|
|
24629
|
+
throw new RuntimeModelError60(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
24233
24630
|
}
|
|
24234
24631
|
let res = await this.exec(
|
|
24235
24632
|
methodName,
|
|
@@ -24597,7 +24994,9 @@ var EditFormController = class extends FormController {
|
|
|
24597
24994
|
}
|
|
24598
24995
|
this.state.modified = false;
|
|
24599
24996
|
await this.evt.emit("onSaveSuccess", void 0);
|
|
24600
|
-
this.
|
|
24997
|
+
if (!this.view.state.isClosing) {
|
|
24998
|
+
this.formStateNotify("SAVE" /* SAVE */);
|
|
24999
|
+
}
|
|
24601
25000
|
if (!silent) {
|
|
24602
25001
|
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "SUCCESS"), {
|
|
24603
25002
|
default: "".concat(this.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F")
|
|
@@ -25089,12 +25488,12 @@ import {
|
|
|
25089
25488
|
mergeDefaultInLeft,
|
|
25090
25489
|
recursiveIterate as recursiveIterate7,
|
|
25091
25490
|
RuntimeError as RuntimeError55,
|
|
25092
|
-
RuntimeModelError as
|
|
25491
|
+
RuntimeModelError as RuntimeModelError62
|
|
25093
25492
|
} from "@ibiz-template/core";
|
|
25094
25493
|
import { clone as clone26 } from "ramda";
|
|
25095
25494
|
|
|
25096
25495
|
// src/controller/control/grid/grid/grid.service.ts
|
|
25097
|
-
import { RuntimeModelError as
|
|
25496
|
+
import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
25098
25497
|
var GridService = class extends MDControlService {
|
|
25099
25498
|
/**
|
|
25100
25499
|
* 初始化属性映射
|
|
@@ -25122,7 +25521,7 @@ var GridService = class extends MDControlService {
|
|
|
25122
25521
|
dataType: dataItem.dataType
|
|
25123
25522
|
});
|
|
25124
25523
|
} else {
|
|
25125
|
-
throw new
|
|
25524
|
+
throw new RuntimeModelError61(
|
|
25126
25525
|
column,
|
|
25127
25526
|
"\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8868\u683C\u6570\u636E\u9879[".concat(deField, "]")
|
|
25128
25527
|
);
|
|
@@ -25432,11 +25831,11 @@ var GridController = class extends MDControlController {
|
|
|
25432
25831
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
25433
25832
|
);
|
|
25434
25833
|
if (!this.groupFieldColumn) {
|
|
25435
|
-
throw new
|
|
25834
|
+
throw new RuntimeModelError62(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
25436
25835
|
}
|
|
25437
25836
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
25438
25837
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
25439
|
-
throw new
|
|
25838
|
+
throw new RuntimeModelError62(
|
|
25440
25839
|
this.groupFieldColumn.model,
|
|
25441
25840
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
25442
25841
|
);
|
|
@@ -25446,7 +25845,7 @@ var GridController = class extends MDControlController {
|
|
|
25446
25845
|
);
|
|
25447
25846
|
if (index !== -1 && index !== 0) {
|
|
25448
25847
|
if (this.isMultistageHeader) {
|
|
25449
|
-
throw new
|
|
25848
|
+
throw new RuntimeModelError62(
|
|
25450
25849
|
this.model,
|
|
25451
25850
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
25452
25851
|
);
|
|
@@ -25456,10 +25855,10 @@ var GridController = class extends MDControlController {
|
|
|
25456
25855
|
}
|
|
25457
25856
|
if (groupMode === "CODELIST") {
|
|
25458
25857
|
if (!groupCodeListId) {
|
|
25459
|
-
throw new
|
|
25858
|
+
throw new RuntimeModelError62(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
25460
25859
|
}
|
|
25461
25860
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
25462
|
-
throw new
|
|
25861
|
+
throw new RuntimeModelError62(
|
|
25463
25862
|
this.model,
|
|
25464
25863
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
25465
25864
|
);
|
|
@@ -25547,7 +25946,7 @@ var GridController = class extends MDControlController {
|
|
|
25547
25946
|
return;
|
|
25548
25947
|
}
|
|
25549
25948
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
25550
|
-
throw new
|
|
25949
|
+
throw new RuntimeModelError62(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
25551
25950
|
}
|
|
25552
25951
|
const params = await this.getFetchParams();
|
|
25553
25952
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -26155,12 +26554,12 @@ var GridController = class extends MDControlController {
|
|
|
26155
26554
|
(column) => column.caption
|
|
26156
26555
|
);
|
|
26157
26556
|
} else {
|
|
26158
|
-
|
|
26159
|
-
|
|
26160
|
-
|
|
26161
|
-
|
|
26162
|
-
|
|
26163
|
-
);
|
|
26557
|
+
const { degridColumns } = this.model;
|
|
26558
|
+
if (!degridColumns) {
|
|
26559
|
+
throw new RuntimeError55("\u65E0\u8868\u683C\u5217");
|
|
26560
|
+
}
|
|
26561
|
+
filterVal = degridColumns.map((item) => item.id);
|
|
26562
|
+
header = degridColumns.map((item) => item.caption);
|
|
26164
26563
|
}
|
|
26165
26564
|
const data = formatArrayData(filterVal, await getExportData());
|
|
26166
26565
|
await exportData(header, data, this.model.logicName);
|
|
@@ -26279,6 +26678,7 @@ var GridController = class extends MDControlController {
|
|
|
26279
26678
|
setGroupParams(data) {
|
|
26280
26679
|
if (data.sort) {
|
|
26281
26680
|
this.state.sortQuery = data.sort;
|
|
26681
|
+
this.isSetSort = true;
|
|
26282
26682
|
} else {
|
|
26283
26683
|
this.state.sortQuery = "";
|
|
26284
26684
|
}
|
|
@@ -26336,7 +26736,7 @@ var GridController = class extends MDControlController {
|
|
|
26336
26736
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
26337
26737
|
import dayjs5 from "dayjs";
|
|
26338
26738
|
import { debounce as debounce3 } from "lodash-es";
|
|
26339
|
-
import { clone as clone27, isNil as
|
|
26739
|
+
import { clone as clone27, isNil as isNil26 } from "ramda";
|
|
26340
26740
|
var GridFieldColumnController = class extends GridColumnController {
|
|
26341
26741
|
constructor() {
|
|
26342
26742
|
super(...arguments);
|
|
@@ -26548,11 +26948,11 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26548
26948
|
*/
|
|
26549
26949
|
calcFieldAgg(items) {
|
|
26550
26950
|
const { aggField, aggMode, aggValueFormat, unitName } = this.model;
|
|
26551
|
-
if (
|
|
26951
|
+
if (isNil26(aggMode) || aggMode === "NONE") {
|
|
26552
26952
|
return;
|
|
26553
26953
|
}
|
|
26554
26954
|
const fieldName = aggField || this.model.id;
|
|
26555
|
-
items = items.filter((item) => !
|
|
26955
|
+
items = items.filter((item) => !isNil26(item[fieldName]));
|
|
26556
26956
|
let aggValue;
|
|
26557
26957
|
if (this.grid.model.aggMode === "PAGE") {
|
|
26558
26958
|
switch (aggMode) {
|
|
@@ -26645,7 +27045,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26645
27045
|
};
|
|
26646
27046
|
|
|
26647
27047
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
26648
|
-
import { RuntimeModelError as
|
|
27048
|
+
import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
|
|
26649
27049
|
var GridUAColumnController = class extends GridColumnController {
|
|
26650
27050
|
/**
|
|
26651
27051
|
* 给rowController初始化操作列的状态
|
|
@@ -26658,7 +27058,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
26658
27058
|
var _a;
|
|
26659
27059
|
const { deuiactionGroup } = this.model;
|
|
26660
27060
|
if (!deuiactionGroup) {
|
|
26661
|
-
throw new
|
|
27061
|
+
throw new RuntimeModelError63(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
26662
27062
|
}
|
|
26663
27063
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
26664
27064
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -27868,11 +28268,11 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
27868
28268
|
|
|
27869
28269
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
27870
28270
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
27871
|
-
import { clone as clone28, isNil as
|
|
28271
|
+
import { clone as clone28, isNil as isNil28 } from "ramda";
|
|
27872
28272
|
import { isString as isString2 } from "lodash-es";
|
|
27873
28273
|
|
|
27874
28274
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
27875
|
-
import { RuntimeModelError as
|
|
28275
|
+
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
27876
28276
|
var ExcludeOPs = [
|
|
27877
28277
|
"ISNULL" /* IS_NULL */,
|
|
27878
28278
|
"ISNOTNULL" /* IS_NOT_NULL */
|
|
@@ -27920,7 +28320,7 @@ var SearchBarFilterController = class {
|
|
|
27920
28320
|
async init() {
|
|
27921
28321
|
if (!this.noEditor) {
|
|
27922
28322
|
if (!this.model.editor) {
|
|
27923
|
-
throw new
|
|
28323
|
+
throw new RuntimeModelError64(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
|
|
27924
28324
|
}
|
|
27925
28325
|
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
27926
28326
|
if (this.editorProvider) {
|
|
@@ -28310,7 +28710,7 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
28310
28710
|
|
|
28311
28711
|
// src/controller/control/search-bar/use-searchcond.ts
|
|
28312
28712
|
import { RuntimeError as RuntimeError58, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
28313
|
-
import { isNil as
|
|
28713
|
+
import { isNil as isNil27 } from "ramda";
|
|
28314
28714
|
function getOriginFilterNodes() {
|
|
28315
28715
|
return [
|
|
28316
28716
|
{
|
|
@@ -28367,7 +28767,7 @@ function calcSearchConds(filterNodes) {
|
|
|
28367
28767
|
let hasError = false;
|
|
28368
28768
|
recursiveIterate9(filterNodes[0], (node) => {
|
|
28369
28769
|
if (node.leaf) {
|
|
28370
|
-
if (node.field && node.valueOP && !
|
|
28770
|
+
if (node.field && node.valueOP && !isNil27(node.value)) {
|
|
28371
28771
|
hasFilter = true;
|
|
28372
28772
|
} else {
|
|
28373
28773
|
hasError = true;
|
|
@@ -28666,7 +29066,7 @@ var SearchBarController = class extends ControlController {
|
|
|
28666
29066
|
recursiveIterate10(
|
|
28667
29067
|
searchconds[0],
|
|
28668
29068
|
(node) => {
|
|
28669
|
-
if (node.condtype === "DEFIELD" && !
|
|
29069
|
+
if (node.condtype === "DEFIELD" && !isNil28(node.value)) {
|
|
28670
29070
|
const controller = this.findFilterController(
|
|
28671
29071
|
node.fieldname,
|
|
28672
29072
|
node.condop
|
|
@@ -29109,7 +29509,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
29109
29509
|
// src/controller/control/tree/tree.controller.ts
|
|
29110
29510
|
import {
|
|
29111
29511
|
RuntimeError as RuntimeError59,
|
|
29112
|
-
RuntimeModelError as
|
|
29512
|
+
RuntimeModelError as RuntimeModelError65,
|
|
29113
29513
|
recursiveIterate as recursiveIterate11
|
|
29114
29514
|
} from "@ibiz-template/core";
|
|
29115
29515
|
|
|
@@ -29395,6 +29795,49 @@ var TreeService = class extends MDControlService {
|
|
|
29395
29795
|
}
|
|
29396
29796
|
return [];
|
|
29397
29797
|
}
|
|
29798
|
+
/**
|
|
29799
|
+
* 删除单条数据
|
|
29800
|
+
*
|
|
29801
|
+
* @author lxm
|
|
29802
|
+
* @date 2022-09-07 19:09:48
|
|
29803
|
+
* @param {IContext} context 上下文
|
|
29804
|
+
* @param {IParams} [params={}] 视图参数
|
|
29805
|
+
* @returns {*}
|
|
29806
|
+
*/
|
|
29807
|
+
async removeItem(appDataEntityId, context, params = {}) {
|
|
29808
|
+
var _a;
|
|
29809
|
+
const removeAction = ((_a = this.model.removeControlAction) == null ? void 0 : _a.appDEMethodId) || "remove";
|
|
29810
|
+
const res = await this.execWithEntityId(
|
|
29811
|
+
appDataEntityId,
|
|
29812
|
+
removeAction,
|
|
29813
|
+
context,
|
|
29814
|
+
void 0,
|
|
29815
|
+
params
|
|
29816
|
+
);
|
|
29817
|
+
return res;
|
|
29818
|
+
}
|
|
29819
|
+
/**
|
|
29820
|
+
* 执行服务方法(带实体id)
|
|
29821
|
+
*
|
|
29822
|
+
* @author lxm
|
|
29823
|
+
* @date 2022-08-31 17:08:41
|
|
29824
|
+
* @param {string} methodName 方法名
|
|
29825
|
+
* @param {IContext} context 上下文
|
|
29826
|
+
* @param {IParams} [params={}] 视图参数或数据
|
|
29827
|
+
* @returns {*} {Promise<IHttpResponse>}
|
|
29828
|
+
*/
|
|
29829
|
+
async execWithEntityId(appDataEntityId, methodName, context, data, params) {
|
|
29830
|
+
const header = this.handleCustomRequestHeader();
|
|
29831
|
+
const res = await this.app.deService.exec(
|
|
29832
|
+
appDataEntityId,
|
|
29833
|
+
methodName,
|
|
29834
|
+
context,
|
|
29835
|
+
data,
|
|
29836
|
+
params,
|
|
29837
|
+
header
|
|
29838
|
+
);
|
|
29839
|
+
return res;
|
|
29840
|
+
}
|
|
29398
29841
|
};
|
|
29399
29842
|
|
|
29400
29843
|
// src/controller/control/tree/tree.controller.ts
|
|
@@ -30018,7 +30461,7 @@ var TreeController = class extends MDControlController {
|
|
|
30018
30461
|
const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
|
|
30019
30462
|
if (allowOrder === true) {
|
|
30020
30463
|
if (!sortAppDEFieldId) {
|
|
30021
|
-
throw new
|
|
30464
|
+
throw new RuntimeModelError65(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
|
|
30022
30465
|
}
|
|
30023
30466
|
const sortField = sortAppDEFieldId.toLowerCase();
|
|
30024
30467
|
const isAsc = sortDir === "ASC";
|
|
@@ -30099,7 +30542,7 @@ var TreeController = class extends MDControlController {
|
|
|
30099
30542
|
async modifyNodeText(nodeData, text) {
|
|
30100
30543
|
const model = this.getNodeModel(nodeData._nodeId);
|
|
30101
30544
|
if (!model.allowEditText) {
|
|
30102
|
-
throw new
|
|
30545
|
+
throw new RuntimeModelError65(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
30103
30546
|
}
|
|
30104
30547
|
if (nodeData._nodeType !== "DE") {
|
|
30105
30548
|
throw new RuntimeError59("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
@@ -30107,6 +30550,30 @@ var TreeController = class extends MDControlController {
|
|
|
30107
30550
|
nodeData._text = text;
|
|
30108
30551
|
await this.updateDeNodeData([nodeData]);
|
|
30109
30552
|
}
|
|
30553
|
+
/**
|
|
30554
|
+
* 删除每一项
|
|
30555
|
+
* @return {*}
|
|
30556
|
+
* @author: zhujiamin
|
|
30557
|
+
* @Date: 2024-02-27 09:47:52
|
|
30558
|
+
*/
|
|
30559
|
+
async handleItemRemove(item, context, params) {
|
|
30560
|
+
let needRefresh = false;
|
|
30561
|
+
const treeNode = this.getNodeModel(item._nodeId);
|
|
30562
|
+
if (!treeNode) {
|
|
30563
|
+
throw new RuntimeError59("\u672A\u627E\u5230\u6811\u8282\u70B9");
|
|
30564
|
+
}
|
|
30565
|
+
const nodeAppDataEntityId = treeNode.appDataEntityId;
|
|
30566
|
+
if (nodeAppDataEntityId) {
|
|
30567
|
+
const deName = calcDeCodeNameById(nodeAppDataEntityId);
|
|
30568
|
+
if (item.srfuf !== 0 /* CREATE */) {
|
|
30569
|
+
const tempContext = context.clone();
|
|
30570
|
+
tempContext[deName] = item.srfkey;
|
|
30571
|
+
await this.service.removeItem(nodeAppDataEntityId, tempContext, params);
|
|
30572
|
+
needRefresh = true;
|
|
30573
|
+
}
|
|
30574
|
+
}
|
|
30575
|
+
return needRefresh;
|
|
30576
|
+
}
|
|
30110
30577
|
};
|
|
30111
30578
|
|
|
30112
30579
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
@@ -30462,8 +30929,8 @@ var WizardPanelController = class extends ControlController {
|
|
|
30462
30929
|
};
|
|
30463
30930
|
|
|
30464
30931
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
30465
|
-
import { RuntimeModelError as
|
|
30466
|
-
import { isNil as
|
|
30932
|
+
import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
30933
|
+
import { isNil as isNil29 } from "ramda";
|
|
30467
30934
|
|
|
30468
30935
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
30469
30936
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -30669,7 +31136,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30669
31136
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
30670
31137
|
if (enableGroup && groupMode) {
|
|
30671
31138
|
if (!groupAppDEFieldId) {
|
|
30672
|
-
throw new
|
|
31139
|
+
throw new RuntimeModelError66(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
30673
31140
|
}
|
|
30674
31141
|
if (groupMode === "AUTO") {
|
|
30675
31142
|
this.handleAutoGroup();
|
|
@@ -30690,7 +31157,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30690
31157
|
const groupMap = /* @__PURE__ */ new Map();
|
|
30691
31158
|
items.forEach((item) => {
|
|
30692
31159
|
const groupVal = item[groupAppDEFieldId];
|
|
30693
|
-
if (
|
|
31160
|
+
if (isNil29(groupVal)) {
|
|
30694
31161
|
return;
|
|
30695
31162
|
}
|
|
30696
31163
|
if (!groupMap.has(groupVal)) {
|
|
@@ -30736,7 +31203,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30736
31203
|
async handleCodeListGroup() {
|
|
30737
31204
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
30738
31205
|
if (!groupCodeListId) {
|
|
30739
|
-
throw new
|
|
31206
|
+
throw new RuntimeModelError66(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
30740
31207
|
}
|
|
30741
31208
|
const { items } = this.state;
|
|
30742
31209
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -30766,8 +31233,8 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30766
31233
|
};
|
|
30767
31234
|
|
|
30768
31235
|
// src/controller/control/kanban/kanban.controller.ts
|
|
30769
|
-
import { RuntimeError as RuntimeError61, RuntimeModelError as
|
|
30770
|
-
import { isNil as
|
|
31236
|
+
import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
31237
|
+
import { isNil as isNil30 } from "ramda";
|
|
30771
31238
|
|
|
30772
31239
|
// src/controller/control/kanban/kanban.service.ts
|
|
30773
31240
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -30844,15 +31311,15 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30844
31311
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
30845
31312
|
const { minorSortDir } = this.model;
|
|
30846
31313
|
if (!sortField) {
|
|
30847
|
-
throw new
|
|
31314
|
+
throw new RuntimeModelError67(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
30848
31315
|
}
|
|
30849
31316
|
if (!minorSortDir) {
|
|
30850
|
-
throw new
|
|
31317
|
+
throw new RuntimeModelError67(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
30851
31318
|
}
|
|
30852
31319
|
const isAsc = minorSortDir === "ASC";
|
|
30853
31320
|
items.forEach((item) => {
|
|
30854
31321
|
const sortValue = item[sortField];
|
|
30855
|
-
if (
|
|
31322
|
+
if (isNil30(sortValue)) {
|
|
30856
31323
|
item[sortField] = 0;
|
|
30857
31324
|
} else {
|
|
30858
31325
|
const toNum = Number(sortValue);
|
|
@@ -30959,7 +31426,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30959
31426
|
const groupMap = /* @__PURE__ */ new Map();
|
|
30960
31427
|
items.forEach((item) => {
|
|
30961
31428
|
const groupVal = item[groupAppDEFieldId];
|
|
30962
|
-
if (
|
|
31429
|
+
if (isNil30(groupVal)) {
|
|
30963
31430
|
return;
|
|
30964
31431
|
}
|
|
30965
31432
|
if (!groupMap.has(groupVal)) {
|
|
@@ -30991,7 +31458,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30991
31458
|
async handleCodeListGroup() {
|
|
30992
31459
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
30993
31460
|
if (!groupCodeListId) {
|
|
30994
|
-
throw new
|
|
31461
|
+
throw new RuntimeModelError67(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
30995
31462
|
}
|
|
30996
31463
|
const { items } = this.state;
|
|
30997
31464
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -31287,7 +31754,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
31287
31754
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
31288
31755
|
import {
|
|
31289
31756
|
RuntimeError as RuntimeError62,
|
|
31290
|
-
RuntimeModelError as
|
|
31757
|
+
RuntimeModelError as RuntimeModelError68,
|
|
31291
31758
|
awaitTimeout as awaitTimeout3,
|
|
31292
31759
|
recursiveIterate as recursiveIterate12
|
|
31293
31760
|
} from "@ibiz-template/core";
|
|
@@ -31567,7 +32034,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
31567
32034
|
throw new RuntimeError62("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
|
|
31568
32035
|
}
|
|
31569
32036
|
if (!updateAppDEActionId) {
|
|
31570
|
-
throw new
|
|
32037
|
+
throw new RuntimeModelError68(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
|
|
31571
32038
|
}
|
|
31572
32039
|
const deName = calcDeCodeNameById(appDataEntityId);
|
|
31573
32040
|
const tempContext = this.context.clone();
|
|
@@ -31838,7 +32305,7 @@ var TreeGridExColumnController = class {
|
|
|
31838
32305
|
import {
|
|
31839
32306
|
DataTypes as DataTypes5,
|
|
31840
32307
|
RuntimeError as RuntimeError63,
|
|
31841
|
-
RuntimeModelError as
|
|
32308
|
+
RuntimeModelError as RuntimeModelError69
|
|
31842
32309
|
} from "@ibiz-template/core";
|
|
31843
32310
|
import { clone as clone30 } from "ramda";
|
|
31844
32311
|
import dayjs6 from "dayjs";
|
|
@@ -31869,7 +32336,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
31869
32336
|
}
|
|
31870
32337
|
);
|
|
31871
32338
|
if (!nodeColumn || !nodeDataItem) {
|
|
31872
|
-
throw new
|
|
32339
|
+
throw new RuntimeModelError69(
|
|
31873
32340
|
nodeModel,
|
|
31874
32341
|
"\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u6570\u636E\u9879")
|
|
31875
32342
|
);
|
|
@@ -31883,7 +32350,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
31883
32350
|
}
|
|
31884
32351
|
);
|
|
31885
32352
|
if (!nodeEditItem) {
|
|
31886
|
-
throw new
|
|
32353
|
+
throw new RuntimeModelError69(
|
|
31887
32354
|
nodeModel,
|
|
31888
32355
|
"\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u7F16\u8F91\u9879\u6A21\u578B")
|
|
31889
32356
|
);
|
|
@@ -32383,7 +32850,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
32383
32850
|
};
|
|
32384
32851
|
|
|
32385
32852
|
// src/controller/control/tree-grid/tree-grid.controller.ts
|
|
32386
|
-
import { RuntimeModelError as
|
|
32853
|
+
import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
|
|
32387
32854
|
var TreeGridController = class extends GridController {
|
|
32388
32855
|
constructor() {
|
|
32389
32856
|
super(...arguments);
|
|
@@ -32428,10 +32895,10 @@ var TreeGridController = class extends GridController {
|
|
|
32428
32895
|
return item.treeColumnMode === 2 || item.treeColumnMode === 3;
|
|
32429
32896
|
});
|
|
32430
32897
|
if (!treeGridParent) {
|
|
32431
|
-
throw new
|
|
32898
|
+
throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
|
|
32432
32899
|
}
|
|
32433
32900
|
if (!treeGridValue) {
|
|
32434
|
-
throw new
|
|
32901
|
+
throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
|
|
32435
32902
|
}
|
|
32436
32903
|
this.treeGridValueField = treeGridValue.appDEFieldId.toLowerCase();
|
|
32437
32904
|
this.treeGridParentField = treeGridParent.appDEFieldId.toLowerCase();
|
|
@@ -33174,7 +33641,11 @@ var ReportPanelController = class extends ControlController {
|
|
|
33174
33641
|
};
|
|
33175
33642
|
|
|
33176
33643
|
// src/controller/control/gantt/gantt.controller.ts
|
|
33177
|
-
import {
|
|
33644
|
+
import {
|
|
33645
|
+
awaitTimeout as awaitTimeout4,
|
|
33646
|
+
RuntimeError as RuntimeError65,
|
|
33647
|
+
RuntimeModelError as RuntimeModelError71
|
|
33648
|
+
} from "@ibiz-template/core";
|
|
33178
33649
|
|
|
33179
33650
|
// src/controller/control/gantt/gantt.service.ts
|
|
33180
33651
|
import { ModelError as ModelError31 } from "@ibiz-template/core";
|
|
@@ -33490,6 +33961,93 @@ var GanttController = class extends TreeGridExController {
|
|
|
33490
33961
|
setGanttStyle(style) {
|
|
33491
33962
|
this.state.ganttStyle = style;
|
|
33492
33963
|
}
|
|
33964
|
+
async onCreated() {
|
|
33965
|
+
await super.onCreated();
|
|
33966
|
+
this.initViewScheduler();
|
|
33967
|
+
}
|
|
33968
|
+
/**
|
|
33969
|
+
* 初始化视图触发器
|
|
33970
|
+
*
|
|
33971
|
+
* @protected
|
|
33972
|
+
* @memberof GanttController
|
|
33973
|
+
*/
|
|
33974
|
+
initViewScheduler() {
|
|
33975
|
+
const viewLogics = this.model.appViewLogics || [];
|
|
33976
|
+
if (viewLogics.length !== 0) {
|
|
33977
|
+
this.viewScheduler = ibiz.scheduler.createViewScheduler(viewLogics);
|
|
33978
|
+
this.viewScheduler.defaultParamsCb = () => {
|
|
33979
|
+
return this.getEventArgs();
|
|
33980
|
+
};
|
|
33981
|
+
if (this.viewScheduler.hasViewEventTrigger) {
|
|
33982
|
+
this.evt.onAll((_eventName, event) => {
|
|
33983
|
+
this.viewScheduler.triggerViewEvent(event);
|
|
33984
|
+
});
|
|
33985
|
+
}
|
|
33986
|
+
}
|
|
33987
|
+
}
|
|
33988
|
+
/**
|
|
33989
|
+
* 设置激活数据
|
|
33990
|
+
*
|
|
33991
|
+
* @param {IGanttNodeData} item
|
|
33992
|
+
* @return {*} {Promise<void>}
|
|
33993
|
+
* @memberof GanttController
|
|
33994
|
+
*/
|
|
33995
|
+
async setActive(item) {
|
|
33996
|
+
const nodeParams = this.parseTreeNodeData(item);
|
|
33997
|
+
if (item._nodeType === "DE") {
|
|
33998
|
+
await this.onNodeDataActive(nodeParams);
|
|
33999
|
+
}
|
|
34000
|
+
return this._evt.emit("onActive", { ...nodeParams, nodeData: item });
|
|
34001
|
+
}
|
|
34002
|
+
/**
|
|
34003
|
+
* 节点数据激活
|
|
34004
|
+
*
|
|
34005
|
+
* @param {IGanttNodeData} item
|
|
34006
|
+
* @return {*} {Promise<void>}
|
|
34007
|
+
* @memberof GanttController
|
|
34008
|
+
*/
|
|
34009
|
+
async onNodeDataActive(nodeParams) {
|
|
34010
|
+
const res = await this.openData(nodeParams);
|
|
34011
|
+
if (!res.cancel) {
|
|
34012
|
+
this.refreshNodeChildren(nodeParams.data[0], true);
|
|
34013
|
+
}
|
|
34014
|
+
}
|
|
34015
|
+
/**
|
|
34016
|
+
* 打开编辑数据视图
|
|
34017
|
+
*
|
|
34018
|
+
* @param {IGanttNodeData} item
|
|
34019
|
+
* @memberof GanttController
|
|
34020
|
+
*/
|
|
34021
|
+
async openData({
|
|
34022
|
+
data,
|
|
34023
|
+
context,
|
|
34024
|
+
params
|
|
34025
|
+
}) {
|
|
34026
|
+
var _a;
|
|
34027
|
+
const nodeData = data[0];
|
|
34028
|
+
const nodeModel = this.getNodeModel(nodeData._nodeId);
|
|
34029
|
+
const { appDataEntityId } = nodeModel;
|
|
34030
|
+
const deName = calcDeCodeNameById(appDataEntityId);
|
|
34031
|
+
context[deName.toLowerCase()] = nodeData.srfkey;
|
|
34032
|
+
const result = await ((_a = this.viewScheduler) == null ? void 0 : _a.triggerCustom(
|
|
34033
|
+
"".concat(nodeModel.id.toLowerCase(), "_opendata"),
|
|
34034
|
+
{
|
|
34035
|
+
context,
|
|
34036
|
+
params,
|
|
34037
|
+
data,
|
|
34038
|
+
event: void 0,
|
|
34039
|
+
view: this.view,
|
|
34040
|
+
ctrl: this
|
|
34041
|
+
}
|
|
34042
|
+
));
|
|
34043
|
+
if (result === -1) {
|
|
34044
|
+
throw new RuntimeModelError71(nodeModel, "\u7F3A\u5C11opendata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
34045
|
+
} else {
|
|
34046
|
+
return {
|
|
34047
|
+
cancel: result ? result.ok : true
|
|
34048
|
+
};
|
|
34049
|
+
}
|
|
34050
|
+
}
|
|
33493
34051
|
/**
|
|
33494
34052
|
* 设置行属性的值
|
|
33495
34053
|
*
|
|
@@ -33540,7 +34098,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
33540
34098
|
/**
|
|
33541
34099
|
* 保存
|
|
33542
34100
|
*
|
|
33543
|
-
* @param {
|
|
34101
|
+
* @param {IGanttNodeData} nodeData
|
|
33544
34102
|
* @return {*} {Promise<void>}
|
|
33545
34103
|
* @memberof GanttController
|
|
33546
34104
|
*/
|
|
@@ -33567,9 +34125,6 @@ var GanttController = class extends TreeGridExController {
|
|
|
33567
34125
|
const nodeModel = this.getNodeModel(nodeData._nodeId);
|
|
33568
34126
|
const { appDataEntityId } = nodeModel;
|
|
33569
34127
|
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
33570
|
-
if (isCreate) {
|
|
33571
|
-
return;
|
|
33572
|
-
}
|
|
33573
34128
|
const deName = calcDeCodeNameById(appDataEntityId);
|
|
33574
34129
|
const tempContext = this.context.clone();
|
|
33575
34130
|
tempContext[deName] = nodeData._deData.srfkey;
|
|
@@ -33637,8 +34192,11 @@ var GanttController = class extends TreeGridExController {
|
|
|
33637
34192
|
tempContext,
|
|
33638
34193
|
params
|
|
33639
34194
|
);
|
|
33640
|
-
if (refreshNode) {
|
|
33641
|
-
|
|
34195
|
+
if (!refreshNode && item._parent) {
|
|
34196
|
+
const parentNodeData = this.getNodeData(
|
|
34197
|
+
item._parent._id
|
|
34198
|
+
);
|
|
34199
|
+
refreshNode = parentNodeData;
|
|
33642
34200
|
}
|
|
33643
34201
|
needRefresh = true;
|
|
33644
34202
|
}
|
|
@@ -33652,8 +34210,8 @@ var GanttController = class extends TreeGridExController {
|
|
|
33652
34210
|
default: "\u6570\u636E[".concat(data.map((item) => item.srfmajortext).join("\u3001"), "]\u5220\u9664\u6210\u529F!")
|
|
33653
34211
|
});
|
|
33654
34212
|
}
|
|
33655
|
-
if (needRefresh && !(args == null ? void 0 : args.notRefresh)) {
|
|
33656
|
-
await this.refreshNodeChildren(refreshNode
|
|
34213
|
+
if (needRefresh && refreshNode && !(args == null ? void 0 : args.notRefresh)) {
|
|
34214
|
+
await this.refreshNodeChildren(refreshNode);
|
|
33657
34215
|
}
|
|
33658
34216
|
} catch (error) {
|
|
33659
34217
|
await this._evt.emit("onRemoveError", void 0);
|
|
@@ -33683,7 +34241,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
33683
34241
|
if (this.state.rows[data._uuid]) {
|
|
33684
34242
|
delete this.state.rows[data._uuid];
|
|
33685
34243
|
}
|
|
33686
|
-
if (data.
|
|
34244
|
+
if (data._parent) {
|
|
33687
34245
|
const parentNodeData = this.getNodeData(
|
|
33688
34246
|
data._parent._id
|
|
33689
34247
|
);
|
|
@@ -33806,7 +34364,7 @@ import { QXEvent as QXEvent9 } from "qx-util";
|
|
|
33806
34364
|
// src/controller/notification/async-action.controller.ts
|
|
33807
34365
|
import { QXEvent as QXEvent7 } from "qx-util";
|
|
33808
34366
|
import { clone as clone31 } from "ramda";
|
|
33809
|
-
import { isNil as
|
|
34367
|
+
import { isNil as isNil31, isNumber as isNumber2 } from "lodash-es";
|
|
33810
34368
|
import dayjs7 from "dayjs";
|
|
33811
34369
|
var AsyncActionController = class {
|
|
33812
34370
|
constructor() {
|
|
@@ -33881,14 +34439,14 @@ var AsyncActionController = class {
|
|
|
33881
34439
|
data[key] = dayjs7(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
33882
34440
|
}
|
|
33883
34441
|
});
|
|
33884
|
-
if (!
|
|
34442
|
+
if (!isNil31(data.actionresult)) {
|
|
33885
34443
|
try {
|
|
33886
34444
|
const json = JSON.parse(data.actionresult);
|
|
33887
34445
|
data.actionresult = json;
|
|
33888
34446
|
} catch (error) {
|
|
33889
34447
|
}
|
|
33890
34448
|
}
|
|
33891
|
-
if (!
|
|
34449
|
+
if (!isNil31(data.completionrate)) {
|
|
33892
34450
|
const num = Number(data.completionrate);
|
|
33893
34451
|
if (Number.isNaN(num)) {
|
|
33894
34452
|
data.completionrate = void 0;
|
|
@@ -33944,6 +34502,9 @@ var AsyncActionController = class {
|
|
|
33944
34502
|
};
|
|
33945
34503
|
|
|
33946
34504
|
// src/controller/notification/internal-message.controller.ts
|
|
34505
|
+
import {
|
|
34506
|
+
IBizContext as IBizContext4
|
|
34507
|
+
} from "@ibiz-template/core";
|
|
33947
34508
|
import { QXEvent as QXEvent8 } from "qx-util";
|
|
33948
34509
|
function isHTML(str) {
|
|
33949
34510
|
if (str === "")
|
|
@@ -33969,7 +34530,6 @@ var InternalMessageController = class {
|
|
|
33969
34530
|
this.service = new InternalMessageService();
|
|
33970
34531
|
}
|
|
33971
34532
|
async init() {
|
|
33972
|
-
await this.load();
|
|
33973
34533
|
this.listenMqtt();
|
|
33974
34534
|
await this.refreshUnreadCount();
|
|
33975
34535
|
}
|
|
@@ -34056,12 +34616,25 @@ var InternalMessageController = class {
|
|
|
34056
34616
|
return;
|
|
34057
34617
|
}
|
|
34058
34618
|
if (msg.content) {
|
|
34059
|
-
ibiz.notification.
|
|
34619
|
+
ibiz.notification.default({
|
|
34060
34620
|
isHtmlDesc: isHTML(msg.content),
|
|
34061
34621
|
desc: msg.content,
|
|
34062
|
-
position: "bottom-right"
|
|
34622
|
+
position: "bottom-right",
|
|
34623
|
+
onClick: () => {
|
|
34624
|
+
const redirectUrl = ibiz.env.isMob ? msg.mobileurl : msg.url;
|
|
34625
|
+
if (redirectUrl) {
|
|
34626
|
+
const { viewId, context, params } = parseViewProtocol(redirectUrl);
|
|
34627
|
+
ibiz.commands.execute(
|
|
34628
|
+
OpenAppViewCommand.TAG,
|
|
34629
|
+
viewId,
|
|
34630
|
+
IBizContext4.create(context),
|
|
34631
|
+
params
|
|
34632
|
+
);
|
|
34633
|
+
}
|
|
34634
|
+
}
|
|
34063
34635
|
});
|
|
34064
34636
|
}
|
|
34637
|
+
this.refreshUnreadCount();
|
|
34065
34638
|
});
|
|
34066
34639
|
}
|
|
34067
34640
|
async markRead(message) {
|
|
@@ -34075,6 +34648,18 @@ var InternalMessageController = class {
|
|
|
34075
34648
|
this.evt.emit("unreadCountChange", this.unreadCount);
|
|
34076
34649
|
this.evt.emit("dataChange");
|
|
34077
34650
|
}
|
|
34651
|
+
/**
|
|
34652
|
+
* 把所有未读消息标记为已读
|
|
34653
|
+
* @return {*}
|
|
34654
|
+
* @author: zhujiamin
|
|
34655
|
+
* @Date: 2024-02-21 15:38:25
|
|
34656
|
+
*/
|
|
34657
|
+
async batchMarkRead() {
|
|
34658
|
+
await this.service.batchMarkRead();
|
|
34659
|
+
await this.fetch();
|
|
34660
|
+
this.unreadCount = 0;
|
|
34661
|
+
this.evt.emit("unreadCountChange", this.unreadCount);
|
|
34662
|
+
}
|
|
34078
34663
|
/**
|
|
34079
34664
|
* 获取完整信息
|
|
34080
34665
|
* @author lxm
|
|
@@ -34783,7 +35368,7 @@ var ViewEngineBase = class {
|
|
|
34783
35368
|
};
|
|
34784
35369
|
|
|
34785
35370
|
// src/engine/md-view.engine.ts
|
|
34786
|
-
import { RuntimeModelError as
|
|
35371
|
+
import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
34787
35372
|
import { clone as clone32 } from "ramda";
|
|
34788
35373
|
var MDViewEngine = class extends ViewEngineBase {
|
|
34789
35374
|
/**
|
|
@@ -34971,7 +35556,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
34971
35556
|
view: this.view
|
|
34972
35557
|
}));
|
|
34973
35558
|
if (result === -1) {
|
|
34974
|
-
throw new
|
|
35559
|
+
throw new RuntimeModelError72(this.view.model, "\u7F3A\u5C11opendata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
34975
35560
|
} else {
|
|
34976
35561
|
return {
|
|
34977
35562
|
cancel: !result.ok
|
|
@@ -34994,7 +35579,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
34994
35579
|
(item) => item.id === "newdata"
|
|
34995
35580
|
);
|
|
34996
35581
|
if (!openAppViewLogic) {
|
|
34997
|
-
throw new
|
|
35582
|
+
throw new RuntimeModelError72(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
34998
35583
|
}
|
|
34999
35584
|
const params = clone32(this.view.params);
|
|
35000
35585
|
if (copyMode) {
|
|
@@ -35008,7 +35593,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
35008
35593
|
view: this.view
|
|
35009
35594
|
}));
|
|
35010
35595
|
if (result === -1) {
|
|
35011
|
-
throw new
|
|
35596
|
+
throw new RuntimeModelError72(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
35012
35597
|
} else {
|
|
35013
35598
|
return {
|
|
35014
35599
|
cancel: !result.ok
|
|
@@ -35398,13 +35983,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
35398
35983
|
};
|
|
35399
35984
|
|
|
35400
35985
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
35401
|
-
import { RuntimeModelError as
|
|
35986
|
+
import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
35402
35987
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
35403
35988
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35404
35989
|
execute(executeParams) {
|
|
35405
35990
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
35406
35991
|
if (!appDEUILogicId) {
|
|
35407
|
-
throw new
|
|
35992
|
+
throw new RuntimeModelError73(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
35408
35993
|
}
|
|
35409
35994
|
return execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
35410
35995
|
}
|
|
@@ -35862,7 +36447,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
35862
36447
|
};
|
|
35863
36448
|
|
|
35864
36449
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
35865
|
-
import { RuntimeError as RuntimeError71, RuntimeModelError as
|
|
36450
|
+
import { RuntimeError as RuntimeError71, RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
35866
36451
|
var TimerTrigger = class extends LogicTrigger {
|
|
35867
36452
|
constructor() {
|
|
35868
36453
|
super(...arguments);
|
|
@@ -35870,7 +36455,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
35870
36455
|
}
|
|
35871
36456
|
start() {
|
|
35872
36457
|
if (!this.logic.timer) {
|
|
35873
|
-
throw new
|
|
36458
|
+
throw new RuntimeModelError74(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
35874
36459
|
}
|
|
35875
36460
|
this.timer = setInterval(() => {
|
|
35876
36461
|
if (!this.scheduler.defaultParamsCb) {
|
|
@@ -35892,7 +36477,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
35892
36477
|
import {
|
|
35893
36478
|
ModelError as ModelError34,
|
|
35894
36479
|
RuntimeError as RuntimeError72,
|
|
35895
|
-
RuntimeModelError as
|
|
36480
|
+
RuntimeModelError as RuntimeModelError75
|
|
35896
36481
|
} from "@ibiz-template/core";
|
|
35897
36482
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
35898
36483
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -35938,7 +36523,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
35938
36523
|
} else {
|
|
35939
36524
|
openViewRef = appUILogic.openDataAppView;
|
|
35940
36525
|
if (!openViewRef) {
|
|
35941
|
-
throw new
|
|
36526
|
+
throw new RuntimeModelError75(
|
|
35942
36527
|
appUILogic,
|
|
35943
36528
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
35944
36529
|
);
|
|
@@ -35946,7 +36531,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
35946
36531
|
}
|
|
35947
36532
|
const openView = openViewRef.refAppViewId;
|
|
35948
36533
|
if (!openView) {
|
|
35949
|
-
throw new
|
|
36534
|
+
throw new RuntimeModelError75(
|
|
35950
36535
|
appUILogic,
|
|
35951
36536
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
35952
36537
|
);
|
|
@@ -35976,7 +36561,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
35976
36561
|
);
|
|
35977
36562
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
35978
36563
|
if (!typeFileName) {
|
|
35979
|
-
throw new
|
|
36564
|
+
throw new RuntimeModelError75(
|
|
35980
36565
|
appUILogic,
|
|
35981
36566
|
"".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
|
|
35982
36567
|
);
|
|
@@ -35984,7 +36569,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
35984
36569
|
const { data } = parameters;
|
|
35985
36570
|
const formTypeValue = data[0][typeFileName];
|
|
35986
36571
|
if (!formTypeValue) {
|
|
35987
|
-
throw new
|
|
36572
|
+
throw new RuntimeModelError75(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
35988
36573
|
}
|
|
35989
36574
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
35990
36575
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -36026,7 +36611,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
36026
36611
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
36027
36612
|
});
|
|
36028
36613
|
if (!newViewRef) {
|
|
36029
|
-
throw new
|
|
36614
|
+
throw new RuntimeModelError75(
|
|
36030
36615
|
appUILogic,
|
|
36031
36616
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
36032
36617
|
);
|
|
@@ -36036,7 +36621,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
36036
36621
|
} else {
|
|
36037
36622
|
newViewRef = newDataAppView;
|
|
36038
36623
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
36039
|
-
throw new
|
|
36624
|
+
throw new RuntimeModelError75(
|
|
36040
36625
|
appUILogic,
|
|
36041
36626
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
36042
36627
|
);
|
|
@@ -36100,7 +36685,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
36100
36685
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
36101
36686
|
const { context, params, ...rest } = parameters;
|
|
36102
36687
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
36103
|
-
throw new
|
|
36688
|
+
throw new RuntimeModelError75(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
36104
36689
|
}
|
|
36105
36690
|
const result = await ibiz.commands.execute(
|
|
36106
36691
|
OpenAppViewCommand.TAG,
|
|
@@ -36151,7 +36736,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
36151
36736
|
const minorDERs = selfDe.minorAppDERSs;
|
|
36152
36737
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
36153
36738
|
if (!minorDERs) {
|
|
36154
|
-
throw new
|
|
36739
|
+
throw new RuntimeModelError75(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
36155
36740
|
}
|
|
36156
36741
|
let pickParentFieldName = "";
|
|
36157
36742
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -36248,12 +36833,12 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
36248
36833
|
};
|
|
36249
36834
|
|
|
36250
36835
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
36251
|
-
import { RuntimeModelError as
|
|
36836
|
+
import { RuntimeModelError as RuntimeModelError76 } from "@ibiz-template/core";
|
|
36252
36837
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
36253
36838
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36254
36839
|
execute(executeParams) {
|
|
36255
36840
|
if (!this.logic.appDEUIActionId) {
|
|
36256
|
-
throw new
|
|
36841
|
+
throw new RuntimeModelError76(
|
|
36257
36842
|
this.logic,
|
|
36258
36843
|
"\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
|
|
36259
36844
|
);
|
|
@@ -36350,6 +36935,14 @@ var PluginStaticResource = class {
|
|
|
36350
36935
|
* @param {string} mateUrl import.mate.url
|
|
36351
36936
|
*/
|
|
36352
36937
|
constructor(mateUrl) {
|
|
36938
|
+
/**
|
|
36939
|
+
* 是否为 http || https 开头
|
|
36940
|
+
*
|
|
36941
|
+
* @author chitanda
|
|
36942
|
+
* @date 2022-11-07 14:11:28
|
|
36943
|
+
* @protected
|
|
36944
|
+
*/
|
|
36945
|
+
this.urlReg = /^http[s]?:\/\/[^\s]*/;
|
|
36353
36946
|
/**
|
|
36354
36947
|
* 已经输出过路径的 style 标签
|
|
36355
36948
|
*
|
|
@@ -36371,6 +36964,9 @@ var PluginStaticResource = class {
|
|
|
36371
36964
|
* @return {*} {string}
|
|
36372
36965
|
*/
|
|
36373
36966
|
dir(pathStr) {
|
|
36967
|
+
if (this.urlReg.test(pathStr)) {
|
|
36968
|
+
return pathStr;
|
|
36969
|
+
}
|
|
36374
36970
|
return this.url.origin + path.resolve(this.baseDir, pathStr);
|
|
36375
36971
|
}
|
|
36376
36972
|
/**
|
|
@@ -36383,7 +36979,7 @@ var PluginStaticResource = class {
|
|
|
36383
36979
|
*/
|
|
36384
36980
|
async loadStyle(urls) {
|
|
36385
36981
|
const all = urls.map((styleUrl) => {
|
|
36386
|
-
const url = this.dir(styleUrl);
|
|
36982
|
+
const url = this.urlReg.test(styleUrl) ? styleUrl : this.dir(styleUrl);
|
|
36387
36983
|
if (this.styleElementMap.has(url)) {
|
|
36388
36984
|
return false;
|
|
36389
36985
|
}
|
|
@@ -36767,3 +37363,4 @@ export {
|
|
|
36767
37363
|
verifyFormGroupLogic,
|
|
36768
37364
|
verifyPanelGroupLogic
|
|
36769
37365
|
};
|
|
37366
|
+
//! 只有动态走这个逻辑,全代码确保所有视图都设置了viewConfig
|