@ibiz-template/runtime 0.1.20 → 0.1.22
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 +937 -206
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/constant/index.d.ts +1 -0
- package/out/constant/index.d.ts.map +1 -1
- package/out/constant/index.js +1 -0
- package/out/constant/view-call-tag.d.ts +22 -0
- package/out/constant/view-call-tag.d.ts.map +1 -0
- package/out/constant/view-call-tag.js +23 -0
- package/out/controller/control/data-view/data-view.controller.d.ts +25 -2
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +70 -30
- package/out/controller/control/data-view/data-view.service.d.ts +1 -1
- package/out/controller/control/data-view/data-view.service.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.service.js +2 -1
- package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.service.js +1 -0
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +8 -4
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +1 -1
- package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.service.js +1 -0
- package/out/controller/control/index.d.ts +1 -0
- package/out/controller/control/index.d.ts.map +1 -1
- package/out/controller/control/index.js +1 -0
- package/out/controller/control/kanban/index.d.ts +3 -0
- package/out/controller/control/kanban/index.d.ts.map +1 -0
- package/out/controller/control/kanban/index.js +2 -0
- package/out/controller/control/kanban/kanban.controller.d.ts +99 -0
- package/out/controller/control/kanban/kanban.controller.d.ts.map +1 -0
- package/out/controller/control/kanban/kanban.controller.js +310 -0
- package/out/controller/control/kanban/kanban.service.d.ts +24 -0
- package/out/controller/control/kanban/kanban.service.d.ts.map +1 -0
- package/out/controller/control/kanban/kanban.service.js +26 -0
- package/out/controller/control/list/list.controller.d.ts.map +1 -1
- package/out/controller/control/list/list.controller.js +3 -0
- package/out/controller/control/list/list.service.d.ts.map +1 -1
- package/out/controller/control/list/list.service.js +1 -0
- package/out/controller/control/md-ctrl/md-ctrl.service.d.ts.map +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.service.js +1 -0
- package/out/controller/control/pickup-view-panel/pickup-view-panel.controller.d.ts.map +1 -1
- package/out/controller/control/pickup-view-panel/pickup-view-panel.controller.js +3 -2
- package/out/controller/control/toolbar/toolbar.controllerr.js +2 -2
- package/out/controller/ctx/ctx.d.ts +8 -0
- package/out/controller/ctx/ctx.d.ts.map +1 -1
- package/out/controller/ctx/ctx.js +12 -0
- package/out/de-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/de-logic/utils/handle-src-val.js +6 -4
- package/out/engine/md-view.engine.js +2 -2
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +2 -1
- package/out/global/global-util/global-util.d.ts +14 -0
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +26 -0
- package/out/interface/controller/controller/common/i-drag-change-info.d.ts +38 -0
- package/out/interface/controller/controller/common/i-drag-change-info.d.ts.map +1 -0
- package/out/interface/controller/controller/common/i-drag-change-info.js +1 -0
- package/out/interface/controller/controller/common/index.d.ts +1 -0
- package/out/interface/controller/controller/common/index.d.ts.map +1 -1
- package/out/interface/controller/controller/common/index.js +1 -0
- package/out/interface/controller/controller/control/i-data-view-control.controller.d.ts +1 -1
- package/out/interface/controller/controller/control/i-data-view-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-kanban.controller.d.ts +14 -0
- package/out/interface/controller/controller/control/i-kanban.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/control/i-kanban.controller.js +1 -0
- package/out/interface/controller/controller/control/index.d.ts +1 -0
- package/out/interface/controller/controller/control/index.d.ts.map +1 -1
- package/out/interface/controller/controller/control/index.js +1 -0
- package/out/interface/controller/event/control/i-kanban.event.d.ts +3 -3
- package/out/interface/controller/event/control/i-kanban.event.d.ts.map +1 -1
- package/out/interface/controller/event/view/i-kanban-view.event.d.ts +1 -1
- package/out/interface/controller/state/control/i-kanban.state.d.ts +33 -0
- package/out/interface/controller/state/control/i-kanban.state.d.ts.map +1 -0
- package/out/interface/controller/state/control/i-kanban.state.js +1 -0
- package/out/interface/controller/state/control/i-md-control.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-md-control.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/index.d.ts +1 -0
- package/out/interface/controller/state/control/index.d.ts.map +1 -1
- package/out/interface/controller/state/control/index.js +1 -0
- package/out/interface/controller/state/view/i-kanban-view.state.d.ts +11 -0
- package/out/interface/controller/state/view/i-kanban-view.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-kanban-view.state.js +1 -0
- package/out/interface/controller/state/view/index.d.ts +1 -0
- package/out/interface/controller/state/view/index.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.js +1 -0
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +2 -3
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +3 -1
- package/out/service/vo/control.vo.d.ts +1 -0
- package/out/service/vo/control.vo.d.ts.map +1 -1
- package/out/service/vo/control.vo.js +18 -5
- package/out/service/vo/ui-map-field.d.ts +8 -0
- package/out/service/vo/ui-map-field.d.ts.map +1 -1
- package/out/service/vo/ui-map-field.js +3 -0
- package/out/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.js +1 -1
- package/out/ui-logic/ui-logic-node/append-param-node/append-param-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/append-param-node/append-param-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/append-param-node/append-param-node.js +25 -0
- package/out/ui-logic/ui-logic-node/copy-param-node/copy-param-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/copy-param-node/copy-param-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/copy-param-node/copy-param-node.js +23 -0
- package/out/ui-logic/ui-logic-node/data-set-node/data-set-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/data-set-node/data-set-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/data-set-node/data-set-node.js +21 -0
- package/out/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.js +37 -0
- package/out/ui-logic/ui-logic-node/index.d.ts +9 -0
- package/out/ui-logic/ui-logic-node/index.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/index.js +9 -0
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.d.ts +56 -1
- 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 +122 -12
- package/out/ui-logic/ui-logic-node/renew-param-node/renew-param-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/renew-param-node/renew-param-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/renew-param-node/renew-param-node.js +20 -0
- package/out/ui-logic/ui-logic-node/reset-param-node/reset-param-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/reset-param-node/reset-param-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/reset-param-node/reset-param-node.js +20 -0
- package/out/ui-logic/ui-logic-node/sort-param-node/sort-param-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/sort-param-node/sort-param-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/sort-param-node/sort-param-node.js +24 -0
- package/out/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.js +17 -0
- package/out/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.d.ts +16 -0
- package/out/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.js +37 -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 -2
- package/out/ui-logic/ui-logic.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +24 -6
- package/out/ui-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/ui-logic/utils/handle-src-val.js +7 -5
- package/out/utils/verify/de-rule-verify.js +1 -1
- package/package.json +5 -5
- package/src/constant/index.ts +1 -0
- package/src/constant/view-call-tag.ts +22 -0
- package/src/controller/control/data-view/data-view.controller.ts +93 -43
- package/src/controller/control/data-view/data-view.service.ts +5 -2
- package/src/controller/control/form/edit-form/edit-form.service.ts +1 -0
- package/src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts +10 -5
- package/src/controller/control/grid/grid/grid.controller.ts +1 -1
- package/src/controller/control/grid/grid/grid.service.ts +1 -0
- package/src/controller/control/index.ts +1 -0
- package/src/controller/control/kanban/index.ts +2 -0
- package/src/controller/control/kanban/kanban.controller.ts +370 -0
- package/src/controller/control/kanban/kanban.service.ts +33 -0
- package/src/controller/control/list/list.controller.ts +3 -0
- package/src/controller/control/list/list.service.ts +1 -0
- package/src/controller/control/md-ctrl/md-ctrl.service.ts +1 -0
- package/src/controller/control/pickup-view-panel/pickup-view-panel.controller.ts +3 -2
- package/src/controller/control/toolbar/toolbar.controllerr.ts +2 -2
- package/src/controller/ctx/ctx.ts +13 -0
- package/src/de-logic/utils/handle-src-val.ts +6 -4
- package/src/engine/md-view.engine.ts +2 -2
- package/src/engine/view-base.engine.ts +2 -1
- package/src/global/global-util/global-util.ts +28 -0
- package/src/interface/controller/controller/common/i-drag-change-info.ts +40 -0
- package/src/interface/controller/controller/common/index.ts +1 -0
- package/src/interface/controller/controller/control/i-data-view-control.controller.ts +5 -6
- package/src/interface/controller/controller/control/i-kanban.controller.ts +14 -0
- package/src/interface/controller/controller/control/index.ts +1 -0
- package/src/interface/controller/event/control/i-kanban.event.ts +3 -3
- package/src/interface/controller/event/view/i-kanban-view.event.ts +1 -1
- package/src/interface/controller/state/control/i-kanban.state.ts +35 -0
- package/src/interface/controller/state/control/i-md-control.state.ts +8 -0
- package/src/interface/controller/state/control/index.ts +1 -0
- package/src/interface/controller/state/view/i-kanban-view.state.ts +10 -0
- package/src/interface/controller/state/view/index.ts +1 -0
- package/src/service/dto/method.dto.ts +2 -3
- package/src/service/service/entity/method/method.ts +3 -1
- package/src/service/vo/control.vo.ts +19 -4
- package/src/service/vo/ui-map-field.ts +12 -0
- package/src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts +1 -1
- package/src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts +44 -0
- package/src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts +31 -0
- package/src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts +37 -0
- package/src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts +57 -0
- package/src/ui-logic/ui-logic-node/index.ts +9 -0
- package/src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts +153 -17
- package/src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts +25 -0
- package/src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts +25 -0
- package/src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts +29 -0
- package/src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts +23 -0
- package/src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts +47 -0
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +2 -5
- package/src/ui-logic/ui-logic.ts +32 -5
- package/src/ui-logic/utils/handle-src-val.ts +7 -5
- package/src/utils/verify/de-rule-verify.ts +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -7614,7 +7614,7 @@ function verifyDeRules(name, data, condition) {
|
|
|
7614
7614
|
}
|
|
7615
7615
|
}
|
|
7616
7616
|
} else {
|
|
7617
|
-
name = condition == null ? void 0 : condition.defname.toLowerCase();
|
|
7617
|
+
name = (condition == null ? void 0 : condition.defname.toLowerCase()) || name;
|
|
7618
7618
|
try {
|
|
7619
7619
|
if (isSimpleCondition(condition)) {
|
|
7620
7620
|
flag.isPast = !checkFieldSimpleRule(
|
|
@@ -8371,6 +8371,14 @@ var SysUIActionTag = /* @__PURE__ */ ((SysUIActionTag2) => {
|
|
|
8371
8371
|
return SysUIActionTag2;
|
|
8372
8372
|
})(SysUIActionTag || {});
|
|
8373
8373
|
|
|
8374
|
+
// src/constant/view-call-tag.ts
|
|
8375
|
+
var ViewCallTag = /* @__PURE__ */ ((ViewCallTag2) => {
|
|
8376
|
+
ViewCallTag2["LOAD"] = "Load";
|
|
8377
|
+
ViewCallTag2["GET_DATA"] = "GetData";
|
|
8378
|
+
ViewCallTag2["GET_ALL_DATA"] = "GetAllData";
|
|
8379
|
+
return ViewCallTag2;
|
|
8380
|
+
})(ViewCallTag || {});
|
|
8381
|
+
|
|
8374
8382
|
// src/constant/studio-event.ts
|
|
8375
8383
|
var StudioViewEvents = class {
|
|
8376
8384
|
};
|
|
@@ -11112,7 +11120,7 @@ import {
|
|
|
11112
11120
|
|
|
11113
11121
|
// src/service/service/entity/method/method.ts
|
|
11114
11122
|
import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
11115
|
-
import { notNilEmpty as
|
|
11123
|
+
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
11116
11124
|
|
|
11117
11125
|
// src/service/app-data-entity/app-data-entity.ts
|
|
11118
11126
|
import { clone as clone4 } from "ramda";
|
|
@@ -11284,7 +11292,6 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
11284
11292
|
|
|
11285
11293
|
// src/service/dto/method.dto.ts
|
|
11286
11294
|
import { ModelError as ModelError7 } from "@ibiz-template/core";
|
|
11287
|
-
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
11288
11295
|
var MethodDto = class _MethodDto {
|
|
11289
11296
|
constructor(entity, isLocalMode2, dto) {
|
|
11290
11297
|
this.entity = entity;
|
|
@@ -11317,7 +11324,7 @@ var MethodDto = class _MethodDto {
|
|
|
11317
11324
|
break;
|
|
11318
11325
|
}
|
|
11319
11326
|
case "DTOS": {
|
|
11320
|
-
if (
|
|
11327
|
+
if (data[key] !== void 0) {
|
|
11321
11328
|
break;
|
|
11322
11329
|
}
|
|
11323
11330
|
if (!field.refAppDataEntityId) {
|
|
@@ -11407,7 +11414,7 @@ var MethodDto = class _MethodDto {
|
|
|
11407
11414
|
entity.appDEMethodDTOs || [],
|
|
11408
11415
|
field.refAppDEMethodDTOId
|
|
11409
11416
|
);
|
|
11410
|
-
const dto = new _MethodDto(entity,
|
|
11417
|
+
const dto = new _MethodDto(entity, true, methodDto);
|
|
11411
11418
|
this.dtoMap.set(field.codeName, dto);
|
|
11412
11419
|
return dto;
|
|
11413
11420
|
}
|
|
@@ -11545,18 +11552,20 @@ var Method = class {
|
|
|
11545
11552
|
case "POST":
|
|
11546
11553
|
res = await this.app.net.post(
|
|
11547
11554
|
"".concat(path2, "/").concat(methodName),
|
|
11548
|
-
|
|
11555
|
+
notNilEmpty5(data) ? data : params
|
|
11549
11556
|
);
|
|
11550
11557
|
break;
|
|
11551
11558
|
case "GET":
|
|
11552
11559
|
res = await this.app.net.get("".concat(path2, "/").concat(methodName), data);
|
|
11553
11560
|
break;
|
|
11554
|
-
case "PUT":
|
|
11561
|
+
case "PUT": {
|
|
11555
11562
|
res = await this.app.net.put(
|
|
11556
11563
|
"".concat(path2, "/").concat(methodName),
|
|
11557
|
-
|
|
11564
|
+
notNilEmpty5(data) ? data : params
|
|
11558
11565
|
);
|
|
11566
|
+
const entity = this.createEntity(data);
|
|
11559
11567
|
break;
|
|
11568
|
+
}
|
|
11560
11569
|
case "DELETE":
|
|
11561
11570
|
res = await this.app.net.delete("".concat(path2, "/").concat(methodName), data);
|
|
11562
11571
|
break;
|
|
@@ -12033,10 +12042,14 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
12033
12042
|
return void 0;
|
|
12034
12043
|
case "SRCVALUE":
|
|
12035
12044
|
return srcValue;
|
|
12045
|
+
case "WEBCONTEXT":
|
|
12036
12046
|
case "VIEWPARAM":
|
|
12037
12047
|
value = ctx.viewParams;
|
|
12038
12048
|
break;
|
|
12049
|
+
case "APPLICATION":
|
|
12050
|
+
case "SESSION":
|
|
12039
12051
|
case "APPDATA":
|
|
12052
|
+
case "DATACONTEXT":
|
|
12040
12053
|
value = ctx.context;
|
|
12041
12054
|
break;
|
|
12042
12055
|
case "ENVPARAM":
|
|
@@ -13183,6 +13196,7 @@ var DEService = class {
|
|
|
13183
13196
|
};
|
|
13184
13197
|
|
|
13185
13198
|
// src/service/vo/control.vo.ts
|
|
13199
|
+
import { DataTypes } from "@ibiz-template/core";
|
|
13186
13200
|
import { clone as clone10, isNil as isNil8 } from "ramda";
|
|
13187
13201
|
var ControlVO = class _ControlVO {
|
|
13188
13202
|
/**
|
|
@@ -13278,7 +13292,8 @@ var ControlVO = class _ControlVO {
|
|
|
13278
13292
|
});
|
|
13279
13293
|
this.$dataUIMap.forEach((mapField, key) => {
|
|
13280
13294
|
const value = mapField.dataKey;
|
|
13281
|
-
|
|
13295
|
+
const forceNumber = mapField.dataType !== void 0 && DataTypes.isNumber(mapField.dataType);
|
|
13296
|
+
this.linkProperty(key, value, mapField.isOriginField, forceNumber);
|
|
13282
13297
|
});
|
|
13283
13298
|
Object.keys($origin).forEach((value) => {
|
|
13284
13299
|
if (!Object.prototype.hasOwnProperty.call(this, value)) {
|
|
@@ -13295,10 +13310,11 @@ var ControlVO = class _ControlVO {
|
|
|
13295
13310
|
* @param {string} uiKey 界面字段
|
|
13296
13311
|
* @param {string} dataKey 数据字段
|
|
13297
13312
|
* @param {boolean} [isOriginField=true] 是否是后台存储字段,是的话存取都在$origin里
|
|
13313
|
+
* @param {boolean} [forceNumber=false] 是否强制转换成数值,是的话set的时候转成数值
|
|
13298
13314
|
* @returns {*}
|
|
13299
13315
|
*/
|
|
13300
|
-
linkProperty(uiKey, dataKey, isOriginField = true) {
|
|
13301
|
-
if (uiKey === "srfuf"
|
|
13316
|
+
linkProperty(uiKey, dataKey, isOriginField = true, forceNumber = false) {
|
|
13317
|
+
if (uiKey === "srfuf") {
|
|
13302
13318
|
return;
|
|
13303
13319
|
}
|
|
13304
13320
|
if (isOriginField || Object.prototype.hasOwnProperty.call(this.$origin, uiKey)) {
|
|
@@ -13306,10 +13322,15 @@ var ControlVO = class _ControlVO {
|
|
|
13306
13322
|
enumerable: true,
|
|
13307
13323
|
configurable: true,
|
|
13308
13324
|
get() {
|
|
13309
|
-
return this.$origin[dataKey];
|
|
13325
|
+
return uiKey === "srfkey" ? this.$origin[dataKey] || this.$origin[uiKey] : this.$origin[dataKey];
|
|
13310
13326
|
},
|
|
13311
13327
|
set(val) {
|
|
13312
|
-
|
|
13328
|
+
let val2 = forceNumber && !isNil8(val) ? Number(val) : val;
|
|
13329
|
+
if (Number.isNaN(val2)) {
|
|
13330
|
+
val2 = val;
|
|
13331
|
+
ibiz.log.error("".concat(val, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
13332
|
+
}
|
|
13333
|
+
this.$origin[dataKey] = val2;
|
|
13313
13334
|
}
|
|
13314
13335
|
});
|
|
13315
13336
|
} else {
|
|
@@ -14014,6 +14035,9 @@ var UIMapField = class {
|
|
|
14014
14035
|
if (!isNil9(opts.isOriginField)) {
|
|
14015
14036
|
this.isOriginField = opts.isOriginField;
|
|
14016
14037
|
}
|
|
14038
|
+
if (!isNil9(opts.dataType)) {
|
|
14039
|
+
this.dataType = opts.dataType;
|
|
14040
|
+
}
|
|
14017
14041
|
}
|
|
14018
14042
|
};
|
|
14019
14043
|
|
|
@@ -14182,7 +14206,7 @@ var DEServiceUtil = class {
|
|
|
14182
14206
|
};
|
|
14183
14207
|
|
|
14184
14208
|
// src/app-hub.ts
|
|
14185
|
-
import { RuntimeError as
|
|
14209
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
14186
14210
|
|
|
14187
14211
|
// src/application.ts
|
|
14188
14212
|
import { Net } from "@ibiz-template/core";
|
|
@@ -14424,7 +14448,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
14424
14448
|
})(PanelNotifyState || {});
|
|
14425
14449
|
|
|
14426
14450
|
// src/controller/common/view/view.controller.ts
|
|
14427
|
-
import { createUUID as createUUID2, notNilEmpty as
|
|
14451
|
+
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
14428
14452
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
14429
14453
|
import { isEmpty as isEmpty8, isNil as isNil12, isNotNil as isNotNil2 } from "ramda";
|
|
14430
14454
|
|
|
@@ -14580,6 +14604,14 @@ var CTX = class {
|
|
|
14580
14604
|
*/
|
|
14581
14605
|
constructor(parent) {
|
|
14582
14606
|
this.parent = parent;
|
|
14607
|
+
/**
|
|
14608
|
+
* 是否已经销毁
|
|
14609
|
+
*
|
|
14610
|
+
* @author chitanda
|
|
14611
|
+
* @date 2023-09-11 11:09:57
|
|
14612
|
+
* @protected
|
|
14613
|
+
*/
|
|
14614
|
+
this.isDestroyed = false;
|
|
14583
14615
|
/**
|
|
14584
14616
|
* CTX事件
|
|
14585
14617
|
* @author lxm
|
|
@@ -14616,6 +14648,7 @@ var CTX = class {
|
|
|
14616
14648
|
this.controllersMap.clear();
|
|
14617
14649
|
this.view = null;
|
|
14618
14650
|
this.state = null;
|
|
14651
|
+
this.isDestroyed = true;
|
|
14619
14652
|
}
|
|
14620
14653
|
/**
|
|
14621
14654
|
* 修改上下文环境状态
|
|
@@ -14641,6 +14674,9 @@ var CTX = class {
|
|
|
14641
14674
|
* @date 2023-03-27 01:59:35
|
|
14642
14675
|
*/
|
|
14643
14676
|
endLoading() {
|
|
14677
|
+
if (this.isDestroyed) {
|
|
14678
|
+
return;
|
|
14679
|
+
}
|
|
14644
14680
|
this.view.endLoading();
|
|
14645
14681
|
}
|
|
14646
14682
|
/**
|
|
@@ -15553,13 +15589,13 @@ var ViewController = class extends BaseController {
|
|
|
15553
15589
|
}
|
|
15554
15590
|
const navContexts = this.model.appViewNavContexts;
|
|
15555
15591
|
let context = {};
|
|
15556
|
-
if (
|
|
15592
|
+
if (notNilEmpty6(navContexts)) {
|
|
15557
15593
|
context = convertNavData(navContexts, this.context, this.params);
|
|
15558
15594
|
}
|
|
15559
15595
|
Object.assign(this.context, context);
|
|
15560
15596
|
const navParams = this.model.appViewNavParams;
|
|
15561
15597
|
let params = {};
|
|
15562
|
-
if (
|
|
15598
|
+
if (notNilEmpty6(navParams)) {
|
|
15563
15599
|
params = convertNavData(navParams, this.context, this.params);
|
|
15564
15600
|
}
|
|
15565
15601
|
Object.assign(this.params, params);
|
|
@@ -17818,17 +17854,17 @@ var CaptionBarController = class extends ControlController {
|
|
|
17818
17854
|
import { recursiveIterate } from "@ibiz-template/core";
|
|
17819
17855
|
|
|
17820
17856
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
17821
|
-
import { RuntimeModelError as
|
|
17857
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
17822
17858
|
import { isArray as isArray3 } from "qx-util";
|
|
17823
17859
|
|
|
17824
17860
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
17825
|
-
import { RuntimeModelError as
|
|
17861
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
17826
17862
|
|
|
17827
17863
|
// src/ui-logic/index.ts
|
|
17828
|
-
import { RuntimeError as
|
|
17864
|
+
import { RuntimeError as RuntimeError33 } from "@ibiz-template/core";
|
|
17829
17865
|
|
|
17830
17866
|
// src/ui-logic/ui-logic.ts
|
|
17831
|
-
import { ModelError as ModelError23, RuntimeModelError as
|
|
17867
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
17832
17868
|
|
|
17833
17869
|
// src/ui-logic/ui-logic-context.ts
|
|
17834
17870
|
var UILogicContext = class {
|
|
@@ -17973,7 +18009,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
17973
18009
|
this.dstParam = model.dstLogicParamId;
|
|
17974
18010
|
}
|
|
17975
18011
|
get dstField() {
|
|
17976
|
-
return this.model.dstFieldName
|
|
18012
|
+
return this.model.dstFieldName;
|
|
17977
18013
|
}
|
|
17978
18014
|
get op() {
|
|
17979
18015
|
return this.model.condOP;
|
|
@@ -18281,6 +18317,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18281
18317
|
|
|
18282
18318
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
18283
18319
|
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
18320
|
+
import { clone as clone13 } from "ramda";
|
|
18284
18321
|
|
|
18285
18322
|
// src/ui-logic/utils/handle-src-val.ts
|
|
18286
18323
|
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
@@ -18299,10 +18336,14 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18299
18336
|
return void 0;
|
|
18300
18337
|
case "SRCVALUE":
|
|
18301
18338
|
return srcValue;
|
|
18339
|
+
case "WEBCONTEXT":
|
|
18302
18340
|
case "VIEWPARAM":
|
|
18303
18341
|
value = ctx.viewParams;
|
|
18304
18342
|
break;
|
|
18343
|
+
case "APPLICATION":
|
|
18344
|
+
case "SESSION":
|
|
18305
18345
|
case "APPDATA":
|
|
18346
|
+
case "DATACONTEXT":
|
|
18306
18347
|
value = ctx.context;
|
|
18307
18348
|
break;
|
|
18308
18349
|
case "ENVPARAM":
|
|
@@ -18311,7 +18352,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18311
18352
|
default:
|
|
18312
18353
|
throw new ModelError19(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
18313
18354
|
}
|
|
18314
|
-
const srcField = srcFieldName
|
|
18355
|
+
const srcField = srcFieldName;
|
|
18315
18356
|
if (value && srcField) {
|
|
18316
18357
|
value = value[srcField];
|
|
18317
18358
|
}
|
|
@@ -18322,20 +18363,38 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18322
18363
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
18323
18364
|
async exec(ctx) {
|
|
18324
18365
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
18325
|
-
if (nodeParams == null ? void 0 : nodeParams.length) {
|
|
18326
|
-
|
|
18327
|
-
|
|
18328
|
-
|
|
18329
|
-
|
|
18330
|
-
|
|
18331
|
-
|
|
18332
|
-
|
|
18333
|
-
|
|
18334
|
-
|
|
18335
|
-
|
|
18336
|
-
|
|
18337
|
-
|
|
18338
|
-
|
|
18366
|
+
if (!(nodeParams == null ? void 0 : nodeParams.length)) {
|
|
18367
|
+
return;
|
|
18368
|
+
}
|
|
18369
|
+
for (const nodeParam of nodeParams) {
|
|
18370
|
+
switch (nodeParam.paramAction) {
|
|
18371
|
+
case "SETPARAMVALUE":
|
|
18372
|
+
await this.setParamValue(nodeParam, ctx);
|
|
18373
|
+
break;
|
|
18374
|
+
case "RESETPARAM":
|
|
18375
|
+
await this.resetParam(nodeParam, ctx);
|
|
18376
|
+
break;
|
|
18377
|
+
case "COPYPARAM":
|
|
18378
|
+
await this.copyParam(nodeParam, ctx);
|
|
18379
|
+
break;
|
|
18380
|
+
case "BINDPARAM":
|
|
18381
|
+
await this.bindParam(nodeParam, ctx);
|
|
18382
|
+
break;
|
|
18383
|
+
case "RENEWPARAM":
|
|
18384
|
+
await this.renewParam(nodeParam, ctx);
|
|
18385
|
+
break;
|
|
18386
|
+
case "APPENDPARAM":
|
|
18387
|
+
await this.appendParam(nodeParam, ctx);
|
|
18388
|
+
break;
|
|
18389
|
+
case "SORTPARAM":
|
|
18390
|
+
await this.sortParam(nodeParam, ctx);
|
|
18391
|
+
break;
|
|
18392
|
+
default:
|
|
18393
|
+
throw new ModelError20(
|
|
18394
|
+
nodeParam,
|
|
18395
|
+
"\u6682\u672A\u652F\u6301\u903B\u8F91\u5904\u7406\u53C2\u6570\u64CD\u4F5C".concat(nodeParam.paramAction)
|
|
18396
|
+
);
|
|
18397
|
+
}
|
|
18339
18398
|
}
|
|
18340
18399
|
}
|
|
18341
18400
|
/**
|
|
@@ -18344,11 +18403,11 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18344
18403
|
* @date 2023-03-17 03:34:02
|
|
18345
18404
|
* @protected
|
|
18346
18405
|
* @param {IPSDELogicNodeParam} nodeParam
|
|
18347
|
-
* @param {
|
|
18406
|
+
* @param {UILogicContext} ctx
|
|
18348
18407
|
*/
|
|
18349
18408
|
setParamValue(nodeParam, ctx) {
|
|
18350
18409
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
18351
|
-
const dstField = dstFieldName
|
|
18410
|
+
const dstField = dstFieldName;
|
|
18352
18411
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18353
18412
|
if (dstField) {
|
|
18354
18413
|
ctx.params[dstDEUILogicParamId][dstField] = srcVal;
|
|
@@ -18356,6 +18415,92 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18356
18415
|
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
18357
18416
|
}
|
|
18358
18417
|
}
|
|
18418
|
+
/**
|
|
18419
|
+
* 拷贝变量
|
|
18420
|
+
* @author lxm
|
|
18421
|
+
* @date 2023-03-24 09:50:02
|
|
18422
|
+
* @protected
|
|
18423
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18424
|
+
* @param {UILogicContext} ctx
|
|
18425
|
+
* @return {*} {*}
|
|
18426
|
+
*/
|
|
18427
|
+
copyParam(nodeParam, ctx) {
|
|
18428
|
+
const { dstDEUILogicParamId } = nodeParam;
|
|
18429
|
+
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18430
|
+
ctx.params[dstDEUILogicParamId] = clone13(srcVal);
|
|
18431
|
+
}
|
|
18432
|
+
/**
|
|
18433
|
+
* 绑定参数
|
|
18434
|
+
* @author lxm
|
|
18435
|
+
* @date 2023-06-13 05:43:43
|
|
18436
|
+
* @protected
|
|
18437
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18438
|
+
* @param {UILogicContext} ctx
|
|
18439
|
+
*/
|
|
18440
|
+
bindParam(nodeParam, ctx) {
|
|
18441
|
+
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18442
|
+
ctx.params[nodeParam.dstDEUILogicParamId] = srcVal;
|
|
18443
|
+
}
|
|
18444
|
+
/**
|
|
18445
|
+
* 重置变量
|
|
18446
|
+
* @author lxm
|
|
18447
|
+
* @date 2023-03-24 09:46:57
|
|
18448
|
+
* @protected
|
|
18449
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18450
|
+
* @param {UILogicContext} ctx
|
|
18451
|
+
*/
|
|
18452
|
+
resetParam(nodeParam, ctx) {
|
|
18453
|
+
const { dstDEUILogicParamId } = nodeParam;
|
|
18454
|
+
ctx.resetParam(dstDEUILogicParamId);
|
|
18455
|
+
}
|
|
18456
|
+
/**
|
|
18457
|
+
* 重新建立变量
|
|
18458
|
+
* @author lxm
|
|
18459
|
+
* @date 2023-03-24 09:46:47
|
|
18460
|
+
* @protected
|
|
18461
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18462
|
+
* @param {UILogicContext} ctx
|
|
18463
|
+
*/
|
|
18464
|
+
renewParam(nodeParam, ctx) {
|
|
18465
|
+
const { dstDEUILogicParamId } = nodeParam;
|
|
18466
|
+
ctx.renewParam(dstDEUILogicParamId);
|
|
18467
|
+
}
|
|
18468
|
+
/**
|
|
18469
|
+
* 附加到数组变量
|
|
18470
|
+
* @author lxm
|
|
18471
|
+
* @date 2023-03-24 09:46:47
|
|
18472
|
+
* @protected
|
|
18473
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18474
|
+
* @param {UILogicContext} ctx
|
|
18475
|
+
*/
|
|
18476
|
+
appendParam(nodeParam, ctx) {
|
|
18477
|
+
const { dstDEUILogicParamId, dstIndex, srcIndex, srcSize } = nodeParam;
|
|
18478
|
+
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18479
|
+
const insertIndex = dstIndex || 0;
|
|
18480
|
+
const _srcIndex = srcIndex || 0;
|
|
18481
|
+
const _srcSize = srcSize || srcVal.length;
|
|
18482
|
+
ctx.params[dstDEUILogicParamId].splice(
|
|
18483
|
+
insertIndex,
|
|
18484
|
+
0,
|
|
18485
|
+
...srcVal.slice(_srcIndex, _srcSize)
|
|
18486
|
+
);
|
|
18487
|
+
}
|
|
18488
|
+
/**
|
|
18489
|
+
* 排序数组变量
|
|
18490
|
+
* @author lxm
|
|
18491
|
+
* @date 2023-03-24 10:23:01
|
|
18492
|
+
* @protected
|
|
18493
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18494
|
+
* @param {UILogicContext} ctx
|
|
18495
|
+
*/
|
|
18496
|
+
sortParam(nodeParam, ctx) {
|
|
18497
|
+
const { dstDEUILogicParamId, dstFieldName, dstSortDir } = nodeParam;
|
|
18498
|
+
const key = dstFieldName;
|
|
18499
|
+
const arr = ctx.params[dstDEUILogicParamId];
|
|
18500
|
+
arr.sort((a, b) => {
|
|
18501
|
+
return dstSortDir === "ASC" ? a[key] - b[key] : b[key] - a[key];
|
|
18502
|
+
});
|
|
18503
|
+
}
|
|
18359
18504
|
};
|
|
18360
18505
|
|
|
18361
18506
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
@@ -18485,8 +18630,190 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
18485
18630
|
}
|
|
18486
18631
|
};
|
|
18487
18632
|
|
|
18633
|
+
// src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
|
|
18634
|
+
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
18635
|
+
var ResetParamNode2 = class extends UILogicNode {
|
|
18636
|
+
async exec(ctx) {
|
|
18637
|
+
const { dstDEUILogicParamId } = this.model;
|
|
18638
|
+
if (!dstDEUILogicParamId) {
|
|
18639
|
+
throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18640
|
+
}
|
|
18641
|
+
ctx.resetParam(dstDEUILogicParamId);
|
|
18642
|
+
}
|
|
18643
|
+
};
|
|
18644
|
+
|
|
18645
|
+
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
18646
|
+
import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
18647
|
+
import { clone as clone14 } from "ramda";
|
|
18648
|
+
var CopyParamNode2 = class extends UILogicNode {
|
|
18649
|
+
async exec(ctx) {
|
|
18650
|
+
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
18651
|
+
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18652
|
+
throw new RuntimeModelError36(
|
|
18653
|
+
this.model,
|
|
18654
|
+
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18655
|
+
);
|
|
18656
|
+
}
|
|
18657
|
+
const srcVal = handleSrcVal2(ctx, this.model);
|
|
18658
|
+
ctx.params[dstDEUILogicParamId] = clone14(srcVal);
|
|
18659
|
+
}
|
|
18660
|
+
};
|
|
18661
|
+
|
|
18662
|
+
// src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
|
|
18663
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
18664
|
+
var AppendParamNode2 = class extends UILogicNode {
|
|
18665
|
+
async exec(ctx) {
|
|
18666
|
+
const {
|
|
18667
|
+
dstDEUILogicParamId,
|
|
18668
|
+
srcDEUILogicParamId,
|
|
18669
|
+
dstIndex,
|
|
18670
|
+
srcIndex,
|
|
18671
|
+
srcSize
|
|
18672
|
+
} = this.model;
|
|
18673
|
+
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18674
|
+
throw new RuntimeModelError37(
|
|
18675
|
+
this.model,
|
|
18676
|
+
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18677
|
+
);
|
|
18678
|
+
}
|
|
18679
|
+
const srcVal = handleSrcVal2(ctx, this.model);
|
|
18680
|
+
const insertIndex = dstIndex || 0;
|
|
18681
|
+
const _srcIndex = srcIndex || 0;
|
|
18682
|
+
const _srcSize = srcSize || srcVal.length;
|
|
18683
|
+
ctx.params[dstDEUILogicParamId].splice(
|
|
18684
|
+
insertIndex,
|
|
18685
|
+
0,
|
|
18686
|
+
...srcVal.slice(_srcIndex, _srcSize)
|
|
18687
|
+
);
|
|
18688
|
+
}
|
|
18689
|
+
};
|
|
18690
|
+
|
|
18691
|
+
// src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
|
|
18692
|
+
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
18693
|
+
var SortParamNode2 = class extends UILogicNode {
|
|
18694
|
+
async exec(ctx) {
|
|
18695
|
+
const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
18696
|
+
if (!dstDEUILogicParamId || !dstFieldName) {
|
|
18697
|
+
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
18698
|
+
}
|
|
18699
|
+
const key = dstFieldName;
|
|
18700
|
+
const arr = ctx.params[dstDEUILogicParamId];
|
|
18701
|
+
arr.sort((a, b) => {
|
|
18702
|
+
return dstSortDir === "ASC" ? a[key] - b[key] : b[key] - a[key];
|
|
18703
|
+
});
|
|
18704
|
+
}
|
|
18705
|
+
};
|
|
18706
|
+
|
|
18707
|
+
// src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
|
|
18708
|
+
import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
18709
|
+
var RenewParamNode2 = class extends UILogicNode {
|
|
18710
|
+
async exec(ctx) {
|
|
18711
|
+
const { dstDEUILogicParamId } = this.model;
|
|
18712
|
+
if (!dstDEUILogicParamId) {
|
|
18713
|
+
throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18714
|
+
}
|
|
18715
|
+
ctx.renewParam(dstDEUILogicParamId);
|
|
18716
|
+
}
|
|
18717
|
+
};
|
|
18718
|
+
|
|
18719
|
+
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
18720
|
+
var DataSetNode2 = class extends UILogicNode {
|
|
18721
|
+
async exec(ctx) {
|
|
18722
|
+
const {
|
|
18723
|
+
dstAppDEDataSetId,
|
|
18724
|
+
dstAppDataEntityId,
|
|
18725
|
+
dstDEUILogicParamId,
|
|
18726
|
+
retDEUILogicParamId
|
|
18727
|
+
} = this.model;
|
|
18728
|
+
const requestData = ctx.params[dstDEUILogicParamId];
|
|
18729
|
+
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
18730
|
+
const res = await app.deService.exec(
|
|
18731
|
+
dstAppDataEntityId,
|
|
18732
|
+
dstAppDEDataSetId,
|
|
18733
|
+
ctx.context,
|
|
18734
|
+
requestData,
|
|
18735
|
+
ctx.viewParams
|
|
18736
|
+
);
|
|
18737
|
+
if (res.ok) {
|
|
18738
|
+
ctx.params[retDEUILogicParamId] = res.data;
|
|
18739
|
+
}
|
|
18740
|
+
}
|
|
18741
|
+
};
|
|
18742
|
+
|
|
18743
|
+
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
18744
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
18745
|
+
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
18746
|
+
async exec(_ctx) {
|
|
18747
|
+
const { errorInfo } = this.model;
|
|
18748
|
+
throw new RuntimeError30(errorInfo);
|
|
18749
|
+
}
|
|
18750
|
+
};
|
|
18751
|
+
|
|
18752
|
+
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
18753
|
+
import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
18754
|
+
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
18755
|
+
async exec(ctx) {
|
|
18756
|
+
ctx.isEndNode = true;
|
|
18757
|
+
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
18758
|
+
if (!fireCtrlId) {
|
|
18759
|
+
throw new RuntimeModelError40(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
18760
|
+
}
|
|
18761
|
+
if (!eventName) {
|
|
18762
|
+
throw new RuntimeModelError40(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
18763
|
+
}
|
|
18764
|
+
if (!eventParamId) {
|
|
18765
|
+
throw new RuntimeModelError40(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
18766
|
+
}
|
|
18767
|
+
const invokeCtrl = ctx.params[fireCtrlId];
|
|
18768
|
+
if (!invokeCtrl) {
|
|
18769
|
+
throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
18770
|
+
}
|
|
18771
|
+
const eventParam = ctx.params[eventParamId];
|
|
18772
|
+
if (!eventParam) {
|
|
18773
|
+
throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
18774
|
+
}
|
|
18775
|
+
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
18776
|
+
}
|
|
18777
|
+
};
|
|
18778
|
+
|
|
18779
|
+
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
18780
|
+
import { RuntimeError as RuntimeError32, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
18781
|
+
var ExecuteDELogicNode = class extends UILogicNode {
|
|
18782
|
+
async exec(ctx) {
|
|
18783
|
+
const {
|
|
18784
|
+
dstAppDELogicId,
|
|
18785
|
+
dstAppDataEntityId,
|
|
18786
|
+
dstDEUILogicParamId,
|
|
18787
|
+
retDEUILogicParamId
|
|
18788
|
+
} = this.model;
|
|
18789
|
+
if (!dstAppDataEntityId) {
|
|
18790
|
+
throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
18791
|
+
}
|
|
18792
|
+
if (!dstAppDELogicId) {
|
|
18793
|
+
throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
18794
|
+
}
|
|
18795
|
+
if (!dstDEUILogicParamId) {
|
|
18796
|
+
throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
18797
|
+
}
|
|
18798
|
+
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
18799
|
+
if (!dstParam) {
|
|
18800
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
18801
|
+
}
|
|
18802
|
+
const result = await execDELogicById(
|
|
18803
|
+
dstAppDELogicId,
|
|
18804
|
+
dstAppDataEntityId,
|
|
18805
|
+
dstParam.context,
|
|
18806
|
+
dstParam.data,
|
|
18807
|
+
dstParam.params
|
|
18808
|
+
);
|
|
18809
|
+
if (retDEUILogicParamId) {
|
|
18810
|
+
ctx.params[retDEUILogicParamId] = result;
|
|
18811
|
+
}
|
|
18812
|
+
}
|
|
18813
|
+
};
|
|
18814
|
+
|
|
18488
18815
|
// src/ui-logic/ui-logic-param/ui-logic-param.ts
|
|
18489
|
-
import { ModelError as ModelError22
|
|
18816
|
+
import { ModelError as ModelError22 } from "@ibiz-template/core";
|
|
18490
18817
|
var UILogicParam = class {
|
|
18491
18818
|
/**
|
|
18492
18819
|
* Creates an instance of UILogicParam.
|
|
@@ -18521,10 +18848,7 @@ var UILogicParam = class {
|
|
|
18521
18848
|
if (control) {
|
|
18522
18849
|
ctx.params[tag] = control;
|
|
18523
18850
|
} else {
|
|
18524
|
-
|
|
18525
|
-
this.model,
|
|
18526
|
-
"\u89C6\u56FE\u903B\u8F91\u521D\u59CB\u5316\u53C2\u6570\uFF0C\u672A\u627E\u5230".concat(m.codeName, "\u6307\u5B9A\u90E8\u4EF6\u5BF9\u8C61")
|
|
18527
|
-
);
|
|
18851
|
+
ibiz.log.error("\u89C6\u56FE\u903B\u8F91\u521D\u59CB\u5316\u53C2\u6570\uFF0C\u672A\u627E\u5230".concat(m.codeName, "\u6307\u5B9A\u90E8\u4EF6\u5BF9\u8C61"));
|
|
18528
18852
|
}
|
|
18529
18853
|
} else if (m.activeViewParam) {
|
|
18530
18854
|
ctx.params[tag] = parameters.view;
|
|
@@ -18605,7 +18929,7 @@ var UILogic = class {
|
|
|
18605
18929
|
this.params = /* @__PURE__ */ new Map();
|
|
18606
18930
|
var _a;
|
|
18607
18931
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
18608
|
-
throw new
|
|
18932
|
+
throw new RuntimeModelError42(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
18609
18933
|
}
|
|
18610
18934
|
model.deuilogicNodes.forEach((node) => {
|
|
18611
18935
|
const { logicNodeType } = node;
|
|
@@ -18626,6 +18950,12 @@ var UILogic = class {
|
|
|
18626
18950
|
case "PREPAREJSPARAM":
|
|
18627
18951
|
logicNode = new PrepareJSParamNode(node);
|
|
18628
18952
|
break;
|
|
18953
|
+
case "RESETPARAM":
|
|
18954
|
+
logicNode = new ResetParamNode2(node);
|
|
18955
|
+
break;
|
|
18956
|
+
case "COPYPARAM":
|
|
18957
|
+
logicNode = new CopyParamNode2(node);
|
|
18958
|
+
break;
|
|
18629
18959
|
case "BINDPARAM":
|
|
18630
18960
|
logicNode = new BindParamNode2(node);
|
|
18631
18961
|
break;
|
|
@@ -18638,16 +18968,28 @@ var UILogic = class {
|
|
|
18638
18968
|
case "DEBUGPARAM":
|
|
18639
18969
|
logicNode = new DebugParamNode(node);
|
|
18640
18970
|
break;
|
|
18641
|
-
case "RESETPARAM":
|
|
18642
|
-
case "COPYPARAM":
|
|
18643
|
-
case "VIEWCTRLFIREEVENT":
|
|
18644
18971
|
case "APPENDPARAM":
|
|
18972
|
+
logicNode = new AppendParamNode2(node);
|
|
18973
|
+
break;
|
|
18645
18974
|
case "SORTPARAM":
|
|
18975
|
+
logicNode = new SortParamNode2(node);
|
|
18976
|
+
break;
|
|
18646
18977
|
case "RENEWPARAM":
|
|
18647
|
-
|
|
18978
|
+
logicNode = new RenewParamNode2(node);
|
|
18979
|
+
break;
|
|
18648
18980
|
case "DEDATASET":
|
|
18649
|
-
|
|
18981
|
+
logicNode = new DataSetNode2(node);
|
|
18982
|
+
break;
|
|
18650
18983
|
case "THROWEXCEPTION":
|
|
18984
|
+
logicNode = new ThrowExceptionNode2(node);
|
|
18985
|
+
break;
|
|
18986
|
+
case "VIEWCTRLFIREEVENT":
|
|
18987
|
+
logicNode = new ViewCtrlFireEventNode(node);
|
|
18988
|
+
break;
|
|
18989
|
+
case "DELOGIC":
|
|
18990
|
+
logicNode = new ExecuteDELogicNode(node);
|
|
18991
|
+
break;
|
|
18992
|
+
case "PFPLUGIN":
|
|
18651
18993
|
default:
|
|
18652
18994
|
throw new ModelError23(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
|
|
18653
18995
|
}
|
|
@@ -18702,7 +19044,7 @@ var UILogic = class {
|
|
|
18702
19044
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
18703
19045
|
await this.deepExec(start, ctx);
|
|
18704
19046
|
} else {
|
|
18705
|
-
throw new
|
|
19047
|
+
throw new RuntimeModelError42(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
18706
19048
|
}
|
|
18707
19049
|
if (ctx.isEndNode) {
|
|
18708
19050
|
return ctx.result;
|
|
@@ -18748,7 +19090,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18748
19090
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
18749
19091
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
18750
19092
|
if (!deUILogic) {
|
|
18751
|
-
throw new
|
|
19093
|
+
throw new RuntimeError33(
|
|
18752
19094
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
18753
19095
|
);
|
|
18754
19096
|
}
|
|
@@ -18761,7 +19103,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18761
19103
|
}
|
|
18762
19104
|
|
|
18763
19105
|
// src/ui-action/uiaction-util.ts
|
|
18764
|
-
import { RuntimeError as
|
|
19106
|
+
import { RuntimeError as RuntimeError34 } from "@ibiz-template/core";
|
|
18765
19107
|
var UIActionUtil = class {
|
|
18766
19108
|
/**
|
|
18767
19109
|
* 执行界面行为
|
|
@@ -18776,7 +19118,7 @@ var UIActionUtil = class {
|
|
|
18776
19118
|
static async exec(actionId, params) {
|
|
18777
19119
|
const action = await getUIActionById(actionId);
|
|
18778
19120
|
if (!action) {
|
|
18779
|
-
throw new
|
|
19121
|
+
throw new RuntimeError34("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
18780
19122
|
}
|
|
18781
19123
|
const provider = await getUIActionProvider(action);
|
|
18782
19124
|
return provider.exec(action, params);
|
|
@@ -18832,7 +19174,7 @@ var UIActionProviderBase = class {
|
|
|
18832
19174
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
18833
19175
|
if (uilogicAttachMode === "REPLACE") {
|
|
18834
19176
|
if (!appDEUILogicId) {
|
|
18835
|
-
throw new
|
|
19177
|
+
throw new RuntimeModelError43(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18836
19178
|
}
|
|
18837
19179
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18838
19180
|
return result;
|
|
@@ -18859,7 +19201,7 @@ var UIActionProviderBase = class {
|
|
|
18859
19201
|
}
|
|
18860
19202
|
if (action.uilogicAttachMode === "AFTER") {
|
|
18861
19203
|
if (!appDEUILogicId) {
|
|
18862
|
-
throw new
|
|
19204
|
+
throw new RuntimeModelError43(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18863
19205
|
}
|
|
18864
19206
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18865
19207
|
}
|
|
@@ -18993,7 +19335,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18993
19335
|
const entityName = action.appDataEntityId;
|
|
18994
19336
|
const methodName = action.appDEMethodId;
|
|
18995
19337
|
if (!entityName || !methodName) {
|
|
18996
|
-
throw new
|
|
19338
|
+
throw new RuntimeModelError44(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
18997
19339
|
}
|
|
18998
19340
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
18999
19341
|
action,
|
|
@@ -19105,7 +19447,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
19105
19447
|
};
|
|
19106
19448
|
|
|
19107
19449
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
19108
|
-
import { StringUtil, RuntimeModelError as
|
|
19450
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError45, ModelError as ModelError24 } from "@ibiz-template/core";
|
|
19109
19451
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
19110
19452
|
async execAction(action, args) {
|
|
19111
19453
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -19120,7 +19462,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19120
19462
|
case "WIZARD": {
|
|
19121
19463
|
const frontPSAppView = action.frontAppViewId;
|
|
19122
19464
|
if (!frontPSAppView) {
|
|
19123
|
-
throw new
|
|
19465
|
+
throw new RuntimeModelError45(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
19124
19466
|
}
|
|
19125
19467
|
const { resultContext, resultParams } = await this.handleParams(
|
|
19126
19468
|
action,
|
|
@@ -19176,7 +19518,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19176
19518
|
);
|
|
19177
19519
|
return result || {};
|
|
19178
19520
|
}
|
|
19179
|
-
throw new
|
|
19521
|
+
throw new RuntimeModelError45(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
19180
19522
|
}
|
|
19181
19523
|
};
|
|
19182
19524
|
|
|
@@ -19241,7 +19583,7 @@ var ToolbarController = class extends ControlController {
|
|
|
19241
19583
|
async doUIAction(item, event, param = {}) {
|
|
19242
19584
|
if (item.itemType === "DEUIACTION") {
|
|
19243
19585
|
const actionId = item.uiactionId;
|
|
19244
|
-
const res = await this.ctx.view.call("GetData");
|
|
19586
|
+
const res = await this.ctx.view.call("GetData" /* GET_DATA */);
|
|
19245
19587
|
const data = res || [];
|
|
19246
19588
|
const args = this.getEventArgs();
|
|
19247
19589
|
args.params = Object.assign(param, args.params);
|
|
@@ -19659,7 +20001,8 @@ var ViewPortletController = class extends PortletPartController {
|
|
|
19659
20001
|
};
|
|
19660
20002
|
|
|
19661
20003
|
// src/controller/control/data-view/data-view.controller.ts
|
|
19662
|
-
import { RuntimeModelError as
|
|
20004
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
20005
|
+
import { isNil as isNil15 } from "ramda";
|
|
19663
20006
|
|
|
19664
20007
|
// src/controller/control/data-view/data-view.service.ts
|
|
19665
20008
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -19678,7 +20021,8 @@ var DataViewControlService = class extends MDControlService {
|
|
|
19678
20021
|
if (deField) {
|
|
19679
20022
|
const deFieldKey = deField.toLowerCase();
|
|
19680
20023
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
19681
|
-
isOriginField: true
|
|
20024
|
+
isOriginField: true,
|
|
20025
|
+
dataType: item.dataType
|
|
19682
20026
|
});
|
|
19683
20027
|
} else {
|
|
19684
20028
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -19699,6 +20043,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19699
20043
|
initState() {
|
|
19700
20044
|
super.initState();
|
|
19701
20045
|
this.state.noSort = this.model.noSort === true;
|
|
20046
|
+
this.state.size = this.model.pagingSize || 20;
|
|
19702
20047
|
}
|
|
19703
20048
|
/**
|
|
19704
20049
|
* 初始化
|
|
@@ -19709,7 +20054,16 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19709
20054
|
*/
|
|
19710
20055
|
async onCreated() {
|
|
19711
20056
|
await super.onCreated();
|
|
19712
|
-
|
|
20057
|
+
await this.initControlService();
|
|
20058
|
+
}
|
|
20059
|
+
/**
|
|
20060
|
+
* 初始化部件服务
|
|
20061
|
+
* @author lxm
|
|
20062
|
+
* @date 2023-08-29 04:13:05
|
|
20063
|
+
* @protected
|
|
20064
|
+
* @return {*} {Promise<void>}
|
|
20065
|
+
*/
|
|
20066
|
+
async initControlService() {
|
|
19713
20067
|
this.service = new DataViewControlService(this.model);
|
|
19714
20068
|
await this.service.init(this.context);
|
|
19715
20069
|
}
|
|
@@ -19759,7 +20113,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19759
20113
|
const optItemModel = this.getOptItemModel();
|
|
19760
20114
|
if (optItemModel) {
|
|
19761
20115
|
if (!optItemModel.deuiactionGroup) {
|
|
19762
|
-
throw new
|
|
20116
|
+
throw new RuntimeModelError46(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
19763
20117
|
}
|
|
19764
20118
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
19765
20119
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -19805,8 +20159,11 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19805
20159
|
* @memberof DataViewControlController
|
|
19806
20160
|
*/
|
|
19807
20161
|
async handleDataGroup() {
|
|
19808
|
-
const { enableGroup, groupMode } = this.model;
|
|
20162
|
+
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
19809
20163
|
if (enableGroup && groupMode) {
|
|
20164
|
+
if (!groupAppDEFieldId) {
|
|
20165
|
+
throw new RuntimeModelError46(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
20166
|
+
}
|
|
19810
20167
|
if (groupMode === "AUTO") {
|
|
19811
20168
|
this.handleAutoGroup();
|
|
19812
20169
|
} else if (groupMode === "CODELIST") {
|
|
@@ -19823,60 +20180,81 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19823
20180
|
const { groupAppDEFieldId } = this.model;
|
|
19824
20181
|
if (groupAppDEFieldId) {
|
|
19825
20182
|
const { items } = this.state;
|
|
19826
|
-
const
|
|
20183
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
19827
20184
|
items.forEach((item) => {
|
|
19828
|
-
const
|
|
19829
|
-
|
|
19830
|
-
|
|
20185
|
+
const groupVal = item[groupAppDEFieldId];
|
|
20186
|
+
if (isNil15(groupVal)) {
|
|
20187
|
+
return;
|
|
20188
|
+
}
|
|
20189
|
+
if (!groupMap.has(groupVal)) {
|
|
20190
|
+
groupMap.set(groupVal, []);
|
|
20191
|
+
}
|
|
20192
|
+
groupMap.get(groupVal).push(item);
|
|
19831
20193
|
});
|
|
19832
20194
|
const groups = [];
|
|
19833
|
-
|
|
20195
|
+
groupMap.forEach((value, key) => {
|
|
19834
20196
|
groups.push({
|
|
19835
20197
|
caption: key,
|
|
20198
|
+
key,
|
|
19836
20199
|
children: [...value]
|
|
19837
20200
|
});
|
|
19838
20201
|
});
|
|
19839
20202
|
this.state.groups = groups;
|
|
19840
20203
|
}
|
|
19841
20204
|
}
|
|
20205
|
+
/**
|
|
20206
|
+
* 加载并初始化分组代码表项集合
|
|
20207
|
+
* @author lxm
|
|
20208
|
+
* @date 2023-08-29 05:11:39
|
|
20209
|
+
* @protected
|
|
20210
|
+
* @return {*} {Promise<void>}
|
|
20211
|
+
*/
|
|
20212
|
+
async initGroupCodeListItems() {
|
|
20213
|
+
const { groupCodeListId } = this.model;
|
|
20214
|
+
if (!groupCodeListId) {
|
|
20215
|
+
throw new RuntimeModelError46(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
20216
|
+
}
|
|
20217
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
20218
|
+
this.groupCodeListItems = await app.codeList.get(
|
|
20219
|
+
groupCodeListId,
|
|
20220
|
+
this.context,
|
|
20221
|
+
this.params
|
|
20222
|
+
);
|
|
20223
|
+
}
|
|
19842
20224
|
/**
|
|
19843
20225
|
* 处理代码表分组
|
|
19844
20226
|
*
|
|
19845
20227
|
* @memberof DataViewControlController
|
|
19846
20228
|
*/
|
|
19847
20229
|
async handleCodeListGroup() {
|
|
19848
|
-
const { groupAppDEFieldId
|
|
19849
|
-
if (
|
|
19850
|
-
|
|
19851
|
-
|
|
19852
|
-
|
|
19853
|
-
|
|
19854
|
-
|
|
19855
|
-
|
|
19856
|
-
|
|
20230
|
+
const { groupAppDEFieldId } = this.model;
|
|
20231
|
+
if (!this.groupCodeListItems) {
|
|
20232
|
+
await this.initGroupCodeListItems();
|
|
20233
|
+
}
|
|
20234
|
+
const { items } = this.state;
|
|
20235
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
20236
|
+
this.groupCodeListItems.forEach((item) => {
|
|
20237
|
+
groupMap.set(item.value, []);
|
|
20238
|
+
});
|
|
20239
|
+
items.forEach((item) => {
|
|
20240
|
+
const groupVal = item[groupAppDEFieldId];
|
|
20241
|
+
const groupArr = groupMap.get(groupVal);
|
|
20242
|
+
if (groupArr) {
|
|
20243
|
+
groupArr.push(item);
|
|
20244
|
+
}
|
|
20245
|
+
});
|
|
20246
|
+
const groups = [];
|
|
20247
|
+
groupMap.forEach((arr, key) => {
|
|
20248
|
+
const codeListItem = this.groupCodeListItems.find(
|
|
20249
|
+
(item) => item.value === key
|
|
19857
20250
|
);
|
|
19858
|
-
|
|
19859
|
-
|
|
19860
|
-
|
|
19861
|
-
|
|
19862
|
-
);
|
|
19863
|
-
groups.push({
|
|
19864
|
-
caption: codeListItem.text,
|
|
19865
|
-
children: [...value]
|
|
19866
|
-
});
|
|
19867
|
-
keys.push(codeListItem.value);
|
|
20251
|
+
groups.push({
|
|
20252
|
+
caption: codeListItem.text,
|
|
20253
|
+
key: codeListItem.value,
|
|
20254
|
+
children: arr
|
|
19868
20255
|
});
|
|
19869
|
-
|
|
19870
|
-
|
|
19871
|
-
);
|
|
19872
|
-
if (otherGroup.length > 0) {
|
|
19873
|
-
groups.push({
|
|
19874
|
-
caption: "\u5176\u4ED6",
|
|
19875
|
-
children: [...otherGroup]
|
|
19876
|
-
});
|
|
19877
|
-
}
|
|
19878
|
-
this.state.groups = groups;
|
|
19879
|
-
}
|
|
20256
|
+
});
|
|
20257
|
+
this.state.groups = groups;
|
|
19880
20258
|
}
|
|
19881
20259
|
/**
|
|
19882
20260
|
* 设置排序
|
|
@@ -19902,10 +20280,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19902
20280
|
};
|
|
19903
20281
|
|
|
19904
20282
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
19905
|
-
import { RuntimeModelError as
|
|
20283
|
+
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
19906
20284
|
|
|
19907
20285
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
19908
|
-
import { RuntimeError as
|
|
20286
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
19909
20287
|
var ExpBarControlController = class extends ControlController {
|
|
19910
20288
|
constructor() {
|
|
19911
20289
|
super(...arguments);
|
|
@@ -19960,7 +20338,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
19960
20338
|
get xDataController() {
|
|
19961
20339
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
19962
20340
|
if (!controller) {
|
|
19963
|
-
throw new
|
|
20341
|
+
throw new RuntimeModelError47(
|
|
19964
20342
|
this.model,
|
|
19965
20343
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
19966
20344
|
);
|
|
@@ -20182,7 +20560,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
20182
20560
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
20183
20561
|
return this.XDataModel.navAppViewId;
|
|
20184
20562
|
}
|
|
20185
|
-
throw new
|
|
20563
|
+
throw new RuntimeError35("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
20186
20564
|
}
|
|
20187
20565
|
/**
|
|
20188
20566
|
* 获取导航视图
|
|
@@ -20257,7 +20635,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
20257
20635
|
get xDataController() {
|
|
20258
20636
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
20259
20637
|
if (!controller) {
|
|
20260
|
-
throw new
|
|
20638
|
+
throw new RuntimeModelError48(
|
|
20261
20639
|
this.model,
|
|
20262
20640
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
20263
20641
|
);
|
|
@@ -20311,7 +20689,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
20311
20689
|
};
|
|
20312
20690
|
|
|
20313
20691
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
20314
|
-
import { RuntimeError as
|
|
20692
|
+
import { RuntimeError as RuntimeError36, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
20315
20693
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
20316
20694
|
constructor() {
|
|
20317
20695
|
super(...arguments);
|
|
@@ -20334,7 +20712,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
20334
20712
|
get xDataController() {
|
|
20335
20713
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
20336
20714
|
if (!controller) {
|
|
20337
|
-
throw new
|
|
20715
|
+
throw new RuntimeModelError49(
|
|
20338
20716
|
this.model,
|
|
20339
20717
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
20340
20718
|
);
|
|
@@ -20386,7 +20764,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
20386
20764
|
const deData = node.deData || node;
|
|
20387
20765
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
20388
20766
|
if (!nodeModel) {
|
|
20389
|
-
throw new
|
|
20767
|
+
throw new RuntimeError36("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
20390
20768
|
}
|
|
20391
20769
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
20392
20770
|
result.context.currentSrfNav = nodeId;
|
|
@@ -21124,7 +21502,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
21124
21502
|
|
|
21125
21503
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
21126
21504
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
21127
|
-
import { createUUID as createUUID3, notNilEmpty as
|
|
21505
|
+
import { createUUID as createUUID3, notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
21128
21506
|
|
|
21129
21507
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
21130
21508
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -21202,8 +21580,10 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
21202
21580
|
async formStateNotify(state) {
|
|
21203
21581
|
await super.formStateNotify(state);
|
|
21204
21582
|
this.isNewData = state === "DRAFT" /* DRAFT */;
|
|
21205
|
-
this.
|
|
21206
|
-
|
|
21583
|
+
if (this.model.maskMode !== 0) {
|
|
21584
|
+
this.state.showMask = this.isNewData;
|
|
21585
|
+
}
|
|
21586
|
+
if (state === "LOAD" /* LOAD */ || state === "DRAFT" /* DRAFT */ || state === "SAVE" /* SAVE */) {
|
|
21207
21587
|
this.calcViewParams();
|
|
21208
21588
|
}
|
|
21209
21589
|
}
|
|
@@ -21217,7 +21597,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
21217
21597
|
calcViewParams() {
|
|
21218
21598
|
let newContext = this.form.context.clone();
|
|
21219
21599
|
const navContexts = this.model.navigateContexts;
|
|
21220
|
-
if (
|
|
21600
|
+
if (notNilEmpty7(navContexts)) {
|
|
21221
21601
|
newContext = Object.assign(
|
|
21222
21602
|
newContext,
|
|
21223
21603
|
convertNavData(
|
|
@@ -21260,7 +21640,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
21260
21640
|
this.embedView = view;
|
|
21261
21641
|
this.embedView.evt.on("onMounted", () => {
|
|
21262
21642
|
if (!this.isNewData) {
|
|
21263
|
-
this.embedView.
|
|
21643
|
+
this.embedView.call("Load" /* LOAD */);
|
|
21264
21644
|
}
|
|
21265
21645
|
});
|
|
21266
21646
|
this.embedView.evt.on("onDataChange", (event) => {
|
|
@@ -21387,7 +21767,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
21387
21767
|
// src/controller/control/form/form-detail/form-item/form-item.controller.ts
|
|
21388
21768
|
import Schema from "async-validator";
|
|
21389
21769
|
import { createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
21390
|
-
import { ModelError as ModelError25, RuntimeError as
|
|
21770
|
+
import { ModelError as ModelError25, RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
21391
21771
|
import dayjs3 from "dayjs";
|
|
21392
21772
|
|
|
21393
21773
|
// src/controller/control/form/form-detail/form-item/form-item.state.ts
|
|
@@ -21703,7 +22083,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
21703
22083
|
case "SESSION":
|
|
21704
22084
|
case "APPLICATION":
|
|
21705
22085
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
21706
|
-
throw new
|
|
22086
|
+
throw new RuntimeError37("appdata.context\u4E0D\u5B58\u5728");
|
|
21707
22087
|
}
|
|
21708
22088
|
data[this.name] = ibiz.appData.context[defaultValue];
|
|
21709
22089
|
break;
|
|
@@ -21828,7 +22208,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
21828
22208
|
};
|
|
21829
22209
|
|
|
21830
22210
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
21831
|
-
import { RuntimeError as
|
|
22211
|
+
import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
21832
22212
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
21833
22213
|
/**
|
|
21834
22214
|
* 初始化
|
|
@@ -21843,7 +22223,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
21843
22223
|
const { model } = this.parent;
|
|
21844
22224
|
const { contentControl } = model;
|
|
21845
22225
|
if (!contentControl) {
|
|
21846
|
-
throw new
|
|
22226
|
+
throw new RuntimeError38("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
21847
22227
|
}
|
|
21848
22228
|
this.controlModel = contentControl;
|
|
21849
22229
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -21953,7 +22333,7 @@ import { isArray as isArray4 } from "lodash-es";
|
|
|
21953
22333
|
import {
|
|
21954
22334
|
awaitTimeout,
|
|
21955
22335
|
mergeInLeft,
|
|
21956
|
-
RuntimeError as
|
|
22336
|
+
RuntimeError as RuntimeError39,
|
|
21957
22337
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
21958
22338
|
} from "@ibiz-template/core";
|
|
21959
22339
|
import { debounce } from "lodash-es";
|
|
@@ -21961,7 +22341,7 @@ import { debounce } from "lodash-es";
|
|
|
21961
22341
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
21962
22342
|
import {
|
|
21963
22343
|
recursiveIterate as recursiveIterate3,
|
|
21964
|
-
RuntimeModelError as
|
|
22344
|
+
RuntimeModelError as RuntimeModelError50
|
|
21965
22345
|
} from "@ibiz-template/core";
|
|
21966
22346
|
var EditFormService = class extends ControlService {
|
|
21967
22347
|
/**
|
|
@@ -22079,7 +22459,7 @@ var EditFormService = class extends ControlService {
|
|
|
22079
22459
|
const wizardForm = this.model;
|
|
22080
22460
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
22081
22461
|
if (!methodName) {
|
|
22082
|
-
throw new
|
|
22462
|
+
throw new RuntimeModelError50(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
22083
22463
|
}
|
|
22084
22464
|
let res = await this.exec(
|
|
22085
22465
|
methodName,
|
|
@@ -22186,7 +22566,8 @@ var EditFormService = class extends ControlService {
|
|
|
22186
22566
|
let mapField;
|
|
22187
22567
|
if (deField) {
|
|
22188
22568
|
mapField = new UIMapField(uiKey, deField, {
|
|
22189
|
-
isOriginField: true
|
|
22569
|
+
isOriginField: true,
|
|
22570
|
+
dataType: formItem.dataType
|
|
22190
22571
|
});
|
|
22191
22572
|
} else {
|
|
22192
22573
|
mapField = new UIMapField(uiKey, uiKey, {
|
|
@@ -22335,7 +22716,7 @@ var EditFormController = class extends FormController {
|
|
|
22335
22716
|
}
|
|
22336
22717
|
const isValid = await this.validate();
|
|
22337
22718
|
if (!isValid) {
|
|
22338
|
-
throw new
|
|
22719
|
+
throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
22339
22720
|
}
|
|
22340
22721
|
await this.startLoading();
|
|
22341
22722
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -22435,7 +22816,7 @@ var EditFormController = class extends FormController {
|
|
|
22435
22816
|
(item) => item.id === formItemUpdateId
|
|
22436
22817
|
);
|
|
22437
22818
|
if (!formItemUpdate) {
|
|
22438
|
-
throw new
|
|
22819
|
+
throw new RuntimeError39("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
22439
22820
|
}
|
|
22440
22821
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
22441
22822
|
const updateItems = defiupdateDetails.map((item) => item.id);
|
|
@@ -22479,7 +22860,7 @@ var EditFormController = class extends FormController {
|
|
|
22479
22860
|
async wfStart(extraParams = {}) {
|
|
22480
22861
|
const isValid = await this.validate();
|
|
22481
22862
|
if (!isValid) {
|
|
22482
|
-
throw new
|
|
22863
|
+
throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
22483
22864
|
}
|
|
22484
22865
|
await this.startLoading();
|
|
22485
22866
|
try {
|
|
@@ -22512,7 +22893,7 @@ var EditFormController = class extends FormController {
|
|
|
22512
22893
|
async wfSubmit(extraParams = {}) {
|
|
22513
22894
|
const isValid = await this.validate();
|
|
22514
22895
|
if (!isValid) {
|
|
22515
|
-
throw new
|
|
22896
|
+
throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
22516
22897
|
}
|
|
22517
22898
|
await this.startLoading();
|
|
22518
22899
|
try {
|
|
@@ -22743,7 +23124,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
22743
23124
|
};
|
|
22744
23125
|
|
|
22745
23126
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
22746
|
-
import { RuntimeError as
|
|
23127
|
+
import { RuntimeError as RuntimeError40, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
22747
23128
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
22748
23129
|
constructor() {
|
|
22749
23130
|
super(...arguments);
|
|
@@ -22848,7 +23229,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
22848
23229
|
const { model } = this.parent;
|
|
22849
23230
|
const { contentControl } = model;
|
|
22850
23231
|
if (!contentControl) {
|
|
22851
|
-
throw new
|
|
23232
|
+
throw new RuntimeError40("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
22852
23233
|
}
|
|
22853
23234
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
22854
23235
|
this.controlModel = contentControl;
|
|
@@ -23559,10 +23940,10 @@ import {
|
|
|
23559
23940
|
awaitTimeout as awaitTimeout2,
|
|
23560
23941
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
23561
23942
|
recursiveIterate as recursiveIterate4,
|
|
23562
|
-
RuntimeError as
|
|
23563
|
-
RuntimeModelError as
|
|
23943
|
+
RuntimeError as RuntimeError41,
|
|
23944
|
+
RuntimeModelError as RuntimeModelError51
|
|
23564
23945
|
} from "@ibiz-template/core";
|
|
23565
|
-
import { clone as
|
|
23946
|
+
import { clone as clone15 } from "ramda";
|
|
23566
23947
|
|
|
23567
23948
|
// src/controller/control/grid/grid/grid.service.ts
|
|
23568
23949
|
var GridService = class extends MDControlService {
|
|
@@ -23582,7 +23963,8 @@ var GridService = class extends MDControlService {
|
|
|
23582
23963
|
if (deField) {
|
|
23583
23964
|
const deFieldKey = deField.toLowerCase();
|
|
23584
23965
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
23585
|
-
isOriginField: true
|
|
23966
|
+
isOriginField: true,
|
|
23967
|
+
dataType: column.dataType
|
|
23586
23968
|
});
|
|
23587
23969
|
} else {
|
|
23588
23970
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -23755,11 +24137,11 @@ var GridController = class extends MDControlController {
|
|
|
23755
24137
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
23756
24138
|
);
|
|
23757
24139
|
if (!this.groupFieldColumn) {
|
|
23758
|
-
throw new
|
|
24140
|
+
throw new RuntimeModelError51(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
23759
24141
|
}
|
|
23760
24142
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
23761
24143
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
23762
|
-
throw new
|
|
24144
|
+
throw new RuntimeModelError51(
|
|
23763
24145
|
this.groupFieldColumn.model,
|
|
23764
24146
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
23765
24147
|
);
|
|
@@ -23769,7 +24151,7 @@ var GridController = class extends MDControlController {
|
|
|
23769
24151
|
);
|
|
23770
24152
|
if (index !== -1 && index !== 0) {
|
|
23771
24153
|
if (this.isMultistageHeader) {
|
|
23772
|
-
throw new
|
|
24154
|
+
throw new RuntimeModelError51(
|
|
23773
24155
|
this.model,
|
|
23774
24156
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
23775
24157
|
);
|
|
@@ -23779,10 +24161,10 @@ var GridController = class extends MDControlController {
|
|
|
23779
24161
|
}
|
|
23780
24162
|
if (groupMode === "CODELIST") {
|
|
23781
24163
|
if (!groupCodeListId) {
|
|
23782
|
-
throw new
|
|
24164
|
+
throw new RuntimeModelError51(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
23783
24165
|
}
|
|
23784
24166
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
23785
|
-
throw new
|
|
24167
|
+
throw new RuntimeModelError51(
|
|
23786
24168
|
this.model,
|
|
23787
24169
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
23788
24170
|
);
|
|
@@ -23844,6 +24226,7 @@ var GridController = class extends MDControlController {
|
|
|
23844
24226
|
);
|
|
23845
24227
|
this.state.groups.push({
|
|
23846
24228
|
caption: (codeListItem == null ? void 0 : codeListItem.text) || "".concat(key),
|
|
24229
|
+
key,
|
|
23847
24230
|
children: value
|
|
23848
24231
|
});
|
|
23849
24232
|
});
|
|
@@ -23862,7 +24245,7 @@ var GridController = class extends MDControlController {
|
|
|
23862
24245
|
return;
|
|
23863
24246
|
}
|
|
23864
24247
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
23865
|
-
throw new
|
|
24248
|
+
throw new RuntimeModelError51(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
23866
24249
|
}
|
|
23867
24250
|
const params = await this.getFetchParams();
|
|
23868
24251
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -23930,7 +24313,7 @@ var GridController = class extends MDControlController {
|
|
|
23930
24313
|
}
|
|
23931
24314
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
23932
24315
|
if (editingRow) {
|
|
23933
|
-
throw new
|
|
24316
|
+
throw new RuntimeError41("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
23934
24317
|
}
|
|
23935
24318
|
let res;
|
|
23936
24319
|
try {
|
|
@@ -23964,7 +24347,7 @@ var GridController = class extends MDControlController {
|
|
|
23964
24347
|
(item) => item.data.srfkey === data.srfkey
|
|
23965
24348
|
);
|
|
23966
24349
|
if (!rowState) {
|
|
23967
|
-
throw new
|
|
24350
|
+
throw new RuntimeError41("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
23968
24351
|
}
|
|
23969
24352
|
if (!rowState.modified) {
|
|
23970
24353
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -23976,7 +24359,7 @@ var GridController = class extends MDControlController {
|
|
|
23976
24359
|
}
|
|
23977
24360
|
const isValid = await this.validate(rowState);
|
|
23978
24361
|
if (!isValid) {
|
|
23979
|
-
throw new
|
|
24362
|
+
throw new RuntimeError41("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
23980
24363
|
}
|
|
23981
24364
|
await this.startLoading();
|
|
23982
24365
|
let res;
|
|
@@ -24002,7 +24385,6 @@ var GridController = class extends MDControlController {
|
|
|
24002
24385
|
this.state.items.splice(index, 1, res.data);
|
|
24003
24386
|
rowState.data = res.data;
|
|
24004
24387
|
rowState.modified = false;
|
|
24005
|
-
ibiz.message.success("".concat(res.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F"));
|
|
24006
24388
|
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "SUCCESS"), {
|
|
24007
24389
|
default: "".concat(res.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F"),
|
|
24008
24390
|
data: res.data
|
|
@@ -24189,7 +24571,7 @@ var GridController = class extends MDControlController {
|
|
|
24189
24571
|
}
|
|
24190
24572
|
async toggleRowEdit() {
|
|
24191
24573
|
if (!this.model.enableRowNew) {
|
|
24192
|
-
throw new
|
|
24574
|
+
throw new RuntimeError41("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
24193
24575
|
}
|
|
24194
24576
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
24195
24577
|
}
|
|
@@ -24222,7 +24604,7 @@ var GridController = class extends MDControlController {
|
|
|
24222
24604
|
if (toState === true) {
|
|
24223
24605
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
24224
24606
|
if (editingRow) {
|
|
24225
|
-
throw new
|
|
24607
|
+
throw new RuntimeError41("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
24226
24608
|
}
|
|
24227
24609
|
}
|
|
24228
24610
|
row.showRowEdit = toState;
|
|
@@ -24267,7 +24649,7 @@ var GridController = class extends MDControlController {
|
|
|
24267
24649
|
(item) => item.id === updateId
|
|
24268
24650
|
);
|
|
24269
24651
|
if (!findUpdate) {
|
|
24270
|
-
throw new
|
|
24652
|
+
throw new RuntimeError41("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
24271
24653
|
}
|
|
24272
24654
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
24273
24655
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -24337,7 +24719,7 @@ var GridController = class extends MDControlController {
|
|
|
24337
24719
|
codeListMap.set(key, items[key].codeListItems);
|
|
24338
24720
|
}
|
|
24339
24721
|
});
|
|
24340
|
-
const cloneData =
|
|
24722
|
+
const cloneData = clone15(
|
|
24341
24723
|
data2.map((item) => {
|
|
24342
24724
|
return item.getOrigin();
|
|
24343
24725
|
})
|
|
@@ -24376,7 +24758,7 @@ var GridController = class extends MDControlController {
|
|
|
24376
24758
|
data2 = this.getData();
|
|
24377
24759
|
}
|
|
24378
24760
|
if (data2.length === 0) {
|
|
24379
|
-
throw new
|
|
24761
|
+
throw new RuntimeError41("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
24380
24762
|
}
|
|
24381
24763
|
return formatExcelData(data2);
|
|
24382
24764
|
};
|
|
@@ -24395,11 +24777,11 @@ var GridController = class extends MDControlController {
|
|
|
24395
24777
|
);
|
|
24396
24778
|
const data = formatArrayData(filterVal, await getExportData());
|
|
24397
24779
|
if (!ibiz.util.getExportExcel) {
|
|
24398
|
-
throw new
|
|
24780
|
+
throw new RuntimeError41("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
24399
24781
|
}
|
|
24400
24782
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
24401
24783
|
if (!exportExcel) {
|
|
24402
|
-
throw new
|
|
24784
|
+
throw new RuntimeError41("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
24403
24785
|
}
|
|
24404
24786
|
exportExcel.exportJsonToExcel({
|
|
24405
24787
|
header,
|
|
@@ -24415,9 +24797,9 @@ var GridController = class extends MDControlController {
|
|
|
24415
24797
|
};
|
|
24416
24798
|
|
|
24417
24799
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
24418
|
-
import { DataTypes, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
24800
|
+
import { DataTypes as DataTypes2, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
24419
24801
|
import dayjs4 from "dayjs";
|
|
24420
|
-
import { clone as
|
|
24802
|
+
import { clone as clone16 } from "ramda";
|
|
24421
24803
|
var GridFieldColumnController = class extends GridColumnController {
|
|
24422
24804
|
constructor() {
|
|
24423
24805
|
super(...arguments);
|
|
@@ -24513,7 +24895,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24513
24895
|
srfkey: value,
|
|
24514
24896
|
...wfContext
|
|
24515
24897
|
});
|
|
24516
|
-
const tempParams =
|
|
24898
|
+
const tempParams = clone16(this.params);
|
|
24517
24899
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
24518
24900
|
row.data,
|
|
24519
24901
|
tempContext,
|
|
@@ -24641,7 +25023,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24641
25023
|
if (!this.valueFormat) {
|
|
24642
25024
|
return strVal;
|
|
24643
25025
|
}
|
|
24644
|
-
const isDate =
|
|
25026
|
+
const isDate = DataTypes2.isDate(this.dataType);
|
|
24645
25027
|
if (isDate) {
|
|
24646
25028
|
return dayjs4(strVal).format(this.valueFormat);
|
|
24647
25029
|
}
|
|
@@ -24650,7 +25032,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24650
25032
|
};
|
|
24651
25033
|
|
|
24652
25034
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
24653
|
-
import { RuntimeModelError as
|
|
25035
|
+
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
24654
25036
|
var GridUAColumnController = class extends GridColumnController {
|
|
24655
25037
|
/**
|
|
24656
25038
|
* 给rowController初始化操作列的状态
|
|
@@ -24663,7 +25045,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
24663
25045
|
var _a;
|
|
24664
25046
|
const { deuiactionGroup } = this.model;
|
|
24665
25047
|
if (!deuiactionGroup) {
|
|
24666
|
-
throw new
|
|
25048
|
+
throw new RuntimeModelError52(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
24667
25049
|
}
|
|
24668
25050
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
24669
25051
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -24704,7 +25086,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
24704
25086
|
};
|
|
24705
25087
|
|
|
24706
25088
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
24707
|
-
import { RuntimeError as
|
|
25089
|
+
import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
|
|
24708
25090
|
import Schema2 from "async-validator";
|
|
24709
25091
|
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
24710
25092
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -24838,7 +25220,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
24838
25220
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
24839
25221
|
const result = await this.validate(row);
|
|
24840
25222
|
if (!result) {
|
|
24841
|
-
throw new
|
|
25223
|
+
throw new RuntimeError42(
|
|
24842
25224
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
24843
25225
|
);
|
|
24844
25226
|
}
|
|
@@ -24979,7 +25361,8 @@ var ListService = class extends MDControlService {
|
|
|
24979
25361
|
if (deField) {
|
|
24980
25362
|
const deFieldKey = deField.toLowerCase();
|
|
24981
25363
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
24982
|
-
isOriginField: true
|
|
25364
|
+
isOriginField: true,
|
|
25365
|
+
dataType: item.dataType
|
|
24983
25366
|
});
|
|
24984
25367
|
} else {
|
|
24985
25368
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -25144,6 +25527,7 @@ var ListController = class extends MDControlController {
|
|
|
25144
25527
|
childrenMap.forEach((value, key) => {
|
|
25145
25528
|
groups.push({
|
|
25146
25529
|
caption: key,
|
|
25530
|
+
key,
|
|
25147
25531
|
children: [...value]
|
|
25148
25532
|
});
|
|
25149
25533
|
});
|
|
@@ -25173,6 +25557,7 @@ var ListController = class extends MDControlController {
|
|
|
25173
25557
|
);
|
|
25174
25558
|
groups.push({
|
|
25175
25559
|
caption: codeListItem.text,
|
|
25560
|
+
key: codeListItem.value,
|
|
25176
25561
|
children: [...value]
|
|
25177
25562
|
});
|
|
25178
25563
|
keys.push(codeListItem.value);
|
|
@@ -25183,6 +25568,7 @@ var ListController = class extends MDControlController {
|
|
|
25183
25568
|
if (otherGroup.length > 0) {
|
|
25184
25569
|
groups.push({
|
|
25185
25570
|
caption: "\u5176\u4ED6",
|
|
25571
|
+
key: "\u5176\u4ED6",
|
|
25186
25572
|
children: [...otherGroup]
|
|
25187
25573
|
});
|
|
25188
25574
|
}
|
|
@@ -25192,7 +25578,7 @@ var ListController = class extends MDControlController {
|
|
|
25192
25578
|
};
|
|
25193
25579
|
|
|
25194
25580
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
25195
|
-
import { RuntimeError as
|
|
25581
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
25196
25582
|
var PanelController = class extends ControlController {
|
|
25197
25583
|
constructor() {
|
|
25198
25584
|
super(...arguments);
|
|
@@ -25290,7 +25676,7 @@ var PanelController = class extends ControlController {
|
|
|
25290
25676
|
async load() {
|
|
25291
25677
|
const data = await this.prepareData();
|
|
25292
25678
|
if (!data) {
|
|
25293
|
-
throw new
|
|
25679
|
+
throw new RuntimeError43("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
25294
25680
|
}
|
|
25295
25681
|
const panelData = this.convertData(data);
|
|
25296
25682
|
this.state.data = panelData;
|
|
@@ -25734,7 +26120,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
25734
26120
|
* @memberof PickupViewPanelController
|
|
25735
26121
|
*/
|
|
25736
26122
|
async getSelectedData() {
|
|
25737
|
-
const items = await this.embedView.call("GetData");
|
|
26123
|
+
const items = await this.embedView.call("GetData" /* GET_DATA */);
|
|
25738
26124
|
return items;
|
|
25739
26125
|
}
|
|
25740
26126
|
/**
|
|
@@ -25746,7 +26132,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
25746
26132
|
* @memberof PickupViewPanelController
|
|
25747
26133
|
*/
|
|
25748
26134
|
async getAllData() {
|
|
25749
|
-
const items = await this.embedView.call("GetAllData");
|
|
26135
|
+
const items = await this.embedView.call("GetAllData" /* GET_ALL_DATA */);
|
|
25750
26136
|
return items;
|
|
25751
26137
|
}
|
|
25752
26138
|
};
|
|
@@ -26511,7 +26897,7 @@ var TreeController = class extends MDControlController {
|
|
|
26511
26897
|
};
|
|
26512
26898
|
|
|
26513
26899
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
26514
|
-
import { RuntimeError as
|
|
26900
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
26515
26901
|
|
|
26516
26902
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
26517
26903
|
var WizardPanelService = class extends ControlService {
|
|
@@ -26670,7 +27056,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26670
27056
|
const { activeFormTag } = this.state;
|
|
26671
27057
|
const controller = this.formControllers.get(activeFormTag);
|
|
26672
27058
|
if (!controller) {
|
|
26673
|
-
throw new
|
|
27059
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
26674
27060
|
}
|
|
26675
27061
|
return controller;
|
|
26676
27062
|
}
|
|
@@ -26745,7 +27131,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26745
27131
|
this.tagHistory.pop();
|
|
26746
27132
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
26747
27133
|
if (!prevTag) {
|
|
26748
|
-
throw new
|
|
27134
|
+
throw new RuntimeError44("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
26749
27135
|
}
|
|
26750
27136
|
this.state.activeFormTag = prevTag;
|
|
26751
27137
|
}
|
|
@@ -26766,7 +27152,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26766
27152
|
}
|
|
26767
27153
|
);
|
|
26768
27154
|
if (!wizardForm) {
|
|
26769
|
-
throw new
|
|
27155
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
26770
27156
|
}
|
|
26771
27157
|
nextTag = data.srfnextform;
|
|
26772
27158
|
} else {
|
|
@@ -26778,7 +27164,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26778
27164
|
});
|
|
26779
27165
|
const nextWizardStep = wizardSteps[index + 1];
|
|
26780
27166
|
if (!nextWizardStep) {
|
|
26781
|
-
throw new
|
|
27167
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
26782
27168
|
}
|
|
26783
27169
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
26784
27170
|
(wizardForm) => {
|
|
@@ -26791,7 +27177,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26791
27177
|
}
|
|
26792
27178
|
}
|
|
26793
27179
|
if (!nextTag) {
|
|
26794
|
-
throw new
|
|
27180
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
26795
27181
|
}
|
|
26796
27182
|
this.state.activeFormTag = nextTag;
|
|
26797
27183
|
this.tagHistory.push(nextTag);
|
|
@@ -26827,7 +27213,8 @@ var MDCtrlService = class extends MDControlService {
|
|
|
26827
27213
|
if (deField) {
|
|
26828
27214
|
const deFieldKey = deField.toLowerCase();
|
|
26829
27215
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
26830
|
-
isOriginField: true
|
|
27216
|
+
isOriginField: true,
|
|
27217
|
+
dataType: item.dataType
|
|
26831
27218
|
});
|
|
26832
27219
|
} else {
|
|
26833
27220
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -27019,6 +27406,321 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27019
27406
|
}
|
|
27020
27407
|
};
|
|
27021
27408
|
|
|
27409
|
+
// src/controller/control/kanban/kanban.controller.ts
|
|
27410
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
27411
|
+
import { isNil as isNil16 } from "ramda";
|
|
27412
|
+
|
|
27413
|
+
// src/controller/control/kanban/kanban.service.ts
|
|
27414
|
+
var KanbanService = class extends DataViewControlService {
|
|
27415
|
+
/**
|
|
27416
|
+
* 更新分组数据
|
|
27417
|
+
*
|
|
27418
|
+
* @author lxm
|
|
27419
|
+
* @date 2022-09-07 19:09:11
|
|
27420
|
+
* @param {IParams} context 上下文
|
|
27421
|
+
* @param {ControlVO} data 数据
|
|
27422
|
+
* @returns {*}
|
|
27423
|
+
*/
|
|
27424
|
+
async updateGroup(context, data) {
|
|
27425
|
+
var _a;
|
|
27426
|
+
const updateAction = ((_a = this.model.updateGroupControlAction) == null ? void 0 : _a.appDEMethodId) || "update";
|
|
27427
|
+
let res = await this.exec(updateAction, context, data.getOrigin());
|
|
27428
|
+
res = this.handleResponse(res);
|
|
27429
|
+
return res;
|
|
27430
|
+
}
|
|
27431
|
+
};
|
|
27432
|
+
|
|
27433
|
+
// src/controller/control/kanban/kanban.controller.ts
|
|
27434
|
+
var KanbanController = class extends DataViewControlController {
|
|
27435
|
+
/**
|
|
27436
|
+
* 允许调整顺序
|
|
27437
|
+
* @author lxm
|
|
27438
|
+
* @date 2023-09-11 04:02:39
|
|
27439
|
+
* @readonly
|
|
27440
|
+
* @type {boolean}
|
|
27441
|
+
*/
|
|
27442
|
+
get enableEditOrder() {
|
|
27443
|
+
return this.model.enableCardEditOrder === true;
|
|
27444
|
+
}
|
|
27445
|
+
/**
|
|
27446
|
+
* 是否支持调整分组。
|
|
27447
|
+
* @author lxm
|
|
27448
|
+
* @date 2023-09-11 04:04:00
|
|
27449
|
+
* @readonly
|
|
27450
|
+
* @type {boolean}
|
|
27451
|
+
*/
|
|
27452
|
+
get enableEditGroup() {
|
|
27453
|
+
return this.model.enableCardEditGroup === true;
|
|
27454
|
+
}
|
|
27455
|
+
/**
|
|
27456
|
+
* 是否允许新建
|
|
27457
|
+
* @author lxm
|
|
27458
|
+
* @date 2023-09-11 04:05:25
|
|
27459
|
+
* @readonly
|
|
27460
|
+
* @type {boolean}
|
|
27461
|
+
*/
|
|
27462
|
+
get enableNew() {
|
|
27463
|
+
return this.model.enableCardNew === true;
|
|
27464
|
+
}
|
|
27465
|
+
async initControlService() {
|
|
27466
|
+
this.service = new KanbanService(this.model);
|
|
27467
|
+
await this.service.init(this.context);
|
|
27468
|
+
}
|
|
27469
|
+
initState() {
|
|
27470
|
+
super.initState();
|
|
27471
|
+
this.state.size = this.model.pagingSize || 1e3;
|
|
27472
|
+
this.state.updating = false;
|
|
27473
|
+
this.state.draggable = this.enableEditOrder || this.enableEditGroup;
|
|
27474
|
+
}
|
|
27475
|
+
/**
|
|
27476
|
+
* 初始化
|
|
27477
|
+
*
|
|
27478
|
+
* @protected
|
|
27479
|
+
* @return {*} {Promise<void>}
|
|
27480
|
+
* @memberof KanbanController
|
|
27481
|
+
*/
|
|
27482
|
+
async onCreated() {
|
|
27483
|
+
await super.onCreated();
|
|
27484
|
+
await this.initGroupActionStates();
|
|
27485
|
+
}
|
|
27486
|
+
/**
|
|
27487
|
+
* 初始化分组右侧界面行为按钮的状态
|
|
27488
|
+
*
|
|
27489
|
+
* @author chitanda
|
|
27490
|
+
* @date 2023-08-02 17:08:04
|
|
27491
|
+
* @return {*} {Promise<void>}
|
|
27492
|
+
*/
|
|
27493
|
+
async initGroupActionStates() {
|
|
27494
|
+
var _a;
|
|
27495
|
+
const { groupUIActionGroup } = this.model;
|
|
27496
|
+
if (!((_a = groupUIActionGroup == null ? void 0 : groupUIActionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
27497
|
+
return;
|
|
27498
|
+
}
|
|
27499
|
+
const containerState = new ButtonContainerState();
|
|
27500
|
+
groupUIActionGroup.uiactionGroupDetails.forEach((detail) => {
|
|
27501
|
+
const actionid = detail.uiactionId;
|
|
27502
|
+
if (actionid) {
|
|
27503
|
+
const buttonState = new UIActionButtonState(
|
|
27504
|
+
detail.id,
|
|
27505
|
+
this.context.srfappid,
|
|
27506
|
+
actionid
|
|
27507
|
+
);
|
|
27508
|
+
containerState.addState(detail.id, buttonState);
|
|
27509
|
+
}
|
|
27510
|
+
});
|
|
27511
|
+
await containerState.update();
|
|
27512
|
+
this.state.groupActionGroupState = containerState;
|
|
27513
|
+
this.evt.on("onSelectionChange", (event) => {
|
|
27514
|
+
let data = event.data[0];
|
|
27515
|
+
if (data && data instanceof ControlVO) {
|
|
27516
|
+
data = data.getOrigin();
|
|
27517
|
+
}
|
|
27518
|
+
if (data) {
|
|
27519
|
+
this.state.groupActionGroupState.update(
|
|
27520
|
+
data,
|
|
27521
|
+
this.model.appDataEntityId
|
|
27522
|
+
);
|
|
27523
|
+
}
|
|
27524
|
+
});
|
|
27525
|
+
}
|
|
27526
|
+
/**
|
|
27527
|
+
* 本地排序items
|
|
27528
|
+
* @author lxm
|
|
27529
|
+
* @date 2023-09-04 09:30:55
|
|
27530
|
+
* @param {IData[]} items
|
|
27531
|
+
*/
|
|
27532
|
+
sortItems(items) {
|
|
27533
|
+
const sortField = this.model.minorSortAppDEFieldId;
|
|
27534
|
+
const { minorSortDir } = this.model;
|
|
27535
|
+
if (!sortField) {
|
|
27536
|
+
throw new RuntimeModelError53(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
27537
|
+
}
|
|
27538
|
+
if (!minorSortDir) {
|
|
27539
|
+
throw new RuntimeModelError53(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
27540
|
+
}
|
|
27541
|
+
const isAsc = minorSortDir === "ASC";
|
|
27542
|
+
items.forEach((item) => {
|
|
27543
|
+
const sortValue = item[sortField];
|
|
27544
|
+
if (isNil16(sortValue)) {
|
|
27545
|
+
item[sortField] = 0;
|
|
27546
|
+
} else {
|
|
27547
|
+
const toNum = Number(sortValue);
|
|
27548
|
+
if (Number.isNaN(toNum)) {
|
|
27549
|
+
throw new RuntimeError45(
|
|
27550
|
+
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
27551
|
+
);
|
|
27552
|
+
}
|
|
27553
|
+
}
|
|
27554
|
+
});
|
|
27555
|
+
items.sort(
|
|
27556
|
+
(a, b) => isAsc ? a[sortField] - b[sortField] : b[sortField] - a[sortField]
|
|
27557
|
+
);
|
|
27558
|
+
}
|
|
27559
|
+
async afterLoad(args, items) {
|
|
27560
|
+
this.sortItems(this.state.items);
|
|
27561
|
+
return super.afterLoad(args, items);
|
|
27562
|
+
}
|
|
27563
|
+
handleDataGroup() {
|
|
27564
|
+
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
27565
|
+
throw new RuntimeError45("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
27566
|
+
}
|
|
27567
|
+
return super.handleDataGroup();
|
|
27568
|
+
}
|
|
27569
|
+
/**
|
|
27570
|
+
* 拖拽变更事件处理回调
|
|
27571
|
+
* @author lxm
|
|
27572
|
+
* @date 2023-09-11 04:12:58
|
|
27573
|
+
* @param {IDragChangeInfo} info
|
|
27574
|
+
* @return {*} {Promise<void>}
|
|
27575
|
+
*/
|
|
27576
|
+
async onDragChange(info) {
|
|
27577
|
+
if (!this.enableEditGroup) {
|
|
27578
|
+
if (info.from !== info.to) {
|
|
27579
|
+
ibiz.message.warning("\u5F53\u524D\u770B\u677F\u4E0D\u5141\u8BB8\u8C03\u6574\u5206\u7EC4\uFF01");
|
|
27580
|
+
return;
|
|
27581
|
+
}
|
|
27582
|
+
}
|
|
27583
|
+
const isAsc = this.model.minorSortDir === "ASC";
|
|
27584
|
+
const { from, to, fromIndex, toIndex } = info;
|
|
27585
|
+
const groupField = this.model.groupAppDEFieldId;
|
|
27586
|
+
const sortField = this.model.minorSortAppDEFieldId;
|
|
27587
|
+
const modifiedItems = [];
|
|
27588
|
+
const fromGroup = this.state.groups.find((x) => x.key === from);
|
|
27589
|
+
const toGroup = this.state.groups.find((x) => x.key === to);
|
|
27590
|
+
if (!this.enableEditOrder) {
|
|
27591
|
+
if (info.from === info.to) {
|
|
27592
|
+
ibiz.message.warning("\u5F53\u524D\u770B\u677F\u4E0D\u5141\u8BB8\u8C03\u6574\u6B21\u5E8F");
|
|
27593
|
+
return;
|
|
27594
|
+
}
|
|
27595
|
+
const draggedItem2 = fromGroup.children[fromIndex];
|
|
27596
|
+
draggedItem2[groupField] = info.to;
|
|
27597
|
+
return this.updateChangedItems([draggedItem2]);
|
|
27598
|
+
}
|
|
27599
|
+
const getNextSort = (num) => {
|
|
27600
|
+
return num + (100 - num % 100);
|
|
27601
|
+
};
|
|
27602
|
+
const originArr = [...toGroup.children];
|
|
27603
|
+
const changedArr = [...toGroup.children];
|
|
27604
|
+
const draggedItem = fromGroup.children[fromIndex];
|
|
27605
|
+
if (info.from !== info.to) {
|
|
27606
|
+
draggedItem[groupField] = info.to;
|
|
27607
|
+
changedArr.splice(toIndex, 0, draggedItem);
|
|
27608
|
+
} else {
|
|
27609
|
+
changedArr.splice(fromIndex, 1);
|
|
27610
|
+
changedArr.splice(toIndex, 0, draggedItem);
|
|
27611
|
+
}
|
|
27612
|
+
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
27613
|
+
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
27614
|
+
if (!isAsc) {
|
|
27615
|
+
originArr.reverse();
|
|
27616
|
+
changedArr.reverse();
|
|
27617
|
+
}
|
|
27618
|
+
let lastSort;
|
|
27619
|
+
let cacheArr = [];
|
|
27620
|
+
let cacheLastSort;
|
|
27621
|
+
changedArr.forEach((item, index) => {
|
|
27622
|
+
if (lastSort === void 0) {
|
|
27623
|
+
if (item !== originArr[index]) {
|
|
27624
|
+
if (!originArr[index]) {
|
|
27625
|
+
lastSort = index === 0 ? 100 : getNextSort(originArr[index - 1][sortField]);
|
|
27626
|
+
} else {
|
|
27627
|
+
lastSort = originArr[index][sortField] || 100;
|
|
27628
|
+
}
|
|
27629
|
+
item[sortField] = lastSort;
|
|
27630
|
+
modifiedItems.push(item);
|
|
27631
|
+
}
|
|
27632
|
+
} else {
|
|
27633
|
+
if (lastSort >= item[sortField]) {
|
|
27634
|
+
if (cacheArr.length > 0) {
|
|
27635
|
+
cacheArr.forEach((cache) => {
|
|
27636
|
+
cache[sortField] = getNextSort(cacheLastSort);
|
|
27637
|
+
modifiedItems.push(cache);
|
|
27638
|
+
cacheLastSort = cache[sortField];
|
|
27639
|
+
});
|
|
27640
|
+
lastSort = cacheLastSort;
|
|
27641
|
+
cacheLastSort = 0;
|
|
27642
|
+
cacheArr = [];
|
|
27643
|
+
}
|
|
27644
|
+
item[sortField] = getNextSort(lastSort);
|
|
27645
|
+
modifiedItems.push(item);
|
|
27646
|
+
} else {
|
|
27647
|
+
if (cacheArr.length === 0) {
|
|
27648
|
+
cacheLastSort = lastSort;
|
|
27649
|
+
}
|
|
27650
|
+
cacheArr.push(item);
|
|
27651
|
+
}
|
|
27652
|
+
lastSort = item[sortField];
|
|
27653
|
+
}
|
|
27654
|
+
});
|
|
27655
|
+
this.updateChangedItems(modifiedItems);
|
|
27656
|
+
}
|
|
27657
|
+
/**
|
|
27658
|
+
* 批量更新修改的项,并更新后台返回的数据,然后重新计算分组和排序
|
|
27659
|
+
* @author lxm
|
|
27660
|
+
* @date 2023-09-11 04:13:15
|
|
27661
|
+
* @param {ControlVO[]} changedItems
|
|
27662
|
+
* @return {*} {Promise<void>}
|
|
27663
|
+
*/
|
|
27664
|
+
async updateChangedItems(changedItems) {
|
|
27665
|
+
try {
|
|
27666
|
+
this.state.updating = true;
|
|
27667
|
+
await Promise.all(
|
|
27668
|
+
changedItems.map(async (item) => {
|
|
27669
|
+
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
27670
|
+
const tempContext = this.context.clone();
|
|
27671
|
+
tempContext[deName] = item.srfkey;
|
|
27672
|
+
const res = await this.service.updateGroup(tempContext, item);
|
|
27673
|
+
if (res.data) {
|
|
27674
|
+
const index = this.state.items.findIndex(
|
|
27675
|
+
(x) => x.srfkey === item.srfkey
|
|
27676
|
+
);
|
|
27677
|
+
this.state.items.splice(index, 1, res.data);
|
|
27678
|
+
}
|
|
27679
|
+
})
|
|
27680
|
+
);
|
|
27681
|
+
} finally {
|
|
27682
|
+
this.state.updating = false;
|
|
27683
|
+
await this.afterLoad({}, this.state.items);
|
|
27684
|
+
}
|
|
27685
|
+
}
|
|
27686
|
+
/**
|
|
27687
|
+
* 点击新建
|
|
27688
|
+
* @author lxm
|
|
27689
|
+
* @date 2023-09-11 07:22:33
|
|
27690
|
+
* @param {MouseEvent} event
|
|
27691
|
+
* @param {(string | number)} group 分组标识
|
|
27692
|
+
*/
|
|
27693
|
+
onClickNew(event, group) {
|
|
27694
|
+
const params = { ...this.params, srfgroup: group };
|
|
27695
|
+
UIActionUtil.execAndResolved("new", {
|
|
27696
|
+
context: this.context,
|
|
27697
|
+
params,
|
|
27698
|
+
data: [],
|
|
27699
|
+
view: this.view,
|
|
27700
|
+
event
|
|
27701
|
+
});
|
|
27702
|
+
}
|
|
27703
|
+
/**
|
|
27704
|
+
* 分组工具栏点击处理回调
|
|
27705
|
+
* @author lxm
|
|
27706
|
+
* @date 2023-09-11 04:48:06
|
|
27707
|
+
* @param {IUIActionGroupDetail} detail
|
|
27708
|
+
* @param {MouseEvent} event
|
|
27709
|
+
* @return {*} {Promise<void>}
|
|
27710
|
+
*/
|
|
27711
|
+
async onGroupToolbarClick(detail, event, group) {
|
|
27712
|
+
const actionId = detail.uiactionId;
|
|
27713
|
+
const params = { ...this.params, srfgroup: group };
|
|
27714
|
+
await UIActionUtil.execAndResolved(actionId, {
|
|
27715
|
+
context: this.context,
|
|
27716
|
+
params,
|
|
27717
|
+
data: this.state.selectedData,
|
|
27718
|
+
view: this.view,
|
|
27719
|
+
event
|
|
27720
|
+
});
|
|
27721
|
+
}
|
|
27722
|
+
};
|
|
27723
|
+
|
|
27022
27724
|
// src/controller/hub.controller.ts
|
|
27023
27725
|
var HubController = class {
|
|
27024
27726
|
constructor() {
|
|
@@ -27234,7 +27936,7 @@ var AppHub = class {
|
|
|
27234
27936
|
this.registerAppView(appView);
|
|
27235
27937
|
return appView;
|
|
27236
27938
|
}
|
|
27237
|
-
throw new
|
|
27939
|
+
throw new RuntimeError46("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
27238
27940
|
}
|
|
27239
27941
|
/**
|
|
27240
27942
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -27265,7 +27967,7 @@ var AppHub = class {
|
|
|
27265
27967
|
this.registerAppDataEntity(entity, appId);
|
|
27266
27968
|
return entity;
|
|
27267
27969
|
}
|
|
27268
|
-
throw new
|
|
27970
|
+
throw new RuntimeError46("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
27269
27971
|
}
|
|
27270
27972
|
/**
|
|
27271
27973
|
* 新建 hub 应用
|
|
@@ -27286,7 +27988,7 @@ var AppHub = class {
|
|
|
27286
27988
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
27287
27989
|
this.registerApp(appModel);
|
|
27288
27990
|
} else {
|
|
27289
|
-
throw new
|
|
27991
|
+
throw new RuntimeError46("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
27290
27992
|
}
|
|
27291
27993
|
const app = new Application(appModel);
|
|
27292
27994
|
this.appMap.set(id, app);
|
|
@@ -27377,7 +28079,7 @@ var EngineFactory = class {
|
|
|
27377
28079
|
};
|
|
27378
28080
|
|
|
27379
28081
|
// src/engine/view-base.engine.ts
|
|
27380
|
-
import { RuntimeError as
|
|
28082
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
27381
28083
|
var ViewEngineBase = class {
|
|
27382
28084
|
/**
|
|
27383
28085
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -27472,7 +28174,7 @@ var ViewEngineBase = class {
|
|
|
27472
28174
|
async onDestroyed() {
|
|
27473
28175
|
}
|
|
27474
28176
|
async call(key, _args) {
|
|
27475
|
-
if (key === "GetData") {
|
|
28177
|
+
if (key === "GetData" /* GET_DATA */) {
|
|
27476
28178
|
return this.getData();
|
|
27477
28179
|
}
|
|
27478
28180
|
return void 0;
|
|
@@ -27565,7 +28267,7 @@ var ViewEngineBase = class {
|
|
|
27565
28267
|
const { appDataEntityId } = this.view.model;
|
|
27566
28268
|
const { evt, context, params } = this.view;
|
|
27567
28269
|
if (!appDataEntityId) {
|
|
27568
|
-
throw new
|
|
28270
|
+
throw new RuntimeError47("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
27569
28271
|
}
|
|
27570
28272
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
27571
28273
|
const res = await app.deService.exec(
|
|
@@ -27586,7 +28288,7 @@ var ViewEngineBase = class {
|
|
|
27586
28288
|
};
|
|
27587
28289
|
|
|
27588
28290
|
// src/engine/md-view.engine.ts
|
|
27589
|
-
import { RuntimeModelError as
|
|
28291
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
27590
28292
|
var MDViewEngine = class extends ViewEngineBase {
|
|
27591
28293
|
/**
|
|
27592
28294
|
* 多数据部件名称
|
|
@@ -27721,7 +28423,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27721
28423
|
this.copy(args);
|
|
27722
28424
|
return null;
|
|
27723
28425
|
}
|
|
27724
|
-
if (key === "
|
|
28426
|
+
if (key === "Load" /* LOAD */) {
|
|
27725
28427
|
this.load(args);
|
|
27726
28428
|
return null;
|
|
27727
28429
|
}
|
|
@@ -27775,7 +28477,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27775
28477
|
(item) => item.id === "newdata"
|
|
27776
28478
|
);
|
|
27777
28479
|
if (!openAppViewLogic) {
|
|
27778
|
-
throw new
|
|
28480
|
+
throw new RuntimeModelError54(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27779
28481
|
}
|
|
27780
28482
|
const context = this.view.context.clone();
|
|
27781
28483
|
if (copyMode) {
|
|
@@ -27791,7 +28493,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27791
28493
|
if (result instanceof Object && result.ok) {
|
|
27792
28494
|
this.refresh();
|
|
27793
28495
|
} else if (result === -1) {
|
|
27794
|
-
throw new
|
|
28496
|
+
throw new RuntimeModelError54(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27795
28497
|
}
|
|
27796
28498
|
}
|
|
27797
28499
|
/**
|
|
@@ -27952,10 +28654,36 @@ var GlobalUtil = class {
|
|
|
27952
28654
|
*/
|
|
27953
28655
|
this.hbs = new HandlebarsUtil();
|
|
27954
28656
|
}
|
|
28657
|
+
/**
|
|
28658
|
+
* 显示应用级别的加载提示
|
|
28659
|
+
*
|
|
28660
|
+
* @author chitanda
|
|
28661
|
+
* @date 2023-09-08 10:09:43
|
|
28662
|
+
*/
|
|
28663
|
+
showAppLoading() {
|
|
28664
|
+
const el = document.getElementById("app-loading-x");
|
|
28665
|
+
if (el) {
|
|
28666
|
+
el.style.display = "none";
|
|
28667
|
+
}
|
|
28668
|
+
}
|
|
28669
|
+
/**
|
|
28670
|
+
* 隐藏应用级别的加载提示
|
|
28671
|
+
*
|
|
28672
|
+
* @author chitanda
|
|
28673
|
+
* @date 2023-09-08 10:09:15
|
|
28674
|
+
*/
|
|
28675
|
+
hiddenAppLoading() {
|
|
28676
|
+
setTimeout(() => {
|
|
28677
|
+
const el = document.getElementById("app-loading-x");
|
|
28678
|
+
if (el) {
|
|
28679
|
+
el.style.display = "none";
|
|
28680
|
+
}
|
|
28681
|
+
}, 300);
|
|
28682
|
+
}
|
|
27955
28683
|
};
|
|
27956
28684
|
|
|
27957
28685
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
27958
|
-
import { RuntimeError as
|
|
28686
|
+
import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
|
|
27959
28687
|
var LogicExecutor = class {
|
|
27960
28688
|
/**
|
|
27961
28689
|
* @author lxm
|
|
@@ -27976,7 +28704,7 @@ var LogicExecutor = class {
|
|
|
27976
28704
|
*/
|
|
27977
28705
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27978
28706
|
execute(_executeParams) {
|
|
27979
|
-
throw new
|
|
28707
|
+
throw new RuntimeError48("Method not implemented.");
|
|
27980
28708
|
}
|
|
27981
28709
|
/**
|
|
27982
28710
|
* 销毁方法
|
|
@@ -28067,13 +28795,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
28067
28795
|
};
|
|
28068
28796
|
|
|
28069
28797
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
28070
|
-
import { RuntimeModelError as
|
|
28798
|
+
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
28071
28799
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
28072
28800
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28073
28801
|
execute(executeParams) {
|
|
28074
28802
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
28075
28803
|
if (!appDEUILogicId) {
|
|
28076
|
-
throw new
|
|
28804
|
+
throw new RuntimeModelError55(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
28077
28805
|
}
|
|
28078
28806
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
28079
28807
|
}
|
|
@@ -28408,7 +29136,7 @@ var LogicSchedulerCenter = class {
|
|
|
28408
29136
|
};
|
|
28409
29137
|
|
|
28410
29138
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
28411
|
-
import { RuntimeError as
|
|
29139
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
28412
29140
|
var LogicTrigger = class {
|
|
28413
29141
|
/**
|
|
28414
29142
|
* @author lxm
|
|
@@ -28468,7 +29196,7 @@ var LogicTrigger = class {
|
|
|
28468
29196
|
if (this.executor) {
|
|
28469
29197
|
return this.executor.execute(executeParams);
|
|
28470
29198
|
}
|
|
28471
|
-
throw new
|
|
29199
|
+
throw new RuntimeError49("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
28472
29200
|
}
|
|
28473
29201
|
/**
|
|
28474
29202
|
* 销毁方法
|
|
@@ -28485,12 +29213,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
28485
29213
|
};
|
|
28486
29214
|
|
|
28487
29215
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
28488
|
-
import { RuntimeError as
|
|
29216
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
28489
29217
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
28490
29218
|
bindExecutor(executor) {
|
|
28491
29219
|
super.bindExecutor(executor);
|
|
28492
29220
|
if (this.executor.type !== "SCRIPT") {
|
|
28493
|
-
throw new
|
|
29221
|
+
throw new RuntimeError50(
|
|
28494
29222
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
28495
29223
|
);
|
|
28496
29224
|
}
|
|
@@ -28522,12 +29250,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
28522
29250
|
if (typeof result === "boolean") {
|
|
28523
29251
|
return result;
|
|
28524
29252
|
}
|
|
28525
|
-
throw new
|
|
29253
|
+
throw new RuntimeError50("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
28526
29254
|
}
|
|
28527
29255
|
};
|
|
28528
29256
|
|
|
28529
29257
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
28530
|
-
import { RuntimeError as
|
|
29258
|
+
import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
|
|
28531
29259
|
var TimerTrigger = class extends LogicTrigger {
|
|
28532
29260
|
constructor() {
|
|
28533
29261
|
super(...arguments);
|
|
@@ -28536,7 +29264,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28536
29264
|
start() {
|
|
28537
29265
|
this.timer = setInterval(() => {
|
|
28538
29266
|
if (!this.scheduler.defaultParamsCb) {
|
|
28539
|
-
throw new
|
|
29267
|
+
throw new RuntimeError51("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
28540
29268
|
}
|
|
28541
29269
|
const params = this.scheduler.defaultParamsCb();
|
|
28542
29270
|
this.executor.execute(params);
|
|
@@ -28553,10 +29281,10 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28553
29281
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
28554
29282
|
import {
|
|
28555
29283
|
ModelError as ModelError30,
|
|
28556
|
-
RuntimeError as
|
|
28557
|
-
RuntimeModelError as
|
|
29284
|
+
RuntimeError as RuntimeError52,
|
|
29285
|
+
RuntimeModelError as RuntimeModelError56
|
|
28558
29286
|
} from "@ibiz-template/core";
|
|
28559
|
-
import { notNilEmpty as
|
|
29287
|
+
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
28560
29288
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
28561
29289
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28562
29290
|
execute(executeParams) {
|
|
@@ -28589,7 +29317,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28589
29317
|
const { context, params, ...rest } = parameters;
|
|
28590
29318
|
const { data } = parameters;
|
|
28591
29319
|
if (!(data == null ? void 0 : data[0])) {
|
|
28592
|
-
throw new
|
|
29320
|
+
throw new RuntimeError52("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
28593
29321
|
}
|
|
28594
29322
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28595
29323
|
let openViewRef;
|
|
@@ -28598,7 +29326,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28598
29326
|
} else {
|
|
28599
29327
|
openViewRef = appUILogic.openDataAppView;
|
|
28600
29328
|
if (!openViewRef) {
|
|
28601
|
-
throw new
|
|
29329
|
+
throw new RuntimeModelError56(
|
|
28602
29330
|
appUILogic,
|
|
28603
29331
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
28604
29332
|
);
|
|
@@ -28606,7 +29334,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28606
29334
|
}
|
|
28607
29335
|
const openView = openViewRef.refAppViewId;
|
|
28608
29336
|
if (!openView) {
|
|
28609
|
-
throw new
|
|
29337
|
+
throw new RuntimeModelError56(
|
|
28610
29338
|
appUILogic,
|
|
28611
29339
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
28612
29340
|
);
|
|
@@ -28618,7 +29346,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28618
29346
|
);
|
|
28619
29347
|
let tempParams = {};
|
|
28620
29348
|
const navParams = openViewRef.navigateParams;
|
|
28621
|
-
if (
|
|
29349
|
+
if (notNilEmpty8(navParams)) {
|
|
28622
29350
|
tempParams = convertNavData(navParams, params, context, data[0]);
|
|
28623
29351
|
}
|
|
28624
29352
|
return ibiz.commands.execute(
|
|
@@ -28658,7 +29386,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28658
29386
|
} else {
|
|
28659
29387
|
newViewRef = newDataAppView;
|
|
28660
29388
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
28661
|
-
throw new
|
|
29389
|
+
throw new RuntimeModelError56(
|
|
28662
29390
|
appUILogic,
|
|
28663
29391
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
28664
29392
|
);
|
|
@@ -28668,12 +29396,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28668
29396
|
let tempParams = {};
|
|
28669
29397
|
const _data = (data == null ? void 0 : data[0]) || {};
|
|
28670
29398
|
const navContexts = newViewRef.navigateContexts;
|
|
28671
|
-
if (
|
|
29399
|
+
if (notNilEmpty8(navContexts)) {
|
|
28672
29400
|
tempContext = convertNavData(navContexts, context, params, _data);
|
|
28673
29401
|
}
|
|
28674
29402
|
tempContext = Object.assign(context, tempContext);
|
|
28675
29403
|
const navParams = newViewRef.navigateParams;
|
|
28676
|
-
if (
|
|
29404
|
+
if (notNilEmpty8(navParams)) {
|
|
28677
29405
|
tempParams = convertNavData(navParams, params, context, _data);
|
|
28678
29406
|
}
|
|
28679
29407
|
if (context.srfcopymode) {
|
|
@@ -28704,7 +29432,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28704
29432
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
28705
29433
|
const { context, params, ...rest } = parameters;
|
|
28706
29434
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
28707
|
-
throw new
|
|
29435
|
+
throw new RuntimeModelError56(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
28708
29436
|
}
|
|
28709
29437
|
const result = await ibiz.commands.execute(
|
|
28710
29438
|
OpenAppViewCommand.TAG,
|
|
@@ -28718,12 +29446,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28718
29446
|
}
|
|
28719
29447
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
28720
29448
|
if (!selectData) {
|
|
28721
|
-
throw new
|
|
29449
|
+
throw new RuntimeError52("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
28722
29450
|
}
|
|
28723
29451
|
const indexType = selectData.srfkey;
|
|
28724
29452
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
28725
29453
|
if (!findView) {
|
|
28726
|
-
throw new
|
|
29454
|
+
throw new RuntimeError52(
|
|
28727
29455
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28728
29456
|
);
|
|
28729
29457
|
}
|
|
@@ -28733,7 +29461,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28733
29461
|
const appDataEntityId = parameters.view.model.appDataEntityId;
|
|
28734
29462
|
const formTypeName = await getFormTypeFieldName(appDataEntityId);
|
|
28735
29463
|
if (!formTypeName) {
|
|
28736
|
-
throw new
|
|
29464
|
+
throw new RuntimeModelError56(
|
|
28737
29465
|
appUILogic,
|
|
28738
29466
|
"".concat(appDataEntityId, "\u5B9E\u4F53\u7F3A\u5C11\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027")
|
|
28739
29467
|
);
|
|
@@ -28741,12 +29469,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28741
29469
|
const { data } = parameters;
|
|
28742
29470
|
const formTypeValue = data[0][formTypeName];
|
|
28743
29471
|
if (!formTypeValue) {
|
|
28744
|
-
throw new
|
|
29472
|
+
throw new RuntimeModelError56(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
28745
29473
|
}
|
|
28746
29474
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28747
29475
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
28748
29476
|
if (!findView) {
|
|
28749
|
-
throw new
|
|
29477
|
+
throw new RuntimeError52(
|
|
28750
29478
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28751
29479
|
);
|
|
28752
29480
|
}
|
|
@@ -29050,6 +29778,8 @@ export {
|
|
|
29050
29778
|
GridUAColumnController,
|
|
29051
29779
|
HandlebarsUtil,
|
|
29052
29780
|
HubController,
|
|
29781
|
+
KanbanController,
|
|
29782
|
+
KanbanService,
|
|
29053
29783
|
LayoutPanelUtil,
|
|
29054
29784
|
ListController,
|
|
29055
29785
|
ListService,
|
|
@@ -29107,6 +29837,7 @@ export {
|
|
|
29107
29837
|
V7AuthService,
|
|
29108
29838
|
VIEW_PROVIDER_PREFIX,
|
|
29109
29839
|
ValueExUtil,
|
|
29840
|
+
ViewCallTag,
|
|
29110
29841
|
ViewController,
|
|
29111
29842
|
ViewEngineBase,
|
|
29112
29843
|
ViewLayoutPanelController,
|