@ibiz-template/runtime 0.1.16 → 0.1.17
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 +281 -125
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +5 -1
- package/out/controller/control/form/edit-form/edit-form.service.d.ts +8 -0
- 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 +23 -21
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +9 -0
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +11 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.controller.js +2 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +16 -8
- package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.service.js +2 -1
- package/out/de-logic/de-logic-context.d.ts +21 -0
- package/out/de-logic/de-logic-context.d.ts.map +1 -1
- package/out/de-logic/de-logic-context.js +22 -0
- package/out/de-logic/de-logic-param/de-logic-param.d.ts.map +1 -1
- package/out/de-logic/de-logic-param/de-logic-param.js +2 -1
- package/out/interface/controller/controller/editor/i-editor-container.controller.d.ts +8 -0
- package/out/interface/controller/controller/editor/i-editor-container.controller.d.ts.map +1 -1
- package/out/interface/controller/event/view/i-form-pickup-data-view.event.d.ts +13 -0
- package/out/interface/controller/event/view/i-form-pickup-data-view.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-form-pickup-data-view.event.js +1 -0
- package/out/interface/controller/event/view/index.d.ts +1 -0
- package/out/interface/controller/event/view/index.d.ts.map +1 -1
- package/out/interface/controller/event/view/index.js +1 -0
- package/out/interface/controller/state/view/i-form-pickup-data-view.state.d.ts +13 -0
- package/out/interface/controller/state/view/i-form-pickup-data-view.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-form-pickup-data-view.state.js +1 -0
- package/out/interface/controller/state/view/i-view.state.d.ts +7 -0
- package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
- package/out/interface/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/interface/util/i-modal-util/i-modal-util.d.ts +35 -0
- package/out/interface/util/i-modal-util/i-modal-util.d.ts.map +1 -1
- package/out/model/layout/layout.d.ts +1 -1
- package/out/model/layout/layout.d.ts.map +1 -1
- package/out/model/layout/layout.js +2 -2
- package/out/service/dto/method.dto.d.ts +0 -1
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +1 -6
- package/out/service/service/control/control.service.d.ts +0 -9
- package/out/service/service/control/control.service.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.d.ts +10 -0
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +12 -0
- package/out/service/service/entity/method/fetch.d.ts +1 -0
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +4 -0
- package/out/service/service/entity/method/method.d.ts +0 -10
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +0 -12
- package/out/ui-logic/ui-logic-context.d.ts +21 -0
- package/out/ui-logic/ui-logic-context.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-context.js +22 -0
- package/out/ui-logic/ui-logic-node/debug-param-node/debug-param-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/debug-param-node/debug-param-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/debug-param-node/debug-param-node.js +21 -0
- package/out/ui-logic/ui-logic-node/index.d.ts +2 -0
- package/out/ui-logic/ui-logic-node/index.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/index.js +2 -0
- package/out/ui-logic/ui-logic-node/msg-box-node/msg-box-node.d.ts +23 -0
- package/out/ui-logic/ui-logic-node/msg-box-node/msg-box-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/msg-box-node/msg-box-node.js +79 -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 -1
- package/out/ui-logic/ui-logic.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +7 -3
- package/package.json +2 -2
- package/src/controller/common/view/view.controller.ts +5 -1
- package/src/controller/control/form/edit-form/edit-form.service.ts +24 -22
- package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +12 -0
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.controller.ts +2 -1
- package/src/controller/control/grid/grid/grid.controller.ts +21 -14
- package/src/controller/control/grid/grid/grid.service.ts +4 -1
- package/src/de-logic/de-logic-context.ts +32 -0
- package/src/de-logic/de-logic-param/de-logic-param.ts +2 -1
- package/src/interface/controller/controller/editor/i-editor-container.controller.ts +9 -0
- package/src/interface/controller/event/view/i-form-pickup-data-view.event.ts +12 -0
- package/src/interface/controller/event/view/index.ts +1 -0
- package/src/interface/controller/state/view/i-form-pickup-data-view.state.ts +12 -0
- package/src/interface/controller/state/view/i-view.state.ts +8 -0
- package/src/interface/controller/state/view/index.ts +1 -0
- package/src/interface/util/i-modal-util/i-modal-util.ts +41 -0
- package/src/model/layout/layout.ts +5 -3
- package/src/service/dto/method.dto.ts +1 -7
- package/src/service/service/control/control.service.ts +0 -10
- package/src/service/service/entity/method/de-action.ts +13 -0
- package/src/service/service/entity/method/fetch.ts +5 -0
- package/src/service/service/entity/method/method.ts +0 -13
- package/src/ui-logic/ui-logic-context.ts +32 -0
- package/src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts +26 -0
- package/src/ui-logic/ui-logic-node/index.ts +2 -0
- package/src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts +87 -0
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +2 -1
- package/src/ui-logic/ui-logic.ts +8 -2
package/dist/index.esm.js
CHANGED
|
@@ -6855,9 +6855,9 @@ function calcLayoutHeightWidth(layoutPos) {
|
|
|
6855
6855
|
}
|
|
6856
6856
|
function calcContentAlignStyle(layoutPos) {
|
|
6857
6857
|
const { valignSelf, halignSelf } = layoutPos;
|
|
6858
|
-
|
|
6858
|
+
let result;
|
|
6859
6859
|
if (valignSelf || halignSelf) {
|
|
6860
|
-
|
|
6860
|
+
result = { display: "flex" };
|
|
6861
6861
|
switch (valignSelf) {
|
|
6862
6862
|
case "TOP":
|
|
6863
6863
|
Object.assign(result, { "align-items": "flex-start" });
|
|
@@ -11264,9 +11264,6 @@ var MethodDto = class _MethodDto {
|
|
|
11264
11264
|
this.fields = [];
|
|
11265
11265
|
}
|
|
11266
11266
|
}
|
|
11267
|
-
get isLocalMode() {
|
|
11268
|
-
return this.entity.storageMode === 1 || this.entity.storageMode === 4;
|
|
11269
|
-
}
|
|
11270
11267
|
/**
|
|
11271
11268
|
* 请求参数组合 DTO
|
|
11272
11269
|
*
|
|
@@ -11343,9 +11340,7 @@ var MethodDto = class _MethodDto {
|
|
|
11343
11340
|
await all[i];
|
|
11344
11341
|
}
|
|
11345
11342
|
const entityData = new AppDataEntity(this.entity, datum);
|
|
11346
|
-
|
|
11347
|
-
await service.local.add(context, entityData);
|
|
11348
|
-
}
|
|
11343
|
+
await service.local.add(context, entityData);
|
|
11349
11344
|
return entityData;
|
|
11350
11345
|
})
|
|
11351
11346
|
);
|
|
@@ -11476,18 +11471,6 @@ var Method = class {
|
|
|
11476
11471
|
this.input = new MethodInput(entity, method.appDEMethodInput);
|
|
11477
11472
|
this.result = new MethodReturn(entity, method.appDEMethodReturn);
|
|
11478
11473
|
}
|
|
11479
|
-
/**
|
|
11480
|
-
* 是否为本地模式
|
|
11481
|
-
*
|
|
11482
|
-
* @author chitanda
|
|
11483
|
-
* @date 2023-04-19 16:04:46
|
|
11484
|
-
* @readonly
|
|
11485
|
-
* @protected
|
|
11486
|
-
* @type {boolean}
|
|
11487
|
-
*/
|
|
11488
|
-
get isLocalMode() {
|
|
11489
|
-
return this.entity.storageMode === 1 || this.entity.storageMode === 4;
|
|
11490
|
-
}
|
|
11491
11474
|
/**
|
|
11492
11475
|
* 发送请求
|
|
11493
11476
|
*
|
|
@@ -11657,6 +11640,28 @@ var DELogicContext = class {
|
|
|
11657
11640
|
var _a;
|
|
11658
11641
|
(_a = this.deLogicParams.get(name)) == null ? void 0 : _a.renew(this);
|
|
11659
11642
|
}
|
|
11643
|
+
/**
|
|
11644
|
+
* 设置上一次返回值
|
|
11645
|
+
* @author lxm
|
|
11646
|
+
* @date 2023-09-04 09:23:52
|
|
11647
|
+
* @param {unknown} value
|
|
11648
|
+
*/
|
|
11649
|
+
setLastReturn(value) {
|
|
11650
|
+
this.lastReturn = value;
|
|
11651
|
+
}
|
|
11652
|
+
/**
|
|
11653
|
+
* 初始化上一次返回参数类型的逻辑参数
|
|
11654
|
+
* @author lxm
|
|
11655
|
+
* @date 2023-09-04 09:52:00
|
|
11656
|
+
* @param {string} tag
|
|
11657
|
+
*/
|
|
11658
|
+
initLastReturnParam(tag) {
|
|
11659
|
+
Object.defineProperty(this.params, tag, {
|
|
11660
|
+
enumerable: true,
|
|
11661
|
+
configurable: true,
|
|
11662
|
+
get: () => this.lastReturn
|
|
11663
|
+
});
|
|
11664
|
+
}
|
|
11660
11665
|
};
|
|
11661
11666
|
|
|
11662
11667
|
// src/de-logic/de-logic-node/de-action-node/de-action-node.ts
|
|
@@ -12308,7 +12313,7 @@ var DELogicParam = class {
|
|
|
12308
12313
|
} else if (m.entityParam) {
|
|
12309
12314
|
ctx.params[tag] = {};
|
|
12310
12315
|
} else if (m.lastReturnParam) {
|
|
12311
|
-
|
|
12316
|
+
ctx.initLastReturnParam(tag);
|
|
12312
12317
|
} else if (m.appContextParam) {
|
|
12313
12318
|
ctx.params[tag] = ctx.context;
|
|
12314
12319
|
} else if (m.simpleListParam) {
|
|
@@ -12565,6 +12570,18 @@ async function execFieldLogics(entity, type, context, data, params) {
|
|
|
12565
12570
|
|
|
12566
12571
|
// src/service/service/entity/method/de-action.ts
|
|
12567
12572
|
var DEActionMethod = class extends Method {
|
|
12573
|
+
/**
|
|
12574
|
+
* 是否为本地模式
|
|
12575
|
+
*
|
|
12576
|
+
* @author chitanda
|
|
12577
|
+
* @date 2023-04-19 16:04:46
|
|
12578
|
+
* @readonly
|
|
12579
|
+
* @protected
|
|
12580
|
+
* @type {boolean}
|
|
12581
|
+
*/
|
|
12582
|
+
get isLocalMode() {
|
|
12583
|
+
return this.method.actionType === "BUILTIN";
|
|
12584
|
+
}
|
|
12568
12585
|
async exec(context, data, params) {
|
|
12569
12586
|
if (this.method.actionType === "DELOGIC") {
|
|
12570
12587
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
@@ -12858,6 +12875,9 @@ import {
|
|
|
12858
12875
|
import { ascSort, descSort } from "qx-util";
|
|
12859
12876
|
import { clone as clone9, equals as equals2, isEmpty as isEmpty7, isNil as isNil7, where as where2 } from "ramda";
|
|
12860
12877
|
var FetchMethod = class extends Method {
|
|
12878
|
+
get isLocalMode() {
|
|
12879
|
+
return this.method.dataSetType === "DATAQUERY";
|
|
12880
|
+
}
|
|
12861
12881
|
async exec(context, data, params) {
|
|
12862
12882
|
if (this.isLocalMode) {
|
|
12863
12883
|
const items2 = await this.searchLocal(
|
|
@@ -12870,6 +12890,7 @@ var FetchMethod = class extends Method {
|
|
|
12870
12890
|
switch (this.method.dataSetType) {
|
|
12871
12891
|
case "INDEXDE":
|
|
12872
12892
|
case "CODELIST":
|
|
12893
|
+
case "MULTIFORM":
|
|
12873
12894
|
res = await this.fetchCodeListSet(context, params);
|
|
12874
12895
|
break;
|
|
12875
12896
|
case "REMOTE":
|
|
@@ -14355,7 +14376,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
14355
14376
|
// src/controller/common/view/view.controller.ts
|
|
14356
14377
|
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
14357
14378
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
14358
|
-
import { isEmpty as isEmpty8, isNil as isNil12 } from "ramda";
|
|
14379
|
+
import { isEmpty as isEmpty8, isNil as isNil12, isNotNil as isNotNil2 } from "ramda";
|
|
14359
14380
|
|
|
14360
14381
|
// src/controller/utils/loading/loading.state.ts
|
|
14361
14382
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -15407,6 +15428,9 @@ var ViewController = class extends BaseController {
|
|
|
15407
15428
|
async onCreated() {
|
|
15408
15429
|
await super.onCreated();
|
|
15409
15430
|
this.modal.hooks.beforeDismiss.tapPromise(async (modalData) => {
|
|
15431
|
+
if (isNotNil2(this.state.closeOK)) {
|
|
15432
|
+
modalData.ok = this.state.closeOK;
|
|
15433
|
+
}
|
|
15410
15434
|
await this._evt.emit("onCloseView", { ...modalData });
|
|
15411
15435
|
});
|
|
15412
15436
|
this._evt.emit("onViewInfoChange", {
|
|
@@ -17641,17 +17665,17 @@ var CaptionBarController = class extends ControlController {
|
|
|
17641
17665
|
import { recursiveIterate } from "@ibiz-template/core";
|
|
17642
17666
|
|
|
17643
17667
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
17644
|
-
import { RuntimeModelError as
|
|
17668
|
+
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
17645
17669
|
import { isArray as isArray3 } from "qx-util";
|
|
17646
17670
|
|
|
17647
17671
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
17648
|
-
import { RuntimeModelError as
|
|
17672
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
17649
17673
|
|
|
17650
17674
|
// src/ui-logic/index.ts
|
|
17651
17675
|
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
17652
17676
|
|
|
17653
17677
|
// src/ui-logic/ui-logic.ts
|
|
17654
|
-
import { ModelError as
|
|
17678
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
17655
17679
|
|
|
17656
17680
|
// src/ui-logic/ui-logic-context.ts
|
|
17657
17681
|
var UILogicContext = class {
|
|
@@ -17749,6 +17773,28 @@ var UILogicContext = class {
|
|
|
17749
17773
|
var _a;
|
|
17750
17774
|
(_a = this.deLogicParams.get(name)) == null ? void 0 : _a.renew(this);
|
|
17751
17775
|
}
|
|
17776
|
+
/**
|
|
17777
|
+
* 设置上一次返回值
|
|
17778
|
+
* @author lxm
|
|
17779
|
+
* @date 2023-09-04 09:23:52
|
|
17780
|
+
* @param {unknown} value
|
|
17781
|
+
*/
|
|
17782
|
+
setLastReturn(value) {
|
|
17783
|
+
this.lastReturn = value;
|
|
17784
|
+
}
|
|
17785
|
+
/**
|
|
17786
|
+
* 初始化上一次返回参数类型的逻辑参数
|
|
17787
|
+
* @author lxm
|
|
17788
|
+
* @date 2023-09-04 09:52:00
|
|
17789
|
+
* @param {string} tag
|
|
17790
|
+
*/
|
|
17791
|
+
initLastReturnParam(tag) {
|
|
17792
|
+
Object.defineProperty(this.params, tag, {
|
|
17793
|
+
enumerable: true,
|
|
17794
|
+
configurable: true,
|
|
17795
|
+
get: () => this.lastReturn
|
|
17796
|
+
});
|
|
17797
|
+
}
|
|
17752
17798
|
};
|
|
17753
17799
|
|
|
17754
17800
|
// src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
|
|
@@ -18206,8 +18252,89 @@ var BindParamNode2 = class extends UILogicNode {
|
|
|
18206
18252
|
}
|
|
18207
18253
|
};
|
|
18208
18254
|
|
|
18209
|
-
// src/ui-logic/ui-logic-
|
|
18255
|
+
// src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
|
|
18210
18256
|
import { ModelError as ModelError21, RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
18257
|
+
var MsgBoxNode = class extends UILogicNode {
|
|
18258
|
+
constructor() {
|
|
18259
|
+
super(...arguments);
|
|
18260
|
+
this.typeMap = {
|
|
18261
|
+
INFO: "info",
|
|
18262
|
+
QUESTION: "success",
|
|
18263
|
+
WARNING: "warning",
|
|
18264
|
+
ERROR: "error"
|
|
18265
|
+
};
|
|
18266
|
+
}
|
|
18267
|
+
async exec(ctx) {
|
|
18268
|
+
const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
|
|
18269
|
+
if (!msgBoxType) {
|
|
18270
|
+
throw new RuntimeModelError33(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
18271
|
+
}
|
|
18272
|
+
if (!buttonsType) {
|
|
18273
|
+
throw new RuntimeModelError33(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
18274
|
+
}
|
|
18275
|
+
let { title } = this.model;
|
|
18276
|
+
let { message } = this.model;
|
|
18277
|
+
if (msgBoxParamId) {
|
|
18278
|
+
const param = ctx.params[msgBoxParamId];
|
|
18279
|
+
if (param.title) {
|
|
18280
|
+
title = param.title;
|
|
18281
|
+
}
|
|
18282
|
+
if (param.message) {
|
|
18283
|
+
message = param.message;
|
|
18284
|
+
}
|
|
18285
|
+
}
|
|
18286
|
+
const type = this.typeMap[msgBoxType];
|
|
18287
|
+
const modalParams = {
|
|
18288
|
+
type,
|
|
18289
|
+
title: title || "\u6D88\u606F",
|
|
18290
|
+
desc: message
|
|
18291
|
+
};
|
|
18292
|
+
let resultTags = [];
|
|
18293
|
+
switch (buttonsType) {
|
|
18294
|
+
case "YESNO":
|
|
18295
|
+
modalParams.confirmButtonText = "\u662F";
|
|
18296
|
+
modalParams.cancelButtonText = "\u5426";
|
|
18297
|
+
modalParams.showConfirmButton = true;
|
|
18298
|
+
modalParams.showCancelButton = true;
|
|
18299
|
+
resultTags = ["yes", "no"];
|
|
18300
|
+
break;
|
|
18301
|
+
case "OK":
|
|
18302
|
+
modalParams.confirmButtonText = "\u786E\u5B9A";
|
|
18303
|
+
modalParams.showConfirmButton = true;
|
|
18304
|
+
modalParams.showCancelButton = false;
|
|
18305
|
+
resultTags = ["ok"];
|
|
18306
|
+
break;
|
|
18307
|
+
case "OKCANCEL":
|
|
18308
|
+
modalParams.confirmButtonText = "\u786E\u5B9A";
|
|
18309
|
+
modalParams.cancelButtonText = "\u53D6\u6D88";
|
|
18310
|
+
modalParams.showConfirmButton = true;
|
|
18311
|
+
modalParams.showCancelButton = true;
|
|
18312
|
+
resultTags = ["ok", "cancel"];
|
|
18313
|
+
break;
|
|
18314
|
+
default:
|
|
18315
|
+
throw new ModelError21(this.model, "".concat(buttonsType, "\u6682\u672A\u652F\u6301"));
|
|
18316
|
+
}
|
|
18317
|
+
console.log(this.model, modalParams);
|
|
18318
|
+
const result = await ibiz.modal.confirm(modalParams);
|
|
18319
|
+
ctx.setLastReturn(resultTags[result ? 0 : 1]);
|
|
18320
|
+
}
|
|
18321
|
+
};
|
|
18322
|
+
|
|
18323
|
+
// src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
|
|
18324
|
+
import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
18325
|
+
var DebugParamNode = class extends UILogicNode {
|
|
18326
|
+
async exec(ctx) {
|
|
18327
|
+
const { dstDEUILogicParamId, name } = this.model;
|
|
18328
|
+
if (!dstDEUILogicParamId) {
|
|
18329
|
+
throw new RuntimeModelError34(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18330
|
+
}
|
|
18331
|
+
const param = ctx.params[dstDEUILogicParamId];
|
|
18332
|
+
console.log("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
|
|
18333
|
+
}
|
|
18334
|
+
};
|
|
18335
|
+
|
|
18336
|
+
// src/ui-logic/ui-logic-param/ui-logic-param.ts
|
|
18337
|
+
import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
18211
18338
|
var UILogicParam = class {
|
|
18212
18339
|
/**
|
|
18213
18340
|
* Creates an instance of UILogicParam.
|
|
@@ -18242,7 +18369,7 @@ var UILogicParam = class {
|
|
|
18242
18369
|
if (control) {
|
|
18243
18370
|
ctx.params[tag] = control;
|
|
18244
18371
|
} else {
|
|
18245
|
-
throw new
|
|
18372
|
+
throw new RuntimeModelError35(
|
|
18246
18373
|
this.model,
|
|
18247
18374
|
"\u89C6\u56FE\u903B\u8F91\u521D\u59CB\u5316\u53C2\u6570\uFF0C\u672A\u627E\u5230".concat(m.codeName, "\u6307\u5B9A\u90E8\u4EF6\u5BF9\u8C61")
|
|
18248
18375
|
);
|
|
@@ -18256,17 +18383,17 @@ var UILogicParam = class {
|
|
|
18256
18383
|
} else if (m.entityListParam) {
|
|
18257
18384
|
ctx.params[tag] = [];
|
|
18258
18385
|
} else if (m.entityPageParam) {
|
|
18259
|
-
throw new
|
|
18386
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5206\u9875\u67E5\u8BE2\u7ED3\u679C");
|
|
18260
18387
|
} else if (m.entityParam) {
|
|
18261
18388
|
ctx.params[tag] = {};
|
|
18262
18389
|
} else if (m.lastReturnParam) {
|
|
18263
|
-
|
|
18390
|
+
ctx.initLastReturnParam(tag);
|
|
18264
18391
|
} else if (m.navContextParam) {
|
|
18265
18392
|
ctx.params[tag] = context;
|
|
18266
18393
|
} else if (m.navViewParamParam) {
|
|
18267
|
-
throw new
|
|
18394
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u89C6\u56FE\u8DEF\u7531\u53C2\u6570");
|
|
18268
18395
|
} else if (m.routeViewSessionParam) {
|
|
18269
|
-
throw new
|
|
18396
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u8DEF\u7531\u89C6\u56FE\u4F1A\u8BDD");
|
|
18270
18397
|
} else if (m.simpleListParam) {
|
|
18271
18398
|
ctx.params[tag] = [];
|
|
18272
18399
|
} else if (m.simpleParam) {
|
|
@@ -18274,7 +18401,7 @@ var UILogicParam = class {
|
|
|
18274
18401
|
} else if (m.viewNavDataParam) {
|
|
18275
18402
|
ctx.params[tag] = viewParams;
|
|
18276
18403
|
} else if (m.viewSessionParam) {
|
|
18277
|
-
throw new
|
|
18404
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5F53\u524D\u89C6\u56FE\u4F1A\u8BDD");
|
|
18278
18405
|
}
|
|
18279
18406
|
}
|
|
18280
18407
|
/**
|
|
@@ -18291,7 +18418,7 @@ var UILogicParam = class {
|
|
|
18291
18418
|
} else if (m.simpleParam || m.entityParam) {
|
|
18292
18419
|
ctx.params[tag] = {};
|
|
18293
18420
|
} else {
|
|
18294
|
-
throw new
|
|
18421
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
|
|
18295
18422
|
}
|
|
18296
18423
|
}
|
|
18297
18424
|
};
|
|
@@ -18326,7 +18453,7 @@ var UILogic = class {
|
|
|
18326
18453
|
this.params = /* @__PURE__ */ new Map();
|
|
18327
18454
|
var _a;
|
|
18328
18455
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
18329
|
-
throw new
|
|
18456
|
+
throw new RuntimeModelError36(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
18330
18457
|
}
|
|
18331
18458
|
model.deuilogicNodes.forEach((node) => {
|
|
18332
18459
|
const { logicNodeType } = node;
|
|
@@ -18353,6 +18480,12 @@ var UILogic = class {
|
|
|
18353
18480
|
case "VIEWCTRLINVOKE":
|
|
18354
18481
|
logicNode = new ViewCtrlInvokeNode(node);
|
|
18355
18482
|
break;
|
|
18483
|
+
case "MSGBOX":
|
|
18484
|
+
logicNode = new MsgBoxNode(node);
|
|
18485
|
+
break;
|
|
18486
|
+
case "DEBUGPARAM":
|
|
18487
|
+
logicNode = new DebugParamNode(node);
|
|
18488
|
+
break;
|
|
18356
18489
|
case "RESETPARAM":
|
|
18357
18490
|
case "COPYPARAM":
|
|
18358
18491
|
case "VIEWCTRLFIREEVENT":
|
|
@@ -18360,13 +18493,11 @@ var UILogic = class {
|
|
|
18360
18493
|
case "SORTPARAM":
|
|
18361
18494
|
case "RENEWPARAM":
|
|
18362
18495
|
case "PFPLUGIN":
|
|
18363
|
-
case "MSGBOX":
|
|
18364
18496
|
case "DEDATASET":
|
|
18365
18497
|
case "DELOGIC":
|
|
18366
18498
|
case "THROWEXCEPTION":
|
|
18367
|
-
case "DEBUGPARAM":
|
|
18368
18499
|
default:
|
|
18369
|
-
throw new
|
|
18500
|
+
throw new ModelError23(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
|
|
18370
18501
|
}
|
|
18371
18502
|
this.nodes.set(node.id, logicNode);
|
|
18372
18503
|
});
|
|
@@ -18419,7 +18550,7 @@ var UILogic = class {
|
|
|
18419
18550
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
18420
18551
|
await this.deepExec(start, ctx);
|
|
18421
18552
|
} else {
|
|
18422
|
-
throw new
|
|
18553
|
+
throw new RuntimeModelError36(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
18423
18554
|
}
|
|
18424
18555
|
if (ctx.isEndNode) {
|
|
18425
18556
|
return ctx.result;
|
|
@@ -18549,7 +18680,7 @@ var UIActionProviderBase = class {
|
|
|
18549
18680
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
18550
18681
|
if (uilogicAttachMode === "REPLACE") {
|
|
18551
18682
|
if (!appDEUILogicId) {
|
|
18552
|
-
throw new
|
|
18683
|
+
throw new RuntimeModelError37(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18553
18684
|
}
|
|
18554
18685
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18555
18686
|
return result;
|
|
@@ -18576,7 +18707,7 @@ var UIActionProviderBase = class {
|
|
|
18576
18707
|
}
|
|
18577
18708
|
if (action.uilogicAttachMode === "AFTER") {
|
|
18578
18709
|
if (!appDEUILogicId) {
|
|
18579
|
-
throw new
|
|
18710
|
+
throw new RuntimeModelError37(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18580
18711
|
}
|
|
18581
18712
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18582
18713
|
}
|
|
@@ -18710,7 +18841,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18710
18841
|
const entityName = action.appDataEntityId;
|
|
18711
18842
|
const methodName = action.appDEMethodId;
|
|
18712
18843
|
if (!entityName || !methodName) {
|
|
18713
|
-
throw new
|
|
18844
|
+
throw new RuntimeModelError38(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
18714
18845
|
}
|
|
18715
18846
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
18716
18847
|
action,
|
|
@@ -18822,7 +18953,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
18822
18953
|
};
|
|
18823
18954
|
|
|
18824
18955
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
18825
|
-
import { StringUtil, RuntimeModelError as
|
|
18956
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError39, ModelError as ModelError24 } from "@ibiz-template/core";
|
|
18826
18957
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
18827
18958
|
async execAction(action, args) {
|
|
18828
18959
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -18837,7 +18968,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
18837
18968
|
case "WIZARD": {
|
|
18838
18969
|
const frontPSAppView = action.frontAppViewId;
|
|
18839
18970
|
if (!frontPSAppView) {
|
|
18840
|
-
throw new
|
|
18971
|
+
throw new RuntimeModelError39(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
18841
18972
|
}
|
|
18842
18973
|
const { resultContext, resultParams } = await this.handleParams(
|
|
18843
18974
|
action,
|
|
@@ -18866,7 +18997,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
18866
18997
|
actionResult = this.doOther(action, args);
|
|
18867
18998
|
break;
|
|
18868
18999
|
default:
|
|
18869
|
-
throw new
|
|
19000
|
+
throw new ModelError24(
|
|
18870
19001
|
action,
|
|
18871
19002
|
"\u672A\u652F\u6301\u7684\u524D\u53F0\u5904\u7406\u6A21\u5F0F[".concat(action.frontProcessType, "]")
|
|
18872
19003
|
);
|
|
@@ -18893,7 +19024,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
18893
19024
|
);
|
|
18894
19025
|
return result || {};
|
|
18895
19026
|
}
|
|
18896
|
-
throw new
|
|
19027
|
+
throw new RuntimeModelError39(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
18897
19028
|
}
|
|
18898
19029
|
};
|
|
18899
19030
|
|
|
@@ -19376,7 +19507,7 @@ var ViewPortletController = class extends PortletPartController {
|
|
|
19376
19507
|
};
|
|
19377
19508
|
|
|
19378
19509
|
// src/controller/control/data-view/data-view.controller.ts
|
|
19379
|
-
import { RuntimeModelError as
|
|
19510
|
+
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
19380
19511
|
|
|
19381
19512
|
// src/controller/control/data-view/data-view.service.ts
|
|
19382
19513
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -19476,7 +19607,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19476
19607
|
const optItemModel = this.getOptItemModel();
|
|
19477
19608
|
if (optItemModel) {
|
|
19478
19609
|
if (!optItemModel.deuiactionGroup) {
|
|
19479
|
-
throw new
|
|
19610
|
+
throw new RuntimeModelError40(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
19480
19611
|
}
|
|
19481
19612
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
19482
19613
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -19618,10 +19749,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19618
19749
|
};
|
|
19619
19750
|
|
|
19620
19751
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
19621
|
-
import { RuntimeModelError as
|
|
19752
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
19622
19753
|
|
|
19623
19754
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
19624
|
-
import { RuntimeError as RuntimeError33, RuntimeModelError as
|
|
19755
|
+
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
19625
19756
|
var ExpBarControlController = class extends ControlController {
|
|
19626
19757
|
constructor() {
|
|
19627
19758
|
super(...arguments);
|
|
@@ -19676,7 +19807,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
19676
19807
|
get xDataController() {
|
|
19677
19808
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
19678
19809
|
if (!controller) {
|
|
19679
|
-
throw new
|
|
19810
|
+
throw new RuntimeModelError41(
|
|
19680
19811
|
this.model,
|
|
19681
19812
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
19682
19813
|
);
|
|
@@ -19972,7 +20103,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
19972
20103
|
get xDataController() {
|
|
19973
20104
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
19974
20105
|
if (!controller) {
|
|
19975
|
-
throw new
|
|
20106
|
+
throw new RuntimeModelError42(
|
|
19976
20107
|
this.model,
|
|
19977
20108
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
19978
20109
|
);
|
|
@@ -20026,7 +20157,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
20026
20157
|
};
|
|
20027
20158
|
|
|
20028
20159
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
20029
|
-
import { RuntimeError as RuntimeError34, RuntimeModelError as
|
|
20160
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
20030
20161
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
20031
20162
|
constructor() {
|
|
20032
20163
|
super(...arguments);
|
|
@@ -20049,7 +20180,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
20049
20180
|
get xDataController() {
|
|
20050
20181
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
20051
20182
|
if (!controller) {
|
|
20052
|
-
throw new
|
|
20183
|
+
throw new RuntimeModelError43(
|
|
20053
20184
|
this.model,
|
|
20054
20185
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
20055
20186
|
);
|
|
@@ -21089,7 +21220,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
21089
21220
|
// src/controller/control/form/form-detail/form-item/form-item.controller.ts
|
|
21090
21221
|
import Schema from "async-validator";
|
|
21091
21222
|
import { createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
21092
|
-
import { ModelError as
|
|
21223
|
+
import { ModelError as ModelError25, RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
21093
21224
|
import dayjs3 from "dayjs";
|
|
21094
21225
|
|
|
21095
21226
|
// src/controller/control/form/form-detail/form-item/form-item.state.ts
|
|
@@ -21212,6 +21343,17 @@ var FormItemController = class extends FormDetailController {
|
|
|
21212
21343
|
get valueFormat() {
|
|
21213
21344
|
return this.model.valueFormat;
|
|
21214
21345
|
}
|
|
21346
|
+
/**
|
|
21347
|
+
* 数据类型
|
|
21348
|
+
*
|
|
21349
|
+
* @author zhanghengfeng
|
|
21350
|
+
* @date 2023-09-01 11:09:00
|
|
21351
|
+
* @readonly
|
|
21352
|
+
* @type {(number | undefined)}
|
|
21353
|
+
*/
|
|
21354
|
+
get dataType() {
|
|
21355
|
+
return this.model.dataType;
|
|
21356
|
+
}
|
|
21215
21357
|
/**
|
|
21216
21358
|
* 初始化
|
|
21217
21359
|
*
|
|
@@ -21405,7 +21547,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
21405
21547
|
data[this.name] = createUUID4();
|
|
21406
21548
|
break;
|
|
21407
21549
|
default:
|
|
21408
|
-
throw new
|
|
21550
|
+
throw new ModelError25(this.model, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
|
|
21409
21551
|
}
|
|
21410
21552
|
}
|
|
21411
21553
|
};
|
|
@@ -21652,7 +21794,7 @@ import { debounce } from "lodash-es";
|
|
|
21652
21794
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
21653
21795
|
import {
|
|
21654
21796
|
recursiveIterate as recursiveIterate3,
|
|
21655
|
-
RuntimeModelError as
|
|
21797
|
+
RuntimeModelError as RuntimeModelError44
|
|
21656
21798
|
} from "@ibiz-template/core";
|
|
21657
21799
|
var EditFormService = class extends ControlService {
|
|
21658
21800
|
/**
|
|
@@ -21725,10 +21867,12 @@ var EditFormService = class extends ControlService {
|
|
|
21725
21867
|
*/
|
|
21726
21868
|
async create(context, data) {
|
|
21727
21869
|
var _a;
|
|
21870
|
+
const _data = data instanceof ControlVO ? data.getOrigin() : data;
|
|
21871
|
+
const tempData = this.getFilteredData(_data);
|
|
21728
21872
|
let res = await this.exec(
|
|
21729
21873
|
((_a = this.model.createControlAction) == null ? void 0 : _a.appDEMethodId) || "create",
|
|
21730
21874
|
context,
|
|
21731
|
-
|
|
21875
|
+
tempData
|
|
21732
21876
|
);
|
|
21733
21877
|
res = this.handleResponse(res);
|
|
21734
21878
|
return res;
|
|
@@ -21744,10 +21888,12 @@ var EditFormService = class extends ControlService {
|
|
|
21744
21888
|
*/
|
|
21745
21889
|
async update(context, data) {
|
|
21746
21890
|
var _a;
|
|
21891
|
+
const _data = data instanceof ControlVO ? data.getOrigin() : data;
|
|
21892
|
+
const tempData = this.getFilteredData(_data);
|
|
21747
21893
|
let res = await this.exec(
|
|
21748
21894
|
((_a = this.model.updateControlAction) == null ? void 0 : _a.appDEMethodId) || "update",
|
|
21749
21895
|
context,
|
|
21750
|
-
|
|
21896
|
+
tempData
|
|
21751
21897
|
);
|
|
21752
21898
|
res = this.handleResponse(res);
|
|
21753
21899
|
return res;
|
|
@@ -21766,7 +21912,7 @@ var EditFormService = class extends ControlService {
|
|
|
21766
21912
|
const wizardForm = this.model;
|
|
21767
21913
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
21768
21914
|
if (!methodName) {
|
|
21769
|
-
throw new
|
|
21915
|
+
throw new RuntimeModelError44(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
21770
21916
|
}
|
|
21771
21917
|
let res = await this.exec(
|
|
21772
21918
|
methodName,
|
|
@@ -21866,7 +22012,7 @@ var EditFormService = class extends ControlService {
|
|
|
21866
22012
|
recursiveIterate3(
|
|
21867
22013
|
this.model,
|
|
21868
22014
|
(item) => {
|
|
21869
|
-
if (item.detailType === "FORMITEM") {
|
|
22015
|
+
if (item.detailType === "FORMITEM" || item.detailType === "MDCTRL") {
|
|
21870
22016
|
const formItem = item;
|
|
21871
22017
|
const uiKey = formItem.fieldName || formItem.id.toLowerCase();
|
|
21872
22018
|
const deField = formItem.fieldName || item.appDEFieldId;
|
|
@@ -21883,22 +22029,6 @@ var EditFormService = class extends ControlService {
|
|
|
21883
22029
|
}
|
|
21884
22030
|
this.dataUIMap.set(uiKey, mapField);
|
|
21885
22031
|
}
|
|
21886
|
-
if (item.detailType === "MDCTRL") {
|
|
21887
|
-
const formItem = item;
|
|
21888
|
-
const uiKey = formItem.fieldName || formItem.id.toLowerCase();
|
|
21889
|
-
const deField = formItem.fieldName || item.appDEFieldId;
|
|
21890
|
-
let mapField;
|
|
21891
|
-
if (deField) {
|
|
21892
|
-
mapField = new UIMapField(uiKey, deField, {
|
|
21893
|
-
isOriginField: true
|
|
21894
|
-
});
|
|
21895
|
-
} else {
|
|
21896
|
-
mapField = new UIMapField(uiKey, uiKey, {
|
|
21897
|
-
isOriginField: true
|
|
21898
|
-
});
|
|
21899
|
-
}
|
|
21900
|
-
this.dataUIMap.set(uiKey, mapField);
|
|
21901
|
-
}
|
|
21902
22032
|
},
|
|
21903
22033
|
{
|
|
21904
22034
|
childrenFields: ["deformPages", "deformDetails"]
|
|
@@ -21920,6 +22050,22 @@ var EditFormService = class extends ControlService {
|
|
|
21920
22050
|
}
|
|
21921
22051
|
return res;
|
|
21922
22052
|
}
|
|
22053
|
+
/**
|
|
22054
|
+
* 保存时根据表单项过滤出传给后台的数据
|
|
22055
|
+
*
|
|
22056
|
+
* @return {*}
|
|
22057
|
+
* @author: zhujiamin
|
|
22058
|
+
* @Date: 2023-09-01 10:04:25
|
|
22059
|
+
*/
|
|
22060
|
+
getFilteredData(data) {
|
|
22061
|
+
const tempData = {};
|
|
22062
|
+
this.dataUIMap.forEach((dataUI) => {
|
|
22063
|
+
if (data[dataUI.dataKey] !== void 0) {
|
|
22064
|
+
tempData[dataUI.dataKey] = data[dataUI.dataKey];
|
|
22065
|
+
}
|
|
22066
|
+
});
|
|
22067
|
+
return tempData;
|
|
22068
|
+
}
|
|
21923
22069
|
};
|
|
21924
22070
|
|
|
21925
22071
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
@@ -22739,14 +22885,15 @@ var FormMDCtrlRepeaterGridController = class extends FormMDCtrlContentTypeContro
|
|
|
22739
22885
|
initColumns(details) {
|
|
22740
22886
|
details.forEach(async (detail) => {
|
|
22741
22887
|
if (detail.detailType === "FORMITEM") {
|
|
22742
|
-
const { editor } = detail;
|
|
22888
|
+
const { editor, dataType } = detail;
|
|
22743
22889
|
const editorProvider = await getEditorProvider(editor);
|
|
22744
22890
|
if (editorProvider) {
|
|
22745
22891
|
const c = await editorProvider.createController(editor, {
|
|
22746
22892
|
unitName: editor.unitName,
|
|
22747
22893
|
valueFormat: editor.valueFormat,
|
|
22748
22894
|
context: this.parent.form.context,
|
|
22749
|
-
params: this.parent.form.params
|
|
22895
|
+
params: this.parent.form.params,
|
|
22896
|
+
dataType
|
|
22750
22897
|
});
|
|
22751
22898
|
this.editorMap[detail.codeName] = {
|
|
22752
22899
|
provider: editorProvider,
|
|
@@ -23204,7 +23351,7 @@ import {
|
|
|
23204
23351
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
23205
23352
|
recursiveIterate as recursiveIterate4,
|
|
23206
23353
|
RuntimeError as RuntimeError40,
|
|
23207
|
-
RuntimeModelError as
|
|
23354
|
+
RuntimeModelError as RuntimeModelError45
|
|
23208
23355
|
} from "@ibiz-template/core";
|
|
23209
23356
|
import { clone as clone13 } from "ramda";
|
|
23210
23357
|
|
|
@@ -23245,7 +23392,10 @@ var GridService = class extends MDControlService {
|
|
|
23245
23392
|
* @returns {*} {Promise<IHttpResponse<ControlVO>>}
|
|
23246
23393
|
*/
|
|
23247
23394
|
async updateGridEditItem(methodName, context, params = {}) {
|
|
23248
|
-
|
|
23395
|
+
const entityService = await this.app.deService.getService(
|
|
23396
|
+
this.model.appDataEntityId
|
|
23397
|
+
);
|
|
23398
|
+
let res = await entityService.exec(methodName, context, params);
|
|
23249
23399
|
res = this.handleResponse(res);
|
|
23250
23400
|
return res;
|
|
23251
23401
|
}
|
|
@@ -23396,11 +23546,11 @@ var GridController = class extends MDControlController {
|
|
|
23396
23546
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
23397
23547
|
);
|
|
23398
23548
|
if (!this.groupFieldColumn) {
|
|
23399
|
-
throw new
|
|
23549
|
+
throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
23400
23550
|
}
|
|
23401
23551
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
23402
23552
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
23403
|
-
throw new
|
|
23553
|
+
throw new RuntimeModelError45(
|
|
23404
23554
|
this.groupFieldColumn.model,
|
|
23405
23555
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
23406
23556
|
);
|
|
@@ -23410,7 +23560,7 @@ var GridController = class extends MDControlController {
|
|
|
23410
23560
|
);
|
|
23411
23561
|
if (index !== -1 && index !== 0) {
|
|
23412
23562
|
if (this.isMultistageHeader) {
|
|
23413
|
-
throw new
|
|
23563
|
+
throw new RuntimeModelError45(
|
|
23414
23564
|
this.model,
|
|
23415
23565
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
23416
23566
|
);
|
|
@@ -23420,10 +23570,10 @@ var GridController = class extends MDControlController {
|
|
|
23420
23570
|
}
|
|
23421
23571
|
if (groupMode === "CODELIST") {
|
|
23422
23572
|
if (!groupCodeListId) {
|
|
23423
|
-
throw new
|
|
23573
|
+
throw new RuntimeModelError45(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
23424
23574
|
}
|
|
23425
23575
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
23426
|
-
throw new
|
|
23576
|
+
throw new RuntimeModelError45(
|
|
23427
23577
|
this.model,
|
|
23428
23578
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
23429
23579
|
);
|
|
@@ -23503,7 +23653,7 @@ var GridController = class extends MDControlController {
|
|
|
23503
23653
|
return;
|
|
23504
23654
|
}
|
|
23505
23655
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
23506
|
-
throw new
|
|
23656
|
+
throw new RuntimeModelError45(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
23507
23657
|
}
|
|
23508
23658
|
const params = await this.getFetchParams();
|
|
23509
23659
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -23887,21 +24037,27 @@ var GridController = class extends MDControlController {
|
|
|
23887
24037
|
if (!findUpdate) {
|
|
23888
24038
|
throw new RuntimeError40("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
23889
24039
|
}
|
|
23890
|
-
const { appDEMethodId, degeiupdateDetails } = findUpdate;
|
|
24040
|
+
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
23891
24041
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
23892
|
-
|
|
23893
|
-
|
|
23894
|
-
|
|
23895
|
-
|
|
23896
|
-
|
|
23897
|
-
|
|
23898
|
-
|
|
23899
|
-
|
|
23900
|
-
|
|
23901
|
-
|
|
23902
|
-
return this.setRowValue(row, itemName, result[itemName]);
|
|
23903
|
-
})
|
|
24042
|
+
if (customCode && scriptCode) {
|
|
24043
|
+
ScriptFactory.execScriptFn({ data: row.data }, scriptCode, {
|
|
24044
|
+
isAsync: false
|
|
24045
|
+
});
|
|
24046
|
+
} else {
|
|
24047
|
+
const params = { ...this.params, ...row.data.getOrigin() };
|
|
24048
|
+
const res = await this.service.updateGridEditItem(
|
|
24049
|
+
appDEMethodId,
|
|
24050
|
+
this.context,
|
|
24051
|
+
params
|
|
23904
24052
|
);
|
|
24053
|
+
const result = res.data;
|
|
24054
|
+
if (result && (updateItems == null ? void 0 : updateItems.length)) {
|
|
24055
|
+
await Promise.all(
|
|
24056
|
+
updateItems.map((itemName) => {
|
|
24057
|
+
return this.setRowValue(row, itemName, result[itemName]);
|
|
24058
|
+
})
|
|
24059
|
+
);
|
|
24060
|
+
}
|
|
23905
24061
|
}
|
|
23906
24062
|
}
|
|
23907
24063
|
/**
|
|
@@ -24019,7 +24175,7 @@ var GridController = class extends MDControlController {
|
|
|
24019
24175
|
};
|
|
24020
24176
|
|
|
24021
24177
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
24022
|
-
import { DataTypes, ModelError as
|
|
24178
|
+
import { DataTypes, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
24023
24179
|
import dayjs4 from "dayjs";
|
|
24024
24180
|
import { clone as clone14 } from "ramda";
|
|
24025
24181
|
var GridFieldColumnController = class extends GridColumnController {
|
|
@@ -24106,7 +24262,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24106
24262
|
const valueItem = this.model.linkValueItem || "srfkey";
|
|
24107
24263
|
const value = row.data[valueItem];
|
|
24108
24264
|
if (value == null) {
|
|
24109
|
-
throw new
|
|
24265
|
+
throw new ModelError26(this.model, "\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
|
|
24110
24266
|
}
|
|
24111
24267
|
const { linkAppViewId } = this.model;
|
|
24112
24268
|
if (!linkAppViewId) {
|
|
@@ -24207,12 +24363,12 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24207
24363
|
aggValue = Math.min(...items.map((item) => item[fieldName]));
|
|
24208
24364
|
break;
|
|
24209
24365
|
default:
|
|
24210
|
-
throw new
|
|
24366
|
+
throw new ModelError26(this.model, "\u6682\u672A\u652F\u6301\u5C5E\u6027\u5217\u805A\u5408\u6A21\u5F0F".concat(aggMode));
|
|
24211
24367
|
}
|
|
24212
24368
|
} else if (this.grid.model.aggMode === "ALL") {
|
|
24213
|
-
throw new
|
|
24369
|
+
throw new ModelError26(this.model, "\u8FDC\u7A0B\u805A\u5408\u6682\u672A\u652F\u6301");
|
|
24214
24370
|
} else {
|
|
24215
|
-
throw new
|
|
24371
|
+
throw new ModelError26(
|
|
24216
24372
|
this.grid.model,
|
|
24217
24373
|
"\u6682\u672A\u652F\u6301\u805A\u5408\u6A21\u5F0F".concat(this.grid.model.aggMode)
|
|
24218
24374
|
);
|
|
@@ -24254,7 +24410,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24254
24410
|
};
|
|
24255
24411
|
|
|
24256
24412
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
24257
|
-
import { RuntimeModelError as
|
|
24413
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
24258
24414
|
var GridUAColumnController = class extends GridColumnController {
|
|
24259
24415
|
/**
|
|
24260
24416
|
* 给rowController初始化操作列的状态
|
|
@@ -24267,7 +24423,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
24267
24423
|
var _a;
|
|
24268
24424
|
const { deuiactionGroup } = this.model;
|
|
24269
24425
|
if (!deuiactionGroup) {
|
|
24270
|
-
throw new
|
|
24426
|
+
throw new RuntimeModelError46(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
24271
24427
|
}
|
|
24272
24428
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
24273
24429
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -25584,7 +25740,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
25584
25740
|
import { recursiveIterate as recursiveIterate5 } from "@ibiz-template/core";
|
|
25585
25741
|
|
|
25586
25742
|
// src/controller/control/tree/tree.service.ts
|
|
25587
|
-
import { ModelError as
|
|
25743
|
+
import { ModelError as ModelError27 } from "@ibiz-template/core";
|
|
25588
25744
|
var TreeService = class extends MDControlService {
|
|
25589
25745
|
/**
|
|
25590
25746
|
* 获取子节点数据
|
|
@@ -25684,7 +25840,7 @@ var TreeService = class extends MDControlService {
|
|
|
25684
25840
|
);
|
|
25685
25841
|
break;
|
|
25686
25842
|
default:
|
|
25687
|
-
throw new
|
|
25843
|
+
throw new ModelError27(
|
|
25688
25844
|
nodeModel,
|
|
25689
25845
|
"".concat(nodeModel.treeNodeType, "\u8282\u70B9\u7C7B\u578B\u672A\u652F\u6301")
|
|
25690
25846
|
);
|
|
@@ -27170,7 +27326,7 @@ var ViewEngineBase = class {
|
|
|
27170
27326
|
};
|
|
27171
27327
|
|
|
27172
27328
|
// src/engine/md-view.engine.ts
|
|
27173
|
-
import { RuntimeModelError as
|
|
27329
|
+
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
27174
27330
|
var MDViewEngine = class extends ViewEngineBase {
|
|
27175
27331
|
/**
|
|
27176
27332
|
* 多数据部件名称
|
|
@@ -27359,7 +27515,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27359
27515
|
(item) => item.id === "newdata"
|
|
27360
27516
|
);
|
|
27361
27517
|
if (!openAppViewLogic) {
|
|
27362
|
-
throw new
|
|
27518
|
+
throw new RuntimeModelError47(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27363
27519
|
}
|
|
27364
27520
|
const context = this.view.context.clone();
|
|
27365
27521
|
if (copyMode) {
|
|
@@ -27375,7 +27531,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27375
27531
|
if (result instanceof Object && result.ok) {
|
|
27376
27532
|
this.refresh();
|
|
27377
27533
|
} else if (result === -1) {
|
|
27378
|
-
throw new
|
|
27534
|
+
throw new RuntimeModelError47(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27379
27535
|
}
|
|
27380
27536
|
}
|
|
27381
27537
|
/**
|
|
@@ -27563,7 +27719,7 @@ var LogicExecutor = class {
|
|
|
27563
27719
|
};
|
|
27564
27720
|
|
|
27565
27721
|
// src/logic-scheduler/executor/logic-executor-factory.ts
|
|
27566
|
-
import { ModelError as
|
|
27722
|
+
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
27567
27723
|
var LogicExecutorFactory = class {
|
|
27568
27724
|
constructor() {
|
|
27569
27725
|
/**
|
|
@@ -27593,7 +27749,7 @@ var LogicExecutorFactory = class {
|
|
|
27593
27749
|
createExecutor(logic, scheduler) {
|
|
27594
27750
|
const constructor = this.constructorMap.get(logic.logicType);
|
|
27595
27751
|
if (!constructor) {
|
|
27596
|
-
throw new
|
|
27752
|
+
throw new ModelError28(logic, "\u903B\u8F91\u7C7B\u578B ".concat(logic.logicType, " \u6682\u672A\u652F\u6301\uFF01"));
|
|
27597
27753
|
}
|
|
27598
27754
|
return constructor(logic, scheduler);
|
|
27599
27755
|
}
|
|
@@ -27642,13 +27798,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
27642
27798
|
};
|
|
27643
27799
|
|
|
27644
27800
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
27645
|
-
import { RuntimeModelError as
|
|
27801
|
+
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
27646
27802
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
27647
27803
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27648
27804
|
execute(executeParams) {
|
|
27649
27805
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
27650
27806
|
if (!appDEUILogicId) {
|
|
27651
|
-
throw new
|
|
27807
|
+
throw new RuntimeModelError48(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
27652
27808
|
}
|
|
27653
27809
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
27654
27810
|
}
|
|
@@ -27906,7 +28062,7 @@ var ViewLogicScheduler = class extends LogicScheduler {
|
|
|
27906
28062
|
};
|
|
27907
28063
|
|
|
27908
28064
|
// src/logic-scheduler/trigger/logic-trigger-factory.ts
|
|
27909
|
-
import { ModelError as
|
|
28065
|
+
import { ModelError as ModelError29 } from "@ibiz-template/core";
|
|
27910
28066
|
var LogicTriggerFactory = class {
|
|
27911
28067
|
constructor() {
|
|
27912
28068
|
/**
|
|
@@ -27936,7 +28092,7 @@ var LogicTriggerFactory = class {
|
|
|
27936
28092
|
createTrigger(logic, scheduler) {
|
|
27937
28093
|
const constructor = this.constructorMap.get(logic.triggerType);
|
|
27938
28094
|
if (!constructor) {
|
|
27939
|
-
throw new
|
|
28095
|
+
throw new ModelError29(logic, "\u89E6\u53D1\u5668\u7C7B\u578B ".concat(logic.triggerType, " \u6682\u672A\u652F\u6301\uFF01"));
|
|
27940
28096
|
}
|
|
27941
28097
|
return constructor(logic, scheduler);
|
|
27942
28098
|
}
|
|
@@ -28127,9 +28283,9 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28127
28283
|
|
|
28128
28284
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
28129
28285
|
import {
|
|
28130
|
-
ModelError as
|
|
28286
|
+
ModelError as ModelError30,
|
|
28131
28287
|
RuntimeError as RuntimeError50,
|
|
28132
|
-
RuntimeModelError as
|
|
28288
|
+
RuntimeModelError as RuntimeModelError49
|
|
28133
28289
|
} from "@ibiz-template/core";
|
|
28134
28290
|
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
28135
28291
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -28168,14 +28324,14 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28168
28324
|
}
|
|
28169
28325
|
const openViewRef = appUILogic.openDataAppView;
|
|
28170
28326
|
if (!openViewRef) {
|
|
28171
|
-
throw new
|
|
28327
|
+
throw new RuntimeModelError49(
|
|
28172
28328
|
appUILogic,
|
|
28173
28329
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
28174
28330
|
);
|
|
28175
28331
|
}
|
|
28176
28332
|
const openView = openViewRef.refAppViewId;
|
|
28177
28333
|
if (!openView) {
|
|
28178
|
-
throw new
|
|
28334
|
+
throw new RuntimeModelError49(
|
|
28179
28335
|
appUILogic,
|
|
28180
28336
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
28181
28337
|
);
|
|
@@ -28221,13 +28377,13 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28221
28377
|
return { ok: false };
|
|
28222
28378
|
}
|
|
28223
28379
|
} else if (enableBatchAdd) {
|
|
28224
|
-
throw new
|
|
28380
|
+
throw new ModelError30(appUILogic, "enableBatchAdd\u6682\u672A\u652F\u6301");
|
|
28225
28381
|
} else if (batchAddOnly) {
|
|
28226
|
-
throw new
|
|
28382
|
+
throw new ModelError30(appUILogic, "batchAddOnly\u6682\u672A\u652F\u6301");
|
|
28227
28383
|
} else {
|
|
28228
28384
|
newViewRef = newDataAppView;
|
|
28229
28385
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
28230
|
-
throw new
|
|
28386
|
+
throw new RuntimeModelError49(
|
|
28231
28387
|
appUILogic,
|
|
28232
28388
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
28233
28389
|
);
|
|
@@ -28273,7 +28429,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28273
28429
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
28274
28430
|
const { context, params, ...rest } = parameters;
|
|
28275
28431
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
28276
|
-
throw new
|
|
28432
|
+
throw new RuntimeModelError49(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
28277
28433
|
}
|
|
28278
28434
|
const result = await ibiz.commands.execute(
|
|
28279
28435
|
OpenAppViewCommand.TAG,
|