@ibiz-template/runtime 0.5.0-beta.3 → 0.5.0-beta.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 +763 -629
- package/dist/index.system.min.js +1 -4
- package/out/controller/common/control/md-control.controller.d.ts +10 -0
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +37 -0
- package/out/controller/control/data-view/data-view.controller.d.ts +8 -7
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +9 -21
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts +20 -0
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +53 -8
- package/out/controller/control/grid/grid/grid.controller.d.ts +10 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +16 -14
- package/out/controller/control/list/list.controller.d.ts +8 -7
- package/out/controller/control/list/list.controller.d.ts.map +1 -1
- package/out/controller/control/list/list.controller.js +9 -21
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts +0 -9
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +0 -23
- package/out/controller/control/search-bar/search-bar.controller.d.ts +9 -1
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +34 -11
- package/out/controller/control/tree/tree.controller.d.ts +13 -5
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +39 -22
- package/out/global/global-util/global-util.d.ts +1 -2
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +1 -2
- package/out/interface/controller/state/control/i-search-bar.state.d.ts +1 -5
- package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
- package/out/interface/service/i-data-entity/i-data-entity.d.ts +17 -0
- package/out/interface/service/i-data-entity/i-data-entity.d.ts.map +1 -1
- package/out/service/app-data-entity/app-data-entity.d.ts +9 -0
- package/out/service/app-data-entity/app-data-entity.d.ts.map +1 -1
- package/out/service/app-data-entity/app-data-entity.js +41 -11
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +3 -0
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/package.json +6 -6
- package/src/controller/common/control/md-control.controller.ts +46 -0
- package/src/controller/control/data-view/data-view.controller.ts +12 -19
- package/src/controller/control/form/edit-form/edit-form.controller.ts +51 -7
- package/src/controller/control/grid/grid/grid.controller.ts +20 -12
- package/src/controller/control/list/list.controller.ts +12 -19
- package/src/controller/control/md-ctrl/md-ctrl.controller.ts +0 -22
- package/src/controller/control/search-bar/search-bar.controller.ts +45 -11
- package/src/controller/control/tree/tree.controller.ts +62 -26
- package/src/global/global-util/global-util.ts +1 -3
- package/src/interface/controller/state/control/i-search-bar.state.ts +1 -6
- package/src/interface/service/i-data-entity/i-data-entity.ts +19 -0
- package/src/service/app-data-entity/app-data-entity.ts +46 -11
- package/src/service/utils/de-cache/de-cache.ts +3 -0
- package/src/utils/index.ts +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -76,7 +76,91 @@ var RegisterCenter = class {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
// src/command/app/app-func/app-func.ts
|
|
79
|
-
import { ModelError as
|
|
79
|
+
import { ModelError as ModelError16, RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
80
|
+
|
|
81
|
+
// src/utils/error-handler/default-error-handler.ts
|
|
82
|
+
import {
|
|
83
|
+
RuntimeModelError,
|
|
84
|
+
ModelError,
|
|
85
|
+
HttpError,
|
|
86
|
+
NoticeError,
|
|
87
|
+
RuntimeError
|
|
88
|
+
} from "@ibiz-template/core";
|
|
89
|
+
var DefaultErrorHandler = class {
|
|
90
|
+
handle(error) {
|
|
91
|
+
if (error instanceof RuntimeModelError || error instanceof ModelError) {
|
|
92
|
+
ibiz.message.error(error.message, 10, true);
|
|
93
|
+
} else if (error instanceof HttpError) {
|
|
94
|
+
if (error.status === 401) {
|
|
95
|
+
ibiz.message.error("\u6CA1\u6709\u6CE8\u518C\u65E0\u6743\u9650\u9519\u8BEF\u5904\u7406\u5668");
|
|
96
|
+
} else {
|
|
97
|
+
ibiz.notification.error({
|
|
98
|
+
title: "",
|
|
99
|
+
desc: error.message,
|
|
100
|
+
duration: 10
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
} else if (error instanceof NoticeError) {
|
|
104
|
+
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
105
|
+
} else if (error instanceof RuntimeError) {
|
|
106
|
+
ibiz.message.error(error.message, 10, true);
|
|
107
|
+
}
|
|
108
|
+
ibiz.log.error(error);
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// src/utils/error-handler/error-handler-center.ts
|
|
114
|
+
var ErrorHandlerCenter = class {
|
|
115
|
+
constructor() {
|
|
116
|
+
/**
|
|
117
|
+
* 处理器集合
|
|
118
|
+
* @author lxm
|
|
119
|
+
* @date 2023-09-26 04:56:29
|
|
120
|
+
* @type {IErrorHandler[]}
|
|
121
|
+
*/
|
|
122
|
+
this.handlers = [];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* 注册处理器(后注册的优先级更高)
|
|
126
|
+
* @author lxm
|
|
127
|
+
* @date 2023-09-26 04:59:06
|
|
128
|
+
* @param {IErrorHandler} handler
|
|
129
|
+
*/
|
|
130
|
+
register(handler) {
|
|
131
|
+
this.handlers.unshift(handler);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* 处理单个报错
|
|
135
|
+
* @author lxm
|
|
136
|
+
* @date 2023-09-26 05:18:18
|
|
137
|
+
* @protected
|
|
138
|
+
* @param {unknown} error
|
|
139
|
+
*/
|
|
140
|
+
handleSingle(error) {
|
|
141
|
+
const find = this.handlers.find((item) => {
|
|
142
|
+
return !!item.handle(error);
|
|
143
|
+
});
|
|
144
|
+
if (!find) {
|
|
145
|
+
ibiz.log.error("\u6CA1\u6709\u627E\u5230\u80FD\u5904\u7406\u8BE5\u9519\u8BEF\u7684\u5904\u7406\u5668", error);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* 按顺序检测处理器,最先满足条件的处理该异常
|
|
150
|
+
* @author lxm
|
|
151
|
+
* @date 2023-09-26 05:01:08
|
|
152
|
+
* @param {unknown} error
|
|
153
|
+
*/
|
|
154
|
+
handle(error) {
|
|
155
|
+
if (error instanceof Array) {
|
|
156
|
+
error.forEach((item) => {
|
|
157
|
+
this.handleSingle(item);
|
|
158
|
+
});
|
|
159
|
+
} else {
|
|
160
|
+
this.handleSingle(error);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
80
164
|
|
|
81
165
|
// src/utils/handlebars/utils/helper/helper.ts
|
|
82
166
|
var HelperUtil = class {
|
|
@@ -627,12 +711,12 @@ function calcNavParams(model, originParams) {
|
|
|
627
711
|
}
|
|
628
712
|
|
|
629
713
|
// src/utils/open-redirect-view/open-redirect-view.ts
|
|
630
|
-
import { RuntimeError, RuntimeModelError as
|
|
714
|
+
import { RuntimeError as RuntimeError2, RuntimeModelError as RuntimeModelError3 } from "@ibiz-template/core";
|
|
631
715
|
import { isNilOrEmpty as isNilOrEmpty2, notNilEmpty as notNilEmpty3 } from "qx-util";
|
|
632
716
|
import qs from "qs";
|
|
633
717
|
|
|
634
718
|
// src/model/utils/util.ts
|
|
635
|
-
import { RuntimeModelError } from "@ibiz-template/core";
|
|
719
|
+
import { RuntimeModelError as RuntimeModelError2 } from "@ibiz-template/core";
|
|
636
720
|
function findModelChild(models, id) {
|
|
637
721
|
if (models && id) {
|
|
638
722
|
const model = models.find((item) => {
|
|
@@ -695,11 +779,11 @@ function parseUserParams(userParams) {
|
|
|
695
779
|
function getPFPlugin(id, appId) {
|
|
696
780
|
const app = ibiz.hub.getApp(appId);
|
|
697
781
|
if (!app) {
|
|
698
|
-
throw new
|
|
782
|
+
throw new RuntimeModelError2(app, "\u672A\u627E\u5230\u5E94\u7528");
|
|
699
783
|
}
|
|
700
784
|
const { model } = app;
|
|
701
785
|
if (!model.appPFPluginRefs) {
|
|
702
|
-
throw new
|
|
786
|
+
throw new RuntimeModelError2(model, "\u5E94\u7528\u672A\u914D\u7F6E\u63D2\u4EF6");
|
|
703
787
|
}
|
|
704
788
|
const plugin = model.appPFPluginRefs.find(
|
|
705
789
|
(item) => item.pluginCode.toLowerCase() === id.toLowerCase()
|
|
@@ -1068,12 +1152,12 @@ async function toLocalOpenWFRedirectView(context, linkUrl, opts = {}) {
|
|
|
1068
1152
|
const params = qs.parse(queryStr, { delimiter: ";" });
|
|
1069
1153
|
const deName = params.srfdename || "";
|
|
1070
1154
|
if (!deName) {
|
|
1071
|
-
throw new
|
|
1155
|
+
throw new RuntimeError2("\u91CD\u5B9A\u5411\u53C2\u6570\u7F3A\u5C11\u5B9E\u4F53\u540D\u79F0");
|
|
1072
1156
|
}
|
|
1073
1157
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
1074
1158
|
const deCodeName = app.deName2DeCodeName.get(deName.toUpperCase());
|
|
1075
1159
|
if (!deCodeName) {
|
|
1076
|
-
throw new
|
|
1160
|
+
throw new RuntimeError2("\u672A\u627E\u5230\u6307\u5B9A\u5B9E\u4F53\u7684codeName: ".concat(deName));
|
|
1077
1161
|
}
|
|
1078
1162
|
params[deCodeName.toLowerCase()] = params[deName.toLowerCase()];
|
|
1079
1163
|
const deRdViewCodeName = "".concat(deCodeName).concat(ibiz.env.isMob ? "Mob" : "", "RedirectView");
|
|
@@ -1137,7 +1221,7 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
|
|
|
1137
1221
|
);
|
|
1138
1222
|
return { type: "view", ...toView };
|
|
1139
1223
|
}
|
|
1140
|
-
throw new
|
|
1224
|
+
throw new RuntimeError2("\u672A\u652F\u6301\u7684linkUrl\u683C\u5F0F:".concat(linkUrl));
|
|
1141
1225
|
}
|
|
1142
1226
|
}
|
|
1143
1227
|
} finally {
|
|
@@ -1170,7 +1254,7 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
|
|
|
1170
1254
|
opts: { ...opts, data: [curData] }
|
|
1171
1255
|
};
|
|
1172
1256
|
}
|
|
1173
|
-
throw new
|
|
1257
|
+
throw new RuntimeModelError3(refView, "\u672A\u914D\u7F6E\u5B9E\u9645\u5F15\u7528\u89C6\u56FE");
|
|
1174
1258
|
} else {
|
|
1175
1259
|
ibiz.log.error(
|
|
1176
1260
|
"\u91CD\u5B9A\u5411\u89C6\u56FE\u5F15\u7528\u6709\uFF1A",
|
|
@@ -1180,7 +1264,7 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
|
|
|
1180
1264
|
title: realTitle
|
|
1181
1265
|
}))
|
|
1182
1266
|
);
|
|
1183
|
-
throw new
|
|
1267
|
+
throw new RuntimeModelError3(
|
|
1184
1268
|
appView,
|
|
1185
1269
|
"\u672A\u627E\u5230\u91CD\u5B9A\u5411\u6807\u8BC6[".concat(rdTag, "]\u6216[").concat(deRdTag, "]\u6216\u5DE5\u4F5C\u6D41[").concat(wfRdTag, "]\u5BF9\u5E94\u89C6\u56FE")
|
|
1186
1270
|
);
|
|
@@ -1256,7 +1340,7 @@ async function calcDERdTag(entity, rdView, params, data) {
|
|
|
1256
1340
|
}
|
|
1257
1341
|
|
|
1258
1342
|
// src/utils/verify/verify.ts
|
|
1259
|
-
import { RuntimeError as
|
|
1343
|
+
import { RuntimeError as RuntimeError3 } from "@ibiz-template/core";
|
|
1260
1344
|
import { isNilOrEmpty as isNilOrEmpty3, notNilEmpty as notNilEmpty4 } from "qx-util";
|
|
1261
1345
|
import { isNil } from "ramda";
|
|
1262
1346
|
function testCond(value, op, value2) {
|
|
@@ -1296,7 +1380,7 @@ function testCond(value, op, value2) {
|
|
|
1296
1380
|
case "RIGHTLIKE":
|
|
1297
1381
|
return strContain(value, value2, "end");
|
|
1298
1382
|
default:
|
|
1299
|
-
throw new
|
|
1383
|
+
throw new RuntimeError3("\u503C\u64CD\u4F5C\uFF1A".concat(op, "\uFF0C\u6682\u672A\u652F\u6301"));
|
|
1300
1384
|
}
|
|
1301
1385
|
}
|
|
1302
1386
|
function compare(value, value2) {
|
|
@@ -1310,7 +1394,7 @@ function compare(value, value2) {
|
|
|
1310
1394
|
if (!Number.isNaN(date1) && !Number.isNaN(date2)) {
|
|
1311
1395
|
return compareNumber(date1, date2);
|
|
1312
1396
|
}
|
|
1313
|
-
throw new
|
|
1397
|
+
throw new RuntimeError3("".concat(value, " \u548C ").concat(value2, " \u65E0\u6CD5\u6BD4\u8F83\u5927\u5C0F"));
|
|
1314
1398
|
}
|
|
1315
1399
|
function compareNumber(value, value2) {
|
|
1316
1400
|
if (Number.isNaN(value)) {
|
|
@@ -1329,7 +1413,7 @@ function compareNumber(value, value2) {
|
|
|
1329
1413
|
}
|
|
1330
1414
|
function contains(value, value2) {
|
|
1331
1415
|
if (!value2 || typeof value2 !== "string") {
|
|
1332
|
-
throw new
|
|
1416
|
+
throw new RuntimeError3("\u8303\u56F4\u6BD4\u8F83\u7684\u6761\u4EF6\u503C\u4E0D\u5B58\u6216\u8005\u4E0D\u662F\u5B57\u7B26\u4E32");
|
|
1333
1417
|
}
|
|
1334
1418
|
if (value) {
|
|
1335
1419
|
const arr = value2.split(",");
|
|
@@ -1355,7 +1439,7 @@ function strContain(value, value2, mode) {
|
|
|
1355
1439
|
}
|
|
1356
1440
|
|
|
1357
1441
|
// src/utils/verify/de-rule-verify.ts
|
|
1358
|
-
import { RuntimeError as
|
|
1442
|
+
import { RuntimeError as RuntimeError4 } from "@ibiz-template/core";
|
|
1359
1443
|
import { isNilOrEmpty as isNilOrEmpty4 } from "qx-util";
|
|
1360
1444
|
import { isEmpty as isEmpty2, isNil as isNil2 } from "ramda";
|
|
1361
1445
|
|
|
@@ -1717,7 +1801,7 @@ function checkFieldSimpleRule(value, op, value2, errorInfo, paramType, form, pri
|
|
|
1717
1801
|
const result = testCond(value, op, value2);
|
|
1718
1802
|
if (!result) {
|
|
1719
1803
|
if (primaryModel) {
|
|
1720
|
-
throw new
|
|
1804
|
+
throw new RuntimeError4(errorInfo);
|
|
1721
1805
|
}
|
|
1722
1806
|
}
|
|
1723
1807
|
return !result;
|
|
@@ -1729,7 +1813,7 @@ function checkFieldStringLengthRule(viewValue, minLength, indexOfMin, maxLength,
|
|
|
1729
1813
|
const judge = isNilOrEmpty4(viewValue);
|
|
1730
1814
|
if (judge) {
|
|
1731
1815
|
if (primaryModel) {
|
|
1732
|
-
throw new
|
|
1816
|
+
throw new RuntimeError4("\u503C\u4E3A\u7A7A");
|
|
1733
1817
|
}
|
|
1734
1818
|
errorInfo = "\u503C\u4E3A\u7A7A";
|
|
1735
1819
|
return true;
|
|
@@ -1739,13 +1823,13 @@ function checkFieldStringLengthRule(viewValue, minLength, indexOfMin, maxLength,
|
|
|
1739
1823
|
if (indexOfMin) {
|
|
1740
1824
|
if (viewValueLength < minLength) {
|
|
1741
1825
|
if (primaryModel) {
|
|
1742
|
-
throw new
|
|
1826
|
+
throw new RuntimeError4(errorInfo);
|
|
1743
1827
|
}
|
|
1744
1828
|
return true;
|
|
1745
1829
|
}
|
|
1746
1830
|
} else if (viewValueLength <= minLength) {
|
|
1747
1831
|
if (primaryModel) {
|
|
1748
|
-
throw new
|
|
1832
|
+
throw new RuntimeError4(errorInfo);
|
|
1749
1833
|
}
|
|
1750
1834
|
return true;
|
|
1751
1835
|
}
|
|
@@ -1754,13 +1838,13 @@ function checkFieldStringLengthRule(viewValue, minLength, indexOfMin, maxLength,
|
|
|
1754
1838
|
if (indexOfMax) {
|
|
1755
1839
|
if (viewValueLength > maxLength) {
|
|
1756
1840
|
if (primaryModel) {
|
|
1757
|
-
throw new
|
|
1841
|
+
throw new RuntimeError4(errorInfo);
|
|
1758
1842
|
}
|
|
1759
1843
|
return true;
|
|
1760
1844
|
}
|
|
1761
1845
|
} else if (viewValueLength >= maxLength) {
|
|
1762
1846
|
if (primaryModel) {
|
|
1763
|
-
throw new
|
|
1847
|
+
throw new RuntimeError4(errorInfo);
|
|
1764
1848
|
}
|
|
1765
1849
|
return true;
|
|
1766
1850
|
}
|
|
@@ -1775,7 +1859,7 @@ function checkFieldRegExRule(viewValue, strReg, errorInfo, primaryModel) {
|
|
|
1775
1859
|
const judge = isNilOrEmpty4(viewValue);
|
|
1776
1860
|
if (judge) {
|
|
1777
1861
|
if (primaryModel) {
|
|
1778
|
-
throw new
|
|
1862
|
+
throw new RuntimeError4("\u503C\u4E3A\u7A7A");
|
|
1779
1863
|
}
|
|
1780
1864
|
errorInfo = "\u503C\u4E3A\u7A7A";
|
|
1781
1865
|
return true;
|
|
@@ -1783,7 +1867,7 @@ function checkFieldRegExRule(viewValue, strReg, errorInfo, primaryModel) {
|
|
|
1783
1867
|
const regExp = new RegExp(strReg);
|
|
1784
1868
|
if (!regExp.test(viewValue)) {
|
|
1785
1869
|
if (primaryModel) {
|
|
1786
|
-
throw new
|
|
1870
|
+
throw new RuntimeError4(errorInfo);
|
|
1787
1871
|
}
|
|
1788
1872
|
return true;
|
|
1789
1873
|
}
|
|
@@ -1797,7 +1881,7 @@ function checkFieldValueRangeRule(viewValue, minNumber, indexOfMin, maxNumber, i
|
|
|
1797
1881
|
const isEmptyVal = isNilOrEmpty4(viewValue);
|
|
1798
1882
|
if (isEmptyVal) {
|
|
1799
1883
|
if (primaryModel) {
|
|
1800
|
-
throw new
|
|
1884
|
+
throw new RuntimeError4("\u503C\u4E3A\u7A7A");
|
|
1801
1885
|
}
|
|
1802
1886
|
errorInfo = "\u503C\u4E3A\u7A7A";
|
|
1803
1887
|
return true;
|
|
@@ -1816,13 +1900,13 @@ function checkFieldValueRangeRule(viewValue, minNumber, indexOfMin, maxNumber, i
|
|
|
1816
1900
|
if (indexOfMin) {
|
|
1817
1901
|
if (data < minNumber) {
|
|
1818
1902
|
if (primaryModel) {
|
|
1819
|
-
throw new
|
|
1903
|
+
throw new RuntimeError4(errorInfo);
|
|
1820
1904
|
}
|
|
1821
1905
|
return true;
|
|
1822
1906
|
}
|
|
1823
1907
|
} else if (data <= minNumber) {
|
|
1824
1908
|
if (primaryModel) {
|
|
1825
|
-
throw new
|
|
1909
|
+
throw new RuntimeError4(errorInfo);
|
|
1826
1910
|
}
|
|
1827
1911
|
return true;
|
|
1828
1912
|
}
|
|
@@ -1831,13 +1915,13 @@ function checkFieldValueRangeRule(viewValue, minNumber, indexOfMin, maxNumber, i
|
|
|
1831
1915
|
if (indexOfMax) {
|
|
1832
1916
|
if (data > maxNumber) {
|
|
1833
1917
|
if (primaryModel) {
|
|
1834
|
-
throw new
|
|
1918
|
+
throw new RuntimeError4(errorInfo);
|
|
1835
1919
|
}
|
|
1836
1920
|
return true;
|
|
1837
1921
|
}
|
|
1838
1922
|
} else if (data >= maxNumber) {
|
|
1839
1923
|
if (primaryModel) {
|
|
1840
|
-
throw new
|
|
1924
|
+
throw new RuntimeError4(errorInfo);
|
|
1841
1925
|
}
|
|
1842
1926
|
return true;
|
|
1843
1927
|
}
|
|
@@ -1879,13 +1963,13 @@ function checkFieldScriptRule(value, data, scriptCode, errorInfo, primaryModel)
|
|
|
1879
1963
|
}
|
|
1880
1964
|
errorInfo = "";
|
|
1881
1965
|
if (!resultBoolean && primaryModel) {
|
|
1882
|
-
throw new
|
|
1966
|
+
throw new RuntimeError4(errorInfo);
|
|
1883
1967
|
}
|
|
1884
1968
|
return { isPast: resultBoolean, infoMessage: selfError || errorInfo };
|
|
1885
1969
|
}
|
|
1886
1970
|
|
|
1887
1971
|
// src/utils/verify/form-dynamic-logic.ts
|
|
1888
|
-
import { ModelError, RuntimeModelError as
|
|
1972
|
+
import { ModelError as ModelError2, RuntimeModelError as RuntimeModelError4 } from "@ibiz-template/core";
|
|
1889
1973
|
function isGroupLogic(logic) {
|
|
1890
1974
|
return logic.logicType === "GROUP";
|
|
1891
1975
|
}
|
|
@@ -1896,7 +1980,7 @@ function verifyFormGroupLogic(data, logic) {
|
|
|
1896
1980
|
if (isGroupLogic(logic)) {
|
|
1897
1981
|
const children = logic.defdlogics;
|
|
1898
1982
|
if (!children || children.length === 0) {
|
|
1899
|
-
throw new
|
|
1983
|
+
throw new RuntimeModelError4(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
|
|
1900
1984
|
}
|
|
1901
1985
|
let result = true;
|
|
1902
1986
|
if (logic.groupOP === "AND") {
|
|
@@ -1921,11 +2005,11 @@ function verifyFormGroupLogic(data, logic) {
|
|
|
1921
2005
|
logic.value
|
|
1922
2006
|
);
|
|
1923
2007
|
}
|
|
1924
|
-
throw new
|
|
2008
|
+
throw new ModelError2(logic, "\u672A\u652F\u6301\u7684\u903B\u8F91\u7C7B\u578B".concat(logic.logicType));
|
|
1925
2009
|
}
|
|
1926
2010
|
|
|
1927
2011
|
// src/utils/verify/panel-dynamic-logic.ts
|
|
1928
|
-
import { ModelError as
|
|
2012
|
+
import { ModelError as ModelError3, RuntimeModelError as RuntimeModelError5 } from "@ibiz-template/core";
|
|
1929
2013
|
function isGroupLogic2(logic) {
|
|
1930
2014
|
return logic.logicType === "GROUP";
|
|
1931
2015
|
}
|
|
@@ -1936,7 +2020,7 @@ function verifyPanelGroupLogic(data, logic) {
|
|
|
1936
2020
|
if (isGroupLogic2(logic)) {
|
|
1937
2021
|
const children = logic.panelItemLogics;
|
|
1938
2022
|
if (!children || children.length === 0) {
|
|
1939
|
-
throw new
|
|
2023
|
+
throw new RuntimeModelError5(logic, "\u53D1\u73B0\u7A7A\u903B\u8F91\u7EC4\uFF0C\u903B\u8F91\u65E0\u6CD5\u6B63\u5E38\u6267\u884C\uFF01");
|
|
1940
2024
|
}
|
|
1941
2025
|
let result = true;
|
|
1942
2026
|
if (logic.groupOP === "AND") {
|
|
@@ -1961,7 +2045,7 @@ function verifyPanelGroupLogic(data, logic) {
|
|
|
1961
2045
|
logic.value
|
|
1962
2046
|
);
|
|
1963
2047
|
}
|
|
1964
|
-
throw new
|
|
2048
|
+
throw new ModelError3(logic, "\u672A\u652F\u6301\u7684\u903B\u8F91\u7C7B\u578B".concat(logic.logicType));
|
|
1965
2049
|
}
|
|
1966
2050
|
|
|
1967
2051
|
// src/utils/layout-panel-util/layout-panel-util.ts
|
|
@@ -2905,7 +2989,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
2905
2989
|
}
|
|
2906
2990
|
|
|
2907
2991
|
// src/command/app/open-app-view/open-app-view.ts
|
|
2908
|
-
import { ModelError as
|
|
2992
|
+
import { ModelError as ModelError15, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
2909
2993
|
import { clone as clone14 } from "ramda";
|
|
2910
2994
|
|
|
2911
2995
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
@@ -3009,7 +3093,7 @@ var PSModelCondEngineBase = class {
|
|
|
3009
3093
|
};
|
|
3010
3094
|
|
|
3011
3095
|
// src/service/utils/de-dq-cond/ps-model-group-cond-base.ts
|
|
3012
|
-
import { RuntimeError as
|
|
3096
|
+
import { RuntimeError as RuntimeError5 } from "@ibiz-template/core";
|
|
3013
3097
|
|
|
3014
3098
|
// src/service/utils/de-dq-cond/ps-model-cond-base.ts
|
|
3015
3099
|
var PSModelCondBase = class {
|
|
@@ -3162,7 +3246,7 @@ var PSModelGroupCondBase = class _PSModelGroupCondBase extends PSModelCondBase {
|
|
|
3162
3246
|
}
|
|
3163
3247
|
});
|
|
3164
3248
|
} else {
|
|
3165
|
-
throw new
|
|
3249
|
+
throw new RuntimeError5("\u503C\u5FC5\u987B\u4E3A\u6570\u7EC4");
|
|
3166
3250
|
}
|
|
3167
3251
|
}
|
|
3168
3252
|
}
|
|
@@ -3284,7 +3368,7 @@ _PSDEDQCondEngine.PARAMTYPE_WEBCONTEXT = "WEBCONTEXT";
|
|
|
3284
3368
|
var PSDEDQCondEngine = _PSDEDQCondEngine;
|
|
3285
3369
|
|
|
3286
3370
|
// src/register/helper/app-counter-register.ts
|
|
3287
|
-
import { RuntimeError as
|
|
3371
|
+
import { RuntimeError as RuntimeError6 } from "@ibiz-template/core";
|
|
3288
3372
|
|
|
3289
3373
|
// src/register/helper/common-register.ts
|
|
3290
3374
|
async function getPluginRegisterKey(pluginId, appId) {
|
|
@@ -3328,14 +3412,14 @@ async function getAppCounterProvider(model) {
|
|
|
3328
3412
|
if (counterType === "CUSTOM") {
|
|
3329
3413
|
provider = getProvider(codeName);
|
|
3330
3414
|
if (!provider) {
|
|
3331
|
-
throw new
|
|
3415
|
+
throw new RuntimeError6("\u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u7CFB\u7EDF\u8BA1\u6570\u5668".concat(codeName, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3332
3416
|
} else {
|
|
3333
3417
|
return provider;
|
|
3334
3418
|
}
|
|
3335
3419
|
}
|
|
3336
3420
|
provider = getProvider(counterType);
|
|
3337
3421
|
if (!provider) {
|
|
3338
|
-
throw new
|
|
3422
|
+
throw new RuntimeError6("\u627E\u4E0D\u7CFB\u7EDF\u8BA1\u6570\u5668\u7C7B\u578B".concat(counterType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3339
3423
|
} else {
|
|
3340
3424
|
return provider;
|
|
3341
3425
|
}
|
|
@@ -3617,7 +3701,7 @@ async function getPortletProvider(model) {
|
|
|
3617
3701
|
}
|
|
3618
3702
|
|
|
3619
3703
|
// src/register/helper/ui-action-register.ts
|
|
3620
|
-
import { RuntimeError as
|
|
3704
|
+
import { RuntimeError as RuntimeError7 } from "@ibiz-template/core";
|
|
3621
3705
|
var UIACTION_PROVIDER_PREFIX = "UIACTION";
|
|
3622
3706
|
function registerUIActionProvider(key, callback) {
|
|
3623
3707
|
ibiz.register.register("".concat(UIACTION_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
@@ -3647,14 +3731,14 @@ async function getUIActionProvider(model) {
|
|
|
3647
3731
|
}
|
|
3648
3732
|
provider = getProvider8(uiactionMode);
|
|
3649
3733
|
if (!provider) {
|
|
3650
|
-
throw new
|
|
3734
|
+
throw new RuntimeError7("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3651
3735
|
} else {
|
|
3652
3736
|
return provider;
|
|
3653
3737
|
}
|
|
3654
3738
|
}
|
|
3655
3739
|
|
|
3656
3740
|
// src/register/helper/ui-logic-node-register.ts
|
|
3657
|
-
import { RuntimeError as
|
|
3741
|
+
import { RuntimeError as RuntimeError8 } from "@ibiz-template/core";
|
|
3658
3742
|
var UILOGINNODE_PROVIDER_PREFIX = "UI_LOGIN_NODE";
|
|
3659
3743
|
function registerUILogicNodeProvider(key, callback) {
|
|
3660
3744
|
ibiz.register.register("".concat(UILOGINNODE_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
@@ -3670,7 +3754,7 @@ async function getUILogicNodeProvider(model) {
|
|
|
3670
3754
|
if (provider) {
|
|
3671
3755
|
return provider;
|
|
3672
3756
|
}
|
|
3673
|
-
throw new
|
|
3757
|
+
throw new RuntimeError8(
|
|
3674
3758
|
"\u627E\u4E0D\u5230\u754C\u9762\u903B\u8F91\u524D\u7AEF\u63D2\u4EF6\u8282\u70B9\uFF0C\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668")
|
|
3675
3759
|
);
|
|
3676
3760
|
}
|
|
@@ -3720,7 +3804,7 @@ async function getViewProvider(model) {
|
|
|
3720
3804
|
}
|
|
3721
3805
|
|
|
3722
3806
|
// src/register/helper/async-action-register.ts
|
|
3723
|
-
import { RuntimeError as
|
|
3807
|
+
import { RuntimeError as RuntimeError9 } from "@ibiz-template/core";
|
|
3724
3808
|
var ASYNC_ACTION_PROVIDER_PREFIX = "ASYNC_ACTION";
|
|
3725
3809
|
function registerAsyncActionProvider(key, callback) {
|
|
3726
3810
|
ibiz.register.register("".concat(ASYNC_ACTION_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
@@ -3733,14 +3817,14 @@ function getProvider10(key) {
|
|
|
3733
3817
|
function getAsyncActionProvider(actiontype) {
|
|
3734
3818
|
const provider = getProvider10(actiontype);
|
|
3735
3819
|
if (!provider) {
|
|
3736
|
-
throw new
|
|
3820
|
+
throw new RuntimeError9("\u627E\u4E0D\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B".concat(actiontype, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3737
3821
|
} else {
|
|
3738
3822
|
return provider;
|
|
3739
3823
|
}
|
|
3740
3824
|
}
|
|
3741
3825
|
|
|
3742
3826
|
// src/platform/provider/platform-provider-base.ts
|
|
3743
|
-
import { downloadFileFromBlob, RuntimeError as
|
|
3827
|
+
import { downloadFileFromBlob, RuntimeError as RuntimeError10 } from "@ibiz-template/core";
|
|
3744
3828
|
var PlatformProviderBase = class {
|
|
3745
3829
|
back() {
|
|
3746
3830
|
throw new Error("Method not implemented.");
|
|
@@ -3758,10 +3842,10 @@ var PlatformProviderBase = class {
|
|
|
3758
3842
|
baseURL: ""
|
|
3759
3843
|
});
|
|
3760
3844
|
if (response.status !== 200) {
|
|
3761
|
-
throw new
|
|
3845
|
+
throw new RuntimeError10("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
|
|
3762
3846
|
}
|
|
3763
3847
|
if (!response.data) {
|
|
3764
|
-
throw new
|
|
3848
|
+
throw new RuntimeError10("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
|
|
3765
3849
|
} else {
|
|
3766
3850
|
const fileName = name;
|
|
3767
3851
|
downloadFileFromBlob(response.data, fileName);
|
|
@@ -3836,7 +3920,7 @@ function getPlatformProvider() {
|
|
|
3836
3920
|
}
|
|
3837
3921
|
|
|
3838
3922
|
// src/register/helper/de-method-register.ts
|
|
3839
|
-
import { RuntimeError as
|
|
3923
|
+
import { RuntimeError as RuntimeError11 } from "@ibiz-template/core";
|
|
3840
3924
|
var DEMETHOD_PROVIDER_PREFIX = "DEMETHOD";
|
|
3841
3925
|
function registerDEMethodProvider(key, callback) {
|
|
3842
3926
|
ibiz.register.register("".concat(DEMETHOD_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
@@ -3862,7 +3946,7 @@ async function getDEMethodProvider(model) {
|
|
|
3862
3946
|
}
|
|
3863
3947
|
provider = getProvider12(methodType);
|
|
3864
3948
|
if (!provider) {
|
|
3865
|
-
throw new
|
|
3949
|
+
throw new RuntimeError11("\u627E\u4E0D\u5B9E\u4F53\u884C\u4E3A\u65B9\u6CD5\u7C7B\u578B\u4E3A".concat(methodType, "\u7684\u9002\u914D\u5668"));
|
|
3866
3950
|
} else {
|
|
3867
3951
|
return provider;
|
|
3868
3952
|
}
|
|
@@ -3904,7 +3988,7 @@ async function getTreeGridExColumnProvider(model) {
|
|
|
3904
3988
|
}
|
|
3905
3989
|
|
|
3906
3990
|
// src/service/utils/app-counter/app-counter.ts
|
|
3907
|
-
import { IBizContext, RuntimeError as
|
|
3991
|
+
import { IBizContext, RuntimeError as RuntimeError12 } from "@ibiz-template/core";
|
|
3908
3992
|
import { notNilEmpty as notNilEmpty5, QXEvent } from "qx-util";
|
|
3909
3993
|
import { clone as clone3 } from "ramda";
|
|
3910
3994
|
var AppCounter = class {
|
|
@@ -4009,7 +4093,7 @@ var AppCounter = class {
|
|
|
4009
4093
|
* @return {*} {Promise<IData>}
|
|
4010
4094
|
*/
|
|
4011
4095
|
async load() {
|
|
4012
|
-
throw new
|
|
4096
|
+
throw new RuntimeError12("\u672A\u5B9E\u73B0\u8BA1\u6570\u5668\u52A0\u8F7D\u65B9\u6CD5");
|
|
4013
4097
|
}
|
|
4014
4098
|
/**
|
|
4015
4099
|
* 计数器刷新
|
|
@@ -4074,7 +4158,7 @@ var AppCounter = class {
|
|
|
4074
4158
|
};
|
|
4075
4159
|
|
|
4076
4160
|
// src/service/utils/app-counter/app-de-counter.ts
|
|
4077
|
-
import { RuntimeModelError as
|
|
4161
|
+
import { RuntimeModelError as RuntimeModelError6 } from "@ibiz-template/core";
|
|
4078
4162
|
var AppDECounter = class extends AppCounter {
|
|
4079
4163
|
/**
|
|
4080
4164
|
* 计数器初始化
|
|
@@ -4088,7 +4172,7 @@ var AppDECounter = class extends AppCounter {
|
|
|
4088
4172
|
this.appDataEntityId = this.model.appDataEntityId;
|
|
4089
4173
|
const action = this.model.getAppDEActionId;
|
|
4090
4174
|
if (!action) {
|
|
4091
|
-
throw new
|
|
4175
|
+
throw new RuntimeModelError6(this.model, "\u672A\u627E\u5230\u83B7\u53D6\u8BA1\u6570\u5668\u884C\u4E3A!");
|
|
4092
4176
|
}
|
|
4093
4177
|
this.action = action;
|
|
4094
4178
|
await super.init(context, params);
|
|
@@ -4130,7 +4214,7 @@ function presetAppCounterProvider() {
|
|
|
4130
4214
|
}
|
|
4131
4215
|
|
|
4132
4216
|
// src/service/utils/de-dq-cond-util/de-dq-cond-util.ts
|
|
4133
|
-
import { ModelError as
|
|
4217
|
+
import { ModelError as ModelError4 } from "@ibiz-template/core";
|
|
4134
4218
|
var DEDQCondUtil = class {
|
|
4135
4219
|
/**
|
|
4136
4220
|
* 根据数据查询获取查询
|
|
@@ -4187,7 +4271,7 @@ var DEDQCondUtil = class {
|
|
|
4187
4271
|
condArr.push("");
|
|
4188
4272
|
}
|
|
4189
4273
|
} else {
|
|
4190
|
-
throw new
|
|
4274
|
+
throw new ModelError4(item, "\u6682\u672A\u652F\u6301\u7684\u67E5\u8BE2\u6761\u4EF6\u7C7B\u578B: ".concat(item.condType));
|
|
4191
4275
|
}
|
|
4192
4276
|
arr.push(condArr);
|
|
4193
4277
|
});
|
|
@@ -4206,7 +4290,7 @@ var DEDQCondUtil = class {
|
|
|
4206
4290
|
DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
|
|
4207
4291
|
|
|
4208
4292
|
// src/service/utils/dynamic-code-list/dynamic-code-list.ts
|
|
4209
|
-
import { ModelError as
|
|
4293
|
+
import { ModelError as ModelError5, RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
4210
4294
|
import { isNil as isNil3 } from "ramda";
|
|
4211
4295
|
var DynamicCodeListCache = class {
|
|
4212
4296
|
constructor(codeList) {
|
|
@@ -4242,7 +4326,7 @@ var DynamicCodeListCache = class {
|
|
|
4242
4326
|
if (predefinedType) {
|
|
4243
4327
|
this.isPredefined = true;
|
|
4244
4328
|
if (!["OPERATOR", "RUNTIME"].includes(predefinedType)) {
|
|
4245
|
-
throw new
|
|
4329
|
+
throw new ModelError5(
|
|
4246
4330
|
this.codeList,
|
|
4247
4331
|
"\u9884\u5B9A\u4E49\u7C7B\u578B".concat(predefinedType, "\u6682\u4E0D\u652F\u6301")
|
|
4248
4332
|
);
|
|
@@ -4351,10 +4435,10 @@ var DynamicCodeListCache = class {
|
|
|
4351
4435
|
return Object.freeze(res2.data.items);
|
|
4352
4436
|
}
|
|
4353
4437
|
if (!appDataEntityId) {
|
|
4354
|
-
throw new
|
|
4438
|
+
throw new RuntimeModelError7(this.codeList, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
4355
4439
|
}
|
|
4356
4440
|
if (!appDEDataSetId) {
|
|
4357
|
-
throw new
|
|
4441
|
+
throw new RuntimeModelError7(this.codeList, "\u672A\u914D\u7F6E\u6570\u636E\u96C6");
|
|
4358
4442
|
}
|
|
4359
4443
|
const res = await app.deService.exec(
|
|
4360
4444
|
appDataEntityId,
|
|
@@ -4446,10 +4530,10 @@ var DynamicCodeListCache = class {
|
|
|
4446
4530
|
// src/service/utils/de-cache/de-cache.ts
|
|
4447
4531
|
import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
|
|
4448
4532
|
import { ascSort, createUUID as createUUID2 } from "qx-util";
|
|
4449
|
-
import { RuntimeError as
|
|
4533
|
+
import { RuntimeError as RuntimeError14 } from "@ibiz-template/core";
|
|
4450
4534
|
|
|
4451
4535
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
4452
|
-
import { RuntimeError as
|
|
4536
|
+
import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
|
|
4453
4537
|
import { isEmpty as isEmpty4, isNil as isNil4 } from "ramda";
|
|
4454
4538
|
function isExistSrfKey(funcName, entity) {
|
|
4455
4539
|
if (entity != null) {
|
|
@@ -4458,14 +4542,14 @@ function isExistSrfKey(funcName, entity) {
|
|
|
4458
4542
|
return true;
|
|
4459
4543
|
}
|
|
4460
4544
|
}
|
|
4461
|
-
throw new
|
|
4545
|
+
throw new RuntimeError13("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfkey\u300D\u65E0\u6CD5\u5904\u7406"));
|
|
4462
4546
|
}
|
|
4463
4547
|
function isExistSessionId(funcName, context) {
|
|
4464
4548
|
const { srfsessionid } = context;
|
|
4465
4549
|
if (!isNil4(srfsessionid) && !isEmpty4(srfsessionid)) {
|
|
4466
4550
|
return true;
|
|
4467
4551
|
}
|
|
4468
|
-
throw new
|
|
4552
|
+
throw new RuntimeError13("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
|
|
4469
4553
|
}
|
|
4470
4554
|
|
|
4471
4555
|
// src/service/utils/de-cache/de-cache.ts
|
|
@@ -4551,7 +4635,7 @@ var DECache = class {
|
|
|
4551
4635
|
if (this.isUnionKey) {
|
|
4552
4636
|
this.calcUnionKey(entity);
|
|
4553
4637
|
if (this.checkData(context, entity.srfkey)) {
|
|
4554
|
-
throw new
|
|
4638
|
+
throw new RuntimeError14(
|
|
4555
4639
|
"\u65B0\u5EFA\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
4556
4640
|
);
|
|
4557
4641
|
}
|
|
@@ -4602,7 +4686,7 @@ var DECache = class {
|
|
|
4602
4686
|
if (this.isUnionKey) {
|
|
4603
4687
|
this.calcUnionKey(entity);
|
|
4604
4688
|
if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
|
|
4605
|
-
throw new
|
|
4689
|
+
throw new RuntimeError14(
|
|
4606
4690
|
"\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
4607
4691
|
);
|
|
4608
4692
|
}
|
|
@@ -4857,6 +4941,9 @@ var DECache = class {
|
|
|
4857
4941
|
* @date 2023-12-22 13:12:17
|
|
4858
4942
|
*/
|
|
4859
4943
|
clear() {
|
|
4944
|
+
this.cacheMap.forEach((item) => {
|
|
4945
|
+
item.destroy();
|
|
4946
|
+
});
|
|
4860
4947
|
this.cacheMap.clear();
|
|
4861
4948
|
}
|
|
4862
4949
|
/**
|
|
@@ -5034,7 +5121,7 @@ function fieldValueToBoolean(value) {
|
|
|
5034
5121
|
}
|
|
5035
5122
|
|
|
5036
5123
|
// src/service/service/code-list/code-list.service.ts
|
|
5037
|
-
import { RuntimeError as
|
|
5124
|
+
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
5038
5125
|
var CodeListService = class {
|
|
5039
5126
|
constructor(appModel) {
|
|
5040
5127
|
this.appModel = appModel;
|
|
@@ -5181,7 +5268,7 @@ var CodeListService = class {
|
|
|
5181
5268
|
async get(tag, context, params) {
|
|
5182
5269
|
const codeList = this.allCodeLists.get(tag);
|
|
5183
5270
|
if (!codeList) {
|
|
5184
|
-
throw new
|
|
5271
|
+
throw new RuntimeError15("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
|
|
5185
5272
|
}
|
|
5186
5273
|
if (codeList.codeListType === "STATIC") {
|
|
5187
5274
|
return this.getStatic(codeList);
|
|
@@ -5245,7 +5332,7 @@ var ConfigService = class {
|
|
|
5245
5332
|
};
|
|
5246
5333
|
|
|
5247
5334
|
// src/service/service/counter/counter.service.ts
|
|
5248
|
-
import { RuntimeModelError as
|
|
5335
|
+
import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
|
|
5249
5336
|
var CounterService = class {
|
|
5250
5337
|
/**
|
|
5251
5338
|
* 获取计数器
|
|
@@ -5284,7 +5371,7 @@ var CounterService = class {
|
|
|
5284
5371
|
static async getCounterByRef(model, context, params) {
|
|
5285
5372
|
const { appCounter } = model;
|
|
5286
5373
|
if (!appCounter) {
|
|
5287
|
-
throw new
|
|
5374
|
+
throw new RuntimeModelError8(model, "\u672A\u914D\u7F6E\u5E94\u7528\u8BA1\u6570\u5668!");
|
|
5288
5375
|
}
|
|
5289
5376
|
return this.getCounter(appCounter, context, params);
|
|
5290
5377
|
}
|
|
@@ -5302,12 +5389,12 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
|
5302
5389
|
|
|
5303
5390
|
// src/service/service/entity/de.service.ts
|
|
5304
5391
|
import {
|
|
5305
|
-
ModelError as
|
|
5306
|
-
RuntimeError as
|
|
5392
|
+
ModelError as ModelError6,
|
|
5393
|
+
RuntimeError as RuntimeError17
|
|
5307
5394
|
} from "@ibiz-template/core";
|
|
5308
5395
|
|
|
5309
5396
|
// src/service/service/work-flow/work-flow.service.ts
|
|
5310
|
-
import { RuntimeError as
|
|
5397
|
+
import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
5311
5398
|
var WorkFlowService = class {
|
|
5312
5399
|
/**
|
|
5313
5400
|
* Creates an instance of WorkFlowService.
|
|
@@ -5627,7 +5714,7 @@ var WorkFlowService = class {
|
|
|
5627
5714
|
case "sendcopy":
|
|
5628
5715
|
return this.wfSendCopy(context, params, data);
|
|
5629
5716
|
default: {
|
|
5630
|
-
throw new
|
|
5717
|
+
throw new RuntimeError16("\u300C".concat(methodName, "\u300D\u672A\u5B9E\u73B0"));
|
|
5631
5718
|
}
|
|
5632
5719
|
}
|
|
5633
5720
|
}
|
|
@@ -5668,7 +5755,7 @@ var FileService = class {
|
|
|
5668
5755
|
|
|
5669
5756
|
// src/service/app-data-entity/app-data-entity.ts
|
|
5670
5757
|
import { clone as clone5, isNil as isNil7 } from "ramda";
|
|
5671
|
-
import { DataTypes } from "@ibiz-template/core";
|
|
5758
|
+
import { DataTypes, HistoryList } from "@ibiz-template/core";
|
|
5672
5759
|
import { createUUID as createUUID3 } from "qx-util";
|
|
5673
5760
|
|
|
5674
5761
|
// src/service/constant/srfuf.ts
|
|
@@ -5692,6 +5779,9 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
5692
5779
|
* @param {(IData | AppDataEntity)} [data={}]
|
|
5693
5780
|
*/
|
|
5694
5781
|
constructor(entity, data = {}) {
|
|
5782
|
+
let history = new HistoryList(
|
|
5783
|
+
data instanceof _AppDataEntity ? clone5(data._data) : clone5(data)
|
|
5784
|
+
);
|
|
5695
5785
|
Object.defineProperty(this, "_entity", {
|
|
5696
5786
|
enumerable: false,
|
|
5697
5787
|
configurable: true,
|
|
@@ -5700,7 +5790,19 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
5700
5790
|
Object.defineProperty(this, "_data", {
|
|
5701
5791
|
enumerable: false,
|
|
5702
5792
|
configurable: true,
|
|
5703
|
-
|
|
5793
|
+
get() {
|
|
5794
|
+
return history.data;
|
|
5795
|
+
}
|
|
5796
|
+
});
|
|
5797
|
+
Object.defineProperty(this, "history", {
|
|
5798
|
+
enumerable: false,
|
|
5799
|
+
configurable: true,
|
|
5800
|
+
set(v) {
|
|
5801
|
+
history = v;
|
|
5802
|
+
},
|
|
5803
|
+
get() {
|
|
5804
|
+
return history;
|
|
5805
|
+
}
|
|
5704
5806
|
});
|
|
5705
5807
|
Object.defineProperty(this, "srfdeid", {
|
|
5706
5808
|
get() {
|
|
@@ -5773,17 +5875,18 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
5773
5875
|
*/
|
|
5774
5876
|
defineProperties() {
|
|
5775
5877
|
var _a;
|
|
5776
|
-
const
|
|
5878
|
+
const self = this;
|
|
5879
|
+
const { convertVal } = this;
|
|
5777
5880
|
const properties = {};
|
|
5778
|
-
const keys = Object.keys(_data);
|
|
5881
|
+
const keys = Object.keys(this._data);
|
|
5779
5882
|
keys.forEach((key) => {
|
|
5780
5883
|
properties[key] = {
|
|
5781
5884
|
enumerable: true,
|
|
5782
5885
|
set(val) {
|
|
5783
|
-
_data[key] = val;
|
|
5886
|
+
self._data[key] = val;
|
|
5784
5887
|
},
|
|
5785
5888
|
get() {
|
|
5786
|
-
return _data[key];
|
|
5889
|
+
return self._data[key];
|
|
5787
5890
|
}
|
|
5788
5891
|
};
|
|
5789
5892
|
});
|
|
@@ -5792,13 +5895,13 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
5792
5895
|
properties[key] = {
|
|
5793
5896
|
enumerable: true,
|
|
5794
5897
|
set(val) {
|
|
5795
|
-
_data[key] = convertVal(val, field.stdDataType);
|
|
5898
|
+
self._data[key] = convertVal(val, field.stdDataType);
|
|
5796
5899
|
},
|
|
5797
5900
|
get() {
|
|
5798
|
-
return _data[key];
|
|
5901
|
+
return self._data[key];
|
|
5799
5902
|
}
|
|
5800
5903
|
};
|
|
5801
|
-
_data[key] = convertVal(_data[key], field.stdDataType);
|
|
5904
|
+
self._data[key] = convertVal(self._data[key], field.stdDataType);
|
|
5802
5905
|
});
|
|
5803
5906
|
Object.defineProperties(this, properties);
|
|
5804
5907
|
}
|
|
@@ -5810,8 +5913,9 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
5810
5913
|
* @return {*} {AppDataEntity}
|
|
5811
5914
|
*/
|
|
5812
5915
|
clone() {
|
|
5813
|
-
const entity = new _AppDataEntity(this._entity
|
|
5916
|
+
const entity = new _AppDataEntity(this._entity);
|
|
5814
5917
|
entity.srfkey = this.srfkey;
|
|
5918
|
+
entity.history = clone5(this.history);
|
|
5815
5919
|
return entity;
|
|
5816
5920
|
}
|
|
5817
5921
|
/**
|
|
@@ -5834,9 +5938,23 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
5834
5938
|
delete _data[key];
|
|
5835
5939
|
}
|
|
5836
5940
|
});
|
|
5837
|
-
|
|
5941
|
+
this.history.assign(_data);
|
|
5838
5942
|
return this;
|
|
5839
5943
|
}
|
|
5944
|
+
/**
|
|
5945
|
+
* 实体对象销毁
|
|
5946
|
+
*
|
|
5947
|
+
* @author chitanda
|
|
5948
|
+
* @date 2023-12-28 21:12:24
|
|
5949
|
+
*/
|
|
5950
|
+
destroy() {
|
|
5951
|
+
this.history.destroy();
|
|
5952
|
+
Object.defineProperty(this, "_entity", {
|
|
5953
|
+
enumerable: false,
|
|
5954
|
+
configurable: true,
|
|
5955
|
+
value: null
|
|
5956
|
+
});
|
|
5957
|
+
}
|
|
5840
5958
|
/**
|
|
5841
5959
|
* 根据属性的数据类型转换值
|
|
5842
5960
|
* @author lxm
|
|
@@ -5922,7 +6040,7 @@ var DEService = class {
|
|
|
5922
6040
|
const model = findModelChild(this.model.appDEMethods, id);
|
|
5923
6041
|
const provider = await getDEMethodProvider(model);
|
|
5924
6042
|
if (!provider) {
|
|
5925
|
-
throw new
|
|
6043
|
+
throw new ModelError6(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
|
|
5926
6044
|
}
|
|
5927
6045
|
const method = provider.create(this, this.model, model, {
|
|
5928
6046
|
acMode,
|
|
@@ -5947,7 +6065,7 @@ var DEService = class {
|
|
|
5947
6065
|
if (method) {
|
|
5948
6066
|
return method.exec(context, params, params2);
|
|
5949
6067
|
}
|
|
5950
|
-
throw new
|
|
6068
|
+
throw new RuntimeError17("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
5951
6069
|
}
|
|
5952
6070
|
getDraft(context, params, params2) {
|
|
5953
6071
|
return this.exec("GetDraft", context, params, params2);
|
|
@@ -6011,7 +6129,7 @@ var DEService = class {
|
|
|
6011
6129
|
if (method) {
|
|
6012
6130
|
return method.exec(context, params, params2);
|
|
6013
6131
|
}
|
|
6014
|
-
throw new
|
|
6132
|
+
throw new RuntimeError17("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
6015
6133
|
}
|
|
6016
6134
|
/**
|
|
6017
6135
|
* 实体级别 AI 聊天会话
|
|
@@ -6401,7 +6519,7 @@ var ControlService = class {
|
|
|
6401
6519
|
};
|
|
6402
6520
|
|
|
6403
6521
|
// src/service/service/control/md-control.service.ts
|
|
6404
|
-
import { RuntimeError as
|
|
6522
|
+
import { RuntimeError as RuntimeError18 } from "@ibiz-template/core";
|
|
6405
6523
|
import { isArray as isArray3 } from "qx-util";
|
|
6406
6524
|
var MDControlService = class extends ControlService {
|
|
6407
6525
|
/**
|
|
@@ -6530,7 +6648,7 @@ var MDControlService = class extends ControlService {
|
|
|
6530
6648
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6531
6649
|
*/
|
|
6532
6650
|
async exportData(_dataExport, _context, _params = {}) {
|
|
6533
|
-
throw new
|
|
6651
|
+
throw new RuntimeError18("\u672A\u5B9E\u73B0");
|
|
6534
6652
|
}
|
|
6535
6653
|
/**
|
|
6536
6654
|
* 处理响应
|
|
@@ -6565,7 +6683,7 @@ var MDControlService = class extends ControlService {
|
|
|
6565
6683
|
};
|
|
6566
6684
|
|
|
6567
6685
|
// src/service/service/authority/authority.service.ts
|
|
6568
|
-
import { RuntimeError as
|
|
6686
|
+
import { RuntimeError as RuntimeError19 } from "@ibiz-template/core";
|
|
6569
6687
|
|
|
6570
6688
|
// src/service/service/authority/de-authority.service.ts
|
|
6571
6689
|
var DeAuthorityService = class {
|
|
@@ -6701,7 +6819,7 @@ var AuthorityService = class {
|
|
|
6701
6819
|
this.appModel.appId
|
|
6702
6820
|
);
|
|
6703
6821
|
if (!entityModel) {
|
|
6704
|
-
throw new
|
|
6822
|
+
throw new RuntimeError19("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
6705
6823
|
}
|
|
6706
6824
|
const constructor = this.constructorCache.get(id);
|
|
6707
6825
|
let service;
|
|
@@ -6890,18 +7008,18 @@ var AsyncActionService = class {
|
|
|
6890
7008
|
|
|
6891
7009
|
// src/service/service/entity/method/de-action.ts
|
|
6892
7010
|
import {
|
|
6893
|
-
HttpError as
|
|
7011
|
+
HttpError as HttpError5,
|
|
6894
7012
|
HttpResponse as HttpResponse3,
|
|
6895
|
-
RuntimeError as
|
|
6896
|
-
RuntimeModelError as
|
|
7013
|
+
RuntimeError as RuntimeError21,
|
|
7014
|
+
RuntimeModelError as RuntimeModelError20
|
|
6897
7015
|
} from "@ibiz-template/core";
|
|
6898
7016
|
import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
|
|
6899
7017
|
|
|
6900
7018
|
// src/service/service/entity/method/method.ts
|
|
6901
|
-
import { RuntimeModelError as
|
|
7019
|
+
import { RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
|
|
6902
7020
|
|
|
6903
7021
|
// src/service/dto/method.dto.ts
|
|
6904
|
-
import { ModelError as
|
|
7022
|
+
import { ModelError as ModelError7 } from "@ibiz-template/core";
|
|
6905
7023
|
var MethodDto = class _MethodDto {
|
|
6906
7024
|
constructor(service, entity, isLocalMode, dto) {
|
|
6907
7025
|
this.service = service;
|
|
@@ -7022,7 +7140,7 @@ var MethodDto = class _MethodDto {
|
|
|
7022
7140
|
break;
|
|
7023
7141
|
}
|
|
7024
7142
|
default:
|
|
7025
|
-
throw new
|
|
7143
|
+
throw new ModelError7(
|
|
7026
7144
|
field,
|
|
7027
7145
|
"\u672A\u652F\u6301\u7684\u5E94\u7528\u5B9E\u4F53\u65B9\u6CD5\u8F93\u5165\u5C5E\u6027\u7C7B\u578B: ".concat(field.type)
|
|
7028
7146
|
);
|
|
@@ -7310,17 +7428,17 @@ var Method = class {
|
|
|
7310
7428
|
break;
|
|
7311
7429
|
default:
|
|
7312
7430
|
if (requestMethod) {
|
|
7313
|
-
throw new
|
|
7431
|
+
throw new RuntimeModelError9(
|
|
7314
7432
|
this.method,
|
|
7315
7433
|
"\u672A\u652F\u6301\u7684\u8BF7\u6C42\u65B9\u5F0F: ".concat(requestMethod)
|
|
7316
7434
|
);
|
|
7317
7435
|
} else {
|
|
7318
|
-
throw new
|
|
7436
|
+
throw new RuntimeModelError9(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
|
|
7319
7437
|
}
|
|
7320
7438
|
}
|
|
7321
7439
|
return res;
|
|
7322
7440
|
}
|
|
7323
|
-
throw new
|
|
7441
|
+
throw new RuntimeModelError9(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
|
|
7324
7442
|
}
|
|
7325
7443
|
mergeRequestPath(path2, methodName) {
|
|
7326
7444
|
return "".concat(path2, "/").concat(methodName);
|
|
@@ -7353,12 +7471,12 @@ var Method = class {
|
|
|
7353
7471
|
};
|
|
7354
7472
|
|
|
7355
7473
|
// src/de-logic/index.ts
|
|
7356
|
-
import { HttpError as
|
|
7474
|
+
import { HttpError as HttpError4, HttpResponse as HttpResponse2, RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
7357
7475
|
import { isArray as isArray5 } from "lodash-es";
|
|
7358
7476
|
import { clone as clone12 } from "ramda";
|
|
7359
7477
|
|
|
7360
7478
|
// src/de-logic/de-logic.ts
|
|
7361
|
-
import { ModelError as
|
|
7479
|
+
import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError19 } from "@ibiz-template/core";
|
|
7362
7480
|
|
|
7363
7481
|
// src/de-logic/de-logic-context.ts
|
|
7364
7482
|
import { isArray as isArray4 } from "lodash-es";
|
|
@@ -7490,17 +7608,17 @@ var DELogicContext = class {
|
|
|
7490
7608
|
};
|
|
7491
7609
|
|
|
7492
7610
|
// src/de-logic/de-logic-node/de-action-node/de-action-node.ts
|
|
7493
|
-
import { RuntimeModelError as
|
|
7611
|
+
import { RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
|
|
7494
7612
|
|
|
7495
7613
|
// src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts
|
|
7496
|
-
import { RuntimeModelError as
|
|
7614
|
+
import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
|
|
7497
7615
|
|
|
7498
7616
|
// src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts
|
|
7499
7617
|
var DELogicLinkCond = class {
|
|
7500
7618
|
};
|
|
7501
7619
|
|
|
7502
7620
|
// src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts
|
|
7503
|
-
import { ModelError as
|
|
7621
|
+
import { ModelError as ModelError8, RuntimeModelError as RuntimeModelError10 } from "@ibiz-template/core";
|
|
7504
7622
|
var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
7505
7623
|
constructor(model) {
|
|
7506
7624
|
super();
|
|
@@ -7547,7 +7665,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7547
7665
|
switch (this.type) {
|
|
7548
7666
|
case "ENTITYFIELD": {
|
|
7549
7667
|
if (!this.value) {
|
|
7550
|
-
throw new
|
|
7668
|
+
throw new RuntimeModelError10(
|
|
7551
7669
|
this.model,
|
|
7552
7670
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
7553
7671
|
);
|
|
@@ -7557,7 +7675,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7557
7675
|
}
|
|
7558
7676
|
case "SRCENTITYFIELD": {
|
|
7559
7677
|
if (!this.value) {
|
|
7560
|
-
throw new
|
|
7678
|
+
throw new RuntimeModelError10(
|
|
7561
7679
|
this.model,
|
|
7562
7680
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
7563
7681
|
);
|
|
@@ -7566,7 +7684,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7566
7684
|
return testCond(dst[this.dstField], this.op, src[this.value]);
|
|
7567
7685
|
}
|
|
7568
7686
|
case "CURTIME":
|
|
7569
|
-
throw new
|
|
7687
|
+
throw new ModelError8(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
|
|
7570
7688
|
default:
|
|
7571
7689
|
return testCond(dst[this.dstField], this.op, this.value);
|
|
7572
7690
|
}
|
|
@@ -7620,7 +7738,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
|
|
|
7620
7738
|
test(ctx, context, data) {
|
|
7621
7739
|
let bol = true;
|
|
7622
7740
|
if (this.conds.length === 0) {
|
|
7623
|
-
throw new
|
|
7741
|
+
throw new RuntimeModelError11(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
7624
7742
|
}
|
|
7625
7743
|
for (let i = 0; i < this.conds.length; i++) {
|
|
7626
7744
|
const cond = this.conds[i];
|
|
@@ -7723,10 +7841,10 @@ var DEActionNode = class extends DELogicNode {
|
|
|
7723
7841
|
retDELogicParamId
|
|
7724
7842
|
} = this.model;
|
|
7725
7843
|
if (!dstAppDataEntityId) {
|
|
7726
|
-
throw new
|
|
7844
|
+
throw new RuntimeModelError12(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
7727
7845
|
}
|
|
7728
7846
|
if (!dstAppDEActionId) {
|
|
7729
|
-
throw new
|
|
7847
|
+
throw new RuntimeModelError12(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
7730
7848
|
}
|
|
7731
7849
|
const requestData = ctx.params[dstDELogicParamId];
|
|
7732
7850
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -7750,7 +7868,7 @@ var StartNode = class extends DELogicNode {
|
|
|
7750
7868
|
};
|
|
7751
7869
|
|
|
7752
7870
|
// src/de-logic/de-logic-node/end-node/end-node.ts
|
|
7753
|
-
import { ModelError as
|
|
7871
|
+
import { ModelError as ModelError9 } from "@ibiz-template/core";
|
|
7754
7872
|
var EndNode = class extends DELogicNode {
|
|
7755
7873
|
async exec(ctx) {
|
|
7756
7874
|
ctx.isEndNode = true;
|
|
@@ -7774,7 +7892,7 @@ var EndNode = class extends DELogicNode {
|
|
|
7774
7892
|
case "LOGICPARAMFIELD":
|
|
7775
7893
|
case "BREAK":
|
|
7776
7894
|
default:
|
|
7777
|
-
throw new
|
|
7895
|
+
throw new ModelError9(
|
|
7778
7896
|
this.model,
|
|
7779
7897
|
"\u6682\u672A\u652F\u6301\u7684\u7ED3\u675F\u8282\u70B9\u8FD4\u56DE\u503C\u7C7B\u578B: ".concat(returnType)
|
|
7780
7898
|
);
|
|
@@ -7783,11 +7901,11 @@ var EndNode = class extends DELogicNode {
|
|
|
7783
7901
|
};
|
|
7784
7902
|
|
|
7785
7903
|
// src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts
|
|
7786
|
-
import { ModelError as
|
|
7904
|
+
import { ModelError as ModelError11 } from "@ibiz-template/core";
|
|
7787
7905
|
import { clone as clone9 } from "ramda";
|
|
7788
7906
|
|
|
7789
7907
|
// src/de-logic/utils/handle-src-val.ts
|
|
7790
|
-
import { ModelError as
|
|
7908
|
+
import { ModelError as ModelError10 } from "@ibiz-template/core";
|
|
7791
7909
|
import { clone as clone8 } from "ramda";
|
|
7792
7910
|
function handleSrcVal(ctx, srcValParams) {
|
|
7793
7911
|
const { srcDELogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
@@ -7821,7 +7939,7 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
7821
7939
|
value = clone8(ibiz.env);
|
|
7822
7940
|
break;
|
|
7823
7941
|
default:
|
|
7824
|
-
throw new
|
|
7942
|
+
throw new ModelError10(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
7825
7943
|
}
|
|
7826
7944
|
if (value && srcField) {
|
|
7827
7945
|
try {
|
|
@@ -7868,7 +7986,7 @@ var PrepareParamNode = class extends DELogicNode {
|
|
|
7868
7986
|
case "SORTPARAM":
|
|
7869
7987
|
return this.sortParam(nodeParam, ctx);
|
|
7870
7988
|
default:
|
|
7871
|
-
throw new
|
|
7989
|
+
throw new ModelError11(
|
|
7872
7990
|
nodeParam,
|
|
7873
7991
|
"\u6682\u672A\u652F\u6301\u903B\u8F91\u5904\u7406\u53C2\u6570\u64CD\u4F5C".concat(nodeParam.paramAction)
|
|
7874
7992
|
);
|
|
@@ -8010,12 +8128,12 @@ var DataSetNode = class extends DELogicNode {
|
|
|
8010
8128
|
};
|
|
8011
8129
|
|
|
8012
8130
|
// src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts
|
|
8013
|
-
import { RuntimeModelError as
|
|
8131
|
+
import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
|
|
8014
8132
|
var BindParamNode = class extends DELogicNode {
|
|
8015
8133
|
async exec(ctx) {
|
|
8016
8134
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
8017
8135
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8018
|
-
throw new
|
|
8136
|
+
throw new RuntimeModelError13(
|
|
8019
8137
|
this.model,
|
|
8020
8138
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8021
8139
|
);
|
|
@@ -8026,37 +8144,37 @@ var BindParamNode = class extends DELogicNode {
|
|
|
8026
8144
|
};
|
|
8027
8145
|
|
|
8028
8146
|
// src/de-logic/de-logic-node/reset-param-node/reset-param-node.ts
|
|
8029
|
-
import { RuntimeModelError as
|
|
8147
|
+
import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
|
|
8030
8148
|
var ResetParamNode = class extends DELogicNode {
|
|
8031
8149
|
async exec(ctx) {
|
|
8032
8150
|
const { dstDELogicParamId } = this.model;
|
|
8033
8151
|
if (!dstDELogicParamId) {
|
|
8034
|
-
throw new
|
|
8152
|
+
throw new RuntimeModelError14(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
8035
8153
|
}
|
|
8036
8154
|
ctx.resetParam(dstDELogicParamId);
|
|
8037
8155
|
}
|
|
8038
8156
|
};
|
|
8039
8157
|
|
|
8040
8158
|
// src/de-logic/de-logic-node/renew-param-node/renew-param-node.ts
|
|
8041
|
-
import { RuntimeModelError as
|
|
8159
|
+
import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
|
|
8042
8160
|
var RenewParamNode = class extends DELogicNode {
|
|
8043
8161
|
async exec(ctx) {
|
|
8044
8162
|
const { dstDELogicParamId } = this.model;
|
|
8045
8163
|
if (!dstDELogicParamId) {
|
|
8046
|
-
throw new
|
|
8164
|
+
throw new RuntimeModelError15(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
8047
8165
|
}
|
|
8048
8166
|
ctx.renewParam(dstDELogicParamId);
|
|
8049
8167
|
}
|
|
8050
8168
|
};
|
|
8051
8169
|
|
|
8052
8170
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
8053
|
-
import { RuntimeModelError as
|
|
8171
|
+
import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
|
|
8054
8172
|
import { clone as clone10 } from "ramda";
|
|
8055
8173
|
var CopyParamNode = class extends DELogicNode {
|
|
8056
8174
|
async exec(ctx) {
|
|
8057
8175
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
8058
8176
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8059
|
-
throw new
|
|
8177
|
+
throw new RuntimeModelError16(
|
|
8060
8178
|
this.model,
|
|
8061
8179
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8062
8180
|
);
|
|
@@ -8067,12 +8185,12 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
8067
8185
|
};
|
|
8068
8186
|
|
|
8069
8187
|
// src/de-logic/de-logic-node/sort-param-node/sort-param-node.ts
|
|
8070
|
-
import { RuntimeModelError as
|
|
8188
|
+
import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
|
|
8071
8189
|
var SortParamNode = class extends DELogicNode {
|
|
8072
8190
|
async exec(ctx) {
|
|
8073
8191
|
const { dstDELogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
8074
8192
|
if (!dstDELogicParamId || !dstFieldName) {
|
|
8075
|
-
throw new
|
|
8193
|
+
throw new RuntimeModelError17(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
8076
8194
|
}
|
|
8077
8195
|
const key = dstFieldName.toLowerCase();
|
|
8078
8196
|
const arr = ctx.params[dstDELogicParamId];
|
|
@@ -8083,7 +8201,7 @@ var SortParamNode = class extends DELogicNode {
|
|
|
8083
8201
|
};
|
|
8084
8202
|
|
|
8085
8203
|
// src/de-logic/de-logic-node/append-param-node/append-param-node.ts
|
|
8086
|
-
import { RuntimeModelError as
|
|
8204
|
+
import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
8087
8205
|
var AppendParamNode = class extends DELogicNode {
|
|
8088
8206
|
async exec(ctx) {
|
|
8089
8207
|
const {
|
|
@@ -8094,7 +8212,7 @@ var AppendParamNode = class extends DELogicNode {
|
|
|
8094
8212
|
srcSize
|
|
8095
8213
|
} = this.model;
|
|
8096
8214
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8097
|
-
throw new
|
|
8215
|
+
throw new RuntimeModelError18(
|
|
8098
8216
|
this.model,
|
|
8099
8217
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8100
8218
|
);
|
|
@@ -8112,11 +8230,11 @@ var AppendParamNode = class extends DELogicNode {
|
|
|
8112
8230
|
};
|
|
8113
8231
|
|
|
8114
8232
|
// src/de-logic/de-logic-node/throw-exception-node/throw-exception-node.ts
|
|
8115
|
-
import { HttpError as
|
|
8233
|
+
import { HttpError as HttpError3 } from "@ibiz-template/core";
|
|
8116
8234
|
var ThrowExceptionNode = class extends DELogicNode {
|
|
8117
8235
|
async exec(_ctx) {
|
|
8118
8236
|
const { errorCode, errorInfo } = this.model;
|
|
8119
|
-
throw new
|
|
8237
|
+
throw new HttpError3({
|
|
8120
8238
|
response: {
|
|
8121
8239
|
status: errorCode,
|
|
8122
8240
|
statusText: errorInfo
|
|
@@ -8127,7 +8245,7 @@ var ThrowExceptionNode = class extends DELogicNode {
|
|
|
8127
8245
|
};
|
|
8128
8246
|
|
|
8129
8247
|
// src/de-logic/de-logic-param/de-logic-param.ts
|
|
8130
|
-
import { ModelError as
|
|
8248
|
+
import { ModelError as ModelError12 } from "@ibiz-template/core";
|
|
8131
8249
|
import { clone as clone11 } from "ramda";
|
|
8132
8250
|
var DELogicParam = class {
|
|
8133
8251
|
/**
|
|
@@ -8164,7 +8282,7 @@ var DELogicParam = class {
|
|
|
8164
8282
|
} else if (m.entityListParam) {
|
|
8165
8283
|
ctx.params[tag] = [];
|
|
8166
8284
|
} else if (m.entityPageParam) {
|
|
8167
|
-
throw new
|
|
8285
|
+
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5206\u9875\u67E5\u8BE2\u7ED3\u679C");
|
|
8168
8286
|
} else if (m.entityParam) {
|
|
8169
8287
|
ctx.params[tag] = {};
|
|
8170
8288
|
} else if (m.lastReturnParam) {
|
|
@@ -8178,19 +8296,19 @@ var DELogicParam = class {
|
|
|
8178
8296
|
} else if (m.cloneParam) {
|
|
8179
8297
|
ctx.params[tag] = clone11(ctx.data || {});
|
|
8180
8298
|
} else if (m.envParam) {
|
|
8181
|
-
throw new
|
|
8299
|
+
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF");
|
|
8182
8300
|
} else if (m.fileListParam) {
|
|
8183
|
-
throw new
|
|
8301
|
+
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u6587\u4EF6\u5BF9\u8C61\u5217\u8868\u53D8\u91CF");
|
|
8184
8302
|
} else if (m.fileParam) {
|
|
8185
|
-
throw new
|
|
8303
|
+
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u6587\u4EF6\u5BF9\u8C61\u53D8\u91CF");
|
|
8186
8304
|
} else if (m.filterParam) {
|
|
8187
|
-
throw new
|
|
8305
|
+
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u8FC7\u6EE4\u5668\u5BF9\u8C61\u53D8\u91CF");
|
|
8188
8306
|
} else if (m.lastParam) {
|
|
8189
|
-
throw new
|
|
8307
|
+
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u6700\u540E\u6570\u636E\u53D8\u91CF");
|
|
8190
8308
|
} else if (m.originEntity) {
|
|
8191
|
-
throw new
|
|
8309
|
+
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u539F\u59CB\u6570\u636E\u5BF9\u8C61");
|
|
8192
8310
|
} else if (m.sessionParam) {
|
|
8193
|
-
throw new
|
|
8311
|
+
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u64CD\u4F5C\u4F1A\u8BDD\u53D8\u91CF");
|
|
8194
8312
|
}
|
|
8195
8313
|
}
|
|
8196
8314
|
/**
|
|
@@ -8207,7 +8325,7 @@ var DELogicParam = class {
|
|
|
8207
8325
|
} else if (m.simpleParam || m.entityParam) {
|
|
8208
8326
|
ctx.params[tag] = {};
|
|
8209
8327
|
} else {
|
|
8210
|
-
throw new
|
|
8328
|
+
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
|
|
8211
8329
|
}
|
|
8212
8330
|
}
|
|
8213
8331
|
};
|
|
@@ -8243,7 +8361,7 @@ var DELogic = class {
|
|
|
8243
8361
|
var _a, _b;
|
|
8244
8362
|
if (model.customCode) {
|
|
8245
8363
|
if (!model.scriptCode) {
|
|
8246
|
-
throw new
|
|
8364
|
+
throw new RuntimeModelError19(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
8247
8365
|
}
|
|
8248
8366
|
this.scriptFn = ScriptFactory.createScriptFn([], model.scriptCode, {
|
|
8249
8367
|
isAsync: true
|
|
@@ -8251,7 +8369,7 @@ var DELogic = class {
|
|
|
8251
8369
|
return;
|
|
8252
8370
|
}
|
|
8253
8371
|
if (!((_a = model.delogicNodes) == null ? void 0 : _a.length)) {
|
|
8254
|
-
throw new
|
|
8372
|
+
throw new RuntimeModelError19(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
8255
8373
|
}
|
|
8256
8374
|
model.delogicNodes.forEach((node) => {
|
|
8257
8375
|
const { logicNodeType } = node;
|
|
@@ -8294,7 +8412,7 @@ var DELogic = class {
|
|
|
8294
8412
|
logicNode = new SortParamNode(node);
|
|
8295
8413
|
break;
|
|
8296
8414
|
default:
|
|
8297
|
-
throw new
|
|
8415
|
+
throw new ModelError13(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
|
|
8298
8416
|
}
|
|
8299
8417
|
this.nodes.set(node.id, logicNode);
|
|
8300
8418
|
});
|
|
@@ -8350,7 +8468,7 @@ var DELogic = class {
|
|
|
8350
8468
|
const start = this.nodes.get(startDELogicNodeId);
|
|
8351
8469
|
await this.deepExec(start, ctx);
|
|
8352
8470
|
} else {
|
|
8353
|
-
throw new
|
|
8471
|
+
throw new RuntimeModelError19(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
8354
8472
|
}
|
|
8355
8473
|
if (ctx.isEndNode) {
|
|
8356
8474
|
return ctx.result;
|
|
@@ -8406,7 +8524,7 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
|
|
|
8406
8524
|
context.srfappid
|
|
8407
8525
|
);
|
|
8408
8526
|
if (!deLogic) {
|
|
8409
|
-
throw new
|
|
8527
|
+
throw new RuntimeError20("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
|
|
8410
8528
|
}
|
|
8411
8529
|
return execDELogic(deLogic, context, data, params);
|
|
8412
8530
|
}
|
|
@@ -8418,7 +8536,7 @@ async function execDELogicAction(deDELogic, context, data, params) {
|
|
|
8418
8536
|
const result = await execDELogic(deDELogic, _context, _data, _params);
|
|
8419
8537
|
return new HttpResponse2(result);
|
|
8420
8538
|
} catch (err) {
|
|
8421
|
-
if (err instanceof
|
|
8539
|
+
if (err instanceof HttpError4) {
|
|
8422
8540
|
return new HttpResponse2(err, 500);
|
|
8423
8541
|
}
|
|
8424
8542
|
throw err;
|
|
@@ -8475,7 +8593,7 @@ var DEActionMethod = class extends Method {
|
|
|
8475
8593
|
if (this.method.actionType === "DELOGIC") {
|
|
8476
8594
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
8477
8595
|
if (!deLogic) {
|
|
8478
|
-
throw new
|
|
8596
|
+
throw new RuntimeModelError20(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
|
|
8479
8597
|
}
|
|
8480
8598
|
return execDELogicAction(deLogic, context, data, params);
|
|
8481
8599
|
}
|
|
@@ -8553,7 +8671,7 @@ var DEActionMethod = class extends Method {
|
|
|
8553
8671
|
*/
|
|
8554
8672
|
async create(context, data, params) {
|
|
8555
8673
|
if (!data) {
|
|
8556
|
-
throw new
|
|
8674
|
+
throw new RuntimeError21("create\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
8557
8675
|
}
|
|
8558
8676
|
if (this.isLocalMode) {
|
|
8559
8677
|
return this.createTemp(context, this.createEntity(data));
|
|
@@ -8595,7 +8713,7 @@ var DEActionMethod = class extends Method {
|
|
|
8595
8713
|
*/
|
|
8596
8714
|
async update(context, data, params) {
|
|
8597
8715
|
if (!data) {
|
|
8598
|
-
throw new
|
|
8716
|
+
throw new RuntimeError21("update\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
8599
8717
|
}
|
|
8600
8718
|
if (this.isLocalMode) {
|
|
8601
8719
|
return this.updateTemp(context, this.createEntity(data));
|
|
@@ -8670,7 +8788,7 @@ var DEActionMethod = class extends Method {
|
|
|
8670
8788
|
}
|
|
8671
8789
|
return new HttpResponse3(resultData);
|
|
8672
8790
|
} catch (err) {
|
|
8673
|
-
throw new
|
|
8791
|
+
throw new HttpError5(err);
|
|
8674
8792
|
}
|
|
8675
8793
|
}
|
|
8676
8794
|
/**
|
|
@@ -8716,7 +8834,7 @@ var DEActionMethod = class extends Method {
|
|
|
8716
8834
|
}
|
|
8717
8835
|
return new HttpResponse3(data, 500);
|
|
8718
8836
|
} catch (err) {
|
|
8719
|
-
throw new
|
|
8837
|
+
throw new HttpError5(err);
|
|
8720
8838
|
}
|
|
8721
8839
|
}
|
|
8722
8840
|
/**
|
|
@@ -8744,7 +8862,7 @@ var DEActionMethod = class extends Method {
|
|
|
8744
8862
|
}
|
|
8745
8863
|
return new HttpResponse3(resultData, 500);
|
|
8746
8864
|
} catch (err) {
|
|
8747
|
-
throw new
|
|
8865
|
+
throw new HttpError5(err);
|
|
8748
8866
|
}
|
|
8749
8867
|
}
|
|
8750
8868
|
/**
|
|
@@ -8770,7 +8888,7 @@ var DEActionMethod = class extends Method {
|
|
|
8770
8888
|
}
|
|
8771
8889
|
return new HttpResponse3(data, 500);
|
|
8772
8890
|
} catch (err) {
|
|
8773
|
-
throw new
|
|
8891
|
+
throw new HttpError5(err);
|
|
8774
8892
|
}
|
|
8775
8893
|
}
|
|
8776
8894
|
/**
|
|
@@ -8795,8 +8913,8 @@ var DeActionDeMethodProvider = class {
|
|
|
8795
8913
|
// src/service/service/entity/method/fetch.ts
|
|
8796
8914
|
import {
|
|
8797
8915
|
HttpResponse as HttpResponse4,
|
|
8798
|
-
ModelError as
|
|
8799
|
-
RuntimeModelError as
|
|
8916
|
+
ModelError as ModelError14,
|
|
8917
|
+
RuntimeModelError as RuntimeModelError21
|
|
8800
8918
|
} from "@ibiz-template/core";
|
|
8801
8919
|
import { isArray as isArray7 } from "lodash-es";
|
|
8802
8920
|
import { clone as clone13, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
|
|
@@ -8825,7 +8943,7 @@ var FetchMethod = class extends Method {
|
|
|
8825
8943
|
}
|
|
8826
8944
|
break;
|
|
8827
8945
|
default:
|
|
8828
|
-
throw new
|
|
8946
|
+
throw new ModelError14(
|
|
8829
8947
|
this.method,
|
|
8830
8948
|
"\u6570\u636E\u6765\u6E90\u7C7B\u578B".concat(this.method.dataSetType, "\u6682\u672A\u652F\u6301")
|
|
8831
8949
|
);
|
|
@@ -8904,7 +9022,7 @@ var FetchMethod = class extends Method {
|
|
|
8904
9022
|
async fetchCodeListSet(context, params) {
|
|
8905
9023
|
const { appCodeListId } = this.method;
|
|
8906
9024
|
if (!appCodeListId) {
|
|
8907
|
-
throw new
|
|
9025
|
+
throw new RuntimeModelError21(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
|
|
8908
9026
|
}
|
|
8909
9027
|
const codeItems = await this.app.codeList.get(
|
|
8910
9028
|
appCodeListId,
|
|
@@ -9716,7 +9834,7 @@ var MqttService = class {
|
|
|
9716
9834
|
};
|
|
9717
9835
|
|
|
9718
9836
|
// src/service/de-service-util.ts
|
|
9719
|
-
import { RuntimeError as
|
|
9837
|
+
import { RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
9720
9838
|
var _DEServiceUtil = class _DEServiceUtil {
|
|
9721
9839
|
/**
|
|
9722
9840
|
* Creates an instance of DEServiceUtil.
|
|
@@ -9769,7 +9887,7 @@ var _DEServiceUtil = class _DEServiceUtil {
|
|
|
9769
9887
|
this.appModel.appId
|
|
9770
9888
|
);
|
|
9771
9889
|
if (!entityModel) {
|
|
9772
|
-
throw new
|
|
9890
|
+
throw new RuntimeError22("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
9773
9891
|
}
|
|
9774
9892
|
const constructor = _DEServiceUtil.constructorCache.get(id.toUpperCase());
|
|
9775
9893
|
let service;
|
|
@@ -9865,7 +9983,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
9865
9983
|
const context = clone14(_context);
|
|
9866
9984
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
9867
9985
|
if (!appView) {
|
|
9868
|
-
throw new
|
|
9986
|
+
throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
9869
9987
|
}
|
|
9870
9988
|
if ((context.srfkey || params.srfuf === 0 /* CREATE */) && appView.appDataEntityId) {
|
|
9871
9989
|
const deName = calcDeCodeNameById(appView.appDataEntityId);
|
|
@@ -9896,11 +10014,11 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
9896
10014
|
}
|
|
9897
10015
|
return this.openIndexViewTab(appView, context, params);
|
|
9898
10016
|
case "POPUP":
|
|
9899
|
-
throw new
|
|
10017
|
+
throw new ModelError15(appView, "\u672A\u652F\u6301\u7684\u89C6\u56FE\u6253\u5F00\u6A21\u5F0F: POPUP");
|
|
9900
10018
|
case "POPUPMODAL":
|
|
9901
10019
|
return this.openModal(appView, context, params);
|
|
9902
10020
|
case "POPUPAPP":
|
|
9903
|
-
throw new
|
|
10021
|
+
throw new ModelError15(appView, "\u672A\u652F\u6301\u7684\u89C6\u56FE\u6253\u5F00\u6A21\u5F0F: POPUPAPP");
|
|
9904
10022
|
case "POPOVER":
|
|
9905
10023
|
return this.openPopover(appView, opts.event, context, params);
|
|
9906
10024
|
case "DRAWER_LEFT":
|
|
@@ -9954,7 +10072,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
9954
10072
|
*/
|
|
9955
10073
|
async openPopover(appView, event, context, params = {}) {
|
|
9956
10074
|
if (!event) {
|
|
9957
|
-
throw new
|
|
10075
|
+
throw new RuntimeError23("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
|
|
9958
10076
|
}
|
|
9959
10077
|
return ibiz.openView.popover(appView.id, event, context, params);
|
|
9960
10078
|
}
|
|
@@ -10010,7 +10128,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
10010
10128
|
const app = await ibiz.hub.getAppAsync(context.srfappid);
|
|
10011
10129
|
const appFunc = app.getAppFunc(appFuncId);
|
|
10012
10130
|
if (!appFunc) {
|
|
10013
|
-
throw new
|
|
10131
|
+
throw new RuntimeError24("\u627E\u4E0D\u5230\u53EB".concat(appFuncId, "\u7684\u5E94\u7528\u529F\u80FD"));
|
|
10014
10132
|
}
|
|
10015
10133
|
const { navigateContexts, navigateParams, appFuncType } = appFunc;
|
|
10016
10134
|
const _context = context.clone();
|
|
@@ -10028,7 +10146,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
10028
10146
|
case "CUSTOM":
|
|
10029
10147
|
return this.custom(appFunc, _context, _params);
|
|
10030
10148
|
default:
|
|
10031
|
-
throw new
|
|
10149
|
+
throw new ModelError16(appFunc, "\u672A\u652F\u6301\u7684\u5E94\u7528\u529F\u80FD\u7C7B\u578B: ".concat(appFuncType));
|
|
10032
10150
|
}
|
|
10033
10151
|
}
|
|
10034
10152
|
/**
|
|
@@ -10044,7 +10162,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
10044
10162
|
*/
|
|
10045
10163
|
async openAppView(appFunc, context, params, opts) {
|
|
10046
10164
|
if (!appFunc.appViewId) {
|
|
10047
|
-
throw new
|
|
10165
|
+
throw new RuntimeError24("\u5E94\u7528\u89C6\u56FE[".concat(appFunc.appViewId, "]\u4E0D\u5B58\u5728"));
|
|
10048
10166
|
}
|
|
10049
10167
|
return ibiz.commands.execute(
|
|
10050
10168
|
OpenAppViewCommand.TAG,
|
|
@@ -10078,7 +10196,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
10078
10196
|
*/
|
|
10079
10197
|
openPdAppFunc(appFunc, context, params) {
|
|
10080
10198
|
ibiz.log.warn("openPdAppFunc", appFunc, context, params);
|
|
10081
|
-
throw new
|
|
10199
|
+
throw new RuntimeError24("\u672A\u5B9E\u73B0");
|
|
10082
10200
|
}
|
|
10083
10201
|
/**
|
|
10084
10202
|
* 执行 JavaScript 脚本
|
|
@@ -10092,7 +10210,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
10092
10210
|
*/
|
|
10093
10211
|
executeJavaScript(appFunc, context, params) {
|
|
10094
10212
|
ibiz.log.warn("executeJavaScript", appFunc, context, params);
|
|
10095
|
-
throw new
|
|
10213
|
+
throw new RuntimeError24("\u672A\u5B9E\u73B0");
|
|
10096
10214
|
}
|
|
10097
10215
|
/**
|
|
10098
10216
|
* 自定义应用功能
|
|
@@ -10106,7 +10224,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
10106
10224
|
*/
|
|
10107
10225
|
custom(appFunc, context, params) {
|
|
10108
10226
|
ibiz.log.warn("custom", appFunc, context, params);
|
|
10109
|
-
throw new
|
|
10227
|
+
throw new RuntimeError24("\u672A\u5B9E\u73B0");
|
|
10110
10228
|
}
|
|
10111
10229
|
};
|
|
10112
10230
|
/**
|
|
@@ -10127,7 +10245,7 @@ function installCommand() {
|
|
|
10127
10245
|
}
|
|
10128
10246
|
|
|
10129
10247
|
// src/app-hub.ts
|
|
10130
|
-
import { RuntimeError as
|
|
10248
|
+
import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
10131
10249
|
|
|
10132
10250
|
// src/application.ts
|
|
10133
10251
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -10319,7 +10437,7 @@ var Convert = class {
|
|
|
10319
10437
|
};
|
|
10320
10438
|
|
|
10321
10439
|
// src/hub/config/app-view-config-service.ts
|
|
10322
|
-
import { RuntimeError as
|
|
10440
|
+
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
10323
10441
|
var AppViewConfigService = class {
|
|
10324
10442
|
constructor() {
|
|
10325
10443
|
/**
|
|
@@ -10361,7 +10479,7 @@ var AppViewConfigService = class {
|
|
|
10361
10479
|
if (!this.viewConfigs.has(id)) {
|
|
10362
10480
|
const model = await ibiz.hub.getAppView(id);
|
|
10363
10481
|
if (!model) {
|
|
10364
|
-
throw new
|
|
10482
|
+
throw new RuntimeError25("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
10365
10483
|
}
|
|
10366
10484
|
this.set(model.id, {
|
|
10367
10485
|
id: model.id,
|
|
@@ -10418,14 +10536,14 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
10418
10536
|
|
|
10419
10537
|
// src/controller/common/view/view.controller.ts
|
|
10420
10538
|
import { notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
10421
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
10539
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
10422
10540
|
import { isEmpty as isEmpty8, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
|
|
10423
10541
|
|
|
10424
10542
|
// src/controller/utils/loading/loading.state.ts
|
|
10425
10543
|
import { NOOP } from "@ibiz-template/core";
|
|
10426
10544
|
|
|
10427
10545
|
// src/controller/utils/counter/counter.ts
|
|
10428
|
-
import { RuntimeError as
|
|
10546
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
10429
10547
|
var Counter = class {
|
|
10430
10548
|
/**
|
|
10431
10549
|
* Creates an instance of Counter.
|
|
@@ -10487,7 +10605,7 @@ var Counter = class {
|
|
|
10487
10605
|
return;
|
|
10488
10606
|
}
|
|
10489
10607
|
if (this.count === 0) {
|
|
10490
|
-
throw new
|
|
10608
|
+
throw new RuntimeError26("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
|
|
10491
10609
|
}
|
|
10492
10610
|
this.count -= 1;
|
|
10493
10611
|
if (this.count === 0) {
|
|
@@ -11067,7 +11185,7 @@ function getOriginData(data) {
|
|
|
11067
11185
|
}
|
|
11068
11186
|
|
|
11069
11187
|
// src/controller/utils/value-rule/value-rule.ts
|
|
11070
|
-
import { RuntimeError as
|
|
11188
|
+
import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
11071
11189
|
import { isNilOrEmpty as isNilOrEmpty7, isNumber } from "qx-util";
|
|
11072
11190
|
import { isNil as isNil14 } from "ramda";
|
|
11073
11191
|
function generateRules(itemVRs, name, valueItemName) {
|
|
@@ -11117,7 +11235,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
11117
11235
|
deRule.groupCond
|
|
11118
11236
|
);
|
|
11119
11237
|
if (!isPast) {
|
|
11120
|
-
callback(new
|
|
11238
|
+
callback(new RuntimeError27(infoMessage || deRule.ruleInfo));
|
|
11121
11239
|
}
|
|
11122
11240
|
return true;
|
|
11123
11241
|
},
|
|
@@ -11187,7 +11305,7 @@ function generateEditorRules(editor) {
|
|
|
11187
11305
|
}
|
|
11188
11306
|
|
|
11189
11307
|
// src/controller/utils/value-ex/value-ex.ts
|
|
11190
|
-
import { RuntimeError as
|
|
11308
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
11191
11309
|
import { isNil as isNil15, mergeLeft } from "ramda";
|
|
11192
11310
|
var ValueExUtil = class {
|
|
11193
11311
|
/**
|
|
@@ -11219,7 +11337,7 @@ var ValueExUtil = class {
|
|
|
11219
11337
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
11220
11338
|
if (["OBJECTS", "OBJECT"].includes(valueType)) {
|
|
11221
11339
|
if (!objectNameField) {
|
|
11222
|
-
throw new
|
|
11340
|
+
throw new RuntimeError28("\u7F3A\u5C11objectNameField");
|
|
11223
11341
|
}
|
|
11224
11342
|
const textKey = objectNameField.toLowerCase();
|
|
11225
11343
|
if (valueType === "OBJECTS") {
|
|
@@ -11235,7 +11353,7 @@ var ValueExUtil = class {
|
|
|
11235
11353
|
};
|
|
11236
11354
|
|
|
11237
11355
|
// src/controller/utils/value-default/value-default.ts
|
|
11238
|
-
import { RuntimeError as
|
|
11356
|
+
import { RuntimeError as RuntimeError29, ModelError as ModelError17 } from "@ibiz-template/core";
|
|
11239
11357
|
import dayjs from "dayjs";
|
|
11240
11358
|
import { createUUID as createUUID8 } from "qx-util";
|
|
11241
11359
|
import { isNil as isNil16, isNotNil } from "ramda";
|
|
@@ -11276,7 +11394,7 @@ function getDefaultValue(opts, origins) {
|
|
|
11276
11394
|
case "SESSION":
|
|
11277
11395
|
case "APPLICATION":
|
|
11278
11396
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
11279
|
-
throw new
|
|
11397
|
+
throw new RuntimeError29("appdata.context\u4E0D\u5B58\u5728");
|
|
11280
11398
|
}
|
|
11281
11399
|
return ibiz.appData.context[defaultValue];
|
|
11282
11400
|
case "CONTEXT":
|
|
@@ -11284,13 +11402,13 @@ function getDefaultValue(opts, origins) {
|
|
|
11284
11402
|
case "UNIQUEID":
|
|
11285
11403
|
return createUUID8();
|
|
11286
11404
|
default:
|
|
11287
|
-
throw new
|
|
11405
|
+
throw new ModelError17({}, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
|
|
11288
11406
|
}
|
|
11289
11407
|
}
|
|
11290
11408
|
|
|
11291
11409
|
// src/controller/utils/data-file-util/data-file-util.ts
|
|
11292
11410
|
import {
|
|
11293
|
-
RuntimeError as
|
|
11411
|
+
RuntimeError as RuntimeError30
|
|
11294
11412
|
} from "@ibiz-template/core";
|
|
11295
11413
|
var asyncImportUrl = "asyncimportdata2";
|
|
11296
11414
|
var importUrl = "importdata2";
|
|
@@ -11344,11 +11462,11 @@ async function importData(file, appDataEntity, dataImport) {
|
|
|
11344
11462
|
}
|
|
11345
11463
|
async function exportData(header, data, fileName) {
|
|
11346
11464
|
if (!ibiz.util.getExcelUtil) {
|
|
11347
|
-
throw new
|
|
11465
|
+
throw new RuntimeError30("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
11348
11466
|
}
|
|
11349
11467
|
const exportExcel = await ibiz.util.getExcelUtil();
|
|
11350
11468
|
if (!exportExcel) {
|
|
11351
|
-
throw new
|
|
11469
|
+
throw new RuntimeError30("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
11352
11470
|
}
|
|
11353
11471
|
try {
|
|
11354
11472
|
exportExcel.exportJsonToExcel({
|
|
@@ -11584,7 +11702,7 @@ var BaseController = class {
|
|
|
11584
11702
|
};
|
|
11585
11703
|
|
|
11586
11704
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
11587
|
-
import { RuntimeError as
|
|
11705
|
+
import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError22 } from "@ibiz-template/core";
|
|
11588
11706
|
import { isNil as isNil17, mergeRight as mergeRight2 } from "ramda";
|
|
11589
11707
|
var ViewMsgController = class _ViewMsgController {
|
|
11590
11708
|
constructor(msgGroupId) {
|
|
@@ -11610,7 +11728,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
11610
11728
|
(item) => item.id === this.msgGroupId
|
|
11611
11729
|
);
|
|
11612
11730
|
if (!msgGroup) {
|
|
11613
|
-
throw new
|
|
11731
|
+
throw new RuntimeError31("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
|
|
11614
11732
|
}
|
|
11615
11733
|
this.msgGroup = msgGroup;
|
|
11616
11734
|
const msgDetailsViewMsgIds = msgGroup.appViewMsgGroupDetails.map(
|
|
@@ -11624,7 +11742,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
11624
11742
|
}
|
|
11625
11743
|
});
|
|
11626
11744
|
if (msgDetailsViewMsgIds.length) {
|
|
11627
|
-
throw new
|
|
11745
|
+
throw new RuntimeError31(
|
|
11628
11746
|
"\u6CA1\u6709\u627E\u5230".concat(msgDetailsViewMsgIds.join(","), "\u89C6\u56FE\u6D88\u606F\u6A21\u578B")
|
|
11629
11747
|
);
|
|
11630
11748
|
}
|
|
@@ -11649,7 +11767,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
11649
11767
|
static async fetchDataSet(msgModel, context, params) {
|
|
11650
11768
|
const { appDataEntityId, appDEDataSetId } = msgModel;
|
|
11651
11769
|
if (!appDEDataSetId) {
|
|
11652
|
-
throw new
|
|
11770
|
+
throw new RuntimeModelError22(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
|
|
11653
11771
|
}
|
|
11654
11772
|
const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
|
|
11655
11773
|
if (res.data.length) {
|
|
@@ -11743,7 +11861,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
11743
11861
|
msgPosAppDEFieldId
|
|
11744
11862
|
} = msgModel;
|
|
11745
11863
|
if (!appDataEntityId) {
|
|
11746
|
-
throw new
|
|
11864
|
+
throw new RuntimeModelError22(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
11747
11865
|
}
|
|
11748
11866
|
const entity = await ibiz.hub.getAppDataEntity(
|
|
11749
11867
|
appDataEntityId,
|
|
@@ -12052,7 +12170,7 @@ var ViewController = class extends BaseController {
|
|
|
12052
12170
|
async callUIAction(key, args) {
|
|
12053
12171
|
const result = this.call(key, args);
|
|
12054
12172
|
if (result === void 0) {
|
|
12055
|
-
throw new
|
|
12173
|
+
throw new RuntimeError32("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
12056
12174
|
}
|
|
12057
12175
|
return result;
|
|
12058
12176
|
}
|
|
@@ -12323,7 +12441,7 @@ var EditorController = class {
|
|
|
12323
12441
|
};
|
|
12324
12442
|
|
|
12325
12443
|
// src/controller/common/editor/code-list-editor.controller.ts
|
|
12326
|
-
import { RuntimeModelError as
|
|
12444
|
+
import { RuntimeModelError as RuntimeModelError23 } from "@ibiz-template/core";
|
|
12327
12445
|
var CodeListEditorController = class extends EditorController {
|
|
12328
12446
|
/**
|
|
12329
12447
|
* 加载代码表数据
|
|
@@ -12347,7 +12465,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12347
12465
|
);
|
|
12348
12466
|
return dataItems;
|
|
12349
12467
|
}
|
|
12350
|
-
throw new
|
|
12468
|
+
throw new RuntimeModelError23(
|
|
12351
12469
|
this.model,
|
|
12352
12470
|
"\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
12353
12471
|
);
|
|
@@ -12355,7 +12473,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12355
12473
|
};
|
|
12356
12474
|
|
|
12357
12475
|
// src/controller/common/control/control.controller.ts
|
|
12358
|
-
import { IBizContext as IBizContext3, IBizParams, NoticeError } from "@ibiz-template/core";
|
|
12476
|
+
import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
|
|
12359
12477
|
import { clone as clone15, isNil as isNil19 } from "ramda";
|
|
12360
12478
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
12361
12479
|
var ControlController = class extends BaseController {
|
|
@@ -12675,7 +12793,7 @@ var ControlController = class extends BaseController {
|
|
|
12675
12793
|
}
|
|
12676
12794
|
if (opts == null ? void 0 : opts.error) {
|
|
12677
12795
|
ibiz.log.error(opts.error);
|
|
12678
|
-
throw new
|
|
12796
|
+
throw new NoticeError2(message, duration);
|
|
12679
12797
|
} else {
|
|
12680
12798
|
ibiz.message.success(message, duration, duration === 0);
|
|
12681
12799
|
}
|
|
@@ -12683,7 +12801,7 @@ var ControlController = class extends BaseController {
|
|
|
12683
12801
|
};
|
|
12684
12802
|
|
|
12685
12803
|
// src/controller/common/control/md-control.controller.ts
|
|
12686
|
-
import { isElementSame, RuntimeError as
|
|
12804
|
+
import { isElementSame, RuntimeError as RuntimeError33 } from "@ibiz-template/core";
|
|
12687
12805
|
import { debounce } from "lodash-es";
|
|
12688
12806
|
var MDControlController = class extends ControlController {
|
|
12689
12807
|
constructor() {
|
|
@@ -12803,6 +12921,18 @@ var MDControlController = class extends ControlController {
|
|
|
12803
12921
|
this.commandDataChange = false;
|
|
12804
12922
|
}
|
|
12805
12923
|
}
|
|
12924
|
+
/**
|
|
12925
|
+
* 获取部件默认排序模型
|
|
12926
|
+
* @return {*}
|
|
12927
|
+
* @author: zhujiamin
|
|
12928
|
+
* @Date: 2023-12-28 18:43:27
|
|
12929
|
+
*/
|
|
12930
|
+
getSortModel() {
|
|
12931
|
+
return {
|
|
12932
|
+
minorSortAppDEFieldId: void 0,
|
|
12933
|
+
minorSortDir: void 0
|
|
12934
|
+
};
|
|
12935
|
+
}
|
|
12806
12936
|
/**
|
|
12807
12937
|
* 设置排序
|
|
12808
12938
|
* 无参数时设置的是默认排序。
|
|
@@ -12815,6 +12945,30 @@ var MDControlController = class extends ControlController {
|
|
|
12815
12945
|
setSort(key, order) {
|
|
12816
12946
|
if (key && order) {
|
|
12817
12947
|
this.state.sortQuery = "".concat(key, ",").concat(order);
|
|
12948
|
+
} else if (!key && !order) {
|
|
12949
|
+
const { minorSortAppDEFieldId, minorSortDir } = this.getSortModel();
|
|
12950
|
+
if (this.view && localStorage.getItem("".concat(this.view.model.id, ".").concat(this.model.name, ".sort"))) {
|
|
12951
|
+
this.state.sortQuery = localStorage.getItem(
|
|
12952
|
+
"".concat(this.view.model.id, ".").concat(this.model.name, ".sort")
|
|
12953
|
+
);
|
|
12954
|
+
} else if (minorSortAppDEFieldId && minorSortDir) {
|
|
12955
|
+
const fieldName = this.fieldIdNameMap.get(minorSortAppDEFieldId);
|
|
12956
|
+
this.state.sortQuery = "".concat(fieldName.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
|
|
12957
|
+
}
|
|
12958
|
+
} else {
|
|
12959
|
+
this.state.sortQuery = "";
|
|
12960
|
+
}
|
|
12961
|
+
if (this.view) {
|
|
12962
|
+
if (this.state.sortQuery) {
|
|
12963
|
+
localStorage.setItem(
|
|
12964
|
+
"".concat(this.view.model.id, ".").concat(this.model.name, ".sort"),
|
|
12965
|
+
this.state.sortQuery
|
|
12966
|
+
);
|
|
12967
|
+
} else {
|
|
12968
|
+
localStorage.removeItem(
|
|
12969
|
+
"".concat(this.view.model.id, ".").concat(this.model.name, ".sort")
|
|
12970
|
+
);
|
|
12971
|
+
}
|
|
12818
12972
|
}
|
|
12819
12973
|
}
|
|
12820
12974
|
/**
|
|
@@ -12930,7 +13084,7 @@ var MDControlController = class extends ControlController {
|
|
|
12930
13084
|
async remove(args) {
|
|
12931
13085
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
12932
13086
|
if (!(data == null ? void 0 : data.length)) {
|
|
12933
|
-
throw new
|
|
13087
|
+
throw new RuntimeError33("\u672A\u9009\u4E2D\u6570\u636E");
|
|
12934
13088
|
}
|
|
12935
13089
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
12936
13090
|
const del = await ibiz.confirm.error({
|
|
@@ -13079,7 +13233,7 @@ var MDControlController = class extends ControlController {
|
|
|
13079
13233
|
(importItem) => importItem.id === dedataImportId
|
|
13080
13234
|
);
|
|
13081
13235
|
if (!dataImport) {
|
|
13082
|
-
throw new
|
|
13236
|
+
throw new RuntimeError33("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
|
|
13083
13237
|
}
|
|
13084
13238
|
let importName = "DataImport";
|
|
13085
13239
|
if (dataImport.enableCustomized) {
|
|
@@ -13113,8 +13267,8 @@ var MDControlController = class extends ControlController {
|
|
|
13113
13267
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
13114
13268
|
import {
|
|
13115
13269
|
findRecursiveChild,
|
|
13116
|
-
RuntimeError as
|
|
13117
|
-
RuntimeModelError as
|
|
13270
|
+
RuntimeError as RuntimeError34,
|
|
13271
|
+
RuntimeModelError as RuntimeModelError24
|
|
13118
13272
|
} from "@ibiz-template/core";
|
|
13119
13273
|
var AppMenuController = class extends ControlController {
|
|
13120
13274
|
initState() {
|
|
@@ -13153,14 +13307,14 @@ var AppMenuController = class extends ControlController {
|
|
|
13153
13307
|
childrenFields: ["appMenuItems"]
|
|
13154
13308
|
});
|
|
13155
13309
|
if (!menuItem) {
|
|
13156
|
-
throw new
|
|
13310
|
+
throw new RuntimeError34("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
13157
13311
|
}
|
|
13158
13312
|
this.evt.emit("onClick", {
|
|
13159
13313
|
eventArg: id,
|
|
13160
13314
|
event
|
|
13161
13315
|
});
|
|
13162
13316
|
if (!menuItem.appFuncId) {
|
|
13163
|
-
throw new
|
|
13317
|
+
throw new RuntimeModelError24(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
13164
13318
|
}
|
|
13165
13319
|
const tempContext = this.context.clone();
|
|
13166
13320
|
tempContext.srfappid = menuItem.appId;
|
|
@@ -13269,8 +13423,8 @@ var AppMenuController = class extends ControlController {
|
|
|
13269
13423
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
13270
13424
|
import {
|
|
13271
13425
|
findRecursiveChild as findRecursiveChild2,
|
|
13272
|
-
RuntimeError as
|
|
13273
|
-
RuntimeModelError as
|
|
13426
|
+
RuntimeError as RuntimeError35,
|
|
13427
|
+
RuntimeModelError as RuntimeModelError25
|
|
13274
13428
|
} from "@ibiz-template/core";
|
|
13275
13429
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
13276
13430
|
async onClickMenuItem(id, event) {
|
|
@@ -13279,14 +13433,14 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
13279
13433
|
childrenFields: ["appMenuItems"]
|
|
13280
13434
|
});
|
|
13281
13435
|
if (!menuItem) {
|
|
13282
|
-
throw new
|
|
13436
|
+
throw new RuntimeError35("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
13283
13437
|
}
|
|
13284
13438
|
this.evt.emit("onClick", {
|
|
13285
13439
|
eventArg: id,
|
|
13286
13440
|
event
|
|
13287
13441
|
});
|
|
13288
13442
|
if (!menuItem.appFuncId) {
|
|
13289
|
-
throw new
|
|
13443
|
+
throw new RuntimeModelError25(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
13290
13444
|
}
|
|
13291
13445
|
const tempContext = this.context.clone();
|
|
13292
13446
|
if (this.routeDepth === 1) {
|
|
@@ -13307,7 +13461,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
13307
13461
|
import dayjs2 from "dayjs";
|
|
13308
13462
|
|
|
13309
13463
|
// src/controller/control/calendar/calendar.service.ts
|
|
13310
|
-
import { RuntimeError as
|
|
13464
|
+
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
13311
13465
|
var CalendarService = class extends MDControlService {
|
|
13312
13466
|
/**
|
|
13313
13467
|
* 执行查询多条数据的方法
|
|
@@ -13357,11 +13511,11 @@ var CalendarService = class extends MDControlService {
|
|
|
13357
13511
|
setCalendarConfigData(items, index) {
|
|
13358
13512
|
const { sysCalendarItems } = this.model;
|
|
13359
13513
|
if (!sysCalendarItems) {
|
|
13360
|
-
throw new
|
|
13514
|
+
throw new RuntimeError36("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
13361
13515
|
}
|
|
13362
13516
|
const calendarItem = sysCalendarItems[index];
|
|
13363
13517
|
if (!calendarItem) {
|
|
13364
|
-
throw new
|
|
13518
|
+
throw new RuntimeError36("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
13365
13519
|
}
|
|
13366
13520
|
return items.map((item) => {
|
|
13367
13521
|
return new CalendarItemData(calendarItem, item);
|
|
@@ -13575,17 +13729,17 @@ var CalendarController = class extends MDControlController {
|
|
|
13575
13729
|
};
|
|
13576
13730
|
|
|
13577
13731
|
// src/controller/control/chart/chart.controller.ts
|
|
13578
|
-
import { RuntimeError as
|
|
13732
|
+
import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
13579
13733
|
|
|
13580
13734
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
13581
13735
|
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
13582
|
-
import { RuntimeError as
|
|
13736
|
+
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
13583
13737
|
|
|
13584
13738
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
13585
|
-
import { RuntimeModelError as
|
|
13739
|
+
import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
|
|
13586
13740
|
|
|
13587
13741
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
13588
|
-
import { plus, RuntimeModelError as
|
|
13742
|
+
import { plus, RuntimeModelError as RuntimeModelError26, toNumberOrNil } from "@ibiz-template/core";
|
|
13589
13743
|
import dayjs3 from "dayjs";
|
|
13590
13744
|
import minMax from "dayjs/plugin/minMax";
|
|
13591
13745
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
@@ -13635,10 +13789,10 @@ var BaseSeriesGenerator = class {
|
|
|
13635
13789
|
this.chartGenerator = chartGenerator;
|
|
13636
13790
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
13637
13791
|
if (!model.catalogField) {
|
|
13638
|
-
throw new
|
|
13792
|
+
throw new RuntimeModelError26(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
|
|
13639
13793
|
}
|
|
13640
13794
|
if (!model.valueField) {
|
|
13641
|
-
throw new
|
|
13795
|
+
throw new RuntimeModelError26(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
|
|
13642
13796
|
}
|
|
13643
13797
|
this.catalogField = chartGenerator.getFieldKey(model.catalogField);
|
|
13644
13798
|
this.valueField = chartGenerator.getFieldKey(model.valueField);
|
|
@@ -14061,10 +14215,10 @@ var BaseSeriesGenerator = class {
|
|
|
14061
14215
|
var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14062
14216
|
calcStaticOptions() {
|
|
14063
14217
|
if (this.xAxisIndex === void 0) {
|
|
14064
|
-
throw new
|
|
14218
|
+
throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14065
14219
|
}
|
|
14066
14220
|
if (this.yAxisIndex === void 0) {
|
|
14067
|
-
throw new
|
|
14221
|
+
throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14068
14222
|
}
|
|
14069
14223
|
const options = super.calcStaticOptions();
|
|
14070
14224
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14080,14 +14234,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
14080
14234
|
};
|
|
14081
14235
|
|
|
14082
14236
|
// src/controller/control/chart/generator/bar-series-generator.ts
|
|
14083
|
-
import { RuntimeModelError as
|
|
14237
|
+
import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
14084
14238
|
var BarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14085
14239
|
calcStaticOptions() {
|
|
14086
14240
|
if (this.xAxisIndex === void 0) {
|
|
14087
|
-
throw new
|
|
14241
|
+
throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14088
14242
|
}
|
|
14089
14243
|
if (this.yAxisIndex === void 0) {
|
|
14090
|
-
throw new
|
|
14244
|
+
throw new RuntimeModelError28(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14091
14245
|
}
|
|
14092
14246
|
const options = super.calcStaticOptions();
|
|
14093
14247
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14140,14 +14294,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
14140
14294
|
};
|
|
14141
14295
|
|
|
14142
14296
|
// src/controller/control/chart/generator/scatter-series-generator.ts
|
|
14143
|
-
import { RuntimeModelError as
|
|
14297
|
+
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
14144
14298
|
var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14145
14299
|
calcStaticOptions() {
|
|
14146
14300
|
if (this.xAxisIndex === void 0) {
|
|
14147
|
-
throw new
|
|
14301
|
+
throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14148
14302
|
}
|
|
14149
14303
|
if (this.yAxisIndex === void 0) {
|
|
14150
|
-
throw new
|
|
14304
|
+
throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14151
14305
|
}
|
|
14152
14306
|
const options = super.calcStaticOptions();
|
|
14153
14307
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14588,7 +14742,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
14588
14742
|
getChartDataByParams(params) {
|
|
14589
14743
|
const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
|
|
14590
14744
|
if (!generator) {
|
|
14591
|
-
throw new
|
|
14745
|
+
throw new RuntimeError37("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
14592
14746
|
}
|
|
14593
14747
|
return generator.getChartDataByParams(params);
|
|
14594
14748
|
}
|
|
@@ -14701,10 +14855,10 @@ var ChartController = class extends MDControlController {
|
|
|
14701
14855
|
*/
|
|
14702
14856
|
updateChart() {
|
|
14703
14857
|
if (!this.chart) {
|
|
14704
|
-
throw new
|
|
14858
|
+
throw new RuntimeError38("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
|
|
14705
14859
|
}
|
|
14706
14860
|
if (!this.options) {
|
|
14707
|
-
throw new
|
|
14861
|
+
throw new RuntimeError38("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
14708
14862
|
}
|
|
14709
14863
|
this.chart.setOption(this.options);
|
|
14710
14864
|
this.resizeChart();
|
|
@@ -14742,20 +14896,20 @@ var CaptionBarController = class extends ControlController {
|
|
|
14742
14896
|
};
|
|
14743
14897
|
|
|
14744
14898
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
14745
|
-
import { recursiveIterate as recursiveIterate2, RuntimeError as
|
|
14899
|
+
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
14746
14900
|
|
|
14747
14901
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
14748
|
-
import { RuntimeModelError as
|
|
14902
|
+
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
14749
14903
|
import { isArray as isArray8 } from "qx-util";
|
|
14750
14904
|
|
|
14751
14905
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
14752
|
-
import { RuntimeModelError as
|
|
14906
|
+
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
14753
14907
|
|
|
14754
14908
|
// src/ui-logic/index.ts
|
|
14755
|
-
import { RuntimeError as
|
|
14909
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
14756
14910
|
|
|
14757
14911
|
// src/ui-logic/ui-logic.ts
|
|
14758
|
-
import { ModelError as
|
|
14912
|
+
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
14759
14913
|
|
|
14760
14914
|
// src/ui-logic/ui-logic-context.ts
|
|
14761
14915
|
var UILogicContext = class {
|
|
@@ -14901,23 +15055,23 @@ var UILogicContext = class {
|
|
|
14901
15055
|
};
|
|
14902
15056
|
|
|
14903
15057
|
// src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
|
|
14904
|
-
import { RuntimeModelError as
|
|
15058
|
+
import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
14905
15059
|
|
|
14906
15060
|
// src/ui-logic/ui-logic-link/ui-logic-link.ts
|
|
14907
|
-
import { ModelError as
|
|
15061
|
+
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
14908
15062
|
|
|
14909
15063
|
// src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
|
|
14910
|
-
import { RuntimeModelError as
|
|
15064
|
+
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
14911
15065
|
|
|
14912
15066
|
// src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
|
|
14913
15067
|
var UILogicLinkCond = class {
|
|
14914
15068
|
};
|
|
14915
15069
|
|
|
14916
15070
|
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
14917
|
-
import { ModelError as
|
|
15071
|
+
import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
14918
15072
|
|
|
14919
15073
|
// src/ui-logic/utils/handle-src-val.ts
|
|
14920
|
-
import { ModelError as
|
|
15074
|
+
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
14921
15075
|
import { clone as clone17 } from "ramda";
|
|
14922
15076
|
function handleSrcVal2(ctx, srcValParams) {
|
|
14923
15077
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
@@ -14948,7 +15102,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
14948
15102
|
value = clone17(ibiz.env);
|
|
14949
15103
|
break;
|
|
14950
15104
|
default:
|
|
14951
|
-
throw new
|
|
15105
|
+
throw new ModelError18(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
14952
15106
|
}
|
|
14953
15107
|
if (value && srcField) {
|
|
14954
15108
|
try {
|
|
@@ -15010,7 +15164,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
15010
15164
|
switch (this.type) {
|
|
15011
15165
|
case "ENTITYFIELD": {
|
|
15012
15166
|
if (!this.value) {
|
|
15013
|
-
throw new
|
|
15167
|
+
throw new RuntimeModelError30(
|
|
15014
15168
|
this.model,
|
|
15015
15169
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
15016
15170
|
);
|
|
@@ -15020,7 +15174,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
15020
15174
|
}
|
|
15021
15175
|
case "SRCENTITYFIELD": {
|
|
15022
15176
|
if (!this.value) {
|
|
15023
|
-
throw new
|
|
15177
|
+
throw new RuntimeModelError30(
|
|
15024
15178
|
this.model,
|
|
15025
15179
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
15026
15180
|
);
|
|
@@ -15032,7 +15186,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
15032
15186
|
return testCond(dstVal, this.op, srcVal);
|
|
15033
15187
|
}
|
|
15034
15188
|
case "CURTIME":
|
|
15035
|
-
throw new
|
|
15189
|
+
throw new ModelError19(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
|
|
15036
15190
|
default:
|
|
15037
15191
|
return testCond(dstVal, this.op, this.value);
|
|
15038
15192
|
}
|
|
@@ -15086,7 +15240,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
|
|
|
15086
15240
|
test(ctx, context, data) {
|
|
15087
15241
|
let bol = true;
|
|
15088
15242
|
if (this.conds.length === 0) {
|
|
15089
|
-
throw new
|
|
15243
|
+
throw new RuntimeModelError31(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
15090
15244
|
}
|
|
15091
15245
|
for (let i = 0; i < this.conds.length; i++) {
|
|
15092
15246
|
const cond = this.conds[i];
|
|
@@ -15174,13 +15328,13 @@ var UILogicLink = class {
|
|
|
15174
15328
|
case 1:
|
|
15175
15329
|
return true;
|
|
15176
15330
|
case 2:
|
|
15177
|
-
throw new
|
|
15331
|
+
throw new ModelError20(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u7ED3\u675F");
|
|
15178
15332
|
case 3:
|
|
15179
|
-
throw new
|
|
15333
|
+
throw new ModelError20(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u62D2\u7EDD");
|
|
15180
15334
|
case 9:
|
|
15181
|
-
throw new
|
|
15335
|
+
throw new ModelError20(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u5E38\u5904\u7406");
|
|
15182
15336
|
default:
|
|
15183
|
-
throw new
|
|
15337
|
+
throw new ModelError20(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B:".concat(linkMode));
|
|
15184
15338
|
}
|
|
15185
15339
|
}
|
|
15186
15340
|
};
|
|
@@ -15212,10 +15366,10 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
15212
15366
|
retDEUILogicParamId
|
|
15213
15367
|
} = this.model;
|
|
15214
15368
|
if (!dstAppDataEntityId) {
|
|
15215
|
-
throw new
|
|
15369
|
+
throw new RuntimeModelError32(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
15216
15370
|
}
|
|
15217
15371
|
if (!dstAppDEActionId) {
|
|
15218
|
-
throw new
|
|
15372
|
+
throw new RuntimeModelError32(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
15219
15373
|
}
|
|
15220
15374
|
const requestData = ctx.params[dstDEUILogicParamId];
|
|
15221
15375
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -15233,13 +15387,13 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
15233
15387
|
};
|
|
15234
15388
|
|
|
15235
15389
|
// src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
|
|
15236
|
-
import { RuntimeModelError as
|
|
15390
|
+
import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
15237
15391
|
var DEUIActionNode = class extends UILogicNode {
|
|
15238
15392
|
async exec(ctx) {
|
|
15239
15393
|
const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
|
|
15240
15394
|
const { data, parameters } = ctx;
|
|
15241
15395
|
if (!dstAppDEUIActionId) {
|
|
15242
|
-
throw new
|
|
15396
|
+
throw new RuntimeModelError33(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
15243
15397
|
}
|
|
15244
15398
|
let actionData = [data];
|
|
15245
15399
|
if (dstDEUILogicParamId) {
|
|
@@ -15270,7 +15424,7 @@ var StartNode2 = class extends UILogicNode {
|
|
|
15270
15424
|
};
|
|
15271
15425
|
|
|
15272
15426
|
// src/ui-logic/ui-logic-node/end-node/end-node.ts
|
|
15273
|
-
import { ModelError as
|
|
15427
|
+
import { ModelError as ModelError21 } from "@ibiz-template/core";
|
|
15274
15428
|
var EndNode2 = class extends UILogicNode {
|
|
15275
15429
|
async exec(ctx) {
|
|
15276
15430
|
ctx.isEndNode = true;
|
|
@@ -15294,7 +15448,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
15294
15448
|
case "LOGICPARAMFIELD":
|
|
15295
15449
|
case "BREAK":
|
|
15296
15450
|
default:
|
|
15297
|
-
throw new
|
|
15451
|
+
throw new ModelError21(
|
|
15298
15452
|
this.model,
|
|
15299
15453
|
"\u6682\u672A\u652F\u6301\u7684\u7ED3\u675F\u8282\u70B9\u8FD4\u56DE\u503C\u7C7B\u578B: ".concat(returnType)
|
|
15300
15454
|
);
|
|
@@ -15303,7 +15457,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
15303
15457
|
};
|
|
15304
15458
|
|
|
15305
15459
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
15306
|
-
import { ModelError as
|
|
15460
|
+
import { ModelError as ModelError22, RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
15307
15461
|
import { clone as clone18 } from "ramda";
|
|
15308
15462
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
15309
15463
|
async exec(ctx) {
|
|
@@ -15335,7 +15489,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
15335
15489
|
await this.sortParam(nodeParam, ctx);
|
|
15336
15490
|
break;
|
|
15337
15491
|
default:
|
|
15338
|
-
throw new
|
|
15492
|
+
throw new ModelError22(
|
|
15339
15493
|
nodeParam,
|
|
15340
15494
|
"\u6682\u672A\u652F\u6301\u903B\u8F91\u5904\u7406\u53C2\u6570\u64CD\u4F5C".concat(nodeParam.paramAction)
|
|
15341
15495
|
);
|
|
@@ -15353,7 +15507,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
15353
15507
|
setParamValue(nodeParam, ctx) {
|
|
15354
15508
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
15355
15509
|
if (!dstDEUILogicParamId) {
|
|
15356
|
-
throw new
|
|
15510
|
+
throw new RuntimeError39("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
|
|
15357
15511
|
}
|
|
15358
15512
|
let dstField = dstFieldName;
|
|
15359
15513
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
@@ -15470,43 +15624,43 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
15470
15624
|
};
|
|
15471
15625
|
|
|
15472
15626
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
15473
|
-
import { RuntimeError as
|
|
15627
|
+
import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
15474
15628
|
import { isFunction } from "lodash-es";
|
|
15475
15629
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
15476
15630
|
async exec(ctx) {
|
|
15477
15631
|
ctx.isEndNode = true;
|
|
15478
15632
|
const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
|
|
15479
15633
|
if (!invokeCtrlId) {
|
|
15480
|
-
throw new
|
|
15634
|
+
throw new RuntimeModelError34(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
|
|
15481
15635
|
}
|
|
15482
15636
|
if (!invokeParamId) {
|
|
15483
|
-
throw new
|
|
15637
|
+
throw new RuntimeModelError34(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
|
|
15484
15638
|
}
|
|
15485
15639
|
if (!invokeMethod) {
|
|
15486
|
-
throw new
|
|
15640
|
+
throw new RuntimeModelError34(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
|
|
15487
15641
|
}
|
|
15488
15642
|
const invokeParam = ctx.params[invokeParamId];
|
|
15489
15643
|
if (!invokeParam) {
|
|
15490
|
-
throw new
|
|
15644
|
+
throw new RuntimeError40("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
15491
15645
|
}
|
|
15492
15646
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
15493
15647
|
if (!invokeCtrl) {
|
|
15494
|
-
throw new
|
|
15648
|
+
throw new RuntimeError40("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
15495
15649
|
}
|
|
15496
15650
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
15497
|
-
throw new
|
|
15651
|
+
throw new RuntimeError40("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
15498
15652
|
}
|
|
15499
15653
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
15500
15654
|
}
|
|
15501
15655
|
};
|
|
15502
15656
|
|
|
15503
15657
|
// src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
|
|
15504
|
-
import { RuntimeModelError as
|
|
15658
|
+
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
15505
15659
|
var BindParamNode2 = class extends UILogicNode {
|
|
15506
15660
|
async exec(ctx) {
|
|
15507
15661
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
15508
15662
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
15509
|
-
throw new
|
|
15663
|
+
throw new RuntimeModelError35(
|
|
15510
15664
|
this.model,
|
|
15511
15665
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
15512
15666
|
);
|
|
@@ -15517,7 +15671,7 @@ var BindParamNode2 = class extends UILogicNode {
|
|
|
15517
15671
|
};
|
|
15518
15672
|
|
|
15519
15673
|
// src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
|
|
15520
|
-
import { ModelError as
|
|
15674
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
15521
15675
|
var MsgBoxNode = class extends UILogicNode {
|
|
15522
15676
|
constructor() {
|
|
15523
15677
|
super(...arguments);
|
|
@@ -15531,10 +15685,10 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
15531
15685
|
async exec(ctx) {
|
|
15532
15686
|
const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
|
|
15533
15687
|
if (!msgBoxType) {
|
|
15534
|
-
throw new
|
|
15688
|
+
throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
15535
15689
|
}
|
|
15536
15690
|
if (!buttonsType) {
|
|
15537
|
-
throw new
|
|
15691
|
+
throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
15538
15692
|
}
|
|
15539
15693
|
let { title } = this.model;
|
|
15540
15694
|
let { message } = this.model;
|
|
@@ -15576,7 +15730,7 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
15576
15730
|
resultTags = ["ok", "cancel"];
|
|
15577
15731
|
break;
|
|
15578
15732
|
default:
|
|
15579
|
-
throw new
|
|
15733
|
+
throw new ModelError23(this.model, "".concat(buttonsType, "\u6682\u672A\u652F\u6301"));
|
|
15580
15734
|
}
|
|
15581
15735
|
const result = await ibiz.modal.confirm(modalParams);
|
|
15582
15736
|
ctx.setLastReturn(resultTags[result ? 0 : 1]);
|
|
@@ -15594,12 +15748,12 @@ var PFPluginNode = class extends UILogicNode {
|
|
|
15594
15748
|
};
|
|
15595
15749
|
|
|
15596
15750
|
// src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
|
|
15597
|
-
import { RuntimeModelError as
|
|
15751
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
15598
15752
|
var DebugParamNode = class extends UILogicNode {
|
|
15599
15753
|
async exec(ctx) {
|
|
15600
15754
|
const { dstDEUILogicParamId, name } = this.model;
|
|
15601
15755
|
if (!dstDEUILogicParamId) {
|
|
15602
|
-
throw new
|
|
15756
|
+
throw new RuntimeModelError37(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
15603
15757
|
}
|
|
15604
15758
|
const param = ctx.params[dstDEUILogicParamId];
|
|
15605
15759
|
console.log("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
|
|
@@ -15607,25 +15761,25 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
15607
15761
|
};
|
|
15608
15762
|
|
|
15609
15763
|
// src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
|
|
15610
|
-
import { RuntimeModelError as
|
|
15764
|
+
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
15611
15765
|
var ResetParamNode2 = class extends UILogicNode {
|
|
15612
15766
|
async exec(ctx) {
|
|
15613
15767
|
const { dstDEUILogicParamId } = this.model;
|
|
15614
15768
|
if (!dstDEUILogicParamId) {
|
|
15615
|
-
throw new
|
|
15769
|
+
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
15616
15770
|
}
|
|
15617
15771
|
ctx.resetParam(dstDEUILogicParamId);
|
|
15618
15772
|
}
|
|
15619
15773
|
};
|
|
15620
15774
|
|
|
15621
15775
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
15622
|
-
import { RuntimeModelError as
|
|
15776
|
+
import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
15623
15777
|
import { clone as clone19 } from "ramda";
|
|
15624
15778
|
var CopyParamNode2 = class extends UILogicNode {
|
|
15625
15779
|
async exec(ctx) {
|
|
15626
15780
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
15627
15781
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
15628
|
-
throw new
|
|
15782
|
+
throw new RuntimeModelError39(
|
|
15629
15783
|
this.model,
|
|
15630
15784
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
15631
15785
|
);
|
|
@@ -15636,7 +15790,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
15636
15790
|
};
|
|
15637
15791
|
|
|
15638
15792
|
// src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
|
|
15639
|
-
import { RuntimeModelError as
|
|
15793
|
+
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
15640
15794
|
var AppendParamNode2 = class extends UILogicNode {
|
|
15641
15795
|
async exec(ctx) {
|
|
15642
15796
|
const {
|
|
@@ -15647,7 +15801,7 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
15647
15801
|
srcSize
|
|
15648
15802
|
} = this.model;
|
|
15649
15803
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
15650
|
-
throw new
|
|
15804
|
+
throw new RuntimeModelError40(
|
|
15651
15805
|
this.model,
|
|
15652
15806
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
15653
15807
|
);
|
|
@@ -15665,12 +15819,12 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
15665
15819
|
};
|
|
15666
15820
|
|
|
15667
15821
|
// src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
|
|
15668
|
-
import { RuntimeModelError as
|
|
15822
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
15669
15823
|
var SortParamNode2 = class extends UILogicNode {
|
|
15670
15824
|
async exec(ctx) {
|
|
15671
15825
|
const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
15672
15826
|
if (!dstDEUILogicParamId || !dstFieldName) {
|
|
15673
|
-
throw new
|
|
15827
|
+
throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
15674
15828
|
}
|
|
15675
15829
|
const key = dstFieldName;
|
|
15676
15830
|
const arr = ctx.params[dstDEUILogicParamId];
|
|
@@ -15681,19 +15835,19 @@ var SortParamNode2 = class extends UILogicNode {
|
|
|
15681
15835
|
};
|
|
15682
15836
|
|
|
15683
15837
|
// src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
|
|
15684
|
-
import { RuntimeModelError as
|
|
15838
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
15685
15839
|
var RenewParamNode2 = class extends UILogicNode {
|
|
15686
15840
|
async exec(ctx) {
|
|
15687
15841
|
const { dstDEUILogicParamId } = this.model;
|
|
15688
15842
|
if (!dstDEUILogicParamId) {
|
|
15689
|
-
throw new
|
|
15843
|
+
throw new RuntimeModelError42(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
15690
15844
|
}
|
|
15691
15845
|
ctx.renewParam(dstDEUILogicParamId);
|
|
15692
15846
|
}
|
|
15693
15847
|
};
|
|
15694
15848
|
|
|
15695
15849
|
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
15696
|
-
import { RuntimeModelError as
|
|
15850
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
15697
15851
|
var DataSetNode2 = class extends UILogicNode {
|
|
15698
15852
|
async exec(ctx) {
|
|
15699
15853
|
const {
|
|
@@ -15703,7 +15857,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
15703
15857
|
retDEUILogicParamId
|
|
15704
15858
|
} = this.model;
|
|
15705
15859
|
if (!dstDEUILogicParamId) {
|
|
15706
|
-
throw new
|
|
15860
|
+
throw new RuntimeModelError43(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
|
|
15707
15861
|
}
|
|
15708
15862
|
const queryParams = ctx.params[dstDEUILogicParamId];
|
|
15709
15863
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -15720,43 +15874,43 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
15720
15874
|
};
|
|
15721
15875
|
|
|
15722
15876
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
15723
|
-
import { RuntimeError as
|
|
15877
|
+
import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
15724
15878
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
15725
15879
|
async exec(_ctx) {
|
|
15726
15880
|
const { errorInfo } = this.model;
|
|
15727
|
-
throw new
|
|
15881
|
+
throw new RuntimeError41(errorInfo);
|
|
15728
15882
|
}
|
|
15729
15883
|
};
|
|
15730
15884
|
|
|
15731
15885
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
15732
|
-
import { RuntimeError as
|
|
15886
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
15733
15887
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
15734
15888
|
async exec(ctx) {
|
|
15735
15889
|
ctx.isEndNode = true;
|
|
15736
15890
|
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
15737
15891
|
if (!fireCtrlId) {
|
|
15738
|
-
throw new
|
|
15892
|
+
throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
15739
15893
|
}
|
|
15740
15894
|
if (!eventName) {
|
|
15741
|
-
throw new
|
|
15895
|
+
throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
15742
15896
|
}
|
|
15743
15897
|
if (!eventParamId) {
|
|
15744
|
-
throw new
|
|
15898
|
+
throw new RuntimeModelError44(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
15745
15899
|
}
|
|
15746
15900
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
15747
15901
|
if (!invokeCtrl) {
|
|
15748
|
-
throw new
|
|
15902
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
15749
15903
|
}
|
|
15750
15904
|
const eventParam = ctx.params[eventParamId];
|
|
15751
15905
|
if (!eventParam) {
|
|
15752
|
-
throw new
|
|
15906
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
15753
15907
|
}
|
|
15754
15908
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
15755
15909
|
}
|
|
15756
15910
|
};
|
|
15757
15911
|
|
|
15758
15912
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
15759
|
-
import { RuntimeError as
|
|
15913
|
+
import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
15760
15914
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
15761
15915
|
async exec(ctx) {
|
|
15762
15916
|
const {
|
|
@@ -15766,17 +15920,17 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
15766
15920
|
retDEUILogicParamId
|
|
15767
15921
|
} = this.model;
|
|
15768
15922
|
if (!dstAppDataEntityId) {
|
|
15769
|
-
throw new
|
|
15923
|
+
throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
15770
15924
|
}
|
|
15771
15925
|
if (!dstAppDELogicId) {
|
|
15772
|
-
throw new
|
|
15926
|
+
throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
15773
15927
|
}
|
|
15774
15928
|
if (!dstDEUILogicParamId) {
|
|
15775
|
-
throw new
|
|
15929
|
+
throw new RuntimeModelError45(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
15776
15930
|
}
|
|
15777
15931
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
15778
15932
|
if (!dstParam) {
|
|
15779
|
-
throw new
|
|
15933
|
+
throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
15780
15934
|
}
|
|
15781
15935
|
const result = await execDELogicById(
|
|
15782
15936
|
dstAppDELogicId,
|
|
@@ -15809,7 +15963,7 @@ var RawJSCodeNode = class extends UILogicNode {
|
|
|
15809
15963
|
};
|
|
15810
15964
|
|
|
15811
15965
|
// src/ui-logic/ui-logic-param/ui-logic-param.ts
|
|
15812
|
-
import { ModelError as
|
|
15966
|
+
import { ModelError as ModelError24 } from "@ibiz-template/core";
|
|
15813
15967
|
var UILogicParam = class {
|
|
15814
15968
|
/**
|
|
15815
15969
|
* Creates an instance of UILogicParam.
|
|
@@ -15864,7 +16018,7 @@ var UILogicParam = class {
|
|
|
15864
16018
|
} else if (m.entityListParam) {
|
|
15865
16019
|
ctx.params[tag] = [];
|
|
15866
16020
|
} else if (m.entityPageParam) {
|
|
15867
|
-
throw new
|
|
16021
|
+
throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5206\u9875\u67E5\u8BE2\u7ED3\u679C");
|
|
15868
16022
|
} else if (m.entityParam) {
|
|
15869
16023
|
ctx.params[tag] = {};
|
|
15870
16024
|
} else if (m.lastReturnParam) {
|
|
@@ -15872,9 +16026,9 @@ var UILogicParam = class {
|
|
|
15872
16026
|
} else if (m.navContextParam) {
|
|
15873
16027
|
ctx.params[tag] = context;
|
|
15874
16028
|
} else if (m.navViewParamParam) {
|
|
15875
|
-
throw new
|
|
16029
|
+
throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u89C6\u56FE\u8DEF\u7531\u53C2\u6570");
|
|
15876
16030
|
} else if (m.routeViewSessionParam) {
|
|
15877
|
-
throw new
|
|
16031
|
+
throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u8DEF\u7531\u89C6\u56FE\u4F1A\u8BDD");
|
|
15878
16032
|
} else if (m.simpleListParam) {
|
|
15879
16033
|
ctx.params[tag] = [];
|
|
15880
16034
|
} else if (m.simpleParam) {
|
|
@@ -15882,7 +16036,7 @@ var UILogicParam = class {
|
|
|
15882
16036
|
} else if (m.viewNavDataParam) {
|
|
15883
16037
|
ctx.params[tag] = params;
|
|
15884
16038
|
} else if (m.viewSessionParam) {
|
|
15885
|
-
throw new
|
|
16039
|
+
throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5F53\u524D\u89C6\u56FE\u4F1A\u8BDD");
|
|
15886
16040
|
}
|
|
15887
16041
|
}
|
|
15888
16042
|
/**
|
|
@@ -15899,7 +16053,7 @@ var UILogicParam = class {
|
|
|
15899
16053
|
} else if (m.simpleParam || m.entityParam) {
|
|
15900
16054
|
ctx.params[tag] = {};
|
|
15901
16055
|
} else {
|
|
15902
|
-
throw new
|
|
16056
|
+
throw new ModelError24(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B\u91CD\u65B0\u5EFA\u7ACB\u53D8\u91CF");
|
|
15903
16057
|
}
|
|
15904
16058
|
}
|
|
15905
16059
|
};
|
|
@@ -15934,7 +16088,7 @@ var UILogic = class {
|
|
|
15934
16088
|
this.params = /* @__PURE__ */ new Map();
|
|
15935
16089
|
var _a;
|
|
15936
16090
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
15937
|
-
throw new
|
|
16091
|
+
throw new RuntimeModelError46(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
15938
16092
|
}
|
|
15939
16093
|
model.deuilogicNodes.forEach((node) => {
|
|
15940
16094
|
const { logicNodeType } = node;
|
|
@@ -16001,7 +16155,7 @@ var UILogic = class {
|
|
|
16001
16155
|
logicNode = new RawJSCodeNode(node);
|
|
16002
16156
|
break;
|
|
16003
16157
|
default:
|
|
16004
|
-
throw new
|
|
16158
|
+
throw new ModelError25(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
|
|
16005
16159
|
}
|
|
16006
16160
|
this.nodes.set(node.id, logicNode);
|
|
16007
16161
|
});
|
|
@@ -16054,7 +16208,7 @@ var UILogic = class {
|
|
|
16054
16208
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
16055
16209
|
await this.deepExec(start, ctx);
|
|
16056
16210
|
} else {
|
|
16057
|
-
throw new
|
|
16211
|
+
throw new RuntimeModelError46(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
16058
16212
|
}
|
|
16059
16213
|
if (ctx.isEndNode) {
|
|
16060
16214
|
return ctx.result;
|
|
@@ -16100,7 +16254,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
16100
16254
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
16101
16255
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
16102
16256
|
if (!deUILogic) {
|
|
16103
|
-
throw new
|
|
16257
|
+
throw new RuntimeError44(
|
|
16104
16258
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
16105
16259
|
);
|
|
16106
16260
|
}
|
|
@@ -16113,7 +16267,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
16113
16267
|
}
|
|
16114
16268
|
|
|
16115
16269
|
// src/ui-action/uiaction-util.ts
|
|
16116
|
-
import { RuntimeError as
|
|
16270
|
+
import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
16117
16271
|
var UIActionUtil = class {
|
|
16118
16272
|
/**
|
|
16119
16273
|
* 执行界面行为
|
|
@@ -16128,7 +16282,7 @@ var UIActionUtil = class {
|
|
|
16128
16282
|
static async exec(actionId, params, appId) {
|
|
16129
16283
|
const action = await getUIActionById(actionId, appId);
|
|
16130
16284
|
if (!action) {
|
|
16131
|
-
throw new
|
|
16285
|
+
throw new RuntimeError45("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
16132
16286
|
}
|
|
16133
16287
|
if (action.actionTarget === "SINGLEDATA") {
|
|
16134
16288
|
const validateResult = await params.view.call("Validate" /* VALIDATE */);
|
|
@@ -16189,7 +16343,7 @@ var UIActionProviderBase = class {
|
|
|
16189
16343
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
16190
16344
|
if (uilogicAttachMode === "REPLACE") {
|
|
16191
16345
|
if (!appDEUILogicId) {
|
|
16192
|
-
throw new
|
|
16346
|
+
throw new RuntimeModelError47(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
16193
16347
|
}
|
|
16194
16348
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
16195
16349
|
return result;
|
|
@@ -16204,7 +16358,7 @@ var UIActionProviderBase = class {
|
|
|
16204
16358
|
}
|
|
16205
16359
|
if (action.uilogicAttachMode === "AFTER") {
|
|
16206
16360
|
if (!appDEUILogicId) {
|
|
16207
|
-
throw new
|
|
16361
|
+
throw new RuntimeModelError47(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
16208
16362
|
}
|
|
16209
16363
|
await execUILogic(
|
|
16210
16364
|
appDEUILogicId,
|
|
@@ -16429,7 +16583,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
16429
16583
|
const entityName = action.appDataEntityId;
|
|
16430
16584
|
const methodName = action.appDEMethodId;
|
|
16431
16585
|
if (!entityName || !methodName) {
|
|
16432
|
-
throw new
|
|
16586
|
+
throw new RuntimeModelError48(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
16433
16587
|
}
|
|
16434
16588
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
16435
16589
|
action,
|
|
@@ -16554,9 +16708,9 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
16554
16708
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
16555
16709
|
import {
|
|
16556
16710
|
StringUtil,
|
|
16557
|
-
RuntimeModelError as
|
|
16558
|
-
ModelError as
|
|
16559
|
-
RuntimeError as
|
|
16711
|
+
RuntimeModelError as RuntimeModelError49,
|
|
16712
|
+
ModelError as ModelError26,
|
|
16713
|
+
RuntimeError as RuntimeError46
|
|
16560
16714
|
} from "@ibiz-template/core";
|
|
16561
16715
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
16562
16716
|
async execAction(action, args) {
|
|
@@ -16572,7 +16726,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16572
16726
|
case "WIZARD": {
|
|
16573
16727
|
const frontPSAppView = action.frontAppViewId;
|
|
16574
16728
|
if (!frontPSAppView) {
|
|
16575
|
-
throw new
|
|
16729
|
+
throw new RuntimeModelError49(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
16576
16730
|
}
|
|
16577
16731
|
const { resultContext, resultParams } = await this.handleParams(
|
|
16578
16732
|
action,
|
|
@@ -16610,7 +16764,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16610
16764
|
actionResult = this.doOther(action, args);
|
|
16611
16765
|
break;
|
|
16612
16766
|
default:
|
|
16613
|
-
throw new
|
|
16767
|
+
throw new ModelError26(
|
|
16614
16768
|
action,
|
|
16615
16769
|
"\u672A\u652F\u6301\u7684\u524D\u53F0\u5904\u7406\u6A21\u5F0F[".concat(action.frontProcessType, "]")
|
|
16616
16770
|
);
|
|
@@ -16637,7 +16791,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16637
16791
|
);
|
|
16638
16792
|
return result || {};
|
|
16639
16793
|
}
|
|
16640
|
-
throw new
|
|
16794
|
+
throw new RuntimeModelError49(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
16641
16795
|
}
|
|
16642
16796
|
/**
|
|
16643
16797
|
* 执行打印行为
|
|
@@ -16666,7 +16820,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16666
16820
|
if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
16667
16821
|
requestUrl += "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
|
|
16668
16822
|
} else {
|
|
16669
|
-
throw new
|
|
16823
|
+
throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
|
|
16670
16824
|
}
|
|
16671
16825
|
const res = await ibiz.net.request(requestUrl, {
|
|
16672
16826
|
method: "get",
|
|
@@ -16693,10 +16847,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16693
16847
|
window.open(link, "_blank");
|
|
16694
16848
|
}
|
|
16695
16849
|
} else {
|
|
16696
|
-
throw new
|
|
16850
|
+
throw new RuntimeError46("\u6253\u5370\u5931\u8D25");
|
|
16697
16851
|
}
|
|
16698
16852
|
} else {
|
|
16699
|
-
throw new
|
|
16853
|
+
throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
|
|
16700
16854
|
}
|
|
16701
16855
|
}
|
|
16702
16856
|
/**
|
|
@@ -16739,7 +16893,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16739
16893
|
refreshMode: 1
|
|
16740
16894
|
};
|
|
16741
16895
|
}
|
|
16742
|
-
throw new
|
|
16896
|
+
throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
|
|
16743
16897
|
}
|
|
16744
16898
|
/**
|
|
16745
16899
|
* 执行导出行为
|
|
@@ -16790,10 +16944,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16790
16944
|
URL.revokeObjectURL(elink.href);
|
|
16791
16945
|
document.body.removeChild(elink);
|
|
16792
16946
|
} else {
|
|
16793
|
-
throw new
|
|
16947
|
+
throw new RuntimeError46("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
|
|
16794
16948
|
}
|
|
16795
16949
|
} else {
|
|
16796
|
-
throw new
|
|
16950
|
+
throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
|
|
16797
16951
|
}
|
|
16798
16952
|
}
|
|
16799
16953
|
};
|
|
@@ -16880,7 +17034,7 @@ var ToolbarController = class extends ControlController {
|
|
|
16880
17034
|
const actionId = item.uiactionId;
|
|
16881
17035
|
const uiAction = await getUIActionById(actionId, item.appId);
|
|
16882
17036
|
if (!uiAction) {
|
|
16883
|
-
throw new
|
|
17037
|
+
throw new RuntimeError47("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
16884
17038
|
}
|
|
16885
17039
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
16886
17040
|
if (enableLoading) {
|
|
@@ -17478,7 +17632,7 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
17478
17632
|
};
|
|
17479
17633
|
|
|
17480
17634
|
// src/controller/control/data-view/data-view.controller.ts
|
|
17481
|
-
import { RuntimeModelError as
|
|
17635
|
+
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
17482
17636
|
import { isNil as isNil21 } from "ramda";
|
|
17483
17637
|
|
|
17484
17638
|
// src/controller/control/data-view/data-view.service.ts
|
|
@@ -17693,7 +17847,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
17693
17847
|
const optItemModel = this.getOptItemModel();
|
|
17694
17848
|
if (optItemModel) {
|
|
17695
17849
|
if (!optItemModel.deuiactionGroup) {
|
|
17696
|
-
throw new
|
|
17850
|
+
throw new RuntimeModelError50(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
17697
17851
|
}
|
|
17698
17852
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
17699
17853
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -17746,7 +17900,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
17746
17900
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
17747
17901
|
if (enableGroup && groupMode) {
|
|
17748
17902
|
if (!groupAppDEFieldId) {
|
|
17749
|
-
throw new
|
|
17903
|
+
throw new RuntimeModelError50(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
17750
17904
|
}
|
|
17751
17905
|
if (groupMode === "AUTO") {
|
|
17752
17906
|
this.handleAutoGroup();
|
|
@@ -17813,7 +17967,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
17813
17967
|
async handleCodeListGroup() {
|
|
17814
17968
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
17815
17969
|
if (!groupCodeListId) {
|
|
17816
|
-
throw new
|
|
17970
|
+
throw new RuntimeModelError50(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
17817
17971
|
}
|
|
17818
17972
|
const { items } = this.state;
|
|
17819
17973
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -17841,25 +17995,16 @@ var DataViewControlController = class extends MDControlController {
|
|
|
17841
17995
|
this.state.groups = groups;
|
|
17842
17996
|
}
|
|
17843
17997
|
/**
|
|
17844
|
-
*
|
|
17845
|
-
*
|
|
17846
|
-
* @author
|
|
17847
|
-
* @
|
|
17848
|
-
* @param {string} key 排序字段
|
|
17849
|
-
* @param {string} order 排序顺序
|
|
17998
|
+
* 获取部件默认排序模型
|
|
17999
|
+
* @return {*}
|
|
18000
|
+
* @author: zhujiamin
|
|
18001
|
+
* @Date: 2023-12-28 18:43:27
|
|
17850
18002
|
*/
|
|
17851
|
-
|
|
17852
|
-
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
if (minorSortAppDEFieldId && minorSortDir) {
|
|
17857
|
-
const fieldName = this.fieldIdNameMap.get(minorSortAppDEFieldId);
|
|
17858
|
-
this.state.sortQuery = "".concat(fieldName.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
|
|
17859
|
-
} else {
|
|
17860
|
-
this.state.sortQuery = "";
|
|
17861
|
-
}
|
|
17862
|
-
}
|
|
18003
|
+
getSortModel() {
|
|
18004
|
+
return {
|
|
18005
|
+
minorSortAppDEFieldId: this.model.minorSortAppDEFieldId,
|
|
18006
|
+
minorSortDir: this.model.minorSortDir
|
|
18007
|
+
};
|
|
17863
18008
|
}
|
|
17864
18009
|
/**
|
|
17865
18010
|
* 点击新建
|
|
@@ -17928,7 +18073,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
17928
18073
|
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
17929
18074
|
}
|
|
17930
18075
|
if (!item.appDEFieldId) {
|
|
17931
|
-
throw new
|
|
18076
|
+
throw new RuntimeModelError50(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
|
|
17932
18077
|
}
|
|
17933
18078
|
const tempItem = {
|
|
17934
18079
|
caption,
|
|
@@ -17946,10 +18091,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
17946
18091
|
};
|
|
17947
18092
|
|
|
17948
18093
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
17949
|
-
import { RuntimeModelError as
|
|
18094
|
+
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
17950
18095
|
|
|
17951
18096
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
17952
|
-
import { RuntimeError as
|
|
18097
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
17953
18098
|
var ExpBarControlController = class extends ControlController {
|
|
17954
18099
|
constructor() {
|
|
17955
18100
|
super(...arguments);
|
|
@@ -18004,7 +18149,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
18004
18149
|
get xDataController() {
|
|
18005
18150
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18006
18151
|
if (!controller) {
|
|
18007
|
-
throw new
|
|
18152
|
+
throw new RuntimeModelError51(
|
|
18008
18153
|
this.model,
|
|
18009
18154
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18010
18155
|
);
|
|
@@ -18275,7 +18420,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
18275
18420
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
18276
18421
|
return this.XDataModel.navAppViewId;
|
|
18277
18422
|
}
|
|
18278
|
-
throw new
|
|
18423
|
+
throw new RuntimeError48("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
18279
18424
|
}
|
|
18280
18425
|
/**
|
|
18281
18426
|
* 获取导航视图
|
|
@@ -18363,7 +18508,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
18363
18508
|
get xDataController() {
|
|
18364
18509
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18365
18510
|
if (!controller) {
|
|
18366
|
-
throw new
|
|
18511
|
+
throw new RuntimeModelError52(
|
|
18367
18512
|
this.model,
|
|
18368
18513
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18369
18514
|
);
|
|
@@ -18418,7 +18563,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
18418
18563
|
};
|
|
18419
18564
|
|
|
18420
18565
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
18421
|
-
import { RuntimeError as
|
|
18566
|
+
import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
18422
18567
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
18423
18568
|
constructor() {
|
|
18424
18569
|
super(...arguments);
|
|
@@ -18441,7 +18586,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
18441
18586
|
get xDataController() {
|
|
18442
18587
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18443
18588
|
if (!controller) {
|
|
18444
|
-
throw new
|
|
18589
|
+
throw new RuntimeModelError53(
|
|
18445
18590
|
this.model,
|
|
18446
18591
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18447
18592
|
);
|
|
@@ -18493,7 +18638,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
18493
18638
|
const deData = node.deData || node;
|
|
18494
18639
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
18495
18640
|
if (!nodeModel) {
|
|
18496
|
-
throw new
|
|
18641
|
+
throw new RuntimeError49("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
18497
18642
|
}
|
|
18498
18643
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
18499
18644
|
result.context.currentSrfNav = nodeId;
|
|
@@ -18684,7 +18829,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
18684
18829
|
};
|
|
18685
18830
|
|
|
18686
18831
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
18687
|
-
import { RuntimeError as
|
|
18832
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
18688
18833
|
|
|
18689
18834
|
// src/controller/control/form/form/form.controller.ts
|
|
18690
18835
|
import { debounceAndAsyncMerge, recursiveIterate as recursiveIterate3 } from "@ibiz-template/core";
|
|
@@ -19245,7 +19390,7 @@ var SearchFormController = class extends FormController {
|
|
|
19245
19390
|
applyStoredFilter(index) {
|
|
19246
19391
|
const filter = this.state.storedFilters[index];
|
|
19247
19392
|
if (!filter) {
|
|
19248
|
-
throw new
|
|
19393
|
+
throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
|
|
19249
19394
|
}
|
|
19250
19395
|
if (filter.data) {
|
|
19251
19396
|
Object.assign(this.data, filter.data);
|
|
@@ -19261,7 +19406,7 @@ var SearchFormController = class extends FormController {
|
|
|
19261
19406
|
async removeStoredFilter(index) {
|
|
19262
19407
|
const filter = this.state.storedFilters[index];
|
|
19263
19408
|
if (!filter) {
|
|
19264
|
-
throw new
|
|
19409
|
+
throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
|
|
19265
19410
|
}
|
|
19266
19411
|
this.state.storedFilters.splice(index, 1);
|
|
19267
19412
|
await this.saveConfig();
|
|
@@ -20447,8 +20592,8 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
20447
20592
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.ts
|
|
20448
20593
|
import {
|
|
20449
20594
|
mergeInLeft,
|
|
20450
|
-
ModelError as
|
|
20451
|
-
RuntimeModelError as
|
|
20595
|
+
ModelError as ModelError27,
|
|
20596
|
+
RuntimeModelError as RuntimeModelError54
|
|
20452
20597
|
} from "@ibiz-template/core";
|
|
20453
20598
|
var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
20454
20599
|
constructor() {
|
|
@@ -20474,7 +20619,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20474
20619
|
await super.onInit();
|
|
20475
20620
|
const { contentControl } = this.model;
|
|
20476
20621
|
if (!contentControl) {
|
|
20477
|
-
throw new
|
|
20622
|
+
throw new RuntimeModelError54(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
20478
20623
|
}
|
|
20479
20624
|
if (contentControl.controlType === "GRID") {
|
|
20480
20625
|
mergeInLeft(contentControl, {
|
|
@@ -20524,7 +20669,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20524
20669
|
if (this.model.contentType === "GRID") {
|
|
20525
20670
|
this.mdController.newRow();
|
|
20526
20671
|
} else {
|
|
20527
|
-
throw new
|
|
20672
|
+
throw new ModelError27(
|
|
20528
20673
|
this.model,
|
|
20529
20674
|
"\u591A\u6570\u636E\u90E8\u4EF6\u7C7B\u578B".concat(this.model.contentType, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0\u6570\u636E")
|
|
20530
20675
|
);
|
|
@@ -20571,7 +20716,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20571
20716
|
};
|
|
20572
20717
|
|
|
20573
20718
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
20574
|
-
import { RuntimeError as
|
|
20719
|
+
import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
20575
20720
|
import { createUUID as createUUID11 } from "qx-util";
|
|
20576
20721
|
|
|
20577
20722
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -20612,7 +20757,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
20612
20757
|
super.onInit();
|
|
20613
20758
|
const { contentControl } = this.model;
|
|
20614
20759
|
if (!contentControl) {
|
|
20615
|
-
throw new
|
|
20760
|
+
throw new RuntimeModelError55(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
20616
20761
|
}
|
|
20617
20762
|
contentControl.enableAutoSave = this.enableCreate || this.enableUpdate;
|
|
20618
20763
|
const controlProvider = await getControlProvider(contentControl);
|
|
@@ -20688,7 +20833,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
20688
20833
|
async remove(id) {
|
|
20689
20834
|
const controller = this.formMap.get(id);
|
|
20690
20835
|
if (!controller) {
|
|
20691
|
-
throw new
|
|
20836
|
+
throw new RuntimeError51("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
20692
20837
|
}
|
|
20693
20838
|
await controller.remove();
|
|
20694
20839
|
const index = this.state.items.findIndex((item) => item.id === id);
|
|
@@ -20745,7 +20890,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
20745
20890
|
};
|
|
20746
20891
|
|
|
20747
20892
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
20748
|
-
import { ModelError as
|
|
20893
|
+
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
20749
20894
|
import { clone as clone20 } from "ramda";
|
|
20750
20895
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
20751
20896
|
constructor() {
|
|
@@ -20792,7 +20937,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
20792
20937
|
this.isSingleData = true;
|
|
20793
20938
|
break;
|
|
20794
20939
|
default:
|
|
20795
|
-
throw new
|
|
20940
|
+
throw new ModelError28(
|
|
20796
20941
|
this.model,
|
|
20797
20942
|
"\u6682\u4E0D\u652F\u6301\u91CD\u590D\u5668\u6837\u5F0F".concat(this.model.detailStyle)
|
|
20798
20943
|
);
|
|
@@ -20956,7 +21101,7 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
20956
21101
|
import {
|
|
20957
21102
|
awaitTimeout,
|
|
20958
21103
|
mergeInLeft as mergeInLeft2,
|
|
20959
|
-
RuntimeError as
|
|
21104
|
+
RuntimeError as RuntimeError52
|
|
20960
21105
|
} from "@ibiz-template/core";
|
|
20961
21106
|
import { debounce as debounce2 } from "lodash-es";
|
|
20962
21107
|
import { createUUID as createUUID12 } from "qx-util";
|
|
@@ -20965,7 +21110,7 @@ import { clone as clone21 } from "ramda";
|
|
|
20965
21110
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
20966
21111
|
import {
|
|
20967
21112
|
recursiveIterate as recursiveIterate6,
|
|
20968
|
-
RuntimeModelError as
|
|
21113
|
+
RuntimeModelError as RuntimeModelError56
|
|
20969
21114
|
} from "@ibiz-template/core";
|
|
20970
21115
|
var EditFormService = class extends FormService {
|
|
20971
21116
|
/**
|
|
@@ -21089,7 +21234,7 @@ var EditFormService = class extends FormService {
|
|
|
21089
21234
|
const wizardForm = this.model;
|
|
21090
21235
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
21091
21236
|
if (!methodName) {
|
|
21092
|
-
throw new
|
|
21237
|
+
throw new RuntimeModelError56(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
21093
21238
|
}
|
|
21094
21239
|
let res = await this.exec(
|
|
21095
21240
|
methodName,
|
|
@@ -21250,6 +21395,19 @@ var EditFormService = class extends FormService {
|
|
|
21250
21395
|
|
|
21251
21396
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
21252
21397
|
var EditFormController = class extends FormController {
|
|
21398
|
+
constructor() {
|
|
21399
|
+
super(...arguments);
|
|
21400
|
+
/**
|
|
21401
|
+
* 表单旧数据
|
|
21402
|
+
*
|
|
21403
|
+
* @author zk
|
|
21404
|
+
* @date 2023-12-20 11:12:43
|
|
21405
|
+
* @protected
|
|
21406
|
+
* @type {IData}
|
|
21407
|
+
* @memberof FormController
|
|
21408
|
+
*/
|
|
21409
|
+
this.oldData = new ControlVO();
|
|
21410
|
+
}
|
|
21253
21411
|
get view() {
|
|
21254
21412
|
return this.ctx.view;
|
|
21255
21413
|
}
|
|
@@ -21387,6 +21545,7 @@ var EditFormController = class extends FormController {
|
|
|
21387
21545
|
}
|
|
21388
21546
|
this.state.modified = false;
|
|
21389
21547
|
this.state.data = res.data;
|
|
21548
|
+
this.oldData = this.data.clone();
|
|
21390
21549
|
this.formStateNotify("LOAD" /* LOAD */);
|
|
21391
21550
|
await this.evt.emit("onLoadSuccess", void 0);
|
|
21392
21551
|
this.actionNotification("GETSUCCESS");
|
|
@@ -21407,7 +21566,7 @@ var EditFormController = class extends FormController {
|
|
|
21407
21566
|
}
|
|
21408
21567
|
const isValid = await this.validate();
|
|
21409
21568
|
if (!isValid) {
|
|
21410
|
-
throw new
|
|
21569
|
+
throw new RuntimeError52("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
21411
21570
|
}
|
|
21412
21571
|
if (!silent) {
|
|
21413
21572
|
await this.startLoading();
|
|
@@ -21438,6 +21597,7 @@ var EditFormController = class extends FormController {
|
|
|
21438
21597
|
} else {
|
|
21439
21598
|
mergeInLeft2(this.data, res.data);
|
|
21440
21599
|
}
|
|
21600
|
+
this.oldData = this.data.clone();
|
|
21441
21601
|
this.data.tempsrfkey = this.data.srfkey;
|
|
21442
21602
|
}
|
|
21443
21603
|
this.state.modified = false;
|
|
@@ -21529,7 +21689,7 @@ var EditFormController = class extends FormController {
|
|
|
21529
21689
|
(item) => item.id === formItemUpdateId
|
|
21530
21690
|
);
|
|
21531
21691
|
if (!formItemUpdate) {
|
|
21532
|
-
throw new
|
|
21692
|
+
throw new RuntimeError52("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
21533
21693
|
}
|
|
21534
21694
|
const {
|
|
21535
21695
|
appDEMethodId,
|
|
@@ -21589,7 +21749,7 @@ var EditFormController = class extends FormController {
|
|
|
21589
21749
|
async wfStart(args) {
|
|
21590
21750
|
const isValid = await this.validate();
|
|
21591
21751
|
if (!isValid) {
|
|
21592
|
-
throw new
|
|
21752
|
+
throw new RuntimeError52("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
21593
21753
|
}
|
|
21594
21754
|
await this.startLoading();
|
|
21595
21755
|
const { context, params } = this.handlerAbilityParams(args);
|
|
@@ -21618,7 +21778,7 @@ var EditFormController = class extends FormController {
|
|
|
21618
21778
|
async wfSubmit(args) {
|
|
21619
21779
|
const isValid = await this.validate();
|
|
21620
21780
|
if (!isValid) {
|
|
21621
|
-
throw new
|
|
21781
|
+
throw new RuntimeError52("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
21622
21782
|
}
|
|
21623
21783
|
await this.startLoading();
|
|
21624
21784
|
const { context, params } = this.handlerAbilityParams(args);
|
|
@@ -21647,14 +21807,40 @@ var EditFormController = class extends FormController {
|
|
|
21647
21807
|
* @return {*} {Promise<void>}
|
|
21648
21808
|
*/
|
|
21649
21809
|
async autoSave() {
|
|
21650
|
-
if (this.model.enableAutoSave) {
|
|
21651
|
-
|
|
21652
|
-
|
|
21653
|
-
|
|
21654
|
-
|
|
21655
|
-
|
|
21810
|
+
if (!this.model.enableAutoSave) {
|
|
21811
|
+
return;
|
|
21812
|
+
}
|
|
21813
|
+
const { demand } = this.model;
|
|
21814
|
+
const saveParam = { silent: true, noFillBack: true };
|
|
21815
|
+
if (demand) {
|
|
21816
|
+
saveParam.data = this.getDiffData();
|
|
21817
|
+
}
|
|
21818
|
+
try {
|
|
21819
|
+
await this.save(saveParam);
|
|
21820
|
+
} catch (error) {
|
|
21821
|
+
ibiz.log.error(error);
|
|
21656
21822
|
}
|
|
21657
21823
|
}
|
|
21824
|
+
/**
|
|
21825
|
+
* 比较旧数据跟当前数据的差异返回差异数据
|
|
21826
|
+
*
|
|
21827
|
+
* @author zk
|
|
21828
|
+
* @date 2023-12-20 10:12:06
|
|
21829
|
+
* @protected
|
|
21830
|
+
* @return {*} {IData}
|
|
21831
|
+
* @memberof EditFormController
|
|
21832
|
+
*/
|
|
21833
|
+
getDiffData() {
|
|
21834
|
+
const { data } = this.state;
|
|
21835
|
+
const diffData = {};
|
|
21836
|
+
Object.keys(data).forEach((key) => {
|
|
21837
|
+
if (data[key] !== this.oldData[key] || key === data.srfkeyfield) {
|
|
21838
|
+
diffData[key] = data[key];
|
|
21839
|
+
}
|
|
21840
|
+
});
|
|
21841
|
+
diffData.srfuf = data.srfuf;
|
|
21842
|
+
return new ControlVO(diffData, this.oldData.$dataUIMap);
|
|
21843
|
+
}
|
|
21658
21844
|
/**
|
|
21659
21845
|
* 设置simple模式的数据
|
|
21660
21846
|
* @author lxm
|
|
@@ -21908,13 +22094,13 @@ import {
|
|
|
21908
22094
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
21909
22095
|
mergeDefaultInLeft,
|
|
21910
22096
|
recursiveIterate as recursiveIterate7,
|
|
21911
|
-
RuntimeError as
|
|
21912
|
-
RuntimeModelError as
|
|
22097
|
+
RuntimeError as RuntimeError53,
|
|
22098
|
+
RuntimeModelError as RuntimeModelError58
|
|
21913
22099
|
} from "@ibiz-template/core";
|
|
21914
22100
|
import { clone as clone22 } from "ramda";
|
|
21915
22101
|
|
|
21916
22102
|
// src/controller/control/grid/grid/grid.service.ts
|
|
21917
|
-
import { RuntimeModelError as
|
|
22103
|
+
import { RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
21918
22104
|
var GridService = class extends MDControlService {
|
|
21919
22105
|
/**
|
|
21920
22106
|
* 初始化属性映射
|
|
@@ -21942,7 +22128,7 @@ var GridService = class extends MDControlService {
|
|
|
21942
22128
|
dataType: dataItem.dataType
|
|
21943
22129
|
});
|
|
21944
22130
|
} else {
|
|
21945
|
-
throw new
|
|
22131
|
+
throw new RuntimeModelError57(
|
|
21946
22132
|
column,
|
|
21947
22133
|
"\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8868\u683C\u6570\u636E\u9879[".concat(deField, "]")
|
|
21948
22134
|
);
|
|
@@ -22130,11 +22316,11 @@ var GridController = class extends MDControlController {
|
|
|
22130
22316
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
22131
22317
|
);
|
|
22132
22318
|
if (!this.groupFieldColumn) {
|
|
22133
|
-
throw new
|
|
22319
|
+
throw new RuntimeModelError58(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
22134
22320
|
}
|
|
22135
22321
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
22136
22322
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
22137
|
-
throw new
|
|
22323
|
+
throw new RuntimeModelError58(
|
|
22138
22324
|
this.groupFieldColumn.model,
|
|
22139
22325
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
22140
22326
|
);
|
|
@@ -22144,7 +22330,7 @@ var GridController = class extends MDControlController {
|
|
|
22144
22330
|
);
|
|
22145
22331
|
if (index !== -1 && index !== 0) {
|
|
22146
22332
|
if (this.isMultistageHeader) {
|
|
22147
|
-
throw new
|
|
22333
|
+
throw new RuntimeModelError58(
|
|
22148
22334
|
this.model,
|
|
22149
22335
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
22150
22336
|
);
|
|
@@ -22154,10 +22340,10 @@ var GridController = class extends MDControlController {
|
|
|
22154
22340
|
}
|
|
22155
22341
|
if (groupMode === "CODELIST") {
|
|
22156
22342
|
if (!groupCodeListId) {
|
|
22157
|
-
throw new
|
|
22343
|
+
throw new RuntimeModelError58(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
22158
22344
|
}
|
|
22159
22345
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
22160
|
-
throw new
|
|
22346
|
+
throw new RuntimeModelError58(
|
|
22161
22347
|
this.model,
|
|
22162
22348
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
22163
22349
|
);
|
|
@@ -22244,7 +22430,7 @@ var GridController = class extends MDControlController {
|
|
|
22244
22430
|
return;
|
|
22245
22431
|
}
|
|
22246
22432
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
22247
|
-
throw new
|
|
22433
|
+
throw new RuntimeModelError58(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
22248
22434
|
}
|
|
22249
22435
|
const params = await this.getFetchParams();
|
|
22250
22436
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -22312,7 +22498,7 @@ var GridController = class extends MDControlController {
|
|
|
22312
22498
|
if (editShowMode === "row") {
|
|
22313
22499
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
22314
22500
|
if (editingRow) {
|
|
22315
|
-
throw new
|
|
22501
|
+
throw new RuntimeError53("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
22316
22502
|
}
|
|
22317
22503
|
}
|
|
22318
22504
|
const queryParams = { ...this.params };
|
|
@@ -22353,7 +22539,7 @@ var GridController = class extends MDControlController {
|
|
|
22353
22539
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
22354
22540
|
const rowState = this.findRowState(data);
|
|
22355
22541
|
if (!rowState) {
|
|
22356
|
-
throw new
|
|
22542
|
+
throw new RuntimeError53("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
22357
22543
|
}
|
|
22358
22544
|
if (!rowState.modified) {
|
|
22359
22545
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -22365,7 +22551,7 @@ var GridController = class extends MDControlController {
|
|
|
22365
22551
|
}
|
|
22366
22552
|
const isValid = await this.validate(rowState);
|
|
22367
22553
|
if (!isValid) {
|
|
22368
|
-
throw new
|
|
22554
|
+
throw new RuntimeError53("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
22369
22555
|
}
|
|
22370
22556
|
let res;
|
|
22371
22557
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
@@ -22562,7 +22748,7 @@ var GridController = class extends MDControlController {
|
|
|
22562
22748
|
}
|
|
22563
22749
|
async toggleRowEdit() {
|
|
22564
22750
|
if (!this.model.enableRowNew) {
|
|
22565
|
-
throw new
|
|
22751
|
+
throw new RuntimeError53("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
22566
22752
|
}
|
|
22567
22753
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
22568
22754
|
}
|
|
@@ -22595,7 +22781,7 @@ var GridController = class extends MDControlController {
|
|
|
22595
22781
|
} else {
|
|
22596
22782
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
22597
22783
|
if (editingRow) {
|
|
22598
|
-
throw new
|
|
22784
|
+
throw new RuntimeError53("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
22599
22785
|
}
|
|
22600
22786
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
22601
22787
|
row.cacheData = clone22(row.data);
|
|
@@ -22609,6 +22795,18 @@ var GridController = class extends MDControlController {
|
|
|
22609
22795
|
});
|
|
22610
22796
|
this.evt.emit("onRowEditChange", { row });
|
|
22611
22797
|
}
|
|
22798
|
+
/**
|
|
22799
|
+
* 获取部件默认排序模型
|
|
22800
|
+
* @return {*}
|
|
22801
|
+
* @author: zhujiamin
|
|
22802
|
+
* @Date: 2023-12-28 18:43:27
|
|
22803
|
+
*/
|
|
22804
|
+
getSortModel() {
|
|
22805
|
+
return {
|
|
22806
|
+
minorSortAppDEFieldId: this.model.minorSortAppDEFieldId,
|
|
22807
|
+
minorSortDir: this.model.minorSortDir
|
|
22808
|
+
};
|
|
22809
|
+
}
|
|
22612
22810
|
/**
|
|
22613
22811
|
* 设置排序
|
|
22614
22812
|
*
|
|
@@ -22618,18 +22816,11 @@ var GridController = class extends MDControlController {
|
|
|
22618
22816
|
* @param {string} order 排序顺序
|
|
22619
22817
|
*/
|
|
22620
22818
|
setSort(fieldId, order) {
|
|
22621
|
-
|
|
22622
|
-
|
|
22623
|
-
|
|
22624
|
-
} else {
|
|
22625
|
-
const { minorSortAppDEFieldId, minorSortDir } = this.model;
|
|
22626
|
-
if (minorSortAppDEFieldId && minorSortDir) {
|
|
22627
|
-
const fieldName = this.fieldIdNameMap.get(minorSortAppDEFieldId);
|
|
22628
|
-
this.state.sortQuery = "".concat(fieldName.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
|
|
22629
|
-
} else {
|
|
22630
|
-
this.state.sortQuery = "";
|
|
22631
|
-
}
|
|
22819
|
+
let fieldName;
|
|
22820
|
+
if (fieldId) {
|
|
22821
|
+
fieldName = this.fieldIdNameMap.get(fieldId).toLowerCase();
|
|
22632
22822
|
}
|
|
22823
|
+
super.setSort(fieldName, order);
|
|
22633
22824
|
}
|
|
22634
22825
|
/**
|
|
22635
22826
|
* 表格编辑项更新
|
|
@@ -22645,7 +22836,7 @@ var GridController = class extends MDControlController {
|
|
|
22645
22836
|
(item) => item.id === updateId
|
|
22646
22837
|
);
|
|
22647
22838
|
if (!findUpdate) {
|
|
22648
|
-
throw new
|
|
22839
|
+
throw new RuntimeError53("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
22649
22840
|
}
|
|
22650
22841
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
22651
22842
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -22801,7 +22992,7 @@ var GridController = class extends MDControlController {
|
|
|
22801
22992
|
data2 = this.getData();
|
|
22802
22993
|
}
|
|
22803
22994
|
if (data2.length === 0) {
|
|
22804
|
-
throw new
|
|
22995
|
+
throw new RuntimeError53("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
22805
22996
|
}
|
|
22806
22997
|
return formatExcelData(data2);
|
|
22807
22998
|
};
|
|
@@ -22957,7 +23148,7 @@ var GridController = class extends MDControlController {
|
|
|
22957
23148
|
};
|
|
22958
23149
|
|
|
22959
23150
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
22960
|
-
import { DataTypes as DataTypes3, ModelError as
|
|
23151
|
+
import { DataTypes as DataTypes3, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
22961
23152
|
import dayjs4 from "dayjs";
|
|
22962
23153
|
import { debounce as debounce3 } from "lodash-es";
|
|
22963
23154
|
import { clone as clone23, isNil as isNil22 } from "ramda";
|
|
@@ -23078,7 +23269,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23078
23269
|
const valueItem = this.model.linkValueItem || "srfkey";
|
|
23079
23270
|
const value = row.data[valueItem];
|
|
23080
23271
|
if (value == null) {
|
|
23081
|
-
throw new
|
|
23272
|
+
throw new ModelError29(this.model, "\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
|
|
23082
23273
|
}
|
|
23083
23274
|
const { linkAppViewId } = this.model;
|
|
23084
23275
|
if (!linkAppViewId) {
|
|
@@ -23184,12 +23375,12 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23184
23375
|
aggValue = Math.min(...items.map((item) => item[fieldName]));
|
|
23185
23376
|
break;
|
|
23186
23377
|
default:
|
|
23187
|
-
throw new
|
|
23378
|
+
throw new ModelError29(this.model, "\u6682\u672A\u652F\u6301\u5C5E\u6027\u5217\u805A\u5408\u6A21\u5F0F".concat(aggMode));
|
|
23188
23379
|
}
|
|
23189
23380
|
} else if (this.grid.model.aggMode === "ALL") {
|
|
23190
|
-
throw new
|
|
23381
|
+
throw new ModelError29(this.model, "\u8FDC\u7A0B\u805A\u5408\u6682\u672A\u652F\u6301");
|
|
23191
23382
|
} else {
|
|
23192
|
-
throw new
|
|
23383
|
+
throw new ModelError29(
|
|
23193
23384
|
this.grid.model,
|
|
23194
23385
|
"\u6682\u672A\u652F\u6301\u805A\u5408\u6A21\u5F0F".concat(this.grid.model.aggMode)
|
|
23195
23386
|
);
|
|
@@ -23260,7 +23451,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23260
23451
|
};
|
|
23261
23452
|
|
|
23262
23453
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
23263
|
-
import { RuntimeModelError as
|
|
23454
|
+
import { RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
|
|
23264
23455
|
var GridUAColumnController = class extends GridColumnController {
|
|
23265
23456
|
/**
|
|
23266
23457
|
* 给rowController初始化操作列的状态
|
|
@@ -23273,7 +23464,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
23273
23464
|
var _a;
|
|
23274
23465
|
const { deuiactionGroup } = this.model;
|
|
23275
23466
|
if (!deuiactionGroup) {
|
|
23276
|
-
throw new
|
|
23467
|
+
throw new RuntimeModelError59(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
23277
23468
|
}
|
|
23278
23469
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
23279
23470
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -23318,7 +23509,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
23318
23509
|
};
|
|
23319
23510
|
|
|
23320
23511
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
23321
|
-
import { RuntimeError as
|
|
23512
|
+
import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
23322
23513
|
import Schema2 from "async-validator";
|
|
23323
23514
|
import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
|
|
23324
23515
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -23467,7 +23658,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
23467
23658
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
23468
23659
|
const result = await this.validate(row);
|
|
23469
23660
|
if (!result) {
|
|
23470
|
-
throw new
|
|
23661
|
+
throw new RuntimeError54(
|
|
23471
23662
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
23472
23663
|
);
|
|
23473
23664
|
}
|
|
@@ -23632,25 +23823,16 @@ var ListController = class extends MDControlController {
|
|
|
23632
23823
|
await this.service.init(this.context);
|
|
23633
23824
|
}
|
|
23634
23825
|
/**
|
|
23635
|
-
*
|
|
23636
|
-
*
|
|
23637
|
-
* @author
|
|
23638
|
-
* @
|
|
23639
|
-
* @param {string} key 排序字段
|
|
23640
|
-
* @param {string} order 排序顺序
|
|
23826
|
+
* 获取部件默认排序模型
|
|
23827
|
+
* @return {*}
|
|
23828
|
+
* @author: zhujiamin
|
|
23829
|
+
* @Date: 2023-12-28 18:43:27
|
|
23641
23830
|
*/
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23647
|
-
if (minorSortAppDEFieldId && minorSortDir) {
|
|
23648
|
-
const fieldName = this.fieldIdNameMap.get(minorSortAppDEFieldId);
|
|
23649
|
-
this.state.sortQuery = "".concat(fieldName.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
|
|
23650
|
-
} else {
|
|
23651
|
-
this.state.sortQuery = "";
|
|
23652
|
-
}
|
|
23653
|
-
}
|
|
23831
|
+
getSortModel() {
|
|
23832
|
+
return {
|
|
23833
|
+
minorSortAppDEFieldId: this.model.minorSortAppDEFieldId,
|
|
23834
|
+
minorSortDir: this.model.minorSortDir
|
|
23835
|
+
};
|
|
23654
23836
|
}
|
|
23655
23837
|
/**
|
|
23656
23838
|
* 加载更多
|
|
@@ -23774,7 +23956,7 @@ var ListController = class extends MDControlController {
|
|
|
23774
23956
|
};
|
|
23775
23957
|
|
|
23776
23958
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
23777
|
-
import { recursiveIterate as recursiveIterate8, RuntimeError as
|
|
23959
|
+
import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
23778
23960
|
var PanelController = class extends ControlController {
|
|
23779
23961
|
constructor(model, context, params, ctx, container) {
|
|
23780
23962
|
super(model, context, params, ctx);
|
|
@@ -23898,7 +24080,7 @@ var PanelController = class extends ControlController {
|
|
|
23898
24080
|
var _a, _b;
|
|
23899
24081
|
const data = await this.prepareData();
|
|
23900
24082
|
if (!data) {
|
|
23901
|
-
throw new
|
|
24083
|
+
throw new RuntimeError55("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
23902
24084
|
}
|
|
23903
24085
|
const panelData = this.convertData(data);
|
|
23904
24086
|
(_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
|
|
@@ -24493,11 +24675,15 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
24493
24675
|
};
|
|
24494
24676
|
|
|
24495
24677
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
24496
|
-
import {
|
|
24678
|
+
import {
|
|
24679
|
+
RuntimeError as RuntimeError56,
|
|
24680
|
+
mergeInLeft as mergeInLeft3,
|
|
24681
|
+
recursiveIterate as recursiveIterate9
|
|
24682
|
+
} from "@ibiz-template/core";
|
|
24497
24683
|
import { isNil as isNil23 } from "ramda";
|
|
24498
24684
|
|
|
24499
24685
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
24500
|
-
import { RuntimeModelError as
|
|
24686
|
+
import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
24501
24687
|
var SearchBarFilterController = class {
|
|
24502
24688
|
constructor(model, searchBar) {
|
|
24503
24689
|
this.model = model;
|
|
@@ -24525,7 +24711,7 @@ var SearchBarFilterController = class {
|
|
|
24525
24711
|
*/
|
|
24526
24712
|
async init() {
|
|
24527
24713
|
if (!this.model.editor) {
|
|
24528
|
-
throw new
|
|
24714
|
+
throw new RuntimeModelError60(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
|
|
24529
24715
|
}
|
|
24530
24716
|
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
24531
24717
|
if (this.editorProvider) {
|
|
@@ -24913,7 +25099,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24913
25099
|
}
|
|
24914
25100
|
}
|
|
24915
25101
|
/**
|
|
24916
|
-
* 格式化过滤项
|
|
25102
|
+
* 格式化过滤项 (后续如果修改这里的逻辑记得把下方的反推函数parseFilters也跟着修改!)
|
|
24917
25103
|
* @author lxm
|
|
24918
25104
|
* @date 2023-10-16 03:45:41
|
|
24919
25105
|
* @param {IFilterNode} node
|
|
@@ -24935,6 +25121,33 @@ var SearchBarController = class extends ControlController {
|
|
|
24935
25121
|
value: node.value
|
|
24936
25122
|
};
|
|
24937
25123
|
}
|
|
25124
|
+
/**
|
|
25125
|
+
* 根据格式化后的过滤项反推出过滤项树节点数据集合
|
|
25126
|
+
* @param {IData} data
|
|
25127
|
+
* @return {*}
|
|
25128
|
+
* @author: zhujiamin
|
|
25129
|
+
* @Date: 2023-12-28 09:47:45
|
|
25130
|
+
*/
|
|
25131
|
+
parseFilters(data) {
|
|
25132
|
+
if (data.condtype === "GROUP") {
|
|
25133
|
+
return {
|
|
25134
|
+
leaf: false,
|
|
25135
|
+
logicType: data.condop === "AND" ? "AND" : "OR",
|
|
25136
|
+
children: (data.searchconds || []).map(
|
|
25137
|
+
(item) => this.parseFilters(item)
|
|
25138
|
+
)
|
|
25139
|
+
};
|
|
25140
|
+
}
|
|
25141
|
+
if (data.condtype === "DEFIELD") {
|
|
25142
|
+
return {
|
|
25143
|
+
leaf: true,
|
|
25144
|
+
field: data.fieldname || null,
|
|
25145
|
+
valueOP: data.condop || null,
|
|
25146
|
+
value: data.value || null
|
|
25147
|
+
};
|
|
25148
|
+
}
|
|
25149
|
+
throw new RuntimeError56("\u65E0\u6548\u7684condtype:".concat(data.condtype));
|
|
25150
|
+
}
|
|
24938
25151
|
/**
|
|
24939
25152
|
* 获取初始过滤项树节点数据集合
|
|
24940
25153
|
* @return {*}
|
|
@@ -24979,9 +25192,6 @@ var SearchBarController = class extends ControlController {
|
|
|
24979
25192
|
if (tempData.theme_model.columnstates) {
|
|
24980
25193
|
tempGroup.searchGroupData.columnstates = tempData.theme_model.columnstates;
|
|
24981
25194
|
}
|
|
24982
|
-
if (tempData.theme_model.filternodes) {
|
|
24983
|
-
tempGroup.searchGroupData.filternodes = tempData.theme_model.filternodes;
|
|
24984
|
-
}
|
|
24985
25195
|
if (tempData.theme_model.searchconds) {
|
|
24986
25196
|
tempGroup.searchGroupData.searchconds = tempData.theme_model.searchconds;
|
|
24987
25197
|
}
|
|
@@ -24990,7 +25200,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24990
25200
|
tempGroup.show = tempData.valid_flag === "1";
|
|
24991
25201
|
}
|
|
24992
25202
|
} catch (error) {
|
|
24993
|
-
ibiz.log.error(error);
|
|
25203
|
+
ibiz.log.error("".concat(item.data, "\u975E\u6807\u51C6JSON\u683C\u5F0F:"), error);
|
|
24994
25204
|
}
|
|
24995
25205
|
}
|
|
24996
25206
|
return tempGroup;
|
|
@@ -25039,11 +25249,9 @@ var SearchBarController = class extends ControlController {
|
|
|
25039
25249
|
if (this.grid && this.state.selectedSearchGroupItem) {
|
|
25040
25250
|
const filters = this.calcFilters();
|
|
25041
25251
|
const saveParams = {
|
|
25042
|
-
filternodes: this.state.filterNodes,
|
|
25043
25252
|
searchconds: filters,
|
|
25044
25253
|
sort: this.grid.state.sortQuery,
|
|
25045
|
-
columnstates: this.grid.state.columnStates
|
|
25046
|
-
show: this.state.selectedSearchGroupItem.show
|
|
25254
|
+
columnstates: this.grid.state.columnStates
|
|
25047
25255
|
};
|
|
25048
25256
|
if (this.state.selectedSearchGroupItem.saved) {
|
|
25049
25257
|
await this.service.update(this.state.selectedSearchGroupItem.id, {
|
|
@@ -25084,8 +25292,11 @@ var SearchBarController = class extends ControlController {
|
|
|
25084
25292
|
groupItem.show = true;
|
|
25085
25293
|
}
|
|
25086
25294
|
}
|
|
25087
|
-
if (groupItem.searchGroupData && groupItem.searchGroupData.
|
|
25088
|
-
|
|
25295
|
+
if (groupItem.searchGroupData && groupItem.searchGroupData.searchconds && groupItem.searchGroupData.searchconds.length > 0) {
|
|
25296
|
+
const filterNodes = groupItem.searchGroupData.searchconds.map(
|
|
25297
|
+
(item) => this.parseFilters(item)
|
|
25298
|
+
);
|
|
25299
|
+
this.state.filterNodes = filterNodes;
|
|
25089
25300
|
} else {
|
|
25090
25301
|
this.state.filterNodes = this.getOriginFilterNodes();
|
|
25091
25302
|
}
|
|
@@ -25334,13 +25545,13 @@ var TabExpPanelController = class extends ControlController {
|
|
|
25334
25545
|
|
|
25335
25546
|
// src/controller/control/tree/tree.controller.ts
|
|
25336
25547
|
import {
|
|
25337
|
-
RuntimeError as
|
|
25338
|
-
RuntimeModelError as
|
|
25548
|
+
RuntimeError as RuntimeError57,
|
|
25549
|
+
RuntimeModelError as RuntimeModelError61,
|
|
25339
25550
|
recursiveIterate as recursiveIterate10
|
|
25340
25551
|
} from "@ibiz-template/core";
|
|
25341
25552
|
|
|
25342
25553
|
// src/controller/control/tree/tree.service.ts
|
|
25343
|
-
import { ModelError as
|
|
25554
|
+
import { ModelError as ModelError30 } from "@ibiz-template/core";
|
|
25344
25555
|
var TreeService = class extends MDControlService {
|
|
25345
25556
|
/**
|
|
25346
25557
|
* 获取子节点数据
|
|
@@ -25437,7 +25648,7 @@ var TreeService = class extends MDControlService {
|
|
|
25437
25648
|
);
|
|
25438
25649
|
break;
|
|
25439
25650
|
default:
|
|
25440
|
-
throw new
|
|
25651
|
+
throw new ModelError30(
|
|
25441
25652
|
nodeModel,
|
|
25442
25653
|
"".concat(nodeModel.treeNodeType, "\u8282\u70B9\u7C7B\u578B\u672A\u652F\u6301")
|
|
25443
25654
|
);
|
|
@@ -25640,11 +25851,11 @@ var TreeController = class extends MDControlController {
|
|
|
25640
25851
|
*/
|
|
25641
25852
|
this.dropNodeRss = /* @__PURE__ */ new Map();
|
|
25642
25853
|
/**
|
|
25643
|
-
*
|
|
25854
|
+
* 节点上下文解析后信息`
|
|
25644
25855
|
* @author lxm
|
|
25645
|
-
* @date 2023-12-
|
|
25856
|
+
* @date 2023-12-29 10:38:37
|
|
25646
25857
|
*/
|
|
25647
|
-
this.
|
|
25858
|
+
this.contextMenuInfos = {};
|
|
25648
25859
|
}
|
|
25649
25860
|
get _evt() {
|
|
25650
25861
|
return this.evt;
|
|
@@ -25758,12 +25969,28 @@ var TreeController = class extends MDControlController {
|
|
|
25758
25969
|
initNodeClickTBUIActionItem() {
|
|
25759
25970
|
var _a;
|
|
25760
25971
|
(_a = this.model.detreeNodes) == null ? void 0 : _a.forEach((node) => {
|
|
25761
|
-
var _a2
|
|
25762
|
-
|
|
25763
|
-
|
|
25764
|
-
|
|
25765
|
-
|
|
25766
|
-
|
|
25972
|
+
var _a2;
|
|
25973
|
+
const contextMenu = node.decontextMenu;
|
|
25974
|
+
if ((_a2 = contextMenu == null ? void 0 : contextMenu.detoolbarItems) == null ? void 0 : _a2.length) {
|
|
25975
|
+
let itemNum = 0;
|
|
25976
|
+
const items = [];
|
|
25977
|
+
recursiveIterate10(
|
|
25978
|
+
contextMenu,
|
|
25979
|
+
(item) => {
|
|
25980
|
+
if (item.itemType === "DEUIACTION") {
|
|
25981
|
+
itemNum += 1;
|
|
25982
|
+
const uiItem = item;
|
|
25983
|
+
if (uiItem.actionLevel === 200) {
|
|
25984
|
+
items.push(uiItem);
|
|
25985
|
+
}
|
|
25986
|
+
}
|
|
25987
|
+
},
|
|
25988
|
+
{ childrenFields: ["detoolbarItems"] }
|
|
25989
|
+
);
|
|
25990
|
+
this.contextMenuInfos[node.id] = {
|
|
25991
|
+
onlyOneActionItem: itemNum === 1,
|
|
25992
|
+
clickTBUIActionItem: items[0]
|
|
25993
|
+
};
|
|
25767
25994
|
}
|
|
25768
25995
|
});
|
|
25769
25996
|
}
|
|
@@ -25855,9 +26082,15 @@ var TreeController = class extends MDControlController {
|
|
|
25855
26082
|
* @memberof TreeController
|
|
25856
26083
|
*/
|
|
25857
26084
|
async onTreeNodeClick(nodeData, event) {
|
|
25858
|
-
|
|
25859
|
-
|
|
25860
|
-
|
|
26085
|
+
var _a;
|
|
26086
|
+
const clickActionItem = (_a = this.contextMenuInfos[nodeData.nodeId]) == null ? void 0 : _a.clickTBUIActionItem;
|
|
26087
|
+
if (clickActionItem) {
|
|
26088
|
+
return this.doUIAction(
|
|
26089
|
+
clickActionItem.uiactionId,
|
|
26090
|
+
nodeData,
|
|
26091
|
+
event,
|
|
26092
|
+
clickActionItem.appId
|
|
26093
|
+
);
|
|
25861
26094
|
}
|
|
25862
26095
|
if (this.state.navigational) {
|
|
25863
26096
|
const nodeModel = this.getNodeModel(nodeData.nodeId);
|
|
@@ -26099,14 +26332,17 @@ var TreeController = class extends MDControlController {
|
|
|
26099
26332
|
draggingNodeModel.appDataEntityId
|
|
26100
26333
|
);
|
|
26101
26334
|
}
|
|
26102
|
-
if (((_a = draggingNode.parent) == null ? void 0 : _a.id)
|
|
26103
|
-
|
|
26104
|
-
|
|
26105
|
-
|
|
26106
|
-
|
|
26335
|
+
if (((_a = draggingNode.parent) == null ? void 0 : _a.id) === ((_b = dropNode.parent) == null ? void 0 : _b.id)) {
|
|
26336
|
+
const currentNodeModel = this.getNodeModel(dropNode.nodeId);
|
|
26337
|
+
return (currentNodeModel == null ? void 0 : currentNodeModel.allowOrder) === true;
|
|
26338
|
+
}
|
|
26339
|
+
if (!dropNode.parent) {
|
|
26340
|
+
return false;
|
|
26107
26341
|
}
|
|
26108
|
-
|
|
26109
|
-
|
|
26342
|
+
return !!this.findDropNodeRS(
|
|
26343
|
+
dropNode.parent.nodeId,
|
|
26344
|
+
draggingNodeModel.appDataEntityId
|
|
26345
|
+
);
|
|
26110
26346
|
}
|
|
26111
26347
|
/**
|
|
26112
26348
|
* 找到指定父节点下的节点关系里面
|
|
@@ -26132,16 +26368,16 @@ var TreeController = class extends MDControlController {
|
|
|
26132
26368
|
* @return {*} {Promise<void>}
|
|
26133
26369
|
*/
|
|
26134
26370
|
async onNodeDrop(draggingNode, dropNode, dropType) {
|
|
26135
|
-
var _a, _b, _c
|
|
26371
|
+
var _a, _b, _c;
|
|
26136
26372
|
if (dropType === "inner" && !dropNode.leaf && dropNode.children === void 0) {
|
|
26137
26373
|
await this.expandNodeByKey([dropNode.id]);
|
|
26138
26374
|
}
|
|
26139
26375
|
const modifiedNodeDatas = [];
|
|
26140
26376
|
const draggingNodeModel = this.getNodeModel(draggingNode.nodeId);
|
|
26141
26377
|
const dropInNode = dropType === "inner" ? dropNode : dropNode.parent;
|
|
26142
|
-
const isChangedParent = (
|
|
26378
|
+
const isChangedParent = (dropNode == null ? void 0 : dropNode.id) !== ((_a = draggingNode.parent) == null ? void 0 : _a.id);
|
|
26143
26379
|
let orderNodeModel = this.getNodeModel(dropNode.nodeId);
|
|
26144
|
-
if (dropType === "inner" || ((
|
|
26380
|
+
if (dropType === "inner" || ((_b = dropNode.parent) == null ? void 0 : _b.id) !== ((_c = draggingNode.parent) == null ? void 0 : _c.id)) {
|
|
26145
26381
|
const dropNodeRs = this.findDropNodeRS(
|
|
26146
26382
|
dropInNode.nodeId,
|
|
26147
26383
|
draggingNodeModel.appDataEntityId
|
|
@@ -26176,7 +26412,7 @@ var TreeController = class extends MDControlController {
|
|
|
26176
26412
|
const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
|
|
26177
26413
|
if (allowOrder === true) {
|
|
26178
26414
|
if (!sortAppDEFieldId) {
|
|
26179
|
-
throw new
|
|
26415
|
+
throw new RuntimeModelError61(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
|
|
26180
26416
|
}
|
|
26181
26417
|
const sortField = sortAppDEFieldId.toLowerCase();
|
|
26182
26418
|
const isAsc = sortDir === "ASC";
|
|
@@ -26257,10 +26493,10 @@ var TreeController = class extends MDControlController {
|
|
|
26257
26493
|
async modifyNodeText(nodeData, text) {
|
|
26258
26494
|
const model = this.getNodeModel(nodeData.nodeId);
|
|
26259
26495
|
if (!model.allowEditText) {
|
|
26260
|
-
throw new
|
|
26496
|
+
throw new RuntimeModelError61(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
26261
26497
|
}
|
|
26262
26498
|
if (!nodeData.deData) {
|
|
26263
|
-
throw new
|
|
26499
|
+
throw new RuntimeError57("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
26264
26500
|
}
|
|
26265
26501
|
nodeData.text = text;
|
|
26266
26502
|
nodeData.deData[model.textAppDEFieldId] = text;
|
|
@@ -26269,7 +26505,7 @@ var TreeController = class extends MDControlController {
|
|
|
26269
26505
|
};
|
|
26270
26506
|
|
|
26271
26507
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
26272
|
-
import { RuntimeError as
|
|
26508
|
+
import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
|
|
26273
26509
|
|
|
26274
26510
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
26275
26511
|
var WizardPanelService = class extends ControlService {
|
|
@@ -26435,7 +26671,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26435
26671
|
const { activeFormTag } = this.state;
|
|
26436
26672
|
const controller = this.formControllers.get(activeFormTag);
|
|
26437
26673
|
if (!controller) {
|
|
26438
|
-
throw new
|
|
26674
|
+
throw new RuntimeError58("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
26439
26675
|
}
|
|
26440
26676
|
return controller;
|
|
26441
26677
|
}
|
|
@@ -26477,7 +26713,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26477
26713
|
getWizardFormByTag(tag) {
|
|
26478
26714
|
var _a;
|
|
26479
26715
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
26480
|
-
throw new
|
|
26716
|
+
throw new RuntimeError58("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
|
|
26481
26717
|
return;
|
|
26482
26718
|
}
|
|
26483
26719
|
const wizardForm = this.model.dewizard.dewizardForms.find(
|
|
@@ -26486,7 +26722,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26486
26722
|
}
|
|
26487
26723
|
);
|
|
26488
26724
|
if (!wizardForm) {
|
|
26489
|
-
throw new
|
|
26725
|
+
throw new RuntimeError58("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
26490
26726
|
}
|
|
26491
26727
|
return wizardForm;
|
|
26492
26728
|
}
|
|
@@ -26557,7 +26793,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26557
26793
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
26558
26794
|
}
|
|
26559
26795
|
if (!prevTag) {
|
|
26560
|
-
throw new
|
|
26796
|
+
throw new RuntimeError58("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
26561
26797
|
}
|
|
26562
26798
|
this.state.activeFormTag = prevTag;
|
|
26563
26799
|
}
|
|
@@ -26593,7 +26829,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26593
26829
|
});
|
|
26594
26830
|
const nextWizardStep = wizardSteps[index + 1];
|
|
26595
26831
|
if (!nextWizardStep) {
|
|
26596
|
-
throw new
|
|
26832
|
+
throw new RuntimeError58("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
26597
26833
|
}
|
|
26598
26834
|
const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
|
|
26599
26835
|
if (nextWizardForm && nextWizardForm.formTag) {
|
|
@@ -26602,7 +26838,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26602
26838
|
}
|
|
26603
26839
|
}
|
|
26604
26840
|
if (!nextTag) {
|
|
26605
|
-
throw new
|
|
26841
|
+
throw new RuntimeError58("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
26606
26842
|
}
|
|
26607
26843
|
this.state.activeFormTag = nextTag;
|
|
26608
26844
|
this.tagHistory.push(nextTag);
|
|
@@ -26621,7 +26857,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
26621
26857
|
};
|
|
26622
26858
|
|
|
26623
26859
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
26624
|
-
import { RuntimeModelError as
|
|
26860
|
+
import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
|
|
26625
26861
|
import { isNil as isNil24 } from "ramda";
|
|
26626
26862
|
|
|
26627
26863
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
@@ -26692,26 +26928,6 @@ var MDCtrlController = class extends MDControlController {
|
|
|
26692
26928
|
await this.service.init(this.context);
|
|
26693
26929
|
this.setSort();
|
|
26694
26930
|
}
|
|
26695
|
-
/**
|
|
26696
|
-
* 设置排序
|
|
26697
|
-
*
|
|
26698
|
-
* @author lxm
|
|
26699
|
-
* @date 2022-09-28 13:09:44
|
|
26700
|
-
* @param {string} key 排序字段
|
|
26701
|
-
* @param {string} order 排序顺序
|
|
26702
|
-
*/
|
|
26703
|
-
setSort(key, order) {
|
|
26704
|
-
if (key && order) {
|
|
26705
|
-
super.setSort(key, order);
|
|
26706
|
-
} else {
|
|
26707
|
-
const { minorSortAppDEFieldId, minorSortDir } = this.model;
|
|
26708
|
-
if (minorSortAppDEFieldId && minorSortDir) {
|
|
26709
|
-
this.state.sortQuery = "".concat(minorSortAppDEFieldId.toLowerCase(), ",").concat(minorSortDir.toLowerCase());
|
|
26710
|
-
} else {
|
|
26711
|
-
this.state.sortQuery = "";
|
|
26712
|
-
}
|
|
26713
|
-
}
|
|
26714
|
-
}
|
|
26715
26931
|
/**
|
|
26716
26932
|
* 加载更多
|
|
26717
26933
|
* @author lxm
|
|
@@ -26848,7 +27064,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
26848
27064
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
26849
27065
|
if (enableGroup && groupMode) {
|
|
26850
27066
|
if (!groupAppDEFieldId) {
|
|
26851
|
-
throw new
|
|
27067
|
+
throw new RuntimeModelError62(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
26852
27068
|
}
|
|
26853
27069
|
if (groupMode === "AUTO") {
|
|
26854
27070
|
this.handleAutoGroup();
|
|
@@ -26915,7 +27131,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
26915
27131
|
async handleCodeListGroup() {
|
|
26916
27132
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
26917
27133
|
if (!groupCodeListId) {
|
|
26918
|
-
throw new
|
|
27134
|
+
throw new RuntimeModelError62(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
26919
27135
|
}
|
|
26920
27136
|
const { items } = this.state;
|
|
26921
27137
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -26945,7 +27161,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
26945
27161
|
};
|
|
26946
27162
|
|
|
26947
27163
|
// src/controller/control/kanban/kanban.controller.ts
|
|
26948
|
-
import { RuntimeError as
|
|
27164
|
+
import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
|
|
26949
27165
|
import { isNil as isNil25 } from "ramda";
|
|
26950
27166
|
|
|
26951
27167
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -27023,10 +27239,10 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27023
27239
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
27024
27240
|
const { minorSortDir } = this.model;
|
|
27025
27241
|
if (!sortField) {
|
|
27026
|
-
throw new
|
|
27242
|
+
throw new RuntimeModelError63(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
27027
27243
|
}
|
|
27028
27244
|
if (!minorSortDir) {
|
|
27029
|
-
throw new
|
|
27245
|
+
throw new RuntimeModelError63(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
27030
27246
|
}
|
|
27031
27247
|
const isAsc = minorSortDir === "ASC";
|
|
27032
27248
|
items.forEach((item) => {
|
|
@@ -27036,7 +27252,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27036
27252
|
} else {
|
|
27037
27253
|
const toNum = Number(sortValue);
|
|
27038
27254
|
if (Number.isNaN(toNum)) {
|
|
27039
|
-
throw new
|
|
27255
|
+
throw new RuntimeError59(
|
|
27040
27256
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
27041
27257
|
);
|
|
27042
27258
|
}
|
|
@@ -27122,7 +27338,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27122
27338
|
}
|
|
27123
27339
|
handleDataGroup() {
|
|
27124
27340
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
27125
|
-
throw new
|
|
27341
|
+
throw new RuntimeError59("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
27126
27342
|
}
|
|
27127
27343
|
return super.handleDataGroup();
|
|
27128
27344
|
}
|
|
@@ -27170,7 +27386,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27170
27386
|
async handleCodeListGroup() {
|
|
27171
27387
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
27172
27388
|
if (!groupCodeListId) {
|
|
27173
|
-
throw new
|
|
27389
|
+
throw new RuntimeModelError63(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
27174
27390
|
}
|
|
27175
27391
|
const { items } = this.state;
|
|
27176
27392
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -27774,7 +27990,7 @@ var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
|
|
|
27774
27990
|
};
|
|
27775
27991
|
|
|
27776
27992
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
|
|
27777
|
-
import { RuntimeModelError as
|
|
27993
|
+
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
27778
27994
|
var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
27779
27995
|
/**
|
|
27780
27996
|
* 给rowController初始化操作列的状态
|
|
@@ -27787,7 +28003,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
27787
28003
|
var _a;
|
|
27788
28004
|
const { deuiactionGroup } = this.model;
|
|
27789
28005
|
if (!deuiactionGroup) {
|
|
27790
|
-
throw new
|
|
28006
|
+
throw new RuntimeModelError64(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
27791
28007
|
}
|
|
27792
28008
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
27793
28009
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -27840,7 +28056,7 @@ var TreeGridService = class extends GridService {
|
|
|
27840
28056
|
};
|
|
27841
28057
|
|
|
27842
28058
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
27843
|
-
import { RuntimeError as
|
|
28059
|
+
import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
|
|
27844
28060
|
import { createUUID as createUUID13 } from "qx-util";
|
|
27845
28061
|
|
|
27846
28062
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -28056,7 +28272,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
28056
28272
|
(item) => item.id === id
|
|
28057
28273
|
);
|
|
28058
28274
|
if (panelUiItemIndex < 0) {
|
|
28059
|
-
throw new
|
|
28275
|
+
throw new RuntimeError60("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
28060
28276
|
}
|
|
28061
28277
|
const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
|
|
28062
28278
|
if (tempUiItem.id.startsWith("mockId:")) {
|
|
@@ -28563,7 +28779,7 @@ var ReportPanelController = class extends ControlController {
|
|
|
28563
28779
|
};
|
|
28564
28780
|
|
|
28565
28781
|
// src/controller/control/gantt/gantt.service.ts
|
|
28566
|
-
import { ModelError as
|
|
28782
|
+
import { ModelError as ModelError31 } from "@ibiz-template/core";
|
|
28567
28783
|
var GanttService = class extends TreeService {
|
|
28568
28784
|
/**
|
|
28569
28785
|
* 执行实体服务
|
|
@@ -28681,7 +28897,7 @@ var GanttService = class extends TreeService {
|
|
|
28681
28897
|
);
|
|
28682
28898
|
break;
|
|
28683
28899
|
default:
|
|
28684
|
-
throw new
|
|
28900
|
+
throw new ModelError31(
|
|
28685
28901
|
nodeModel,
|
|
28686
28902
|
"".concat(nodeModel.treeNodeType, "\u8282\u70B9\u7C7B\u578B\u672A\u652F\u6301")
|
|
28687
28903
|
);
|
|
@@ -29120,7 +29336,7 @@ var AppHub = class {
|
|
|
29120
29336
|
this.registerAppView(appView);
|
|
29121
29337
|
return appView;
|
|
29122
29338
|
}
|
|
29123
|
-
throw new
|
|
29339
|
+
throw new RuntimeError61("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
29124
29340
|
}
|
|
29125
29341
|
/**
|
|
29126
29342
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -29151,7 +29367,7 @@ var AppHub = class {
|
|
|
29151
29367
|
this.registerAppDataEntity(entity, appId);
|
|
29152
29368
|
return entity;
|
|
29153
29369
|
}
|
|
29154
|
-
throw new
|
|
29370
|
+
throw new RuntimeError61("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
29155
29371
|
}
|
|
29156
29372
|
/**
|
|
29157
29373
|
* 新建 hub 应用
|
|
@@ -29166,7 +29382,7 @@ var AppHub = class {
|
|
|
29166
29382
|
return this.appMap.get(id);
|
|
29167
29383
|
}
|
|
29168
29384
|
if (!this.modelLoaderProvider) {
|
|
29169
|
-
throw new
|
|
29385
|
+
throw new RuntimeError61("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
|
|
29170
29386
|
}
|
|
29171
29387
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
29172
29388
|
const app = new Application(appModel);
|
|
@@ -29279,7 +29495,7 @@ var EngineFactory = class {
|
|
|
29279
29495
|
};
|
|
29280
29496
|
|
|
29281
29497
|
// src/engine/view-base.engine.ts
|
|
29282
|
-
import { RuntimeError as
|
|
29498
|
+
import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
|
|
29283
29499
|
var ViewEngineBase = class {
|
|
29284
29500
|
/**
|
|
29285
29501
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -29467,7 +29683,7 @@ var ViewEngineBase = class {
|
|
|
29467
29683
|
const { appDataEntityId } = this.view.model;
|
|
29468
29684
|
const { evt, context, params } = this.view;
|
|
29469
29685
|
if (!appDataEntityId) {
|
|
29470
|
-
throw new
|
|
29686
|
+
throw new RuntimeError62("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
29471
29687
|
}
|
|
29472
29688
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
29473
29689
|
const res = await app.deService.exec(
|
|
@@ -29488,7 +29704,7 @@ var ViewEngineBase = class {
|
|
|
29488
29704
|
};
|
|
29489
29705
|
|
|
29490
29706
|
// src/engine/md-view.engine.ts
|
|
29491
|
-
import { RuntimeModelError as
|
|
29707
|
+
import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
|
|
29492
29708
|
import { clone as clone24 } from "ramda";
|
|
29493
29709
|
var MDViewEngine = class extends ViewEngineBase {
|
|
29494
29710
|
/**
|
|
@@ -29672,7 +29888,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29672
29888
|
view: this.view
|
|
29673
29889
|
}));
|
|
29674
29890
|
if (result === -1) {
|
|
29675
|
-
throw new
|
|
29891
|
+
throw new RuntimeModelError65(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29676
29892
|
} else {
|
|
29677
29893
|
return {
|
|
29678
29894
|
cancel: !result.ok
|
|
@@ -29695,7 +29911,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29695
29911
|
(item) => item.id === "newdata"
|
|
29696
29912
|
);
|
|
29697
29913
|
if (!openAppViewLogic) {
|
|
29698
|
-
throw new
|
|
29914
|
+
throw new RuntimeModelError65(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29699
29915
|
}
|
|
29700
29916
|
const params = clone24(this.view.params);
|
|
29701
29917
|
if (copyMode) {
|
|
@@ -29709,7 +29925,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29709
29925
|
view: this.view
|
|
29710
29926
|
}));
|
|
29711
29927
|
if (result === -1) {
|
|
29712
|
-
throw new
|
|
29928
|
+
throw new RuntimeModelError65(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29713
29929
|
} else {
|
|
29714
29930
|
return {
|
|
29715
29931
|
cancel: !result.ok
|
|
@@ -29826,90 +30042,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29826
30042
|
}
|
|
29827
30043
|
};
|
|
29828
30044
|
|
|
29829
|
-
// src/utils/error-handler/default-error-handler.ts
|
|
29830
|
-
import {
|
|
29831
|
-
RuntimeModelError as RuntimeModelError65,
|
|
29832
|
-
ModelError as ModelError31,
|
|
29833
|
-
HttpError as HttpError5,
|
|
29834
|
-
NoticeError as NoticeError2,
|
|
29835
|
-
RuntimeError as RuntimeError61
|
|
29836
|
-
} from "@ibiz-template/core";
|
|
29837
|
-
var DefaultErrorHandler = class {
|
|
29838
|
-
handle(error) {
|
|
29839
|
-
if (error instanceof RuntimeModelError65 || error instanceof ModelError31) {
|
|
29840
|
-
ibiz.message.error(error.message, 10, true);
|
|
29841
|
-
} else if (error instanceof HttpError5) {
|
|
29842
|
-
if (error.status === 401) {
|
|
29843
|
-
ibiz.message.error("\u6CA1\u6709\u6CE8\u518C\u65E0\u6743\u9650\u9519\u8BEF\u5904\u7406\u5668");
|
|
29844
|
-
} else {
|
|
29845
|
-
ibiz.notification.error({
|
|
29846
|
-
title: "",
|
|
29847
|
-
desc: error.message,
|
|
29848
|
-
duration: 10
|
|
29849
|
-
});
|
|
29850
|
-
}
|
|
29851
|
-
} else if (error instanceof NoticeError2) {
|
|
29852
|
-
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
29853
|
-
} else if (error instanceof RuntimeError61) {
|
|
29854
|
-
ibiz.message.error(error.message, 10, true);
|
|
29855
|
-
}
|
|
29856
|
-
ibiz.log.error(error);
|
|
29857
|
-
return true;
|
|
29858
|
-
}
|
|
29859
|
-
};
|
|
29860
|
-
|
|
29861
|
-
// src/utils/error-handler/error-handler-center.ts
|
|
29862
|
-
var ErrorHandlerCenter = class {
|
|
29863
|
-
constructor() {
|
|
29864
|
-
/**
|
|
29865
|
-
* 处理器集合
|
|
29866
|
-
* @author lxm
|
|
29867
|
-
* @date 2023-09-26 04:56:29
|
|
29868
|
-
* @type {IErrorHandler[]}
|
|
29869
|
-
*/
|
|
29870
|
-
this.handlers = [];
|
|
29871
|
-
}
|
|
29872
|
-
/**
|
|
29873
|
-
* 注册处理器(后注册的优先级更高)
|
|
29874
|
-
* @author lxm
|
|
29875
|
-
* @date 2023-09-26 04:59:06
|
|
29876
|
-
* @param {IErrorHandler} handler
|
|
29877
|
-
*/
|
|
29878
|
-
register(handler) {
|
|
29879
|
-
this.handlers.unshift(handler);
|
|
29880
|
-
}
|
|
29881
|
-
/**
|
|
29882
|
-
* 处理单个报错
|
|
29883
|
-
* @author lxm
|
|
29884
|
-
* @date 2023-09-26 05:18:18
|
|
29885
|
-
* @protected
|
|
29886
|
-
* @param {unknown} error
|
|
29887
|
-
*/
|
|
29888
|
-
handleSingle(error) {
|
|
29889
|
-
const find = this.handlers.find((item) => {
|
|
29890
|
-
return !!item.handle(error);
|
|
29891
|
-
});
|
|
29892
|
-
if (!find) {
|
|
29893
|
-
ibiz.log.error("\u6CA1\u6709\u627E\u5230\u80FD\u5904\u7406\u8BE5\u9519\u8BEF\u7684\u5904\u7406\u5668", error);
|
|
29894
|
-
}
|
|
29895
|
-
}
|
|
29896
|
-
/**
|
|
29897
|
-
* 按顺序检测处理器,最先满足条件的处理该异常
|
|
29898
|
-
* @author lxm
|
|
29899
|
-
* @date 2023-09-26 05:01:08
|
|
29900
|
-
* @param {unknown} error
|
|
29901
|
-
*/
|
|
29902
|
-
handle(error) {
|
|
29903
|
-
if (error instanceof Array) {
|
|
29904
|
-
error.forEach((item) => {
|
|
29905
|
-
this.handleSingle(item);
|
|
29906
|
-
});
|
|
29907
|
-
} else {
|
|
29908
|
-
this.handleSingle(error);
|
|
29909
|
-
}
|
|
29910
|
-
}
|
|
29911
|
-
};
|
|
29912
|
-
|
|
29913
30045
|
// src/global/global-util/global-util.ts
|
|
29914
30046
|
var GlobalUtil = class {
|
|
29915
30047
|
constructor() {
|
|
@@ -29992,7 +30124,7 @@ var GlobalUtil = class {
|
|
|
29992
30124
|
};
|
|
29993
30125
|
|
|
29994
30126
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
29995
|
-
import { RuntimeError as
|
|
30127
|
+
import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
|
|
29996
30128
|
var LogicExecutor = class {
|
|
29997
30129
|
/**
|
|
29998
30130
|
* @author lxm
|
|
@@ -30013,7 +30145,7 @@ var LogicExecutor = class {
|
|
|
30013
30145
|
*/
|
|
30014
30146
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30015
30147
|
execute(_executeParams) {
|
|
30016
|
-
throw new
|
|
30148
|
+
throw new RuntimeError63("Method not implemented.");
|
|
30017
30149
|
}
|
|
30018
30150
|
/**
|
|
30019
30151
|
* 销毁方法
|
|
@@ -30450,7 +30582,7 @@ var LogicSchedulerCenter = class {
|
|
|
30450
30582
|
};
|
|
30451
30583
|
|
|
30452
30584
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
30453
|
-
import { RuntimeError as
|
|
30585
|
+
import { RuntimeError as RuntimeError64 } from "@ibiz-template/core";
|
|
30454
30586
|
var LogicTrigger = class {
|
|
30455
30587
|
/**
|
|
30456
30588
|
* @author lxm
|
|
@@ -30510,7 +30642,7 @@ var LogicTrigger = class {
|
|
|
30510
30642
|
if (this.executor) {
|
|
30511
30643
|
return this.executor.execute(executeParams);
|
|
30512
30644
|
}
|
|
30513
|
-
throw new
|
|
30645
|
+
throw new RuntimeError64("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
30514
30646
|
}
|
|
30515
30647
|
/**
|
|
30516
30648
|
* 销毁方法
|
|
@@ -30527,12 +30659,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
30527
30659
|
};
|
|
30528
30660
|
|
|
30529
30661
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
30530
|
-
import { RuntimeError as
|
|
30662
|
+
import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
|
|
30531
30663
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
30532
30664
|
bindExecutor(executor) {
|
|
30533
30665
|
super.bindExecutor(executor);
|
|
30534
30666
|
if (this.executor.type !== "SCRIPT") {
|
|
30535
|
-
throw new
|
|
30667
|
+
throw new RuntimeError65(
|
|
30536
30668
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
30537
30669
|
);
|
|
30538
30670
|
}
|
|
@@ -30568,7 +30700,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
30568
30700
|
};
|
|
30569
30701
|
|
|
30570
30702
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
30571
|
-
import { RuntimeError as
|
|
30703
|
+
import { RuntimeError as RuntimeError66, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
30572
30704
|
var TimerTrigger = class extends LogicTrigger {
|
|
30573
30705
|
constructor() {
|
|
30574
30706
|
super(...arguments);
|
|
@@ -30580,7 +30712,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30580
30712
|
}
|
|
30581
30713
|
this.timer = setInterval(() => {
|
|
30582
30714
|
if (!this.scheduler.defaultParamsCb) {
|
|
30583
|
-
throw new
|
|
30715
|
+
throw new RuntimeError66("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
30584
30716
|
}
|
|
30585
30717
|
const params = this.scheduler.defaultParamsCb();
|
|
30586
30718
|
this.executor.execute(params);
|
|
@@ -30597,7 +30729,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30597
30729
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
30598
30730
|
import {
|
|
30599
30731
|
ModelError as ModelError34,
|
|
30600
|
-
RuntimeError as
|
|
30732
|
+
RuntimeError as RuntimeError67,
|
|
30601
30733
|
RuntimeModelError as RuntimeModelError68
|
|
30602
30734
|
} from "@ibiz-template/core";
|
|
30603
30735
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -30635,7 +30767,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30635
30767
|
const { context, params, ...rest } = parameters;
|
|
30636
30768
|
const { data } = parameters;
|
|
30637
30769
|
if (!(data == null ? void 0 : data[0])) {
|
|
30638
|
-
throw new
|
|
30770
|
+
throw new RuntimeError67("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
30639
30771
|
}
|
|
30640
30772
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
30641
30773
|
let openViewRef;
|
|
@@ -30695,7 +30827,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30695
30827
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
30696
30828
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
30697
30829
|
if (!findView) {
|
|
30698
|
-
throw new
|
|
30830
|
+
throw new RuntimeError67(
|
|
30699
30831
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
30700
30832
|
);
|
|
30701
30833
|
}
|
|
@@ -30814,7 +30946,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30814
30946
|
}
|
|
30815
30947
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
30816
30948
|
if (!selectData) {
|
|
30817
|
-
throw new
|
|
30949
|
+
throw new RuntimeError67("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
30818
30950
|
}
|
|
30819
30951
|
const indexType = selectData.srfkey;
|
|
30820
30952
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
|
|
@@ -30824,7 +30956,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30824
30956
|
}
|
|
30825
30957
|
);
|
|
30826
30958
|
if (!findView) {
|
|
30827
|
-
throw new
|
|
30959
|
+
throw new RuntimeError67(
|
|
30828
30960
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
30829
30961
|
);
|
|
30830
30962
|
}
|
|
@@ -31181,12 +31313,14 @@ export {
|
|
|
31181
31313
|
DataViewControlController,
|
|
31182
31314
|
DataViewControlService,
|
|
31183
31315
|
DeAuthorityService,
|
|
31316
|
+
DefaultErrorHandler,
|
|
31184
31317
|
DynamicCodeListCache,
|
|
31185
31318
|
EDITOR_PROVIDER_PREFIX,
|
|
31186
31319
|
EditFormController,
|
|
31187
31320
|
EditFormService,
|
|
31188
31321
|
EditorController,
|
|
31189
31322
|
EngineFactory,
|
|
31323
|
+
ErrorHandlerCenter,
|
|
31190
31324
|
ExpBarControlController,
|
|
31191
31325
|
FORMDETAIL_PROVIDER_PREFIX,
|
|
31192
31326
|
FetchMethod,
|