@ibiz-template/runtime 0.3.2 → 0.3.4
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 +838 -316
- package/dist/index.system.min.js +2 -2
- package/dist/index.system.min.js.map +1 -1
- package/out/app-hub.d.ts +5 -5
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +2 -2
- package/out/constant/sys-uiaction-tag.d.ts +4 -0
- package/out/constant/sys-uiaction-tag.d.ts.map +1 -1
- package/out/constant/sys-uiaction-tag.js +4 -0
- package/out/controller/common/control/control.controller.js +2 -2
- package/out/controller/control/app-menu/app-menu.controller.d.ts +2 -3
- package/out/controller/control/app-menu/app-menu.controller.d.ts.map +1 -1
- package/out/controller/control/calendar/calendar.controller.d.ts +7 -0
- package/out/controller/control/calendar/calendar.controller.d.ts.map +1 -1
- package/out/controller/control/calendar/calendar.controller.js +28 -2
- package/out/controller/control/chart/chart.controller.d.ts +6 -0
- package/out/controller/control/chart/chart.controller.d.ts.map +1 -1
- package/out/controller/control/chart/chart.controller.js +5 -3
- package/out/controller/control/chart/generator/base-series-generator.d.ts +21 -6
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +51 -7
- package/out/controller/control/chart/generator/chart-options-generator.d.ts +15 -1
- package/out/controller/control/chart/generator/chart-options-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/chart-options-generator.js +23 -3
- package/out/controller/control/chart/generator/funnel-series-generator.d.ts +2 -3
- package/out/controller/control/chart/generator/funnel-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/funnel-series-generator.js +1 -5
- package/out/controller/control/chart/generator/pie-series-generator.d.ts +2 -3
- package/out/controller/control/chart/generator/pie-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/pie-series-generator.js +1 -5
- package/out/controller/control/chart/generator/radar-series-generator.d.ts +1 -2
- package/out/controller/control/chart/generator/radar-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/radar-series-generator.js +1 -4
- package/out/controller/control/exp-bar/chart-exp-bar.controller.d.ts +25 -1
- package/out/controller/control/exp-bar/chart-exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/chart-exp-bar.controller.js +68 -2
- package/out/controller/control/form/search-form/search-form.controller.d.ts +9 -0
- package/out/controller/control/form/search-form/search-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.controller.js +59 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts +23 -2
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +73 -21
- package/out/controller/control/panel/panel/panel.controller.d.ts +4 -1
- package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel.controller.js +17 -16
- package/out/controller/utils/data-file-util/data-file-util.d.ts +3 -3
- package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -1
- package/out/controller/utils/data-file-util/data-file-util.js +10 -4
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +8 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +5 -5
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/common/i-app-service/i-app-service.d.ts +53 -0
- package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-grid.controller.d.ts +27 -1
- package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-panel.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-panel.controller.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-chart.state.d.ts +21 -0
- package/out/interface/controller/state/control/i-chart.state.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +66 -0
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/model/utils/util.d.ts +5 -5
- package/out/model/utils/util.d.ts.map +1 -1
- package/out/model/utils/util.js +14 -6
- package/out/service/dto/method.dto.d.ts +2 -2
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +3 -1
- package/out/service/service/config/config.service.d.ts.map +1 -1
- package/out/service/service/control/control.service.d.ts +2 -2
- package/out/service/service/control/control.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.d.ts +6 -0
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +18 -0
- package/out/service/service/entity/method/method.d.ts +2 -3
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
- package/out/service/vo/chart-data/chart-data.d.ts +11 -0
- package/out/service/vo/chart-data/chart-data.d.ts.map +1 -0
- package/out/service/vo/chart-data/chart-data.js +50 -0
- package/out/service/vo/chart-data/index.d.ts +2 -0
- package/out/service/vo/chart-data/index.d.ts.map +1 -0
- package/out/service/vo/chart-data/index.js +1 -0
- package/out/service/vo/index.d.ts +1 -0
- package/out/service/vo/index.d.ts.map +1 -1
- package/out/service/vo/index.js +1 -0
- package/out/ui-action/provider/front-ui-action-provider.d.ts +24 -0
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +128 -1
- package/out/ui-action/provider/sys-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/sys-ui-action-provider.js +2 -0
- package/package.json +3 -3
- package/src/app-hub.ts +5 -5
- package/src/constant/sys-uiaction-tag.ts +4 -0
- package/src/controller/common/control/control.controller.ts +2 -2
- package/src/controller/control/app-menu/app-menu.controller.ts +2 -2
- package/src/controller/control/calendar/calendar.controller.ts +29 -2
- package/src/controller/control/chart/chart.controller.ts +11 -3
- package/src/controller/control/chart/generator/base-series-generator.ts +71 -9
- package/src/controller/control/chart/generator/chart-options-generator.ts +24 -3
- package/src/controller/control/chart/generator/funnel-series-generator.ts +3 -7
- package/src/controller/control/chart/generator/pie-series-generator.ts +3 -7
- package/src/controller/control/chart/generator/radar-series-generator.ts +2 -6
- package/src/controller/control/exp-bar/chart-exp-bar.controller.ts +97 -4
- package/src/controller/control/form/search-form/search-form.controller.ts +64 -0
- package/src/controller/control/grid/grid/grid.controller.ts +110 -27
- package/src/controller/control/panel/panel/panel.controller.ts +15 -0
- package/src/controller/utils/data-file-util/data-file-util.ts +11 -3
- package/src/engine/md-view.engine.ts +8 -0
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +5 -5
- package/src/interface/common/i-app-service/i-app-service.ts +71 -0
- package/src/interface/controller/controller/control/i-grid.controller.ts +30 -1
- package/src/interface/controller/controller/control/i-panel.controller.ts +9 -0
- package/src/interface/controller/state/control/i-chart.state.ts +24 -0
- package/src/interface/service/service/i-app-de.service.ts +96 -0
- package/src/model/utils/util.ts +16 -6
- package/src/service/dto/method.dto.ts +5 -3
- package/src/service/service/config/config.service.ts +2 -3
- package/src/service/service/control/control.service.ts +2 -2
- package/src/service/service/entity/de.service.ts +48 -0
- package/src/service/service/entity/method/method.ts +2 -3
- package/src/service/service/work-flow/work-flow.service.ts +2 -3
- package/src/service/vo/chart-data/chart-data.ts +75 -0
- package/src/service/vo/chart-data/index.ts +1 -0
- package/src/service/vo/index.ts +1 -0
- package/src/ui-action/provider/front-ui-action-provider.ts +153 -1
- package/src/ui-action/provider/sys-ui-action-provider.ts +2 -0
package/dist/index.esm.js
CHANGED
|
@@ -618,11 +618,12 @@ function calcNavParams(model, originParams) {
|
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
// src/utils/open-redirect-view/open-redirect-view.ts
|
|
621
|
-
import { RuntimeError, RuntimeModelError } from "@ibiz-template/core";
|
|
621
|
+
import { RuntimeError, RuntimeModelError as RuntimeModelError2 } from "@ibiz-template/core";
|
|
622
622
|
import { isNilOrEmpty as isNilOrEmpty2, notNilEmpty as notNilEmpty3 } from "qx-util";
|
|
623
623
|
import qs from "qs";
|
|
624
624
|
|
|
625
625
|
// src/model/utils/util.ts
|
|
626
|
+
import { RuntimeModelError } from "@ibiz-template/core";
|
|
626
627
|
function findModelChild(models, id) {
|
|
627
628
|
if (models && id) {
|
|
628
629
|
const model = models.find((item) => {
|
|
@@ -682,9 +683,18 @@ function parseUserParams(userParams) {
|
|
|
682
683
|
}
|
|
683
684
|
return { navigateContexts, navigateParams, other };
|
|
684
685
|
}
|
|
685
|
-
function getPFPlugin(
|
|
686
|
-
|
|
687
|
-
|
|
686
|
+
function getPFPlugin(id, appId) {
|
|
687
|
+
const app = ibiz.hub.getApp(appId);
|
|
688
|
+
if (!app) {
|
|
689
|
+
throw new RuntimeModelError(app, "\u672A\u627E\u5230\u5E94\u7528");
|
|
690
|
+
}
|
|
691
|
+
const { model } = app;
|
|
692
|
+
if (!model.appPFPluginRefs) {
|
|
693
|
+
throw new RuntimeModelError(model, "\u5E94\u7528\u672A\u914D\u7F6E\u63D2\u4EF6");
|
|
694
|
+
}
|
|
695
|
+
const plugin = model.appPFPluginRefs.find(
|
|
696
|
+
(item) => item.pluginCode.toLowerCase() === id.toLowerCase()
|
|
697
|
+
);
|
|
688
698
|
if (!plugin) {
|
|
689
699
|
throw new Error("\u672A\u627E\u5230\u63D2\u4EF6".concat(id));
|
|
690
700
|
}
|
|
@@ -1121,7 +1131,7 @@ async function openDERedirectView(appView, context, params = {}, opts = {}) {
|
|
|
1121
1131
|
return result;
|
|
1122
1132
|
}
|
|
1123
1133
|
} else {
|
|
1124
|
-
throw new
|
|
1134
|
+
throw new RuntimeModelError2(refView, "\u672A\u914D\u7F6E\u5B9E\u9645\u5F15\u7528\u89C6\u56FE");
|
|
1125
1135
|
}
|
|
1126
1136
|
} else {
|
|
1127
1137
|
ibiz.log.error(
|
|
@@ -1132,7 +1142,7 @@ async function openDERedirectView(appView, context, params = {}, opts = {}) {
|
|
|
1132
1142
|
title: realTitle
|
|
1133
1143
|
}))
|
|
1134
1144
|
);
|
|
1135
|
-
throw new
|
|
1145
|
+
throw new RuntimeModelError2(
|
|
1136
1146
|
appView,
|
|
1137
1147
|
"\u672A\u627E\u5230\u91CD\u5B9A\u5411\u6807\u8BC6[".concat(rdTag, "]\u6216[").concat(deRdTag, "]\u6216\u5DE5\u4F5C\u6D41[").concat(wfRdTag, "]\u5BF9\u5E94\u89C6\u56FE")
|
|
1138
1148
|
);
|
|
@@ -1804,7 +1814,7 @@ function checkFieldScriptRule(value, data, scriptCode, errorInfo, primaryModel)
|
|
|
1804
1814
|
}
|
|
1805
1815
|
|
|
1806
1816
|
// src/utils/verify/form-dynamic-logic.ts
|
|
1807
|
-
import { ModelError, RuntimeModelError as
|
|
1817
|
+
import { ModelError, RuntimeModelError as RuntimeModelError3 } from "@ibiz-template/core";
|
|
1808
1818
|
function isGroupLogic(logic) {
|
|
1809
1819
|
return logic.logicType === "GROUP";
|
|
1810
1820
|
}
|
|
@@ -1815,7 +1825,7 @@ function verifyFormGroupLogic(data, logic) {
|
|
|
1815
1825
|
if (isGroupLogic(logic)) {
|
|
1816
1826
|
const children = logic.defdlogics;
|
|
1817
1827
|
if (!children || children.length === 0) {
|
|
1818
|
-
throw new
|
|
1828
|
+
throw new RuntimeModelError3(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
|
|
1819
1829
|
}
|
|
1820
1830
|
let result = true;
|
|
1821
1831
|
if (logic.groupOP === "AND") {
|
|
@@ -1844,7 +1854,7 @@ function verifyFormGroupLogic(data, logic) {
|
|
|
1844
1854
|
}
|
|
1845
1855
|
|
|
1846
1856
|
// src/utils/verify/panel-dynamic-logic.ts
|
|
1847
|
-
import { ModelError as ModelError2, RuntimeModelError as
|
|
1857
|
+
import { ModelError as ModelError2, RuntimeModelError as RuntimeModelError4 } from "@ibiz-template/core";
|
|
1848
1858
|
function isGroupLogic2(logic) {
|
|
1849
1859
|
return logic.logicType === "GROUP";
|
|
1850
1860
|
}
|
|
@@ -1855,7 +1865,7 @@ function verifyPanelGroupLogic(data, logic) {
|
|
|
1855
1865
|
if (isGroupLogic2(logic)) {
|
|
1856
1866
|
const children = logic.panelItemLogics;
|
|
1857
1867
|
if (!children || children.length === 0) {
|
|
1858
|
-
throw new
|
|
1868
|
+
throw new RuntimeModelError4(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
|
|
1859
1869
|
}
|
|
1860
1870
|
let result = true;
|
|
1861
1871
|
if (logic.groupOP === "AND") {
|
|
@@ -2270,6 +2280,7 @@ var SysUIActionTag = /* @__PURE__ */ ((SysUIActionTag2) => {
|
|
|
2270
2280
|
SysUIActionTag2["CANCEL"] = "Cancel";
|
|
2271
2281
|
SysUIActionTag2["OK"] = "Ok";
|
|
2272
2282
|
SysUIActionTag2["SEARCH"] = "Search";
|
|
2283
|
+
SysUIActionTag2["RESET"] = "Reset";
|
|
2273
2284
|
SysUIActionTag2["FINISH"] = "Finish";
|
|
2274
2285
|
SysUIActionTag2["NEXT_STEP"] = "NextStep";
|
|
2275
2286
|
SysUIActionTag2["PREV_STEP"] = "PrevStep";
|
|
@@ -3582,7 +3593,7 @@ var AppCounter = class {
|
|
|
3582
3593
|
};
|
|
3583
3594
|
|
|
3584
3595
|
// src/service/utils/app-counter/app-de-counter.ts
|
|
3585
|
-
import { RuntimeModelError as
|
|
3596
|
+
import { RuntimeModelError as RuntimeModelError5 } from "@ibiz-template/core";
|
|
3586
3597
|
var AppDECounter = class extends AppCounter {
|
|
3587
3598
|
/**
|
|
3588
3599
|
* 计数器初始化
|
|
@@ -3596,7 +3607,7 @@ var AppDECounter = class extends AppCounter {
|
|
|
3596
3607
|
this.appDataEntityId = this.model.appDataEntityId;
|
|
3597
3608
|
const action = this.model.getAppDEActionId;
|
|
3598
3609
|
if (!action) {
|
|
3599
|
-
throw new
|
|
3610
|
+
throw new RuntimeModelError5(this.model, "\u672A\u627E\u5230\u83B7\u53D6\u8BA1\u6570\u5668\u884C\u4E3A!");
|
|
3600
3611
|
}
|
|
3601
3612
|
this.action = action;
|
|
3602
3613
|
await super.init(context, params);
|
|
@@ -3714,7 +3725,7 @@ var DEDQCondUtil = class {
|
|
|
3714
3725
|
DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
|
|
3715
3726
|
|
|
3716
3727
|
// src/service/utils/dynamic-code-list/dynamic-code-list.ts
|
|
3717
|
-
import { ModelError as ModelError4, RuntimeModelError as
|
|
3728
|
+
import { ModelError as ModelError4, RuntimeModelError as RuntimeModelError6 } from "@ibiz-template/core";
|
|
3718
3729
|
import { isNil as isNil3 } from "ramda";
|
|
3719
3730
|
var DynamicCodeListCache = class {
|
|
3720
3731
|
constructor(codeList) {
|
|
@@ -3853,10 +3864,10 @@ var DynamicCodeListCache = class {
|
|
|
3853
3864
|
return Object.freeze(res2.data.items);
|
|
3854
3865
|
}
|
|
3855
3866
|
if (!appDataEntityId) {
|
|
3856
|
-
throw new
|
|
3867
|
+
throw new RuntimeModelError6(this.codeList, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
3857
3868
|
}
|
|
3858
3869
|
if (!appDEDataSetId) {
|
|
3859
|
-
throw new
|
|
3870
|
+
throw new RuntimeModelError6(this.codeList, "\u672A\u914D\u7F6E\u6570\u636E\u96C6");
|
|
3860
3871
|
}
|
|
3861
3872
|
const res = await app.deService.exec(
|
|
3862
3873
|
appDataEntityId,
|
|
@@ -4668,7 +4679,7 @@ var ConfigService = class {
|
|
|
4668
4679
|
};
|
|
4669
4680
|
|
|
4670
4681
|
// src/service/service/counter/counter.service.ts
|
|
4671
|
-
import { RuntimeModelError as
|
|
4682
|
+
import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
4672
4683
|
var CounterService = class {
|
|
4673
4684
|
/**
|
|
4674
4685
|
* 获取计数器
|
|
@@ -4707,7 +4718,7 @@ var CounterService = class {
|
|
|
4707
4718
|
static async getCounterByRef(model, context, params) {
|
|
4708
4719
|
const { appCounter } = model;
|
|
4709
4720
|
if (!appCounter) {
|
|
4710
|
-
throw new
|
|
4721
|
+
throw new RuntimeModelError7(model, "\u672A\u914D\u7F6E\u5E94\u7528\u8BA1\u6570\u5668!");
|
|
4711
4722
|
}
|
|
4712
4723
|
return this.getCounter(appCounter, context, params);
|
|
4713
4724
|
}
|
|
@@ -5093,12 +5104,12 @@ var FileService = class {
|
|
|
5093
5104
|
import {
|
|
5094
5105
|
HttpResponse as HttpResponse3,
|
|
5095
5106
|
RuntimeError as RuntimeError14,
|
|
5096
|
-
RuntimeModelError as
|
|
5107
|
+
RuntimeModelError as RuntimeModelError19
|
|
5097
5108
|
} from "@ibiz-template/core";
|
|
5098
5109
|
import { isArray as isArray6, isNil as isNil8 } from "lodash-es";
|
|
5099
5110
|
|
|
5100
5111
|
// src/service/service/entity/method/method.ts
|
|
5101
|
-
import { RuntimeModelError as
|
|
5112
|
+
import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
|
|
5102
5113
|
import { isArray as isArray3 } from "lodash-es";
|
|
5103
5114
|
|
|
5104
5115
|
// src/service/app-data-entity/app-data-entity.ts
|
|
@@ -5350,7 +5361,9 @@ var MethodDto = class _MethodDto {
|
|
|
5350
5361
|
const field = this.fields[i];
|
|
5351
5362
|
const key = field.codeName.toLowerCase();
|
|
5352
5363
|
switch (field.type) {
|
|
5353
|
-
case "SIMPLE":
|
|
5364
|
+
case "SIMPLE":
|
|
5365
|
+
case "SIMPLES":
|
|
5366
|
+
case "DTO": {
|
|
5354
5367
|
break;
|
|
5355
5368
|
}
|
|
5356
5369
|
case "DTOS": {
|
|
@@ -5618,17 +5631,17 @@ var Method = class {
|
|
|
5618
5631
|
break;
|
|
5619
5632
|
default:
|
|
5620
5633
|
if (requestMethod) {
|
|
5621
|
-
throw new
|
|
5634
|
+
throw new RuntimeModelError8(
|
|
5622
5635
|
this.method,
|
|
5623
5636
|
"\u672A\u652F\u6301\u7684\u8BF7\u6C42\u65B9\u5F0F: ".concat(requestMethod)
|
|
5624
5637
|
);
|
|
5625
5638
|
} else {
|
|
5626
|
-
throw new
|
|
5639
|
+
throw new RuntimeModelError8(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
|
|
5627
5640
|
}
|
|
5628
5641
|
}
|
|
5629
5642
|
return res;
|
|
5630
5643
|
}
|
|
5631
|
-
throw new
|
|
5644
|
+
throw new RuntimeModelError8(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
|
|
5632
5645
|
}
|
|
5633
5646
|
mergeRequestPath(path2, methodName) {
|
|
5634
5647
|
return "".concat(path2, "/").concat(methodName);
|
|
@@ -5689,7 +5702,7 @@ import { isArray as isArray5 } from "lodash-es";
|
|
|
5689
5702
|
import { clone as clone9 } from "ramda";
|
|
5690
5703
|
|
|
5691
5704
|
// src/de-logic/de-logic.ts
|
|
5692
|
-
import { ModelError as ModelError11, RuntimeModelError as
|
|
5705
|
+
import { ModelError as ModelError11, RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
5693
5706
|
|
|
5694
5707
|
// src/de-logic/de-logic-context.ts
|
|
5695
5708
|
import { isArray as isArray4 } from "lodash-es";
|
|
@@ -5821,17 +5834,17 @@ var DELogicContext = class {
|
|
|
5821
5834
|
};
|
|
5822
5835
|
|
|
5823
5836
|
// src/de-logic/de-logic-node/de-action-node/de-action-node.ts
|
|
5824
|
-
import { RuntimeModelError as
|
|
5837
|
+
import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
|
|
5825
5838
|
|
|
5826
5839
|
// src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts
|
|
5827
|
-
import { RuntimeModelError as
|
|
5840
|
+
import { RuntimeModelError as RuntimeModelError10 } from "@ibiz-template/core";
|
|
5828
5841
|
|
|
5829
5842
|
// src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts
|
|
5830
5843
|
var DELogicLinkCond = class {
|
|
5831
5844
|
};
|
|
5832
5845
|
|
|
5833
5846
|
// src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts
|
|
5834
|
-
import { ModelError as ModelError6, RuntimeModelError as
|
|
5847
|
+
import { ModelError as ModelError6, RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
|
|
5835
5848
|
var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
5836
5849
|
constructor(model) {
|
|
5837
5850
|
super();
|
|
@@ -5878,7 +5891,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
5878
5891
|
switch (this.type) {
|
|
5879
5892
|
case "ENTITYFIELD": {
|
|
5880
5893
|
if (!this.value) {
|
|
5881
|
-
throw new
|
|
5894
|
+
throw new RuntimeModelError9(
|
|
5882
5895
|
this.model,
|
|
5883
5896
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
5884
5897
|
);
|
|
@@ -5888,7 +5901,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
5888
5901
|
}
|
|
5889
5902
|
case "SRCENTITYFIELD": {
|
|
5890
5903
|
if (!this.value) {
|
|
5891
|
-
throw new
|
|
5904
|
+
throw new RuntimeModelError9(
|
|
5892
5905
|
this.model,
|
|
5893
5906
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
5894
5907
|
);
|
|
@@ -5951,7 +5964,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
|
|
|
5951
5964
|
test(ctx, context, data) {
|
|
5952
5965
|
let bol = true;
|
|
5953
5966
|
if (this.conds.length === 0) {
|
|
5954
|
-
throw new
|
|
5967
|
+
throw new RuntimeModelError10(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
5955
5968
|
}
|
|
5956
5969
|
for (let i = 0; i < this.conds.length; i++) {
|
|
5957
5970
|
const cond = this.conds[i];
|
|
@@ -6054,10 +6067,10 @@ var DEActionNode = class extends DELogicNode {
|
|
|
6054
6067
|
retDELogicParamId
|
|
6055
6068
|
} = this.model;
|
|
6056
6069
|
if (!dstAppDataEntityId) {
|
|
6057
|
-
throw new
|
|
6070
|
+
throw new RuntimeModelError11(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
6058
6071
|
}
|
|
6059
6072
|
if (!dstAppDEActionId) {
|
|
6060
|
-
throw new
|
|
6073
|
+
throw new RuntimeModelError11(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
6061
6074
|
}
|
|
6062
6075
|
const requestData = ctx.params[dstDELogicParamId];
|
|
6063
6076
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -6341,12 +6354,12 @@ var DataSetNode = class extends DELogicNode {
|
|
|
6341
6354
|
};
|
|
6342
6355
|
|
|
6343
6356
|
// src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts
|
|
6344
|
-
import { RuntimeModelError as
|
|
6357
|
+
import { RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
|
|
6345
6358
|
var BindParamNode = class extends DELogicNode {
|
|
6346
6359
|
async exec(ctx) {
|
|
6347
6360
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
6348
6361
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
6349
|
-
throw new
|
|
6362
|
+
throw new RuntimeModelError12(
|
|
6350
6363
|
this.model,
|
|
6351
6364
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
6352
6365
|
);
|
|
@@ -6357,37 +6370,37 @@ var BindParamNode = class extends DELogicNode {
|
|
|
6357
6370
|
};
|
|
6358
6371
|
|
|
6359
6372
|
// src/de-logic/de-logic-node/reset-param-node/reset-param-node.ts
|
|
6360
|
-
import { RuntimeModelError as
|
|
6373
|
+
import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
|
|
6361
6374
|
var ResetParamNode = class extends DELogicNode {
|
|
6362
6375
|
async exec(ctx) {
|
|
6363
6376
|
const { dstDELogicParamId } = this.model;
|
|
6364
6377
|
if (!dstDELogicParamId) {
|
|
6365
|
-
throw new
|
|
6378
|
+
throw new RuntimeModelError13(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
6366
6379
|
}
|
|
6367
6380
|
ctx.resetParam(dstDELogicParamId);
|
|
6368
6381
|
}
|
|
6369
6382
|
};
|
|
6370
6383
|
|
|
6371
6384
|
// src/de-logic/de-logic-node/renew-param-node/renew-param-node.ts
|
|
6372
|
-
import { RuntimeModelError as
|
|
6385
|
+
import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
|
|
6373
6386
|
var RenewParamNode = class extends DELogicNode {
|
|
6374
6387
|
async exec(ctx) {
|
|
6375
6388
|
const { dstDELogicParamId } = this.model;
|
|
6376
6389
|
if (!dstDELogicParamId) {
|
|
6377
|
-
throw new
|
|
6390
|
+
throw new RuntimeModelError14(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
6378
6391
|
}
|
|
6379
6392
|
ctx.renewParam(dstDELogicParamId);
|
|
6380
6393
|
}
|
|
6381
6394
|
};
|
|
6382
6395
|
|
|
6383
6396
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
6384
|
-
import { RuntimeModelError as
|
|
6397
|
+
import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
|
|
6385
6398
|
import { clone as clone7 } from "ramda";
|
|
6386
6399
|
var CopyParamNode = class extends DELogicNode {
|
|
6387
6400
|
async exec(ctx) {
|
|
6388
6401
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
6389
6402
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
6390
|
-
throw new
|
|
6403
|
+
throw new RuntimeModelError15(
|
|
6391
6404
|
this.model,
|
|
6392
6405
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
6393
6406
|
);
|
|
@@ -6398,12 +6411,12 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
6398
6411
|
};
|
|
6399
6412
|
|
|
6400
6413
|
// src/de-logic/de-logic-node/sort-param-node/sort-param-node.ts
|
|
6401
|
-
import { RuntimeModelError as
|
|
6414
|
+
import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
|
|
6402
6415
|
var SortParamNode = class extends DELogicNode {
|
|
6403
6416
|
async exec(ctx) {
|
|
6404
6417
|
const { dstDELogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
6405
6418
|
if (!dstDELogicParamId || !dstFieldName) {
|
|
6406
|
-
throw new
|
|
6419
|
+
throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
6407
6420
|
}
|
|
6408
6421
|
const key = dstFieldName.toLowerCase();
|
|
6409
6422
|
const arr = ctx.params[dstDELogicParamId];
|
|
@@ -6414,7 +6427,7 @@ var SortParamNode = class extends DELogicNode {
|
|
|
6414
6427
|
};
|
|
6415
6428
|
|
|
6416
6429
|
// src/de-logic/de-logic-node/append-param-node/append-param-node.ts
|
|
6417
|
-
import { RuntimeModelError as
|
|
6430
|
+
import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
|
|
6418
6431
|
var AppendParamNode = class extends DELogicNode {
|
|
6419
6432
|
async exec(ctx) {
|
|
6420
6433
|
const {
|
|
@@ -6425,7 +6438,7 @@ var AppendParamNode = class extends DELogicNode {
|
|
|
6425
6438
|
srcSize
|
|
6426
6439
|
} = this.model;
|
|
6427
6440
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
6428
|
-
throw new
|
|
6441
|
+
throw new RuntimeModelError17(
|
|
6429
6442
|
this.model,
|
|
6430
6443
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
6431
6444
|
);
|
|
@@ -6574,7 +6587,7 @@ var DELogic = class {
|
|
|
6574
6587
|
var _a, _b;
|
|
6575
6588
|
if (model.customCode) {
|
|
6576
6589
|
if (!model.scriptCode) {
|
|
6577
|
-
throw new
|
|
6590
|
+
throw new RuntimeModelError18(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
6578
6591
|
}
|
|
6579
6592
|
this.scriptFn = ScriptFactory.createScriptFn([], model.scriptCode, {
|
|
6580
6593
|
isAsync: true
|
|
@@ -6582,7 +6595,7 @@ var DELogic = class {
|
|
|
6582
6595
|
return;
|
|
6583
6596
|
}
|
|
6584
6597
|
if (!((_a = model.delogicNodes) == null ? void 0 : _a.length)) {
|
|
6585
|
-
throw new
|
|
6598
|
+
throw new RuntimeModelError18(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
6586
6599
|
}
|
|
6587
6600
|
model.delogicNodes.forEach((node) => {
|
|
6588
6601
|
const { logicNodeType } = node;
|
|
@@ -6681,7 +6694,7 @@ var DELogic = class {
|
|
|
6681
6694
|
const start = this.nodes.get(startDELogicNodeId);
|
|
6682
6695
|
await this.deepExec(start, ctx);
|
|
6683
6696
|
} else {
|
|
6684
|
-
throw new
|
|
6697
|
+
throw new RuntimeModelError18(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
6685
6698
|
}
|
|
6686
6699
|
if (ctx.isEndNode) {
|
|
6687
6700
|
return ctx.result;
|
|
@@ -6818,7 +6831,7 @@ var DEActionMethod = class extends Method {
|
|
|
6818
6831
|
if (this.method.actionType === "DELOGIC") {
|
|
6819
6832
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
6820
6833
|
if (!deLogic) {
|
|
6821
|
-
throw new
|
|
6834
|
+
throw new RuntimeModelError19(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
|
|
6822
6835
|
}
|
|
6823
6836
|
return execDELogicAction(deLogic, context, data, params);
|
|
6824
6837
|
}
|
|
@@ -7136,7 +7149,7 @@ var DEActionMethod = class extends Method {
|
|
|
7136
7149
|
import {
|
|
7137
7150
|
HttpResponse as HttpResponse4,
|
|
7138
7151
|
ModelError as ModelError12,
|
|
7139
|
-
RuntimeModelError as
|
|
7152
|
+
RuntimeModelError as RuntimeModelError20
|
|
7140
7153
|
} from "@ibiz-template/core";
|
|
7141
7154
|
import { ascSort, descSort } from "qx-util";
|
|
7142
7155
|
import { clone as clone10, equals as equals2, isEmpty as isEmpty7, isNil as isNil9, where as where2 } from "ramda";
|
|
@@ -7297,7 +7310,7 @@ var FetchMethod = class extends Method {
|
|
|
7297
7310
|
async fetchCodeListSet(context, params) {
|
|
7298
7311
|
const { appCodeListId } = this.method;
|
|
7299
7312
|
if (!appCodeListId) {
|
|
7300
|
-
throw new
|
|
7313
|
+
throw new RuntimeModelError20(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
|
|
7301
7314
|
}
|
|
7302
7315
|
const codeItems = await this.app.codeList.get(
|
|
7303
7316
|
appCodeListId,
|
|
@@ -7412,6 +7425,24 @@ var DEService = class {
|
|
|
7412
7425
|
}
|
|
7413
7426
|
throw new RuntimeError15("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
7414
7427
|
}
|
|
7428
|
+
getDraft(context, params, params2) {
|
|
7429
|
+
return this.exec("GetDraft", context, params, params2);
|
|
7430
|
+
}
|
|
7431
|
+
create(context, params, params2) {
|
|
7432
|
+
return this.exec("Create", context, params, params2);
|
|
7433
|
+
}
|
|
7434
|
+
get(context, params, params2) {
|
|
7435
|
+
return this.exec("Get", context, params, params2);
|
|
7436
|
+
}
|
|
7437
|
+
update(context, params, params2) {
|
|
7438
|
+
return this.exec("Update", context, params, params2);
|
|
7439
|
+
}
|
|
7440
|
+
remove(context, params, params2) {
|
|
7441
|
+
return this.exec("Remove", context, params, params2);
|
|
7442
|
+
}
|
|
7443
|
+
fetchDefault(context, params, params2) {
|
|
7444
|
+
return this.exec("FetchDefault", context, params, params2);
|
|
7445
|
+
}
|
|
7415
7446
|
/**
|
|
7416
7447
|
* 执行服务方法 ac 模式
|
|
7417
7448
|
*
|
|
@@ -8649,8 +8680,56 @@ var PanelData = class {
|
|
|
8649
8680
|
}
|
|
8650
8681
|
};
|
|
8651
8682
|
|
|
8683
|
+
// src/service/vo/chart-data/chart-data.ts
|
|
8684
|
+
import { createUUID as createUUID4 } from "qx-util";
|
|
8685
|
+
function updateKeyDefine3(target, keys) {
|
|
8686
|
+
keys.forEach((key) => {
|
|
8687
|
+
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
8688
|
+
Object.defineProperty(target, key, {
|
|
8689
|
+
enumerable: true,
|
|
8690
|
+
configurable: true,
|
|
8691
|
+
writable: true,
|
|
8692
|
+
value: void 0
|
|
8693
|
+
});
|
|
8694
|
+
}
|
|
8695
|
+
});
|
|
8696
|
+
}
|
|
8697
|
+
var ChartData = class {
|
|
8698
|
+
constructor(deData, seriesModel, catalog, groupName) {
|
|
8699
|
+
this._seriesModelId = seriesModel == null ? void 0 : seriesModel.id;
|
|
8700
|
+
this._catalog = catalog;
|
|
8701
|
+
this._groupName = groupName;
|
|
8702
|
+
this._uuid = createUUID4();
|
|
8703
|
+
return new Proxy(this, {
|
|
8704
|
+
set(target, p, value) {
|
|
8705
|
+
if (Object.prototype.hasOwnProperty.call(deData, p)) {
|
|
8706
|
+
deData[p] = value;
|
|
8707
|
+
} else {
|
|
8708
|
+
target[p] = value;
|
|
8709
|
+
}
|
|
8710
|
+
return true;
|
|
8711
|
+
},
|
|
8712
|
+
get(target, p, _receiver) {
|
|
8713
|
+
if (target[p] !== void 0) {
|
|
8714
|
+
return target[p];
|
|
8715
|
+
}
|
|
8716
|
+
if (deData[p] !== void 0) {
|
|
8717
|
+
return deData[p];
|
|
8718
|
+
}
|
|
8719
|
+
},
|
|
8720
|
+
ownKeys(target) {
|
|
8721
|
+
const allKeys = [
|
|
8722
|
+
.../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
|
|
8723
|
+
];
|
|
8724
|
+
updateKeyDefine3(target, allKeys);
|
|
8725
|
+
return allKeys;
|
|
8726
|
+
}
|
|
8727
|
+
});
|
|
8728
|
+
}
|
|
8729
|
+
};
|
|
8730
|
+
|
|
8652
8731
|
// src/service/mqtt/mqtt.service.ts
|
|
8653
|
-
import { QXEvent as QXEvent3, createUUID as
|
|
8732
|
+
import { QXEvent as QXEvent3, createUUID as createUUID5, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
8654
8733
|
var MqttService = class {
|
|
8655
8734
|
/**
|
|
8656
8735
|
* Creates an instance of MqttService.
|
|
@@ -8684,7 +8763,7 @@ var MqttService = class {
|
|
|
8684
8763
|
// 超时时间
|
|
8685
8764
|
connectTimeout: 6e3,
|
|
8686
8765
|
// 认证信息
|
|
8687
|
-
clientId:
|
|
8766
|
+
clientId: createUUID5(),
|
|
8688
8767
|
username: "",
|
|
8689
8768
|
password: "",
|
|
8690
8769
|
// 心跳时间
|
|
@@ -9122,7 +9201,7 @@ function installCommand() {
|
|
|
9122
9201
|
}
|
|
9123
9202
|
|
|
9124
9203
|
// src/app-hub.ts
|
|
9125
|
-
import { RuntimeError as
|
|
9204
|
+
import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
9126
9205
|
|
|
9127
9206
|
// src/application.ts
|
|
9128
9207
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -9389,7 +9468,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
9389
9468
|
})(PanelNotifyState || {});
|
|
9390
9469
|
|
|
9391
9470
|
// src/controller/common/view/view.controller.ts
|
|
9392
|
-
import { createUUID as
|
|
9471
|
+
import { createUUID as createUUID7, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
9393
9472
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
9394
9473
|
import { isEmpty as isEmpty8, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
|
|
9395
9474
|
|
|
@@ -10189,7 +10268,7 @@ var ValueExUtil = class {
|
|
|
10189
10268
|
// src/controller/utils/value-default/value-default.ts
|
|
10190
10269
|
import { RuntimeError as RuntimeError25, ModelError as ModelError16 } from "@ibiz-template/core";
|
|
10191
10270
|
import dayjs from "dayjs";
|
|
10192
|
-
import { createUUID as
|
|
10271
|
+
import { createUUID as createUUID6 } from "qx-util";
|
|
10193
10272
|
import { isNil as isNil16, isNotNil } from "ramda";
|
|
10194
10273
|
function getDefaultValue(opts, origins) {
|
|
10195
10274
|
var _a;
|
|
@@ -10234,7 +10313,7 @@ function getDefaultValue(opts, origins) {
|
|
|
10234
10313
|
case "CONTEXT":
|
|
10235
10314
|
return params[defaultValue];
|
|
10236
10315
|
case "UNIQUEID":
|
|
10237
|
-
return
|
|
10316
|
+
return createUUID6();
|
|
10238
10317
|
default:
|
|
10239
10318
|
throw new ModelError16({}, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
|
|
10240
10319
|
}
|
|
@@ -10262,10 +10341,13 @@ function listenAsyncAction(id) {
|
|
|
10262
10341
|
ibiz.mc.command.asyncAction.on(callBack);
|
|
10263
10342
|
});
|
|
10264
10343
|
}
|
|
10265
|
-
async function asyncImportData(file, appDataEntity) {
|
|
10344
|
+
async function asyncImportData(file, appDataEntity, dataImport) {
|
|
10266
10345
|
const data = new FormData();
|
|
10267
10346
|
data.append("file", file);
|
|
10268
|
-
|
|
10347
|
+
let url = "".concat(appDataEntity.codeName2.toLowerCase(), "/").concat(asyncImportUrl);
|
|
10348
|
+
if (dataImport == null ? void 0 : dataImport.codeName) {
|
|
10349
|
+
url += "?srfimporttag=".concat(dataImport.codeName);
|
|
10350
|
+
}
|
|
10269
10351
|
const res = await ibiz.net.request(url, {
|
|
10270
10352
|
method: "post",
|
|
10271
10353
|
data,
|
|
@@ -10277,10 +10359,13 @@ async function asyncImportData(file, appDataEntity) {
|
|
|
10277
10359
|
"OBJECTCREATED"
|
|
10278
10360
|
);
|
|
10279
10361
|
}
|
|
10280
|
-
async function importData(file, appDataEntity) {
|
|
10362
|
+
async function importData(file, appDataEntity, dataImport) {
|
|
10281
10363
|
const data = new FormData();
|
|
10282
10364
|
data.append("file", file);
|
|
10283
|
-
|
|
10365
|
+
let url = "".concat(appDataEntity.codeName2.toLowerCase(), "/").concat(importUrl);
|
|
10366
|
+
if (dataImport == null ? void 0 : dataImport.codeName) {
|
|
10367
|
+
url += "?srfimporttag=".concat(dataImport.codeName);
|
|
10368
|
+
}
|
|
10284
10369
|
const res = await ibiz.net.request(url, {
|
|
10285
10370
|
method: "post",
|
|
10286
10371
|
data,
|
|
@@ -10520,7 +10605,7 @@ var BaseController = class {
|
|
|
10520
10605
|
};
|
|
10521
10606
|
|
|
10522
10607
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
10523
|
-
import { RuntimeError as RuntimeError27, RuntimeModelError as
|
|
10608
|
+
import { RuntimeError as RuntimeError27, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
|
|
10524
10609
|
import { isNil as isNil17, mergeRight as mergeRight2 } from "ramda";
|
|
10525
10610
|
var ViewMsgController = class _ViewMsgController {
|
|
10526
10611
|
constructor(msgGroupId) {
|
|
@@ -10585,7 +10670,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
10585
10670
|
static async fetchDataSet(msgModel, context, params) {
|
|
10586
10671
|
const { appDataEntityId, appDEDataSetId } = msgModel;
|
|
10587
10672
|
if (!appDEDataSetId) {
|
|
10588
|
-
throw new
|
|
10673
|
+
throw new RuntimeModelError21(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
|
|
10589
10674
|
}
|
|
10590
10675
|
const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
|
|
10591
10676
|
if (res.data.length) {
|
|
@@ -10679,7 +10764,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
10679
10764
|
msgPosAppDEFieldId
|
|
10680
10765
|
} = msgModel;
|
|
10681
10766
|
if (!appDataEntityId) {
|
|
10682
|
-
throw new
|
|
10767
|
+
throw new RuntimeModelError21(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
10683
10768
|
}
|
|
10684
10769
|
const entity = await ibiz.hub.getAppDataEntity(
|
|
10685
10770
|
appDataEntityId,
|
|
@@ -10941,7 +11026,7 @@ var ViewController = class extends BaseController {
|
|
|
10941
11026
|
handleContextParams() {
|
|
10942
11027
|
this.context.srfappid = this.model.appId;
|
|
10943
11028
|
if (isNil18(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
|
|
10944
|
-
this.context.srfsessionid =
|
|
11029
|
+
this.context.srfsessionid = createUUID7();
|
|
10945
11030
|
}
|
|
10946
11031
|
const navContexts = this.model.appViewNavContexts;
|
|
10947
11032
|
let context = {};
|
|
@@ -11227,7 +11312,7 @@ var EditorController = class {
|
|
|
11227
11312
|
};
|
|
11228
11313
|
|
|
11229
11314
|
// src/controller/common/editor/code-list-editor.controller.ts
|
|
11230
|
-
import { RuntimeModelError as
|
|
11315
|
+
import { RuntimeModelError as RuntimeModelError22 } from "@ibiz-template/core";
|
|
11231
11316
|
var CodeListEditorController = class extends EditorController {
|
|
11232
11317
|
/**
|
|
11233
11318
|
* 加载代码表数据
|
|
@@ -11251,7 +11336,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
11251
11336
|
);
|
|
11252
11337
|
return dataItems;
|
|
11253
11338
|
}
|
|
11254
|
-
throw new
|
|
11339
|
+
throw new RuntimeModelError22(
|
|
11255
11340
|
this.model,
|
|
11256
11341
|
"\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
11257
11342
|
);
|
|
@@ -11260,7 +11345,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
11260
11345
|
|
|
11261
11346
|
// src/controller/common/control/control.controller.ts
|
|
11262
11347
|
import { IBizContext as IBizContext3, IBizParams, NoticeError } from "@ibiz-template/core";
|
|
11263
|
-
import { isNil as isNil19 } from "ramda";
|
|
11348
|
+
import { clone as clone14, isNil as isNil19 } from "ramda";
|
|
11264
11349
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
11265
11350
|
var ControlController = class extends BaseController {
|
|
11266
11351
|
/**
|
|
@@ -11300,7 +11385,7 @@ var ControlController = class extends BaseController {
|
|
|
11300
11385
|
"".concat(model.controlType, "_DEFAULT")
|
|
11301
11386
|
);
|
|
11302
11387
|
if (panelModel) {
|
|
11303
|
-
this.controlPanel = panelModel;
|
|
11388
|
+
this.controlPanel = clone14(panelModel);
|
|
11304
11389
|
}
|
|
11305
11390
|
this.updateContextParams({});
|
|
11306
11391
|
}
|
|
@@ -11922,7 +12007,7 @@ var MDControlController = class extends ControlController {
|
|
|
11922
12007
|
import {
|
|
11923
12008
|
findRecursiveChild,
|
|
11924
12009
|
RuntimeError as RuntimeError30,
|
|
11925
|
-
RuntimeModelError as
|
|
12010
|
+
RuntimeModelError as RuntimeModelError23
|
|
11926
12011
|
} from "@ibiz-template/core";
|
|
11927
12012
|
var AppMenuController = class extends ControlController {
|
|
11928
12013
|
initState() {
|
|
@@ -11968,7 +12053,7 @@ var AppMenuController = class extends ControlController {
|
|
|
11968
12053
|
event
|
|
11969
12054
|
});
|
|
11970
12055
|
if (!menuItem.appFuncId) {
|
|
11971
|
-
throw new
|
|
12056
|
+
throw new RuntimeModelError23(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
11972
12057
|
}
|
|
11973
12058
|
const tempContext = this.context.clone();
|
|
11974
12059
|
if (this.routeDepth && useDepth) {
|
|
@@ -12052,7 +12137,7 @@ var AppMenuController = class extends ControlController {
|
|
|
12052
12137
|
import {
|
|
12053
12138
|
findRecursiveChild as findRecursiveChild2,
|
|
12054
12139
|
RuntimeError as RuntimeError31,
|
|
12055
|
-
RuntimeModelError as
|
|
12140
|
+
RuntimeModelError as RuntimeModelError24
|
|
12056
12141
|
} from "@ibiz-template/core";
|
|
12057
12142
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
12058
12143
|
async onClickMenuItem(id, event) {
|
|
@@ -12068,7 +12153,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
12068
12153
|
event
|
|
12069
12154
|
});
|
|
12070
12155
|
if (!menuItem.appFuncId) {
|
|
12071
|
-
throw new
|
|
12156
|
+
throw new RuntimeModelError24(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
12072
12157
|
}
|
|
12073
12158
|
const tempContext = this.context.clone();
|
|
12074
12159
|
if (this.routeDepth === 1) {
|
|
@@ -12226,11 +12311,33 @@ var CalendarController = class extends MDControlController {
|
|
|
12226
12311
|
await this.afterLoad(args, items);
|
|
12227
12312
|
this.state.isLoaded = true;
|
|
12228
12313
|
this.state.items = items;
|
|
12314
|
+
this.sortItems();
|
|
12229
12315
|
await this.evt.emit("onLoadSuccess", {
|
|
12230
12316
|
isInitialLoad
|
|
12231
12317
|
});
|
|
12232
12318
|
return items;
|
|
12233
12319
|
}
|
|
12320
|
+
/**
|
|
12321
|
+
* 前台排序(时间轴类型)
|
|
12322
|
+
* @return {*}
|
|
12323
|
+
* @author: zhujiamin
|
|
12324
|
+
* @Date: 2023-11-22 15:16:43
|
|
12325
|
+
*/
|
|
12326
|
+
sortItems() {
|
|
12327
|
+
if (this.model.calendarStyle === "TIMELINE") {
|
|
12328
|
+
this.state.items.sort((a, b) => {
|
|
12329
|
+
const x = a.beginTime;
|
|
12330
|
+
const y = b.beginTime;
|
|
12331
|
+
let result = 0;
|
|
12332
|
+
if (dayjs2(x).isAfter(y)) {
|
|
12333
|
+
result = -1;
|
|
12334
|
+
} else if (dayjs2(x).isBefore(y)) {
|
|
12335
|
+
result = 1;
|
|
12336
|
+
}
|
|
12337
|
+
return result;
|
|
12338
|
+
});
|
|
12339
|
+
}
|
|
12340
|
+
}
|
|
12234
12341
|
/**
|
|
12235
12342
|
* 获取当前选中的日期
|
|
12236
12343
|
*
|
|
@@ -12290,8 +12397,10 @@ var CalendarController = class extends MDControlController {
|
|
|
12290
12397
|
if (extraParams) {
|
|
12291
12398
|
Object.assign(resultParams, extraParams);
|
|
12292
12399
|
}
|
|
12293
|
-
|
|
12294
|
-
|
|
12400
|
+
if (this.model.calendarStyle !== "TIMELINE") {
|
|
12401
|
+
const timeParam = this.getCurSelectDate(resultParams);
|
|
12402
|
+
Object.assign(resultParams, timeParam);
|
|
12403
|
+
}
|
|
12295
12404
|
return resultParams;
|
|
12296
12405
|
}
|
|
12297
12406
|
/**
|
|
@@ -12340,17 +12449,17 @@ import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
|
12340
12449
|
import { RuntimeError as RuntimeError33 } from "@ibiz-template/core";
|
|
12341
12450
|
|
|
12342
12451
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
12343
|
-
import { RuntimeModelError as
|
|
12452
|
+
import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
|
|
12344
12453
|
|
|
12345
12454
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
12346
|
-
import { plus, RuntimeModelError as
|
|
12455
|
+
import { plus, RuntimeModelError as RuntimeModelError25, toNumberOrNil } from "@ibiz-template/core";
|
|
12347
12456
|
import dayjs3 from "dayjs";
|
|
12348
12457
|
import minMax from "dayjs/plugin/minMax";
|
|
12349
12458
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
12350
12459
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
12351
12460
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
12352
12461
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
12353
|
-
import { clone as
|
|
12462
|
+
import { clone as clone15, isNil as isNil20, mergeDeepRight } from "ramda";
|
|
12354
12463
|
dayjs3.extend(minMax);
|
|
12355
12464
|
dayjs3.extend(isSameOrBefore);
|
|
12356
12465
|
dayjs3.extend(quarterOfYear);
|
|
@@ -12368,6 +12477,13 @@ var BaseSeriesGenerator = class {
|
|
|
12368
12477
|
constructor(model, chartGenerator) {
|
|
12369
12478
|
this.model = model;
|
|
12370
12479
|
this.chartGenerator = chartGenerator;
|
|
12480
|
+
/**
|
|
12481
|
+
* 根据分组处理出来的图表数据数组
|
|
12482
|
+
* @author lxm
|
|
12483
|
+
* @date 2023-06-09 02:58:28
|
|
12484
|
+
* @type {GroupData}
|
|
12485
|
+
*/
|
|
12486
|
+
this.chartDataArr = [];
|
|
12371
12487
|
/**
|
|
12372
12488
|
* 静态的序列options
|
|
12373
12489
|
* @author lxm
|
|
@@ -12386,10 +12502,10 @@ var BaseSeriesGenerator = class {
|
|
|
12386
12502
|
this.chartGenerator = chartGenerator;
|
|
12387
12503
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
12388
12504
|
if (!model.catalogField) {
|
|
12389
|
-
throw new
|
|
12505
|
+
throw new RuntimeModelError25(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
|
|
12390
12506
|
}
|
|
12391
12507
|
if (!model.valueField) {
|
|
12392
|
-
throw new
|
|
12508
|
+
throw new RuntimeModelError25(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
|
|
12393
12509
|
}
|
|
12394
12510
|
this.catalogField = chartGenerator.getFieldKey(model.catalogField);
|
|
12395
12511
|
this.valueField = chartGenerator.getFieldKey(model.valueField);
|
|
@@ -12454,6 +12570,24 @@ var BaseSeriesGenerator = class {
|
|
|
12454
12570
|
}
|
|
12455
12571
|
return isExclude ? void 0 : val;
|
|
12456
12572
|
}
|
|
12573
|
+
/**
|
|
12574
|
+
* 准备图表数据
|
|
12575
|
+
* @return {*}
|
|
12576
|
+
* @author: zhujiamin
|
|
12577
|
+
* @Date: 2023-11-23 15:24:12
|
|
12578
|
+
*/
|
|
12579
|
+
prepareChartData(groupData, deData, catalog, group) {
|
|
12580
|
+
var _a;
|
|
12581
|
+
if (this.groupField) {
|
|
12582
|
+
Object.assign(deData, { [this.groupField]: group });
|
|
12583
|
+
}
|
|
12584
|
+
if (this.catalogField) {
|
|
12585
|
+
Object.assign(deData, { [this.catalogField]: catalog });
|
|
12586
|
+
}
|
|
12587
|
+
const tempChartData = new ChartData(deData, this.model, catalog, group);
|
|
12588
|
+
groupData[group].get(catalog).chartData = tempChartData;
|
|
12589
|
+
(_a = this.chartDataArr) == null ? void 0 : _a.push(tempChartData);
|
|
12590
|
+
}
|
|
12457
12591
|
/**
|
|
12458
12592
|
* 计算分组数据
|
|
12459
12593
|
* @author lxm
|
|
@@ -12463,6 +12597,7 @@ var BaseSeriesGenerator = class {
|
|
|
12463
12597
|
*/
|
|
12464
12598
|
calcGroupData(data) {
|
|
12465
12599
|
this.groupData = {};
|
|
12600
|
+
this.chartDataArr = [];
|
|
12466
12601
|
const groupData = this.groupData;
|
|
12467
12602
|
const { seriesCodeListId, catalogCodeListId } = this.model;
|
|
12468
12603
|
data.forEach((item) => {
|
|
@@ -12492,6 +12627,17 @@ var BaseSeriesGenerator = class {
|
|
|
12492
12627
|
true
|
|
12493
12628
|
);
|
|
12494
12629
|
if (!catalog) {
|
|
12630
|
+
if (catalogCodeListId && this.autoCompleteCategory) {
|
|
12631
|
+
const codeListItems = this.chartGenerator.codeListMap.get(catalogCodeListId);
|
|
12632
|
+
codeListItems.forEach((x) => {
|
|
12633
|
+
this.prepareChartData(
|
|
12634
|
+
groupData,
|
|
12635
|
+
{ [this.valueField]: 0 },
|
|
12636
|
+
x.text,
|
|
12637
|
+
group
|
|
12638
|
+
);
|
|
12639
|
+
});
|
|
12640
|
+
}
|
|
12495
12641
|
return;
|
|
12496
12642
|
}
|
|
12497
12643
|
if (!groupData[group].get(catalog)) {
|
|
@@ -12501,7 +12647,16 @@ var BaseSeriesGenerator = class {
|
|
|
12501
12647
|
groupData[group].get(catalog).value,
|
|
12502
12648
|
item[this.valueField]
|
|
12503
12649
|
);
|
|
12504
|
-
groupData[group].get(catalog).
|
|
12650
|
+
if (!groupData[group].get(catalog).chartData) {
|
|
12651
|
+
this.prepareChartData(groupData, item, catalog, group);
|
|
12652
|
+
} else {
|
|
12653
|
+
this.prepareChartData(
|
|
12654
|
+
groupData,
|
|
12655
|
+
{ [this.valueField]: groupData[group].get(catalog).value },
|
|
12656
|
+
catalog,
|
|
12657
|
+
group
|
|
12658
|
+
);
|
|
12659
|
+
}
|
|
12505
12660
|
});
|
|
12506
12661
|
return groupData;
|
|
12507
12662
|
}
|
|
@@ -12529,7 +12684,7 @@ var BaseSeriesGenerator = class {
|
|
|
12529
12684
|
}
|
|
12530
12685
|
/**
|
|
12531
12686
|
* 生成每条序列的data,由于不同图表类型格式不同所以为any
|
|
12532
|
-
* 默认提供的是二维数组,按[
|
|
12687
|
+
* 默认提供的是二维数组,按[x轴, y轴, 图表数据]格式
|
|
12533
12688
|
* @author lxm
|
|
12534
12689
|
* @date 2023-06-09 03:38:07
|
|
12535
12690
|
* @param {CatalogData} catalogData
|
|
@@ -12539,8 +12694,7 @@ var BaseSeriesGenerator = class {
|
|
|
12539
12694
|
calcSeriesData(catalogData) {
|
|
12540
12695
|
const temData = [];
|
|
12541
12696
|
catalogData.forEach((catalog, key) => {
|
|
12542
|
-
|
|
12543
|
-
temData.push([key, catalog.value, (_a = catalog.deData) == null ? void 0 : _a.srfkey]);
|
|
12697
|
+
temData.push([key, catalog.value, catalog.chartData]);
|
|
12544
12698
|
});
|
|
12545
12699
|
return temData;
|
|
12546
12700
|
}
|
|
@@ -12558,14 +12712,18 @@ var BaseSeriesGenerator = class {
|
|
|
12558
12712
|
return this.calcGroupSeries(groupData);
|
|
12559
12713
|
}
|
|
12560
12714
|
/**
|
|
12561
|
-
*
|
|
12715
|
+
* 通过echarts事件的params获取封装好的图表数据
|
|
12562
12716
|
* @author lxm
|
|
12563
12717
|
* @date 2023-06-09 10:56:25
|
|
12564
12718
|
* @param {ECElementEvent} params
|
|
12565
12719
|
* @return {*} {string}
|
|
12566
12720
|
*/
|
|
12567
|
-
|
|
12568
|
-
|
|
12721
|
+
getChartDataByParams(params) {
|
|
12722
|
+
var _a, _b, _c;
|
|
12723
|
+
if (this.groupData && Object.keys(this.groupData).length === 1) {
|
|
12724
|
+
return (_a = this.groupData[DEFAULT_GROUP].get(params.name)) == null ? void 0 : _a.chartData;
|
|
12725
|
+
}
|
|
12726
|
+
return (_c = (_b = this.groupData) == null ? void 0 : _b[params.seriesName].get(params.name)) == null ? void 0 : _c.chartData;
|
|
12569
12727
|
}
|
|
12570
12728
|
/**
|
|
12571
12729
|
* 数据预处理
|
|
@@ -12576,7 +12734,7 @@ var BaseSeriesGenerator = class {
|
|
|
12576
12734
|
dataPreprocess(data) {
|
|
12577
12735
|
const tempData = [];
|
|
12578
12736
|
data.forEach((singleData) => {
|
|
12579
|
-
tempData.push(
|
|
12737
|
+
tempData.push(clone15(singleData));
|
|
12580
12738
|
});
|
|
12581
12739
|
const { groupMode } = this.model;
|
|
12582
12740
|
if (groupMode) {
|
|
@@ -12770,10 +12928,10 @@ var BaseSeriesGenerator = class {
|
|
|
12770
12928
|
var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
12771
12929
|
calcStaticOptions() {
|
|
12772
12930
|
if (this.xAxisIndex === void 0) {
|
|
12773
|
-
throw new
|
|
12931
|
+
throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
12774
12932
|
}
|
|
12775
12933
|
if (this.yAxisIndex === void 0) {
|
|
12776
|
-
throw new
|
|
12934
|
+
throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
12777
12935
|
}
|
|
12778
12936
|
const options = super.calcStaticOptions();
|
|
12779
12937
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -12789,14 +12947,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
12789
12947
|
};
|
|
12790
12948
|
|
|
12791
12949
|
// src/controller/control/chart/generator/bar-series-generator.ts
|
|
12792
|
-
import { RuntimeModelError as
|
|
12950
|
+
import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
|
|
12793
12951
|
var BarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
12794
12952
|
calcStaticOptions() {
|
|
12795
12953
|
if (this.xAxisIndex === void 0) {
|
|
12796
|
-
throw new
|
|
12954
|
+
throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
12797
12955
|
}
|
|
12798
12956
|
if (this.yAxisIndex === void 0) {
|
|
12799
|
-
throw new
|
|
12957
|
+
throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
12800
12958
|
}
|
|
12801
12959
|
const options = super.calcStaticOptions();
|
|
12802
12960
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -12819,17 +12977,13 @@ var FunnelSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
12819
12977
|
calcSeriesData(catalogData) {
|
|
12820
12978
|
const temData = [];
|
|
12821
12979
|
catalogData.forEach((catalog, key) => {
|
|
12822
|
-
var _a;
|
|
12823
12980
|
temData.push({
|
|
12824
12981
|
name: key,
|
|
12825
|
-
value: [catalog.value,
|
|
12982
|
+
value: [catalog.value, catalog.chartData]
|
|
12826
12983
|
});
|
|
12827
12984
|
});
|
|
12828
12985
|
return temData;
|
|
12829
12986
|
}
|
|
12830
|
-
getSrfkeyByParams(params) {
|
|
12831
|
-
return params.value[1];
|
|
12832
|
-
}
|
|
12833
12987
|
};
|
|
12834
12988
|
|
|
12835
12989
|
// src/controller/control/chart/generator/pie-series-generator.ts
|
|
@@ -12843,28 +12997,24 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
12843
12997
|
calcSeriesData(catalogData) {
|
|
12844
12998
|
const temData = [];
|
|
12845
12999
|
catalogData.forEach((catalog, key) => {
|
|
12846
|
-
var _a;
|
|
12847
13000
|
temData.push({
|
|
12848
13001
|
name: key,
|
|
12849
|
-
value: [catalog.value,
|
|
13002
|
+
value: [catalog.value, catalog.chartData]
|
|
12850
13003
|
});
|
|
12851
13004
|
});
|
|
12852
13005
|
return temData;
|
|
12853
13006
|
}
|
|
12854
|
-
getSrfkeyByParams(params) {
|
|
12855
|
-
return params.value[1];
|
|
12856
|
-
}
|
|
12857
13007
|
};
|
|
12858
13008
|
|
|
12859
13009
|
// src/controller/control/chart/generator/scatter-series-generator.ts
|
|
12860
|
-
import { RuntimeModelError as
|
|
13010
|
+
import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
12861
13011
|
var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
12862
13012
|
calcStaticOptions() {
|
|
12863
13013
|
if (this.xAxisIndex === void 0) {
|
|
12864
|
-
throw new
|
|
13014
|
+
throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
12865
13015
|
}
|
|
12866
13016
|
if (this.yAxisIndex === void 0) {
|
|
12867
|
-
throw new
|
|
13017
|
+
throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
12868
13018
|
}
|
|
12869
13019
|
const options = super.calcStaticOptions();
|
|
12870
13020
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -12970,7 +13120,7 @@ var RadarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
12970
13120
|
const catalogData = groupData[group];
|
|
12971
13121
|
const value = radar.indicatorKeys.map((key) => {
|
|
12972
13122
|
if (catalogData.has(key)) {
|
|
12973
|
-
return catalogData.get(key);
|
|
13123
|
+
return catalogData.get(key).value;
|
|
12974
13124
|
}
|
|
12975
13125
|
return 0;
|
|
12976
13126
|
});
|
|
@@ -12985,9 +13135,6 @@ var RadarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
12985
13135
|
}
|
|
12986
13136
|
return options;
|
|
12987
13137
|
}
|
|
12988
|
-
getSrfkeyByParams(params) {
|
|
12989
|
-
return params.value[1];
|
|
12990
|
-
}
|
|
12991
13138
|
};
|
|
12992
13139
|
|
|
12993
13140
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
@@ -13052,6 +13199,13 @@ var ChartOptionsGenerator2 = class {
|
|
|
13052
13199
|
* @date 2023-06-09 07:47:35
|
|
13053
13200
|
*/
|
|
13054
13201
|
this.codeListMap = /* @__PURE__ */ new Map();
|
|
13202
|
+
/**
|
|
13203
|
+
* 维护图表序列index对应序列生成器Map
|
|
13204
|
+
* @return {*}
|
|
13205
|
+
* @author: zhujiamin
|
|
13206
|
+
* @Date: 2023-11-22 17:27:15
|
|
13207
|
+
*/
|
|
13208
|
+
this.seriesGeneratorIndexMap = /* @__PURE__ */ new Map();
|
|
13055
13209
|
const {
|
|
13056
13210
|
dechartTitle,
|
|
13057
13211
|
dechartLegend,
|
|
@@ -13257,12 +13411,17 @@ var ChartOptionsGenerator2 = class {
|
|
|
13257
13411
|
}
|
|
13258
13412
|
const seriesOption = [];
|
|
13259
13413
|
this.seriesGenerators.forEach((generator) => {
|
|
13414
|
+
const startIndex = seriesOption.length;
|
|
13260
13415
|
const series = generator.calcByData(data);
|
|
13261
13416
|
if (series instanceof Array) {
|
|
13262
13417
|
seriesOption.push(...series);
|
|
13263
13418
|
} else {
|
|
13264
13419
|
seriesOption.push(series);
|
|
13265
13420
|
}
|
|
13421
|
+
const endIndex = seriesOption.length - 1;
|
|
13422
|
+
for (let i = startIndex; i <= endIndex; i++) {
|
|
13423
|
+
this.seriesGeneratorIndexMap.set(i, generator);
|
|
13424
|
+
}
|
|
13266
13425
|
});
|
|
13267
13426
|
this.options.series = seriesOption;
|
|
13268
13427
|
if (this.seriesGenerators.length === 1 && this.seriesGenerators[0].groupData && Object.keys(this.seriesGenerators[0].groupData).length === 1 && seriesOption[0].type && ["bar", "line", "scatter"].includes(seriesOption[0].type) && this.staticOptions.legend) {
|
|
@@ -13280,12 +13439,19 @@ var ChartOptionsGenerator2 = class {
|
|
|
13280
13439
|
}
|
|
13281
13440
|
return this.options;
|
|
13282
13441
|
}
|
|
13283
|
-
|
|
13284
|
-
|
|
13442
|
+
/**
|
|
13443
|
+
* 根据echarts给的params得到图表数据
|
|
13444
|
+
* @param {ECElementEvent} params
|
|
13445
|
+
* @return {*}
|
|
13446
|
+
* @author: zhujiamin
|
|
13447
|
+
* @Date: 2023-11-22 16:11:50
|
|
13448
|
+
*/
|
|
13449
|
+
getChartDataByParams(params) {
|
|
13450
|
+
const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
|
|
13285
13451
|
if (!generator) {
|
|
13286
13452
|
throw new RuntimeError33("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
13287
13453
|
}
|
|
13288
|
-
return generator.
|
|
13454
|
+
return generator.getChartDataByParams(params);
|
|
13289
13455
|
}
|
|
13290
13456
|
// protected calcRadarSeries(data: IData[], series: IChartSeriesFunnel) {
|
|
13291
13457
|
// // 初始化radarMap
|
|
@@ -13372,9 +13538,11 @@ var ChartController = class extends MDControlController {
|
|
|
13372
13538
|
initChart(chart) {
|
|
13373
13539
|
this.chart = chart;
|
|
13374
13540
|
this.chart.on("click", (params) => {
|
|
13375
|
-
const
|
|
13376
|
-
|
|
13377
|
-
|
|
13541
|
+
const activeData = this.generator.getChartDataByParams(params);
|
|
13542
|
+
console.log("\u6FC0\u6D3B\u6570\u636E", activeData);
|
|
13543
|
+
if (activeData) {
|
|
13544
|
+
this.setActive(activeData);
|
|
13545
|
+
}
|
|
13378
13546
|
});
|
|
13379
13547
|
}
|
|
13380
13548
|
/**
|
|
@@ -13443,20 +13611,20 @@ var CaptionBarController = class extends ControlController {
|
|
|
13443
13611
|
};
|
|
13444
13612
|
|
|
13445
13613
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
13446
|
-
import { recursiveIterate, RuntimeError as
|
|
13614
|
+
import { recursiveIterate, RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
13447
13615
|
|
|
13448
13616
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
13449
|
-
import { RuntimeModelError as
|
|
13617
|
+
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
13450
13618
|
import { isArray as isArray9 } from "qx-util";
|
|
13451
13619
|
|
|
13452
13620
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
13453
|
-
import { RuntimeModelError as
|
|
13621
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
13454
13622
|
|
|
13455
13623
|
// src/ui-logic/index.ts
|
|
13456
13624
|
import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
|
|
13457
13625
|
|
|
13458
13626
|
// src/ui-logic/ui-logic.ts
|
|
13459
|
-
import { ModelError as ModelError24, RuntimeModelError as
|
|
13627
|
+
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
13460
13628
|
|
|
13461
13629
|
// src/ui-logic/ui-logic-context.ts
|
|
13462
13630
|
var UILogicContext = class {
|
|
@@ -13591,24 +13759,24 @@ var UILogicContext = class {
|
|
|
13591
13759
|
};
|
|
13592
13760
|
|
|
13593
13761
|
// src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
|
|
13594
|
-
import { RuntimeModelError as
|
|
13762
|
+
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
13595
13763
|
|
|
13596
13764
|
// src/ui-logic/ui-logic-link/ui-logic-link.ts
|
|
13597
13765
|
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
13598
13766
|
|
|
13599
13767
|
// src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
|
|
13600
|
-
import { RuntimeModelError as
|
|
13768
|
+
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
13601
13769
|
|
|
13602
13770
|
// src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
|
|
13603
13771
|
var UILogicLinkCond = class {
|
|
13604
13772
|
};
|
|
13605
13773
|
|
|
13606
13774
|
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
13607
|
-
import { ModelError as ModelError18, RuntimeModelError as
|
|
13775
|
+
import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
13608
13776
|
|
|
13609
13777
|
// src/ui-logic/utils/handle-src-val.ts
|
|
13610
13778
|
import { ModelError as ModelError17 } from "@ibiz-template/core";
|
|
13611
|
-
import { clone as
|
|
13779
|
+
import { clone as clone16 } from "ramda";
|
|
13612
13780
|
function handleSrcVal2(ctx, srcValParams) {
|
|
13613
13781
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
13614
13782
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -13635,7 +13803,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
13635
13803
|
value = ctx.parameters.context;
|
|
13636
13804
|
break;
|
|
13637
13805
|
case "ENVPARAM":
|
|
13638
|
-
value =
|
|
13806
|
+
value = clone16(ibiz.env);
|
|
13639
13807
|
break;
|
|
13640
13808
|
default:
|
|
13641
13809
|
throw new ModelError17(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -13700,7 +13868,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
13700
13868
|
switch (this.type) {
|
|
13701
13869
|
case "ENTITYFIELD": {
|
|
13702
13870
|
if (!this.value) {
|
|
13703
|
-
throw new
|
|
13871
|
+
throw new RuntimeModelError29(
|
|
13704
13872
|
this.model,
|
|
13705
13873
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
13706
13874
|
);
|
|
@@ -13710,7 +13878,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
13710
13878
|
}
|
|
13711
13879
|
case "SRCENTITYFIELD": {
|
|
13712
13880
|
if (!this.value) {
|
|
13713
|
-
throw new
|
|
13881
|
+
throw new RuntimeModelError29(
|
|
13714
13882
|
this.model,
|
|
13715
13883
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
13716
13884
|
);
|
|
@@ -13776,7 +13944,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
|
|
|
13776
13944
|
test(ctx, context, data) {
|
|
13777
13945
|
let bol = true;
|
|
13778
13946
|
if (this.conds.length === 0) {
|
|
13779
|
-
throw new
|
|
13947
|
+
throw new RuntimeModelError30(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
13780
13948
|
}
|
|
13781
13949
|
for (let i = 0; i < this.conds.length; i++) {
|
|
13782
13950
|
const cond = this.conds[i];
|
|
@@ -13902,10 +14070,10 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
13902
14070
|
retDEUILogicParamId
|
|
13903
14071
|
} = this.model;
|
|
13904
14072
|
if (!dstAppDataEntityId) {
|
|
13905
|
-
throw new
|
|
14073
|
+
throw new RuntimeModelError31(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
13906
14074
|
}
|
|
13907
14075
|
if (!dstAppDEActionId) {
|
|
13908
|
-
throw new
|
|
14076
|
+
throw new RuntimeModelError31(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
13909
14077
|
}
|
|
13910
14078
|
const requestData = ctx.params[dstDEUILogicParamId];
|
|
13911
14079
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -13923,13 +14091,13 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
13923
14091
|
};
|
|
13924
14092
|
|
|
13925
14093
|
// src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
|
|
13926
|
-
import { RuntimeModelError as
|
|
14094
|
+
import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
13927
14095
|
var DEUIActionNode = class extends UILogicNode {
|
|
13928
14096
|
async exec(ctx) {
|
|
13929
14097
|
const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
|
|
13930
14098
|
const { data, parameters } = ctx;
|
|
13931
14099
|
if (!dstAppDEUIActionId) {
|
|
13932
|
-
throw new
|
|
14100
|
+
throw new RuntimeModelError32(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
13933
14101
|
}
|
|
13934
14102
|
let actionData = [data];
|
|
13935
14103
|
if (dstDEUILogicParamId) {
|
|
@@ -13990,7 +14158,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
13990
14158
|
|
|
13991
14159
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
13992
14160
|
import { ModelError as ModelError21, RuntimeError as RuntimeError35 } from "@ibiz-template/core";
|
|
13993
|
-
import { clone as
|
|
14161
|
+
import { clone as clone17 } from "ramda";
|
|
13994
14162
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
13995
14163
|
async exec(ctx) {
|
|
13996
14164
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -14079,7 +14247,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
14079
14247
|
copyParam(nodeParam, ctx) {
|
|
14080
14248
|
const { dstDEUILogicParamId } = nodeParam;
|
|
14081
14249
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
14082
|
-
ctx.params[dstDEUILogicParamId] =
|
|
14250
|
+
ctx.params[dstDEUILogicParamId] = clone17(srcVal);
|
|
14083
14251
|
}
|
|
14084
14252
|
/**
|
|
14085
14253
|
* 绑定参数
|
|
@@ -14156,20 +14324,20 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
14156
14324
|
};
|
|
14157
14325
|
|
|
14158
14326
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
14159
|
-
import { RuntimeError as RuntimeError36, RuntimeModelError as
|
|
14327
|
+
import { RuntimeError as RuntimeError36, RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
14160
14328
|
import { isFunction } from "lodash-es";
|
|
14161
14329
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
14162
14330
|
async exec(ctx) {
|
|
14163
14331
|
ctx.isEndNode = true;
|
|
14164
14332
|
const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
|
|
14165
14333
|
if (!invokeCtrlId) {
|
|
14166
|
-
throw new
|
|
14334
|
+
throw new RuntimeModelError33(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
|
|
14167
14335
|
}
|
|
14168
14336
|
if (!invokeParamId) {
|
|
14169
|
-
throw new
|
|
14337
|
+
throw new RuntimeModelError33(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
|
|
14170
14338
|
}
|
|
14171
14339
|
if (!invokeMethod) {
|
|
14172
|
-
throw new
|
|
14340
|
+
throw new RuntimeModelError33(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
|
|
14173
14341
|
}
|
|
14174
14342
|
const invokeParam = ctx.params[invokeParamId];
|
|
14175
14343
|
if (!invokeParam) {
|
|
@@ -14187,12 +14355,12 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
14187
14355
|
};
|
|
14188
14356
|
|
|
14189
14357
|
// src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
|
|
14190
|
-
import { RuntimeModelError as
|
|
14358
|
+
import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
14191
14359
|
var BindParamNode2 = class extends UILogicNode {
|
|
14192
14360
|
async exec(ctx) {
|
|
14193
14361
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
14194
14362
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
14195
|
-
throw new
|
|
14363
|
+
throw new RuntimeModelError34(
|
|
14196
14364
|
this.model,
|
|
14197
14365
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
14198
14366
|
);
|
|
@@ -14203,7 +14371,7 @@ var BindParamNode2 = class extends UILogicNode {
|
|
|
14203
14371
|
};
|
|
14204
14372
|
|
|
14205
14373
|
// src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
|
|
14206
|
-
import { ModelError as ModelError22, RuntimeModelError as
|
|
14374
|
+
import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
14207
14375
|
var MsgBoxNode = class extends UILogicNode {
|
|
14208
14376
|
constructor() {
|
|
14209
14377
|
super(...arguments);
|
|
@@ -14217,10 +14385,10 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
14217
14385
|
async exec(ctx) {
|
|
14218
14386
|
const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
|
|
14219
14387
|
if (!msgBoxType) {
|
|
14220
|
-
throw new
|
|
14388
|
+
throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
14221
14389
|
}
|
|
14222
14390
|
if (!buttonsType) {
|
|
14223
|
-
throw new
|
|
14391
|
+
throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
14224
14392
|
}
|
|
14225
14393
|
let { title } = this.model;
|
|
14226
14394
|
let { message } = this.model;
|
|
@@ -14280,12 +14448,12 @@ var PFPluginNode = class extends UILogicNode {
|
|
|
14280
14448
|
};
|
|
14281
14449
|
|
|
14282
14450
|
// src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
|
|
14283
|
-
import { RuntimeModelError as
|
|
14451
|
+
import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
14284
14452
|
var DebugParamNode = class extends UILogicNode {
|
|
14285
14453
|
async exec(ctx) {
|
|
14286
14454
|
const { dstDEUILogicParamId, name } = this.model;
|
|
14287
14455
|
if (!dstDEUILogicParamId) {
|
|
14288
|
-
throw new
|
|
14456
|
+
throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
14289
14457
|
}
|
|
14290
14458
|
const param = ctx.params[dstDEUILogicParamId];
|
|
14291
14459
|
console.log("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
|
|
@@ -14293,36 +14461,36 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
14293
14461
|
};
|
|
14294
14462
|
|
|
14295
14463
|
// src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
|
|
14296
|
-
import { RuntimeModelError as
|
|
14464
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
14297
14465
|
var ResetParamNode2 = class extends UILogicNode {
|
|
14298
14466
|
async exec(ctx) {
|
|
14299
14467
|
const { dstDEUILogicParamId } = this.model;
|
|
14300
14468
|
if (!dstDEUILogicParamId) {
|
|
14301
|
-
throw new
|
|
14469
|
+
throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
14302
14470
|
}
|
|
14303
14471
|
ctx.resetParam(dstDEUILogicParamId);
|
|
14304
14472
|
}
|
|
14305
14473
|
};
|
|
14306
14474
|
|
|
14307
14475
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
14308
|
-
import { RuntimeModelError as
|
|
14309
|
-
import { clone as
|
|
14476
|
+
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
14477
|
+
import { clone as clone18 } from "ramda";
|
|
14310
14478
|
var CopyParamNode2 = class extends UILogicNode {
|
|
14311
14479
|
async exec(ctx) {
|
|
14312
14480
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
14313
14481
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
14314
|
-
throw new
|
|
14482
|
+
throw new RuntimeModelError38(
|
|
14315
14483
|
this.model,
|
|
14316
14484
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
14317
14485
|
);
|
|
14318
14486
|
}
|
|
14319
14487
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
14320
|
-
ctx.params[dstDEUILogicParamId] =
|
|
14488
|
+
ctx.params[dstDEUILogicParamId] = clone18(srcVal);
|
|
14321
14489
|
}
|
|
14322
14490
|
};
|
|
14323
14491
|
|
|
14324
14492
|
// src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
|
|
14325
|
-
import { RuntimeModelError as
|
|
14493
|
+
import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
14326
14494
|
var AppendParamNode2 = class extends UILogicNode {
|
|
14327
14495
|
async exec(ctx) {
|
|
14328
14496
|
const {
|
|
@@ -14333,7 +14501,7 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
14333
14501
|
srcSize
|
|
14334
14502
|
} = this.model;
|
|
14335
14503
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
14336
|
-
throw new
|
|
14504
|
+
throw new RuntimeModelError39(
|
|
14337
14505
|
this.model,
|
|
14338
14506
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
14339
14507
|
);
|
|
@@ -14351,12 +14519,12 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
14351
14519
|
};
|
|
14352
14520
|
|
|
14353
14521
|
// src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
|
|
14354
|
-
import { RuntimeModelError as
|
|
14522
|
+
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
14355
14523
|
var SortParamNode2 = class extends UILogicNode {
|
|
14356
14524
|
async exec(ctx) {
|
|
14357
14525
|
const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
14358
14526
|
if (!dstDEUILogicParamId || !dstFieldName) {
|
|
14359
|
-
throw new
|
|
14527
|
+
throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
14360
14528
|
}
|
|
14361
14529
|
const key = dstFieldName;
|
|
14362
14530
|
const arr = ctx.params[dstDEUILogicParamId];
|
|
@@ -14367,19 +14535,19 @@ var SortParamNode2 = class extends UILogicNode {
|
|
|
14367
14535
|
};
|
|
14368
14536
|
|
|
14369
14537
|
// src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
|
|
14370
|
-
import { RuntimeModelError as
|
|
14538
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
14371
14539
|
var RenewParamNode2 = class extends UILogicNode {
|
|
14372
14540
|
async exec(ctx) {
|
|
14373
14541
|
const { dstDEUILogicParamId } = this.model;
|
|
14374
14542
|
if (!dstDEUILogicParamId) {
|
|
14375
|
-
throw new
|
|
14543
|
+
throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
14376
14544
|
}
|
|
14377
14545
|
ctx.renewParam(dstDEUILogicParamId);
|
|
14378
14546
|
}
|
|
14379
14547
|
};
|
|
14380
14548
|
|
|
14381
14549
|
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
14382
|
-
import { RuntimeModelError as
|
|
14550
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
14383
14551
|
var DataSetNode2 = class extends UILogicNode {
|
|
14384
14552
|
async exec(ctx) {
|
|
14385
14553
|
const {
|
|
@@ -14389,7 +14557,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
14389
14557
|
retDEUILogicParamId
|
|
14390
14558
|
} = this.model;
|
|
14391
14559
|
if (!dstDEUILogicParamId) {
|
|
14392
|
-
throw new
|
|
14560
|
+
throw new RuntimeModelError42(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
|
|
14393
14561
|
}
|
|
14394
14562
|
const queryParams = ctx.params[dstDEUILogicParamId];
|
|
14395
14563
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -14415,19 +14583,19 @@ var ThrowExceptionNode2 = class extends UILogicNode {
|
|
|
14415
14583
|
};
|
|
14416
14584
|
|
|
14417
14585
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
14418
|
-
import { RuntimeError as RuntimeError38, RuntimeModelError as
|
|
14586
|
+
import { RuntimeError as RuntimeError38, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
14419
14587
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
14420
14588
|
async exec(ctx) {
|
|
14421
14589
|
ctx.isEndNode = true;
|
|
14422
14590
|
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
14423
14591
|
if (!fireCtrlId) {
|
|
14424
|
-
throw new
|
|
14592
|
+
throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
14425
14593
|
}
|
|
14426
14594
|
if (!eventName) {
|
|
14427
|
-
throw new
|
|
14595
|
+
throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
14428
14596
|
}
|
|
14429
14597
|
if (!eventParamId) {
|
|
14430
|
-
throw new
|
|
14598
|
+
throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
14431
14599
|
}
|
|
14432
14600
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
14433
14601
|
if (!invokeCtrl) {
|
|
@@ -14442,7 +14610,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
14442
14610
|
};
|
|
14443
14611
|
|
|
14444
14612
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
14445
|
-
import { RuntimeError as RuntimeError39, RuntimeModelError as
|
|
14613
|
+
import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
14446
14614
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
14447
14615
|
async exec(ctx) {
|
|
14448
14616
|
const {
|
|
@@ -14452,13 +14620,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
14452
14620
|
retDEUILogicParamId
|
|
14453
14621
|
} = this.model;
|
|
14454
14622
|
if (!dstAppDataEntityId) {
|
|
14455
|
-
throw new
|
|
14623
|
+
throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
14456
14624
|
}
|
|
14457
14625
|
if (!dstAppDELogicId) {
|
|
14458
|
-
throw new
|
|
14626
|
+
throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
14459
14627
|
}
|
|
14460
14628
|
if (!dstDEUILogicParamId) {
|
|
14461
|
-
throw new
|
|
14629
|
+
throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
14462
14630
|
}
|
|
14463
14631
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
14464
14632
|
if (!dstParam) {
|
|
@@ -14603,7 +14771,7 @@ var UILogic = class {
|
|
|
14603
14771
|
this.params = /* @__PURE__ */ new Map();
|
|
14604
14772
|
var _a;
|
|
14605
14773
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
14606
|
-
throw new
|
|
14774
|
+
throw new RuntimeModelError45(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
14607
14775
|
}
|
|
14608
14776
|
model.deuilogicNodes.forEach((node) => {
|
|
14609
14777
|
const { logicNodeType } = node;
|
|
@@ -14720,7 +14888,7 @@ var UILogic = class {
|
|
|
14720
14888
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
14721
14889
|
await this.deepExec(start, ctx);
|
|
14722
14890
|
} else {
|
|
14723
|
-
throw new
|
|
14891
|
+
throw new RuntimeModelError45(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
14724
14892
|
}
|
|
14725
14893
|
if (ctx.isEndNode) {
|
|
14726
14894
|
return ctx.result;
|
|
@@ -14856,7 +15024,7 @@ var UIActionProviderBase = class {
|
|
|
14856
15024
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
14857
15025
|
if (uilogicAttachMode === "REPLACE") {
|
|
14858
15026
|
if (!appDEUILogicId) {
|
|
14859
|
-
throw new
|
|
15027
|
+
throw new RuntimeModelError46(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
14860
15028
|
}
|
|
14861
15029
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
14862
15030
|
return result;
|
|
@@ -14888,7 +15056,7 @@ var UIActionProviderBase = class {
|
|
|
14888
15056
|
}
|
|
14889
15057
|
if (action.uilogicAttachMode === "AFTER") {
|
|
14890
15058
|
if (!appDEUILogicId) {
|
|
14891
|
-
throw new
|
|
15059
|
+
throw new RuntimeModelError46(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
14892
15060
|
}
|
|
14893
15061
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
14894
15062
|
}
|
|
@@ -15076,7 +15244,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
15076
15244
|
const entityName = action.appDataEntityId;
|
|
15077
15245
|
const methodName = action.appDEMethodId;
|
|
15078
15246
|
if (!entityName || !methodName) {
|
|
15079
|
-
throw new
|
|
15247
|
+
throw new RuntimeModelError47(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
15080
15248
|
}
|
|
15081
15249
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
15082
15250
|
action,
|
|
@@ -15182,7 +15350,9 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
15182
15350
|
["GRIDVIEW_VIEWACTION", "View"],
|
|
15183
15351
|
["GRIDVIEW_SAVEROWACTION", "SaveRow"],
|
|
15184
15352
|
["APP_LOGIN", "Login"],
|
|
15185
|
-
["APP_LOGOUT", "logout"]
|
|
15353
|
+
["APP_LOGOUT", "logout"],
|
|
15354
|
+
["UTIL_RESET", "Reset"],
|
|
15355
|
+
["UTIL_SEARCH", "Search"]
|
|
15186
15356
|
]);
|
|
15187
15357
|
}
|
|
15188
15358
|
async execAction(action, args) {
|
|
@@ -15197,7 +15367,12 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
15197
15367
|
};
|
|
15198
15368
|
|
|
15199
15369
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
15200
|
-
import {
|
|
15370
|
+
import {
|
|
15371
|
+
StringUtil,
|
|
15372
|
+
RuntimeModelError as RuntimeModelError48,
|
|
15373
|
+
ModelError as ModelError25,
|
|
15374
|
+
RuntimeError as RuntimeError42
|
|
15375
|
+
} from "@ibiz-template/core";
|
|
15201
15376
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
15202
15377
|
async execAction(action, args) {
|
|
15203
15378
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -15212,7 +15387,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15212
15387
|
case "WIZARD": {
|
|
15213
15388
|
const frontPSAppView = action.frontAppViewId;
|
|
15214
15389
|
if (!frontPSAppView) {
|
|
15215
|
-
throw new
|
|
15390
|
+
throw new RuntimeModelError48(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
15216
15391
|
}
|
|
15217
15392
|
const { resultContext, resultParams } = await this.handleParams(
|
|
15218
15393
|
action,
|
|
@@ -15237,6 +15412,15 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15237
15412
|
}
|
|
15238
15413
|
break;
|
|
15239
15414
|
}
|
|
15415
|
+
case "PRINT":
|
|
15416
|
+
await this.executePrint(action, args);
|
|
15417
|
+
break;
|
|
15418
|
+
case "DATAIMP":
|
|
15419
|
+
actionResult = await this.executeDataImport(action, args);
|
|
15420
|
+
break;
|
|
15421
|
+
case "DATAEXP":
|
|
15422
|
+
await this.executeDataExport(action, args);
|
|
15423
|
+
break;
|
|
15240
15424
|
case "OTHER":
|
|
15241
15425
|
actionResult = this.doOther(action, args);
|
|
15242
15426
|
break;
|
|
@@ -15268,7 +15452,129 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15268
15452
|
);
|
|
15269
15453
|
return result || {};
|
|
15270
15454
|
}
|
|
15271
|
-
throw new
|
|
15455
|
+
throw new RuntimeModelError48(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
15456
|
+
}
|
|
15457
|
+
/**
|
|
15458
|
+
* 执行打印行为
|
|
15459
|
+
* @protected
|
|
15460
|
+
* @param {IAppDEUIAction} action
|
|
15461
|
+
* @param {IUILogicParams} args
|
|
15462
|
+
* @return {*}
|
|
15463
|
+
*/
|
|
15464
|
+
async executePrint(action, args) {
|
|
15465
|
+
var _a, _b;
|
|
15466
|
+
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
15467
|
+
action.appDataEntityId
|
|
15468
|
+
);
|
|
15469
|
+
const appDEPrint = (_a = appDataEntity.appDEPrints) == null ? void 0 : _a.find((print) => {
|
|
15470
|
+
return print.id === action.appDEPrintId;
|
|
15471
|
+
});
|
|
15472
|
+
if (appDEPrint) {
|
|
15473
|
+
let requestUrl = "";
|
|
15474
|
+
const { context } = args;
|
|
15475
|
+
if (context && context[appDataEntity.codeName.toLowerCase()]) {
|
|
15476
|
+
requestUrl += "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/printdata/").concat(context[appDataEntity.codeName.toLowerCase()], "?srfprinttag=").concat(appDEPrint.codeName);
|
|
15477
|
+
} else {
|
|
15478
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
|
|
15479
|
+
}
|
|
15480
|
+
const res = await ibiz.net.request(requestUrl, {
|
|
15481
|
+
method: "get",
|
|
15482
|
+
responseType: "blob"
|
|
15483
|
+
});
|
|
15484
|
+
if (res.ok) {
|
|
15485
|
+
const link = window.URL.createObjectURL(res.data);
|
|
15486
|
+
window.open(link, "_blank");
|
|
15487
|
+
} else {
|
|
15488
|
+
throw new RuntimeError42("\u6253\u5370\u5931\u8D25");
|
|
15489
|
+
}
|
|
15490
|
+
} else {
|
|
15491
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
|
|
15492
|
+
}
|
|
15493
|
+
}
|
|
15494
|
+
/**
|
|
15495
|
+
* 执行导入行为
|
|
15496
|
+
* @protected
|
|
15497
|
+
* @param {IAppDEUIAction} action
|
|
15498
|
+
* @param {IUILogicParams} args
|
|
15499
|
+
* @return {*}
|
|
15500
|
+
*/
|
|
15501
|
+
async executeDataImport(action, _args) {
|
|
15502
|
+
var _a;
|
|
15503
|
+
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
15504
|
+
action.appDataEntityId
|
|
15505
|
+
);
|
|
15506
|
+
const appDEDataImport = (_a = appDataEntity.appDEDataImports) == null ? void 0 : _a.find(
|
|
15507
|
+
(dataImport) => dataImport.id === action.appDEDataImportId
|
|
15508
|
+
);
|
|
15509
|
+
if (appDEDataImport) {
|
|
15510
|
+
const modal = ibiz.overlay.createModal(
|
|
15511
|
+
"DataImport",
|
|
15512
|
+
{
|
|
15513
|
+
dismiss: () => modal.dismiss(),
|
|
15514
|
+
appDataEntity,
|
|
15515
|
+
dataImport: appDEDataImport
|
|
15516
|
+
},
|
|
15517
|
+
{
|
|
15518
|
+
width: "auto",
|
|
15519
|
+
placement: "center"
|
|
15520
|
+
}
|
|
15521
|
+
);
|
|
15522
|
+
modal.present();
|
|
15523
|
+
await modal.onWillDismiss();
|
|
15524
|
+
return {
|
|
15525
|
+
refresh: true,
|
|
15526
|
+
refreshMode: 1
|
|
15527
|
+
};
|
|
15528
|
+
}
|
|
15529
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
|
|
15530
|
+
}
|
|
15531
|
+
/**
|
|
15532
|
+
* 执行导出行为
|
|
15533
|
+
* @protected
|
|
15534
|
+
* @param {IAppDEUIAction} action
|
|
15535
|
+
* @param {IUILogicParams} args
|
|
15536
|
+
* @return {*}
|
|
15537
|
+
*/
|
|
15538
|
+
async executeDataExport(action, _args) {
|
|
15539
|
+
var _a, _b;
|
|
15540
|
+
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
15541
|
+
action.appDataEntityId
|
|
15542
|
+
);
|
|
15543
|
+
const appDEDataExport = (_a = appDataEntity.appDEDataExports) == null ? void 0 : _a.find((dataExport) => {
|
|
15544
|
+
return dataExport.id === action.appDEDataExportId;
|
|
15545
|
+
});
|
|
15546
|
+
if (appDEDataExport) {
|
|
15547
|
+
const url = "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/exportdata/fetchdefault?srfexporttag=").concat(appDEDataExport.codeName);
|
|
15548
|
+
const params = {
|
|
15549
|
+
page: 0,
|
|
15550
|
+
size: appDEDataExport.maxRowCount ? appDEDataExport.maxRowCount : 1e3,
|
|
15551
|
+
responseType: "blob"
|
|
15552
|
+
};
|
|
15553
|
+
const res = await ibiz.net.request(url, {
|
|
15554
|
+
method: "post",
|
|
15555
|
+
data: params,
|
|
15556
|
+
responseType: "blob"
|
|
15557
|
+
});
|
|
15558
|
+
if (res.status === 200) {
|
|
15559
|
+
let fileName = "".concat(appDataEntity.logicName, "\u8868.xlsx");
|
|
15560
|
+
fileName = decodeURIComponent(fileName);
|
|
15561
|
+
const blob = new Blob([res.data], {
|
|
15562
|
+
type: "application/vnd.ms-excel"
|
|
15563
|
+
});
|
|
15564
|
+
const elink = document.createElement("a");
|
|
15565
|
+
elink.download = fileName;
|
|
15566
|
+
elink.style.display = "none";
|
|
15567
|
+
elink.href = URL.createObjectURL(blob);
|
|
15568
|
+
document.body.appendChild(elink);
|
|
15569
|
+
elink.click();
|
|
15570
|
+
URL.revokeObjectURL(elink.href);
|
|
15571
|
+
document.body.removeChild(elink);
|
|
15572
|
+
} else {
|
|
15573
|
+
throw new RuntimeError42("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
|
|
15574
|
+
}
|
|
15575
|
+
} else {
|
|
15576
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
|
|
15577
|
+
}
|
|
15272
15578
|
}
|
|
15273
15579
|
};
|
|
15274
15580
|
|
|
@@ -15335,7 +15641,7 @@ var ToolbarController = class extends ControlController {
|
|
|
15335
15641
|
const actionId = item.uiactionId;
|
|
15336
15642
|
const uiAction = await getUIActionById(actionId);
|
|
15337
15643
|
if (!uiAction) {
|
|
15338
|
-
throw new
|
|
15644
|
+
throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
15339
15645
|
}
|
|
15340
15646
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
15341
15647
|
if (enableLoading) {
|
|
@@ -15898,7 +16204,7 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
15898
16204
|
};
|
|
15899
16205
|
|
|
15900
16206
|
// src/controller/control/data-view/data-view.controller.ts
|
|
15901
|
-
import { RuntimeModelError as
|
|
16207
|
+
import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
15902
16208
|
import { isNil as isNil21 } from "ramda";
|
|
15903
16209
|
|
|
15904
16210
|
// src/controller/control/data-view/data-view.service.ts
|
|
@@ -16113,7 +16419,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
16113
16419
|
const optItemModel = this.getOptItemModel();
|
|
16114
16420
|
if (optItemModel) {
|
|
16115
16421
|
if (!optItemModel.deuiactionGroup) {
|
|
16116
|
-
throw new
|
|
16422
|
+
throw new RuntimeModelError49(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
16117
16423
|
}
|
|
16118
16424
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
16119
16425
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -16162,7 +16468,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
16162
16468
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
16163
16469
|
if (enableGroup && groupMode) {
|
|
16164
16470
|
if (!groupAppDEFieldId) {
|
|
16165
|
-
throw new
|
|
16471
|
+
throw new RuntimeModelError49(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
16166
16472
|
}
|
|
16167
16473
|
if (groupMode === "AUTO") {
|
|
16168
16474
|
this.handleAutoGroup();
|
|
@@ -16229,7 +16535,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
16229
16535
|
async handleCodeListGroup() {
|
|
16230
16536
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
16231
16537
|
if (!groupCodeListId) {
|
|
16232
|
-
throw new
|
|
16538
|
+
throw new RuntimeModelError49(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
16233
16539
|
}
|
|
16234
16540
|
const { items } = this.state;
|
|
16235
16541
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -16336,7 +16642,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
16336
16642
|
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
16337
16643
|
}
|
|
16338
16644
|
if (!item.appDEFieldId) {
|
|
16339
|
-
throw new
|
|
16645
|
+
throw new RuntimeModelError49(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
|
|
16340
16646
|
}
|
|
16341
16647
|
const tempItem = {
|
|
16342
16648
|
caption,
|
|
@@ -16354,10 +16660,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
16354
16660
|
};
|
|
16355
16661
|
|
|
16356
16662
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
16357
|
-
import { RuntimeModelError as
|
|
16663
|
+
import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
16358
16664
|
|
|
16359
16665
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
16360
|
-
import { RuntimeError as
|
|
16666
|
+
import { RuntimeError as RuntimeError44, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
16361
16667
|
var ExpBarControlController = class extends ControlController {
|
|
16362
16668
|
constructor() {
|
|
16363
16669
|
super(...arguments);
|
|
@@ -16412,7 +16718,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
16412
16718
|
get xDataController() {
|
|
16413
16719
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
16414
16720
|
if (!controller) {
|
|
16415
|
-
throw new
|
|
16721
|
+
throw new RuntimeModelError50(
|
|
16416
16722
|
this.model,
|
|
16417
16723
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
16418
16724
|
);
|
|
@@ -16683,7 +16989,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
16683
16989
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
16684
16990
|
return this.XDataModel.navAppViewId;
|
|
16685
16991
|
}
|
|
16686
|
-
throw new
|
|
16992
|
+
throw new RuntimeError44("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
16687
16993
|
}
|
|
16688
16994
|
/**
|
|
16689
16995
|
* 获取导航视图
|
|
@@ -16771,7 +17077,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
16771
17077
|
get xDataController() {
|
|
16772
17078
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
16773
17079
|
if (!controller) {
|
|
16774
|
-
throw new
|
|
17080
|
+
throw new RuntimeModelError51(
|
|
16775
17081
|
this.model,
|
|
16776
17082
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
16777
17083
|
);
|
|
@@ -16826,7 +17132,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
16826
17132
|
};
|
|
16827
17133
|
|
|
16828
17134
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
16829
|
-
import { RuntimeError as
|
|
17135
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
16830
17136
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
16831
17137
|
constructor() {
|
|
16832
17138
|
super(...arguments);
|
|
@@ -16849,7 +17155,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
16849
17155
|
get xDataController() {
|
|
16850
17156
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
16851
17157
|
if (!controller) {
|
|
16852
|
-
throw new
|
|
17158
|
+
throw new RuntimeModelError52(
|
|
16853
17159
|
this.model,
|
|
16854
17160
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
16855
17161
|
);
|
|
@@ -16901,7 +17207,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
16901
17207
|
const deData = node.deData || node;
|
|
16902
17208
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
16903
17209
|
if (!nodeModel) {
|
|
16904
|
-
throw new
|
|
17210
|
+
throw new RuntimeError45("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
16905
17211
|
}
|
|
16906
17212
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
16907
17213
|
result.context.currentSrfNav = nodeId;
|
|
@@ -16971,6 +17277,78 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
16971
17277
|
|
|
16972
17278
|
// src/controller/control/exp-bar/chart-exp-bar.controller.ts
|
|
16973
17279
|
var ChartExpBarController = class extends ExpBarControlController {
|
|
17280
|
+
/**
|
|
17281
|
+
* 导航页面首次打开且没有回显时,
|
|
17282
|
+
* 默认取第一条数据进行导航
|
|
17283
|
+
* 对于不同的导航,第一条可导航的数据可能定义不同,可以重写改方法。
|
|
17284
|
+
* @author lxm
|
|
17285
|
+
* @date 2023-08-10 03:58:15
|
|
17286
|
+
* @protected
|
|
17287
|
+
*/
|
|
17288
|
+
navByFirstItem() {
|
|
17289
|
+
const data = this.xDataController.state.items[0];
|
|
17290
|
+
if (!data) {
|
|
17291
|
+
this.state.srfnav = "";
|
|
17292
|
+
this._evt.emit("onNavViewChange", {
|
|
17293
|
+
navViewMsg: {
|
|
17294
|
+
key: "",
|
|
17295
|
+
isCache: this.isCache
|
|
17296
|
+
}
|
|
17297
|
+
});
|
|
17298
|
+
return;
|
|
17299
|
+
}
|
|
17300
|
+
const activeSeriesGenerator = this.xDataController.generator.seriesGenerators.find((generator) => {
|
|
17301
|
+
return generator.chartDataArr.length > 0 && generator.model.navAppViewId;
|
|
17302
|
+
});
|
|
17303
|
+
if (activeSeriesGenerator) {
|
|
17304
|
+
this.xDataController.setActive(activeSeriesGenerator.chartDataArr[0]);
|
|
17305
|
+
}
|
|
17306
|
+
}
|
|
17307
|
+
/**
|
|
17308
|
+
* 解析参数
|
|
17309
|
+
*
|
|
17310
|
+
* @author zk
|
|
17311
|
+
* @date 2023-05-29 04:05:52
|
|
17312
|
+
* @param {IDETabViewPanel} tabViewPanel
|
|
17313
|
+
* @return {*}
|
|
17314
|
+
* @memberof ExpBarControlController
|
|
17315
|
+
*/
|
|
17316
|
+
prepareParams(XDataModel, data, context, params) {
|
|
17317
|
+
var _a;
|
|
17318
|
+
const { context: tempContext, params: tempParams } = super.prepareParams(
|
|
17319
|
+
XDataModel,
|
|
17320
|
+
data,
|
|
17321
|
+
context,
|
|
17322
|
+
params
|
|
17323
|
+
);
|
|
17324
|
+
if (data._seriesModelId) {
|
|
17325
|
+
const seriesModel = (_a = XDataModel.dechartSerieses) == null ? void 0 : _a.find(
|
|
17326
|
+
(series) => {
|
|
17327
|
+
return series.id === data._seriesModelId;
|
|
17328
|
+
}
|
|
17329
|
+
);
|
|
17330
|
+
if (seriesModel) {
|
|
17331
|
+
const { navigateContexts, navigateParams } = seriesModel;
|
|
17332
|
+
const tempContext2 = convertNavData(
|
|
17333
|
+
navigateContexts,
|
|
17334
|
+
data,
|
|
17335
|
+
params,
|
|
17336
|
+
tempContext
|
|
17337
|
+
);
|
|
17338
|
+
const tempParams2 = convertNavData(
|
|
17339
|
+
navigateParams,
|
|
17340
|
+
data,
|
|
17341
|
+
params,
|
|
17342
|
+
tempParams
|
|
17343
|
+
);
|
|
17344
|
+
return {
|
|
17345
|
+
context: Object.assign(tempContext.clone(), tempContext2),
|
|
17346
|
+
params: tempParams2
|
|
17347
|
+
};
|
|
17348
|
+
}
|
|
17349
|
+
}
|
|
17350
|
+
return { context: tempContext, params: tempParams };
|
|
17351
|
+
}
|
|
16974
17352
|
/**
|
|
16975
17353
|
* 获取导航视图
|
|
16976
17354
|
*
|
|
@@ -16982,10 +17360,18 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
16982
17360
|
*/
|
|
16983
17361
|
getNavViewMsg(data, context, params) {
|
|
16984
17362
|
var _a;
|
|
16985
|
-
|
|
17363
|
+
let viewModelId;
|
|
17364
|
+
if (data._seriesModelId) {
|
|
17365
|
+
const seriesModel = (_a = this.XDataModel.dechartSerieses) == null ? void 0 : _a.find(
|
|
17366
|
+
(series) => {
|
|
17367
|
+
return series.id === data._seriesModelId;
|
|
17368
|
+
}
|
|
17369
|
+
);
|
|
17370
|
+
viewModelId = seriesModel == null ? void 0 : seriesModel.navAppViewId;
|
|
17371
|
+
}
|
|
16986
17372
|
const result = this.prepareParams(this.XDataModel, data, context, params);
|
|
16987
17373
|
return {
|
|
16988
|
-
key: data
|
|
17374
|
+
key: data._uuid,
|
|
16989
17375
|
context: result.context,
|
|
16990
17376
|
params: result.params,
|
|
16991
17377
|
viewId: viewModelId,
|
|
@@ -17295,6 +17681,7 @@ var SearchFormService = class extends ControlService {
|
|
|
17295
17681
|
var SearchFormController = class extends FormController {
|
|
17296
17682
|
async onCreated() {
|
|
17297
17683
|
await super.onCreated();
|
|
17684
|
+
this.preprocessLayoutPanel();
|
|
17298
17685
|
this.service = new SearchFormService(this.model);
|
|
17299
17686
|
await this.service.init(this.context);
|
|
17300
17687
|
await this.load();
|
|
@@ -17404,6 +17791,57 @@ var SearchFormController = class extends FormController {
|
|
|
17404
17791
|
await this.onSearchButtonClick();
|
|
17405
17792
|
}
|
|
17406
17793
|
}
|
|
17794
|
+
/**
|
|
17795
|
+
* 根据搜索表单的按钮位置和按钮样式
|
|
17796
|
+
* 预处理部件布局面板模型
|
|
17797
|
+
* @author lxm
|
|
17798
|
+
* @date 2023-11-21 04:17:43
|
|
17799
|
+
* @protected
|
|
17800
|
+
* @return {*}
|
|
17801
|
+
*/
|
|
17802
|
+
preprocessLayoutPanel() {
|
|
17803
|
+
if (!this.controlPanel) {
|
|
17804
|
+
return;
|
|
17805
|
+
}
|
|
17806
|
+
const { searchButtonStyle } = this.model;
|
|
17807
|
+
let deleteRight = false;
|
|
17808
|
+
let deleteBottom = false;
|
|
17809
|
+
const searchButtonPos = this.model.searchButtonPos || "RIGHT";
|
|
17810
|
+
deleteRight = searchButtonPos === "BOTTOM";
|
|
17811
|
+
deleteBottom = searchButtonPos !== "BOTTOM";
|
|
17812
|
+
if (searchButtonStyle === "NONE") {
|
|
17813
|
+
deleteRight = true;
|
|
17814
|
+
deleteBottom = true;
|
|
17815
|
+
}
|
|
17816
|
+
const recursivePanelItems = (parent) => {
|
|
17817
|
+
let children;
|
|
17818
|
+
let childrenKey = "";
|
|
17819
|
+
["rootPanelItems", "panelItems"].find((key) => {
|
|
17820
|
+
if (parent[key]) {
|
|
17821
|
+
children = parent[key];
|
|
17822
|
+
childrenKey = key;
|
|
17823
|
+
return true;
|
|
17824
|
+
}
|
|
17825
|
+
return false;
|
|
17826
|
+
});
|
|
17827
|
+
if (children && children.length > 0) {
|
|
17828
|
+
const newArr = [];
|
|
17829
|
+
children.forEach((item) => {
|
|
17830
|
+
const isDelete = deleteRight && item.id === "control_buttons_right" || deleteBottom && item.id === "control_buttons_bottom";
|
|
17831
|
+
if (!isDelete) {
|
|
17832
|
+
newArr.push(item);
|
|
17833
|
+
recursivePanelItems(item);
|
|
17834
|
+
}
|
|
17835
|
+
});
|
|
17836
|
+
if (newArr.length < children.length) {
|
|
17837
|
+
parent[childrenKey] = newArr;
|
|
17838
|
+
}
|
|
17839
|
+
}
|
|
17840
|
+
};
|
|
17841
|
+
if (deleteBottom || deleteRight) {
|
|
17842
|
+
recursivePanelItems(this.controlPanel);
|
|
17843
|
+
}
|
|
17844
|
+
}
|
|
17407
17845
|
};
|
|
17408
17846
|
|
|
17409
17847
|
// src/controller/control/form/form-detail/form-detail/form-detail.state.ts
|
|
@@ -17853,7 +18291,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
17853
18291
|
|
|
17854
18292
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
17855
18293
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
17856
|
-
import { createUUID as
|
|
18294
|
+
import { createUUID as createUUID8, notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
17857
18295
|
|
|
17858
18296
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
17859
18297
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -17966,7 +18404,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
17966
18404
|
this.form.context
|
|
17967
18405
|
);
|
|
17968
18406
|
if (!this.state.viewComponentKey) {
|
|
17969
|
-
this.state.viewComponentKey =
|
|
18407
|
+
this.state.viewComponentKey = createUUID8();
|
|
17970
18408
|
this.navContext = newContext;
|
|
17971
18409
|
this.navParams = newParams;
|
|
17972
18410
|
} else if (JSON.stringify(this.navContext) !== JSON.stringify(newContext) || JSON.stringify(this.navParams) !== JSON.stringify(newParams)) {
|
|
@@ -18582,10 +19020,10 @@ var FormMDCtrlContentTypeController = class {
|
|
|
18582
19020
|
};
|
|
18583
19021
|
|
|
18584
19022
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts
|
|
18585
|
-
import { clone as
|
|
19023
|
+
import { clone as clone20 } from "ramda";
|
|
18586
19024
|
|
|
18587
19025
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
18588
|
-
import { RuntimeError as
|
|
19026
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
18589
19027
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
18590
19028
|
/**
|
|
18591
19029
|
* 初始化
|
|
@@ -18600,7 +19038,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
18600
19038
|
const { model } = this.parent;
|
|
18601
19039
|
const { contentControl } = model;
|
|
18602
19040
|
if (!contentControl) {
|
|
18603
|
-
throw new
|
|
19041
|
+
throw new RuntimeError46("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
18604
19042
|
}
|
|
18605
19043
|
this.controlModel = contentControl;
|
|
18606
19044
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -18718,17 +19156,17 @@ import { isArray as isArray10 } from "lodash-es";
|
|
|
18718
19156
|
import {
|
|
18719
19157
|
awaitTimeout,
|
|
18720
19158
|
mergeInLeft,
|
|
18721
|
-
RuntimeError as
|
|
19159
|
+
RuntimeError as RuntimeError47,
|
|
18722
19160
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
18723
19161
|
} from "@ibiz-template/core";
|
|
18724
19162
|
import { debounce as debounce2 } from "lodash-es";
|
|
18725
|
-
import { createUUID as
|
|
18726
|
-
import { clone as
|
|
19163
|
+
import { createUUID as createUUID9 } from "qx-util";
|
|
19164
|
+
import { clone as clone19 } from "ramda";
|
|
18727
19165
|
|
|
18728
19166
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
18729
19167
|
import {
|
|
18730
19168
|
recursiveIterate as recursiveIterate4,
|
|
18731
|
-
RuntimeModelError as
|
|
19169
|
+
RuntimeModelError as RuntimeModelError53
|
|
18732
19170
|
} from "@ibiz-template/core";
|
|
18733
19171
|
var EditFormService = class extends ControlService {
|
|
18734
19172
|
/**
|
|
@@ -18846,7 +19284,7 @@ var EditFormService = class extends ControlService {
|
|
|
18846
19284
|
const wizardForm = this.model;
|
|
18847
19285
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
18848
19286
|
if (!methodName) {
|
|
18849
|
-
throw new
|
|
19287
|
+
throw new RuntimeModelError53(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
18850
19288
|
}
|
|
18851
19289
|
let res = await this.exec(
|
|
18852
19290
|
methodName,
|
|
@@ -19070,8 +19508,8 @@ var EditFormController = class extends FormController {
|
|
|
19070
19508
|
* @return {*} {Promise<IData>}
|
|
19071
19509
|
*/
|
|
19072
19510
|
async copy() {
|
|
19073
|
-
const context =
|
|
19074
|
-
const queryParams =
|
|
19511
|
+
const context = clone19(this.context);
|
|
19512
|
+
const queryParams = clone19(this.params);
|
|
19075
19513
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
19076
19514
|
this.model.appDataEntityId
|
|
19077
19515
|
);
|
|
@@ -19099,7 +19537,7 @@ var EditFormController = class extends FormController {
|
|
|
19099
19537
|
await this.endLoading();
|
|
19100
19538
|
}
|
|
19101
19539
|
res.data.srfkey = void 0;
|
|
19102
|
-
res.data.tempsrfkey =
|
|
19540
|
+
res.data.tempsrfkey = createUUID9();
|
|
19103
19541
|
this.state.modified = false;
|
|
19104
19542
|
this.state.data = res.data;
|
|
19105
19543
|
this.formStateNotify("LOAD" /* LOAD */);
|
|
@@ -19127,7 +19565,7 @@ var EditFormController = class extends FormController {
|
|
|
19127
19565
|
return this.loadDraft();
|
|
19128
19566
|
}
|
|
19129
19567
|
const { context, params } = this.handlerAbilityParams(args);
|
|
19130
|
-
const queryParams =
|
|
19568
|
+
const queryParams = clone19(params);
|
|
19131
19569
|
let res;
|
|
19132
19570
|
try {
|
|
19133
19571
|
await this.startLoading();
|
|
@@ -19164,7 +19602,7 @@ var EditFormController = class extends FormController {
|
|
|
19164
19602
|
}
|
|
19165
19603
|
const isValid = await this.validate();
|
|
19166
19604
|
if (!isValid) {
|
|
19167
|
-
throw new
|
|
19605
|
+
throw new RuntimeError47("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
19168
19606
|
}
|
|
19169
19607
|
if (!silent) {
|
|
19170
19608
|
await this.startLoading();
|
|
@@ -19290,7 +19728,7 @@ var EditFormController = class extends FormController {
|
|
|
19290
19728
|
(item) => item.id === formItemUpdateId
|
|
19291
19729
|
);
|
|
19292
19730
|
if (!formItemUpdate) {
|
|
19293
|
-
throw new
|
|
19731
|
+
throw new RuntimeError47("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
19294
19732
|
}
|
|
19295
19733
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
19296
19734
|
const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
|
|
@@ -19334,7 +19772,7 @@ var EditFormController = class extends FormController {
|
|
|
19334
19772
|
async wfStart(args) {
|
|
19335
19773
|
const isValid = await this.validate();
|
|
19336
19774
|
if (!isValid) {
|
|
19337
|
-
throw new
|
|
19775
|
+
throw new RuntimeError47("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
19338
19776
|
}
|
|
19339
19777
|
await this.startLoading();
|
|
19340
19778
|
const { context, params } = this.handlerAbilityParams(args);
|
|
@@ -19365,7 +19803,7 @@ var EditFormController = class extends FormController {
|
|
|
19365
19803
|
async wfSubmit(args) {
|
|
19366
19804
|
const isValid = await this.validate();
|
|
19367
19805
|
if (!isValid) {
|
|
19368
|
-
throw new
|
|
19806
|
+
throw new RuntimeError47("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
19369
19807
|
}
|
|
19370
19808
|
await this.startLoading();
|
|
19371
19809
|
const { context, params } = this.handlerAbilityParams(args);
|
|
@@ -19597,7 +20035,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
19597
20035
|
};
|
|
19598
20036
|
|
|
19599
20037
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
19600
|
-
import { RuntimeError as
|
|
20038
|
+
import { RuntimeError as RuntimeError48, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
19601
20039
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
19602
20040
|
constructor() {
|
|
19603
20041
|
super(...arguments);
|
|
@@ -19709,7 +20147,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
19709
20147
|
const { model } = this.parent;
|
|
19710
20148
|
const { contentControl } = model;
|
|
19711
20149
|
if (!contentControl) {
|
|
19712
|
-
throw new
|
|
20150
|
+
throw new RuntimeError48("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
19713
20151
|
}
|
|
19714
20152
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
19715
20153
|
this.controlModel = contentControl;
|
|
@@ -20132,7 +20570,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
20132
20570
|
setFormDataValue() {
|
|
20133
20571
|
const name = this.model.appDEFieldId || this.model.fieldName || this.model.id;
|
|
20134
20572
|
if (name) {
|
|
20135
|
-
this.form.setDataValue(name,
|
|
20573
|
+
this.form.setDataValue(name, clone20(this.state.contentCtrlData));
|
|
20136
20574
|
}
|
|
20137
20575
|
}
|
|
20138
20576
|
/**
|
|
@@ -20200,10 +20638,10 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
20200
20638
|
};
|
|
20201
20639
|
|
|
20202
20640
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-item.controller.ts
|
|
20203
|
-
import { clone as
|
|
20641
|
+
import { clone as clone21 } from "ramda";
|
|
20204
20642
|
var FormMDCtrlItemController = class extends EditFormController {
|
|
20205
20643
|
constructor(model, context, params, ctx, data, form) {
|
|
20206
|
-
const tempModel =
|
|
20644
|
+
const tempModel = clone21(form.model);
|
|
20207
20645
|
Object.assign(tempModel, model, { name: void 0 });
|
|
20208
20646
|
super(tempModel, context, params, ctx);
|
|
20209
20647
|
this.state.data = data;
|
|
@@ -20503,10 +20941,10 @@ import {
|
|
|
20503
20941
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
20504
20942
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
20505
20943
|
recursiveIterate as recursiveIterate5,
|
|
20506
|
-
RuntimeError as
|
|
20507
|
-
RuntimeModelError as
|
|
20944
|
+
RuntimeError as RuntimeError49,
|
|
20945
|
+
RuntimeModelError as RuntimeModelError54
|
|
20508
20946
|
} from "@ibiz-template/core";
|
|
20509
|
-
import { clone as
|
|
20947
|
+
import { clone as clone22 } from "ramda";
|
|
20510
20948
|
|
|
20511
20949
|
// src/controller/control/grid/grid/grid.service.ts
|
|
20512
20950
|
var GridService = class extends MDControlService {
|
|
@@ -20710,11 +21148,11 @@ var GridController = class extends MDControlController {
|
|
|
20710
21148
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
20711
21149
|
);
|
|
20712
21150
|
if (!this.groupFieldColumn) {
|
|
20713
|
-
throw new
|
|
21151
|
+
throw new RuntimeModelError54(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
20714
21152
|
}
|
|
20715
21153
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
20716
21154
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
20717
|
-
throw new
|
|
21155
|
+
throw new RuntimeModelError54(
|
|
20718
21156
|
this.groupFieldColumn.model,
|
|
20719
21157
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
20720
21158
|
);
|
|
@@ -20724,7 +21162,7 @@ var GridController = class extends MDControlController {
|
|
|
20724
21162
|
);
|
|
20725
21163
|
if (index !== -1 && index !== 0) {
|
|
20726
21164
|
if (this.isMultistageHeader) {
|
|
20727
|
-
throw new
|
|
21165
|
+
throw new RuntimeModelError54(
|
|
20728
21166
|
this.model,
|
|
20729
21167
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
20730
21168
|
);
|
|
@@ -20734,10 +21172,10 @@ var GridController = class extends MDControlController {
|
|
|
20734
21172
|
}
|
|
20735
21173
|
if (groupMode === "CODELIST") {
|
|
20736
21174
|
if (!groupCodeListId) {
|
|
20737
|
-
throw new
|
|
21175
|
+
throw new RuntimeModelError54(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
20738
21176
|
}
|
|
20739
21177
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
20740
|
-
throw new
|
|
21178
|
+
throw new RuntimeModelError54(
|
|
20741
21179
|
this.model,
|
|
20742
21180
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
20743
21181
|
);
|
|
@@ -20819,7 +21257,7 @@ var GridController = class extends MDControlController {
|
|
|
20819
21257
|
return;
|
|
20820
21258
|
}
|
|
20821
21259
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
20822
|
-
throw new
|
|
21260
|
+
throw new RuntimeModelError54(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
20823
21261
|
}
|
|
20824
21262
|
const params = await this.getFetchParams();
|
|
20825
21263
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -20887,7 +21325,7 @@ var GridController = class extends MDControlController {
|
|
|
20887
21325
|
if (editShowMode === "row") {
|
|
20888
21326
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
20889
21327
|
if (editingRow) {
|
|
20890
|
-
throw new
|
|
21328
|
+
throw new RuntimeError49("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
20891
21329
|
}
|
|
20892
21330
|
}
|
|
20893
21331
|
const queryParams = { ...this.params };
|
|
@@ -20928,7 +21366,7 @@ var GridController = class extends MDControlController {
|
|
|
20928
21366
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
20929
21367
|
const rowState = this.findRowState(data);
|
|
20930
21368
|
if (!rowState) {
|
|
20931
|
-
throw new
|
|
21369
|
+
throw new RuntimeError49("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
20932
21370
|
}
|
|
20933
21371
|
if (!rowState.modified) {
|
|
20934
21372
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -20940,7 +21378,7 @@ var GridController = class extends MDControlController {
|
|
|
20940
21378
|
}
|
|
20941
21379
|
const isValid = await this.validate(rowState);
|
|
20942
21380
|
if (!isValid) {
|
|
20943
|
-
throw new
|
|
21381
|
+
throw new RuntimeError49("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
20944
21382
|
}
|
|
20945
21383
|
let res;
|
|
20946
21384
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
@@ -21137,7 +21575,7 @@ var GridController = class extends MDControlController {
|
|
|
21137
21575
|
}
|
|
21138
21576
|
async toggleRowEdit() {
|
|
21139
21577
|
if (!this.model.enableRowNew) {
|
|
21140
|
-
throw new
|
|
21578
|
+
throw new RuntimeError49("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
21141
21579
|
}
|
|
21142
21580
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
21143
21581
|
}
|
|
@@ -21170,10 +21608,10 @@ var GridController = class extends MDControlController {
|
|
|
21170
21608
|
} else {
|
|
21171
21609
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
21172
21610
|
if (editingRow) {
|
|
21173
|
-
throw new
|
|
21611
|
+
throw new RuntimeError49("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
21174
21612
|
}
|
|
21175
21613
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
21176
|
-
row.cacheData =
|
|
21614
|
+
row.cacheData = clone22(row.data);
|
|
21177
21615
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
21178
21616
|
Object.assign(row.data, defaultVal);
|
|
21179
21617
|
}
|
|
@@ -21220,7 +21658,7 @@ var GridController = class extends MDControlController {
|
|
|
21220
21658
|
(item) => item.id === updateId
|
|
21221
21659
|
);
|
|
21222
21660
|
if (!findUpdate) {
|
|
21223
|
-
throw new
|
|
21661
|
+
throw new RuntimeError49("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
21224
21662
|
}
|
|
21225
21663
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
21226
21664
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -21274,6 +21712,30 @@ var GridController = class extends MDControlController {
|
|
|
21274
21712
|
}
|
|
21275
21713
|
return res.data;
|
|
21276
21714
|
}
|
|
21715
|
+
/**
|
|
21716
|
+
* 初始化数据导出列
|
|
21717
|
+
* @return {*}
|
|
21718
|
+
* @author: zhujiamin
|
|
21719
|
+
* @Date: 2023-11-21 18:54:16
|
|
21720
|
+
*/
|
|
21721
|
+
async findAllExportColumns(dataExport) {
|
|
21722
|
+
var _a;
|
|
21723
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
21724
|
+
const exportColumnsPromises = (_a = dataExport.dedataExportItems) == null ? void 0 : _a.map(async (item) => {
|
|
21725
|
+
const tempExportColumn = { ...item };
|
|
21726
|
+
if (item.codeListId) {
|
|
21727
|
+
tempExportColumn.codeList = app.codeList.getCodeList(item.codeListId);
|
|
21728
|
+
tempExportColumn.codeListItems = await app.codeList.get(
|
|
21729
|
+
item.codeListId
|
|
21730
|
+
);
|
|
21731
|
+
}
|
|
21732
|
+
return tempExportColumn;
|
|
21733
|
+
});
|
|
21734
|
+
if (exportColumnsPromises) {
|
|
21735
|
+
return Promise.all(exportColumnsPromises);
|
|
21736
|
+
}
|
|
21737
|
+
return void 0;
|
|
21738
|
+
}
|
|
21277
21739
|
/**
|
|
21278
21740
|
* 数据导出
|
|
21279
21741
|
*
|
|
@@ -21282,18 +21744,57 @@ var GridController = class extends MDControlController {
|
|
|
21282
21744
|
* @memberof MDControlController
|
|
21283
21745
|
*/
|
|
21284
21746
|
async exportData(_args) {
|
|
21285
|
-
|
|
21747
|
+
var _a;
|
|
21748
|
+
if (this.model.dedataExportId && !this.dataExport) {
|
|
21749
|
+
this.dataExport = (_a = this.dataEntity.appDEDataExports) == null ? void 0 : _a.find((dataExport) => {
|
|
21750
|
+
return dataExport.id === this.model.dedataExportId;
|
|
21751
|
+
});
|
|
21752
|
+
if (this.dataExport) {
|
|
21753
|
+
this.allExportColumns = await this.findAllExportColumns(
|
|
21754
|
+
this.dataExport
|
|
21755
|
+
);
|
|
21756
|
+
}
|
|
21757
|
+
}
|
|
21286
21758
|
const formatExcelData = (data2) => {
|
|
21287
|
-
|
|
21759
|
+
var _a2;
|
|
21760
|
+
const codeListMap = /* @__PURE__ */ new Map();
|
|
21761
|
+
if (this.allExportColumns && this.allExportColumns.length > 0) {
|
|
21762
|
+
(_a2 = this.allExportColumns) == null ? void 0 : _a2.forEach((exportColumn) => {
|
|
21763
|
+
if (exportColumn.codeListItems) {
|
|
21764
|
+
codeListMap.set(
|
|
21765
|
+
exportColumn.appDEFieldId,
|
|
21766
|
+
exportColumn.codeListItems
|
|
21767
|
+
);
|
|
21768
|
+
}
|
|
21769
|
+
});
|
|
21770
|
+
} else {
|
|
21771
|
+
Object.keys(this.fieldColumns).forEach((key) => {
|
|
21772
|
+
if (this.fieldColumns[key].codeList) {
|
|
21773
|
+
codeListMap.set(key, this.fieldColumns[key].codeListItems);
|
|
21774
|
+
}
|
|
21775
|
+
});
|
|
21776
|
+
}
|
|
21777
|
+
const cloneData = clone22(
|
|
21288
21778
|
data2.map((item) => {
|
|
21289
21779
|
return item.getOrigin();
|
|
21290
21780
|
})
|
|
21291
21781
|
);
|
|
21782
|
+
cloneData.forEach((item) => {
|
|
21783
|
+
const fields = Object.keys(item);
|
|
21784
|
+
fields.forEach((key) => {
|
|
21785
|
+
var _a3;
|
|
21786
|
+
if (codeListMap.get(key)) {
|
|
21787
|
+
item[key] = ((_a3 = codeListMap.get(key).find((_item) => {
|
|
21788
|
+
return _item.value === item[key];
|
|
21789
|
+
})) == null ? void 0 : _a3.text) || item[key];
|
|
21790
|
+
}
|
|
21791
|
+
});
|
|
21792
|
+
});
|
|
21292
21793
|
return cloneData;
|
|
21293
21794
|
};
|
|
21294
21795
|
const getExportData = async () => {
|
|
21295
|
-
var
|
|
21296
|
-
const type = (
|
|
21796
|
+
var _a2;
|
|
21797
|
+
const type = (_a2 = _args.params) == null ? void 0 : _a2.type;
|
|
21297
21798
|
let data2 = [];
|
|
21298
21799
|
if (type === "activatedPage") {
|
|
21299
21800
|
data2 = this.state.rows.map((row) => row.data);
|
|
@@ -21312,7 +21813,7 @@ var GridController = class extends MDControlController {
|
|
|
21312
21813
|
data2 = this.getData();
|
|
21313
21814
|
}
|
|
21314
21815
|
if (data2.length === 0) {
|
|
21315
|
-
throw new
|
|
21816
|
+
throw new RuntimeError49("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
21316
21817
|
}
|
|
21317
21818
|
return formatExcelData(data2);
|
|
21318
21819
|
};
|
|
@@ -21323,12 +21824,23 @@ var GridController = class extends MDControlController {
|
|
|
21323
21824
|
});
|
|
21324
21825
|
});
|
|
21325
21826
|
};
|
|
21326
|
-
|
|
21327
|
-
|
|
21328
|
-
)
|
|
21329
|
-
|
|
21330
|
-
|
|
21331
|
-
|
|
21827
|
+
let filterVal = [];
|
|
21828
|
+
let header = [];
|
|
21829
|
+
if (this.allExportColumns && this.allExportColumns.length > 0) {
|
|
21830
|
+
filterVal = this.allExportColumns.map(
|
|
21831
|
+
(column) => column.appDEFieldId
|
|
21832
|
+
);
|
|
21833
|
+
header = this.allExportColumns.map(
|
|
21834
|
+
(column) => column.caption
|
|
21835
|
+
);
|
|
21836
|
+
} else {
|
|
21837
|
+
filterVal = Object.keys(this.fieldColumns).map(
|
|
21838
|
+
(key) => this.fieldColumns[key].model.id
|
|
21839
|
+
);
|
|
21840
|
+
header = Object.keys(this.fieldColumns).map(
|
|
21841
|
+
(key) => this.fieldColumns[key].model.caption
|
|
21842
|
+
);
|
|
21843
|
+
}
|
|
21332
21844
|
const data = formatArrayData(filterVal, await getExportData());
|
|
21333
21845
|
await exportData(header, data, this.model.logicName);
|
|
21334
21846
|
}
|
|
@@ -21393,7 +21905,7 @@ var GridController = class extends MDControlController {
|
|
|
21393
21905
|
import { DataTypes as DataTypes3, ModelError as ModelError26, plus as plus2 } from "@ibiz-template/core";
|
|
21394
21906
|
import dayjs4 from "dayjs";
|
|
21395
21907
|
import { debounce as debounce3 } from "lodash-es";
|
|
21396
|
-
import { clone as
|
|
21908
|
+
import { clone as clone23, isNil as isNil22 } from "ramda";
|
|
21397
21909
|
var GridFieldColumnController = class extends GridColumnController {
|
|
21398
21910
|
constructor() {
|
|
21399
21911
|
super(...arguments);
|
|
@@ -21497,7 +22009,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
21497
22009
|
srfkey: value,
|
|
21498
22010
|
...wfContext
|
|
21499
22011
|
});
|
|
21500
|
-
const tempParams =
|
|
22012
|
+
const tempParams = clone23(this.params);
|
|
21501
22013
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
21502
22014
|
row.data,
|
|
21503
22015
|
tempContext,
|
|
@@ -21639,7 +22151,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
21639
22151
|
};
|
|
21640
22152
|
|
|
21641
22153
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
21642
|
-
import { RuntimeModelError as
|
|
22154
|
+
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
21643
22155
|
var GridUAColumnController = class extends GridColumnController {
|
|
21644
22156
|
/**
|
|
21645
22157
|
* 给rowController初始化操作列的状态
|
|
@@ -21652,7 +22164,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
21652
22164
|
var _a;
|
|
21653
22165
|
const { deuiactionGroup } = this.model;
|
|
21654
22166
|
if (!deuiactionGroup) {
|
|
21655
|
-
throw new
|
|
22167
|
+
throw new RuntimeModelError55(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
21656
22168
|
}
|
|
21657
22169
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
21658
22170
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -21693,7 +22205,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
21693
22205
|
};
|
|
21694
22206
|
|
|
21695
22207
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
21696
|
-
import { RuntimeError as
|
|
22208
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
21697
22209
|
import Schema2 from "async-validator";
|
|
21698
22210
|
import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
|
|
21699
22211
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -21830,7 +22342,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
21830
22342
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
21831
22343
|
const result = await this.validate(row);
|
|
21832
22344
|
if (!result) {
|
|
21833
|
-
throw new
|
|
22345
|
+
throw new RuntimeError50(
|
|
21834
22346
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
21835
22347
|
);
|
|
21836
22348
|
}
|
|
@@ -22188,10 +22700,10 @@ var ListController = class extends MDControlController {
|
|
|
22188
22700
|
};
|
|
22189
22701
|
|
|
22190
22702
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
22191
|
-
import { recursiveIterate as recursiveIterate6, RuntimeError as
|
|
22703
|
+
import { recursiveIterate as recursiveIterate6, RuntimeError as RuntimeError51 } from "@ibiz-template/core";
|
|
22192
22704
|
var PanelController = class extends ControlController {
|
|
22193
|
-
constructor() {
|
|
22194
|
-
super(
|
|
22705
|
+
constructor(model, context, params, ctx, container) {
|
|
22706
|
+
super(model, context, params, ctx);
|
|
22195
22707
|
/**
|
|
22196
22708
|
* 所有面板成员的控制器
|
|
22197
22709
|
*
|
|
@@ -22208,6 +22720,7 @@ var PanelController = class extends ControlController {
|
|
|
22208
22720
|
* @type {{ [key: string]: IPanelItemProvider | IControlProvider}}
|
|
22209
22721
|
*/
|
|
22210
22722
|
this.providers = {};
|
|
22723
|
+
this.container = container;
|
|
22211
22724
|
}
|
|
22212
22725
|
get _evt() {
|
|
22213
22726
|
return this.evt;
|
|
@@ -22311,7 +22824,7 @@ var PanelController = class extends ControlController {
|
|
|
22311
22824
|
var _a, _b;
|
|
22312
22825
|
const data = await this.prepareData();
|
|
22313
22826
|
if (!data) {
|
|
22314
|
-
throw new
|
|
22827
|
+
throw new RuntimeError51("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
22315
22828
|
}
|
|
22316
22829
|
const panelData = this.convertData(data);
|
|
22317
22830
|
(_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
|
|
@@ -22910,7 +23423,7 @@ import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
|
|
|
22910
23423
|
import { isNil as isNil23 } from "ramda";
|
|
22911
23424
|
|
|
22912
23425
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
22913
|
-
import { RuntimeModelError as
|
|
23426
|
+
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
22914
23427
|
var SearchBarFilterController = class {
|
|
22915
23428
|
constructor(model, searchBar) {
|
|
22916
23429
|
this.model = model;
|
|
@@ -22938,7 +23451,7 @@ var SearchBarFilterController = class {
|
|
|
22938
23451
|
*/
|
|
22939
23452
|
async init() {
|
|
22940
23453
|
if (!this.model.editor) {
|
|
22941
|
-
throw new
|
|
23454
|
+
throw new RuntimeModelError56(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
|
|
22942
23455
|
}
|
|
22943
23456
|
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
22944
23457
|
if (this.editorProvider) {
|
|
@@ -23968,7 +24481,7 @@ var TreeController = class extends MDControlController {
|
|
|
23968
24481
|
};
|
|
23969
24482
|
|
|
23970
24483
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
23971
|
-
import { RuntimeError as
|
|
24484
|
+
import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
23972
24485
|
|
|
23973
24486
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
23974
24487
|
var WizardPanelService = class extends ControlService {
|
|
@@ -24127,7 +24640,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24127
24640
|
const { activeFormTag } = this.state;
|
|
24128
24641
|
const controller = this.formControllers.get(activeFormTag);
|
|
24129
24642
|
if (!controller) {
|
|
24130
|
-
throw new
|
|
24643
|
+
throw new RuntimeError52("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
24131
24644
|
}
|
|
24132
24645
|
return controller;
|
|
24133
24646
|
}
|
|
@@ -24167,7 +24680,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24167
24680
|
getWizardFormByTag(tag) {
|
|
24168
24681
|
var _a;
|
|
24169
24682
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
24170
|
-
throw new
|
|
24683
|
+
throw new RuntimeError52("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
|
|
24171
24684
|
return;
|
|
24172
24685
|
}
|
|
24173
24686
|
const wizardForm = this.model.dewizard.dewizardForms.find(
|
|
@@ -24176,7 +24689,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24176
24689
|
}
|
|
24177
24690
|
);
|
|
24178
24691
|
if (!wizardForm) {
|
|
24179
|
-
throw new
|
|
24692
|
+
throw new RuntimeError52("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
24180
24693
|
}
|
|
24181
24694
|
return wizardForm;
|
|
24182
24695
|
}
|
|
@@ -24243,7 +24756,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24243
24756
|
this.tagHistory.pop();
|
|
24244
24757
|
}
|
|
24245
24758
|
if (!prevTag) {
|
|
24246
|
-
throw new
|
|
24759
|
+
throw new RuntimeError52("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
24247
24760
|
}
|
|
24248
24761
|
this.state.activeFormTag = prevTag;
|
|
24249
24762
|
}
|
|
@@ -24279,7 +24792,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24279
24792
|
});
|
|
24280
24793
|
const nextWizardStep = wizardSteps[index + 1];
|
|
24281
24794
|
if (!nextWizardStep) {
|
|
24282
|
-
throw new
|
|
24795
|
+
throw new RuntimeError52("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
24283
24796
|
}
|
|
24284
24797
|
const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
|
|
24285
24798
|
if (nextWizardForm && nextWizardForm.formTag) {
|
|
@@ -24288,7 +24801,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24288
24801
|
}
|
|
24289
24802
|
}
|
|
24290
24803
|
if (!nextTag) {
|
|
24291
|
-
throw new
|
|
24804
|
+
throw new RuntimeError52("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
24292
24805
|
}
|
|
24293
24806
|
this.state.activeFormTag = nextTag;
|
|
24294
24807
|
this.tagHistory.push(nextTag);
|
|
@@ -24307,7 +24820,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24307
24820
|
};
|
|
24308
24821
|
|
|
24309
24822
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
24310
|
-
import { RuntimeModelError as
|
|
24823
|
+
import { RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
24311
24824
|
import { isNil as isNil24 } from "ramda";
|
|
24312
24825
|
|
|
24313
24826
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
@@ -24530,7 +25043,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
24530
25043
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
24531
25044
|
if (enableGroup && groupMode) {
|
|
24532
25045
|
if (!groupAppDEFieldId) {
|
|
24533
|
-
throw new
|
|
25046
|
+
throw new RuntimeModelError57(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
24534
25047
|
}
|
|
24535
25048
|
if (groupMode === "AUTO") {
|
|
24536
25049
|
this.handleAutoGroup();
|
|
@@ -24597,7 +25110,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
24597
25110
|
async handleCodeListGroup() {
|
|
24598
25111
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
24599
25112
|
if (!groupCodeListId) {
|
|
24600
|
-
throw new
|
|
25113
|
+
throw new RuntimeModelError57(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
24601
25114
|
}
|
|
24602
25115
|
const { items } = this.state;
|
|
24603
25116
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -24627,7 +25140,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
24627
25140
|
};
|
|
24628
25141
|
|
|
24629
25142
|
// src/controller/control/kanban/kanban.controller.ts
|
|
24630
|
-
import { RuntimeError as
|
|
25143
|
+
import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
24631
25144
|
import { isNil as isNil25 } from "ramda";
|
|
24632
25145
|
|
|
24633
25146
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -24702,10 +25215,10 @@ var KanbanController = class extends DataViewControlController {
|
|
|
24702
25215
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
24703
25216
|
const { minorSortDir } = this.model;
|
|
24704
25217
|
if (!sortField) {
|
|
24705
|
-
throw new
|
|
25218
|
+
throw new RuntimeModelError58(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
24706
25219
|
}
|
|
24707
25220
|
if (!minorSortDir) {
|
|
24708
|
-
throw new
|
|
25221
|
+
throw new RuntimeModelError58(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
24709
25222
|
}
|
|
24710
25223
|
const isAsc = minorSortDir === "ASC";
|
|
24711
25224
|
items.forEach((item) => {
|
|
@@ -24715,7 +25228,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
24715
25228
|
} else {
|
|
24716
25229
|
const toNum = Number(sortValue);
|
|
24717
25230
|
if (Number.isNaN(toNum)) {
|
|
24718
|
-
throw new
|
|
25231
|
+
throw new RuntimeError53(
|
|
24719
25232
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
24720
25233
|
);
|
|
24721
25234
|
}
|
|
@@ -24731,7 +25244,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
24731
25244
|
}
|
|
24732
25245
|
handleDataGroup() {
|
|
24733
25246
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
24734
|
-
throw new
|
|
25247
|
+
throw new RuntimeError53("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
24735
25248
|
}
|
|
24736
25249
|
return super.handleDataGroup();
|
|
24737
25250
|
}
|
|
@@ -25225,8 +25738,8 @@ var TreeGridService = class extends GridService {
|
|
|
25225
25738
|
};
|
|
25226
25739
|
|
|
25227
25740
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
25228
|
-
import { RuntimeError as
|
|
25229
|
-
import { createUUID as
|
|
25741
|
+
import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
25742
|
+
import { createUUID as createUUID10 } from "qx-util";
|
|
25230
25743
|
|
|
25231
25744
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
25232
25745
|
var MEditViewPanelService = class extends MDControlService {
|
|
@@ -25312,7 +25825,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
25312
25825
|
*/
|
|
25313
25826
|
handlePanelItemParams(arg) {
|
|
25314
25827
|
const [{ parameterName }] = this.parameters;
|
|
25315
|
-
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(
|
|
25828
|
+
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID10());
|
|
25316
25829
|
const item = {
|
|
25317
25830
|
id,
|
|
25318
25831
|
context: this.context.clone(),
|
|
@@ -25440,7 +25953,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
25440
25953
|
(item) => item.id === id
|
|
25441
25954
|
);
|
|
25442
25955
|
if (panelUiItemIndex < 0) {
|
|
25443
|
-
throw new
|
|
25956
|
+
throw new RuntimeError54("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
25444
25957
|
}
|
|
25445
25958
|
const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
|
|
25446
25959
|
if (tempUiItem.id.startsWith("mockId:")) {
|
|
@@ -25855,7 +26368,7 @@ var AppHub = class {
|
|
|
25855
26368
|
this.registerAppView(appView);
|
|
25856
26369
|
return appView;
|
|
25857
26370
|
}
|
|
25858
|
-
throw new
|
|
26371
|
+
throw new RuntimeError55("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
25859
26372
|
}
|
|
25860
26373
|
/**
|
|
25861
26374
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -25886,7 +26399,7 @@ var AppHub = class {
|
|
|
25886
26399
|
this.registerAppDataEntity(entity, appId);
|
|
25887
26400
|
return entity;
|
|
25888
26401
|
}
|
|
25889
|
-
throw new
|
|
26402
|
+
throw new RuntimeError55("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
25890
26403
|
}
|
|
25891
26404
|
/**
|
|
25892
26405
|
* 新建 hub 应用
|
|
@@ -25907,7 +26420,7 @@ var AppHub = class {
|
|
|
25907
26420
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
25908
26421
|
this.registerApp(appModel);
|
|
25909
26422
|
} else {
|
|
25910
|
-
throw new
|
|
26423
|
+
throw new RuntimeError55("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
25911
26424
|
}
|
|
25912
26425
|
const app = new Application(appModel);
|
|
25913
26426
|
this.appMap.set(id, app);
|
|
@@ -25927,7 +26440,7 @@ var AppHub = class {
|
|
|
25927
26440
|
* @author chitanda
|
|
25928
26441
|
* @date 2023-04-17 21:04:41
|
|
25929
26442
|
* @param {string} [key=ibiz.env.appId]
|
|
25930
|
-
* @return {*} {Promise<
|
|
26443
|
+
* @return {*} {Promise<IAppService>}
|
|
25931
26444
|
*/
|
|
25932
26445
|
async getAppAsync(key = ibiz.env.appId) {
|
|
25933
26446
|
return this.createApp(key);
|
|
@@ -25938,7 +26451,7 @@ var AppHub = class {
|
|
|
25938
26451
|
* @author chitanda
|
|
25939
26452
|
* @date 2023-04-17 22:04:42
|
|
25940
26453
|
* @param {(string | IApplication)} [app]
|
|
25941
|
-
* @return {*} {
|
|
26454
|
+
* @return {*} {IAppService}
|
|
25942
26455
|
*/
|
|
25943
26456
|
getApp(app) {
|
|
25944
26457
|
let key = null;
|
|
@@ -26005,7 +26518,7 @@ var EngineFactory = class {
|
|
|
26005
26518
|
};
|
|
26006
26519
|
|
|
26007
26520
|
// src/engine/view-base.engine.ts
|
|
26008
|
-
import { RuntimeError as
|
|
26521
|
+
import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
|
|
26009
26522
|
var ViewEngineBase = class {
|
|
26010
26523
|
/**
|
|
26011
26524
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -26193,7 +26706,7 @@ var ViewEngineBase = class {
|
|
|
26193
26706
|
const { appDataEntityId } = this.view.model;
|
|
26194
26707
|
const { evt, context, params } = this.view;
|
|
26195
26708
|
if (!appDataEntityId) {
|
|
26196
|
-
throw new
|
|
26709
|
+
throw new RuntimeError56("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
26197
26710
|
}
|
|
26198
26711
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
26199
26712
|
const res = await app.deService.exec(
|
|
@@ -26214,8 +26727,8 @@ var ViewEngineBase = class {
|
|
|
26214
26727
|
};
|
|
26215
26728
|
|
|
26216
26729
|
// src/engine/md-view.engine.ts
|
|
26217
|
-
import { RuntimeModelError as
|
|
26218
|
-
import { clone as
|
|
26730
|
+
import { RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
|
|
26731
|
+
import { clone as clone24 } from "ramda";
|
|
26219
26732
|
var MDViewEngine = class extends ViewEngineBase {
|
|
26220
26733
|
/**
|
|
26221
26734
|
* 多数据部件名称
|
|
@@ -26353,6 +26866,14 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
26353
26866
|
await this.exportData(args);
|
|
26354
26867
|
return null;
|
|
26355
26868
|
}
|
|
26869
|
+
if (key === "Search" /* SEARCH */) {
|
|
26870
|
+
await this.searchForm.search();
|
|
26871
|
+
return null;
|
|
26872
|
+
}
|
|
26873
|
+
if (key === "Reset" /* RESET */) {
|
|
26874
|
+
await this.searchForm.reset();
|
|
26875
|
+
return null;
|
|
26876
|
+
}
|
|
26356
26877
|
if (key === "Copy" /* COPY */) {
|
|
26357
26878
|
this.copy(args);
|
|
26358
26879
|
return null;
|
|
@@ -26390,7 +26911,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
26390
26911
|
view: this.view
|
|
26391
26912
|
}));
|
|
26392
26913
|
if (result === -1) {
|
|
26393
|
-
throw new
|
|
26914
|
+
throw new RuntimeModelError59(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
26394
26915
|
} else {
|
|
26395
26916
|
return {
|
|
26396
26917
|
cancel: !result.ok
|
|
@@ -26413,9 +26934,9 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
26413
26934
|
(item) => item.id === "newdata"
|
|
26414
26935
|
);
|
|
26415
26936
|
if (!openAppViewLogic) {
|
|
26416
|
-
throw new
|
|
26937
|
+
throw new RuntimeModelError59(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
26417
26938
|
}
|
|
26418
|
-
const params =
|
|
26939
|
+
const params = clone24(this.view.params);
|
|
26419
26940
|
if (copyMode) {
|
|
26420
26941
|
params.srfcopymode = copyMode;
|
|
26421
26942
|
}
|
|
@@ -26427,7 +26948,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
26427
26948
|
view: this.view
|
|
26428
26949
|
}));
|
|
26429
26950
|
if (result === -1) {
|
|
26430
|
-
throw new
|
|
26951
|
+
throw new RuntimeModelError59(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
26431
26952
|
} else {
|
|
26432
26953
|
return {
|
|
26433
26954
|
cancel: !result.ok
|
|
@@ -26546,15 +27067,15 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
26546
27067
|
|
|
26547
27068
|
// src/utils/error-handler/default-error-handler.ts
|
|
26548
27069
|
import {
|
|
26549
|
-
RuntimeModelError as
|
|
27070
|
+
RuntimeModelError as RuntimeModelError60,
|
|
26550
27071
|
ModelError as ModelError28,
|
|
26551
27072
|
HttpError as HttpError4,
|
|
26552
27073
|
NoticeError as NoticeError2,
|
|
26553
|
-
RuntimeError as
|
|
27074
|
+
RuntimeError as RuntimeError57
|
|
26554
27075
|
} from "@ibiz-template/core";
|
|
26555
27076
|
var DefaultErrorHandler = class {
|
|
26556
27077
|
handle(error) {
|
|
26557
|
-
if (error instanceof
|
|
27078
|
+
if (error instanceof RuntimeModelError60 || error instanceof ModelError28) {
|
|
26558
27079
|
ibiz.message.error(error.message, 10, true);
|
|
26559
27080
|
} else if (error instanceof HttpError4) {
|
|
26560
27081
|
if (error.status === 401) {
|
|
@@ -26568,7 +27089,7 @@ var DefaultErrorHandler = class {
|
|
|
26568
27089
|
}
|
|
26569
27090
|
} else if (error instanceof NoticeError2) {
|
|
26570
27091
|
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
26571
|
-
} else if (error instanceof
|
|
27092
|
+
} else if (error instanceof RuntimeError57) {
|
|
26572
27093
|
ibiz.message.error(error.message, 10, true);
|
|
26573
27094
|
}
|
|
26574
27095
|
ibiz.log.error(error);
|
|
@@ -26696,7 +27217,7 @@ var GlobalUtil = class {
|
|
|
26696
27217
|
};
|
|
26697
27218
|
|
|
26698
27219
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
26699
|
-
import { RuntimeError as
|
|
27220
|
+
import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
|
|
26700
27221
|
var LogicExecutor = class {
|
|
26701
27222
|
/**
|
|
26702
27223
|
* @author lxm
|
|
@@ -26717,7 +27238,7 @@ var LogicExecutor = class {
|
|
|
26717
27238
|
*/
|
|
26718
27239
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26719
27240
|
execute(_executeParams) {
|
|
26720
|
-
throw new
|
|
27241
|
+
throw new RuntimeError58("Method not implemented.");
|
|
26721
27242
|
}
|
|
26722
27243
|
/**
|
|
26723
27244
|
* 销毁方法
|
|
@@ -26808,13 +27329,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
26808
27329
|
};
|
|
26809
27330
|
|
|
26810
27331
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
26811
|
-
import { RuntimeModelError as
|
|
27332
|
+
import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
26812
27333
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
26813
27334
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26814
27335
|
execute(executeParams) {
|
|
26815
27336
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
26816
27337
|
if (!appDEUILogicId) {
|
|
26817
|
-
throw new
|
|
27338
|
+
throw new RuntimeModelError61(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
26818
27339
|
}
|
|
26819
27340
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
26820
27341
|
}
|
|
@@ -27154,7 +27675,7 @@ var LogicSchedulerCenter = class {
|
|
|
27154
27675
|
};
|
|
27155
27676
|
|
|
27156
27677
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
27157
|
-
import { RuntimeError as
|
|
27678
|
+
import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
|
|
27158
27679
|
var LogicTrigger = class {
|
|
27159
27680
|
/**
|
|
27160
27681
|
* @author lxm
|
|
@@ -27214,7 +27735,7 @@ var LogicTrigger = class {
|
|
|
27214
27735
|
if (this.executor) {
|
|
27215
27736
|
return this.executor.execute(executeParams);
|
|
27216
27737
|
}
|
|
27217
|
-
throw new
|
|
27738
|
+
throw new RuntimeError59("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
27218
27739
|
}
|
|
27219
27740
|
/**
|
|
27220
27741
|
* 销毁方法
|
|
@@ -27231,12 +27752,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
27231
27752
|
};
|
|
27232
27753
|
|
|
27233
27754
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
27234
|
-
import { RuntimeError as
|
|
27755
|
+
import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
|
|
27235
27756
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
27236
27757
|
bindExecutor(executor) {
|
|
27237
27758
|
super.bindExecutor(executor);
|
|
27238
27759
|
if (this.executor.type !== "SCRIPT") {
|
|
27239
|
-
throw new
|
|
27760
|
+
throw new RuntimeError60(
|
|
27240
27761
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
27241
27762
|
);
|
|
27242
27763
|
}
|
|
@@ -27272,7 +27793,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
27272
27793
|
};
|
|
27273
27794
|
|
|
27274
27795
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
27275
|
-
import { RuntimeError as
|
|
27796
|
+
import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
|
|
27276
27797
|
var TimerTrigger = class extends LogicTrigger {
|
|
27277
27798
|
constructor() {
|
|
27278
27799
|
super(...arguments);
|
|
@@ -27280,11 +27801,11 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
27280
27801
|
}
|
|
27281
27802
|
start() {
|
|
27282
27803
|
if (!this.logic.timer) {
|
|
27283
|
-
throw new
|
|
27804
|
+
throw new RuntimeModelError62(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
27284
27805
|
}
|
|
27285
27806
|
this.timer = setInterval(() => {
|
|
27286
27807
|
if (!this.scheduler.defaultParamsCb) {
|
|
27287
|
-
throw new
|
|
27808
|
+
throw new RuntimeError61("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
27288
27809
|
}
|
|
27289
27810
|
const params = this.scheduler.defaultParamsCb();
|
|
27290
27811
|
this.executor.execute(params);
|
|
@@ -27301,8 +27822,8 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
27301
27822
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
27302
27823
|
import {
|
|
27303
27824
|
ModelError as ModelError31,
|
|
27304
|
-
RuntimeError as
|
|
27305
|
-
RuntimeModelError as
|
|
27825
|
+
RuntimeError as RuntimeError62,
|
|
27826
|
+
RuntimeModelError as RuntimeModelError63
|
|
27306
27827
|
} from "@ibiz-template/core";
|
|
27307
27828
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
27308
27829
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -27334,7 +27855,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27334
27855
|
const { context, params, ...rest } = parameters;
|
|
27335
27856
|
const { data } = parameters;
|
|
27336
27857
|
if (!(data == null ? void 0 : data[0])) {
|
|
27337
|
-
throw new
|
|
27858
|
+
throw new RuntimeError62("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
27338
27859
|
}
|
|
27339
27860
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
27340
27861
|
let openViewRef;
|
|
@@ -27343,7 +27864,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27343
27864
|
} else {
|
|
27344
27865
|
openViewRef = appUILogic.openDataAppView;
|
|
27345
27866
|
if (!openViewRef) {
|
|
27346
|
-
throw new
|
|
27867
|
+
throw new RuntimeModelError63(
|
|
27347
27868
|
appUILogic,
|
|
27348
27869
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
27349
27870
|
);
|
|
@@ -27351,7 +27872,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27351
27872
|
}
|
|
27352
27873
|
const openView = openViewRef.refAppViewId;
|
|
27353
27874
|
if (!openView) {
|
|
27354
|
-
throw new
|
|
27875
|
+
throw new RuntimeModelError63(
|
|
27355
27876
|
appUILogic,
|
|
27356
27877
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
27357
27878
|
);
|
|
@@ -27380,7 +27901,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27380
27901
|
);
|
|
27381
27902
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
27382
27903
|
if (!typeFileName) {
|
|
27383
|
-
throw new
|
|
27904
|
+
throw new RuntimeModelError63(
|
|
27384
27905
|
appUILogic,
|
|
27385
27906
|
"".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
|
|
27386
27907
|
);
|
|
@@ -27388,12 +27909,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27388
27909
|
const { data } = parameters;
|
|
27389
27910
|
const formTypeValue = data[0][typeFileName];
|
|
27390
27911
|
if (!formTypeValue) {
|
|
27391
|
-
throw new
|
|
27912
|
+
throw new RuntimeModelError63(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
27392
27913
|
}
|
|
27393
27914
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
27394
27915
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
27395
27916
|
if (!findView) {
|
|
27396
|
-
throw new
|
|
27917
|
+
throw new RuntimeError62(
|
|
27397
27918
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
27398
27919
|
);
|
|
27399
27920
|
}
|
|
@@ -27430,7 +27951,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27430
27951
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
27431
27952
|
});
|
|
27432
27953
|
if (!newViewRef) {
|
|
27433
|
-
throw new
|
|
27954
|
+
throw new RuntimeModelError63(
|
|
27434
27955
|
appUILogic,
|
|
27435
27956
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
27436
27957
|
);
|
|
@@ -27440,7 +27961,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27440
27961
|
} else {
|
|
27441
27962
|
newViewRef = newDataAppView;
|
|
27442
27963
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
27443
|
-
throw new
|
|
27964
|
+
throw new RuntimeModelError63(
|
|
27444
27965
|
appUILogic,
|
|
27445
27966
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
27446
27967
|
);
|
|
@@ -27497,7 +28018,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27497
28018
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
27498
28019
|
const { context, params, ...rest } = parameters;
|
|
27499
28020
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
27500
|
-
throw new
|
|
28021
|
+
throw new RuntimeModelError63(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
27501
28022
|
}
|
|
27502
28023
|
const result = await ibiz.commands.execute(
|
|
27503
28024
|
OpenAppViewCommand.TAG,
|
|
@@ -27511,12 +28032,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27511
28032
|
}
|
|
27512
28033
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
27513
28034
|
if (!selectData) {
|
|
27514
|
-
throw new
|
|
28035
|
+
throw new RuntimeError62("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
27515
28036
|
}
|
|
27516
28037
|
const indexType = selectData.srfkey;
|
|
27517
28038
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
27518
28039
|
if (!findView) {
|
|
27519
|
-
throw new
|
|
28040
|
+
throw new RuntimeError62(
|
|
27520
28041
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
27521
28042
|
);
|
|
27522
28043
|
}
|
|
@@ -27543,7 +28064,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27543
28064
|
const minorDERs = selfDe.minorAppDERSs;
|
|
27544
28065
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
27545
28066
|
if (!minorDERs) {
|
|
27546
|
-
throw new
|
|
28067
|
+
throw new RuntimeModelError63(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
27547
28068
|
}
|
|
27548
28069
|
let pickParentFieldName;
|
|
27549
28070
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -27642,12 +28163,12 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
27642
28163
|
};
|
|
27643
28164
|
|
|
27644
28165
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
27645
|
-
import { RuntimeModelError as
|
|
28166
|
+
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
27646
28167
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
27647
28168
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27648
28169
|
execute(executeParams) {
|
|
27649
28170
|
if (!this.logic.appDEUIActionId) {
|
|
27650
|
-
throw new
|
|
28171
|
+
throw new RuntimeModelError64(
|
|
27651
28172
|
this.logic,
|
|
27652
28173
|
"\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
|
|
27653
28174
|
);
|
|
@@ -27837,6 +28358,7 @@ export {
|
|
|
27837
28358
|
CalendarService,
|
|
27838
28359
|
CaptionBarController,
|
|
27839
28360
|
ChartController,
|
|
28361
|
+
ChartData,
|
|
27840
28362
|
ChartExpBarController,
|
|
27841
28363
|
ChartPortletController,
|
|
27842
28364
|
ChartService,
|