@ibiz-template/runtime 0.1.27 → 0.1.28
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 +206 -98
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +5 -4
- package/out/controller/control/panel/panel/panel-item.controller.d.ts +34 -2
- package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.controller.js +84 -5
- package/out/controller/control/panel/panel/panel.controller.d.ts +2 -1
- package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel.controller.js +11 -1
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +33 -21
- package/out/interface/controller/controller/control/panel-item/i-panel-item.controller.d.ts +2 -2
- package/out/interface/controller/controller/control/panel-item/i-panel-item.controller.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/item-dyna-logic-trigger.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/item-dyna-logic-trigger.js +4 -1
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +2 -2
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +4 -4
- package/out/utils/wf-helper/wf-helper.js +2 -2
- package/package.json +3 -3
- package/src/controller/control/data-view/data-view.controller.ts +5 -4
- package/src/controller/control/panel/panel/panel-item.controller.ts +105 -5
- package/src/controller/control/panel/panel/panel.controller.ts +17 -1
- package/src/controller/control/toolbar/toolbar.controllerr.ts +40 -24
- package/src/interface/controller/controller/control/panel-item/i-panel-item.controller.ts +2 -2
- package/src/logic-scheduler/trigger/item-dyna-logic-trigger.ts +5 -1
- package/src/service/service/entity/method/method.ts +5 -2
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +4 -4
- package/src/utils/wf-helper/wf-helper.ts +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -8103,8 +8103,8 @@ function getWFSubmitViewId(view, link) {
|
|
|
8103
8103
|
const { type, sequenceflowview, sequenceflowmobview } = link;
|
|
8104
8104
|
const appViewRefs = ((_a = view.viewLayoutPanel) == null ? void 0 : _a.appViewRefs) || view.appViewRefs;
|
|
8105
8105
|
const key = type ? "WFUTILACTION@".concat(type.toUpperCase()) : "WFACTION@".concat(ibiz.env.isMob ? sequenceflowmobview : sequenceflowview);
|
|
8106
|
-
const submitViewRef = appViewRefs.find((viewRef) => {
|
|
8107
|
-
return viewRef.name
|
|
8106
|
+
const submitViewRef = appViewRefs == null ? void 0 : appViewRefs.find((viewRef) => {
|
|
8107
|
+
return viewRef.name.indexOf(key) !== -1;
|
|
8108
8108
|
});
|
|
8109
8109
|
return submitViewRef == null ? void 0 : submitViewRef.refAppViewId;
|
|
8110
8110
|
}
|
|
@@ -10042,10 +10042,10 @@ var DynamicCodeListCache = class {
|
|
|
10042
10042
|
*/
|
|
10043
10043
|
async load(context = {}, params = {}) {
|
|
10044
10044
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
10045
|
+
if (!params.size) {
|
|
10046
|
+
params = { ...params, size: 1e4 };
|
|
10047
|
+
}
|
|
10045
10048
|
if (this.isPredefined) {
|
|
10046
|
-
if (!params.size) {
|
|
10047
|
-
params = { ...params, size: 1e4 };
|
|
10048
|
-
}
|
|
10049
10049
|
const res2 = await app.net.get(
|
|
10050
10050
|
"/dictionaries/codelist/".concat(this.codeList.codeName),
|
|
10051
10051
|
params
|
|
@@ -11616,7 +11616,7 @@ var Method = class {
|
|
|
11616
11616
|
);
|
|
11617
11617
|
break;
|
|
11618
11618
|
case "GET":
|
|
11619
|
-
res = await this.app.net.get("".concat(path2, "/").concat(methodName), data);
|
|
11619
|
+
res = await this.app.net.get("".concat(path2, "/").concat(methodName), data || params);
|
|
11620
11620
|
break;
|
|
11621
11621
|
case "PUT": {
|
|
11622
11622
|
res = await this.app.net.put(
|
|
@@ -11626,7 +11626,10 @@ var Method = class {
|
|
|
11626
11626
|
break;
|
|
11627
11627
|
}
|
|
11628
11628
|
case "DELETE":
|
|
11629
|
-
res = await this.app.net.delete(
|
|
11629
|
+
res = await this.app.net.delete(
|
|
11630
|
+
"".concat(path2, "/").concat(methodName),
|
|
11631
|
+
data || params
|
|
11632
|
+
);
|
|
11630
11633
|
break;
|
|
11631
11634
|
default:
|
|
11632
11635
|
if (requestMethod) {
|
|
@@ -14304,7 +14307,7 @@ var DEServiceUtil = class {
|
|
|
14304
14307
|
};
|
|
14305
14308
|
|
|
14306
14309
|
// src/app-hub.ts
|
|
14307
|
-
import { RuntimeError as
|
|
14310
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
14308
14311
|
|
|
14309
14312
|
// src/application.ts
|
|
14310
14313
|
import { Net } from "@ibiz-template/core";
|
|
@@ -18053,7 +18056,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
18053
18056
|
};
|
|
18054
18057
|
|
|
18055
18058
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
18056
|
-
import { recursiveIterate } from "@ibiz-template/core";
|
|
18059
|
+
import { recursiveIterate, RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
18057
18060
|
|
|
18058
18061
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
18059
18062
|
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
@@ -19788,15 +19791,29 @@ var ToolbarController = class extends ControlController {
|
|
|
19788
19791
|
async doUIAction(item, event, param = {}) {
|
|
19789
19792
|
if (item.itemType === "DEUIACTION") {
|
|
19790
19793
|
const actionId = item.uiactionId;
|
|
19791
|
-
const
|
|
19792
|
-
|
|
19793
|
-
|
|
19794
|
-
|
|
19795
|
-
|
|
19796
|
-
|
|
19797
|
-
|
|
19798
|
-
|
|
19799
|
-
|
|
19794
|
+
const uiAction = await getUIActionById(actionId);
|
|
19795
|
+
if (!uiAction) {
|
|
19796
|
+
throw new RuntimeError36("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
19797
|
+
}
|
|
19798
|
+
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
19799
|
+
if (enableLoading) {
|
|
19800
|
+
this.state.buttonsState.setLoading(item.id);
|
|
19801
|
+
}
|
|
19802
|
+
try {
|
|
19803
|
+
const res = await this.ctx.view.call("GetData" /* GET_DATA */);
|
|
19804
|
+
const data = res || [];
|
|
19805
|
+
const args = this.getEventArgs();
|
|
19806
|
+
args.params = Object.assign(param, args.params);
|
|
19807
|
+
await UIActionUtil.execAndResolved(actionId, {
|
|
19808
|
+
...args,
|
|
19809
|
+
data,
|
|
19810
|
+
event
|
|
19811
|
+
});
|
|
19812
|
+
} finally {
|
|
19813
|
+
if (enableLoading) {
|
|
19814
|
+
this.state.buttonsState.setLoading("");
|
|
19815
|
+
}
|
|
19816
|
+
}
|
|
19800
19817
|
}
|
|
19801
19818
|
}
|
|
19802
19819
|
async onCreated() {
|
|
@@ -19831,19 +19848,14 @@ var ToolbarController = class extends ControlController {
|
|
|
19831
19848
|
* @memberof ToolbarController
|
|
19832
19849
|
*/
|
|
19833
19850
|
async onItemClick(item, event, params) {
|
|
19834
|
-
this.state.buttonsState.setLoading(item.id);
|
|
19835
19851
|
const isExtra = item.buttonType === "extra";
|
|
19836
|
-
|
|
19837
|
-
|
|
19838
|
-
|
|
19839
|
-
|
|
19840
|
-
|
|
19841
|
-
|
|
19842
|
-
|
|
19843
|
-
await this.doUIAction(item, event, params);
|
|
19844
|
-
}
|
|
19845
|
-
} finally {
|
|
19846
|
-
this.state.buttonsState.setLoading("");
|
|
19852
|
+
await this._evt.emit("onClick", {
|
|
19853
|
+
event,
|
|
19854
|
+
eventArg: item.id,
|
|
19855
|
+
buttonType: isExtra ? "extra" : "deuiaction"
|
|
19856
|
+
});
|
|
19857
|
+
if (!isExtra) {
|
|
19858
|
+
await this.doUIAction(item, event, params);
|
|
19847
19859
|
}
|
|
19848
19860
|
}
|
|
19849
19861
|
async calcButtonState(data, appDeId) {
|
|
@@ -20381,6 +20393,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20381
20393
|
}
|
|
20382
20394
|
}
|
|
20383
20395
|
async afterLoad(args, items) {
|
|
20396
|
+
await this.initGroupCodeListItems();
|
|
20384
20397
|
await this.handleDataGroup();
|
|
20385
20398
|
await this.initGroupActionStates();
|
|
20386
20399
|
return items;
|
|
@@ -20515,7 +20528,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20515
20528
|
async initGroupCodeListItems() {
|
|
20516
20529
|
const { groupCodeListId } = this.model;
|
|
20517
20530
|
if (!groupCodeListId) {
|
|
20518
|
-
|
|
20531
|
+
return;
|
|
20519
20532
|
}
|
|
20520
20533
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
20521
20534
|
this.groupCodeListItems = await app.codeList.get(
|
|
@@ -20530,9 +20543,9 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20530
20543
|
* @memberof DataViewControlController
|
|
20531
20544
|
*/
|
|
20532
20545
|
async handleCodeListGroup() {
|
|
20533
|
-
const { groupAppDEFieldId } = this.model;
|
|
20534
|
-
if (!
|
|
20535
|
-
|
|
20546
|
+
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
20547
|
+
if (!groupCodeListId) {
|
|
20548
|
+
throw new RuntimeModelError46(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
20536
20549
|
}
|
|
20537
20550
|
const { items } = this.state;
|
|
20538
20551
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -20622,7 +20635,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20622
20635
|
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
20623
20636
|
|
|
20624
20637
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
20625
|
-
import { RuntimeError as
|
|
20638
|
+
import { RuntimeError as RuntimeError37, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
20626
20639
|
var ExpBarControlController = class extends ControlController {
|
|
20627
20640
|
constructor() {
|
|
20628
20641
|
super(...arguments);
|
|
@@ -20910,7 +20923,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
20910
20923
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
20911
20924
|
return this.XDataModel.navAppViewId;
|
|
20912
20925
|
}
|
|
20913
|
-
throw new
|
|
20926
|
+
throw new RuntimeError37("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
20914
20927
|
}
|
|
20915
20928
|
/**
|
|
20916
20929
|
* 获取导航视图
|
|
@@ -21052,7 +21065,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21052
21065
|
};
|
|
21053
21066
|
|
|
21054
21067
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
21055
|
-
import { RuntimeError as
|
|
21068
|
+
import { RuntimeError as RuntimeError38, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
21056
21069
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
21057
21070
|
constructor() {
|
|
21058
21071
|
super(...arguments);
|
|
@@ -21127,7 +21140,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21127
21140
|
const deData = node.deData || node;
|
|
21128
21141
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
21129
21142
|
if (!nodeModel) {
|
|
21130
|
-
throw new
|
|
21143
|
+
throw new RuntimeError38("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
21131
21144
|
}
|
|
21132
21145
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
21133
21146
|
result.context.currentSrfNav = nodeId;
|
|
@@ -22536,7 +22549,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
22536
22549
|
};
|
|
22537
22550
|
|
|
22538
22551
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
22539
|
-
import { RuntimeError as
|
|
22552
|
+
import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
22540
22553
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
22541
22554
|
/**
|
|
22542
22555
|
* 初始化
|
|
@@ -22551,7 +22564,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
22551
22564
|
const { model } = this.parent;
|
|
22552
22565
|
const { contentControl } = model;
|
|
22553
22566
|
if (!contentControl) {
|
|
22554
|
-
throw new
|
|
22567
|
+
throw new RuntimeError39("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
22555
22568
|
}
|
|
22556
22569
|
this.controlModel = contentControl;
|
|
22557
22570
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -22661,7 +22674,7 @@ import { isArray as isArray5 } from "lodash-es";
|
|
|
22661
22674
|
import {
|
|
22662
22675
|
awaitTimeout,
|
|
22663
22676
|
mergeInLeft,
|
|
22664
|
-
RuntimeError as
|
|
22677
|
+
RuntimeError as RuntimeError40,
|
|
22665
22678
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
22666
22679
|
} from "@ibiz-template/core";
|
|
22667
22680
|
import { debounce } from "lodash-es";
|
|
@@ -23050,7 +23063,7 @@ var EditFormController = class extends FormController {
|
|
|
23050
23063
|
}
|
|
23051
23064
|
const isValid = await this.validate();
|
|
23052
23065
|
if (!isValid) {
|
|
23053
|
-
throw new
|
|
23066
|
+
throw new RuntimeError40("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23054
23067
|
}
|
|
23055
23068
|
await this.startLoading();
|
|
23056
23069
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -23159,7 +23172,7 @@ var EditFormController = class extends FormController {
|
|
|
23159
23172
|
(item) => item.id === formItemUpdateId
|
|
23160
23173
|
);
|
|
23161
23174
|
if (!formItemUpdate) {
|
|
23162
|
-
throw new
|
|
23175
|
+
throw new RuntimeError40("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
23163
23176
|
}
|
|
23164
23177
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
23165
23178
|
const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
|
|
@@ -23203,7 +23216,7 @@ var EditFormController = class extends FormController {
|
|
|
23203
23216
|
async wfStart(extraParams = {}) {
|
|
23204
23217
|
const isValid = await this.validate();
|
|
23205
23218
|
if (!isValid) {
|
|
23206
|
-
throw new
|
|
23219
|
+
throw new RuntimeError40("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23207
23220
|
}
|
|
23208
23221
|
await this.startLoading();
|
|
23209
23222
|
try {
|
|
@@ -23236,7 +23249,7 @@ var EditFormController = class extends FormController {
|
|
|
23236
23249
|
async wfSubmit(extraParams = {}) {
|
|
23237
23250
|
const isValid = await this.validate();
|
|
23238
23251
|
if (!isValid) {
|
|
23239
|
-
throw new
|
|
23252
|
+
throw new RuntimeError40("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23240
23253
|
}
|
|
23241
23254
|
await this.startLoading();
|
|
23242
23255
|
try {
|
|
@@ -23467,7 +23480,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
23467
23480
|
};
|
|
23468
23481
|
|
|
23469
23482
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
23470
|
-
import { RuntimeError as
|
|
23483
|
+
import { RuntimeError as RuntimeError41, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
23471
23484
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
23472
23485
|
constructor() {
|
|
23473
23486
|
super(...arguments);
|
|
@@ -23572,7 +23585,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
23572
23585
|
const { model } = this.parent;
|
|
23573
23586
|
const { contentControl } = model;
|
|
23574
23587
|
if (!contentControl) {
|
|
23575
|
-
throw new
|
|
23588
|
+
throw new RuntimeError41("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
23576
23589
|
}
|
|
23577
23590
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
23578
23591
|
this.controlModel = contentControl;
|
|
@@ -24284,7 +24297,7 @@ import {
|
|
|
24284
24297
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
24285
24298
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
24286
24299
|
recursiveIterate as recursiveIterate4,
|
|
24287
|
-
RuntimeError as
|
|
24300
|
+
RuntimeError as RuntimeError42,
|
|
24288
24301
|
RuntimeModelError as RuntimeModelError51
|
|
24289
24302
|
} from "@ibiz-template/core";
|
|
24290
24303
|
import { clone as clone15 } from "ramda";
|
|
@@ -24657,7 +24670,7 @@ var GridController = class extends MDControlController {
|
|
|
24657
24670
|
}
|
|
24658
24671
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
24659
24672
|
if (editingRow) {
|
|
24660
|
-
throw new
|
|
24673
|
+
throw new RuntimeError42("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
24661
24674
|
}
|
|
24662
24675
|
const queryParams = { ...this.params };
|
|
24663
24676
|
const defaultData = this.calcDefaultValue({}, true);
|
|
@@ -24696,7 +24709,7 @@ var GridController = class extends MDControlController {
|
|
|
24696
24709
|
(item) => item.data.srfkey === data.srfkey
|
|
24697
24710
|
);
|
|
24698
24711
|
if (!rowState) {
|
|
24699
|
-
throw new
|
|
24712
|
+
throw new RuntimeError42("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
24700
24713
|
}
|
|
24701
24714
|
if (!rowState.modified) {
|
|
24702
24715
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -24708,7 +24721,7 @@ var GridController = class extends MDControlController {
|
|
|
24708
24721
|
}
|
|
24709
24722
|
const isValid = await this.validate(rowState);
|
|
24710
24723
|
if (!isValid) {
|
|
24711
|
-
throw new
|
|
24724
|
+
throw new RuntimeError42("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
24712
24725
|
}
|
|
24713
24726
|
await this.startLoading();
|
|
24714
24727
|
let res;
|
|
@@ -24920,7 +24933,7 @@ var GridController = class extends MDControlController {
|
|
|
24920
24933
|
}
|
|
24921
24934
|
async toggleRowEdit() {
|
|
24922
24935
|
if (!this.model.enableRowNew) {
|
|
24923
|
-
throw new
|
|
24936
|
+
throw new RuntimeError42("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
24924
24937
|
}
|
|
24925
24938
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
24926
24939
|
}
|
|
@@ -24953,7 +24966,7 @@ var GridController = class extends MDControlController {
|
|
|
24953
24966
|
} else {
|
|
24954
24967
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
24955
24968
|
if (editingRow) {
|
|
24956
|
-
throw new
|
|
24969
|
+
throw new RuntimeError42("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
24957
24970
|
}
|
|
24958
24971
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
24959
24972
|
row.cacheData = clone15(row.data);
|
|
@@ -25003,7 +25016,7 @@ var GridController = class extends MDControlController {
|
|
|
25003
25016
|
(item) => item.id === updateId
|
|
25004
25017
|
);
|
|
25005
25018
|
if (!findUpdate) {
|
|
25006
|
-
throw new
|
|
25019
|
+
throw new RuntimeError42("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
25007
25020
|
}
|
|
25008
25021
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
25009
25022
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -25112,7 +25125,7 @@ var GridController = class extends MDControlController {
|
|
|
25112
25125
|
data2 = this.getData();
|
|
25113
25126
|
}
|
|
25114
25127
|
if (data2.length === 0) {
|
|
25115
|
-
throw new
|
|
25128
|
+
throw new RuntimeError42("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
25116
25129
|
}
|
|
25117
25130
|
return formatExcelData(data2);
|
|
25118
25131
|
};
|
|
@@ -25131,11 +25144,11 @@ var GridController = class extends MDControlController {
|
|
|
25131
25144
|
);
|
|
25132
25145
|
const data = formatArrayData(filterVal, await getExportData());
|
|
25133
25146
|
if (!ibiz.util.getExportExcel) {
|
|
25134
|
-
throw new
|
|
25147
|
+
throw new RuntimeError42("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
25135
25148
|
}
|
|
25136
25149
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
25137
25150
|
if (!exportExcel) {
|
|
25138
|
-
throw new
|
|
25151
|
+
throw new RuntimeError42("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
25139
25152
|
}
|
|
25140
25153
|
exportExcel.exportJsonToExcel({
|
|
25141
25154
|
header,
|
|
@@ -25470,7 +25483,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
25470
25483
|
};
|
|
25471
25484
|
|
|
25472
25485
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
25473
|
-
import { RuntimeError as
|
|
25486
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
25474
25487
|
import Schema2 from "async-validator";
|
|
25475
25488
|
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
25476
25489
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -25604,7 +25617,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
25604
25617
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
25605
25618
|
const result = await this.validate(row);
|
|
25606
25619
|
if (!result) {
|
|
25607
|
-
throw new
|
|
25620
|
+
throw new RuntimeError43(
|
|
25608
25621
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
25609
25622
|
);
|
|
25610
25623
|
}
|
|
@@ -25962,7 +25975,7 @@ var ListController = class extends MDControlController {
|
|
|
25962
25975
|
};
|
|
25963
25976
|
|
|
25964
25977
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
25965
|
-
import { RuntimeError as
|
|
25978
|
+
import { recursiveIterate as recursiveIterate5, RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
25966
25979
|
var PanelController = class extends ControlController {
|
|
25967
25980
|
constructor() {
|
|
25968
25981
|
super(...arguments);
|
|
@@ -26060,7 +26073,7 @@ var PanelController = class extends ControlController {
|
|
|
26060
26073
|
async load() {
|
|
26061
26074
|
const data = await this.prepareData();
|
|
26062
26075
|
if (!data) {
|
|
26063
|
-
throw new
|
|
26076
|
+
throw new RuntimeError44("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
26064
26077
|
}
|
|
26065
26078
|
const panelData = this.convertData(data);
|
|
26066
26079
|
this.state.data = panelData;
|
|
@@ -26135,6 +26148,19 @@ var PanelController = class extends ControlController {
|
|
|
26135
26148
|
this.state.data[name] = value;
|
|
26136
26149
|
this.dataChangeNotify([name]);
|
|
26137
26150
|
}
|
|
26151
|
+
initControlScheduler(logics = []) {
|
|
26152
|
+
const actualLogics = [...logics];
|
|
26153
|
+
recursiveIterate5(
|
|
26154
|
+
this.model,
|
|
26155
|
+
(item) => {
|
|
26156
|
+
if (item.controlLogics) {
|
|
26157
|
+
actualLogics.push(...item.controlLogics);
|
|
26158
|
+
}
|
|
26159
|
+
},
|
|
26160
|
+
{ childrenFields: ["rootPanelItems", "panelItems", "panelTabPages"] }
|
|
26161
|
+
);
|
|
26162
|
+
super.initControlScheduler(actualLogics);
|
|
26163
|
+
}
|
|
26138
26164
|
};
|
|
26139
26165
|
|
|
26140
26166
|
// src/controller/control/panel/view-layout-panel/view-layout-panel.controller.ts
|
|
@@ -26256,6 +26282,17 @@ var PanelItemController = class {
|
|
|
26256
26282
|
this.model = model;
|
|
26257
26283
|
this.panel = panel;
|
|
26258
26284
|
this.parent = parent;
|
|
26285
|
+
/**
|
|
26286
|
+
* 动态逻辑结果
|
|
26287
|
+
* @author lxm
|
|
26288
|
+
* @date 2023-09-21 03:36:37
|
|
26289
|
+
* @protected
|
|
26290
|
+
*/
|
|
26291
|
+
this.dynaLogicResult = {
|
|
26292
|
+
visible: true,
|
|
26293
|
+
disabled: false,
|
|
26294
|
+
required: false
|
|
26295
|
+
};
|
|
26259
26296
|
this.state = this.createState();
|
|
26260
26297
|
}
|
|
26261
26298
|
/**
|
|
@@ -26341,8 +26378,11 @@ var PanelItemController = class {
|
|
|
26341
26378
|
* @date 2022-09-20 18:09:56
|
|
26342
26379
|
* @param {string[]} names
|
|
26343
26380
|
*/
|
|
26344
|
-
dataChangeNotify(names) {
|
|
26381
|
+
async dataChangeNotify(names) {
|
|
26345
26382
|
this.calcDynamicLogic(names);
|
|
26383
|
+
this.calcItemDisabled(this.data);
|
|
26384
|
+
this.calcItemVisible(this.data);
|
|
26385
|
+
this.calcItemRequired(this.data);
|
|
26346
26386
|
this.calcDynaClass(this.data);
|
|
26347
26387
|
}
|
|
26348
26388
|
/**
|
|
@@ -26351,10 +26391,76 @@ var PanelItemController = class {
|
|
|
26351
26391
|
* @author lxm
|
|
26352
26392
|
* @date 2022-09-20 18:09:07
|
|
26353
26393
|
*/
|
|
26354
|
-
panelStateNotify(_state) {
|
|
26394
|
+
async panelStateNotify(_state) {
|
|
26355
26395
|
this.calcDynamicLogic([], true);
|
|
26396
|
+
this.calcItemDisabled(this.data);
|
|
26397
|
+
this.calcItemVisible(this.data);
|
|
26398
|
+
this.calcItemRequired(this.data);
|
|
26356
26399
|
this.calcDynaClass(this.data);
|
|
26357
26400
|
}
|
|
26401
|
+
/**
|
|
26402
|
+
* 计算项的禁用状态
|
|
26403
|
+
* @author lxm
|
|
26404
|
+
* @date 2023-06-26 06:19:00
|
|
26405
|
+
* @param {IData} data
|
|
26406
|
+
*/
|
|
26407
|
+
calcItemDisabled(data) {
|
|
26408
|
+
let enable = !this.dynaLogicResult.disabled;
|
|
26409
|
+
if (enable && this.panel.scheduler) {
|
|
26410
|
+
const itemEnable = this.panel.scheduler.triggerItemEnable(
|
|
26411
|
+
this.model.id,
|
|
26412
|
+
{
|
|
26413
|
+
data: [data]
|
|
26414
|
+
}
|
|
26415
|
+
);
|
|
26416
|
+
if (itemEnable !== void 0) {
|
|
26417
|
+
enable = itemEnable;
|
|
26418
|
+
}
|
|
26419
|
+
}
|
|
26420
|
+
this.state.disabled = !enable;
|
|
26421
|
+
}
|
|
26422
|
+
/**
|
|
26423
|
+
* 计算项的显示状态
|
|
26424
|
+
* @author lxm
|
|
26425
|
+
* @date 2023-06-26 06:19:00
|
|
26426
|
+
* @param {IData} data
|
|
26427
|
+
*/
|
|
26428
|
+
calcItemVisible(data) {
|
|
26429
|
+
let { visible } = this.dynaLogicResult;
|
|
26430
|
+
if (visible && this.panel.scheduler) {
|
|
26431
|
+
const itemVIsible = this.panel.scheduler.triggerItemVisible(
|
|
26432
|
+
this.model.id,
|
|
26433
|
+
{
|
|
26434
|
+
data: [data]
|
|
26435
|
+
}
|
|
26436
|
+
);
|
|
26437
|
+
if (itemVIsible !== void 0) {
|
|
26438
|
+
visible = itemVIsible;
|
|
26439
|
+
}
|
|
26440
|
+
}
|
|
26441
|
+
this.state.visible = visible;
|
|
26442
|
+
}
|
|
26443
|
+
/**
|
|
26444
|
+
* 计算项的必填状态
|
|
26445
|
+
* @author lxm
|
|
26446
|
+
* @date 2023-06-26 06:19:00
|
|
26447
|
+
* @param {IData} data
|
|
26448
|
+
*/
|
|
26449
|
+
calcItemRequired(data) {
|
|
26450
|
+
let allowEmpty = !this.dynaLogicResult.required;
|
|
26451
|
+
if (allowEmpty && this.panel.scheduler) {
|
|
26452
|
+
const itemAllowEmpty = this.panel.scheduler.triggerItemBlank(
|
|
26453
|
+
this.model.id,
|
|
26454
|
+
{
|
|
26455
|
+
data: [data]
|
|
26456
|
+
}
|
|
26457
|
+
);
|
|
26458
|
+
if (itemAllowEmpty !== void 0) {
|
|
26459
|
+
allowEmpty = itemAllowEmpty;
|
|
26460
|
+
}
|
|
26461
|
+
}
|
|
26462
|
+
this.state.required = !allowEmpty;
|
|
26463
|
+
}
|
|
26358
26464
|
/**
|
|
26359
26465
|
* 计算动态逻辑
|
|
26360
26466
|
*
|
|
@@ -26378,13 +26484,13 @@ var PanelItemController = class {
|
|
|
26378
26484
|
const ok = verifyPanelGroupLogic(this.data, logic);
|
|
26379
26485
|
switch (logic.logicCat) {
|
|
26380
26486
|
case "ITEMBLANK":
|
|
26381
|
-
this.
|
|
26487
|
+
this.dynaLogicResult.required = !ok;
|
|
26382
26488
|
break;
|
|
26383
26489
|
case "ITEMENABLE":
|
|
26384
|
-
this.
|
|
26490
|
+
this.dynaLogicResult.disabled = !ok;
|
|
26385
26491
|
break;
|
|
26386
26492
|
case "PANELVISIBLE":
|
|
26387
|
-
this.
|
|
26493
|
+
this.dynaLogicResult.visible = ok;
|
|
26388
26494
|
break;
|
|
26389
26495
|
default:
|
|
26390
26496
|
}
|
|
@@ -26793,7 +26899,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
26793
26899
|
};
|
|
26794
26900
|
|
|
26795
26901
|
// src/controller/control/tree/tree.controller.ts
|
|
26796
|
-
import { recursiveIterate as
|
|
26902
|
+
import { recursiveIterate as recursiveIterate6 } from "@ibiz-template/core";
|
|
26797
26903
|
|
|
26798
26904
|
// src/controller/control/tree/tree.service.ts
|
|
26799
26905
|
import { ModelError as ModelError27 } from "@ibiz-template/core";
|
|
@@ -27156,7 +27262,7 @@ var TreeController = class extends MDControlController {
|
|
|
27156
27262
|
this.state.rootNodes = nodes;
|
|
27157
27263
|
}
|
|
27158
27264
|
this.state.items = [];
|
|
27159
|
-
|
|
27265
|
+
recursiveIterate6(
|
|
27160
27266
|
{ children: this.state.rootNodes },
|
|
27161
27267
|
(node) => {
|
|
27162
27268
|
this.state.items.push(node);
|
|
@@ -27279,7 +27385,7 @@ var TreeController = class extends MDControlController {
|
|
|
27279
27385
|
*/
|
|
27280
27386
|
calcExpandedKeys(nodes) {
|
|
27281
27387
|
let expandedKeys = [];
|
|
27282
|
-
|
|
27388
|
+
recursiveIterate6({ children: nodes }, (node) => {
|
|
27283
27389
|
var _a;
|
|
27284
27390
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
27285
27391
|
expandedKeys.push(node.id);
|
|
@@ -27325,7 +27431,7 @@ var TreeController = class extends MDControlController {
|
|
|
27325
27431
|
};
|
|
27326
27432
|
|
|
27327
27433
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
27328
|
-
import { RuntimeError as
|
|
27434
|
+
import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
27329
27435
|
|
|
27330
27436
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
27331
27437
|
var WizardPanelService = class extends ControlService {
|
|
@@ -27484,7 +27590,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27484
27590
|
const { activeFormTag } = this.state;
|
|
27485
27591
|
const controller = this.formControllers.get(activeFormTag);
|
|
27486
27592
|
if (!controller) {
|
|
27487
|
-
throw new
|
|
27593
|
+
throw new RuntimeError45("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
27488
27594
|
}
|
|
27489
27595
|
return controller;
|
|
27490
27596
|
}
|
|
@@ -27559,7 +27665,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27559
27665
|
this.tagHistory.pop();
|
|
27560
27666
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
27561
27667
|
if (!prevTag) {
|
|
27562
|
-
throw new
|
|
27668
|
+
throw new RuntimeError45("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
27563
27669
|
}
|
|
27564
27670
|
this.state.activeFormTag = prevTag;
|
|
27565
27671
|
}
|
|
@@ -27580,7 +27686,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27580
27686
|
}
|
|
27581
27687
|
);
|
|
27582
27688
|
if (!wizardForm) {
|
|
27583
|
-
throw new
|
|
27689
|
+
throw new RuntimeError45("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
27584
27690
|
}
|
|
27585
27691
|
nextTag = data.srfnextform;
|
|
27586
27692
|
} else {
|
|
@@ -27592,7 +27698,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27592
27698
|
});
|
|
27593
27699
|
const nextWizardStep = wizardSteps[index + 1];
|
|
27594
27700
|
if (!nextWizardStep) {
|
|
27595
|
-
throw new
|
|
27701
|
+
throw new RuntimeError45("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
27596
27702
|
}
|
|
27597
27703
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
27598
27704
|
(wizardForm) => {
|
|
@@ -27605,7 +27711,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27605
27711
|
}
|
|
27606
27712
|
}
|
|
27607
27713
|
if (!nextTag) {
|
|
27608
|
-
throw new
|
|
27714
|
+
throw new RuntimeError45("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
27609
27715
|
}
|
|
27610
27716
|
this.state.activeFormTag = nextTag;
|
|
27611
27717
|
this.tagHistory.push(nextTag);
|
|
@@ -27835,7 +27941,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27835
27941
|
};
|
|
27836
27942
|
|
|
27837
27943
|
// src/controller/control/kanban/kanban.controller.ts
|
|
27838
|
-
import { RuntimeError as
|
|
27944
|
+
import { RuntimeError as RuntimeError46, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
27839
27945
|
import { isNil as isNil17 } from "ramda";
|
|
27840
27946
|
|
|
27841
27947
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -27923,7 +28029,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27923
28029
|
} else {
|
|
27924
28030
|
const toNum = Number(sortValue);
|
|
27925
28031
|
if (Number.isNaN(toNum)) {
|
|
27926
|
-
throw new
|
|
28032
|
+
throw new RuntimeError46(
|
|
27927
28033
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
27928
28034
|
);
|
|
27929
28035
|
}
|
|
@@ -27939,7 +28045,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27939
28045
|
}
|
|
27940
28046
|
handleDataGroup() {
|
|
27941
28047
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
27942
|
-
throw new
|
|
28048
|
+
throw new RuntimeError46("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
27943
28049
|
}
|
|
27944
28050
|
return super.handleDataGroup();
|
|
27945
28051
|
}
|
|
@@ -28277,7 +28383,7 @@ var AppHub = class {
|
|
|
28277
28383
|
this.registerAppView(appView);
|
|
28278
28384
|
return appView;
|
|
28279
28385
|
}
|
|
28280
|
-
throw new
|
|
28386
|
+
throw new RuntimeError47("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
28281
28387
|
}
|
|
28282
28388
|
/**
|
|
28283
28389
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -28308,7 +28414,7 @@ var AppHub = class {
|
|
|
28308
28414
|
this.registerAppDataEntity(entity, appId);
|
|
28309
28415
|
return entity;
|
|
28310
28416
|
}
|
|
28311
|
-
throw new
|
|
28417
|
+
throw new RuntimeError47("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
28312
28418
|
}
|
|
28313
28419
|
/**
|
|
28314
28420
|
* 新建 hub 应用
|
|
@@ -28329,7 +28435,7 @@ var AppHub = class {
|
|
|
28329
28435
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
28330
28436
|
this.registerApp(appModel);
|
|
28331
28437
|
} else {
|
|
28332
|
-
throw new
|
|
28438
|
+
throw new RuntimeError47("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
28333
28439
|
}
|
|
28334
28440
|
const app = new Application(appModel);
|
|
28335
28441
|
this.appMap.set(id, app);
|
|
@@ -28420,7 +28526,7 @@ var EngineFactory = class {
|
|
|
28420
28526
|
};
|
|
28421
28527
|
|
|
28422
28528
|
// src/engine/view-base.engine.ts
|
|
28423
|
-
import { RuntimeError as
|
|
28529
|
+
import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
|
|
28424
28530
|
var ViewEngineBase = class {
|
|
28425
28531
|
/**
|
|
28426
28532
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -28608,7 +28714,7 @@ var ViewEngineBase = class {
|
|
|
28608
28714
|
const { appDataEntityId } = this.view.model;
|
|
28609
28715
|
const { evt, context, params } = this.view;
|
|
28610
28716
|
if (!appDataEntityId) {
|
|
28611
|
-
throw new
|
|
28717
|
+
throw new RuntimeError48("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
28612
28718
|
}
|
|
28613
28719
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
28614
28720
|
const res = await app.deService.exec(
|
|
@@ -29037,7 +29143,7 @@ var GlobalUtil = class {
|
|
|
29037
29143
|
};
|
|
29038
29144
|
|
|
29039
29145
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
29040
|
-
import { RuntimeError as
|
|
29146
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
29041
29147
|
var LogicExecutor = class {
|
|
29042
29148
|
/**
|
|
29043
29149
|
* @author lxm
|
|
@@ -29058,7 +29164,7 @@ var LogicExecutor = class {
|
|
|
29058
29164
|
*/
|
|
29059
29165
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29060
29166
|
execute(_executeParams) {
|
|
29061
|
-
throw new
|
|
29167
|
+
throw new RuntimeError49("Method not implemented.");
|
|
29062
29168
|
}
|
|
29063
29169
|
/**
|
|
29064
29170
|
* 销毁方法
|
|
@@ -29490,7 +29596,7 @@ var LogicSchedulerCenter = class {
|
|
|
29490
29596
|
};
|
|
29491
29597
|
|
|
29492
29598
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
29493
|
-
import { RuntimeError as
|
|
29599
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
29494
29600
|
var LogicTrigger = class {
|
|
29495
29601
|
/**
|
|
29496
29602
|
* @author lxm
|
|
@@ -29550,7 +29656,7 @@ var LogicTrigger = class {
|
|
|
29550
29656
|
if (this.executor) {
|
|
29551
29657
|
return this.executor.execute(executeParams);
|
|
29552
29658
|
}
|
|
29553
|
-
throw new
|
|
29659
|
+
throw new RuntimeError50("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
29554
29660
|
}
|
|
29555
29661
|
/**
|
|
29556
29662
|
* 销毁方法
|
|
@@ -29567,12 +29673,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
29567
29673
|
};
|
|
29568
29674
|
|
|
29569
29675
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
29570
|
-
import { RuntimeError as
|
|
29676
|
+
import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
|
|
29571
29677
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
29572
29678
|
bindExecutor(executor) {
|
|
29573
29679
|
super.bindExecutor(executor);
|
|
29574
29680
|
if (this.executor.type !== "SCRIPT") {
|
|
29575
|
-
throw new
|
|
29681
|
+
throw new RuntimeError51(
|
|
29576
29682
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
29577
29683
|
);
|
|
29578
29684
|
}
|
|
@@ -29596,20 +29702,22 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
29596
29702
|
);
|
|
29597
29703
|
}
|
|
29598
29704
|
match(matchParams) {
|
|
29705
|
+
var _a, _b;
|
|
29599
29706
|
const superResult = super.match(matchParams);
|
|
29600
|
-
return superResult &&
|
|
29707
|
+
return superResult && // 忽略大小写匹配
|
|
29708
|
+
((_a = matchParams.itemName) == null ? void 0 : _a.toLowerCase()) === ((_b = this.logic.itemName) == null ? void 0 : _b.toLowerCase());
|
|
29601
29709
|
}
|
|
29602
29710
|
execute(executeParams) {
|
|
29603
29711
|
const result = this.executor.execute(executeParams);
|
|
29604
29712
|
if (typeof result === "boolean") {
|
|
29605
29713
|
return result;
|
|
29606
29714
|
}
|
|
29607
|
-
throw new
|
|
29715
|
+
throw new RuntimeError51("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
29608
29716
|
}
|
|
29609
29717
|
};
|
|
29610
29718
|
|
|
29611
29719
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
29612
|
-
import { RuntimeError as
|
|
29720
|
+
import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
29613
29721
|
var TimerTrigger = class extends LogicTrigger {
|
|
29614
29722
|
constructor() {
|
|
29615
29723
|
super(...arguments);
|
|
@@ -29618,7 +29726,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
29618
29726
|
start() {
|
|
29619
29727
|
this.timer = setInterval(() => {
|
|
29620
29728
|
if (!this.scheduler.defaultParamsCb) {
|
|
29621
|
-
throw new
|
|
29729
|
+
throw new RuntimeError52("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
29622
29730
|
}
|
|
29623
29731
|
const params = this.scheduler.defaultParamsCb();
|
|
29624
29732
|
this.executor.execute(params);
|
|
@@ -29635,7 +29743,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
29635
29743
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
29636
29744
|
import {
|
|
29637
29745
|
ModelError as ModelError30,
|
|
29638
|
-
RuntimeError as
|
|
29746
|
+
RuntimeError as RuntimeError53,
|
|
29639
29747
|
RuntimeModelError as RuntimeModelError56
|
|
29640
29748
|
} from "@ibiz-template/core";
|
|
29641
29749
|
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
@@ -29671,7 +29779,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29671
29779
|
const { context, params, ...rest } = parameters;
|
|
29672
29780
|
const { data } = parameters;
|
|
29673
29781
|
if (!(data == null ? void 0 : data[0])) {
|
|
29674
|
-
throw new
|
|
29782
|
+
throw new RuntimeError53("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
29675
29783
|
}
|
|
29676
29784
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
29677
29785
|
let openViewRef;
|
|
@@ -29728,7 +29836,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29728
29836
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
29729
29837
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
29730
29838
|
if (!findView) {
|
|
29731
|
-
throw new
|
|
29839
|
+
throw new RuntimeError53(
|
|
29732
29840
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
29733
29841
|
);
|
|
29734
29842
|
}
|
|
@@ -29839,12 +29947,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29839
29947
|
}
|
|
29840
29948
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
29841
29949
|
if (!selectData) {
|
|
29842
|
-
throw new
|
|
29950
|
+
throw new RuntimeError53("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
29843
29951
|
}
|
|
29844
29952
|
const indexType = selectData.srfkey;
|
|
29845
29953
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
29846
29954
|
if (!findView) {
|
|
29847
|
-
throw new
|
|
29955
|
+
throw new RuntimeError53(
|
|
29848
29956
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
29849
29957
|
);
|
|
29850
29958
|
}
|