@ibiz-template/runtime 0.1.21 → 0.1.23-alpha.0
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 +923 -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/i-panel.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-panel.controller.d.ts.map +1 -1
- 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/controller/control/panel-item/i-panel-data-container.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/panel-item/i-panel-data-container.controller.d.ts.map +1 -1
- 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/logic-scheduler/trigger/timer-trigger.d.ts +1 -2
- package/out/logic-scheduler/trigger/timer-trigger.d.ts.map +1 -1
- 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/service/work-flow/work-flow.service.d.ts +11 -0
- package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
- package/out/service/service/work-flow/work-flow.service.js +15 -0
- 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 +7 -7
- 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/i-panel.controller.ts +8 -0
- package/src/interface/controller/controller/control/index.ts +1 -0
- package/src/interface/controller/controller/control/panel-item/i-panel-data-container.controller.ts +8 -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/logic-scheduler/trigger/timer-trigger.ts +2 -2
- package/src/service/dto/method.dto.ts +1 -2
- package/src/service/service/entity/method/method.ts +3 -1
- package/src/service/service/work-flow/work-flow.service.ts +28 -0
- 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
|
|
|
@@ -11007,6 +11009,25 @@ var WorkFlowService = class {
|
|
|
11007
11009
|
}
|
|
11008
11010
|
);
|
|
11009
11011
|
}
|
|
11012
|
+
/**
|
|
11013
|
+
* 后加签
|
|
11014
|
+
*
|
|
11015
|
+
* @author lxm
|
|
11016
|
+
* @date 2022-09-30 17:09:51
|
|
11017
|
+
* @param {IParams} context 路径参数
|
|
11018
|
+
* @param {IParams} params 请求参数
|
|
11019
|
+
* @param {IData} data 数据
|
|
11020
|
+
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
11021
|
+
*/
|
|
11022
|
+
async wfAddStepAfter(context, params, data) {
|
|
11023
|
+
return ibiz.net.post(
|
|
11024
|
+
"".concat(this.getBaseUrl(), "/").concat(context[this.model.codeName.toLowerCase()], "/tasks/").concat(params.taskId, "/aftersign"),
|
|
11025
|
+
{
|
|
11026
|
+
...params,
|
|
11027
|
+
activedata: this.getActiveData(data, context)
|
|
11028
|
+
}
|
|
11029
|
+
);
|
|
11030
|
+
}
|
|
11010
11031
|
/**
|
|
11011
11032
|
* 回退
|
|
11012
11033
|
*
|
|
@@ -11066,6 +11087,8 @@ var WorkFlowService = class {
|
|
|
11066
11087
|
return this.wfReassign(context, params, data);
|
|
11067
11088
|
case "addstepbefore":
|
|
11068
11089
|
return this.wfAddStepBefore(context, params, data);
|
|
11090
|
+
case "addstepafter":
|
|
11091
|
+
return this.wfAddStepAfter(context, params, data);
|
|
11069
11092
|
case "sendback":
|
|
11070
11093
|
return this.wfSendBack(context, params, data);
|
|
11071
11094
|
case "sendcopy":
|
|
@@ -11118,7 +11141,7 @@ import {
|
|
|
11118
11141
|
|
|
11119
11142
|
// src/service/service/entity/method/method.ts
|
|
11120
11143
|
import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
11121
|
-
import { notNilEmpty as
|
|
11144
|
+
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
11122
11145
|
|
|
11123
11146
|
// src/service/app-data-entity/app-data-entity.ts
|
|
11124
11147
|
import { clone as clone4 } from "ramda";
|
|
@@ -11290,7 +11313,6 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
11290
11313
|
|
|
11291
11314
|
// src/service/dto/method.dto.ts
|
|
11292
11315
|
import { ModelError as ModelError7 } from "@ibiz-template/core";
|
|
11293
|
-
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
11294
11316
|
var MethodDto = class _MethodDto {
|
|
11295
11317
|
constructor(entity, isLocalMode2, dto) {
|
|
11296
11318
|
this.entity = entity;
|
|
@@ -11323,7 +11345,7 @@ var MethodDto = class _MethodDto {
|
|
|
11323
11345
|
break;
|
|
11324
11346
|
}
|
|
11325
11347
|
case "DTOS": {
|
|
11326
|
-
if (
|
|
11348
|
+
if (data[key] !== void 0) {
|
|
11327
11349
|
break;
|
|
11328
11350
|
}
|
|
11329
11351
|
if (!field.refAppDataEntityId) {
|
|
@@ -11551,18 +11573,20 @@ var Method = class {
|
|
|
11551
11573
|
case "POST":
|
|
11552
11574
|
res = await this.app.net.post(
|
|
11553
11575
|
"".concat(path2, "/").concat(methodName),
|
|
11554
|
-
|
|
11576
|
+
notNilEmpty5(data) ? data : params
|
|
11555
11577
|
);
|
|
11556
11578
|
break;
|
|
11557
11579
|
case "GET":
|
|
11558
11580
|
res = await this.app.net.get("".concat(path2, "/").concat(methodName), data);
|
|
11559
11581
|
break;
|
|
11560
|
-
case "PUT":
|
|
11582
|
+
case "PUT": {
|
|
11561
11583
|
res = await this.app.net.put(
|
|
11562
11584
|
"".concat(path2, "/").concat(methodName),
|
|
11563
|
-
|
|
11585
|
+
notNilEmpty5(data) ? data : params
|
|
11564
11586
|
);
|
|
11587
|
+
const entity = this.createEntity(data);
|
|
11565
11588
|
break;
|
|
11589
|
+
}
|
|
11566
11590
|
case "DELETE":
|
|
11567
11591
|
res = await this.app.net.delete("".concat(path2, "/").concat(methodName), data);
|
|
11568
11592
|
break;
|
|
@@ -12039,10 +12063,14 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
12039
12063
|
return void 0;
|
|
12040
12064
|
case "SRCVALUE":
|
|
12041
12065
|
return srcValue;
|
|
12066
|
+
case "WEBCONTEXT":
|
|
12042
12067
|
case "VIEWPARAM":
|
|
12043
12068
|
value = ctx.viewParams;
|
|
12044
12069
|
break;
|
|
12070
|
+
case "APPLICATION":
|
|
12071
|
+
case "SESSION":
|
|
12045
12072
|
case "APPDATA":
|
|
12073
|
+
case "DATACONTEXT":
|
|
12046
12074
|
value = ctx.context;
|
|
12047
12075
|
break;
|
|
12048
12076
|
case "ENVPARAM":
|
|
@@ -13189,6 +13217,7 @@ var DEService = class {
|
|
|
13189
13217
|
};
|
|
13190
13218
|
|
|
13191
13219
|
// src/service/vo/control.vo.ts
|
|
13220
|
+
import { DataTypes } from "@ibiz-template/core";
|
|
13192
13221
|
import { clone as clone10, isNil as isNil8 } from "ramda";
|
|
13193
13222
|
var ControlVO = class _ControlVO {
|
|
13194
13223
|
/**
|
|
@@ -13284,7 +13313,8 @@ var ControlVO = class _ControlVO {
|
|
|
13284
13313
|
});
|
|
13285
13314
|
this.$dataUIMap.forEach((mapField, key) => {
|
|
13286
13315
|
const value = mapField.dataKey;
|
|
13287
|
-
|
|
13316
|
+
const forceNumber = mapField.dataType !== void 0 && DataTypes.isNumber(mapField.dataType);
|
|
13317
|
+
this.linkProperty(key, value, mapField.isOriginField, forceNumber);
|
|
13288
13318
|
});
|
|
13289
13319
|
Object.keys($origin).forEach((value) => {
|
|
13290
13320
|
if (!Object.prototype.hasOwnProperty.call(this, value)) {
|
|
@@ -13301,10 +13331,11 @@ var ControlVO = class _ControlVO {
|
|
|
13301
13331
|
* @param {string} uiKey 界面字段
|
|
13302
13332
|
* @param {string} dataKey 数据字段
|
|
13303
13333
|
* @param {boolean} [isOriginField=true] 是否是后台存储字段,是的话存取都在$origin里
|
|
13334
|
+
* @param {boolean} [forceNumber=false] 是否强制转换成数值,是的话set的时候转成数值
|
|
13304
13335
|
* @returns {*}
|
|
13305
13336
|
*/
|
|
13306
|
-
linkProperty(uiKey, dataKey, isOriginField = true) {
|
|
13307
|
-
if (uiKey === "srfuf"
|
|
13337
|
+
linkProperty(uiKey, dataKey, isOriginField = true, forceNumber = false) {
|
|
13338
|
+
if (uiKey === "srfuf") {
|
|
13308
13339
|
return;
|
|
13309
13340
|
}
|
|
13310
13341
|
if (isOriginField || Object.prototype.hasOwnProperty.call(this.$origin, uiKey)) {
|
|
@@ -13312,10 +13343,15 @@ var ControlVO = class _ControlVO {
|
|
|
13312
13343
|
enumerable: true,
|
|
13313
13344
|
configurable: true,
|
|
13314
13345
|
get() {
|
|
13315
|
-
return this.$origin[dataKey];
|
|
13346
|
+
return uiKey === "srfkey" ? this.$origin[dataKey] || this.$origin[uiKey] : this.$origin[dataKey];
|
|
13316
13347
|
},
|
|
13317
13348
|
set(val) {
|
|
13318
|
-
|
|
13349
|
+
let val2 = forceNumber && !isNil8(val) ? Number(val) : val;
|
|
13350
|
+
if (Number.isNaN(val2)) {
|
|
13351
|
+
val2 = val;
|
|
13352
|
+
ibiz.log.error("".concat(val, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
13353
|
+
}
|
|
13354
|
+
this.$origin[dataKey] = val2;
|
|
13319
13355
|
}
|
|
13320
13356
|
});
|
|
13321
13357
|
} else {
|
|
@@ -14020,6 +14056,9 @@ var UIMapField = class {
|
|
|
14020
14056
|
if (!isNil9(opts.isOriginField)) {
|
|
14021
14057
|
this.isOriginField = opts.isOriginField;
|
|
14022
14058
|
}
|
|
14059
|
+
if (!isNil9(opts.dataType)) {
|
|
14060
|
+
this.dataType = opts.dataType;
|
|
14061
|
+
}
|
|
14023
14062
|
}
|
|
14024
14063
|
};
|
|
14025
14064
|
|
|
@@ -14188,7 +14227,7 @@ var DEServiceUtil = class {
|
|
|
14188
14227
|
};
|
|
14189
14228
|
|
|
14190
14229
|
// src/app-hub.ts
|
|
14191
|
-
import { RuntimeError as
|
|
14230
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
14192
14231
|
|
|
14193
14232
|
// src/application.ts
|
|
14194
14233
|
import { Net } from "@ibiz-template/core";
|
|
@@ -14430,7 +14469,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
14430
14469
|
})(PanelNotifyState || {});
|
|
14431
14470
|
|
|
14432
14471
|
// src/controller/common/view/view.controller.ts
|
|
14433
|
-
import { createUUID as createUUID2, notNilEmpty as
|
|
14472
|
+
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
14434
14473
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
14435
14474
|
import { isEmpty as isEmpty8, isNil as isNil12, isNotNil as isNotNil2 } from "ramda";
|
|
14436
14475
|
|
|
@@ -14586,6 +14625,14 @@ var CTX = class {
|
|
|
14586
14625
|
*/
|
|
14587
14626
|
constructor(parent) {
|
|
14588
14627
|
this.parent = parent;
|
|
14628
|
+
/**
|
|
14629
|
+
* 是否已经销毁
|
|
14630
|
+
*
|
|
14631
|
+
* @author chitanda
|
|
14632
|
+
* @date 2023-09-11 11:09:57
|
|
14633
|
+
* @protected
|
|
14634
|
+
*/
|
|
14635
|
+
this.isDestroyed = false;
|
|
14589
14636
|
/**
|
|
14590
14637
|
* CTX事件
|
|
14591
14638
|
* @author lxm
|
|
@@ -14622,6 +14669,7 @@ var CTX = class {
|
|
|
14622
14669
|
this.controllersMap.clear();
|
|
14623
14670
|
this.view = null;
|
|
14624
14671
|
this.state = null;
|
|
14672
|
+
this.isDestroyed = true;
|
|
14625
14673
|
}
|
|
14626
14674
|
/**
|
|
14627
14675
|
* 修改上下文环境状态
|
|
@@ -14647,6 +14695,9 @@ var CTX = class {
|
|
|
14647
14695
|
* @date 2023-03-27 01:59:35
|
|
14648
14696
|
*/
|
|
14649
14697
|
endLoading() {
|
|
14698
|
+
if (this.isDestroyed) {
|
|
14699
|
+
return;
|
|
14700
|
+
}
|
|
14650
14701
|
this.view.endLoading();
|
|
14651
14702
|
}
|
|
14652
14703
|
/**
|
|
@@ -15559,13 +15610,13 @@ var ViewController = class extends BaseController {
|
|
|
15559
15610
|
}
|
|
15560
15611
|
const navContexts = this.model.appViewNavContexts;
|
|
15561
15612
|
let context = {};
|
|
15562
|
-
if (
|
|
15613
|
+
if (notNilEmpty6(navContexts)) {
|
|
15563
15614
|
context = convertNavData(navContexts, this.context, this.params);
|
|
15564
15615
|
}
|
|
15565
15616
|
Object.assign(this.context, context);
|
|
15566
15617
|
const navParams = this.model.appViewNavParams;
|
|
15567
15618
|
let params = {};
|
|
15568
|
-
if (
|
|
15619
|
+
if (notNilEmpty6(navParams)) {
|
|
15569
15620
|
params = convertNavData(navParams, this.context, this.params);
|
|
15570
15621
|
}
|
|
15571
15622
|
Object.assign(this.params, params);
|
|
@@ -17824,17 +17875,17 @@ var CaptionBarController = class extends ControlController {
|
|
|
17824
17875
|
import { recursiveIterate } from "@ibiz-template/core";
|
|
17825
17876
|
|
|
17826
17877
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
17827
|
-
import { RuntimeModelError as
|
|
17878
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
17828
17879
|
import { isArray as isArray3 } from "qx-util";
|
|
17829
17880
|
|
|
17830
17881
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
17831
|
-
import { RuntimeModelError as
|
|
17882
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
17832
17883
|
|
|
17833
17884
|
// src/ui-logic/index.ts
|
|
17834
|
-
import { RuntimeError as
|
|
17885
|
+
import { RuntimeError as RuntimeError33 } from "@ibiz-template/core";
|
|
17835
17886
|
|
|
17836
17887
|
// src/ui-logic/ui-logic.ts
|
|
17837
|
-
import { ModelError as ModelError23, RuntimeModelError as
|
|
17888
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
17838
17889
|
|
|
17839
17890
|
// src/ui-logic/ui-logic-context.ts
|
|
17840
17891
|
var UILogicContext = class {
|
|
@@ -17979,7 +18030,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
17979
18030
|
this.dstParam = model.dstLogicParamId;
|
|
17980
18031
|
}
|
|
17981
18032
|
get dstField() {
|
|
17982
|
-
return this.model.dstFieldName
|
|
18033
|
+
return this.model.dstFieldName;
|
|
17983
18034
|
}
|
|
17984
18035
|
get op() {
|
|
17985
18036
|
return this.model.condOP;
|
|
@@ -18287,6 +18338,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18287
18338
|
|
|
18288
18339
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
18289
18340
|
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
18341
|
+
import { clone as clone13 } from "ramda";
|
|
18290
18342
|
|
|
18291
18343
|
// src/ui-logic/utils/handle-src-val.ts
|
|
18292
18344
|
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
@@ -18305,10 +18357,14 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18305
18357
|
return void 0;
|
|
18306
18358
|
case "SRCVALUE":
|
|
18307
18359
|
return srcValue;
|
|
18360
|
+
case "WEBCONTEXT":
|
|
18308
18361
|
case "VIEWPARAM":
|
|
18309
18362
|
value = ctx.viewParams;
|
|
18310
18363
|
break;
|
|
18364
|
+
case "APPLICATION":
|
|
18365
|
+
case "SESSION":
|
|
18311
18366
|
case "APPDATA":
|
|
18367
|
+
case "DATACONTEXT":
|
|
18312
18368
|
value = ctx.context;
|
|
18313
18369
|
break;
|
|
18314
18370
|
case "ENVPARAM":
|
|
@@ -18317,7 +18373,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18317
18373
|
default:
|
|
18318
18374
|
throw new ModelError19(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
18319
18375
|
}
|
|
18320
|
-
const srcField = srcFieldName
|
|
18376
|
+
const srcField = srcFieldName;
|
|
18321
18377
|
if (value && srcField) {
|
|
18322
18378
|
value = value[srcField];
|
|
18323
18379
|
}
|
|
@@ -18328,20 +18384,38 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18328
18384
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
18329
18385
|
async exec(ctx) {
|
|
18330
18386
|
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
|
-
|
|
18387
|
+
if (!(nodeParams == null ? void 0 : nodeParams.length)) {
|
|
18388
|
+
return;
|
|
18389
|
+
}
|
|
18390
|
+
for (const nodeParam of nodeParams) {
|
|
18391
|
+
switch (nodeParam.paramAction) {
|
|
18392
|
+
case "SETPARAMVALUE":
|
|
18393
|
+
await this.setParamValue(nodeParam, ctx);
|
|
18394
|
+
break;
|
|
18395
|
+
case "RESETPARAM":
|
|
18396
|
+
await this.resetParam(nodeParam, ctx);
|
|
18397
|
+
break;
|
|
18398
|
+
case "COPYPARAM":
|
|
18399
|
+
await this.copyParam(nodeParam, ctx);
|
|
18400
|
+
break;
|
|
18401
|
+
case "BINDPARAM":
|
|
18402
|
+
await this.bindParam(nodeParam, ctx);
|
|
18403
|
+
break;
|
|
18404
|
+
case "RENEWPARAM":
|
|
18405
|
+
await this.renewParam(nodeParam, ctx);
|
|
18406
|
+
break;
|
|
18407
|
+
case "APPENDPARAM":
|
|
18408
|
+
await this.appendParam(nodeParam, ctx);
|
|
18409
|
+
break;
|
|
18410
|
+
case "SORTPARAM":
|
|
18411
|
+
await this.sortParam(nodeParam, ctx);
|
|
18412
|
+
break;
|
|
18413
|
+
default:
|
|
18414
|
+
throw new ModelError20(
|
|
18415
|
+
nodeParam,
|
|
18416
|
+
"\u6682\u672A\u652F\u6301\u903B\u8F91\u5904\u7406\u53C2\u6570\u64CD\u4F5C".concat(nodeParam.paramAction)
|
|
18417
|
+
);
|
|
18418
|
+
}
|
|
18345
18419
|
}
|
|
18346
18420
|
}
|
|
18347
18421
|
/**
|
|
@@ -18350,11 +18424,11 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18350
18424
|
* @date 2023-03-17 03:34:02
|
|
18351
18425
|
* @protected
|
|
18352
18426
|
* @param {IPSDELogicNodeParam} nodeParam
|
|
18353
|
-
* @param {
|
|
18427
|
+
* @param {UILogicContext} ctx
|
|
18354
18428
|
*/
|
|
18355
18429
|
setParamValue(nodeParam, ctx) {
|
|
18356
18430
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
18357
|
-
const dstField = dstFieldName
|
|
18431
|
+
const dstField = dstFieldName;
|
|
18358
18432
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18359
18433
|
if (dstField) {
|
|
18360
18434
|
ctx.params[dstDEUILogicParamId][dstField] = srcVal;
|
|
@@ -18362,6 +18436,92 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18362
18436
|
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
18363
18437
|
}
|
|
18364
18438
|
}
|
|
18439
|
+
/**
|
|
18440
|
+
* 拷贝变量
|
|
18441
|
+
* @author lxm
|
|
18442
|
+
* @date 2023-03-24 09:50:02
|
|
18443
|
+
* @protected
|
|
18444
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18445
|
+
* @param {UILogicContext} ctx
|
|
18446
|
+
* @return {*} {*}
|
|
18447
|
+
*/
|
|
18448
|
+
copyParam(nodeParam, ctx) {
|
|
18449
|
+
const { dstDEUILogicParamId } = nodeParam;
|
|
18450
|
+
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18451
|
+
ctx.params[dstDEUILogicParamId] = clone13(srcVal);
|
|
18452
|
+
}
|
|
18453
|
+
/**
|
|
18454
|
+
* 绑定参数
|
|
18455
|
+
* @author lxm
|
|
18456
|
+
* @date 2023-06-13 05:43:43
|
|
18457
|
+
* @protected
|
|
18458
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18459
|
+
* @param {UILogicContext} ctx
|
|
18460
|
+
*/
|
|
18461
|
+
bindParam(nodeParam, ctx) {
|
|
18462
|
+
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18463
|
+
ctx.params[nodeParam.dstDEUILogicParamId] = srcVal;
|
|
18464
|
+
}
|
|
18465
|
+
/**
|
|
18466
|
+
* 重置变量
|
|
18467
|
+
* @author lxm
|
|
18468
|
+
* @date 2023-03-24 09:46:57
|
|
18469
|
+
* @protected
|
|
18470
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18471
|
+
* @param {UILogicContext} ctx
|
|
18472
|
+
*/
|
|
18473
|
+
resetParam(nodeParam, ctx) {
|
|
18474
|
+
const { dstDEUILogicParamId } = nodeParam;
|
|
18475
|
+
ctx.resetParam(dstDEUILogicParamId);
|
|
18476
|
+
}
|
|
18477
|
+
/**
|
|
18478
|
+
* 重新建立变量
|
|
18479
|
+
* @author lxm
|
|
18480
|
+
* @date 2023-03-24 09:46:47
|
|
18481
|
+
* @protected
|
|
18482
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18483
|
+
* @param {UILogicContext} ctx
|
|
18484
|
+
*/
|
|
18485
|
+
renewParam(nodeParam, ctx) {
|
|
18486
|
+
const { dstDEUILogicParamId } = nodeParam;
|
|
18487
|
+
ctx.renewParam(dstDEUILogicParamId);
|
|
18488
|
+
}
|
|
18489
|
+
/**
|
|
18490
|
+
* 附加到数组变量
|
|
18491
|
+
* @author lxm
|
|
18492
|
+
* @date 2023-03-24 09:46:47
|
|
18493
|
+
* @protected
|
|
18494
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18495
|
+
* @param {UILogicContext} ctx
|
|
18496
|
+
*/
|
|
18497
|
+
appendParam(nodeParam, ctx) {
|
|
18498
|
+
const { dstDEUILogicParamId, dstIndex, srcIndex, srcSize } = nodeParam;
|
|
18499
|
+
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18500
|
+
const insertIndex = dstIndex || 0;
|
|
18501
|
+
const _srcIndex = srcIndex || 0;
|
|
18502
|
+
const _srcSize = srcSize || srcVal.length;
|
|
18503
|
+
ctx.params[dstDEUILogicParamId].splice(
|
|
18504
|
+
insertIndex,
|
|
18505
|
+
0,
|
|
18506
|
+
...srcVal.slice(_srcIndex, _srcSize)
|
|
18507
|
+
);
|
|
18508
|
+
}
|
|
18509
|
+
/**
|
|
18510
|
+
* 排序数组变量
|
|
18511
|
+
* @author lxm
|
|
18512
|
+
* @date 2023-03-24 10:23:01
|
|
18513
|
+
* @protected
|
|
18514
|
+
* @param {IDEUILogicNodeParam} nodeParam
|
|
18515
|
+
* @param {UILogicContext} ctx
|
|
18516
|
+
*/
|
|
18517
|
+
sortParam(nodeParam, ctx) {
|
|
18518
|
+
const { dstDEUILogicParamId, dstFieldName, dstSortDir } = nodeParam;
|
|
18519
|
+
const key = dstFieldName;
|
|
18520
|
+
const arr = ctx.params[dstDEUILogicParamId];
|
|
18521
|
+
arr.sort((a, b) => {
|
|
18522
|
+
return dstSortDir === "ASC" ? a[key] - b[key] : b[key] - a[key];
|
|
18523
|
+
});
|
|
18524
|
+
}
|
|
18365
18525
|
};
|
|
18366
18526
|
|
|
18367
18527
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
@@ -18491,8 +18651,190 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
18491
18651
|
}
|
|
18492
18652
|
};
|
|
18493
18653
|
|
|
18654
|
+
// src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
|
|
18655
|
+
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
18656
|
+
var ResetParamNode2 = class extends UILogicNode {
|
|
18657
|
+
async exec(ctx) {
|
|
18658
|
+
const { dstDEUILogicParamId } = this.model;
|
|
18659
|
+
if (!dstDEUILogicParamId) {
|
|
18660
|
+
throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18661
|
+
}
|
|
18662
|
+
ctx.resetParam(dstDEUILogicParamId);
|
|
18663
|
+
}
|
|
18664
|
+
};
|
|
18665
|
+
|
|
18666
|
+
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
18667
|
+
import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
18668
|
+
import { clone as clone14 } from "ramda";
|
|
18669
|
+
var CopyParamNode2 = class extends UILogicNode {
|
|
18670
|
+
async exec(ctx) {
|
|
18671
|
+
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
18672
|
+
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18673
|
+
throw new RuntimeModelError36(
|
|
18674
|
+
this.model,
|
|
18675
|
+
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18676
|
+
);
|
|
18677
|
+
}
|
|
18678
|
+
const srcVal = handleSrcVal2(ctx, this.model);
|
|
18679
|
+
ctx.params[dstDEUILogicParamId] = clone14(srcVal);
|
|
18680
|
+
}
|
|
18681
|
+
};
|
|
18682
|
+
|
|
18683
|
+
// src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
|
|
18684
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
18685
|
+
var AppendParamNode2 = class extends UILogicNode {
|
|
18686
|
+
async exec(ctx) {
|
|
18687
|
+
const {
|
|
18688
|
+
dstDEUILogicParamId,
|
|
18689
|
+
srcDEUILogicParamId,
|
|
18690
|
+
dstIndex,
|
|
18691
|
+
srcIndex,
|
|
18692
|
+
srcSize
|
|
18693
|
+
} = this.model;
|
|
18694
|
+
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18695
|
+
throw new RuntimeModelError37(
|
|
18696
|
+
this.model,
|
|
18697
|
+
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18698
|
+
);
|
|
18699
|
+
}
|
|
18700
|
+
const srcVal = handleSrcVal2(ctx, this.model);
|
|
18701
|
+
const insertIndex = dstIndex || 0;
|
|
18702
|
+
const _srcIndex = srcIndex || 0;
|
|
18703
|
+
const _srcSize = srcSize || srcVal.length;
|
|
18704
|
+
ctx.params[dstDEUILogicParamId].splice(
|
|
18705
|
+
insertIndex,
|
|
18706
|
+
0,
|
|
18707
|
+
...srcVal.slice(_srcIndex, _srcSize)
|
|
18708
|
+
);
|
|
18709
|
+
}
|
|
18710
|
+
};
|
|
18711
|
+
|
|
18712
|
+
// src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
|
|
18713
|
+
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
18714
|
+
var SortParamNode2 = class extends UILogicNode {
|
|
18715
|
+
async exec(ctx) {
|
|
18716
|
+
const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
18717
|
+
if (!dstDEUILogicParamId || !dstFieldName) {
|
|
18718
|
+
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
18719
|
+
}
|
|
18720
|
+
const key = dstFieldName;
|
|
18721
|
+
const arr = ctx.params[dstDEUILogicParamId];
|
|
18722
|
+
arr.sort((a, b) => {
|
|
18723
|
+
return dstSortDir === "ASC" ? a[key] - b[key] : b[key] - a[key];
|
|
18724
|
+
});
|
|
18725
|
+
}
|
|
18726
|
+
};
|
|
18727
|
+
|
|
18728
|
+
// src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
|
|
18729
|
+
import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
18730
|
+
var RenewParamNode2 = class extends UILogicNode {
|
|
18731
|
+
async exec(ctx) {
|
|
18732
|
+
const { dstDEUILogicParamId } = this.model;
|
|
18733
|
+
if (!dstDEUILogicParamId) {
|
|
18734
|
+
throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18735
|
+
}
|
|
18736
|
+
ctx.renewParam(dstDEUILogicParamId);
|
|
18737
|
+
}
|
|
18738
|
+
};
|
|
18739
|
+
|
|
18740
|
+
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
18741
|
+
var DataSetNode2 = class extends UILogicNode {
|
|
18742
|
+
async exec(ctx) {
|
|
18743
|
+
const {
|
|
18744
|
+
dstAppDEDataSetId,
|
|
18745
|
+
dstAppDataEntityId,
|
|
18746
|
+
dstDEUILogicParamId,
|
|
18747
|
+
retDEUILogicParamId
|
|
18748
|
+
} = this.model;
|
|
18749
|
+
const requestData = ctx.params[dstDEUILogicParamId];
|
|
18750
|
+
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
18751
|
+
const res = await app.deService.exec(
|
|
18752
|
+
dstAppDataEntityId,
|
|
18753
|
+
dstAppDEDataSetId,
|
|
18754
|
+
ctx.context,
|
|
18755
|
+
requestData,
|
|
18756
|
+
ctx.viewParams
|
|
18757
|
+
);
|
|
18758
|
+
if (res.ok) {
|
|
18759
|
+
ctx.params[retDEUILogicParamId] = res.data;
|
|
18760
|
+
}
|
|
18761
|
+
}
|
|
18762
|
+
};
|
|
18763
|
+
|
|
18764
|
+
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
18765
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
18766
|
+
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
18767
|
+
async exec(_ctx) {
|
|
18768
|
+
const { errorInfo } = this.model;
|
|
18769
|
+
throw new RuntimeError30(errorInfo);
|
|
18770
|
+
}
|
|
18771
|
+
};
|
|
18772
|
+
|
|
18773
|
+
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
18774
|
+
import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
18775
|
+
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
18776
|
+
async exec(ctx) {
|
|
18777
|
+
ctx.isEndNode = true;
|
|
18778
|
+
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
18779
|
+
if (!fireCtrlId) {
|
|
18780
|
+
throw new RuntimeModelError40(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
18781
|
+
}
|
|
18782
|
+
if (!eventName) {
|
|
18783
|
+
throw new RuntimeModelError40(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
18784
|
+
}
|
|
18785
|
+
if (!eventParamId) {
|
|
18786
|
+
throw new RuntimeModelError40(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
18787
|
+
}
|
|
18788
|
+
const invokeCtrl = ctx.params[fireCtrlId];
|
|
18789
|
+
if (!invokeCtrl) {
|
|
18790
|
+
throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
18791
|
+
}
|
|
18792
|
+
const eventParam = ctx.params[eventParamId];
|
|
18793
|
+
if (!eventParam) {
|
|
18794
|
+
throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
18795
|
+
}
|
|
18796
|
+
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
18797
|
+
}
|
|
18798
|
+
};
|
|
18799
|
+
|
|
18800
|
+
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
18801
|
+
import { RuntimeError as RuntimeError32, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
18802
|
+
var ExecuteDELogicNode = class extends UILogicNode {
|
|
18803
|
+
async exec(ctx) {
|
|
18804
|
+
const {
|
|
18805
|
+
dstAppDELogicId,
|
|
18806
|
+
dstAppDataEntityId,
|
|
18807
|
+
dstDEUILogicParamId,
|
|
18808
|
+
retDEUILogicParamId
|
|
18809
|
+
} = this.model;
|
|
18810
|
+
if (!dstAppDataEntityId) {
|
|
18811
|
+
throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
18812
|
+
}
|
|
18813
|
+
if (!dstAppDELogicId) {
|
|
18814
|
+
throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
18815
|
+
}
|
|
18816
|
+
if (!dstDEUILogicParamId) {
|
|
18817
|
+
throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
18818
|
+
}
|
|
18819
|
+
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
18820
|
+
if (!dstParam) {
|
|
18821
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
18822
|
+
}
|
|
18823
|
+
const result = await execDELogicById(
|
|
18824
|
+
dstAppDELogicId,
|
|
18825
|
+
dstAppDataEntityId,
|
|
18826
|
+
dstParam.context,
|
|
18827
|
+
dstParam.data,
|
|
18828
|
+
dstParam.params
|
|
18829
|
+
);
|
|
18830
|
+
if (retDEUILogicParamId) {
|
|
18831
|
+
ctx.params[retDEUILogicParamId] = result;
|
|
18832
|
+
}
|
|
18833
|
+
}
|
|
18834
|
+
};
|
|
18835
|
+
|
|
18494
18836
|
// src/ui-logic/ui-logic-param/ui-logic-param.ts
|
|
18495
|
-
import { ModelError as ModelError22
|
|
18837
|
+
import { ModelError as ModelError22 } from "@ibiz-template/core";
|
|
18496
18838
|
var UILogicParam = class {
|
|
18497
18839
|
/**
|
|
18498
18840
|
* Creates an instance of UILogicParam.
|
|
@@ -18527,10 +18869,7 @@ var UILogicParam = class {
|
|
|
18527
18869
|
if (control) {
|
|
18528
18870
|
ctx.params[tag] = control;
|
|
18529
18871
|
} 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
|
-
);
|
|
18872
|
+
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
18873
|
}
|
|
18535
18874
|
} else if (m.activeViewParam) {
|
|
18536
18875
|
ctx.params[tag] = parameters.view;
|
|
@@ -18611,7 +18950,7 @@ var UILogic = class {
|
|
|
18611
18950
|
this.params = /* @__PURE__ */ new Map();
|
|
18612
18951
|
var _a;
|
|
18613
18952
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
18614
|
-
throw new
|
|
18953
|
+
throw new RuntimeModelError42(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
18615
18954
|
}
|
|
18616
18955
|
model.deuilogicNodes.forEach((node) => {
|
|
18617
18956
|
const { logicNodeType } = node;
|
|
@@ -18632,6 +18971,12 @@ var UILogic = class {
|
|
|
18632
18971
|
case "PREPAREJSPARAM":
|
|
18633
18972
|
logicNode = new PrepareJSParamNode(node);
|
|
18634
18973
|
break;
|
|
18974
|
+
case "RESETPARAM":
|
|
18975
|
+
logicNode = new ResetParamNode2(node);
|
|
18976
|
+
break;
|
|
18977
|
+
case "COPYPARAM":
|
|
18978
|
+
logicNode = new CopyParamNode2(node);
|
|
18979
|
+
break;
|
|
18635
18980
|
case "BINDPARAM":
|
|
18636
18981
|
logicNode = new BindParamNode2(node);
|
|
18637
18982
|
break;
|
|
@@ -18644,16 +18989,28 @@ var UILogic = class {
|
|
|
18644
18989
|
case "DEBUGPARAM":
|
|
18645
18990
|
logicNode = new DebugParamNode(node);
|
|
18646
18991
|
break;
|
|
18647
|
-
case "RESETPARAM":
|
|
18648
|
-
case "COPYPARAM":
|
|
18649
|
-
case "VIEWCTRLFIREEVENT":
|
|
18650
18992
|
case "APPENDPARAM":
|
|
18993
|
+
logicNode = new AppendParamNode2(node);
|
|
18994
|
+
break;
|
|
18651
18995
|
case "SORTPARAM":
|
|
18996
|
+
logicNode = new SortParamNode2(node);
|
|
18997
|
+
break;
|
|
18652
18998
|
case "RENEWPARAM":
|
|
18653
|
-
|
|
18999
|
+
logicNode = new RenewParamNode2(node);
|
|
19000
|
+
break;
|
|
18654
19001
|
case "DEDATASET":
|
|
18655
|
-
|
|
19002
|
+
logicNode = new DataSetNode2(node);
|
|
19003
|
+
break;
|
|
18656
19004
|
case "THROWEXCEPTION":
|
|
19005
|
+
logicNode = new ThrowExceptionNode2(node);
|
|
19006
|
+
break;
|
|
19007
|
+
case "VIEWCTRLFIREEVENT":
|
|
19008
|
+
logicNode = new ViewCtrlFireEventNode(node);
|
|
19009
|
+
break;
|
|
19010
|
+
case "DELOGIC":
|
|
19011
|
+
logicNode = new ExecuteDELogicNode(node);
|
|
19012
|
+
break;
|
|
19013
|
+
case "PFPLUGIN":
|
|
18657
19014
|
default:
|
|
18658
19015
|
throw new ModelError23(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
|
|
18659
19016
|
}
|
|
@@ -18708,7 +19065,7 @@ var UILogic = class {
|
|
|
18708
19065
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
18709
19066
|
await this.deepExec(start, ctx);
|
|
18710
19067
|
} else {
|
|
18711
|
-
throw new
|
|
19068
|
+
throw new RuntimeModelError42(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
18712
19069
|
}
|
|
18713
19070
|
if (ctx.isEndNode) {
|
|
18714
19071
|
return ctx.result;
|
|
@@ -18754,7 +19111,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18754
19111
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
18755
19112
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
18756
19113
|
if (!deUILogic) {
|
|
18757
|
-
throw new
|
|
19114
|
+
throw new RuntimeError33(
|
|
18758
19115
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
18759
19116
|
);
|
|
18760
19117
|
}
|
|
@@ -18767,7 +19124,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18767
19124
|
}
|
|
18768
19125
|
|
|
18769
19126
|
// src/ui-action/uiaction-util.ts
|
|
18770
|
-
import { RuntimeError as
|
|
19127
|
+
import { RuntimeError as RuntimeError34 } from "@ibiz-template/core";
|
|
18771
19128
|
var UIActionUtil = class {
|
|
18772
19129
|
/**
|
|
18773
19130
|
* 执行界面行为
|
|
@@ -18782,7 +19139,7 @@ var UIActionUtil = class {
|
|
|
18782
19139
|
static async exec(actionId, params) {
|
|
18783
19140
|
const action = await getUIActionById(actionId);
|
|
18784
19141
|
if (!action) {
|
|
18785
|
-
throw new
|
|
19142
|
+
throw new RuntimeError34("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
18786
19143
|
}
|
|
18787
19144
|
const provider = await getUIActionProvider(action);
|
|
18788
19145
|
return provider.exec(action, params);
|
|
@@ -18838,7 +19195,7 @@ var UIActionProviderBase = class {
|
|
|
18838
19195
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
18839
19196
|
if (uilogicAttachMode === "REPLACE") {
|
|
18840
19197
|
if (!appDEUILogicId) {
|
|
18841
|
-
throw new
|
|
19198
|
+
throw new RuntimeModelError43(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18842
19199
|
}
|
|
18843
19200
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18844
19201
|
return result;
|
|
@@ -18865,7 +19222,7 @@ var UIActionProviderBase = class {
|
|
|
18865
19222
|
}
|
|
18866
19223
|
if (action.uilogicAttachMode === "AFTER") {
|
|
18867
19224
|
if (!appDEUILogicId) {
|
|
18868
|
-
throw new
|
|
19225
|
+
throw new RuntimeModelError43(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18869
19226
|
}
|
|
18870
19227
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18871
19228
|
}
|
|
@@ -18999,7 +19356,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18999
19356
|
const entityName = action.appDataEntityId;
|
|
19000
19357
|
const methodName = action.appDEMethodId;
|
|
19001
19358
|
if (!entityName || !methodName) {
|
|
19002
|
-
throw new
|
|
19359
|
+
throw new RuntimeModelError44(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
19003
19360
|
}
|
|
19004
19361
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
19005
19362
|
action,
|
|
@@ -19111,7 +19468,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
19111
19468
|
};
|
|
19112
19469
|
|
|
19113
19470
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
19114
|
-
import { StringUtil, RuntimeModelError as
|
|
19471
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError45, ModelError as ModelError24 } from "@ibiz-template/core";
|
|
19115
19472
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
19116
19473
|
async execAction(action, args) {
|
|
19117
19474
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -19126,7 +19483,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19126
19483
|
case "WIZARD": {
|
|
19127
19484
|
const frontPSAppView = action.frontAppViewId;
|
|
19128
19485
|
if (!frontPSAppView) {
|
|
19129
|
-
throw new
|
|
19486
|
+
throw new RuntimeModelError45(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
19130
19487
|
}
|
|
19131
19488
|
const { resultContext, resultParams } = await this.handleParams(
|
|
19132
19489
|
action,
|
|
@@ -19182,7 +19539,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19182
19539
|
);
|
|
19183
19540
|
return result || {};
|
|
19184
19541
|
}
|
|
19185
|
-
throw new
|
|
19542
|
+
throw new RuntimeModelError45(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
19186
19543
|
}
|
|
19187
19544
|
};
|
|
19188
19545
|
|
|
@@ -19247,7 +19604,7 @@ var ToolbarController = class extends ControlController {
|
|
|
19247
19604
|
async doUIAction(item, event, param = {}) {
|
|
19248
19605
|
if (item.itemType === "DEUIACTION") {
|
|
19249
19606
|
const actionId = item.uiactionId;
|
|
19250
|
-
const res = await this.ctx.view.call("GetData");
|
|
19607
|
+
const res = await this.ctx.view.call("GetData" /* GET_DATA */);
|
|
19251
19608
|
const data = res || [];
|
|
19252
19609
|
const args = this.getEventArgs();
|
|
19253
19610
|
args.params = Object.assign(param, args.params);
|
|
@@ -19665,7 +20022,8 @@ var ViewPortletController = class extends PortletPartController {
|
|
|
19665
20022
|
};
|
|
19666
20023
|
|
|
19667
20024
|
// src/controller/control/data-view/data-view.controller.ts
|
|
19668
|
-
import { RuntimeModelError as
|
|
20025
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
20026
|
+
import { isNil as isNil15 } from "ramda";
|
|
19669
20027
|
|
|
19670
20028
|
// src/controller/control/data-view/data-view.service.ts
|
|
19671
20029
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -19684,7 +20042,8 @@ var DataViewControlService = class extends MDControlService {
|
|
|
19684
20042
|
if (deField) {
|
|
19685
20043
|
const deFieldKey = deField.toLowerCase();
|
|
19686
20044
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
19687
|
-
isOriginField: true
|
|
20045
|
+
isOriginField: true,
|
|
20046
|
+
dataType: item.dataType
|
|
19688
20047
|
});
|
|
19689
20048
|
} else {
|
|
19690
20049
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -19705,6 +20064,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19705
20064
|
initState() {
|
|
19706
20065
|
super.initState();
|
|
19707
20066
|
this.state.noSort = this.model.noSort === true;
|
|
20067
|
+
this.state.size = this.model.pagingSize || 20;
|
|
19708
20068
|
}
|
|
19709
20069
|
/**
|
|
19710
20070
|
* 初始化
|
|
@@ -19715,7 +20075,16 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19715
20075
|
*/
|
|
19716
20076
|
async onCreated() {
|
|
19717
20077
|
await super.onCreated();
|
|
19718
|
-
|
|
20078
|
+
await this.initControlService();
|
|
20079
|
+
}
|
|
20080
|
+
/**
|
|
20081
|
+
* 初始化部件服务
|
|
20082
|
+
* @author lxm
|
|
20083
|
+
* @date 2023-08-29 04:13:05
|
|
20084
|
+
* @protected
|
|
20085
|
+
* @return {*} {Promise<void>}
|
|
20086
|
+
*/
|
|
20087
|
+
async initControlService() {
|
|
19719
20088
|
this.service = new DataViewControlService(this.model);
|
|
19720
20089
|
await this.service.init(this.context);
|
|
19721
20090
|
}
|
|
@@ -19765,7 +20134,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19765
20134
|
const optItemModel = this.getOptItemModel();
|
|
19766
20135
|
if (optItemModel) {
|
|
19767
20136
|
if (!optItemModel.deuiactionGroup) {
|
|
19768
|
-
throw new
|
|
20137
|
+
throw new RuntimeModelError46(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
19769
20138
|
}
|
|
19770
20139
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
19771
20140
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -19811,8 +20180,11 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19811
20180
|
* @memberof DataViewControlController
|
|
19812
20181
|
*/
|
|
19813
20182
|
async handleDataGroup() {
|
|
19814
|
-
const { enableGroup, groupMode } = this.model;
|
|
20183
|
+
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
19815
20184
|
if (enableGroup && groupMode) {
|
|
20185
|
+
if (!groupAppDEFieldId) {
|
|
20186
|
+
throw new RuntimeModelError46(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
20187
|
+
}
|
|
19816
20188
|
if (groupMode === "AUTO") {
|
|
19817
20189
|
this.handleAutoGroup();
|
|
19818
20190
|
} else if (groupMode === "CODELIST") {
|
|
@@ -19829,60 +20201,81 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19829
20201
|
const { groupAppDEFieldId } = this.model;
|
|
19830
20202
|
if (groupAppDEFieldId) {
|
|
19831
20203
|
const { items } = this.state;
|
|
19832
|
-
const
|
|
20204
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
19833
20205
|
items.forEach((item) => {
|
|
19834
|
-
const
|
|
19835
|
-
|
|
19836
|
-
|
|
20206
|
+
const groupVal = item[groupAppDEFieldId];
|
|
20207
|
+
if (isNil15(groupVal)) {
|
|
20208
|
+
return;
|
|
20209
|
+
}
|
|
20210
|
+
if (!groupMap.has(groupVal)) {
|
|
20211
|
+
groupMap.set(groupVal, []);
|
|
20212
|
+
}
|
|
20213
|
+
groupMap.get(groupVal).push(item);
|
|
19837
20214
|
});
|
|
19838
20215
|
const groups = [];
|
|
19839
|
-
|
|
20216
|
+
groupMap.forEach((value, key) => {
|
|
19840
20217
|
groups.push({
|
|
19841
20218
|
caption: key,
|
|
20219
|
+
key,
|
|
19842
20220
|
children: [...value]
|
|
19843
20221
|
});
|
|
19844
20222
|
});
|
|
19845
20223
|
this.state.groups = groups;
|
|
19846
20224
|
}
|
|
19847
20225
|
}
|
|
20226
|
+
/**
|
|
20227
|
+
* 加载并初始化分组代码表项集合
|
|
20228
|
+
* @author lxm
|
|
20229
|
+
* @date 2023-08-29 05:11:39
|
|
20230
|
+
* @protected
|
|
20231
|
+
* @return {*} {Promise<void>}
|
|
20232
|
+
*/
|
|
20233
|
+
async initGroupCodeListItems() {
|
|
20234
|
+
const { groupCodeListId } = this.model;
|
|
20235
|
+
if (!groupCodeListId) {
|
|
20236
|
+
throw new RuntimeModelError46(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
20237
|
+
}
|
|
20238
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
20239
|
+
this.groupCodeListItems = await app.codeList.get(
|
|
20240
|
+
groupCodeListId,
|
|
20241
|
+
this.context,
|
|
20242
|
+
this.params
|
|
20243
|
+
);
|
|
20244
|
+
}
|
|
19848
20245
|
/**
|
|
19849
20246
|
* 处理代码表分组
|
|
19850
20247
|
*
|
|
19851
20248
|
* @memberof DataViewControlController
|
|
19852
20249
|
*/
|
|
19853
20250
|
async handleCodeListGroup() {
|
|
19854
|
-
const { groupAppDEFieldId
|
|
19855
|
-
if (
|
|
19856
|
-
|
|
19857
|
-
|
|
19858
|
-
|
|
19859
|
-
|
|
19860
|
-
|
|
19861
|
-
|
|
19862
|
-
|
|
20251
|
+
const { groupAppDEFieldId } = this.model;
|
|
20252
|
+
if (!this.groupCodeListItems) {
|
|
20253
|
+
await this.initGroupCodeListItems();
|
|
20254
|
+
}
|
|
20255
|
+
const { items } = this.state;
|
|
20256
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
20257
|
+
this.groupCodeListItems.forEach((item) => {
|
|
20258
|
+
groupMap.set(item.value, []);
|
|
20259
|
+
});
|
|
20260
|
+
items.forEach((item) => {
|
|
20261
|
+
const groupVal = item[groupAppDEFieldId];
|
|
20262
|
+
const groupArr = groupMap.get(groupVal);
|
|
20263
|
+
if (groupArr) {
|
|
20264
|
+
groupArr.push(item);
|
|
20265
|
+
}
|
|
20266
|
+
});
|
|
20267
|
+
const groups = [];
|
|
20268
|
+
groupMap.forEach((arr, key) => {
|
|
20269
|
+
const codeListItem = this.groupCodeListItems.find(
|
|
20270
|
+
(item) => item.value === key
|
|
19863
20271
|
);
|
|
19864
|
-
|
|
19865
|
-
|
|
19866
|
-
|
|
19867
|
-
|
|
19868
|
-
);
|
|
19869
|
-
groups.push({
|
|
19870
|
-
caption: codeListItem.text,
|
|
19871
|
-
children: [...value]
|
|
19872
|
-
});
|
|
19873
|
-
keys.push(codeListItem.value);
|
|
20272
|
+
groups.push({
|
|
20273
|
+
caption: codeListItem.text,
|
|
20274
|
+
key: codeListItem.value,
|
|
20275
|
+
children: arr
|
|
19874
20276
|
});
|
|
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
|
-
}
|
|
20277
|
+
});
|
|
20278
|
+
this.state.groups = groups;
|
|
19886
20279
|
}
|
|
19887
20280
|
/**
|
|
19888
20281
|
* 设置排序
|
|
@@ -19908,10 +20301,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19908
20301
|
};
|
|
19909
20302
|
|
|
19910
20303
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
19911
|
-
import { RuntimeModelError as
|
|
20304
|
+
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
19912
20305
|
|
|
19913
20306
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
19914
|
-
import { RuntimeError as
|
|
20307
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
19915
20308
|
var ExpBarControlController = class extends ControlController {
|
|
19916
20309
|
constructor() {
|
|
19917
20310
|
super(...arguments);
|
|
@@ -19966,7 +20359,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
19966
20359
|
get xDataController() {
|
|
19967
20360
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
19968
20361
|
if (!controller) {
|
|
19969
|
-
throw new
|
|
20362
|
+
throw new RuntimeModelError47(
|
|
19970
20363
|
this.model,
|
|
19971
20364
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
19972
20365
|
);
|
|
@@ -20188,7 +20581,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
20188
20581
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
20189
20582
|
return this.XDataModel.navAppViewId;
|
|
20190
20583
|
}
|
|
20191
|
-
throw new
|
|
20584
|
+
throw new RuntimeError35("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
20192
20585
|
}
|
|
20193
20586
|
/**
|
|
20194
20587
|
* 获取导航视图
|
|
@@ -20263,7 +20656,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
20263
20656
|
get xDataController() {
|
|
20264
20657
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
20265
20658
|
if (!controller) {
|
|
20266
|
-
throw new
|
|
20659
|
+
throw new RuntimeModelError48(
|
|
20267
20660
|
this.model,
|
|
20268
20661
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
20269
20662
|
);
|
|
@@ -20317,7 +20710,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
20317
20710
|
};
|
|
20318
20711
|
|
|
20319
20712
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
20320
|
-
import { RuntimeError as
|
|
20713
|
+
import { RuntimeError as RuntimeError36, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
20321
20714
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
20322
20715
|
constructor() {
|
|
20323
20716
|
super(...arguments);
|
|
@@ -20340,7 +20733,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
20340
20733
|
get xDataController() {
|
|
20341
20734
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
20342
20735
|
if (!controller) {
|
|
20343
|
-
throw new
|
|
20736
|
+
throw new RuntimeModelError49(
|
|
20344
20737
|
this.model,
|
|
20345
20738
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
20346
20739
|
);
|
|
@@ -20392,7 +20785,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
20392
20785
|
const deData = node.deData || node;
|
|
20393
20786
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
20394
20787
|
if (!nodeModel) {
|
|
20395
|
-
throw new
|
|
20788
|
+
throw new RuntimeError36("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
20396
20789
|
}
|
|
20397
20790
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
20398
20791
|
result.context.currentSrfNav = nodeId;
|
|
@@ -21130,7 +21523,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
21130
21523
|
|
|
21131
21524
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
21132
21525
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
21133
|
-
import { createUUID as createUUID3, notNilEmpty as
|
|
21526
|
+
import { createUUID as createUUID3, notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
21134
21527
|
|
|
21135
21528
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
21136
21529
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -21208,8 +21601,10 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
21208
21601
|
async formStateNotify(state) {
|
|
21209
21602
|
await super.formStateNotify(state);
|
|
21210
21603
|
this.isNewData = state === "DRAFT" /* DRAFT */;
|
|
21211
|
-
this.
|
|
21212
|
-
|
|
21604
|
+
if (this.model.maskMode !== 0) {
|
|
21605
|
+
this.state.showMask = this.isNewData;
|
|
21606
|
+
}
|
|
21607
|
+
if (state === "LOAD" /* LOAD */ || state === "DRAFT" /* DRAFT */ || state === "SAVE" /* SAVE */) {
|
|
21213
21608
|
this.calcViewParams();
|
|
21214
21609
|
}
|
|
21215
21610
|
}
|
|
@@ -21223,7 +21618,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
21223
21618
|
calcViewParams() {
|
|
21224
21619
|
let newContext = this.form.context.clone();
|
|
21225
21620
|
const navContexts = this.model.navigateContexts;
|
|
21226
|
-
if (
|
|
21621
|
+
if (notNilEmpty7(navContexts)) {
|
|
21227
21622
|
newContext = Object.assign(
|
|
21228
21623
|
newContext,
|
|
21229
21624
|
convertNavData(
|
|
@@ -21266,7 +21661,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
21266
21661
|
this.embedView = view;
|
|
21267
21662
|
this.embedView.evt.on("onMounted", () => {
|
|
21268
21663
|
if (!this.isNewData) {
|
|
21269
|
-
this.embedView.
|
|
21664
|
+
this.embedView.call("Load" /* LOAD */);
|
|
21270
21665
|
}
|
|
21271
21666
|
});
|
|
21272
21667
|
this.embedView.evt.on("onDataChange", (event) => {
|
|
@@ -21393,7 +21788,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
21393
21788
|
// src/controller/control/form/form-detail/form-item/form-item.controller.ts
|
|
21394
21789
|
import Schema from "async-validator";
|
|
21395
21790
|
import { createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
21396
|
-
import { ModelError as ModelError25, RuntimeError as
|
|
21791
|
+
import { ModelError as ModelError25, RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
21397
21792
|
import dayjs3 from "dayjs";
|
|
21398
21793
|
|
|
21399
21794
|
// src/controller/control/form/form-detail/form-item/form-item.state.ts
|
|
@@ -21709,7 +22104,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
21709
22104
|
case "SESSION":
|
|
21710
22105
|
case "APPLICATION":
|
|
21711
22106
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
21712
|
-
throw new
|
|
22107
|
+
throw new RuntimeError37("appdata.context\u4E0D\u5B58\u5728");
|
|
21713
22108
|
}
|
|
21714
22109
|
data[this.name] = ibiz.appData.context[defaultValue];
|
|
21715
22110
|
break;
|
|
@@ -21834,7 +22229,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
21834
22229
|
};
|
|
21835
22230
|
|
|
21836
22231
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
21837
|
-
import { RuntimeError as
|
|
22232
|
+
import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
21838
22233
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
21839
22234
|
/**
|
|
21840
22235
|
* 初始化
|
|
@@ -21849,7 +22244,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
21849
22244
|
const { model } = this.parent;
|
|
21850
22245
|
const { contentControl } = model;
|
|
21851
22246
|
if (!contentControl) {
|
|
21852
|
-
throw new
|
|
22247
|
+
throw new RuntimeError38("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
21853
22248
|
}
|
|
21854
22249
|
this.controlModel = contentControl;
|
|
21855
22250
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -21959,7 +22354,7 @@ import { isArray as isArray4 } from "lodash-es";
|
|
|
21959
22354
|
import {
|
|
21960
22355
|
awaitTimeout,
|
|
21961
22356
|
mergeInLeft,
|
|
21962
|
-
RuntimeError as
|
|
22357
|
+
RuntimeError as RuntimeError39,
|
|
21963
22358
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
21964
22359
|
} from "@ibiz-template/core";
|
|
21965
22360
|
import { debounce } from "lodash-es";
|
|
@@ -21967,7 +22362,7 @@ import { debounce } from "lodash-es";
|
|
|
21967
22362
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
21968
22363
|
import {
|
|
21969
22364
|
recursiveIterate as recursiveIterate3,
|
|
21970
|
-
RuntimeModelError as
|
|
22365
|
+
RuntimeModelError as RuntimeModelError50
|
|
21971
22366
|
} from "@ibiz-template/core";
|
|
21972
22367
|
var EditFormService = class extends ControlService {
|
|
21973
22368
|
/**
|
|
@@ -22085,7 +22480,7 @@ var EditFormService = class extends ControlService {
|
|
|
22085
22480
|
const wizardForm = this.model;
|
|
22086
22481
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
22087
22482
|
if (!methodName) {
|
|
22088
|
-
throw new
|
|
22483
|
+
throw new RuntimeModelError50(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
22089
22484
|
}
|
|
22090
22485
|
let res = await this.exec(
|
|
22091
22486
|
methodName,
|
|
@@ -22192,7 +22587,8 @@ var EditFormService = class extends ControlService {
|
|
|
22192
22587
|
let mapField;
|
|
22193
22588
|
if (deField) {
|
|
22194
22589
|
mapField = new UIMapField(uiKey, deField, {
|
|
22195
|
-
isOriginField: true
|
|
22590
|
+
isOriginField: true,
|
|
22591
|
+
dataType: formItem.dataType
|
|
22196
22592
|
});
|
|
22197
22593
|
} else {
|
|
22198
22594
|
mapField = new UIMapField(uiKey, uiKey, {
|
|
@@ -22341,7 +22737,7 @@ var EditFormController = class extends FormController {
|
|
|
22341
22737
|
}
|
|
22342
22738
|
const isValid = await this.validate();
|
|
22343
22739
|
if (!isValid) {
|
|
22344
|
-
throw new
|
|
22740
|
+
throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
22345
22741
|
}
|
|
22346
22742
|
await this.startLoading();
|
|
22347
22743
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -22441,7 +22837,7 @@ var EditFormController = class extends FormController {
|
|
|
22441
22837
|
(item) => item.id === formItemUpdateId
|
|
22442
22838
|
);
|
|
22443
22839
|
if (!formItemUpdate) {
|
|
22444
|
-
throw new
|
|
22840
|
+
throw new RuntimeError39("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
22445
22841
|
}
|
|
22446
22842
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
22447
22843
|
const updateItems = defiupdateDetails.map((item) => item.id);
|
|
@@ -22485,7 +22881,7 @@ var EditFormController = class extends FormController {
|
|
|
22485
22881
|
async wfStart(extraParams = {}) {
|
|
22486
22882
|
const isValid = await this.validate();
|
|
22487
22883
|
if (!isValid) {
|
|
22488
|
-
throw new
|
|
22884
|
+
throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
22489
22885
|
}
|
|
22490
22886
|
await this.startLoading();
|
|
22491
22887
|
try {
|
|
@@ -22518,7 +22914,7 @@ var EditFormController = class extends FormController {
|
|
|
22518
22914
|
async wfSubmit(extraParams = {}) {
|
|
22519
22915
|
const isValid = await this.validate();
|
|
22520
22916
|
if (!isValid) {
|
|
22521
|
-
throw new
|
|
22917
|
+
throw new RuntimeError39("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
22522
22918
|
}
|
|
22523
22919
|
await this.startLoading();
|
|
22524
22920
|
try {
|
|
@@ -22749,7 +23145,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
22749
23145
|
};
|
|
22750
23146
|
|
|
22751
23147
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
22752
|
-
import { RuntimeError as
|
|
23148
|
+
import { RuntimeError as RuntimeError40, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
22753
23149
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
22754
23150
|
constructor() {
|
|
22755
23151
|
super(...arguments);
|
|
@@ -22854,7 +23250,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
22854
23250
|
const { model } = this.parent;
|
|
22855
23251
|
const { contentControl } = model;
|
|
22856
23252
|
if (!contentControl) {
|
|
22857
|
-
throw new
|
|
23253
|
+
throw new RuntimeError40("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
22858
23254
|
}
|
|
22859
23255
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
22860
23256
|
this.controlModel = contentControl;
|
|
@@ -23565,10 +23961,10 @@ import {
|
|
|
23565
23961
|
awaitTimeout as awaitTimeout2,
|
|
23566
23962
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
23567
23963
|
recursiveIterate as recursiveIterate4,
|
|
23568
|
-
RuntimeError as
|
|
23569
|
-
RuntimeModelError as
|
|
23964
|
+
RuntimeError as RuntimeError41,
|
|
23965
|
+
RuntimeModelError as RuntimeModelError51
|
|
23570
23966
|
} from "@ibiz-template/core";
|
|
23571
|
-
import { clone as
|
|
23967
|
+
import { clone as clone15 } from "ramda";
|
|
23572
23968
|
|
|
23573
23969
|
// src/controller/control/grid/grid/grid.service.ts
|
|
23574
23970
|
var GridService = class extends MDControlService {
|
|
@@ -23588,7 +23984,8 @@ var GridService = class extends MDControlService {
|
|
|
23588
23984
|
if (deField) {
|
|
23589
23985
|
const deFieldKey = deField.toLowerCase();
|
|
23590
23986
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
23591
|
-
isOriginField: true
|
|
23987
|
+
isOriginField: true,
|
|
23988
|
+
dataType: column.dataType
|
|
23592
23989
|
});
|
|
23593
23990
|
} else {
|
|
23594
23991
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -23761,11 +24158,11 @@ var GridController = class extends MDControlController {
|
|
|
23761
24158
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
23762
24159
|
);
|
|
23763
24160
|
if (!this.groupFieldColumn) {
|
|
23764
|
-
throw new
|
|
24161
|
+
throw new RuntimeModelError51(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
23765
24162
|
}
|
|
23766
24163
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
23767
24164
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
23768
|
-
throw new
|
|
24165
|
+
throw new RuntimeModelError51(
|
|
23769
24166
|
this.groupFieldColumn.model,
|
|
23770
24167
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
23771
24168
|
);
|
|
@@ -23775,7 +24172,7 @@ var GridController = class extends MDControlController {
|
|
|
23775
24172
|
);
|
|
23776
24173
|
if (index !== -1 && index !== 0) {
|
|
23777
24174
|
if (this.isMultistageHeader) {
|
|
23778
|
-
throw new
|
|
24175
|
+
throw new RuntimeModelError51(
|
|
23779
24176
|
this.model,
|
|
23780
24177
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
23781
24178
|
);
|
|
@@ -23785,10 +24182,10 @@ var GridController = class extends MDControlController {
|
|
|
23785
24182
|
}
|
|
23786
24183
|
if (groupMode === "CODELIST") {
|
|
23787
24184
|
if (!groupCodeListId) {
|
|
23788
|
-
throw new
|
|
24185
|
+
throw new RuntimeModelError51(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
23789
24186
|
}
|
|
23790
24187
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
23791
|
-
throw new
|
|
24188
|
+
throw new RuntimeModelError51(
|
|
23792
24189
|
this.model,
|
|
23793
24190
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
23794
24191
|
);
|
|
@@ -23850,6 +24247,7 @@ var GridController = class extends MDControlController {
|
|
|
23850
24247
|
);
|
|
23851
24248
|
this.state.groups.push({
|
|
23852
24249
|
caption: (codeListItem == null ? void 0 : codeListItem.text) || "".concat(key),
|
|
24250
|
+
key,
|
|
23853
24251
|
children: value
|
|
23854
24252
|
});
|
|
23855
24253
|
});
|
|
@@ -23868,7 +24266,7 @@ var GridController = class extends MDControlController {
|
|
|
23868
24266
|
return;
|
|
23869
24267
|
}
|
|
23870
24268
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
23871
|
-
throw new
|
|
24269
|
+
throw new RuntimeModelError51(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
23872
24270
|
}
|
|
23873
24271
|
const params = await this.getFetchParams();
|
|
23874
24272
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -23936,7 +24334,7 @@ var GridController = class extends MDControlController {
|
|
|
23936
24334
|
}
|
|
23937
24335
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
23938
24336
|
if (editingRow) {
|
|
23939
|
-
throw new
|
|
24337
|
+
throw new RuntimeError41("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
23940
24338
|
}
|
|
23941
24339
|
let res;
|
|
23942
24340
|
try {
|
|
@@ -23970,7 +24368,7 @@ var GridController = class extends MDControlController {
|
|
|
23970
24368
|
(item) => item.data.srfkey === data.srfkey
|
|
23971
24369
|
);
|
|
23972
24370
|
if (!rowState) {
|
|
23973
|
-
throw new
|
|
24371
|
+
throw new RuntimeError41("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
23974
24372
|
}
|
|
23975
24373
|
if (!rowState.modified) {
|
|
23976
24374
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -23982,7 +24380,7 @@ var GridController = class extends MDControlController {
|
|
|
23982
24380
|
}
|
|
23983
24381
|
const isValid = await this.validate(rowState);
|
|
23984
24382
|
if (!isValid) {
|
|
23985
|
-
throw new
|
|
24383
|
+
throw new RuntimeError41("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
23986
24384
|
}
|
|
23987
24385
|
await this.startLoading();
|
|
23988
24386
|
let res;
|
|
@@ -24008,7 +24406,6 @@ var GridController = class extends MDControlController {
|
|
|
24008
24406
|
this.state.items.splice(index, 1, res.data);
|
|
24009
24407
|
rowState.data = res.data;
|
|
24010
24408
|
rowState.modified = false;
|
|
24011
|
-
ibiz.message.success("".concat(res.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F"));
|
|
24012
24409
|
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "SUCCESS"), {
|
|
24013
24410
|
default: "".concat(res.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F"),
|
|
24014
24411
|
data: res.data
|
|
@@ -24195,7 +24592,7 @@ var GridController = class extends MDControlController {
|
|
|
24195
24592
|
}
|
|
24196
24593
|
async toggleRowEdit() {
|
|
24197
24594
|
if (!this.model.enableRowNew) {
|
|
24198
|
-
throw new
|
|
24595
|
+
throw new RuntimeError41("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
24199
24596
|
}
|
|
24200
24597
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
24201
24598
|
}
|
|
@@ -24228,7 +24625,7 @@ var GridController = class extends MDControlController {
|
|
|
24228
24625
|
if (toState === true) {
|
|
24229
24626
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
24230
24627
|
if (editingRow) {
|
|
24231
|
-
throw new
|
|
24628
|
+
throw new RuntimeError41("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
24232
24629
|
}
|
|
24233
24630
|
}
|
|
24234
24631
|
row.showRowEdit = toState;
|
|
@@ -24273,7 +24670,7 @@ var GridController = class extends MDControlController {
|
|
|
24273
24670
|
(item) => item.id === updateId
|
|
24274
24671
|
);
|
|
24275
24672
|
if (!findUpdate) {
|
|
24276
|
-
throw new
|
|
24673
|
+
throw new RuntimeError41("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
24277
24674
|
}
|
|
24278
24675
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
24279
24676
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -24343,7 +24740,7 @@ var GridController = class extends MDControlController {
|
|
|
24343
24740
|
codeListMap.set(key, items[key].codeListItems);
|
|
24344
24741
|
}
|
|
24345
24742
|
});
|
|
24346
|
-
const cloneData =
|
|
24743
|
+
const cloneData = clone15(
|
|
24347
24744
|
data2.map((item) => {
|
|
24348
24745
|
return item.getOrigin();
|
|
24349
24746
|
})
|
|
@@ -24382,7 +24779,7 @@ var GridController = class extends MDControlController {
|
|
|
24382
24779
|
data2 = this.getData();
|
|
24383
24780
|
}
|
|
24384
24781
|
if (data2.length === 0) {
|
|
24385
|
-
throw new
|
|
24782
|
+
throw new RuntimeError41("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
24386
24783
|
}
|
|
24387
24784
|
return formatExcelData(data2);
|
|
24388
24785
|
};
|
|
@@ -24401,11 +24798,11 @@ var GridController = class extends MDControlController {
|
|
|
24401
24798
|
);
|
|
24402
24799
|
const data = formatArrayData(filterVal, await getExportData());
|
|
24403
24800
|
if (!ibiz.util.getExportExcel) {
|
|
24404
|
-
throw new
|
|
24801
|
+
throw new RuntimeError41("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
24405
24802
|
}
|
|
24406
24803
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
24407
24804
|
if (!exportExcel) {
|
|
24408
|
-
throw new
|
|
24805
|
+
throw new RuntimeError41("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
24409
24806
|
}
|
|
24410
24807
|
exportExcel.exportJsonToExcel({
|
|
24411
24808
|
header,
|
|
@@ -24421,9 +24818,9 @@ var GridController = class extends MDControlController {
|
|
|
24421
24818
|
};
|
|
24422
24819
|
|
|
24423
24820
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
24424
|
-
import { DataTypes, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
24821
|
+
import { DataTypes as DataTypes2, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
24425
24822
|
import dayjs4 from "dayjs";
|
|
24426
|
-
import { clone as
|
|
24823
|
+
import { clone as clone16 } from "ramda";
|
|
24427
24824
|
var GridFieldColumnController = class extends GridColumnController {
|
|
24428
24825
|
constructor() {
|
|
24429
24826
|
super(...arguments);
|
|
@@ -24519,7 +24916,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24519
24916
|
srfkey: value,
|
|
24520
24917
|
...wfContext
|
|
24521
24918
|
});
|
|
24522
|
-
const tempParams =
|
|
24919
|
+
const tempParams = clone16(this.params);
|
|
24523
24920
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
24524
24921
|
row.data,
|
|
24525
24922
|
tempContext,
|
|
@@ -24647,7 +25044,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24647
25044
|
if (!this.valueFormat) {
|
|
24648
25045
|
return strVal;
|
|
24649
25046
|
}
|
|
24650
|
-
const isDate =
|
|
25047
|
+
const isDate = DataTypes2.isDate(this.dataType);
|
|
24651
25048
|
if (isDate) {
|
|
24652
25049
|
return dayjs4(strVal).format(this.valueFormat);
|
|
24653
25050
|
}
|
|
@@ -24656,7 +25053,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24656
25053
|
};
|
|
24657
25054
|
|
|
24658
25055
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
24659
|
-
import { RuntimeModelError as
|
|
25056
|
+
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
24660
25057
|
var GridUAColumnController = class extends GridColumnController {
|
|
24661
25058
|
/**
|
|
24662
25059
|
* 给rowController初始化操作列的状态
|
|
@@ -24669,7 +25066,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
24669
25066
|
var _a;
|
|
24670
25067
|
const { deuiactionGroup } = this.model;
|
|
24671
25068
|
if (!deuiactionGroup) {
|
|
24672
|
-
throw new
|
|
25069
|
+
throw new RuntimeModelError52(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
24673
25070
|
}
|
|
24674
25071
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
24675
25072
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -24710,7 +25107,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
24710
25107
|
};
|
|
24711
25108
|
|
|
24712
25109
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
24713
|
-
import { RuntimeError as
|
|
25110
|
+
import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
|
|
24714
25111
|
import Schema2 from "async-validator";
|
|
24715
25112
|
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
24716
25113
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -24844,7 +25241,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
24844
25241
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
24845
25242
|
const result = await this.validate(row);
|
|
24846
25243
|
if (!result) {
|
|
24847
|
-
throw new
|
|
25244
|
+
throw new RuntimeError42(
|
|
24848
25245
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
24849
25246
|
);
|
|
24850
25247
|
}
|
|
@@ -24985,7 +25382,8 @@ var ListService = class extends MDControlService {
|
|
|
24985
25382
|
if (deField) {
|
|
24986
25383
|
const deFieldKey = deField.toLowerCase();
|
|
24987
25384
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
24988
|
-
isOriginField: true
|
|
25385
|
+
isOriginField: true,
|
|
25386
|
+
dataType: item.dataType
|
|
24989
25387
|
});
|
|
24990
25388
|
} else {
|
|
24991
25389
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -25150,6 +25548,7 @@ var ListController = class extends MDControlController {
|
|
|
25150
25548
|
childrenMap.forEach((value, key) => {
|
|
25151
25549
|
groups.push({
|
|
25152
25550
|
caption: key,
|
|
25551
|
+
key,
|
|
25153
25552
|
children: [...value]
|
|
25154
25553
|
});
|
|
25155
25554
|
});
|
|
@@ -25179,6 +25578,7 @@ var ListController = class extends MDControlController {
|
|
|
25179
25578
|
);
|
|
25180
25579
|
groups.push({
|
|
25181
25580
|
caption: codeListItem.text,
|
|
25581
|
+
key: codeListItem.value,
|
|
25182
25582
|
children: [...value]
|
|
25183
25583
|
});
|
|
25184
25584
|
keys.push(codeListItem.value);
|
|
@@ -25189,6 +25589,7 @@ var ListController = class extends MDControlController {
|
|
|
25189
25589
|
if (otherGroup.length > 0) {
|
|
25190
25590
|
groups.push({
|
|
25191
25591
|
caption: "\u5176\u4ED6",
|
|
25592
|
+
key: "\u5176\u4ED6",
|
|
25192
25593
|
children: [...otherGroup]
|
|
25193
25594
|
});
|
|
25194
25595
|
}
|
|
@@ -25198,7 +25599,7 @@ var ListController = class extends MDControlController {
|
|
|
25198
25599
|
};
|
|
25199
25600
|
|
|
25200
25601
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
25201
|
-
import { RuntimeError as
|
|
25602
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
25202
25603
|
var PanelController = class extends ControlController {
|
|
25203
25604
|
constructor() {
|
|
25204
25605
|
super(...arguments);
|
|
@@ -25296,7 +25697,7 @@ var PanelController = class extends ControlController {
|
|
|
25296
25697
|
async load() {
|
|
25297
25698
|
const data = await this.prepareData();
|
|
25298
25699
|
if (!data) {
|
|
25299
|
-
throw new
|
|
25700
|
+
throw new RuntimeError43("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
25300
25701
|
}
|
|
25301
25702
|
const panelData = this.convertData(data);
|
|
25302
25703
|
this.state.data = panelData;
|
|
@@ -25740,7 +26141,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
25740
26141
|
* @memberof PickupViewPanelController
|
|
25741
26142
|
*/
|
|
25742
26143
|
async getSelectedData() {
|
|
25743
|
-
const items = await this.embedView.call("GetData");
|
|
26144
|
+
const items = await this.embedView.call("GetData" /* GET_DATA */);
|
|
25744
26145
|
return items;
|
|
25745
26146
|
}
|
|
25746
26147
|
/**
|
|
@@ -25752,7 +26153,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
25752
26153
|
* @memberof PickupViewPanelController
|
|
25753
26154
|
*/
|
|
25754
26155
|
async getAllData() {
|
|
25755
|
-
const items = await this.embedView.call("GetAllData");
|
|
26156
|
+
const items = await this.embedView.call("GetAllData" /* GET_ALL_DATA */);
|
|
25756
26157
|
return items;
|
|
25757
26158
|
}
|
|
25758
26159
|
};
|
|
@@ -26517,7 +26918,7 @@ var TreeController = class extends MDControlController {
|
|
|
26517
26918
|
};
|
|
26518
26919
|
|
|
26519
26920
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
26520
|
-
import { RuntimeError as
|
|
26921
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
26521
26922
|
|
|
26522
26923
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
26523
26924
|
var WizardPanelService = class extends ControlService {
|
|
@@ -26676,7 +27077,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26676
27077
|
const { activeFormTag } = this.state;
|
|
26677
27078
|
const controller = this.formControllers.get(activeFormTag);
|
|
26678
27079
|
if (!controller) {
|
|
26679
|
-
throw new
|
|
27080
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
26680
27081
|
}
|
|
26681
27082
|
return controller;
|
|
26682
27083
|
}
|
|
@@ -26751,7 +27152,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26751
27152
|
this.tagHistory.pop();
|
|
26752
27153
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
26753
27154
|
if (!prevTag) {
|
|
26754
|
-
throw new
|
|
27155
|
+
throw new RuntimeError44("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
26755
27156
|
}
|
|
26756
27157
|
this.state.activeFormTag = prevTag;
|
|
26757
27158
|
}
|
|
@@ -26772,7 +27173,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26772
27173
|
}
|
|
26773
27174
|
);
|
|
26774
27175
|
if (!wizardForm) {
|
|
26775
|
-
throw new
|
|
27176
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
26776
27177
|
}
|
|
26777
27178
|
nextTag = data.srfnextform;
|
|
26778
27179
|
} else {
|
|
@@ -26784,7 +27185,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26784
27185
|
});
|
|
26785
27186
|
const nextWizardStep = wizardSteps[index + 1];
|
|
26786
27187
|
if (!nextWizardStep) {
|
|
26787
|
-
throw new
|
|
27188
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
26788
27189
|
}
|
|
26789
27190
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
26790
27191
|
(wizardForm) => {
|
|
@@ -26797,7 +27198,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26797
27198
|
}
|
|
26798
27199
|
}
|
|
26799
27200
|
if (!nextTag) {
|
|
26800
|
-
throw new
|
|
27201
|
+
throw new RuntimeError44("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
26801
27202
|
}
|
|
26802
27203
|
this.state.activeFormTag = nextTag;
|
|
26803
27204
|
this.tagHistory.push(nextTag);
|
|
@@ -26833,7 +27234,8 @@ var MDCtrlService = class extends MDControlService {
|
|
|
26833
27234
|
if (deField) {
|
|
26834
27235
|
const deFieldKey = deField.toLowerCase();
|
|
26835
27236
|
mapField = new UIMapField(uiKey, deFieldKey, {
|
|
26836
|
-
isOriginField: true
|
|
27237
|
+
isOriginField: true,
|
|
27238
|
+
dataType: item.dataType
|
|
26837
27239
|
});
|
|
26838
27240
|
} else {
|
|
26839
27241
|
mapField = new UIMapField(uiKey, uiKey);
|
|
@@ -27025,6 +27427,321 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27025
27427
|
}
|
|
27026
27428
|
};
|
|
27027
27429
|
|
|
27430
|
+
// src/controller/control/kanban/kanban.controller.ts
|
|
27431
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
27432
|
+
import { isNil as isNil16 } from "ramda";
|
|
27433
|
+
|
|
27434
|
+
// src/controller/control/kanban/kanban.service.ts
|
|
27435
|
+
var KanbanService = class extends DataViewControlService {
|
|
27436
|
+
/**
|
|
27437
|
+
* 更新分组数据
|
|
27438
|
+
*
|
|
27439
|
+
* @author lxm
|
|
27440
|
+
* @date 2022-09-07 19:09:11
|
|
27441
|
+
* @param {IParams} context 上下文
|
|
27442
|
+
* @param {ControlVO} data 数据
|
|
27443
|
+
* @returns {*}
|
|
27444
|
+
*/
|
|
27445
|
+
async updateGroup(context, data) {
|
|
27446
|
+
var _a;
|
|
27447
|
+
const updateAction = ((_a = this.model.updateGroupControlAction) == null ? void 0 : _a.appDEMethodId) || "update";
|
|
27448
|
+
let res = await this.exec(updateAction, context, data.getOrigin());
|
|
27449
|
+
res = this.handleResponse(res);
|
|
27450
|
+
return res;
|
|
27451
|
+
}
|
|
27452
|
+
};
|
|
27453
|
+
|
|
27454
|
+
// src/controller/control/kanban/kanban.controller.ts
|
|
27455
|
+
var KanbanController = class extends DataViewControlController {
|
|
27456
|
+
/**
|
|
27457
|
+
* 允许调整顺序
|
|
27458
|
+
* @author lxm
|
|
27459
|
+
* @date 2023-09-11 04:02:39
|
|
27460
|
+
* @readonly
|
|
27461
|
+
* @type {boolean}
|
|
27462
|
+
*/
|
|
27463
|
+
get enableEditOrder() {
|
|
27464
|
+
return this.model.enableCardEditOrder === true;
|
|
27465
|
+
}
|
|
27466
|
+
/**
|
|
27467
|
+
* 是否支持调整分组。
|
|
27468
|
+
* @author lxm
|
|
27469
|
+
* @date 2023-09-11 04:04:00
|
|
27470
|
+
* @readonly
|
|
27471
|
+
* @type {boolean}
|
|
27472
|
+
*/
|
|
27473
|
+
get enableEditGroup() {
|
|
27474
|
+
return this.model.enableCardEditGroup === true;
|
|
27475
|
+
}
|
|
27476
|
+
/**
|
|
27477
|
+
* 是否允许新建
|
|
27478
|
+
* @author lxm
|
|
27479
|
+
* @date 2023-09-11 04:05:25
|
|
27480
|
+
* @readonly
|
|
27481
|
+
* @type {boolean}
|
|
27482
|
+
*/
|
|
27483
|
+
get enableNew() {
|
|
27484
|
+
return this.model.enableCardNew === true;
|
|
27485
|
+
}
|
|
27486
|
+
async initControlService() {
|
|
27487
|
+
this.service = new KanbanService(this.model);
|
|
27488
|
+
await this.service.init(this.context);
|
|
27489
|
+
}
|
|
27490
|
+
initState() {
|
|
27491
|
+
super.initState();
|
|
27492
|
+
this.state.size = this.model.pagingSize || 1e3;
|
|
27493
|
+
this.state.updating = false;
|
|
27494
|
+
this.state.draggable = this.enableEditOrder || this.enableEditGroup;
|
|
27495
|
+
}
|
|
27496
|
+
/**
|
|
27497
|
+
* 初始化
|
|
27498
|
+
*
|
|
27499
|
+
* @protected
|
|
27500
|
+
* @return {*} {Promise<void>}
|
|
27501
|
+
* @memberof KanbanController
|
|
27502
|
+
*/
|
|
27503
|
+
async onCreated() {
|
|
27504
|
+
await super.onCreated();
|
|
27505
|
+
await this.initGroupActionStates();
|
|
27506
|
+
}
|
|
27507
|
+
/**
|
|
27508
|
+
* 初始化分组右侧界面行为按钮的状态
|
|
27509
|
+
*
|
|
27510
|
+
* @author chitanda
|
|
27511
|
+
* @date 2023-08-02 17:08:04
|
|
27512
|
+
* @return {*} {Promise<void>}
|
|
27513
|
+
*/
|
|
27514
|
+
async initGroupActionStates() {
|
|
27515
|
+
var _a;
|
|
27516
|
+
const { groupUIActionGroup } = this.model;
|
|
27517
|
+
if (!((_a = groupUIActionGroup == null ? void 0 : groupUIActionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
27518
|
+
return;
|
|
27519
|
+
}
|
|
27520
|
+
const containerState = new ButtonContainerState();
|
|
27521
|
+
groupUIActionGroup.uiactionGroupDetails.forEach((detail) => {
|
|
27522
|
+
const actionid = detail.uiactionId;
|
|
27523
|
+
if (actionid) {
|
|
27524
|
+
const buttonState = new UIActionButtonState(
|
|
27525
|
+
detail.id,
|
|
27526
|
+
this.context.srfappid,
|
|
27527
|
+
actionid
|
|
27528
|
+
);
|
|
27529
|
+
containerState.addState(detail.id, buttonState);
|
|
27530
|
+
}
|
|
27531
|
+
});
|
|
27532
|
+
await containerState.update();
|
|
27533
|
+
this.state.groupActionGroupState = containerState;
|
|
27534
|
+
this.evt.on("onSelectionChange", (event) => {
|
|
27535
|
+
let data = event.data[0];
|
|
27536
|
+
if (data && data instanceof ControlVO) {
|
|
27537
|
+
data = data.getOrigin();
|
|
27538
|
+
}
|
|
27539
|
+
if (data) {
|
|
27540
|
+
this.state.groupActionGroupState.update(
|
|
27541
|
+
data,
|
|
27542
|
+
this.model.appDataEntityId
|
|
27543
|
+
);
|
|
27544
|
+
}
|
|
27545
|
+
});
|
|
27546
|
+
}
|
|
27547
|
+
/**
|
|
27548
|
+
* 本地排序items
|
|
27549
|
+
* @author lxm
|
|
27550
|
+
* @date 2023-09-04 09:30:55
|
|
27551
|
+
* @param {IData[]} items
|
|
27552
|
+
*/
|
|
27553
|
+
sortItems(items) {
|
|
27554
|
+
const sortField = this.model.minorSortAppDEFieldId;
|
|
27555
|
+
const { minorSortDir } = this.model;
|
|
27556
|
+
if (!sortField) {
|
|
27557
|
+
throw new RuntimeModelError53(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
27558
|
+
}
|
|
27559
|
+
if (!minorSortDir) {
|
|
27560
|
+
throw new RuntimeModelError53(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
27561
|
+
}
|
|
27562
|
+
const isAsc = minorSortDir === "ASC";
|
|
27563
|
+
items.forEach((item) => {
|
|
27564
|
+
const sortValue = item[sortField];
|
|
27565
|
+
if (isNil16(sortValue)) {
|
|
27566
|
+
item[sortField] = 0;
|
|
27567
|
+
} else {
|
|
27568
|
+
const toNum = Number(sortValue);
|
|
27569
|
+
if (Number.isNaN(toNum)) {
|
|
27570
|
+
throw new RuntimeError45(
|
|
27571
|
+
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
27572
|
+
);
|
|
27573
|
+
}
|
|
27574
|
+
}
|
|
27575
|
+
});
|
|
27576
|
+
items.sort(
|
|
27577
|
+
(a, b) => isAsc ? a[sortField] - b[sortField] : b[sortField] - a[sortField]
|
|
27578
|
+
);
|
|
27579
|
+
}
|
|
27580
|
+
async afterLoad(args, items) {
|
|
27581
|
+
this.sortItems(this.state.items);
|
|
27582
|
+
return super.afterLoad(args, items);
|
|
27583
|
+
}
|
|
27584
|
+
handleDataGroup() {
|
|
27585
|
+
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
27586
|
+
throw new RuntimeError45("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
27587
|
+
}
|
|
27588
|
+
return super.handleDataGroup();
|
|
27589
|
+
}
|
|
27590
|
+
/**
|
|
27591
|
+
* 拖拽变更事件处理回调
|
|
27592
|
+
* @author lxm
|
|
27593
|
+
* @date 2023-09-11 04:12:58
|
|
27594
|
+
* @param {IDragChangeInfo} info
|
|
27595
|
+
* @return {*} {Promise<void>}
|
|
27596
|
+
*/
|
|
27597
|
+
async onDragChange(info) {
|
|
27598
|
+
if (!this.enableEditGroup) {
|
|
27599
|
+
if (info.from !== info.to) {
|
|
27600
|
+
ibiz.message.warning("\u5F53\u524D\u770B\u677F\u4E0D\u5141\u8BB8\u8C03\u6574\u5206\u7EC4\uFF01");
|
|
27601
|
+
return;
|
|
27602
|
+
}
|
|
27603
|
+
}
|
|
27604
|
+
const isAsc = this.model.minorSortDir === "ASC";
|
|
27605
|
+
const { from, to, fromIndex, toIndex } = info;
|
|
27606
|
+
const groupField = this.model.groupAppDEFieldId;
|
|
27607
|
+
const sortField = this.model.minorSortAppDEFieldId;
|
|
27608
|
+
const modifiedItems = [];
|
|
27609
|
+
const fromGroup = this.state.groups.find((x) => x.key === from);
|
|
27610
|
+
const toGroup = this.state.groups.find((x) => x.key === to);
|
|
27611
|
+
if (!this.enableEditOrder) {
|
|
27612
|
+
if (info.from === info.to) {
|
|
27613
|
+
ibiz.message.warning("\u5F53\u524D\u770B\u677F\u4E0D\u5141\u8BB8\u8C03\u6574\u6B21\u5E8F");
|
|
27614
|
+
return;
|
|
27615
|
+
}
|
|
27616
|
+
const draggedItem2 = fromGroup.children[fromIndex];
|
|
27617
|
+
draggedItem2[groupField] = info.to;
|
|
27618
|
+
return this.updateChangedItems([draggedItem2]);
|
|
27619
|
+
}
|
|
27620
|
+
const getNextSort = (num) => {
|
|
27621
|
+
return num + (100 - num % 100);
|
|
27622
|
+
};
|
|
27623
|
+
const originArr = [...toGroup.children];
|
|
27624
|
+
const changedArr = [...toGroup.children];
|
|
27625
|
+
const draggedItem = fromGroup.children[fromIndex];
|
|
27626
|
+
if (info.from !== info.to) {
|
|
27627
|
+
draggedItem[groupField] = info.to;
|
|
27628
|
+
changedArr.splice(toIndex, 0, draggedItem);
|
|
27629
|
+
} else {
|
|
27630
|
+
changedArr.splice(fromIndex, 1);
|
|
27631
|
+
changedArr.splice(toIndex, 0, draggedItem);
|
|
27632
|
+
}
|
|
27633
|
+
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
27634
|
+
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
27635
|
+
if (!isAsc) {
|
|
27636
|
+
originArr.reverse();
|
|
27637
|
+
changedArr.reverse();
|
|
27638
|
+
}
|
|
27639
|
+
let lastSort;
|
|
27640
|
+
let cacheArr = [];
|
|
27641
|
+
let cacheLastSort;
|
|
27642
|
+
changedArr.forEach((item, index) => {
|
|
27643
|
+
if (lastSort === void 0) {
|
|
27644
|
+
if (item !== originArr[index]) {
|
|
27645
|
+
if (!originArr[index]) {
|
|
27646
|
+
lastSort = index === 0 ? 100 : getNextSort(originArr[index - 1][sortField]);
|
|
27647
|
+
} else {
|
|
27648
|
+
lastSort = originArr[index][sortField] || 100;
|
|
27649
|
+
}
|
|
27650
|
+
item[sortField] = lastSort;
|
|
27651
|
+
modifiedItems.push(item);
|
|
27652
|
+
}
|
|
27653
|
+
} else {
|
|
27654
|
+
if (lastSort >= item[sortField]) {
|
|
27655
|
+
if (cacheArr.length > 0) {
|
|
27656
|
+
cacheArr.forEach((cache) => {
|
|
27657
|
+
cache[sortField] = getNextSort(cacheLastSort);
|
|
27658
|
+
modifiedItems.push(cache);
|
|
27659
|
+
cacheLastSort = cache[sortField];
|
|
27660
|
+
});
|
|
27661
|
+
lastSort = cacheLastSort;
|
|
27662
|
+
cacheLastSort = 0;
|
|
27663
|
+
cacheArr = [];
|
|
27664
|
+
}
|
|
27665
|
+
item[sortField] = getNextSort(lastSort);
|
|
27666
|
+
modifiedItems.push(item);
|
|
27667
|
+
} else {
|
|
27668
|
+
if (cacheArr.length === 0) {
|
|
27669
|
+
cacheLastSort = lastSort;
|
|
27670
|
+
}
|
|
27671
|
+
cacheArr.push(item);
|
|
27672
|
+
}
|
|
27673
|
+
lastSort = item[sortField];
|
|
27674
|
+
}
|
|
27675
|
+
});
|
|
27676
|
+
this.updateChangedItems(modifiedItems);
|
|
27677
|
+
}
|
|
27678
|
+
/**
|
|
27679
|
+
* 批量更新修改的项,并更新后台返回的数据,然后重新计算分组和排序
|
|
27680
|
+
* @author lxm
|
|
27681
|
+
* @date 2023-09-11 04:13:15
|
|
27682
|
+
* @param {ControlVO[]} changedItems
|
|
27683
|
+
* @return {*} {Promise<void>}
|
|
27684
|
+
*/
|
|
27685
|
+
async updateChangedItems(changedItems) {
|
|
27686
|
+
try {
|
|
27687
|
+
this.state.updating = true;
|
|
27688
|
+
await Promise.all(
|
|
27689
|
+
changedItems.map(async (item) => {
|
|
27690
|
+
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
27691
|
+
const tempContext = this.context.clone();
|
|
27692
|
+
tempContext[deName] = item.srfkey;
|
|
27693
|
+
const res = await this.service.updateGroup(tempContext, item);
|
|
27694
|
+
if (res.data) {
|
|
27695
|
+
const index = this.state.items.findIndex(
|
|
27696
|
+
(x) => x.srfkey === item.srfkey
|
|
27697
|
+
);
|
|
27698
|
+
this.state.items.splice(index, 1, res.data);
|
|
27699
|
+
}
|
|
27700
|
+
})
|
|
27701
|
+
);
|
|
27702
|
+
} finally {
|
|
27703
|
+
this.state.updating = false;
|
|
27704
|
+
await this.afterLoad({}, this.state.items);
|
|
27705
|
+
}
|
|
27706
|
+
}
|
|
27707
|
+
/**
|
|
27708
|
+
* 点击新建
|
|
27709
|
+
* @author lxm
|
|
27710
|
+
* @date 2023-09-11 07:22:33
|
|
27711
|
+
* @param {MouseEvent} event
|
|
27712
|
+
* @param {(string | number)} group 分组标识
|
|
27713
|
+
*/
|
|
27714
|
+
onClickNew(event, group) {
|
|
27715
|
+
const params = { ...this.params, srfgroup: group };
|
|
27716
|
+
UIActionUtil.execAndResolved("new", {
|
|
27717
|
+
context: this.context,
|
|
27718
|
+
params,
|
|
27719
|
+
data: [],
|
|
27720
|
+
view: this.view,
|
|
27721
|
+
event
|
|
27722
|
+
});
|
|
27723
|
+
}
|
|
27724
|
+
/**
|
|
27725
|
+
* 分组工具栏点击处理回调
|
|
27726
|
+
* @author lxm
|
|
27727
|
+
* @date 2023-09-11 04:48:06
|
|
27728
|
+
* @param {IUIActionGroupDetail} detail
|
|
27729
|
+
* @param {MouseEvent} event
|
|
27730
|
+
* @return {*} {Promise<void>}
|
|
27731
|
+
*/
|
|
27732
|
+
async onGroupToolbarClick(detail, event, group) {
|
|
27733
|
+
const actionId = detail.uiactionId;
|
|
27734
|
+
const params = { ...this.params, srfgroup: group };
|
|
27735
|
+
await UIActionUtil.execAndResolved(actionId, {
|
|
27736
|
+
context: this.context,
|
|
27737
|
+
params,
|
|
27738
|
+
data: this.state.selectedData,
|
|
27739
|
+
view: this.view,
|
|
27740
|
+
event
|
|
27741
|
+
});
|
|
27742
|
+
}
|
|
27743
|
+
};
|
|
27744
|
+
|
|
27028
27745
|
// src/controller/hub.controller.ts
|
|
27029
27746
|
var HubController = class {
|
|
27030
27747
|
constructor() {
|
|
@@ -27240,7 +27957,7 @@ var AppHub = class {
|
|
|
27240
27957
|
this.registerAppView(appView);
|
|
27241
27958
|
return appView;
|
|
27242
27959
|
}
|
|
27243
|
-
throw new
|
|
27960
|
+
throw new RuntimeError46("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
27244
27961
|
}
|
|
27245
27962
|
/**
|
|
27246
27963
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -27271,7 +27988,7 @@ var AppHub = class {
|
|
|
27271
27988
|
this.registerAppDataEntity(entity, appId);
|
|
27272
27989
|
return entity;
|
|
27273
27990
|
}
|
|
27274
|
-
throw new
|
|
27991
|
+
throw new RuntimeError46("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
27275
27992
|
}
|
|
27276
27993
|
/**
|
|
27277
27994
|
* 新建 hub 应用
|
|
@@ -27292,7 +28009,7 @@ var AppHub = class {
|
|
|
27292
28009
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
27293
28010
|
this.registerApp(appModel);
|
|
27294
28011
|
} else {
|
|
27295
|
-
throw new
|
|
28012
|
+
throw new RuntimeError46("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
27296
28013
|
}
|
|
27297
28014
|
const app = new Application(appModel);
|
|
27298
28015
|
this.appMap.set(id, app);
|
|
@@ -27383,7 +28100,7 @@ var EngineFactory = class {
|
|
|
27383
28100
|
};
|
|
27384
28101
|
|
|
27385
28102
|
// src/engine/view-base.engine.ts
|
|
27386
|
-
import { RuntimeError as
|
|
28103
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
27387
28104
|
var ViewEngineBase = class {
|
|
27388
28105
|
/**
|
|
27389
28106
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -27478,7 +28195,7 @@ var ViewEngineBase = class {
|
|
|
27478
28195
|
async onDestroyed() {
|
|
27479
28196
|
}
|
|
27480
28197
|
async call(key, _args) {
|
|
27481
|
-
if (key === "GetData") {
|
|
28198
|
+
if (key === "GetData" /* GET_DATA */) {
|
|
27482
28199
|
return this.getData();
|
|
27483
28200
|
}
|
|
27484
28201
|
return void 0;
|
|
@@ -27571,7 +28288,7 @@ var ViewEngineBase = class {
|
|
|
27571
28288
|
const { appDataEntityId } = this.view.model;
|
|
27572
28289
|
const { evt, context, params } = this.view;
|
|
27573
28290
|
if (!appDataEntityId) {
|
|
27574
|
-
throw new
|
|
28291
|
+
throw new RuntimeError47("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
27575
28292
|
}
|
|
27576
28293
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
27577
28294
|
const res = await app.deService.exec(
|
|
@@ -27592,7 +28309,7 @@ var ViewEngineBase = class {
|
|
|
27592
28309
|
};
|
|
27593
28310
|
|
|
27594
28311
|
// src/engine/md-view.engine.ts
|
|
27595
|
-
import { RuntimeModelError as
|
|
28312
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
27596
28313
|
var MDViewEngine = class extends ViewEngineBase {
|
|
27597
28314
|
/**
|
|
27598
28315
|
* 多数据部件名称
|
|
@@ -27781,7 +28498,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27781
28498
|
(item) => item.id === "newdata"
|
|
27782
28499
|
);
|
|
27783
28500
|
if (!openAppViewLogic) {
|
|
27784
|
-
throw new
|
|
28501
|
+
throw new RuntimeModelError54(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27785
28502
|
}
|
|
27786
28503
|
const context = this.view.context.clone();
|
|
27787
28504
|
if (copyMode) {
|
|
@@ -27797,7 +28514,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27797
28514
|
if (result instanceof Object && result.ok) {
|
|
27798
28515
|
this.refresh();
|
|
27799
28516
|
} else if (result === -1) {
|
|
27800
|
-
throw new
|
|
28517
|
+
throw new RuntimeModelError54(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27801
28518
|
}
|
|
27802
28519
|
}
|
|
27803
28520
|
/**
|
|
@@ -27987,7 +28704,7 @@ var GlobalUtil = class {
|
|
|
27987
28704
|
};
|
|
27988
28705
|
|
|
27989
28706
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
27990
|
-
import { RuntimeError as
|
|
28707
|
+
import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
|
|
27991
28708
|
var LogicExecutor = class {
|
|
27992
28709
|
/**
|
|
27993
28710
|
* @author lxm
|
|
@@ -28008,7 +28725,7 @@ var LogicExecutor = class {
|
|
|
28008
28725
|
*/
|
|
28009
28726
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28010
28727
|
execute(_executeParams) {
|
|
28011
|
-
throw new
|
|
28728
|
+
throw new RuntimeError48("Method not implemented.");
|
|
28012
28729
|
}
|
|
28013
28730
|
/**
|
|
28014
28731
|
* 销毁方法
|
|
@@ -28099,13 +28816,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
28099
28816
|
};
|
|
28100
28817
|
|
|
28101
28818
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
28102
|
-
import { RuntimeModelError as
|
|
28819
|
+
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
28103
28820
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
28104
28821
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28105
28822
|
execute(executeParams) {
|
|
28106
28823
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
28107
28824
|
if (!appDEUILogicId) {
|
|
28108
|
-
throw new
|
|
28825
|
+
throw new RuntimeModelError55(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
28109
28826
|
}
|
|
28110
28827
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
28111
28828
|
}
|
|
@@ -28440,7 +29157,7 @@ var LogicSchedulerCenter = class {
|
|
|
28440
29157
|
};
|
|
28441
29158
|
|
|
28442
29159
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
28443
|
-
import { RuntimeError as
|
|
29160
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
28444
29161
|
var LogicTrigger = class {
|
|
28445
29162
|
/**
|
|
28446
29163
|
* @author lxm
|
|
@@ -28500,7 +29217,7 @@ var LogicTrigger = class {
|
|
|
28500
29217
|
if (this.executor) {
|
|
28501
29218
|
return this.executor.execute(executeParams);
|
|
28502
29219
|
}
|
|
28503
|
-
throw new
|
|
29220
|
+
throw new RuntimeError49("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
28504
29221
|
}
|
|
28505
29222
|
/**
|
|
28506
29223
|
* 销毁方法
|
|
@@ -28517,12 +29234,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
28517
29234
|
};
|
|
28518
29235
|
|
|
28519
29236
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
28520
|
-
import { RuntimeError as
|
|
29237
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
28521
29238
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
28522
29239
|
bindExecutor(executor) {
|
|
28523
29240
|
super.bindExecutor(executor);
|
|
28524
29241
|
if (this.executor.type !== "SCRIPT") {
|
|
28525
|
-
throw new
|
|
29242
|
+
throw new RuntimeError50(
|
|
28526
29243
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
28527
29244
|
);
|
|
28528
29245
|
}
|
|
@@ -28554,12 +29271,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
28554
29271
|
if (typeof result === "boolean") {
|
|
28555
29272
|
return result;
|
|
28556
29273
|
}
|
|
28557
|
-
throw new
|
|
29274
|
+
throw new RuntimeError50("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
28558
29275
|
}
|
|
28559
29276
|
};
|
|
28560
29277
|
|
|
28561
29278
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
28562
|
-
import { RuntimeError as
|
|
29279
|
+
import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
|
|
28563
29280
|
var TimerTrigger = class extends LogicTrigger {
|
|
28564
29281
|
constructor() {
|
|
28565
29282
|
super(...arguments);
|
|
@@ -28568,7 +29285,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28568
29285
|
start() {
|
|
28569
29286
|
this.timer = setInterval(() => {
|
|
28570
29287
|
if (!this.scheduler.defaultParamsCb) {
|
|
28571
|
-
throw new
|
|
29288
|
+
throw new RuntimeError51("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
28572
29289
|
}
|
|
28573
29290
|
const params = this.scheduler.defaultParamsCb();
|
|
28574
29291
|
this.executor.execute(params);
|
|
@@ -28585,10 +29302,10 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28585
29302
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
28586
29303
|
import {
|
|
28587
29304
|
ModelError as ModelError30,
|
|
28588
|
-
RuntimeError as
|
|
28589
|
-
RuntimeModelError as
|
|
29305
|
+
RuntimeError as RuntimeError52,
|
|
29306
|
+
RuntimeModelError as RuntimeModelError56
|
|
28590
29307
|
} from "@ibiz-template/core";
|
|
28591
|
-
import { notNilEmpty as
|
|
29308
|
+
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
28592
29309
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
28593
29310
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28594
29311
|
execute(executeParams) {
|
|
@@ -28621,7 +29338,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28621
29338
|
const { context, params, ...rest } = parameters;
|
|
28622
29339
|
const { data } = parameters;
|
|
28623
29340
|
if (!(data == null ? void 0 : data[0])) {
|
|
28624
|
-
throw new
|
|
29341
|
+
throw new RuntimeError52("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
28625
29342
|
}
|
|
28626
29343
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28627
29344
|
let openViewRef;
|
|
@@ -28630,7 +29347,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28630
29347
|
} else {
|
|
28631
29348
|
openViewRef = appUILogic.openDataAppView;
|
|
28632
29349
|
if (!openViewRef) {
|
|
28633
|
-
throw new
|
|
29350
|
+
throw new RuntimeModelError56(
|
|
28634
29351
|
appUILogic,
|
|
28635
29352
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
28636
29353
|
);
|
|
@@ -28638,7 +29355,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28638
29355
|
}
|
|
28639
29356
|
const openView = openViewRef.refAppViewId;
|
|
28640
29357
|
if (!openView) {
|
|
28641
|
-
throw new
|
|
29358
|
+
throw new RuntimeModelError56(
|
|
28642
29359
|
appUILogic,
|
|
28643
29360
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
28644
29361
|
);
|
|
@@ -28650,7 +29367,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28650
29367
|
);
|
|
28651
29368
|
let tempParams = {};
|
|
28652
29369
|
const navParams = openViewRef.navigateParams;
|
|
28653
|
-
if (
|
|
29370
|
+
if (notNilEmpty8(navParams)) {
|
|
28654
29371
|
tempParams = convertNavData(navParams, params, context, data[0]);
|
|
28655
29372
|
}
|
|
28656
29373
|
return ibiz.commands.execute(
|
|
@@ -28690,7 +29407,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28690
29407
|
} else {
|
|
28691
29408
|
newViewRef = newDataAppView;
|
|
28692
29409
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
28693
|
-
throw new
|
|
29410
|
+
throw new RuntimeModelError56(
|
|
28694
29411
|
appUILogic,
|
|
28695
29412
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
28696
29413
|
);
|
|
@@ -28700,12 +29417,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28700
29417
|
let tempParams = {};
|
|
28701
29418
|
const _data = (data == null ? void 0 : data[0]) || {};
|
|
28702
29419
|
const navContexts = newViewRef.navigateContexts;
|
|
28703
|
-
if (
|
|
29420
|
+
if (notNilEmpty8(navContexts)) {
|
|
28704
29421
|
tempContext = convertNavData(navContexts, context, params, _data);
|
|
28705
29422
|
}
|
|
28706
29423
|
tempContext = Object.assign(context, tempContext);
|
|
28707
29424
|
const navParams = newViewRef.navigateParams;
|
|
28708
|
-
if (
|
|
29425
|
+
if (notNilEmpty8(navParams)) {
|
|
28709
29426
|
tempParams = convertNavData(navParams, params, context, _data);
|
|
28710
29427
|
}
|
|
28711
29428
|
if (context.srfcopymode) {
|
|
@@ -28736,7 +29453,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28736
29453
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
28737
29454
|
const { context, params, ...rest } = parameters;
|
|
28738
29455
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
28739
|
-
throw new
|
|
29456
|
+
throw new RuntimeModelError56(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
28740
29457
|
}
|
|
28741
29458
|
const result = await ibiz.commands.execute(
|
|
28742
29459
|
OpenAppViewCommand.TAG,
|
|
@@ -28750,12 +29467,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28750
29467
|
}
|
|
28751
29468
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
28752
29469
|
if (!selectData) {
|
|
28753
|
-
throw new
|
|
29470
|
+
throw new RuntimeError52("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
28754
29471
|
}
|
|
28755
29472
|
const indexType = selectData.srfkey;
|
|
28756
29473
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
28757
29474
|
if (!findView) {
|
|
28758
|
-
throw new
|
|
29475
|
+
throw new RuntimeError52(
|
|
28759
29476
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28760
29477
|
);
|
|
28761
29478
|
}
|
|
@@ -28765,7 +29482,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28765
29482
|
const appDataEntityId = parameters.view.model.appDataEntityId;
|
|
28766
29483
|
const formTypeName = await getFormTypeFieldName(appDataEntityId);
|
|
28767
29484
|
if (!formTypeName) {
|
|
28768
|
-
throw new
|
|
29485
|
+
throw new RuntimeModelError56(
|
|
28769
29486
|
appUILogic,
|
|
28770
29487
|
"".concat(appDataEntityId, "\u5B9E\u4F53\u7F3A\u5C11\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027")
|
|
28771
29488
|
);
|
|
@@ -28773,12 +29490,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28773
29490
|
const { data } = parameters;
|
|
28774
29491
|
const formTypeValue = data[0][formTypeName];
|
|
28775
29492
|
if (!formTypeValue) {
|
|
28776
|
-
throw new
|
|
29493
|
+
throw new RuntimeModelError56(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
28777
29494
|
}
|
|
28778
29495
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28779
29496
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
28780
29497
|
if (!findView) {
|
|
28781
|
-
throw new
|
|
29498
|
+
throw new RuntimeError52(
|
|
28782
29499
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28783
29500
|
);
|
|
28784
29501
|
}
|
|
@@ -29082,6 +29799,8 @@ export {
|
|
|
29082
29799
|
GridUAColumnController,
|
|
29083
29800
|
HandlebarsUtil,
|
|
29084
29801
|
HubController,
|
|
29802
|
+
KanbanController,
|
|
29803
|
+
KanbanService,
|
|
29085
29804
|
LayoutPanelUtil,
|
|
29086
29805
|
ListController,
|
|
29087
29806
|
ListService,
|