@ibiz-template/runtime 0.1.15 → 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 +357 -152
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +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/exp-bar/exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/exp-bar.controller.js +2 -6
- 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 +7 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +40 -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/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +14 -9
- 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/engine/md-view.engine.d.ts +10 -1
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +12 -3
- 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/control/i-grid.state.d.ts +14 -0
- package/out/interface/controller/state/control/i-grid.state.d.ts.map +1 -1
- 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/service/code-list-item/code-list-item.d.ts +5 -0
- package/out/interface/service/code-list-item/code-list-item.d.ts.map +1 -1
- 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/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +1 -0
- 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/out/utils/text-util/text-util.d.ts +12 -3
- package/out/utils/text-util/text-util.d.ts.map +1 -1
- package/out/utils/text-util/text-util.js +23 -4
- package/package.json +2 -2
- package/src/command/app/open-app-view/open-app-view.ts +1 -1
- package/src/controller/common/view/view.controller.ts +5 -1
- package/src/controller/control/exp-bar/exp-bar.controller.ts +2 -6
- 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 +46 -14
- package/src/controller/control/grid/grid/grid.service.ts +4 -1
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +16 -12
- 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/engine/md-view.engine.ts +14 -3
- 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/control/i-grid.state.ts +16 -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/service/code-list-item/code-list-item.ts +6 -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/code-list/code-list.service.ts +1 -0
- 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/src/utils/text-util/text-util.ts +22 -4
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" });
|
|
@@ -8510,6 +8510,17 @@ function filterValueRules(vrs, name) {
|
|
|
8510
8510
|
|
|
8511
8511
|
// src/utils/text-util/text-util.ts
|
|
8512
8512
|
var TextUtil = class {
|
|
8513
|
+
constructor() {
|
|
8514
|
+
/**
|
|
8515
|
+
* input元素,用于存储拷贝的文本
|
|
8516
|
+
*
|
|
8517
|
+
* @author zhanghengfeng
|
|
8518
|
+
* @date 2023-08-31 20:08:06
|
|
8519
|
+
* @private
|
|
8520
|
+
* @type {(HTMLInputElement | null)}
|
|
8521
|
+
*/
|
|
8522
|
+
this.inputElement = null;
|
|
8523
|
+
}
|
|
8513
8524
|
/**
|
|
8514
8525
|
* 值格式化
|
|
8515
8526
|
*
|
|
@@ -8526,12 +8537,20 @@ var TextUtil = class {
|
|
|
8526
8537
|
* 拷贝文本
|
|
8527
8538
|
*
|
|
8528
8539
|
* @author zhanghengfeng
|
|
8529
|
-
* @date 2023-08-
|
|
8540
|
+
* @date 2023-08-31 11:08:51
|
|
8530
8541
|
* @param {string} value
|
|
8531
|
-
* @return {*} {
|
|
8542
|
+
* @return {*} {boolean}
|
|
8532
8543
|
*/
|
|
8533
|
-
|
|
8534
|
-
|
|
8544
|
+
copy(value) {
|
|
8545
|
+
if (!this.inputElement) {
|
|
8546
|
+
this.inputElement = document.createElement("input");
|
|
8547
|
+
this.inputElement.style.position = "absolute";
|
|
8548
|
+
this.inputElement.style.left = "-9999px";
|
|
8549
|
+
document.body.appendChild(this.inputElement);
|
|
8550
|
+
}
|
|
8551
|
+
this.inputElement.value = value;
|
|
8552
|
+
this.inputElement.select();
|
|
8553
|
+
return document.execCommand("copy");
|
|
8535
8554
|
}
|
|
8536
8555
|
};
|
|
8537
8556
|
|
|
@@ -8576,7 +8595,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
8576
8595
|
case "INDEXVIEWTAB":
|
|
8577
8596
|
if (opts.noWaitRoute) {
|
|
8578
8597
|
this.openIndexViewTab(appView, context, params);
|
|
8579
|
-
return;
|
|
8598
|
+
return { ok: true };
|
|
8580
8599
|
}
|
|
8581
8600
|
return this.openIndexViewTab(appView, context, params);
|
|
8582
8601
|
case "POPUP":
|
|
@@ -10624,7 +10643,8 @@ var CodeListService = class {
|
|
|
10624
10643
|
text,
|
|
10625
10644
|
value: isValueNumber ? Number(codeItem.value) : codeItem.value,
|
|
10626
10645
|
color: codeItem.color,
|
|
10627
|
-
id: codeItem.codeName
|
|
10646
|
+
id: codeItem.codeName,
|
|
10647
|
+
textCls: codeItem.textCls
|
|
10628
10648
|
};
|
|
10629
10649
|
if ((_a = codeItem.codeItems) == null ? void 0 : _a.length) {
|
|
10630
10650
|
_codeItem.children = this.formatStaticItems(
|
|
@@ -11244,9 +11264,6 @@ var MethodDto = class _MethodDto {
|
|
|
11244
11264
|
this.fields = [];
|
|
11245
11265
|
}
|
|
11246
11266
|
}
|
|
11247
|
-
get isLocalMode() {
|
|
11248
|
-
return this.entity.storageMode === 1 || this.entity.storageMode === 4;
|
|
11249
|
-
}
|
|
11250
11267
|
/**
|
|
11251
11268
|
* 请求参数组合 DTO
|
|
11252
11269
|
*
|
|
@@ -11323,9 +11340,7 @@ var MethodDto = class _MethodDto {
|
|
|
11323
11340
|
await all[i];
|
|
11324
11341
|
}
|
|
11325
11342
|
const entityData = new AppDataEntity(this.entity, datum);
|
|
11326
|
-
|
|
11327
|
-
await service.local.add(context, entityData);
|
|
11328
|
-
}
|
|
11343
|
+
await service.local.add(context, entityData);
|
|
11329
11344
|
return entityData;
|
|
11330
11345
|
})
|
|
11331
11346
|
);
|
|
@@ -11456,18 +11471,6 @@ var Method = class {
|
|
|
11456
11471
|
this.input = new MethodInput(entity, method.appDEMethodInput);
|
|
11457
11472
|
this.result = new MethodReturn(entity, method.appDEMethodReturn);
|
|
11458
11473
|
}
|
|
11459
|
-
/**
|
|
11460
|
-
* 是否为本地模式
|
|
11461
|
-
*
|
|
11462
|
-
* @author chitanda
|
|
11463
|
-
* @date 2023-04-19 16:04:46
|
|
11464
|
-
* @readonly
|
|
11465
|
-
* @protected
|
|
11466
|
-
* @type {boolean}
|
|
11467
|
-
*/
|
|
11468
|
-
get isLocalMode() {
|
|
11469
|
-
return this.entity.storageMode === 1 || this.entity.storageMode === 4;
|
|
11470
|
-
}
|
|
11471
11474
|
/**
|
|
11472
11475
|
* 发送请求
|
|
11473
11476
|
*
|
|
@@ -11637,6 +11640,28 @@ var DELogicContext = class {
|
|
|
11637
11640
|
var _a;
|
|
11638
11641
|
(_a = this.deLogicParams.get(name)) == null ? void 0 : _a.renew(this);
|
|
11639
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
|
+
}
|
|
11640
11665
|
};
|
|
11641
11666
|
|
|
11642
11667
|
// src/de-logic/de-logic-node/de-action-node/de-action-node.ts
|
|
@@ -12288,7 +12313,7 @@ var DELogicParam = class {
|
|
|
12288
12313
|
} else if (m.entityParam) {
|
|
12289
12314
|
ctx.params[tag] = {};
|
|
12290
12315
|
} else if (m.lastReturnParam) {
|
|
12291
|
-
|
|
12316
|
+
ctx.initLastReturnParam(tag);
|
|
12292
12317
|
} else if (m.appContextParam) {
|
|
12293
12318
|
ctx.params[tag] = ctx.context;
|
|
12294
12319
|
} else if (m.simpleListParam) {
|
|
@@ -12545,6 +12570,18 @@ async function execFieldLogics(entity, type, context, data, params) {
|
|
|
12545
12570
|
|
|
12546
12571
|
// src/service/service/entity/method/de-action.ts
|
|
12547
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
|
+
}
|
|
12548
12585
|
async exec(context, data, params) {
|
|
12549
12586
|
if (this.method.actionType === "DELOGIC") {
|
|
12550
12587
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
@@ -12838,6 +12875,9 @@ import {
|
|
|
12838
12875
|
import { ascSort, descSort } from "qx-util";
|
|
12839
12876
|
import { clone as clone9, equals as equals2, isEmpty as isEmpty7, isNil as isNil7, where as where2 } from "ramda";
|
|
12840
12877
|
var FetchMethod = class extends Method {
|
|
12878
|
+
get isLocalMode() {
|
|
12879
|
+
return this.method.dataSetType === "DATAQUERY";
|
|
12880
|
+
}
|
|
12841
12881
|
async exec(context, data, params) {
|
|
12842
12882
|
if (this.isLocalMode) {
|
|
12843
12883
|
const items2 = await this.searchLocal(
|
|
@@ -12850,6 +12890,7 @@ var FetchMethod = class extends Method {
|
|
|
12850
12890
|
switch (this.method.dataSetType) {
|
|
12851
12891
|
case "INDEXDE":
|
|
12852
12892
|
case "CODELIST":
|
|
12893
|
+
case "MULTIFORM":
|
|
12853
12894
|
res = await this.fetchCodeListSet(context, params);
|
|
12854
12895
|
break;
|
|
12855
12896
|
case "REMOTE":
|
|
@@ -14335,7 +14376,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
14335
14376
|
// src/controller/common/view/view.controller.ts
|
|
14336
14377
|
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
14337
14378
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
14338
|
-
import { isEmpty as isEmpty8, isNil as isNil12 } from "ramda";
|
|
14379
|
+
import { isEmpty as isEmpty8, isNil as isNil12, isNotNil as isNotNil2 } from "ramda";
|
|
14339
14380
|
|
|
14340
14381
|
// src/controller/utils/loading/loading.state.ts
|
|
14341
14382
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -15387,6 +15428,9 @@ var ViewController = class extends BaseController {
|
|
|
15387
15428
|
async onCreated() {
|
|
15388
15429
|
await super.onCreated();
|
|
15389
15430
|
this.modal.hooks.beforeDismiss.tapPromise(async (modalData) => {
|
|
15431
|
+
if (isNotNil2(this.state.closeOK)) {
|
|
15432
|
+
modalData.ok = this.state.closeOK;
|
|
15433
|
+
}
|
|
15390
15434
|
await this._evt.emit("onCloseView", { ...modalData });
|
|
15391
15435
|
});
|
|
15392
15436
|
this._evt.emit("onViewInfoChange", {
|
|
@@ -17621,17 +17665,17 @@ var CaptionBarController = class extends ControlController {
|
|
|
17621
17665
|
import { recursiveIterate } from "@ibiz-template/core";
|
|
17622
17666
|
|
|
17623
17667
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
17624
|
-
import { RuntimeModelError as
|
|
17668
|
+
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
17625
17669
|
import { isArray as isArray3 } from "qx-util";
|
|
17626
17670
|
|
|
17627
17671
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
17628
|
-
import { RuntimeModelError as
|
|
17672
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
17629
17673
|
|
|
17630
17674
|
// src/ui-logic/index.ts
|
|
17631
17675
|
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
17632
17676
|
|
|
17633
17677
|
// src/ui-logic/ui-logic.ts
|
|
17634
|
-
import { ModelError as
|
|
17678
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
17635
17679
|
|
|
17636
17680
|
// src/ui-logic/ui-logic-context.ts
|
|
17637
17681
|
var UILogicContext = class {
|
|
@@ -17729,6 +17773,28 @@ var UILogicContext = class {
|
|
|
17729
17773
|
var _a;
|
|
17730
17774
|
(_a = this.deLogicParams.get(name)) == null ? void 0 : _a.renew(this);
|
|
17731
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
|
+
}
|
|
17732
17798
|
};
|
|
17733
17799
|
|
|
17734
17800
|
// src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
|
|
@@ -18186,8 +18252,89 @@ var BindParamNode2 = class extends UILogicNode {
|
|
|
18186
18252
|
}
|
|
18187
18253
|
};
|
|
18188
18254
|
|
|
18189
|
-
// src/ui-logic/ui-logic-
|
|
18255
|
+
// src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
|
|
18190
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";
|
|
18191
18338
|
var UILogicParam = class {
|
|
18192
18339
|
/**
|
|
18193
18340
|
* Creates an instance of UILogicParam.
|
|
@@ -18222,7 +18369,7 @@ var UILogicParam = class {
|
|
|
18222
18369
|
if (control) {
|
|
18223
18370
|
ctx.params[tag] = control;
|
|
18224
18371
|
} else {
|
|
18225
|
-
throw new
|
|
18372
|
+
throw new RuntimeModelError35(
|
|
18226
18373
|
this.model,
|
|
18227
18374
|
"\u89C6\u56FE\u903B\u8F91\u521D\u59CB\u5316\u53C2\u6570\uFF0C\u672A\u627E\u5230".concat(m.codeName, "\u6307\u5B9A\u90E8\u4EF6\u5BF9\u8C61")
|
|
18228
18375
|
);
|
|
@@ -18236,17 +18383,17 @@ var UILogicParam = class {
|
|
|
18236
18383
|
} else if (m.entityListParam) {
|
|
18237
18384
|
ctx.params[tag] = [];
|
|
18238
18385
|
} else if (m.entityPageParam) {
|
|
18239
|
-
throw new
|
|
18386
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5206\u9875\u67E5\u8BE2\u7ED3\u679C");
|
|
18240
18387
|
} else if (m.entityParam) {
|
|
18241
18388
|
ctx.params[tag] = {};
|
|
18242
18389
|
} else if (m.lastReturnParam) {
|
|
18243
|
-
|
|
18390
|
+
ctx.initLastReturnParam(tag);
|
|
18244
18391
|
} else if (m.navContextParam) {
|
|
18245
18392
|
ctx.params[tag] = context;
|
|
18246
18393
|
} else if (m.navViewParamParam) {
|
|
18247
|
-
throw new
|
|
18394
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u89C6\u56FE\u8DEF\u7531\u53C2\u6570");
|
|
18248
18395
|
} else if (m.routeViewSessionParam) {
|
|
18249
|
-
throw new
|
|
18396
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u8DEF\u7531\u89C6\u56FE\u4F1A\u8BDD");
|
|
18250
18397
|
} else if (m.simpleListParam) {
|
|
18251
18398
|
ctx.params[tag] = [];
|
|
18252
18399
|
} else if (m.simpleParam) {
|
|
@@ -18254,7 +18401,7 @@ var UILogicParam = class {
|
|
|
18254
18401
|
} else if (m.viewNavDataParam) {
|
|
18255
18402
|
ctx.params[tag] = viewParams;
|
|
18256
18403
|
} else if (m.viewSessionParam) {
|
|
18257
|
-
throw new
|
|
18404
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5F53\u524D\u89C6\u56FE\u4F1A\u8BDD");
|
|
18258
18405
|
}
|
|
18259
18406
|
}
|
|
18260
18407
|
/**
|
|
@@ -18271,7 +18418,7 @@ var UILogicParam = class {
|
|
|
18271
18418
|
} else if (m.simpleParam || m.entityParam) {
|
|
18272
18419
|
ctx.params[tag] = {};
|
|
18273
18420
|
} else {
|
|
18274
|
-
throw new
|
|
18421
|
+
throw new ModelError22(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
|
|
18275
18422
|
}
|
|
18276
18423
|
}
|
|
18277
18424
|
};
|
|
@@ -18306,7 +18453,7 @@ var UILogic = class {
|
|
|
18306
18453
|
this.params = /* @__PURE__ */ new Map();
|
|
18307
18454
|
var _a;
|
|
18308
18455
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
18309
|
-
throw new
|
|
18456
|
+
throw new RuntimeModelError36(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
18310
18457
|
}
|
|
18311
18458
|
model.deuilogicNodes.forEach((node) => {
|
|
18312
18459
|
const { logicNodeType } = node;
|
|
@@ -18333,6 +18480,12 @@ var UILogic = class {
|
|
|
18333
18480
|
case "VIEWCTRLINVOKE":
|
|
18334
18481
|
logicNode = new ViewCtrlInvokeNode(node);
|
|
18335
18482
|
break;
|
|
18483
|
+
case "MSGBOX":
|
|
18484
|
+
logicNode = new MsgBoxNode(node);
|
|
18485
|
+
break;
|
|
18486
|
+
case "DEBUGPARAM":
|
|
18487
|
+
logicNode = new DebugParamNode(node);
|
|
18488
|
+
break;
|
|
18336
18489
|
case "RESETPARAM":
|
|
18337
18490
|
case "COPYPARAM":
|
|
18338
18491
|
case "VIEWCTRLFIREEVENT":
|
|
@@ -18340,13 +18493,11 @@ var UILogic = class {
|
|
|
18340
18493
|
case "SORTPARAM":
|
|
18341
18494
|
case "RENEWPARAM":
|
|
18342
18495
|
case "PFPLUGIN":
|
|
18343
|
-
case "MSGBOX":
|
|
18344
18496
|
case "DEDATASET":
|
|
18345
18497
|
case "DELOGIC":
|
|
18346
18498
|
case "THROWEXCEPTION":
|
|
18347
|
-
case "DEBUGPARAM":
|
|
18348
18499
|
default:
|
|
18349
|
-
throw new
|
|
18500
|
+
throw new ModelError23(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
|
|
18350
18501
|
}
|
|
18351
18502
|
this.nodes.set(node.id, logicNode);
|
|
18352
18503
|
});
|
|
@@ -18399,7 +18550,7 @@ var UILogic = class {
|
|
|
18399
18550
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
18400
18551
|
await this.deepExec(start, ctx);
|
|
18401
18552
|
} else {
|
|
18402
|
-
throw new
|
|
18553
|
+
throw new RuntimeModelError36(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
18403
18554
|
}
|
|
18404
18555
|
if (ctx.isEndNode) {
|
|
18405
18556
|
return ctx.result;
|
|
@@ -18529,7 +18680,7 @@ var UIActionProviderBase = class {
|
|
|
18529
18680
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
18530
18681
|
if (uilogicAttachMode === "REPLACE") {
|
|
18531
18682
|
if (!appDEUILogicId) {
|
|
18532
|
-
throw new
|
|
18683
|
+
throw new RuntimeModelError37(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18533
18684
|
}
|
|
18534
18685
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18535
18686
|
return result;
|
|
@@ -18556,7 +18707,7 @@ var UIActionProviderBase = class {
|
|
|
18556
18707
|
}
|
|
18557
18708
|
if (action.uilogicAttachMode === "AFTER") {
|
|
18558
18709
|
if (!appDEUILogicId) {
|
|
18559
|
-
throw new
|
|
18710
|
+
throw new RuntimeModelError37(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
18560
18711
|
}
|
|
18561
18712
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
18562
18713
|
}
|
|
@@ -18690,7 +18841,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18690
18841
|
const entityName = action.appDataEntityId;
|
|
18691
18842
|
const methodName = action.appDEMethodId;
|
|
18692
18843
|
if (!entityName || !methodName) {
|
|
18693
|
-
throw new
|
|
18844
|
+
throw new RuntimeModelError38(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
18694
18845
|
}
|
|
18695
18846
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
18696
18847
|
action,
|
|
@@ -18802,7 +18953,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
18802
18953
|
};
|
|
18803
18954
|
|
|
18804
18955
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
18805
|
-
import { StringUtil, RuntimeModelError as
|
|
18956
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError39, ModelError as ModelError24 } from "@ibiz-template/core";
|
|
18806
18957
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
18807
18958
|
async execAction(action, args) {
|
|
18808
18959
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -18817,7 +18968,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
18817
18968
|
case "WIZARD": {
|
|
18818
18969
|
const frontPSAppView = action.frontAppViewId;
|
|
18819
18970
|
if (!frontPSAppView) {
|
|
18820
|
-
throw new
|
|
18971
|
+
throw new RuntimeModelError39(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
18821
18972
|
}
|
|
18822
18973
|
const { resultContext, resultParams } = await this.handleParams(
|
|
18823
18974
|
action,
|
|
@@ -18846,7 +18997,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
18846
18997
|
actionResult = this.doOther(action, args);
|
|
18847
18998
|
break;
|
|
18848
18999
|
default:
|
|
18849
|
-
throw new
|
|
19000
|
+
throw new ModelError24(
|
|
18850
19001
|
action,
|
|
18851
19002
|
"\u672A\u652F\u6301\u7684\u524D\u53F0\u5904\u7406\u6A21\u5F0F[".concat(action.frontProcessType, "]")
|
|
18852
19003
|
);
|
|
@@ -18873,7 +19024,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
18873
19024
|
);
|
|
18874
19025
|
return result || {};
|
|
18875
19026
|
}
|
|
18876
|
-
throw new
|
|
19027
|
+
throw new RuntimeModelError39(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
18877
19028
|
}
|
|
18878
19029
|
};
|
|
18879
19030
|
|
|
@@ -19356,7 +19507,7 @@ var ViewPortletController = class extends PortletPartController {
|
|
|
19356
19507
|
};
|
|
19357
19508
|
|
|
19358
19509
|
// src/controller/control/data-view/data-view.controller.ts
|
|
19359
|
-
import { RuntimeModelError as
|
|
19510
|
+
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
19360
19511
|
|
|
19361
19512
|
// src/controller/control/data-view/data-view.service.ts
|
|
19362
19513
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -19456,7 +19607,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19456
19607
|
const optItemModel = this.getOptItemModel();
|
|
19457
19608
|
if (optItemModel) {
|
|
19458
19609
|
if (!optItemModel.deuiactionGroup) {
|
|
19459
|
-
throw new
|
|
19610
|
+
throw new RuntimeModelError40(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
19460
19611
|
}
|
|
19461
19612
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
19462
19613
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -19598,10 +19749,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19598
19749
|
};
|
|
19599
19750
|
|
|
19600
19751
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
19601
|
-
import { RuntimeModelError as
|
|
19752
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
19602
19753
|
|
|
19603
19754
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
19604
|
-
import { RuntimeError as RuntimeError33, RuntimeModelError as
|
|
19755
|
+
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
19605
19756
|
var ExpBarControlController = class extends ControlController {
|
|
19606
19757
|
constructor() {
|
|
19607
19758
|
super(...arguments);
|
|
@@ -19656,7 +19807,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
19656
19807
|
get xDataController() {
|
|
19657
19808
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
19658
19809
|
if (!controller) {
|
|
19659
|
-
throw new
|
|
19810
|
+
throw new RuntimeModelError41(
|
|
19660
19811
|
this.model,
|
|
19661
19812
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
19662
19813
|
);
|
|
@@ -19751,12 +19902,8 @@ var ExpBarControlController = class extends ControlController {
|
|
|
19751
19902
|
this.xDataController.evt.on("onLoadSuccess", (event) => {
|
|
19752
19903
|
this.xDataLoadSuccess(event);
|
|
19753
19904
|
});
|
|
19754
|
-
this.xDataController.evt.on("
|
|
19755
|
-
|
|
19756
|
-
if (this.state.query) {
|
|
19757
|
-
searchParams.query = this.state.query;
|
|
19758
|
-
}
|
|
19759
|
-
this.xDataController.state.searchParams = searchParams;
|
|
19905
|
+
this.xDataController.evt.on("onRemoveSuccess", () => {
|
|
19906
|
+
this.defaultNavByFirstItem();
|
|
19760
19907
|
});
|
|
19761
19908
|
}
|
|
19762
19909
|
if (this.toolbarController) {
|
|
@@ -19956,7 +20103,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
19956
20103
|
get xDataController() {
|
|
19957
20104
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
19958
20105
|
if (!controller) {
|
|
19959
|
-
throw new
|
|
20106
|
+
throw new RuntimeModelError42(
|
|
19960
20107
|
this.model,
|
|
19961
20108
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
19962
20109
|
);
|
|
@@ -20010,7 +20157,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
20010
20157
|
};
|
|
20011
20158
|
|
|
20012
20159
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
20013
|
-
import { RuntimeError as RuntimeError34, RuntimeModelError as
|
|
20160
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
20014
20161
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
20015
20162
|
constructor() {
|
|
20016
20163
|
super(...arguments);
|
|
@@ -20033,7 +20180,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
20033
20180
|
get xDataController() {
|
|
20034
20181
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
20035
20182
|
if (!controller) {
|
|
20036
|
-
throw new
|
|
20183
|
+
throw new RuntimeModelError43(
|
|
20037
20184
|
this.model,
|
|
20038
20185
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
20039
20186
|
);
|
|
@@ -21073,7 +21220,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
21073
21220
|
// src/controller/control/form/form-detail/form-item/form-item.controller.ts
|
|
21074
21221
|
import Schema from "async-validator";
|
|
21075
21222
|
import { createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
21076
|
-
import { ModelError as
|
|
21223
|
+
import { ModelError as ModelError25, RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
21077
21224
|
import dayjs3 from "dayjs";
|
|
21078
21225
|
|
|
21079
21226
|
// src/controller/control/form/form-detail/form-item/form-item.state.ts
|
|
@@ -21196,6 +21343,17 @@ var FormItemController = class extends FormDetailController {
|
|
|
21196
21343
|
get valueFormat() {
|
|
21197
21344
|
return this.model.valueFormat;
|
|
21198
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
|
+
}
|
|
21199
21357
|
/**
|
|
21200
21358
|
* 初始化
|
|
21201
21359
|
*
|
|
@@ -21389,7 +21547,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
21389
21547
|
data[this.name] = createUUID4();
|
|
21390
21548
|
break;
|
|
21391
21549
|
default:
|
|
21392
|
-
throw new
|
|
21550
|
+
throw new ModelError25(this.model, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
|
|
21393
21551
|
}
|
|
21394
21552
|
}
|
|
21395
21553
|
};
|
|
@@ -21636,7 +21794,7 @@ import { debounce } from "lodash-es";
|
|
|
21636
21794
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
21637
21795
|
import {
|
|
21638
21796
|
recursiveIterate as recursiveIterate3,
|
|
21639
|
-
RuntimeModelError as
|
|
21797
|
+
RuntimeModelError as RuntimeModelError44
|
|
21640
21798
|
} from "@ibiz-template/core";
|
|
21641
21799
|
var EditFormService = class extends ControlService {
|
|
21642
21800
|
/**
|
|
@@ -21709,10 +21867,12 @@ var EditFormService = class extends ControlService {
|
|
|
21709
21867
|
*/
|
|
21710
21868
|
async create(context, data) {
|
|
21711
21869
|
var _a;
|
|
21870
|
+
const _data = data instanceof ControlVO ? data.getOrigin() : data;
|
|
21871
|
+
const tempData = this.getFilteredData(_data);
|
|
21712
21872
|
let res = await this.exec(
|
|
21713
21873
|
((_a = this.model.createControlAction) == null ? void 0 : _a.appDEMethodId) || "create",
|
|
21714
21874
|
context,
|
|
21715
|
-
|
|
21875
|
+
tempData
|
|
21716
21876
|
);
|
|
21717
21877
|
res = this.handleResponse(res);
|
|
21718
21878
|
return res;
|
|
@@ -21728,10 +21888,12 @@ var EditFormService = class extends ControlService {
|
|
|
21728
21888
|
*/
|
|
21729
21889
|
async update(context, data) {
|
|
21730
21890
|
var _a;
|
|
21891
|
+
const _data = data instanceof ControlVO ? data.getOrigin() : data;
|
|
21892
|
+
const tempData = this.getFilteredData(_data);
|
|
21731
21893
|
let res = await this.exec(
|
|
21732
21894
|
((_a = this.model.updateControlAction) == null ? void 0 : _a.appDEMethodId) || "update",
|
|
21733
21895
|
context,
|
|
21734
|
-
|
|
21896
|
+
tempData
|
|
21735
21897
|
);
|
|
21736
21898
|
res = this.handleResponse(res);
|
|
21737
21899
|
return res;
|
|
@@ -21750,7 +21912,7 @@ var EditFormService = class extends ControlService {
|
|
|
21750
21912
|
const wizardForm = this.model;
|
|
21751
21913
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
21752
21914
|
if (!methodName) {
|
|
21753
|
-
throw new
|
|
21915
|
+
throw new RuntimeModelError44(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
21754
21916
|
}
|
|
21755
21917
|
let res = await this.exec(
|
|
21756
21918
|
methodName,
|
|
@@ -21850,7 +22012,7 @@ var EditFormService = class extends ControlService {
|
|
|
21850
22012
|
recursiveIterate3(
|
|
21851
22013
|
this.model,
|
|
21852
22014
|
(item) => {
|
|
21853
|
-
if (item.detailType === "FORMITEM") {
|
|
22015
|
+
if (item.detailType === "FORMITEM" || item.detailType === "MDCTRL") {
|
|
21854
22016
|
const formItem = item;
|
|
21855
22017
|
const uiKey = formItem.fieldName || formItem.id.toLowerCase();
|
|
21856
22018
|
const deField = formItem.fieldName || item.appDEFieldId;
|
|
@@ -21867,22 +22029,6 @@ var EditFormService = class extends ControlService {
|
|
|
21867
22029
|
}
|
|
21868
22030
|
this.dataUIMap.set(uiKey, mapField);
|
|
21869
22031
|
}
|
|
21870
|
-
if (item.detailType === "MDCTRL") {
|
|
21871
|
-
const formItem = item;
|
|
21872
|
-
const uiKey = formItem.fieldName || formItem.id.toLowerCase();
|
|
21873
|
-
const deField = formItem.fieldName || item.appDEFieldId;
|
|
21874
|
-
let mapField;
|
|
21875
|
-
if (deField) {
|
|
21876
|
-
mapField = new UIMapField(uiKey, deField, {
|
|
21877
|
-
isOriginField: true
|
|
21878
|
-
});
|
|
21879
|
-
} else {
|
|
21880
|
-
mapField = new UIMapField(uiKey, uiKey, {
|
|
21881
|
-
isOriginField: true
|
|
21882
|
-
});
|
|
21883
|
-
}
|
|
21884
|
-
this.dataUIMap.set(uiKey, mapField);
|
|
21885
|
-
}
|
|
21886
22032
|
},
|
|
21887
22033
|
{
|
|
21888
22034
|
childrenFields: ["deformPages", "deformDetails"]
|
|
@@ -21904,6 +22050,22 @@ var EditFormService = class extends ControlService {
|
|
|
21904
22050
|
}
|
|
21905
22051
|
return res;
|
|
21906
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
|
+
}
|
|
21907
22069
|
};
|
|
21908
22070
|
|
|
21909
22071
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
@@ -22723,14 +22885,15 @@ var FormMDCtrlRepeaterGridController = class extends FormMDCtrlContentTypeContro
|
|
|
22723
22885
|
initColumns(details) {
|
|
22724
22886
|
details.forEach(async (detail) => {
|
|
22725
22887
|
if (detail.detailType === "FORMITEM") {
|
|
22726
|
-
const { editor } = detail;
|
|
22888
|
+
const { editor, dataType } = detail;
|
|
22727
22889
|
const editorProvider = await getEditorProvider(editor);
|
|
22728
22890
|
if (editorProvider) {
|
|
22729
22891
|
const c = await editorProvider.createController(editor, {
|
|
22730
22892
|
unitName: editor.unitName,
|
|
22731
22893
|
valueFormat: editor.valueFormat,
|
|
22732
22894
|
context: this.parent.form.context,
|
|
22733
|
-
params: this.parent.form.params
|
|
22895
|
+
params: this.parent.form.params,
|
|
22896
|
+
dataType
|
|
22734
22897
|
});
|
|
22735
22898
|
this.editorMap[detail.codeName] = {
|
|
22736
22899
|
provider: editorProvider,
|
|
@@ -23188,7 +23351,7 @@ import {
|
|
|
23188
23351
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
23189
23352
|
recursiveIterate as recursiveIterate4,
|
|
23190
23353
|
RuntimeError as RuntimeError40,
|
|
23191
|
-
RuntimeModelError as
|
|
23354
|
+
RuntimeModelError as RuntimeModelError45
|
|
23192
23355
|
} from "@ibiz-template/core";
|
|
23193
23356
|
import { clone as clone13 } from "ramda";
|
|
23194
23357
|
|
|
@@ -23229,7 +23392,10 @@ var GridService = class extends MDControlService {
|
|
|
23229
23392
|
* @returns {*} {Promise<IHttpResponse<ControlVO>>}
|
|
23230
23393
|
*/
|
|
23231
23394
|
async updateGridEditItem(methodName, context, params = {}) {
|
|
23232
|
-
|
|
23395
|
+
const entityService = await this.app.deService.getService(
|
|
23396
|
+
this.model.appDataEntityId
|
|
23397
|
+
);
|
|
23398
|
+
let res = await entityService.exec(methodName, context, params);
|
|
23233
23399
|
res = this.handleResponse(res);
|
|
23234
23400
|
return res;
|
|
23235
23401
|
}
|
|
@@ -23380,11 +23546,11 @@ var GridController = class extends MDControlController {
|
|
|
23380
23546
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
23381
23547
|
);
|
|
23382
23548
|
if (!this.groupFieldColumn) {
|
|
23383
|
-
throw new
|
|
23549
|
+
throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
23384
23550
|
}
|
|
23385
23551
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
23386
23552
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
23387
|
-
throw new
|
|
23553
|
+
throw new RuntimeModelError45(
|
|
23388
23554
|
this.groupFieldColumn.model,
|
|
23389
23555
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
23390
23556
|
);
|
|
@@ -23394,7 +23560,7 @@ var GridController = class extends MDControlController {
|
|
|
23394
23560
|
);
|
|
23395
23561
|
if (index !== -1 && index !== 0) {
|
|
23396
23562
|
if (this.isMultistageHeader) {
|
|
23397
|
-
throw new
|
|
23563
|
+
throw new RuntimeModelError45(
|
|
23398
23564
|
this.model,
|
|
23399
23565
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
23400
23566
|
);
|
|
@@ -23404,10 +23570,10 @@ var GridController = class extends MDControlController {
|
|
|
23404
23570
|
}
|
|
23405
23571
|
if (groupMode === "CODELIST") {
|
|
23406
23572
|
if (!groupCodeListId) {
|
|
23407
|
-
throw new
|
|
23573
|
+
throw new RuntimeModelError45(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
23408
23574
|
}
|
|
23409
23575
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
23410
|
-
throw new
|
|
23576
|
+
throw new RuntimeModelError45(
|
|
23411
23577
|
this.model,
|
|
23412
23578
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
23413
23579
|
);
|
|
@@ -23487,7 +23653,7 @@ var GridController = class extends MDControlController {
|
|
|
23487
23653
|
return;
|
|
23488
23654
|
}
|
|
23489
23655
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
23490
|
-
throw new
|
|
23656
|
+
throw new RuntimeModelError45(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
23491
23657
|
}
|
|
23492
23658
|
const params = await this.getFetchParams();
|
|
23493
23659
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -23673,12 +23839,36 @@ var GridController = class extends MDControlController {
|
|
|
23673
23839
|
this.state.columnStates.push({
|
|
23674
23840
|
key: column.codeName,
|
|
23675
23841
|
caption: column.caption,
|
|
23676
|
-
hidden: !!column.hideDefault
|
|
23842
|
+
hidden: !!column.hideDefault,
|
|
23843
|
+
uaColumn: column.columnType === "UAGRIDCOLUMN"
|
|
23677
23844
|
});
|
|
23678
23845
|
}
|
|
23679
23846
|
},
|
|
23680
23847
|
{ childrenFields: ["degridColumns"] }
|
|
23681
23848
|
);
|
|
23849
|
+
this.calcColumnFixed();
|
|
23850
|
+
}
|
|
23851
|
+
/**
|
|
23852
|
+
* 计算列的固定状态
|
|
23853
|
+
* @author lxm
|
|
23854
|
+
* @date 2023-08-31 05:12:27
|
|
23855
|
+
* @protected
|
|
23856
|
+
*/
|
|
23857
|
+
calcColumnFixed() {
|
|
23858
|
+
const showColumns = this.state.columnStates.filter(
|
|
23859
|
+
(column) => !column.hidden
|
|
23860
|
+
);
|
|
23861
|
+
const allNum = showColumns.length;
|
|
23862
|
+
const { frozenFirstColumn, frozenLastColumn } = this.model;
|
|
23863
|
+
showColumns.forEach((column, index) => {
|
|
23864
|
+
if (column.uaColumn) {
|
|
23865
|
+
column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
|
|
23866
|
+
} else if (frozenFirstColumn && index < frozenFirstColumn) {
|
|
23867
|
+
column.fixed = "left";
|
|
23868
|
+
} else if (frozenLastColumn && index >= allNum - frozenLastColumn) {
|
|
23869
|
+
column.fixed = "right";
|
|
23870
|
+
}
|
|
23871
|
+
});
|
|
23682
23872
|
}
|
|
23683
23873
|
/**
|
|
23684
23874
|
* 初始化表格属性列,操作列,编辑项控制器
|
|
@@ -23847,21 +24037,27 @@ var GridController = class extends MDControlController {
|
|
|
23847
24037
|
if (!findUpdate) {
|
|
23848
24038
|
throw new RuntimeError40("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
23849
24039
|
}
|
|
23850
|
-
const { appDEMethodId, degeiupdateDetails } = findUpdate;
|
|
24040
|
+
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
23851
24041
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
23852
|
-
|
|
23853
|
-
|
|
23854
|
-
|
|
23855
|
-
|
|
23856
|
-
|
|
23857
|
-
|
|
23858
|
-
|
|
23859
|
-
|
|
23860
|
-
|
|
23861
|
-
|
|
23862
|
-
return this.setRowValue(row, itemName, result[itemName]);
|
|
23863
|
-
})
|
|
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
|
|
23864
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
|
+
}
|
|
23865
24061
|
}
|
|
23866
24062
|
}
|
|
23867
24063
|
/**
|
|
@@ -23979,7 +24175,7 @@ var GridController = class extends MDControlController {
|
|
|
23979
24175
|
};
|
|
23980
24176
|
|
|
23981
24177
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
23982
|
-
import { DataTypes, ModelError as
|
|
24178
|
+
import { DataTypes, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
23983
24179
|
import dayjs4 from "dayjs";
|
|
23984
24180
|
import { clone as clone14 } from "ramda";
|
|
23985
24181
|
var GridFieldColumnController = class extends GridColumnController {
|
|
@@ -24066,7 +24262,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24066
24262
|
const valueItem = this.model.linkValueItem || "srfkey";
|
|
24067
24263
|
const value = row.data[valueItem];
|
|
24068
24264
|
if (value == null) {
|
|
24069
|
-
throw new
|
|
24265
|
+
throw new ModelError26(this.model, "\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
|
|
24070
24266
|
}
|
|
24071
24267
|
const { linkAppViewId } = this.model;
|
|
24072
24268
|
if (!linkAppViewId) {
|
|
@@ -24146,7 +24342,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24146
24342
|
* @return {*} {(string | undefined)}
|
|
24147
24343
|
*/
|
|
24148
24344
|
calcFieldAgg(items) {
|
|
24149
|
-
const { aggField, aggMode, aggValueFormat } = this.model;
|
|
24345
|
+
const { aggField, aggMode, aggValueFormat, unitName } = this.model;
|
|
24150
24346
|
if (aggMode === "NONE") {
|
|
24151
24347
|
return;
|
|
24152
24348
|
}
|
|
@@ -24167,28 +24363,28 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24167
24363
|
aggValue = Math.min(...items.map((item) => item[fieldName]));
|
|
24168
24364
|
break;
|
|
24169
24365
|
default:
|
|
24170
|
-
throw new
|
|
24366
|
+
throw new ModelError26(this.model, "\u6682\u672A\u652F\u6301\u5C5E\u6027\u5217\u805A\u5408\u6A21\u5F0F".concat(aggMode));
|
|
24171
24367
|
}
|
|
24172
24368
|
} else if (this.grid.model.aggMode === "ALL") {
|
|
24173
|
-
throw new
|
|
24369
|
+
throw new ModelError26(this.model, "\u8FDC\u7A0B\u805A\u5408\u6682\u672A\u652F\u6301");
|
|
24174
24370
|
} else {
|
|
24175
|
-
throw new
|
|
24371
|
+
throw new ModelError26(
|
|
24176
24372
|
this.grid.model,
|
|
24177
24373
|
"\u6682\u672A\u652F\u6301\u805A\u5408\u6A21\u5F0F".concat(this.grid.model.aggMode)
|
|
24178
24374
|
);
|
|
24179
24375
|
}
|
|
24180
|
-
|
|
24181
|
-
|
|
24376
|
+
let value = "".concat(aggValue);
|
|
24377
|
+
if (aggValueFormat) {
|
|
24378
|
+
try {
|
|
24379
|
+
value = ibiz.util.text.format("".concat(aggValue), aggValueFormat);
|
|
24380
|
+
} catch (error) {
|
|
24381
|
+
ibiz.log.error("".concat(aggValue, " \u503C\u683C\u5F0F\u5316\u9519\u8BEF"));
|
|
24382
|
+
}
|
|
24182
24383
|
}
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
default:
|
|
24186
|
-
throw new ModelError25(
|
|
24187
|
-
this.model,
|
|
24188
|
-
"\u6682\u672A\u652F\u6301".concat(aggValueFormat, "\u7684\u805A\u5408\u503C\u683C\u5F0F\u5316")
|
|
24189
|
-
);
|
|
24384
|
+
if (value && unitName) {
|
|
24385
|
+
value += unitName;
|
|
24190
24386
|
}
|
|
24191
|
-
return
|
|
24387
|
+
return value;
|
|
24192
24388
|
}
|
|
24193
24389
|
/**
|
|
24194
24390
|
* 值格式化
|
|
@@ -24214,7 +24410,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
24214
24410
|
};
|
|
24215
24411
|
|
|
24216
24412
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
24217
|
-
import { RuntimeModelError as
|
|
24413
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
24218
24414
|
var GridUAColumnController = class extends GridColumnController {
|
|
24219
24415
|
/**
|
|
24220
24416
|
* 给rowController初始化操作列的状态
|
|
@@ -24227,7 +24423,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
24227
24423
|
var _a;
|
|
24228
24424
|
const { deuiactionGroup } = this.model;
|
|
24229
24425
|
if (!deuiactionGroup) {
|
|
24230
|
-
throw new
|
|
24426
|
+
throw new RuntimeModelError46(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
24231
24427
|
}
|
|
24232
24428
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
24233
24429
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -25544,7 +25740,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
25544
25740
|
import { recursiveIterate as recursiveIterate5 } from "@ibiz-template/core";
|
|
25545
25741
|
|
|
25546
25742
|
// src/controller/control/tree/tree.service.ts
|
|
25547
|
-
import { ModelError as
|
|
25743
|
+
import { ModelError as ModelError27 } from "@ibiz-template/core";
|
|
25548
25744
|
var TreeService = class extends MDControlService {
|
|
25549
25745
|
/**
|
|
25550
25746
|
* 获取子节点数据
|
|
@@ -25644,7 +25840,7 @@ var TreeService = class extends MDControlService {
|
|
|
25644
25840
|
);
|
|
25645
25841
|
break;
|
|
25646
25842
|
default:
|
|
25647
|
-
throw new
|
|
25843
|
+
throw new ModelError27(
|
|
25648
25844
|
nodeModel,
|
|
25649
25845
|
"".concat(nodeModel.treeNodeType, "\u8282\u70B9\u7C7B\u578B\u672A\u652F\u6301")
|
|
25650
25846
|
);
|
|
@@ -27130,7 +27326,7 @@ var ViewEngineBase = class {
|
|
|
27130
27326
|
};
|
|
27131
27327
|
|
|
27132
27328
|
// src/engine/md-view.engine.ts
|
|
27133
|
-
import { RuntimeModelError as
|
|
27329
|
+
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
27134
27330
|
var MDViewEngine = class extends ViewEngineBase {
|
|
27135
27331
|
/**
|
|
27136
27332
|
* 多数据部件名称
|
|
@@ -27180,9 +27376,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27180
27376
|
async onMounted() {
|
|
27181
27377
|
await super.onMounted();
|
|
27182
27378
|
const { model } = this.view;
|
|
27183
|
-
this.xdataControl.evt.on("onActive",
|
|
27184
|
-
await this.openData(event);
|
|
27185
|
-
});
|
|
27379
|
+
this.xdataControl.evt.on("onActive", this.onXDataActive.bind(this));
|
|
27186
27380
|
this.xdataControl.evt.on("onSelectionChange", async (event) => {
|
|
27187
27381
|
var _a;
|
|
27188
27382
|
(_a = this.toolbar) == null ? void 0 : _a.calcButtonState(
|
|
@@ -27222,6 +27416,17 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27222
27416
|
this.load();
|
|
27223
27417
|
}
|
|
27224
27418
|
}
|
|
27419
|
+
/**
|
|
27420
|
+
* 多数据部件激活事件处理
|
|
27421
|
+
* @author lxm
|
|
27422
|
+
* @date 2023-08-31 02:53:37
|
|
27423
|
+
* @protected
|
|
27424
|
+
* @param {EventBase} event
|
|
27425
|
+
* @return {*} {Promise<void>}
|
|
27426
|
+
*/
|
|
27427
|
+
async onXDataActive(event) {
|
|
27428
|
+
await this.openData(event);
|
|
27429
|
+
}
|
|
27225
27430
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
27226
27431
|
async call(key, args) {
|
|
27227
27432
|
if (key === "ToggleFilter" /* TOGGLE_FILTER */) {
|
|
@@ -27310,7 +27515,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27310
27515
|
(item) => item.id === "newdata"
|
|
27311
27516
|
);
|
|
27312
27517
|
if (!openAppViewLogic) {
|
|
27313
|
-
throw new
|
|
27518
|
+
throw new RuntimeModelError47(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27314
27519
|
}
|
|
27315
27520
|
const context = this.view.context.clone();
|
|
27316
27521
|
if (copyMode) {
|
|
@@ -27326,7 +27531,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27326
27531
|
if (result instanceof Object && result.ok) {
|
|
27327
27532
|
this.refresh();
|
|
27328
27533
|
} else if (result === -1) {
|
|
27329
|
-
throw new
|
|
27534
|
+
throw new RuntimeModelError47(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
27330
27535
|
}
|
|
27331
27536
|
}
|
|
27332
27537
|
/**
|
|
@@ -27514,7 +27719,7 @@ var LogicExecutor = class {
|
|
|
27514
27719
|
};
|
|
27515
27720
|
|
|
27516
27721
|
// src/logic-scheduler/executor/logic-executor-factory.ts
|
|
27517
|
-
import { ModelError as
|
|
27722
|
+
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
27518
27723
|
var LogicExecutorFactory = class {
|
|
27519
27724
|
constructor() {
|
|
27520
27725
|
/**
|
|
@@ -27544,7 +27749,7 @@ var LogicExecutorFactory = class {
|
|
|
27544
27749
|
createExecutor(logic, scheduler) {
|
|
27545
27750
|
const constructor = this.constructorMap.get(logic.logicType);
|
|
27546
27751
|
if (!constructor) {
|
|
27547
|
-
throw new
|
|
27752
|
+
throw new ModelError28(logic, "\u903B\u8F91\u7C7B\u578B ".concat(logic.logicType, " \u6682\u672A\u652F\u6301\uFF01"));
|
|
27548
27753
|
}
|
|
27549
27754
|
return constructor(logic, scheduler);
|
|
27550
27755
|
}
|
|
@@ -27593,13 +27798,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
27593
27798
|
};
|
|
27594
27799
|
|
|
27595
27800
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
27596
|
-
import { RuntimeModelError as
|
|
27801
|
+
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
27597
27802
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
27598
27803
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27599
27804
|
execute(executeParams) {
|
|
27600
27805
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
27601
27806
|
if (!appDEUILogicId) {
|
|
27602
|
-
throw new
|
|
27807
|
+
throw new RuntimeModelError48(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
27603
27808
|
}
|
|
27604
27809
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
27605
27810
|
}
|
|
@@ -27857,7 +28062,7 @@ var ViewLogicScheduler = class extends LogicScheduler {
|
|
|
27857
28062
|
};
|
|
27858
28063
|
|
|
27859
28064
|
// src/logic-scheduler/trigger/logic-trigger-factory.ts
|
|
27860
|
-
import { ModelError as
|
|
28065
|
+
import { ModelError as ModelError29 } from "@ibiz-template/core";
|
|
27861
28066
|
var LogicTriggerFactory = class {
|
|
27862
28067
|
constructor() {
|
|
27863
28068
|
/**
|
|
@@ -27887,7 +28092,7 @@ var LogicTriggerFactory = class {
|
|
|
27887
28092
|
createTrigger(logic, scheduler) {
|
|
27888
28093
|
const constructor = this.constructorMap.get(logic.triggerType);
|
|
27889
28094
|
if (!constructor) {
|
|
27890
|
-
throw new
|
|
28095
|
+
throw new ModelError29(logic, "\u89E6\u53D1\u5668\u7C7B\u578B ".concat(logic.triggerType, " \u6682\u672A\u652F\u6301\uFF01"));
|
|
27891
28096
|
}
|
|
27892
28097
|
return constructor(logic, scheduler);
|
|
27893
28098
|
}
|
|
@@ -28078,9 +28283,9 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28078
28283
|
|
|
28079
28284
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
28080
28285
|
import {
|
|
28081
|
-
ModelError as
|
|
28286
|
+
ModelError as ModelError30,
|
|
28082
28287
|
RuntimeError as RuntimeError50,
|
|
28083
|
-
RuntimeModelError as
|
|
28288
|
+
RuntimeModelError as RuntimeModelError49
|
|
28084
28289
|
} from "@ibiz-template/core";
|
|
28085
28290
|
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
28086
28291
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -28119,14 +28324,14 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28119
28324
|
}
|
|
28120
28325
|
const openViewRef = appUILogic.openDataAppView;
|
|
28121
28326
|
if (!openViewRef) {
|
|
28122
|
-
throw new
|
|
28327
|
+
throw new RuntimeModelError49(
|
|
28123
28328
|
appUILogic,
|
|
28124
28329
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
28125
28330
|
);
|
|
28126
28331
|
}
|
|
28127
28332
|
const openView = openViewRef.refAppViewId;
|
|
28128
28333
|
if (!openView) {
|
|
28129
|
-
throw new
|
|
28334
|
+
throw new RuntimeModelError49(
|
|
28130
28335
|
appUILogic,
|
|
28131
28336
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
28132
28337
|
);
|
|
@@ -28172,13 +28377,13 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28172
28377
|
return { ok: false };
|
|
28173
28378
|
}
|
|
28174
28379
|
} else if (enableBatchAdd) {
|
|
28175
|
-
throw new
|
|
28380
|
+
throw new ModelError30(appUILogic, "enableBatchAdd\u6682\u672A\u652F\u6301");
|
|
28176
28381
|
} else if (batchAddOnly) {
|
|
28177
|
-
throw new
|
|
28382
|
+
throw new ModelError30(appUILogic, "batchAddOnly\u6682\u672A\u652F\u6301");
|
|
28178
28383
|
} else {
|
|
28179
28384
|
newViewRef = newDataAppView;
|
|
28180
28385
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
28181
|
-
throw new
|
|
28386
|
+
throw new RuntimeModelError49(
|
|
28182
28387
|
appUILogic,
|
|
28183
28388
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
28184
28389
|
);
|
|
@@ -28224,7 +28429,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28224
28429
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
28225
28430
|
const { context, params, ...rest } = parameters;
|
|
28226
28431
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
28227
|
-
throw new
|
|
28432
|
+
throw new RuntimeModelError49(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
28228
28433
|
}
|
|
28229
28434
|
const result = await ibiz.commands.execute(
|
|
28230
28435
|
OpenAppViewCommand.TAG,
|