@ibiz-template/runtime 0.1.21 → 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 +902 -204
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/constant/view-call-tag.d.ts +9 -1
- package/out/constant/view-call-tag.d.ts.map +1 -1
- package/out/constant/view-call-tag.js +8 -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/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +2 -1
- 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 +1 -2
- 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/view-call-tag.ts +8 -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/view-base.engine.ts +2 -1
- 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 +1 -2
- 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(
|
|
@@ -8374,6 +8374,8 @@ var SysUIActionTag = /* @__PURE__ */ ((SysUIActionTag2) => {
|
|
|
8374
8374
|
// src/constant/view-call-tag.ts
|
|
8375
8375
|
var ViewCallTag = /* @__PURE__ */ ((ViewCallTag2) => {
|
|
8376
8376
|
ViewCallTag2["LOAD"] = "Load";
|
|
8377
|
+
ViewCallTag2["GET_DATA"] = "GetData";
|
|
8378
|
+
ViewCallTag2["GET_ALL_DATA"] = "GetAllData";
|
|
8377
8379
|
return ViewCallTag2;
|
|
8378
8380
|
})(ViewCallTag || {});
|
|
8379
8381
|
|
|
@@ -11118,7 +11120,7 @@ import {
|
|
|
11118
11120
|
|
|
11119
11121
|
// src/service/service/entity/method/method.ts
|
|
11120
11122
|
import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
11121
|
-
import { notNilEmpty as
|
|
11123
|
+
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
11122
11124
|
|
|
11123
11125
|
// src/service/app-data-entity/app-data-entity.ts
|
|
11124
11126
|
import { clone as clone4 } from "ramda";
|
|
@@ -11290,7 +11292,6 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
11290
11292
|
|
|
11291
11293
|
// src/service/dto/method.dto.ts
|
|
11292
11294
|
import { ModelError as ModelError7 } from "@ibiz-template/core";
|
|
11293
|
-
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
11294
11295
|
var MethodDto = class _MethodDto {
|
|
11295
11296
|
constructor(entity, isLocalMode2, dto) {
|
|
11296
11297
|
this.entity = entity;
|
|
@@ -11323,7 +11324,7 @@ var MethodDto = class _MethodDto {
|
|
|
11323
11324
|
break;
|
|
11324
11325
|
}
|
|
11325
11326
|
case "DTOS": {
|
|
11326
|
-
if (
|
|
11327
|
+
if (data[key] !== void 0) {
|
|
11327
11328
|
break;
|
|
11328
11329
|
}
|
|
11329
11330
|
if (!field.refAppDataEntityId) {
|
|
@@ -11551,18 +11552,20 @@ var Method = class {
|
|
|
11551
11552
|
case "POST":
|
|
11552
11553
|
res = await this.app.net.post(
|
|
11553
11554
|
"".concat(path2, "/").concat(methodName),
|
|
11554
|
-
|
|
11555
|
+
notNilEmpty5(data) ? data : params
|
|
11555
11556
|
);
|
|
11556
11557
|
break;
|
|
11557
11558
|
case "GET":
|
|
11558
11559
|
res = await this.app.net.get("".concat(path2, "/").concat(methodName), data);
|
|
11559
11560
|
break;
|
|
11560
|
-
case "PUT":
|
|
11561
|
+
case "PUT": {
|
|
11561
11562
|
res = await this.app.net.put(
|
|
11562
11563
|
"".concat(path2, "/").concat(methodName),
|
|
11563
|
-
|
|
11564
|
+
notNilEmpty5(data) ? data : params
|
|
11564
11565
|
);
|
|
11566
|
+
const entity = this.createEntity(data);
|
|
11565
11567
|
break;
|
|
11568
|
+
}
|
|
11566
11569
|
case "DELETE":
|
|
11567
11570
|
res = await this.app.net.delete("".concat(path2, "/").concat(methodName), data);
|
|
11568
11571
|
break;
|
|
@@ -12039,10 +12042,14 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
12039
12042
|
return void 0;
|
|
12040
12043
|
case "SRCVALUE":
|
|
12041
12044
|
return srcValue;
|
|
12045
|
+
case "WEBCONTEXT":
|
|
12042
12046
|
case "VIEWPARAM":
|
|
12043
12047
|
value = ctx.viewParams;
|
|
12044
12048
|
break;
|
|
12049
|
+
case "APPLICATION":
|
|
12050
|
+
case "SESSION":
|
|
12045
12051
|
case "APPDATA":
|
|
12052
|
+
case "DATACONTEXT":
|
|
12046
12053
|
value = ctx.context;
|
|
12047
12054
|
break;
|
|
12048
12055
|
case "ENVPARAM":
|
|
@@ -13189,6 +13196,7 @@ var DEService = class {
|
|
|
13189
13196
|
};
|
|
13190
13197
|
|
|
13191
13198
|
// src/service/vo/control.vo.ts
|
|
13199
|
+
import { DataTypes } from "@ibiz-template/core";
|
|
13192
13200
|
import { clone as clone10, isNil as isNil8 } from "ramda";
|
|
13193
13201
|
var ControlVO = class _ControlVO {
|
|
13194
13202
|
/**
|
|
@@ -13284,7 +13292,8 @@ var ControlVO = class _ControlVO {
|
|
|
13284
13292
|
});
|
|
13285
13293
|
this.$dataUIMap.forEach((mapField, key) => {
|
|
13286
13294
|
const value = mapField.dataKey;
|
|
13287
|
-
|
|
13295
|
+
const forceNumber = mapField.dataType !== void 0 && DataTypes.isNumber(mapField.dataType);
|
|
13296
|
+
this.linkProperty(key, value, mapField.isOriginField, forceNumber);
|
|
13288
13297
|
});
|
|
13289
13298
|
Object.keys($origin).forEach((value) => {
|
|
13290
13299
|
if (!Object.prototype.hasOwnProperty.call(this, value)) {
|
|
@@ -13301,10 +13310,11 @@ var ControlVO = class _ControlVO {
|
|
|
13301
13310
|
* @param {string} uiKey 界面字段
|
|
13302
13311
|
* @param {string} dataKey 数据字段
|
|
13303
13312
|
* @param {boolean} [isOriginField=true] 是否是后台存储字段,是的话存取都在$origin里
|
|
13313
|
+
* @param {boolean} [forceNumber=false] 是否强制转换成数值,是的话set的时候转成数值
|
|
13304
13314
|
* @returns {*}
|
|
13305
13315
|
*/
|
|
13306
|
-
linkProperty(uiKey, dataKey, isOriginField = true) {
|
|
13307
|
-
if (uiKey === "srfuf"
|
|
13316
|
+
linkProperty(uiKey, dataKey, isOriginField = true, forceNumber = false) {
|
|
13317
|
+
if (uiKey === "srfuf") {
|
|
13308
13318
|
return;
|
|
13309
13319
|
}
|
|
13310
13320
|
if (isOriginField || Object.prototype.hasOwnProperty.call(this.$origin, uiKey)) {
|
|
@@ -13312,10 +13322,15 @@ var ControlVO = class _ControlVO {
|
|
|
13312
13322
|
enumerable: true,
|
|
13313
13323
|
configurable: true,
|
|
13314
13324
|
get() {
|
|
13315
|
-
return this.$origin[dataKey];
|
|
13325
|
+
return uiKey === "srfkey" ? this.$origin[dataKey] || this.$origin[uiKey] : this.$origin[dataKey];
|
|
13316
13326
|
},
|
|
13317
13327
|
set(val) {
|
|
13318
|
-
|
|
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;
|
|
13319
13334
|
}
|
|
13320
13335
|
});
|
|
13321
13336
|
} else {
|
|
@@ -14020,6 +14035,9 @@ var UIMapField = class {
|
|
|
14020
14035
|
if (!isNil9(opts.isOriginField)) {
|
|
14021
14036
|
this.isOriginField = opts.isOriginField;
|
|
14022
14037
|
}
|
|
14038
|
+
if (!isNil9(opts.dataType)) {
|
|
14039
|
+
this.dataType = opts.dataType;
|
|
14040
|
+
}
|
|
14023
14041
|
}
|
|
14024
14042
|
};
|
|
14025
14043
|
|
|
@@ -14188,7 +14206,7 @@ var DEServiceUtil = class {
|
|
|
14188
14206
|
};
|
|
14189
14207
|
|
|
14190
14208
|
// src/app-hub.ts
|
|
14191
|
-
import { RuntimeError as
|
|
14209
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
14192
14210
|
|
|
14193
14211
|
// src/application.ts
|
|
14194
14212
|
import { Net } from "@ibiz-template/core";
|
|
@@ -14430,7 +14448,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
14430
14448
|
})(PanelNotifyState || {});
|
|
14431
14449
|
|
|
14432
14450
|
// src/controller/common/view/view.controller.ts
|
|
14433
|
-
import { createUUID as createUUID2, notNilEmpty as
|
|
14451
|
+
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
14434
14452
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
14435
14453
|
import { isEmpty as isEmpty8, isNil as isNil12, isNotNil as isNotNil2 } from "ramda";
|
|
14436
14454
|
|
|
@@ -14586,6 +14604,14 @@ var CTX = class {
|
|
|
14586
14604
|
*/
|
|
14587
14605
|
constructor(parent) {
|
|
14588
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;
|
|
14589
14615
|
/**
|
|
14590
14616
|
* CTX事件
|
|
14591
14617
|
* @author lxm
|
|
@@ -14622,6 +14648,7 @@ var CTX = class {
|
|
|
14622
14648
|
this.controllersMap.clear();
|
|
14623
14649
|
this.view = null;
|
|
14624
14650
|
this.state = null;
|
|
14651
|
+
this.isDestroyed = true;
|
|
14625
14652
|
}
|
|
14626
14653
|
/**
|
|
14627
14654
|
* 修改上下文环境状态
|
|
@@ -14647,6 +14674,9 @@ var CTX = class {
|
|
|
14647
14674
|
* @date 2023-03-27 01:59:35
|
|
14648
14675
|
*/
|
|
14649
14676
|
endLoading() {
|
|
14677
|
+
if (this.isDestroyed) {
|
|
14678
|
+
return;
|
|
14679
|
+
}
|
|
14650
14680
|
this.view.endLoading();
|
|
14651
14681
|
}
|
|
14652
14682
|
/**
|
|
@@ -15559,13 +15589,13 @@ var ViewController = class extends BaseController {
|
|
|
15559
15589
|
}
|
|
15560
15590
|
const navContexts = this.model.appViewNavContexts;
|
|
15561
15591
|
let context = {};
|
|
15562
|
-
if (
|
|
15592
|
+
if (notNilEmpty6(navContexts)) {
|
|
15563
15593
|
context = convertNavData(navContexts, this.context, this.params);
|
|
15564
15594
|
}
|
|
15565
15595
|
Object.assign(this.context, context);
|
|
15566
15596
|
const navParams = this.model.appViewNavParams;
|
|
15567
15597
|
let params = {};
|
|
15568
|
-
if (
|
|
15598
|
+
if (notNilEmpty6(navParams)) {
|
|
15569
15599
|
params = convertNavData(navParams, this.context, this.params);
|
|
15570
15600
|
}
|
|
15571
15601
|
Object.assign(this.params, params);
|
|
@@ -17824,17 +17854,17 @@ var CaptionBarController = class extends ControlController {
|
|
|
17824
17854
|
import { recursiveIterate } from "@ibiz-template/core";
|
|
17825
17855
|
|
|
17826
17856
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
17827
|
-
import { RuntimeModelError as
|
|
17857
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
17828
17858
|
import { isArray as isArray3 } from "qx-util";
|
|
17829
17859
|
|
|
17830
17860
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
17831
|
-
import { RuntimeModelError as
|
|
17861
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
17832
17862
|
|
|
17833
17863
|
// src/ui-logic/index.ts
|
|
17834
|
-
import { RuntimeError as
|
|
17864
|
+
import { RuntimeError as RuntimeError33 } from "@ibiz-template/core";
|
|
17835
17865
|
|
|
17836
17866
|
// src/ui-logic/ui-logic.ts
|
|
17837
|
-
import { ModelError as ModelError23, RuntimeModelError as
|
|
17867
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
17838
17868
|
|
|
17839
17869
|
// src/ui-logic/ui-logic-context.ts
|
|
17840
17870
|
var UILogicContext = class {
|
|
@@ -17979,7 +18009,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
17979
18009
|
this.dstParam = model.dstLogicParamId;
|
|
17980
18010
|
}
|
|
17981
18011
|
get dstField() {
|
|
17982
|
-
return this.model.dstFieldName
|
|
18012
|
+
return this.model.dstFieldName;
|
|
17983
18013
|
}
|
|
17984
18014
|
get op() {
|
|
17985
18015
|
return this.model.condOP;
|
|
@@ -18287,6 +18317,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18287
18317
|
|
|
18288
18318
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
18289
18319
|
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
18320
|
+
import { clone as clone13 } from "ramda";
|
|
18290
18321
|
|
|
18291
18322
|
// src/ui-logic/utils/handle-src-val.ts
|
|
18292
18323
|
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
@@ -18305,10 +18336,14 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18305
18336
|
return void 0;
|
|
18306
18337
|
case "SRCVALUE":
|
|
18307
18338
|
return srcValue;
|
|
18339
|
+
case "WEBCONTEXT":
|
|
18308
18340
|
case "VIEWPARAM":
|
|
18309
18341
|
value = ctx.viewParams;
|
|
18310
18342
|
break;
|
|
18343
|
+
case "APPLICATION":
|
|
18344
|
+
case "SESSION":
|
|
18311
18345
|
case "APPDATA":
|
|
18346
|
+
case "DATACONTEXT":
|
|
18312
18347
|
value = ctx.context;
|
|
18313
18348
|
break;
|
|
18314
18349
|
case "ENVPARAM":
|
|
@@ -18317,7 +18352,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18317
18352
|
default:
|
|
18318
18353
|
throw new ModelError19(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
18319
18354
|
}
|
|
18320
|
-
const srcField = srcFieldName
|
|
18355
|
+
const srcField = srcFieldName;
|
|
18321
18356
|
if (value && srcField) {
|
|
18322
18357
|
value = value[srcField];
|
|
18323
18358
|
}
|
|
@@ -18328,20 +18363,38 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18328
18363
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
18329
18364
|
async exec(ctx) {
|
|
18330
18365
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
18331
|
-
if (nodeParams == null ? void 0 : nodeParams.length) {
|
|
18332
|
-
|
|
18333
|
-
|
|
18334
|
-
|
|
18335
|
-
|
|
18336
|
-
|
|
18337
|
-
|
|
18338
|
-
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
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
|
+
}
|
|
18345
18398
|
}
|
|
18346
18399
|
}
|
|
18347
18400
|
/**
|
|
@@ -18350,11 +18403,11 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18350
18403
|
* @date 2023-03-17 03:34:02
|
|
18351
18404
|
* @protected
|
|
18352
18405
|
* @param {IPSDELogicNodeParam} nodeParam
|
|
18353
|
-
* @param {
|
|
18406
|
+
* @param {UILogicContext} ctx
|
|
18354
18407
|
*/
|
|
18355
18408
|
setParamValue(nodeParam, ctx) {
|
|
18356
18409
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
18357
|
-
const dstField = dstFieldName
|
|
18410
|
+
const dstField = dstFieldName;
|
|
18358
18411
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18359
18412
|
if (dstField) {
|
|
18360
18413
|
ctx.params[dstDEUILogicParamId][dstField] = srcVal;
|
|
@@ -18362,6 +18415,92 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18362
18415
|
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
18363
18416
|
}
|
|
18364
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
|
+
}
|
|
18365
18504
|
};
|
|
18366
18505
|
|
|
18367
18506
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
@@ -18491,8 +18630,190 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
18491
18630
|
}
|
|
18492
18631
|
};
|
|
18493
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
|
+
|
|
18494
18815
|
// src/ui-logic/ui-logic-param/ui-logic-param.ts
|
|
18495
|
-
import { ModelError as ModelError22
|
|
18816
|
+
import { ModelError as ModelError22 } from "@ibiz-template/core";
|
|
18496
18817
|
var UILogicParam = class {
|
|
18497
18818
|
/**
|
|
18498
18819
|
* Creates an instance of UILogicParam.
|
|
@@ -18527,10 +18848,7 @@ var UILogicParam = class {
|
|
|
18527
18848
|
if (control) {
|
|
18528
18849
|
ctx.params[tag] = control;
|
|
18529
18850
|
} else {
|
|
18530
|
-
|
|
18531
|
-
this.model,
|
|
18532
|
-
"\u89C6\u56FE\u903B\u8F91\u521D\u59CB\u5316\u53C2\u6570\uFF0C\u672A\u627E\u5230".concat(m.codeName, "\u6307\u5B9A\u90E8\u4EF6\u5BF9\u8C61")
|
|
18533
|
-
);
|
|
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"));
|
|
18534
18852
|
}
|
|
18535
18853
|
} else if (m.activeViewParam) {
|
|
18536
18854
|
ctx.params[tag] = parameters.view;
|
|
@@ -18611,7 +18929,7 @@ var UILogic = class {
|
|
|
18611
18929
|
this.params = /* @__PURE__ */ new Map();
|
|
18612
18930
|
var _a;
|
|
18613
18931
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
18614
|
-
throw new
|
|
18932
|
+
throw new RuntimeModelError42(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
18615
18933
|
}
|
|
18616
18934
|
model.deuilogicNodes.forEach((node) => {
|
|
18617
18935
|
const { logicNodeType } = node;
|
|
@@ -18632,6 +18950,12 @@ var UILogic = class {
|
|
|
18632
18950
|
case "PREPAREJSPARAM":
|
|
18633
18951
|
logicNode = new PrepareJSParamNode(node);
|
|
18634
18952
|
break;
|
|
18953
|
+
case "RESETPARAM":
|
|
18954
|
+
logicNode = new ResetParamNode2(node);
|
|
18955
|
+
break;
|
|
18956
|
+
case "COPYPARAM":
|
|
18957
|
+
logicNode = new CopyParamNode2(node);
|
|
18958
|
+
break;
|
|
18635
18959
|
case "BINDPARAM":
|
|
18636
18960
|
logicNode = new BindParamNode2(node);
|
|
18637
18961
|
break;
|
|
@@ -18644,16 +18968,28 @@ var UILogic = class {
|
|
|
18644
18968
|
case "DEBUGPARAM":
|
|
18645
18969
|
logicNode = new DebugParamNode(node);
|
|
18646
18970
|
break;
|
|
18647
|
-
case "RESETPARAM":
|
|
18648
|
-
case "COPYPARAM":
|
|
18649
|
-
case "VIEWCTRLFIREEVENT":
|
|
18650
18971
|
case "APPENDPARAM":
|
|
18972
|
+
logicNode = new AppendParamNode2(node);
|
|
18973
|
+
break;
|
|
18651
18974
|
case "SORTPARAM":
|
|
18975
|
+
logicNode = new SortParamNode2(node);
|
|
18976
|
+
break;
|
|
18652
18977
|
case "RENEWPARAM":
|
|
18653
|
-
|
|
18978
|
+
logicNode = new RenewParamNode2(node);
|
|
18979
|
+
break;
|
|
18654
18980
|
case "DEDATASET":
|
|
18655
|
-
|
|
18981
|
+
logicNode = new DataSetNode2(node);
|
|
18982
|
+
break;
|
|
18656
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":
|
|
18657
18993
|
default:
|
|
18658
18994
|
throw new ModelError23(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
|
|
18659
18995
|
}
|
|
@@ -18708,7 +19044,7 @@ var UILogic = class {
|
|
|
18708
19044
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
18709
19045
|
await this.deepExec(start, ctx);
|
|
18710
19046
|
} else {
|
|
18711
|
-
throw new
|
|
19047
|
+
throw new RuntimeModelError42(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
18712
19048
|
}
|
|
18713
19049
|
if (ctx.isEndNode) {
|
|
18714
19050
|
return ctx.result;
|
|
@@ -18754,7 +19090,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18754
19090
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
18755
19091
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
18756
19092
|
if (!deUILogic) {
|
|
18757
|
-
throw new
|
|
19093
|
+
throw new RuntimeError33(
|
|
18758
19094
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
18759
19095
|
);
|
|
18760
19096
|
}
|
|
@@ -18767,7 +19103,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18767
19103
|
}
|
|
18768
19104
|
|
|
18769
19105
|
// src/ui-action/uiaction-util.ts
|
|
18770
|
-
import { RuntimeError as
|
|
19106
|
+
import { RuntimeError as RuntimeError34 } from "@ibiz-template/core";
|
|
18771
19107
|
var UIActionUtil = class {
|
|
18772
19108
|
/**
|
|
18773
19109
|
* 执行界面行为
|
|
@@ -18782,7 +19118,7 @@ var UIActionUtil = class {
|
|
|
18782
19118
|
static async exec(actionId, params) {
|
|
18783
19119
|
const action = await getUIActionById(actionId);
|
|
18784
19120
|
if (!action) {
|
|
18785
|
-
throw new
|
|
19121
|
+
throw new RuntimeError34("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
18786
19122
|
}
|
|
18787
19123
|
const provider = await getUIActionProvider(action);
|
|
18788
19124
|
return provider.exec(action, params);
|
|
@@ -18838,7 +19174,7 @@ var UIActionProviderBase = class {
|
|
|
18838
19174
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
18839
19175
|
if (uilogicAttachMode === "REPLACE") {
|
|
18840
19176
|
if (!appDEUILogicId) {
|
|
18841
|
-
throw new
|
|
19177
|
+
throw new RuntimeModelError43(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18842
19178
|
}
|
|
18843
19179
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18844
19180
|
return result;
|
|
@@ -18865,7 +19201,7 @@ var UIActionProviderBase = class {
|
|
|
18865
19201
|
}
|
|
18866
19202
|
if (action.uilogicAttachMode === "AFTER") {
|
|
18867
19203
|
if (!appDEUILogicId) {
|
|
18868
|
-
throw new
|
|
19204
|
+
throw new RuntimeModelError43(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18869
19205
|
}
|
|
18870
19206
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18871
19207
|
}
|
|
@@ -18999,7 +19335,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18999
19335
|
const entityName = action.appDataEntityId;
|
|
19000
19336
|
const methodName = action.appDEMethodId;
|
|
19001
19337
|
if (!entityName || !methodName) {
|
|
19002
|
-
throw new
|
|
19338
|
+
throw new RuntimeModelError44(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
19003
19339
|
}
|
|
19004
19340
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
19005
19341
|
action,
|
|
@@ -19111,7 +19447,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
19111
19447
|
};
|
|
19112
19448
|
|
|
19113
19449
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
19114
|
-
import { StringUtil, RuntimeModelError as
|
|
19450
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError45, ModelError as ModelError24 } from "@ibiz-template/core";
|
|
19115
19451
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
19116
19452
|
async execAction(action, args) {
|
|
19117
19453
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -19126,7 +19462,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19126
19462
|
case "WIZARD": {
|
|
19127
19463
|
const frontPSAppView = action.frontAppViewId;
|
|
19128
19464
|
if (!frontPSAppView) {
|
|
19129
|
-
throw new
|
|
19465
|
+
throw new RuntimeModelError45(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
19130
19466
|
}
|
|
19131
19467
|
const { resultContext, resultParams } = await this.handleParams(
|
|
19132
19468
|
action,
|
|
@@ -19182,7 +19518,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19182
19518
|
);
|
|
19183
19519
|
return result || {};
|
|
19184
19520
|
}
|
|
19185
|
-
throw new
|
|
19521
|
+
throw new RuntimeModelError45(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
19186
19522
|
}
|
|
19187
19523
|
};
|
|
19188
19524
|
|
|
@@ -19247,7 +19583,7 @@ var ToolbarController = class extends ControlController {
|
|
|
19247
19583
|
async doUIAction(item, event, param = {}) {
|
|
19248
19584
|
if (item.itemType === "DEUIACTION") {
|
|
19249
19585
|
const actionId = item.uiactionId;
|
|
19250
|
-
const res = await this.ctx.view.call("GetData");
|
|
19586
|
+
const res = await this.ctx.view.call("GetData" /* GET_DATA */);
|
|
19251
19587
|
const data = res || [];
|
|
19252
19588
|
const args = this.getEventArgs();
|
|
19253
19589
|
args.params = Object.assign(param, args.params);
|
|
@@ -19665,7 +20001,8 @@ var ViewPortletController = class extends PortletPartController {
|
|
|
19665
20001
|
};
|
|
19666
20002
|
|
|
19667
20003
|
// src/controller/control/data-view/data-view.controller.ts
|
|
19668
|
-
import { RuntimeModelError as
|
|
20004
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
20005
|
+
import { isNil as isNil15 } from "ramda";
|
|
19669
20006
|
|
|
19670
20007
|
// src/controller/control/data-view/data-view.service.ts
|
|
19671
20008
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -19684,7 +20021,8 @@ var DataViewControlService = class extends MDControlService {
|
|
|
19684
20021
|
if (deField) {
|
|
19685
20022
|
const deFieldKey = deField.toLowerCase();
|
|
19686
20023
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
19687
|
-
isOriginField: true
|
|
20024
|
+
isOriginField: true,
|
|
20025
|
+
dataType: item.dataType
|
|
19688
20026
|
});
|
|
19689
20027
|
} else {
|
|
19690
20028
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -19705,6 +20043,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19705
20043
|
initState() {
|
|
19706
20044
|
super.initState();
|
|
19707
20045
|
this.state.noSort = this.model.noSort === true;
|
|
20046
|
+
this.state.size = this.model.pagingSize || 20;
|
|
19708
20047
|
}
|
|
19709
20048
|
/**
|
|
19710
20049
|
* 初始化
|
|
@@ -19715,7 +20054,16 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19715
20054
|
*/
|
|
19716
20055
|
async onCreated() {
|
|
19717
20056
|
await super.onCreated();
|
|
19718
|
-
|
|
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() {
|
|
19719
20067
|
this.service = new DataViewControlService(this.model);
|
|
19720
20068
|
await this.service.init(this.context);
|
|
19721
20069
|
}
|
|
@@ -19765,7 +20113,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19765
20113
|
const optItemModel = this.getOptItemModel();
|
|
19766
20114
|
if (optItemModel) {
|
|
19767
20115
|
if (!optItemModel.deuiactionGroup) {
|
|
19768
|
-
throw new
|
|
20116
|
+
throw new RuntimeModelError46(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
19769
20117
|
}
|
|
19770
20118
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
19771
20119
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -19811,8 +20159,11 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19811
20159
|
* @memberof DataViewControlController
|
|
19812
20160
|
*/
|
|
19813
20161
|
async handleDataGroup() {
|
|
19814
|
-
const { enableGroup, groupMode } = this.model;
|
|
20162
|
+
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
19815
20163
|
if (enableGroup && groupMode) {
|
|
20164
|
+
if (!groupAppDEFieldId) {
|
|
20165
|
+
throw new RuntimeModelError46(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
20166
|
+
}
|
|
19816
20167
|
if (groupMode === "AUTO") {
|
|
19817
20168
|
this.handleAutoGroup();
|
|
19818
20169
|
} else if (groupMode === "CODELIST") {
|
|
@@ -19829,60 +20180,81 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19829
20180
|
const { groupAppDEFieldId } = this.model;
|
|
19830
20181
|
if (groupAppDEFieldId) {
|
|
19831
20182
|
const { items } = this.state;
|
|
19832
|
-
const
|
|
20183
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
19833
20184
|
items.forEach((item) => {
|
|
19834
|
-
const
|
|
19835
|
-
|
|
19836
|
-
|
|
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);
|
|
19837
20193
|
});
|
|
19838
20194
|
const groups = [];
|
|
19839
|
-
|
|
20195
|
+
groupMap.forEach((value, key) => {
|
|
19840
20196
|
groups.push({
|
|
19841
20197
|
caption: key,
|
|
20198
|
+
key,
|
|
19842
20199
|
children: [...value]
|
|
19843
20200
|
});
|
|
19844
20201
|
});
|
|
19845
20202
|
this.state.groups = groups;
|
|
19846
20203
|
}
|
|
19847
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
|
+
}
|
|
19848
20224
|
/**
|
|
19849
20225
|
* 处理代码表分组
|
|
19850
20226
|
*
|
|
19851
20227
|
* @memberof DataViewControlController
|
|
19852
20228
|
*/
|
|
19853
20229
|
async handleCodeListGroup() {
|
|
19854
|
-
const { groupAppDEFieldId
|
|
19855
|
-
if (
|
|
19856
|
-
|
|
19857
|
-
|
|
19858
|
-
|
|
19859
|
-
|
|
19860
|
-
|
|
19861
|
-
|
|
19862
|
-
|
|
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
|
|
19863
20250
|
);
|
|
19864
|
-
|
|
19865
|
-
|
|
19866
|
-
|
|
19867
|
-
|
|
19868
|
-
);
|
|
19869
|
-
groups.push({
|
|
19870
|
-
caption: codeListItem.text,
|
|
19871
|
-
children: [...value]
|
|
19872
|
-
});
|
|
19873
|
-
keys.push(codeListItem.value);
|
|
20251
|
+
groups.push({
|
|
20252
|
+
caption: codeListItem.text,
|
|
20253
|
+
key: codeListItem.value,
|
|
20254
|
+
children: arr
|
|
19874
20255
|
});
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
);
|
|
19878
|
-
if (otherGroup.length > 0) {
|
|
19879
|
-
groups.push({
|
|
19880
|
-
caption: "\u5176\u4ED6",
|
|
19881
|
-
children: [...otherGroup]
|
|
19882
|
-
});
|
|
19883
|
-
}
|
|
19884
|
-
this.state.groups = groups;
|
|
19885
|
-
}
|
|
20256
|
+
});
|
|
20257
|
+
this.state.groups = groups;
|
|
19886
20258
|
}
|
|
19887
20259
|
/**
|
|
19888
20260
|
* 设置排序
|
|
@@ -19908,10 +20280,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19908
20280
|
};
|
|
19909
20281
|
|
|
19910
20282
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
19911
|
-
import { RuntimeModelError as
|
|
20283
|
+
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
19912
20284
|
|
|
19913
20285
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
19914
|
-
import { RuntimeError as
|
|
20286
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
19915
20287
|
var ExpBarControlController = class extends ControlController {
|
|
19916
20288
|
constructor() {
|
|
19917
20289
|
super(...arguments);
|
|
@@ -19966,7 +20338,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
19966
20338
|
get xDataController() {
|
|
19967
20339
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
19968
20340
|
if (!controller) {
|
|
19969
|
-
throw new
|
|
20341
|
+
throw new RuntimeModelError47(
|
|
19970
20342
|
this.model,
|
|
19971
20343
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
19972
20344
|
);
|
|
@@ -20188,7 +20560,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
20188
20560
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
20189
20561
|
return this.XDataModel.navAppViewId;
|
|
20190
20562
|
}
|
|
20191
|
-
throw new
|
|
20563
|
+
throw new RuntimeError35("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
20192
20564
|
}
|
|
20193
20565
|
/**
|
|
20194
20566
|
* 获取导航视图
|
|
@@ -20263,7 +20635,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
20263
20635
|
get xDataController() {
|
|
20264
20636
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
20265
20637
|
if (!controller) {
|
|
20266
|
-
throw new
|
|
20638
|
+
throw new RuntimeModelError48(
|
|
20267
20639
|
this.model,
|
|
20268
20640
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
20269
20641
|
);
|
|
@@ -20317,7 +20689,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
20317
20689
|
};
|
|
20318
20690
|
|
|
20319
20691
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
20320
|
-
import { RuntimeError as
|
|
20692
|
+
import { RuntimeError as RuntimeError36, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
20321
20693
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
20322
20694
|
constructor() {
|
|
20323
20695
|
super(...arguments);
|
|
@@ -20340,7 +20712,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
20340
20712
|
get xDataController() {
|
|
20341
20713
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
20342
20714
|
if (!controller) {
|
|
20343
|
-
throw new
|
|
20715
|
+
throw new RuntimeModelError49(
|
|
20344
20716
|
this.model,
|
|
20345
20717
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
20346
20718
|
);
|
|
@@ -20392,7 +20764,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
20392
20764
|
const deData = node.deData || node;
|
|
20393
20765
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
20394
20766
|
if (!nodeModel) {
|
|
20395
|
-
throw new
|
|
20767
|
+
throw new RuntimeError36("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
20396
20768
|
}
|
|
20397
20769
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
20398
20770
|
result.context.currentSrfNav = nodeId;
|
|
@@ -21130,7 +21502,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
21130
21502
|
|
|
21131
21503
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
21132
21504
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
21133
|
-
import { createUUID as createUUID3, notNilEmpty as
|
|
21505
|
+
import { createUUID as createUUID3, notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
21134
21506
|
|
|
21135
21507
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
21136
21508
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -21208,8 +21580,10 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
21208
21580
|
async formStateNotify(state) {
|
|
21209
21581
|
await super.formStateNotify(state);
|
|
21210
21582
|
this.isNewData = state === "DRAFT" /* DRAFT */;
|
|
21211
|
-
this.
|
|
21212
|
-
|
|
21583
|
+
if (this.model.maskMode !== 0) {
|
|
21584
|
+
this.state.showMask = this.isNewData;
|
|
21585
|
+
}
|
|
21586
|
+
if (state === "LOAD" /* LOAD */ || state === "DRAFT" /* DRAFT */ || state === "SAVE" /* SAVE */) {
|
|
21213
21587
|
this.calcViewParams();
|
|
21214
21588
|
}
|
|
21215
21589
|
}
|
|
@@ -21223,7 +21597,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
21223
21597
|
calcViewParams() {
|
|
21224
21598
|
let newContext = this.form.context.clone();
|
|
21225
21599
|
const navContexts = this.model.navigateContexts;
|
|
21226
|
-
if (
|
|
21600
|
+
if (notNilEmpty7(navContexts)) {
|
|
21227
21601
|
newContext = Object.assign(
|
|
21228
21602
|
newContext,
|
|
21229
21603
|
convertNavData(
|
|
@@ -21266,7 +21640,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
21266
21640
|
this.embedView = view;
|
|
21267
21641
|
this.embedView.evt.on("onMounted", () => {
|
|
21268
21642
|
if (!this.isNewData) {
|
|
21269
|
-
this.embedView.
|
|
21643
|
+
this.embedView.call("Load" /* LOAD */);
|
|
21270
21644
|
}
|
|
21271
21645
|
});
|
|
21272
21646
|
this.embedView.evt.on("onDataChange", (event) => {
|
|
@@ -21393,7 +21767,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
21393
21767
|
// src/controller/control/form/form-detail/form-item/form-item.controller.ts
|
|
21394
21768
|
import Schema from "async-validator";
|
|
21395
21769
|
import { createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
21396
|
-
import { ModelError as ModelError25, RuntimeError as
|
|
21770
|
+
import { ModelError as ModelError25, RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
21397
21771
|
import dayjs3 from "dayjs";
|
|
21398
21772
|
|
|
21399
21773
|
// src/controller/control/form/form-detail/form-item/form-item.state.ts
|
|
@@ -21709,7 +22083,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
21709
22083
|
case "SESSION":
|
|
21710
22084
|
case "APPLICATION":
|
|
21711
22085
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
21712
|
-
throw new
|
|
22086
|
+
throw new RuntimeError37("appdata.context\u4E0D\u5B58\u5728");
|
|
21713
22087
|
}
|
|
21714
22088
|
data[this.name] = ibiz.appData.context[defaultValue];
|
|
21715
22089
|
break;
|
|
@@ -21834,7 +22208,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
21834
22208
|
};
|
|
21835
22209
|
|
|
21836
22210
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
21837
|
-
import { RuntimeError as
|
|
22211
|
+
import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
21838
22212
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
21839
22213
|
/**
|
|
21840
22214
|
* 初始化
|
|
@@ -21849,7 +22223,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
21849
22223
|
const { model } = this.parent;
|
|
21850
22224
|
const { contentControl } = model;
|
|
21851
22225
|
if (!contentControl) {
|
|
21852
|
-
throw new
|
|
22226
|
+
throw new RuntimeError38("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
21853
22227
|
}
|
|
21854
22228
|
this.controlModel = contentControl;
|
|
21855
22229
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -21959,7 +22333,7 @@ import { isArray as isArray4 } from "lodash-es";
|
|
|
21959
22333
|
import {
|
|
21960
22334
|
awaitTimeout,
|
|
21961
22335
|
mergeInLeft,
|
|
21962
|
-
RuntimeError as
|
|
22336
|
+
RuntimeError as RuntimeError39,
|
|
21963
22337
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
21964
22338
|
} from "@ibiz-template/core";
|
|
21965
22339
|
import { debounce } from "lodash-es";
|
|
@@ -21967,7 +22341,7 @@ import { debounce } from "lodash-es";
|
|
|
21967
22341
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
21968
22342
|
import {
|
|
21969
22343
|
recursiveIterate as recursiveIterate3,
|
|
21970
|
-
RuntimeModelError as
|
|
22344
|
+
RuntimeModelError as RuntimeModelError50
|
|
21971
22345
|
} from "@ibiz-template/core";
|
|
21972
22346
|
var EditFormService = class extends ControlService {
|
|
21973
22347
|
/**
|
|
@@ -22085,7 +22459,7 @@ var EditFormService = class extends ControlService {
|
|
|
22085
22459
|
const wizardForm = this.model;
|
|
22086
22460
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
22087
22461
|
if (!methodName) {
|
|
22088
|
-
throw new
|
|
22462
|
+
throw new RuntimeModelError50(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
22089
22463
|
}
|
|
22090
22464
|
let res = await this.exec(
|
|
22091
22465
|
methodName,
|
|
@@ -22192,7 +22566,8 @@ var EditFormService = class extends ControlService {
|
|
|
22192
22566
|
let mapField;
|
|
22193
22567
|
if (deField) {
|
|
22194
22568
|
mapField = new UIMapField(uiKey, deField, {
|
|
22195
|
-
isOriginField: true
|
|
22569
|
+
isOriginField: true,
|
|
22570
|
+
dataType: formItem.dataType
|
|
22196
22571
|
});
|
|
22197
22572
|
} else {
|
|
22198
22573
|
mapField = new UIMapField(uiKey, uiKey, {
|
|
@@ -22341,7 +22716,7 @@ var EditFormController = class extends FormController {
|
|
|
22341
22716
|
}
|
|
22342
22717
|
const isValid = await this.validate();
|
|
22343
22718
|
if (!isValid) {
|
|
22344
|
-
throw new
|
|
22719
|
+
throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
22345
22720
|
}
|
|
22346
22721
|
await this.startLoading();
|
|
22347
22722
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -22441,7 +22816,7 @@ var EditFormController = class extends FormController {
|
|
|
22441
22816
|
(item) => item.id === formItemUpdateId
|
|
22442
22817
|
);
|
|
22443
22818
|
if (!formItemUpdate) {
|
|
22444
|
-
throw new
|
|
22819
|
+
throw new RuntimeError39("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
22445
22820
|
}
|
|
22446
22821
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
22447
22822
|
const updateItems = defiupdateDetails.map((item) => item.id);
|
|
@@ -22485,7 +22860,7 @@ var EditFormController = class extends FormController {
|
|
|
22485
22860
|
async wfStart(extraParams = {}) {
|
|
22486
22861
|
const isValid = await this.validate();
|
|
22487
22862
|
if (!isValid) {
|
|
22488
|
-
throw new
|
|
22863
|
+
throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
22489
22864
|
}
|
|
22490
22865
|
await this.startLoading();
|
|
22491
22866
|
try {
|
|
@@ -22518,7 +22893,7 @@ var EditFormController = class extends FormController {
|
|
|
22518
22893
|
async wfSubmit(extraParams = {}) {
|
|
22519
22894
|
const isValid = await this.validate();
|
|
22520
22895
|
if (!isValid) {
|
|
22521
|
-
throw new
|
|
22896
|
+
throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
22522
22897
|
}
|
|
22523
22898
|
await this.startLoading();
|
|
22524
22899
|
try {
|
|
@@ -22749,7 +23124,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
22749
23124
|
};
|
|
22750
23125
|
|
|
22751
23126
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
22752
|
-
import { RuntimeError as
|
|
23127
|
+
import { RuntimeError as RuntimeError40, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
22753
23128
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
22754
23129
|
constructor() {
|
|
22755
23130
|
super(...arguments);
|
|
@@ -22854,7 +23229,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
22854
23229
|
const { model } = this.parent;
|
|
22855
23230
|
const { contentControl } = model;
|
|
22856
23231
|
if (!contentControl) {
|
|
22857
|
-
throw new
|
|
23232
|
+
throw new RuntimeError40("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
22858
23233
|
}
|
|
22859
23234
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
22860
23235
|
this.controlModel = contentControl;
|
|
@@ -23565,10 +23940,10 @@ import {
|
|
|
23565
23940
|
awaitTimeout as awaitTimeout2,
|
|
23566
23941
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
23567
23942
|
recursiveIterate as recursiveIterate4,
|
|
23568
|
-
RuntimeError as
|
|
23569
|
-
RuntimeModelError as
|
|
23943
|
+
RuntimeError as RuntimeError41,
|
|
23944
|
+
RuntimeModelError as RuntimeModelError51
|
|
23570
23945
|
} from "@ibiz-template/core";
|
|
23571
|
-
import { clone as
|
|
23946
|
+
import { clone as clone15 } from "ramda";
|
|
23572
23947
|
|
|
23573
23948
|
// src/controller/control/grid/grid/grid.service.ts
|
|
23574
23949
|
var GridService = class extends MDControlService {
|
|
@@ -23588,7 +23963,8 @@ var GridService = class extends MDControlService {
|
|
|
23588
23963
|
if (deField) {
|
|
23589
23964
|
const deFieldKey = deField.toLowerCase();
|
|
23590
23965
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
23591
|
-
isOriginField: true
|
|
23966
|
+
isOriginField: true,
|
|
23967
|
+
dataType: column.dataType
|
|
23592
23968
|
});
|
|
23593
23969
|
} else {
|
|
23594
23970
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -23761,11 +24137,11 @@ var GridController = class extends MDControlController {
|
|
|
23761
24137
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
23762
24138
|
);
|
|
23763
24139
|
if (!this.groupFieldColumn) {
|
|
23764
|
-
throw new
|
|
24140
|
+
throw new RuntimeModelError51(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
23765
24141
|
}
|
|
23766
24142
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
23767
24143
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
23768
|
-
throw new
|
|
24144
|
+
throw new RuntimeModelError51(
|
|
23769
24145
|
this.groupFieldColumn.model,
|
|
23770
24146
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
23771
24147
|
);
|
|
@@ -23775,7 +24151,7 @@ var GridController = class extends MDControlController {
|
|
|
23775
24151
|
);
|
|
23776
24152
|
if (index !== -1 && index !== 0) {
|
|
23777
24153
|
if (this.isMultistageHeader) {
|
|
23778
|
-
throw new
|
|
24154
|
+
throw new RuntimeModelError51(
|
|
23779
24155
|
this.model,
|
|
23780
24156
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
23781
24157
|
);
|
|
@@ -23785,10 +24161,10 @@ var GridController = class extends MDControlController {
|
|
|
23785
24161
|
}
|
|
23786
24162
|
if (groupMode === "CODELIST") {
|
|
23787
24163
|
if (!groupCodeListId) {
|
|
23788
|
-
throw new
|
|
24164
|
+
throw new RuntimeModelError51(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
23789
24165
|
}
|
|
23790
24166
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
23791
|
-
throw new
|
|
24167
|
+
throw new RuntimeModelError51(
|
|
23792
24168
|
this.model,
|
|
23793
24169
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
23794
24170
|
);
|
|
@@ -23850,6 +24226,7 @@ var GridController = class extends MDControlController {
|
|
|
23850
24226
|
);
|
|
23851
24227
|
this.state.groups.push({
|
|
23852
24228
|
caption: (codeListItem == null ? void 0 : codeListItem.text) || "".concat(key),
|
|
24229
|
+
key,
|
|
23853
24230
|
children: value
|
|
23854
24231
|
});
|
|
23855
24232
|
});
|
|
@@ -23868,7 +24245,7 @@ var GridController = class extends MDControlController {
|
|
|
23868
24245
|
return;
|
|
23869
24246
|
}
|
|
23870
24247
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
23871
|
-
throw new
|
|
24248
|
+
throw new RuntimeModelError51(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
23872
24249
|
}
|
|
23873
24250
|
const params = await this.getFetchParams();
|
|
23874
24251
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -23936,7 +24313,7 @@ var GridController = class extends MDControlController {
|
|
|
23936
24313
|
}
|
|
23937
24314
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
23938
24315
|
if (editingRow) {
|
|
23939
|
-
throw new
|
|
24316
|
+
throw new RuntimeError41("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
23940
24317
|
}
|
|
23941
24318
|
let res;
|
|
23942
24319
|
try {
|
|
@@ -23970,7 +24347,7 @@ var GridController = class extends MDControlController {
|
|
|
23970
24347
|
(item) => item.data.srfkey === data.srfkey
|
|
23971
24348
|
);
|
|
23972
24349
|
if (!rowState) {
|
|
23973
|
-
throw new
|
|
24350
|
+
throw new RuntimeError41("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
23974
24351
|
}
|
|
23975
24352
|
if (!rowState.modified) {
|
|
23976
24353
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -23982,7 +24359,7 @@ var GridController = class extends MDControlController {
|
|
|
23982
24359
|
}
|
|
23983
24360
|
const isValid = await this.validate(rowState);
|
|
23984
24361
|
if (!isValid) {
|
|
23985
|
-
throw new
|
|
24362
|
+
throw new RuntimeError41("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
23986
24363
|
}
|
|
23987
24364
|
await this.startLoading();
|
|
23988
24365
|
let res;
|
|
@@ -24008,7 +24385,6 @@ var GridController = class extends MDControlController {
|
|
|
24008
24385
|
this.state.items.splice(index, 1, res.data);
|
|
24009
24386
|
rowState.data = res.data;
|
|
24010
24387
|
rowState.modified = false;
|
|
24011
|
-
ibiz.message.success("".concat(res.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F"));
|
|
24012
24388
|
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "SUCCESS"), {
|
|
24013
24389
|
default: "".concat(res.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F"),
|
|
24014
24390
|
data: res.data
|
|
@@ -24195,7 +24571,7 @@ var GridController = class extends MDControlController {
|
|
|
24195
24571
|
}
|
|
24196
24572
|
async toggleRowEdit() {
|
|
24197
24573
|
if (!this.model.enableRowNew) {
|
|
24198
|
-
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");
|
|
24199
24575
|
}
|
|
24200
24576
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
24201
24577
|
}
|
|
@@ -24228,7 +24604,7 @@ var GridController = class extends MDControlController {
|
|
|
24228
24604
|
if (toState === true) {
|
|
24229
24605
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
24230
24606
|
if (editingRow) {
|
|
24231
|
-
throw new
|
|
24607
|
+
throw new RuntimeError41("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
24232
24608
|
}
|
|
24233
24609
|
}
|
|
24234
24610
|
row.showRowEdit = toState;
|
|
@@ -24273,7 +24649,7 @@ var GridController = class extends MDControlController {
|
|
|
24273
24649
|
(item) => item.id === updateId
|
|
24274
24650
|
);
|
|
24275
24651
|
if (!findUpdate) {
|
|
24276
|
-
throw new
|
|
24652
|
+
throw new RuntimeError41("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
24277
24653
|
}
|
|
24278
24654
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
24279
24655
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -24343,7 +24719,7 @@ var GridController = class extends MDControlController {
|
|
|
24343
24719
|
codeListMap.set(key, items[key].codeListItems);
|
|
24344
24720
|
}
|
|
24345
24721
|
});
|
|
24346
|
-
const cloneData =
|
|
24722
|
+
const cloneData = clone15(
|
|
24347
24723
|
data2.map((item) => {
|
|
24348
24724
|
return item.getOrigin();
|
|
24349
24725
|
})
|
|
@@ -24382,7 +24758,7 @@ var GridController = class extends MDControlController {
|
|
|
24382
24758
|
data2 = this.getData();
|
|
24383
24759
|
}
|
|
24384
24760
|
if (data2.length === 0) {
|
|
24385
|
-
throw new
|
|
24761
|
+
throw new RuntimeError41("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
24386
24762
|
}
|
|
24387
24763
|
return formatExcelData(data2);
|
|
24388
24764
|
};
|
|
@@ -24401,11 +24777,11 @@ var GridController = class extends MDControlController {
|
|
|
24401
24777
|
);
|
|
24402
24778
|
const data = formatArrayData(filterVal, await getExportData());
|
|
24403
24779
|
if (!ibiz.util.getExportExcel) {
|
|
24404
|
-
throw new
|
|
24780
|
+
throw new RuntimeError41("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
24405
24781
|
}
|
|
24406
24782
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
24407
24783
|
if (!exportExcel) {
|
|
24408
|
-
throw new
|
|
24784
|
+
throw new RuntimeError41("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
24409
24785
|
}
|
|
24410
24786
|
exportExcel.exportJsonToExcel({
|
|
24411
24787
|
header,
|
|
@@ -24421,9 +24797,9 @@ var GridController = class extends MDControlController {
|
|
|
24421
24797
|
};
|
|
24422
24798
|
|
|
24423
24799
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
24424
|
-
import { DataTypes, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
24800
|
+
import { DataTypes as DataTypes2, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
24425
24801
|
import dayjs4 from "dayjs";
|
|
24426
|
-
import { clone as
|
|
24802
|
+
import { clone as clone16 } from "ramda";
|
|
24427
24803
|
var GridFieldColumnController = class extends GridColumnController {
|
|
24428
24804
|
constructor() {
|
|
24429
24805
|
super(...arguments);
|
|
@@ -24519,7 +24895,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24519
24895
|
srfkey: value,
|
|
24520
24896
|
...wfContext
|
|
24521
24897
|
});
|
|
24522
|
-
const tempParams =
|
|
24898
|
+
const tempParams = clone16(this.params);
|
|
24523
24899
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
24524
24900
|
row.data,
|
|
24525
24901
|
tempContext,
|
|
@@ -24647,7 +25023,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24647
25023
|
if (!this.valueFormat) {
|
|
24648
25024
|
return strVal;
|
|
24649
25025
|
}
|
|
24650
|
-
const isDate =
|
|
25026
|
+
const isDate = DataTypes2.isDate(this.dataType);
|
|
24651
25027
|
if (isDate) {
|
|
24652
25028
|
return dayjs4(strVal).format(this.valueFormat);
|
|
24653
25029
|
}
|
|
@@ -24656,7 +25032,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24656
25032
|
};
|
|
24657
25033
|
|
|
24658
25034
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
24659
|
-
import { RuntimeModelError as
|
|
25035
|
+
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
24660
25036
|
var GridUAColumnController = class extends GridColumnController {
|
|
24661
25037
|
/**
|
|
24662
25038
|
* 给rowController初始化操作列的状态
|
|
@@ -24669,7 +25045,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
24669
25045
|
var _a;
|
|
24670
25046
|
const { deuiactionGroup } = this.model;
|
|
24671
25047
|
if (!deuiactionGroup) {
|
|
24672
|
-
throw new
|
|
25048
|
+
throw new RuntimeModelError52(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
24673
25049
|
}
|
|
24674
25050
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
24675
25051
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -24710,7 +25086,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
24710
25086
|
};
|
|
24711
25087
|
|
|
24712
25088
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
24713
|
-
import { RuntimeError as
|
|
25089
|
+
import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
|
|
24714
25090
|
import Schema2 from "async-validator";
|
|
24715
25091
|
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
24716
25092
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -24844,7 +25220,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
24844
25220
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
24845
25221
|
const result = await this.validate(row);
|
|
24846
25222
|
if (!result) {
|
|
24847
|
-
throw new
|
|
25223
|
+
throw new RuntimeError42(
|
|
24848
25224
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
24849
25225
|
);
|
|
24850
25226
|
}
|
|
@@ -24985,7 +25361,8 @@ var ListService = class extends MDControlService {
|
|
|
24985
25361
|
if (deField) {
|
|
24986
25362
|
const deFieldKey = deField.toLowerCase();
|
|
24987
25363
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
24988
|
-
isOriginField: true
|
|
25364
|
+
isOriginField: true,
|
|
25365
|
+
dataType: item.dataType
|
|
24989
25366
|
});
|
|
24990
25367
|
} else {
|
|
24991
25368
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -25150,6 +25527,7 @@ var ListController = class extends MDControlController {
|
|
|
25150
25527
|
childrenMap.forEach((value, key) => {
|
|
25151
25528
|
groups.push({
|
|
25152
25529
|
caption: key,
|
|
25530
|
+
key,
|
|
25153
25531
|
children: [...value]
|
|
25154
25532
|
});
|
|
25155
25533
|
});
|
|
@@ -25179,6 +25557,7 @@ var ListController = class extends MDControlController {
|
|
|
25179
25557
|
);
|
|
25180
25558
|
groups.push({
|
|
25181
25559
|
caption: codeListItem.text,
|
|
25560
|
+
key: codeListItem.value,
|
|
25182
25561
|
children: [...value]
|
|
25183
25562
|
});
|
|
25184
25563
|
keys.push(codeListItem.value);
|
|
@@ -25189,6 +25568,7 @@ var ListController = class extends MDControlController {
|
|
|
25189
25568
|
if (otherGroup.length > 0) {
|
|
25190
25569
|
groups.push({
|
|
25191
25570
|
caption: "\u5176\u4ED6",
|
|
25571
|
+
key: "\u5176\u4ED6",
|
|
25192
25572
|
children: [...otherGroup]
|
|
25193
25573
|
});
|
|
25194
25574
|
}
|
|
@@ -25198,7 +25578,7 @@ var ListController = class extends MDControlController {
|
|
|
25198
25578
|
};
|
|
25199
25579
|
|
|
25200
25580
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
25201
|
-
import { RuntimeError as
|
|
25581
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
25202
25582
|
var PanelController = class extends ControlController {
|
|
25203
25583
|
constructor() {
|
|
25204
25584
|
super(...arguments);
|
|
@@ -25296,7 +25676,7 @@ var PanelController = class extends ControlController {
|
|
|
25296
25676
|
async load() {
|
|
25297
25677
|
const data = await this.prepareData();
|
|
25298
25678
|
if (!data) {
|
|
25299
|
-
throw new
|
|
25679
|
+
throw new RuntimeError43("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
25300
25680
|
}
|
|
25301
25681
|
const panelData = this.convertData(data);
|
|
25302
25682
|
this.state.data = panelData;
|
|
@@ -25740,7 +26120,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
25740
26120
|
* @memberof PickupViewPanelController
|
|
25741
26121
|
*/
|
|
25742
26122
|
async getSelectedData() {
|
|
25743
|
-
const items = await this.embedView.call("GetData");
|
|
26123
|
+
const items = await this.embedView.call("GetData" /* GET_DATA */);
|
|
25744
26124
|
return items;
|
|
25745
26125
|
}
|
|
25746
26126
|
/**
|
|
@@ -25752,7 +26132,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
25752
26132
|
* @memberof PickupViewPanelController
|
|
25753
26133
|
*/
|
|
25754
26134
|
async getAllData() {
|
|
25755
|
-
const items = await this.embedView.call("GetAllData");
|
|
26135
|
+
const items = await this.embedView.call("GetAllData" /* GET_ALL_DATA */);
|
|
25756
26136
|
return items;
|
|
25757
26137
|
}
|
|
25758
26138
|
};
|
|
@@ -26517,7 +26897,7 @@ var TreeController = class extends MDControlController {
|
|
|
26517
26897
|
};
|
|
26518
26898
|
|
|
26519
26899
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
26520
|
-
import { RuntimeError as
|
|
26900
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
26521
26901
|
|
|
26522
26902
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
26523
26903
|
var WizardPanelService = class extends ControlService {
|
|
@@ -26676,7 +27056,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26676
27056
|
const { activeFormTag } = this.state;
|
|
26677
27057
|
const controller = this.formControllers.get(activeFormTag);
|
|
26678
27058
|
if (!controller) {
|
|
26679
|
-
throw new
|
|
27059
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
26680
27060
|
}
|
|
26681
27061
|
return controller;
|
|
26682
27062
|
}
|
|
@@ -26751,7 +27131,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26751
27131
|
this.tagHistory.pop();
|
|
26752
27132
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
26753
27133
|
if (!prevTag) {
|
|
26754
|
-
throw new
|
|
27134
|
+
throw new RuntimeError44("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
26755
27135
|
}
|
|
26756
27136
|
this.state.activeFormTag = prevTag;
|
|
26757
27137
|
}
|
|
@@ -26772,7 +27152,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26772
27152
|
}
|
|
26773
27153
|
);
|
|
26774
27154
|
if (!wizardForm) {
|
|
26775
|
-
throw new
|
|
27155
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
26776
27156
|
}
|
|
26777
27157
|
nextTag = data.srfnextform;
|
|
26778
27158
|
} else {
|
|
@@ -26784,7 +27164,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26784
27164
|
});
|
|
26785
27165
|
const nextWizardStep = wizardSteps[index + 1];
|
|
26786
27166
|
if (!nextWizardStep) {
|
|
26787
|
-
throw new
|
|
27167
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
26788
27168
|
}
|
|
26789
27169
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
26790
27170
|
(wizardForm) => {
|
|
@@ -26797,7 +27177,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26797
27177
|
}
|
|
26798
27178
|
}
|
|
26799
27179
|
if (!nextTag) {
|
|
26800
|
-
throw new
|
|
27180
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
26801
27181
|
}
|
|
26802
27182
|
this.state.activeFormTag = nextTag;
|
|
26803
27183
|
this.tagHistory.push(nextTag);
|
|
@@ -26833,7 +27213,8 @@ var MDCtrlService = class extends MDControlService {
|
|
|
26833
27213
|
if (deField) {
|
|
26834
27214
|
const deFieldKey = deField.toLowerCase();
|
|
26835
27215
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
26836
|
-
isOriginField: true
|
|
27216
|
+
isOriginField: true,
|
|
27217
|
+
dataType: item.dataType
|
|
26837
27218
|
});
|
|
26838
27219
|
} else {
|
|
26839
27220
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -27025,6 +27406,321 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27025
27406
|
}
|
|
27026
27407
|
};
|
|
27027
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
|
+
|
|
27028
27724
|
// src/controller/hub.controller.ts
|
|
27029
27725
|
var HubController = class {
|
|
27030
27726
|
constructor() {
|
|
@@ -27240,7 +27936,7 @@ var AppHub = class {
|
|
|
27240
27936
|
this.registerAppView(appView);
|
|
27241
27937
|
return appView;
|
|
27242
27938
|
}
|
|
27243
|
-
throw new
|
|
27939
|
+
throw new RuntimeError46("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
27244
27940
|
}
|
|
27245
27941
|
/**
|
|
27246
27942
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -27271,7 +27967,7 @@ var AppHub = class {
|
|
|
27271
27967
|
this.registerAppDataEntity(entity, appId);
|
|
27272
27968
|
return entity;
|
|
27273
27969
|
}
|
|
27274
|
-
throw new
|
|
27970
|
+
throw new RuntimeError46("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
27275
27971
|
}
|
|
27276
27972
|
/**
|
|
27277
27973
|
* 新建 hub 应用
|
|
@@ -27292,7 +27988,7 @@ var AppHub = class {
|
|
|
27292
27988
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
27293
27989
|
this.registerApp(appModel);
|
|
27294
27990
|
} else {
|
|
27295
|
-
throw new
|
|
27991
|
+
throw new RuntimeError46("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
27296
27992
|
}
|
|
27297
27993
|
const app = new Application(appModel);
|
|
27298
27994
|
this.appMap.set(id, app);
|
|
@@ -27383,7 +28079,7 @@ var EngineFactory = class {
|
|
|
27383
28079
|
};
|
|
27384
28080
|
|
|
27385
28081
|
// src/engine/view-base.engine.ts
|
|
27386
|
-
import { RuntimeError as
|
|
28082
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
27387
28083
|
var ViewEngineBase = class {
|
|
27388
28084
|
/**
|
|
27389
28085
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -27478,7 +28174,7 @@ var ViewEngineBase = class {
|
|
|
27478
28174
|
async onDestroyed() {
|
|
27479
28175
|
}
|
|
27480
28176
|
async call(key, _args) {
|
|
27481
|
-
if (key === "GetData") {
|
|
28177
|
+
if (key === "GetData" /* GET_DATA */) {
|
|
27482
28178
|
return this.getData();
|
|
27483
28179
|
}
|
|
27484
28180
|
return void 0;
|
|
@@ -27571,7 +28267,7 @@ var ViewEngineBase = class {
|
|
|
27571
28267
|
const { appDataEntityId } = this.view.model;
|
|
27572
28268
|
const { evt, context, params } = this.view;
|
|
27573
28269
|
if (!appDataEntityId) {
|
|
27574
|
-
throw new
|
|
28270
|
+
throw new RuntimeError47("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
27575
28271
|
}
|
|
27576
28272
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
27577
28273
|
const res = await app.deService.exec(
|
|
@@ -27592,7 +28288,7 @@ var ViewEngineBase = class {
|
|
|
27592
28288
|
};
|
|
27593
28289
|
|
|
27594
28290
|
// src/engine/md-view.engine.ts
|
|
27595
|
-
import { RuntimeModelError as
|
|
28291
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
27596
28292
|
var MDViewEngine = class extends ViewEngineBase {
|
|
27597
28293
|
/**
|
|
27598
28294
|
* 多数据部件名称
|
|
@@ -27781,7 +28477,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27781
28477
|
(item) => item.id === "newdata"
|
|
27782
28478
|
);
|
|
27783
28479
|
if (!openAppViewLogic) {
|
|
27784
|
-
throw new
|
|
28480
|
+
throw new RuntimeModelError54(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27785
28481
|
}
|
|
27786
28482
|
const context = this.view.context.clone();
|
|
27787
28483
|
if (copyMode) {
|
|
@@ -27797,7 +28493,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27797
28493
|
if (result instanceof Object && result.ok) {
|
|
27798
28494
|
this.refresh();
|
|
27799
28495
|
} else if (result === -1) {
|
|
27800
|
-
throw new
|
|
28496
|
+
throw new RuntimeModelError54(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27801
28497
|
}
|
|
27802
28498
|
}
|
|
27803
28499
|
/**
|
|
@@ -27987,7 +28683,7 @@ var GlobalUtil = class {
|
|
|
27987
28683
|
};
|
|
27988
28684
|
|
|
27989
28685
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
27990
|
-
import { RuntimeError as
|
|
28686
|
+
import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
|
|
27991
28687
|
var LogicExecutor = class {
|
|
27992
28688
|
/**
|
|
27993
28689
|
* @author lxm
|
|
@@ -28008,7 +28704,7 @@ var LogicExecutor = class {
|
|
|
28008
28704
|
*/
|
|
28009
28705
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28010
28706
|
execute(_executeParams) {
|
|
28011
|
-
throw new
|
|
28707
|
+
throw new RuntimeError48("Method not implemented.");
|
|
28012
28708
|
}
|
|
28013
28709
|
/**
|
|
28014
28710
|
* 销毁方法
|
|
@@ -28099,13 +28795,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
28099
28795
|
};
|
|
28100
28796
|
|
|
28101
28797
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
28102
|
-
import { RuntimeModelError as
|
|
28798
|
+
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
28103
28799
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
28104
28800
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28105
28801
|
execute(executeParams) {
|
|
28106
28802
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
28107
28803
|
if (!appDEUILogicId) {
|
|
28108
|
-
throw new
|
|
28804
|
+
throw new RuntimeModelError55(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
28109
28805
|
}
|
|
28110
28806
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
28111
28807
|
}
|
|
@@ -28440,7 +29136,7 @@ var LogicSchedulerCenter = class {
|
|
|
28440
29136
|
};
|
|
28441
29137
|
|
|
28442
29138
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
28443
|
-
import { RuntimeError as
|
|
29139
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
28444
29140
|
var LogicTrigger = class {
|
|
28445
29141
|
/**
|
|
28446
29142
|
* @author lxm
|
|
@@ -28500,7 +29196,7 @@ var LogicTrigger = class {
|
|
|
28500
29196
|
if (this.executor) {
|
|
28501
29197
|
return this.executor.execute(executeParams);
|
|
28502
29198
|
}
|
|
28503
|
-
throw new
|
|
29199
|
+
throw new RuntimeError49("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
28504
29200
|
}
|
|
28505
29201
|
/**
|
|
28506
29202
|
* 销毁方法
|
|
@@ -28517,12 +29213,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
28517
29213
|
};
|
|
28518
29214
|
|
|
28519
29215
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
28520
|
-
import { RuntimeError as
|
|
29216
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
28521
29217
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
28522
29218
|
bindExecutor(executor) {
|
|
28523
29219
|
super.bindExecutor(executor);
|
|
28524
29220
|
if (this.executor.type !== "SCRIPT") {
|
|
28525
|
-
throw new
|
|
29221
|
+
throw new RuntimeError50(
|
|
28526
29222
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
28527
29223
|
);
|
|
28528
29224
|
}
|
|
@@ -28554,12 +29250,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
28554
29250
|
if (typeof result === "boolean") {
|
|
28555
29251
|
return result;
|
|
28556
29252
|
}
|
|
28557
|
-
throw new
|
|
29253
|
+
throw new RuntimeError50("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
28558
29254
|
}
|
|
28559
29255
|
};
|
|
28560
29256
|
|
|
28561
29257
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
28562
|
-
import { RuntimeError as
|
|
29258
|
+
import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
|
|
28563
29259
|
var TimerTrigger = class extends LogicTrigger {
|
|
28564
29260
|
constructor() {
|
|
28565
29261
|
super(...arguments);
|
|
@@ -28568,7 +29264,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28568
29264
|
start() {
|
|
28569
29265
|
this.timer = setInterval(() => {
|
|
28570
29266
|
if (!this.scheduler.defaultParamsCb) {
|
|
28571
|
-
throw new
|
|
29267
|
+
throw new RuntimeError51("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
28572
29268
|
}
|
|
28573
29269
|
const params = this.scheduler.defaultParamsCb();
|
|
28574
29270
|
this.executor.execute(params);
|
|
@@ -28585,10 +29281,10 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28585
29281
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
28586
29282
|
import {
|
|
28587
29283
|
ModelError as ModelError30,
|
|
28588
|
-
RuntimeError as
|
|
28589
|
-
RuntimeModelError as
|
|
29284
|
+
RuntimeError as RuntimeError52,
|
|
29285
|
+
RuntimeModelError as RuntimeModelError56
|
|
28590
29286
|
} from "@ibiz-template/core";
|
|
28591
|
-
import { notNilEmpty as
|
|
29287
|
+
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
28592
29288
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
28593
29289
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28594
29290
|
execute(executeParams) {
|
|
@@ -28621,7 +29317,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28621
29317
|
const { context, params, ...rest } = parameters;
|
|
28622
29318
|
const { data } = parameters;
|
|
28623
29319
|
if (!(data == null ? void 0 : data[0])) {
|
|
28624
|
-
throw new
|
|
29320
|
+
throw new RuntimeError52("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
28625
29321
|
}
|
|
28626
29322
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28627
29323
|
let openViewRef;
|
|
@@ -28630,7 +29326,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28630
29326
|
} else {
|
|
28631
29327
|
openViewRef = appUILogic.openDataAppView;
|
|
28632
29328
|
if (!openViewRef) {
|
|
28633
|
-
throw new
|
|
29329
|
+
throw new RuntimeModelError56(
|
|
28634
29330
|
appUILogic,
|
|
28635
29331
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
28636
29332
|
);
|
|
@@ -28638,7 +29334,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28638
29334
|
}
|
|
28639
29335
|
const openView = openViewRef.refAppViewId;
|
|
28640
29336
|
if (!openView) {
|
|
28641
|
-
throw new
|
|
29337
|
+
throw new RuntimeModelError56(
|
|
28642
29338
|
appUILogic,
|
|
28643
29339
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
28644
29340
|
);
|
|
@@ -28650,7 +29346,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28650
29346
|
);
|
|
28651
29347
|
let tempParams = {};
|
|
28652
29348
|
const navParams = openViewRef.navigateParams;
|
|
28653
|
-
if (
|
|
29349
|
+
if (notNilEmpty8(navParams)) {
|
|
28654
29350
|
tempParams = convertNavData(navParams, params, context, data[0]);
|
|
28655
29351
|
}
|
|
28656
29352
|
return ibiz.commands.execute(
|
|
@@ -28690,7 +29386,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28690
29386
|
} else {
|
|
28691
29387
|
newViewRef = newDataAppView;
|
|
28692
29388
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
28693
|
-
throw new
|
|
29389
|
+
throw new RuntimeModelError56(
|
|
28694
29390
|
appUILogic,
|
|
28695
29391
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
28696
29392
|
);
|
|
@@ -28700,12 +29396,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28700
29396
|
let tempParams = {};
|
|
28701
29397
|
const _data = (data == null ? void 0 : data[0]) || {};
|
|
28702
29398
|
const navContexts = newViewRef.navigateContexts;
|
|
28703
|
-
if (
|
|
29399
|
+
if (notNilEmpty8(navContexts)) {
|
|
28704
29400
|
tempContext = convertNavData(navContexts, context, params, _data);
|
|
28705
29401
|
}
|
|
28706
29402
|
tempContext = Object.assign(context, tempContext);
|
|
28707
29403
|
const navParams = newViewRef.navigateParams;
|
|
28708
|
-
if (
|
|
29404
|
+
if (notNilEmpty8(navParams)) {
|
|
28709
29405
|
tempParams = convertNavData(navParams, params, context, _data);
|
|
28710
29406
|
}
|
|
28711
29407
|
if (context.srfcopymode) {
|
|
@@ -28736,7 +29432,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28736
29432
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
28737
29433
|
const { context, params, ...rest } = parameters;
|
|
28738
29434
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
28739
|
-
throw new
|
|
29435
|
+
throw new RuntimeModelError56(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
28740
29436
|
}
|
|
28741
29437
|
const result = await ibiz.commands.execute(
|
|
28742
29438
|
OpenAppViewCommand.TAG,
|
|
@@ -28750,12 +29446,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28750
29446
|
}
|
|
28751
29447
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
28752
29448
|
if (!selectData) {
|
|
28753
|
-
throw new
|
|
29449
|
+
throw new RuntimeError52("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
28754
29450
|
}
|
|
28755
29451
|
const indexType = selectData.srfkey;
|
|
28756
29452
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
28757
29453
|
if (!findView) {
|
|
28758
|
-
throw new
|
|
29454
|
+
throw new RuntimeError52(
|
|
28759
29455
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28760
29456
|
);
|
|
28761
29457
|
}
|
|
@@ -28765,7 +29461,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28765
29461
|
const appDataEntityId = parameters.view.model.appDataEntityId;
|
|
28766
29462
|
const formTypeName = await getFormTypeFieldName(appDataEntityId);
|
|
28767
29463
|
if (!formTypeName) {
|
|
28768
|
-
throw new
|
|
29464
|
+
throw new RuntimeModelError56(
|
|
28769
29465
|
appUILogic,
|
|
28770
29466
|
"".concat(appDataEntityId, "\u5B9E\u4F53\u7F3A\u5C11\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027")
|
|
28771
29467
|
);
|
|
@@ -28773,12 +29469,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28773
29469
|
const { data } = parameters;
|
|
28774
29470
|
const formTypeValue = data[0][formTypeName];
|
|
28775
29471
|
if (!formTypeValue) {
|
|
28776
|
-
throw new
|
|
29472
|
+
throw new RuntimeModelError56(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
28777
29473
|
}
|
|
28778
29474
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28779
29475
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
28780
29476
|
if (!findView) {
|
|
28781
|
-
throw new
|
|
29477
|
+
throw new RuntimeError52(
|
|
28782
29478
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28783
29479
|
);
|
|
28784
29480
|
}
|
|
@@ -29082,6 +29778,8 @@ export {
|
|
|
29082
29778
|
GridUAColumnController,
|
|
29083
29779
|
HandlebarsUtil,
|
|
29084
29780
|
HubController,
|
|
29781
|
+
KanbanController,
|
|
29782
|
+
KanbanService,
|
|
29085
29783
|
LayoutPanelUtil,
|
|
29086
29784
|
ListController,
|
|
29087
29785
|
ListService,
|