@ibiz-template/runtime 0.1.31 → 0.1.33
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 +178 -115
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/constant/view-call-tag.d.ts +5 -1
- package/out/constant/view-call-tag.d.ts.map +1 -1
- package/out/constant/view-call-tag.js +4 -0
- package/out/controller/common/control/md-control.controller.js +1 -1
- package/out/controller/common/editor/code-list-editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/code-list-editor.controller.js +1 -1
- package/out/controller/control/form/search-form/search-form.service.d.ts +8 -0
- package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.service.js +19 -2
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +3 -1
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +15 -7
- package/out/interface/service/code-list-item/code-list-item.d.ts +7 -0
- package/out/interface/service/code-list-item/code-list-item.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +1 -0
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +2 -1
- package/out/ui-action/uiaction-util.d.ts.map +1 -1
- package/out/ui-action/uiaction-util.js +8 -1
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.js +16 -2
- package/out/ui-logic/ui-logic-param/ui-logic-param.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +5 -0
- package/package.json +5 -5
- package/src/constant/view-call-tag.ts +4 -0
- package/src/controller/common/control/md-control.controller.ts +1 -1
- package/src/controller/common/editor/code-list-editor.controller.ts +4 -1
- package/src/controller/control/form/search-form/search-form.service.ts +20 -2
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +5 -1
- package/src/controller/control/tree/tree.controller.ts +15 -8
- package/src/interface/service/code-list-item/code-list-item.ts +8 -0
- package/src/service/service/code-list/code-list.service.ts +1 -0
- package/src/service/service/entity/method/de-action.ts +7 -1
- package/src/ui-action/uiaction-util.ts +8 -1
- package/src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts +24 -2
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +7 -0
package/dist/index.esm.js
CHANGED
|
@@ -8385,6 +8385,7 @@ var ViewCallTag = /* @__PURE__ */ ((ViewCallTag2) => {
|
|
|
8385
8385
|
ViewCallTag2["LOAD"] = "Load";
|
|
8386
8386
|
ViewCallTag2["GET_DATA"] = "GetData";
|
|
8387
8387
|
ViewCallTag2["GET_ALL_DATA"] = "GetAllData";
|
|
8388
|
+
ViewCallTag2["VALIDATE"] = "Validate";
|
|
8388
8389
|
return ViewCallTag2;
|
|
8389
8390
|
})(ViewCallTag || {});
|
|
8390
8391
|
|
|
@@ -8648,7 +8649,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
8648
8649
|
|
|
8649
8650
|
// src/command/app/open-app-view/open-app-view.ts
|
|
8650
8651
|
import { ModelError as ModelError14, RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
8651
|
-
import { clone as
|
|
8652
|
+
import { clone as clone12 } from "ramda";
|
|
8652
8653
|
|
|
8653
8654
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
8654
8655
|
import { isEmpty as isEmpty3 } from "ramda";
|
|
@@ -10471,7 +10472,8 @@ var CodeListService = class {
|
|
|
10471
10472
|
value: isValueNumber ? Number(codeItem.value) : codeItem.value,
|
|
10472
10473
|
color: codeItem.color,
|
|
10473
10474
|
id: codeItem.codeName,
|
|
10474
|
-
textCls: codeItem.textCls
|
|
10475
|
+
textCls: codeItem.textCls,
|
|
10476
|
+
disableSelect: codeItem.disableSelect
|
|
10475
10477
|
};
|
|
10476
10478
|
if ((_a = codeItem.codeItems) == null ? void 0 : _a.length) {
|
|
10477
10479
|
_codeItem.children = this.formatStaticItems(
|
|
@@ -10986,6 +10988,7 @@ import {
|
|
|
10986
10988
|
HttpResponse as HttpResponse3,
|
|
10987
10989
|
RuntimeModelError as RuntimeModelError18
|
|
10988
10990
|
} from "@ibiz-template/core";
|
|
10991
|
+
import { clone as clone9 } from "ramda";
|
|
10989
10992
|
|
|
10990
10993
|
// src/service/service/entity/method/method.ts
|
|
10991
10994
|
import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
@@ -12600,7 +12603,12 @@ var DEActionMethod = class extends Method {
|
|
|
12600
12603
|
if (!deLogic) {
|
|
12601
12604
|
throw new RuntimeModelError18(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
|
|
12602
12605
|
}
|
|
12603
|
-
return execDELogicAction(
|
|
12606
|
+
return execDELogicAction(
|
|
12607
|
+
deLogic,
|
|
12608
|
+
clone9(context),
|
|
12609
|
+
data ? clone9(data) : {},
|
|
12610
|
+
params ? clone9(params) : {}
|
|
12611
|
+
);
|
|
12604
12612
|
}
|
|
12605
12613
|
if (data && !this.isLocalMode) {
|
|
12606
12614
|
data = await this.input.handle(context, data);
|
|
@@ -12891,7 +12899,7 @@ import {
|
|
|
12891
12899
|
RuntimeModelError as RuntimeModelError19
|
|
12892
12900
|
} from "@ibiz-template/core";
|
|
12893
12901
|
import { ascSort, descSort } from "qx-util";
|
|
12894
|
-
import { clone as
|
|
12902
|
+
import { clone as clone10, equals as equals2, isEmpty as isEmpty7, isNil as isNil8, where as where2 } from "ramda";
|
|
12895
12903
|
var FetchMethod = class extends Method {
|
|
12896
12904
|
get isLocalMode() {
|
|
12897
12905
|
return isLocalMode(this.method);
|
|
@@ -13031,7 +13039,7 @@ var FetchMethod = class extends Method {
|
|
|
13031
13039
|
const { page, size } = filter;
|
|
13032
13040
|
const start = page * size;
|
|
13033
13041
|
const end = (page + 1) * size - 1;
|
|
13034
|
-
const items = list.slice(start, end).map((item) =>
|
|
13042
|
+
const items = list.slice(start, end).map((item) => clone10(item));
|
|
13035
13043
|
return items;
|
|
13036
13044
|
}
|
|
13037
13045
|
/**
|
|
@@ -13150,7 +13158,7 @@ var DEService = class {
|
|
|
13150
13158
|
};
|
|
13151
13159
|
|
|
13152
13160
|
// src/service/vo/control.vo.ts
|
|
13153
|
-
import { clone as
|
|
13161
|
+
import { clone as clone11, isNil as isNil9 } from "ramda";
|
|
13154
13162
|
var ControlVO = class _ControlVO {
|
|
13155
13163
|
/**
|
|
13156
13164
|
* 是否是新建数据,0为新建
|
|
@@ -13318,7 +13326,7 @@ var ControlVO = class _ControlVO {
|
|
|
13318
13326
|
* @return {*} {ControlVO}
|
|
13319
13327
|
*/
|
|
13320
13328
|
clone() {
|
|
13321
|
-
const cloneOrigin =
|
|
13329
|
+
const cloneOrigin = clone11(this.$origin);
|
|
13322
13330
|
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
13323
13331
|
Object.keys(this).forEach((key) => {
|
|
13324
13332
|
newVal[key] = this[key];
|
|
@@ -14191,7 +14199,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
14191
14199
|
* @return {*} {(Promise<IModalData | void>)}
|
|
14192
14200
|
*/
|
|
14193
14201
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
14194
|
-
const context =
|
|
14202
|
+
const context = clone12(_context);
|
|
14195
14203
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
14196
14204
|
if (!appView) {
|
|
14197
14205
|
throw new RuntimeError16("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -14455,7 +14463,7 @@ function installCommand() {
|
|
|
14455
14463
|
}
|
|
14456
14464
|
|
|
14457
14465
|
// src/app-hub.ts
|
|
14458
|
-
import { RuntimeError as
|
|
14466
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
14459
14467
|
|
|
14460
14468
|
// src/application.ts
|
|
14461
14469
|
import { Net } from "@ibiz-template/core";
|
|
@@ -16411,7 +16419,10 @@ var CodeListEditorController = class extends EditorController {
|
|
|
16411
16419
|
);
|
|
16412
16420
|
return dataItems;
|
|
16413
16421
|
}
|
|
16414
|
-
throw new RuntimeModelError21(
|
|
16422
|
+
throw new RuntimeModelError21(
|
|
16423
|
+
this.model,
|
|
16424
|
+
"\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
16425
|
+
);
|
|
16415
16426
|
}
|
|
16416
16427
|
};
|
|
16417
16428
|
|
|
@@ -16879,7 +16890,7 @@ var MDControlController = class extends ControlController {
|
|
|
16879
16890
|
});
|
|
16880
16891
|
}
|
|
16881
16892
|
if (needRefresh) {
|
|
16882
|
-
this.refresh();
|
|
16893
|
+
await this.refresh();
|
|
16883
16894
|
}
|
|
16884
16895
|
} catch (error) {
|
|
16885
16896
|
await this._evt.emit("onRemoveError", void 0);
|
|
@@ -17418,7 +17429,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
17418
17429
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
17419
17430
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
17420
17431
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
17421
|
-
import { clone as
|
|
17432
|
+
import { clone as clone13, isNil as isNil17, mergeDeepRight } from "ramda";
|
|
17422
17433
|
dayjs3.extend(minMax);
|
|
17423
17434
|
dayjs3.extend(isSameOrBefore);
|
|
17424
17435
|
dayjs3.extend(quarterOfYear);
|
|
@@ -17641,7 +17652,7 @@ var BaseSeriesGenerator = class {
|
|
|
17641
17652
|
dataPreprocess(data) {
|
|
17642
17653
|
const tempData = [];
|
|
17643
17654
|
data.forEach((singleData) => {
|
|
17644
|
-
tempData.push(
|
|
17655
|
+
tempData.push(clone13(singleData));
|
|
17645
17656
|
});
|
|
17646
17657
|
const { groupMode } = this.model;
|
|
17647
17658
|
if (groupMode) {
|
|
@@ -18501,7 +18512,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
18501
18512
|
};
|
|
18502
18513
|
|
|
18503
18514
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
18504
|
-
import { recursiveIterate, RuntimeError as
|
|
18515
|
+
import { recursiveIterate, RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
18505
18516
|
|
|
18506
18517
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
18507
18518
|
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
@@ -18511,7 +18522,7 @@ import { isArray as isArray4 } from "qx-util";
|
|
|
18511
18522
|
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
18512
18523
|
|
|
18513
18524
|
// src/ui-logic/index.ts
|
|
18514
|
-
import { RuntimeError as
|
|
18525
|
+
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
18515
18526
|
|
|
18516
18527
|
// src/ui-logic/ui-logic.ts
|
|
18517
18528
|
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
@@ -18980,12 +18991,12 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18980
18991
|
};
|
|
18981
18992
|
|
|
18982
18993
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
18983
|
-
import { ModelError as ModelError21 } from "@ibiz-template/core";
|
|
18984
|
-
import { clone as
|
|
18994
|
+
import { ModelError as ModelError21, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
18995
|
+
import { clone as clone15 } from "ramda";
|
|
18985
18996
|
|
|
18986
18997
|
// src/ui-logic/utils/handle-src-val.ts
|
|
18987
18998
|
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
18988
|
-
import { clone as
|
|
18999
|
+
import { clone as clone14 } from "ramda";
|
|
18989
19000
|
function handleSrcVal2(ctx, srcValParams) {
|
|
18990
19001
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
18991
19002
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -19015,7 +19026,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
19015
19026
|
value = ctx.context;
|
|
19016
19027
|
break;
|
|
19017
19028
|
case "ENVPARAM":
|
|
19018
|
-
value =
|
|
19029
|
+
value = clone14(ibiz.env);
|
|
19019
19030
|
break;
|
|
19020
19031
|
default:
|
|
19021
19032
|
throw new ModelError20(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -19086,13 +19097,31 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19086
19097
|
*/
|
|
19087
19098
|
setParamValue(nodeParam, ctx) {
|
|
19088
19099
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
19100
|
+
if (!dstDEUILogicParamId) {
|
|
19101
|
+
throw new RuntimeError31("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
|
|
19102
|
+
}
|
|
19089
19103
|
let dstField = dstFieldName;
|
|
19090
19104
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
19091
19105
|
dstField = dstField == null ? void 0 : dstField.toLowerCase();
|
|
19092
19106
|
}
|
|
19093
19107
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
19094
19108
|
if (dstField) {
|
|
19095
|
-
|
|
19109
|
+
try {
|
|
19110
|
+
ScriptFactory.execScriptFn(
|
|
19111
|
+
{ srcVal, dstParam: ctx.params[dstDEUILogicParamId] },
|
|
19112
|
+
"dstParam.".concat(dstFieldName, " = srcVal"),
|
|
19113
|
+
{
|
|
19114
|
+
singleRowReturn: false,
|
|
19115
|
+
isAsync: false
|
|
19116
|
+
}
|
|
19117
|
+
);
|
|
19118
|
+
} catch (error) {
|
|
19119
|
+
ibiz.log.error(
|
|
19120
|
+
"\u7ED9\u76EE\u6807\u53C2\u6570\u5C5E\u6027".concat(dstFieldName, "\u8D4B\u503C\u62A5\u9519\uFF0C\u76EE\u6807\u53C2\u6570\uFF1A"),
|
|
19121
|
+
ctx.params[dstDEUILogicParamId]
|
|
19122
|
+
);
|
|
19123
|
+
throw error;
|
|
19124
|
+
}
|
|
19096
19125
|
} else {
|
|
19097
19126
|
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
19098
19127
|
}
|
|
@@ -19109,7 +19138,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19109
19138
|
copyParam(nodeParam, ctx) {
|
|
19110
19139
|
const { dstDEUILogicParamId } = nodeParam;
|
|
19111
19140
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
19112
|
-
ctx.params[dstDEUILogicParamId] =
|
|
19141
|
+
ctx.params[dstDEUILogicParamId] = clone15(srcVal);
|
|
19113
19142
|
}
|
|
19114
19143
|
/**
|
|
19115
19144
|
* 绑定参数
|
|
@@ -19186,7 +19215,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19186
19215
|
};
|
|
19187
19216
|
|
|
19188
19217
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
19189
|
-
import { RuntimeError as
|
|
19218
|
+
import { RuntimeError as RuntimeError32, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
19190
19219
|
import { isFunction } from "lodash-es";
|
|
19191
19220
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
19192
19221
|
async exec(ctx) {
|
|
@@ -19203,14 +19232,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
19203
19232
|
}
|
|
19204
19233
|
const invokeParam = ctx.params[invokeParamId];
|
|
19205
19234
|
if (!invokeParam) {
|
|
19206
|
-
throw new
|
|
19235
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
19207
19236
|
}
|
|
19208
19237
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
19209
19238
|
if (!invokeCtrl) {
|
|
19210
|
-
throw new
|
|
19239
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
19211
19240
|
}
|
|
19212
19241
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
19213
|
-
throw new
|
|
19242
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
19214
19243
|
}
|
|
19215
19244
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
19216
19245
|
}
|
|
@@ -19326,7 +19355,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
19326
19355
|
|
|
19327
19356
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
19328
19357
|
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
19329
|
-
import { clone as
|
|
19358
|
+
import { clone as clone16 } from "ramda";
|
|
19330
19359
|
var CopyParamNode2 = class extends UILogicNode {
|
|
19331
19360
|
async exec(ctx) {
|
|
19332
19361
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -19337,7 +19366,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
19337
19366
|
);
|
|
19338
19367
|
}
|
|
19339
19368
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
19340
|
-
ctx.params[dstDEUILogicParamId] =
|
|
19369
|
+
ctx.params[dstDEUILogicParamId] = clone16(srcVal);
|
|
19341
19370
|
}
|
|
19342
19371
|
};
|
|
19343
19372
|
|
|
@@ -19423,16 +19452,16 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
19423
19452
|
};
|
|
19424
19453
|
|
|
19425
19454
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
19426
|
-
import { RuntimeError as
|
|
19455
|
+
import { RuntimeError as RuntimeError33 } from "@ibiz-template/core";
|
|
19427
19456
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
19428
19457
|
async exec(_ctx) {
|
|
19429
19458
|
const { errorInfo } = this.model;
|
|
19430
|
-
throw new
|
|
19459
|
+
throw new RuntimeError33(errorInfo);
|
|
19431
19460
|
}
|
|
19432
19461
|
};
|
|
19433
19462
|
|
|
19434
19463
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
19435
|
-
import { RuntimeError as
|
|
19464
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
19436
19465
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
19437
19466
|
async exec(ctx) {
|
|
19438
19467
|
ctx.isEndNode = true;
|
|
@@ -19448,18 +19477,18 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
19448
19477
|
}
|
|
19449
19478
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
19450
19479
|
if (!invokeCtrl) {
|
|
19451
|
-
throw new
|
|
19480
|
+
throw new RuntimeError34("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
19452
19481
|
}
|
|
19453
19482
|
const eventParam = ctx.params[eventParamId];
|
|
19454
19483
|
if (!eventParam) {
|
|
19455
|
-
throw new
|
|
19484
|
+
throw new RuntimeError34("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
19456
19485
|
}
|
|
19457
19486
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
19458
19487
|
}
|
|
19459
19488
|
};
|
|
19460
19489
|
|
|
19461
19490
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
19462
|
-
import { RuntimeError as
|
|
19491
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
19463
19492
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
19464
19493
|
async exec(ctx) {
|
|
19465
19494
|
const {
|
|
@@ -19479,7 +19508,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
19479
19508
|
}
|
|
19480
19509
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
19481
19510
|
if (!dstParam) {
|
|
19482
|
-
throw new
|
|
19511
|
+
throw new RuntimeError35("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
19483
19512
|
}
|
|
19484
19513
|
const result = await execDELogicById(
|
|
19485
19514
|
dstAppDELogicId,
|
|
@@ -19519,6 +19548,10 @@ var UILogicParam = class {
|
|
|
19519
19548
|
const m = this.model;
|
|
19520
19549
|
const { context, viewParams, data, parameters } = ctx;
|
|
19521
19550
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
19551
|
+
if (m.codeName === "layoutPanel") {
|
|
19552
|
+
ctx.params[tag] = parameters.view.layoutPanel.panelItems;
|
|
19553
|
+
return;
|
|
19554
|
+
}
|
|
19522
19555
|
if (m.default) {
|
|
19523
19556
|
ctx.params[tag] = data && data.length > 0 ? data[0] : {};
|
|
19524
19557
|
} else if (m.activeContainerParam) {
|
|
@@ -19772,7 +19805,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19772
19805
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
19773
19806
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
19774
19807
|
if (!deUILogic) {
|
|
19775
|
-
throw new
|
|
19808
|
+
throw new RuntimeError36(
|
|
19776
19809
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
19777
19810
|
);
|
|
19778
19811
|
}
|
|
@@ -19785,7 +19818,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19785
19818
|
}
|
|
19786
19819
|
|
|
19787
19820
|
// src/ui-action/uiaction-util.ts
|
|
19788
|
-
import { RuntimeError as
|
|
19821
|
+
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
19789
19822
|
var UIActionUtil = class {
|
|
19790
19823
|
/**
|
|
19791
19824
|
* 执行界面行为
|
|
@@ -19800,7 +19833,13 @@ var UIActionUtil = class {
|
|
|
19800
19833
|
static async exec(actionId, params) {
|
|
19801
19834
|
const action = await getUIActionById(actionId);
|
|
19802
19835
|
if (!action) {
|
|
19803
|
-
throw new
|
|
19836
|
+
throw new RuntimeError37("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
19837
|
+
}
|
|
19838
|
+
if (action.actionTarget === "SINGLEDATA") {
|
|
19839
|
+
const validateResult = await params.view.call("Validate" /* VALIDATE */);
|
|
19840
|
+
if (validateResult === false) {
|
|
19841
|
+
return { cancel: true };
|
|
19842
|
+
}
|
|
19804
19843
|
}
|
|
19805
19844
|
const provider = await getUIActionProvider(action);
|
|
19806
19845
|
return provider.exec(action, params);
|
|
@@ -20319,7 +20358,7 @@ var ToolbarController = class extends ControlController {
|
|
|
20319
20358
|
const actionId = item.uiactionId;
|
|
20320
20359
|
const uiAction = await getUIActionById(actionId);
|
|
20321
20360
|
if (!uiAction) {
|
|
20322
|
-
throw new
|
|
20361
|
+
throw new RuntimeError38("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
20323
20362
|
}
|
|
20324
20363
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
20325
20364
|
if (enableLoading) {
|
|
@@ -21269,7 +21308,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21269
21308
|
import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
21270
21309
|
|
|
21271
21310
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
21272
|
-
import { RuntimeError as
|
|
21311
|
+
import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
21273
21312
|
var ExpBarControlController = class extends ControlController {
|
|
21274
21313
|
constructor() {
|
|
21275
21314
|
super(...arguments);
|
|
@@ -21583,7 +21622,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21583
21622
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
21584
21623
|
return this.XDataModel.navAppViewId;
|
|
21585
21624
|
}
|
|
21586
|
-
throw new
|
|
21625
|
+
throw new RuntimeError39("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
21587
21626
|
}
|
|
21588
21627
|
/**
|
|
21589
21628
|
* 获取导航视图
|
|
@@ -21726,7 +21765,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21726
21765
|
};
|
|
21727
21766
|
|
|
21728
21767
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
21729
|
-
import { RuntimeError as
|
|
21768
|
+
import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
21730
21769
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
21731
21770
|
constructor() {
|
|
21732
21771
|
super(...arguments);
|
|
@@ -21801,7 +21840,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21801
21840
|
const deData = node.deData || node;
|
|
21802
21841
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
21803
21842
|
if (!nodeModel) {
|
|
21804
|
-
throw new
|
|
21843
|
+
throw new RuntimeError40("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
21805
21844
|
}
|
|
21806
21845
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
21807
21846
|
result.context.currentSrfNav = nodeId;
|
|
@@ -22061,7 +22100,8 @@ var SearchFormService = class extends ControlService {
|
|
|
22061
22100
|
* @returns {*} {Promise<IHttpResponse>}
|
|
22062
22101
|
*/
|
|
22063
22102
|
async getDraft(_context, params = {}) {
|
|
22064
|
-
|
|
22103
|
+
const tempData = this.getFilteredData({ ...params });
|
|
22104
|
+
let res = { ok: true, status: 200, data: tempData };
|
|
22065
22105
|
res = this.handleResponse(res);
|
|
22066
22106
|
return res;
|
|
22067
22107
|
}
|
|
@@ -22081,7 +22121,7 @@ var SearchFormService = class extends ControlService {
|
|
|
22081
22121
|
}
|
|
22082
22122
|
},
|
|
22083
22123
|
{
|
|
22084
|
-
childrenFields: ["deformPages", "deformDetails"]
|
|
22124
|
+
childrenFields: ["deformPages", "deformTabPages", "deformDetails"]
|
|
22085
22125
|
}
|
|
22086
22126
|
);
|
|
22087
22127
|
}
|
|
@@ -22100,6 +22140,22 @@ var SearchFormService = class extends ControlService {
|
|
|
22100
22140
|
}
|
|
22101
22141
|
return res;
|
|
22102
22142
|
}
|
|
22143
|
+
/**
|
|
22144
|
+
* 根据表单项过滤出数据
|
|
22145
|
+
*
|
|
22146
|
+
* @return {*}
|
|
22147
|
+
* @author: zhujiamin
|
|
22148
|
+
* @Date: 2023-09-01 10:04:25
|
|
22149
|
+
*/
|
|
22150
|
+
getFilteredData(data) {
|
|
22151
|
+
const tempData = {};
|
|
22152
|
+
this.dataUIMap.forEach((dataUI) => {
|
|
22153
|
+
if (data[dataUI.dataKey] !== void 0) {
|
|
22154
|
+
tempData[dataUI.dataKey] = data[dataUI.dataKey];
|
|
22155
|
+
}
|
|
22156
|
+
});
|
|
22157
|
+
return tempData;
|
|
22158
|
+
}
|
|
22103
22159
|
};
|
|
22104
22160
|
|
|
22105
22161
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
@@ -23206,7 +23262,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
23206
23262
|
};
|
|
23207
23263
|
|
|
23208
23264
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
23209
|
-
import { RuntimeError as
|
|
23265
|
+
import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
23210
23266
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
23211
23267
|
/**
|
|
23212
23268
|
* 初始化
|
|
@@ -23221,7 +23277,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
23221
23277
|
const { model } = this.parent;
|
|
23222
23278
|
const { contentControl } = model;
|
|
23223
23279
|
if (!contentControl) {
|
|
23224
|
-
throw new
|
|
23280
|
+
throw new RuntimeError41("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
23225
23281
|
}
|
|
23226
23282
|
this.controlModel = contentControl;
|
|
23227
23283
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -23331,11 +23387,11 @@ import { isArray as isArray5 } from "lodash-es";
|
|
|
23331
23387
|
import {
|
|
23332
23388
|
awaitTimeout,
|
|
23333
23389
|
mergeInLeft,
|
|
23334
|
-
RuntimeError as
|
|
23390
|
+
RuntimeError as RuntimeError42,
|
|
23335
23391
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
23336
23392
|
} from "@ibiz-template/core";
|
|
23337
23393
|
import { debounce } from "lodash-es";
|
|
23338
|
-
import { clone as
|
|
23394
|
+
import { clone as clone17 } from "ramda";
|
|
23339
23395
|
|
|
23340
23396
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
23341
23397
|
import {
|
|
@@ -23682,8 +23738,8 @@ var EditFormController = class extends FormController {
|
|
|
23682
23738
|
* @return {*} {Promise<IData>}
|
|
23683
23739
|
*/
|
|
23684
23740
|
async copy() {
|
|
23685
|
-
const context =
|
|
23686
|
-
const queryParams =
|
|
23741
|
+
const context = clone17(this.context);
|
|
23742
|
+
const queryParams = clone17(this.params);
|
|
23687
23743
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
23688
23744
|
this.model.appDataEntityId
|
|
23689
23745
|
);
|
|
@@ -23737,7 +23793,7 @@ var EditFormController = class extends FormController {
|
|
|
23737
23793
|
if (isLoadDraft) {
|
|
23738
23794
|
return this.loadDraft();
|
|
23739
23795
|
}
|
|
23740
|
-
const queryParams =
|
|
23796
|
+
const queryParams = clone17(this.params);
|
|
23741
23797
|
let res;
|
|
23742
23798
|
try {
|
|
23743
23799
|
await this.startLoading();
|
|
@@ -23773,7 +23829,7 @@ var EditFormController = class extends FormController {
|
|
|
23773
23829
|
}
|
|
23774
23830
|
const isValid = await this.validate();
|
|
23775
23831
|
if (!isValid) {
|
|
23776
|
-
throw new
|
|
23832
|
+
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23777
23833
|
}
|
|
23778
23834
|
await this.startLoading();
|
|
23779
23835
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -23882,7 +23938,7 @@ var EditFormController = class extends FormController {
|
|
|
23882
23938
|
(item) => item.id === formItemUpdateId
|
|
23883
23939
|
);
|
|
23884
23940
|
if (!formItemUpdate) {
|
|
23885
|
-
throw new
|
|
23941
|
+
throw new RuntimeError42("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
23886
23942
|
}
|
|
23887
23943
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
23888
23944
|
const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
|
|
@@ -23926,7 +23982,7 @@ var EditFormController = class extends FormController {
|
|
|
23926
23982
|
async wfStart(extraParams = {}) {
|
|
23927
23983
|
const isValid = await this.validate();
|
|
23928
23984
|
if (!isValid) {
|
|
23929
|
-
throw new
|
|
23985
|
+
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23930
23986
|
}
|
|
23931
23987
|
await this.startLoading();
|
|
23932
23988
|
try {
|
|
@@ -23959,7 +24015,7 @@ var EditFormController = class extends FormController {
|
|
|
23959
24015
|
async wfSubmit(extraParams = {}) {
|
|
23960
24016
|
const isValid = await this.validate();
|
|
23961
24017
|
if (!isValid) {
|
|
23962
|
-
throw new
|
|
24018
|
+
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23963
24019
|
}
|
|
23964
24020
|
await this.startLoading();
|
|
23965
24021
|
try {
|
|
@@ -24190,7 +24246,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
24190
24246
|
};
|
|
24191
24247
|
|
|
24192
24248
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
24193
|
-
import { RuntimeError as
|
|
24249
|
+
import { RuntimeError as RuntimeError43, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
24194
24250
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
24195
24251
|
constructor() {
|
|
24196
24252
|
super(...arguments);
|
|
@@ -24295,7 +24351,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
24295
24351
|
const { model } = this.parent;
|
|
24296
24352
|
const { contentControl } = model;
|
|
24297
24353
|
if (!contentControl) {
|
|
24298
|
-
throw new
|
|
24354
|
+
throw new RuntimeError43("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
24299
24355
|
}
|
|
24300
24356
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
24301
24357
|
this.controlModel = contentControl;
|
|
@@ -25007,10 +25063,10 @@ import {
|
|
|
25007
25063
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
25008
25064
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
25009
25065
|
recursiveIterate as recursiveIterate4,
|
|
25010
|
-
RuntimeError as
|
|
25066
|
+
RuntimeError as RuntimeError44,
|
|
25011
25067
|
RuntimeModelError as RuntimeModelError52
|
|
25012
25068
|
} from "@ibiz-template/core";
|
|
25013
|
-
import { clone as
|
|
25069
|
+
import { clone as clone18 } from "ramda";
|
|
25014
25070
|
|
|
25015
25071
|
// src/controller/control/grid/grid/grid.service.ts
|
|
25016
25072
|
var GridService = class extends MDControlService {
|
|
@@ -25381,7 +25437,7 @@ var GridController = class extends MDControlController {
|
|
|
25381
25437
|
}
|
|
25382
25438
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
25383
25439
|
if (editingRow) {
|
|
25384
|
-
throw new
|
|
25440
|
+
throw new RuntimeError44("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
25385
25441
|
}
|
|
25386
25442
|
const queryParams = { ...this.params };
|
|
25387
25443
|
const defaultData = this.calcDefaultValue({}, true);
|
|
@@ -25420,7 +25476,7 @@ var GridController = class extends MDControlController {
|
|
|
25420
25476
|
(item) => item.data.srfkey === data.srfkey
|
|
25421
25477
|
);
|
|
25422
25478
|
if (!rowState) {
|
|
25423
|
-
throw new
|
|
25479
|
+
throw new RuntimeError44("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
25424
25480
|
}
|
|
25425
25481
|
if (!rowState.modified) {
|
|
25426
25482
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -25432,7 +25488,7 @@ var GridController = class extends MDControlController {
|
|
|
25432
25488
|
}
|
|
25433
25489
|
const isValid = await this.validate(rowState);
|
|
25434
25490
|
if (!isValid) {
|
|
25435
|
-
throw new
|
|
25491
|
+
throw new RuntimeError44("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
25436
25492
|
}
|
|
25437
25493
|
await this.startLoading();
|
|
25438
25494
|
let res;
|
|
@@ -25639,7 +25695,7 @@ var GridController = class extends MDControlController {
|
|
|
25639
25695
|
}
|
|
25640
25696
|
async toggleRowEdit() {
|
|
25641
25697
|
if (!this.model.enableRowNew) {
|
|
25642
|
-
throw new
|
|
25698
|
+
throw new RuntimeError44("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
25643
25699
|
}
|
|
25644
25700
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
25645
25701
|
}
|
|
@@ -25672,10 +25728,10 @@ var GridController = class extends MDControlController {
|
|
|
25672
25728
|
} else {
|
|
25673
25729
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
25674
25730
|
if (editingRow) {
|
|
25675
|
-
throw new
|
|
25731
|
+
throw new RuntimeError44("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
25676
25732
|
}
|
|
25677
25733
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
25678
|
-
row.cacheData =
|
|
25734
|
+
row.cacheData = clone18(row.data);
|
|
25679
25735
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
25680
25736
|
Object.assign(row.data, defaultVal);
|
|
25681
25737
|
}
|
|
@@ -25722,7 +25778,7 @@ var GridController = class extends MDControlController {
|
|
|
25722
25778
|
(item) => item.id === updateId
|
|
25723
25779
|
);
|
|
25724
25780
|
if (!findUpdate) {
|
|
25725
|
-
throw new
|
|
25781
|
+
throw new RuntimeError44("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
25726
25782
|
}
|
|
25727
25783
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
25728
25784
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -25792,7 +25848,7 @@ var GridController = class extends MDControlController {
|
|
|
25792
25848
|
codeListMap.set(key, items[key].codeListItems);
|
|
25793
25849
|
}
|
|
25794
25850
|
});
|
|
25795
|
-
const cloneData =
|
|
25851
|
+
const cloneData = clone18(
|
|
25796
25852
|
data2.map((item) => {
|
|
25797
25853
|
return item.getOrigin();
|
|
25798
25854
|
})
|
|
@@ -25831,7 +25887,7 @@ var GridController = class extends MDControlController {
|
|
|
25831
25887
|
data2 = this.getData();
|
|
25832
25888
|
}
|
|
25833
25889
|
if (data2.length === 0) {
|
|
25834
|
-
throw new
|
|
25890
|
+
throw new RuntimeError44("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
25835
25891
|
}
|
|
25836
25892
|
return formatExcelData(data2);
|
|
25837
25893
|
};
|
|
@@ -25850,11 +25906,11 @@ var GridController = class extends MDControlController {
|
|
|
25850
25906
|
);
|
|
25851
25907
|
const data = formatArrayData(filterVal, await getExportData());
|
|
25852
25908
|
if (!ibiz.util.getExportExcel) {
|
|
25853
|
-
throw new
|
|
25909
|
+
throw new RuntimeError44("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
25854
25910
|
}
|
|
25855
25911
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
25856
25912
|
if (!exportExcel) {
|
|
25857
|
-
throw new
|
|
25913
|
+
throw new RuntimeError44("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
25858
25914
|
}
|
|
25859
25915
|
exportExcel.exportJsonToExcel({
|
|
25860
25916
|
header,
|
|
@@ -25902,7 +25958,7 @@ var GridController = class extends MDControlController {
|
|
|
25902
25958
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
25903
25959
|
import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
25904
25960
|
import dayjs4 from "dayjs";
|
|
25905
|
-
import { clone as
|
|
25961
|
+
import { clone as clone19, isNil as isNil19 } from "ramda";
|
|
25906
25962
|
var GridFieldColumnController = class extends GridColumnController {
|
|
25907
25963
|
constructor() {
|
|
25908
25964
|
super(...arguments);
|
|
@@ -25998,7 +26054,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
25998
26054
|
srfkey: value,
|
|
25999
26055
|
...wfContext
|
|
26000
26056
|
});
|
|
26001
|
-
const tempParams =
|
|
26057
|
+
const tempParams = clone19(this.params);
|
|
26002
26058
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
26003
26059
|
row.data,
|
|
26004
26060
|
tempContext,
|
|
@@ -26072,6 +26128,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26072
26128
|
return;
|
|
26073
26129
|
}
|
|
26074
26130
|
const fieldName = aggField || this.model.id;
|
|
26131
|
+
items = items.filter((item) => !isNil19(item[fieldName]));
|
|
26075
26132
|
let aggValue;
|
|
26076
26133
|
if (this.grid.model.aggMode === "PAGE") {
|
|
26077
26134
|
switch (aggMode) {
|
|
@@ -26189,7 +26246,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
26189
26246
|
};
|
|
26190
26247
|
|
|
26191
26248
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
26192
|
-
import { RuntimeError as
|
|
26249
|
+
import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
26193
26250
|
import Schema2 from "async-validator";
|
|
26194
26251
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
26195
26252
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -26323,7 +26380,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
26323
26380
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
26324
26381
|
const result = await this.validate(row);
|
|
26325
26382
|
if (!result) {
|
|
26326
|
-
throw new
|
|
26383
|
+
throw new RuntimeError45(
|
|
26327
26384
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
26328
26385
|
);
|
|
26329
26386
|
}
|
|
@@ -26681,7 +26738,7 @@ var ListController = class extends MDControlController {
|
|
|
26681
26738
|
};
|
|
26682
26739
|
|
|
26683
26740
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
26684
|
-
import { recursiveIterate as recursiveIterate5, RuntimeError as
|
|
26741
|
+
import { recursiveIterate as recursiveIterate5, RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
26685
26742
|
var PanelController = class extends ControlController {
|
|
26686
26743
|
constructor() {
|
|
26687
26744
|
super(...arguments);
|
|
@@ -26779,7 +26836,7 @@ var PanelController = class extends ControlController {
|
|
|
26779
26836
|
async load() {
|
|
26780
26837
|
const data = await this.prepareData();
|
|
26781
26838
|
if (!data) {
|
|
26782
|
-
throw new
|
|
26839
|
+
throw new RuntimeError46("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
26783
26840
|
}
|
|
26784
26841
|
const panelData = this.convertData(data);
|
|
26785
26842
|
this.state.data = panelData;
|
|
@@ -27976,12 +28033,18 @@ var TreeController = class extends MDControlController {
|
|
|
27976
28033
|
async loadNodes(parentNode) {
|
|
27977
28034
|
const params = await this.getFetchParams();
|
|
27978
28035
|
const hasQuery = !!params.query;
|
|
27979
|
-
|
|
27980
|
-
|
|
27981
|
-
|
|
27982
|
-
|
|
27983
|
-
|
|
27984
|
-
|
|
28036
|
+
this.state.isLoading = true;
|
|
28037
|
+
let nodes;
|
|
28038
|
+
try {
|
|
28039
|
+
nodes = await this.service.fetchChildNodes(parentNode, {
|
|
28040
|
+
context: this.context.clone(),
|
|
28041
|
+
params,
|
|
28042
|
+
hasQuery,
|
|
28043
|
+
defaultExpandedKeys: this.state.expandedKeys
|
|
28044
|
+
}) || [];
|
|
28045
|
+
} finally {
|
|
28046
|
+
this.state.isLoading = false;
|
|
28047
|
+
}
|
|
27985
28048
|
if (parentNode) {
|
|
27986
28049
|
parentNode.children = nodes;
|
|
27987
28050
|
} else {
|
|
@@ -28173,7 +28236,7 @@ var TreeController = class extends MDControlController {
|
|
|
28173
28236
|
};
|
|
28174
28237
|
|
|
28175
28238
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
28176
|
-
import { RuntimeError as
|
|
28239
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
28177
28240
|
|
|
28178
28241
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
28179
28242
|
var WizardPanelService = class extends ControlService {
|
|
@@ -28332,7 +28395,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28332
28395
|
const { activeFormTag } = this.state;
|
|
28333
28396
|
const controller = this.formControllers.get(activeFormTag);
|
|
28334
28397
|
if (!controller) {
|
|
28335
|
-
throw new
|
|
28398
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
28336
28399
|
}
|
|
28337
28400
|
return controller;
|
|
28338
28401
|
}
|
|
@@ -28407,7 +28470,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28407
28470
|
this.tagHistory.pop();
|
|
28408
28471
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
28409
28472
|
if (!prevTag) {
|
|
28410
|
-
throw new
|
|
28473
|
+
throw new RuntimeError47("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
28411
28474
|
}
|
|
28412
28475
|
this.state.activeFormTag = prevTag;
|
|
28413
28476
|
}
|
|
@@ -28428,7 +28491,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28428
28491
|
}
|
|
28429
28492
|
);
|
|
28430
28493
|
if (!wizardForm) {
|
|
28431
|
-
throw new
|
|
28494
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
28432
28495
|
}
|
|
28433
28496
|
nextTag = data.srfnextform;
|
|
28434
28497
|
} else {
|
|
@@ -28440,7 +28503,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28440
28503
|
});
|
|
28441
28504
|
const nextWizardStep = wizardSteps[index + 1];
|
|
28442
28505
|
if (!nextWizardStep) {
|
|
28443
|
-
throw new
|
|
28506
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
28444
28507
|
}
|
|
28445
28508
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
28446
28509
|
(wizardForm) => {
|
|
@@ -28453,7 +28516,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28453
28516
|
}
|
|
28454
28517
|
}
|
|
28455
28518
|
if (!nextTag) {
|
|
28456
|
-
throw new
|
|
28519
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
28457
28520
|
}
|
|
28458
28521
|
this.state.activeFormTag = nextTag;
|
|
28459
28522
|
this.tagHistory.push(nextTag);
|
|
@@ -28683,8 +28746,8 @@ var MDCtrlController = class extends MDControlController {
|
|
|
28683
28746
|
};
|
|
28684
28747
|
|
|
28685
28748
|
// src/controller/control/kanban/kanban.controller.ts
|
|
28686
|
-
import { RuntimeError as
|
|
28687
|
-
import { isNil as
|
|
28749
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
28750
|
+
import { isNil as isNil20 } from "ramda";
|
|
28688
28751
|
|
|
28689
28752
|
// src/controller/control/kanban/kanban.service.ts
|
|
28690
28753
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -28766,12 +28829,12 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28766
28829
|
const isAsc = minorSortDir === "ASC";
|
|
28767
28830
|
items.forEach((item) => {
|
|
28768
28831
|
const sortValue = item[sortField];
|
|
28769
|
-
if (
|
|
28832
|
+
if (isNil20(sortValue)) {
|
|
28770
28833
|
item[sortField] = 0;
|
|
28771
28834
|
} else {
|
|
28772
28835
|
const toNum = Number(sortValue);
|
|
28773
28836
|
if (Number.isNaN(toNum)) {
|
|
28774
|
-
throw new
|
|
28837
|
+
throw new RuntimeError48(
|
|
28775
28838
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
28776
28839
|
);
|
|
28777
28840
|
}
|
|
@@ -28787,7 +28850,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28787
28850
|
}
|
|
28788
28851
|
handleDataGroup() {
|
|
28789
28852
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
28790
|
-
throw new
|
|
28853
|
+
throw new RuntimeError48("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
28791
28854
|
}
|
|
28792
28855
|
return super.handleDataGroup();
|
|
28793
28856
|
}
|
|
@@ -29495,7 +29558,7 @@ var AppHub = class {
|
|
|
29495
29558
|
this.registerAppView(appView);
|
|
29496
29559
|
return appView;
|
|
29497
29560
|
}
|
|
29498
|
-
throw new
|
|
29561
|
+
throw new RuntimeError49("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
29499
29562
|
}
|
|
29500
29563
|
/**
|
|
29501
29564
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -29526,7 +29589,7 @@ var AppHub = class {
|
|
|
29526
29589
|
this.registerAppDataEntity(entity, appId);
|
|
29527
29590
|
return entity;
|
|
29528
29591
|
}
|
|
29529
|
-
throw new
|
|
29592
|
+
throw new RuntimeError49("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
29530
29593
|
}
|
|
29531
29594
|
/**
|
|
29532
29595
|
* 新建 hub 应用
|
|
@@ -29547,7 +29610,7 @@ var AppHub = class {
|
|
|
29547
29610
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
29548
29611
|
this.registerApp(appModel);
|
|
29549
29612
|
} else {
|
|
29550
|
-
throw new
|
|
29613
|
+
throw new RuntimeError49("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
29551
29614
|
}
|
|
29552
29615
|
const app = new Application(appModel);
|
|
29553
29616
|
this.appMap.set(id, app);
|
|
@@ -29645,7 +29708,7 @@ var EngineFactory = class {
|
|
|
29645
29708
|
};
|
|
29646
29709
|
|
|
29647
29710
|
// src/engine/view-base.engine.ts
|
|
29648
|
-
import { RuntimeError as
|
|
29711
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
29649
29712
|
var ViewEngineBase = class {
|
|
29650
29713
|
/**
|
|
29651
29714
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -29833,7 +29896,7 @@ var ViewEngineBase = class {
|
|
|
29833
29896
|
const { appDataEntityId } = this.view.model;
|
|
29834
29897
|
const { evt, context, params } = this.view;
|
|
29835
29898
|
if (!appDataEntityId) {
|
|
29836
|
-
throw new
|
|
29899
|
+
throw new RuntimeError50("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
29837
29900
|
}
|
|
29838
29901
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
29839
29902
|
const res = await app.deService.exec(
|
|
@@ -29855,7 +29918,7 @@ var ViewEngineBase = class {
|
|
|
29855
29918
|
|
|
29856
29919
|
// src/engine/md-view.engine.ts
|
|
29857
29920
|
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
29858
|
-
import { clone as
|
|
29921
|
+
import { clone as clone20 } from "ramda";
|
|
29859
29922
|
var MDViewEngine = class extends ViewEngineBase {
|
|
29860
29923
|
/**
|
|
29861
29924
|
* 多数据部件名称
|
|
@@ -30052,7 +30115,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30052
30115
|
if (!openAppViewLogic) {
|
|
30053
30116
|
throw new RuntimeModelError55(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30054
30117
|
}
|
|
30055
|
-
const params =
|
|
30118
|
+
const params = clone20(this.view.params);
|
|
30056
30119
|
if (copyMode) {
|
|
30057
30120
|
params.srfcopymode = copyMode;
|
|
30058
30121
|
}
|
|
@@ -30208,7 +30271,7 @@ import {
|
|
|
30208
30271
|
ModelError as ModelError28,
|
|
30209
30272
|
HttpError as HttpError4,
|
|
30210
30273
|
NoticeError as NoticeError2,
|
|
30211
|
-
RuntimeError as
|
|
30274
|
+
RuntimeError as RuntimeError51
|
|
30212
30275
|
} from "@ibiz-template/core";
|
|
30213
30276
|
var DefaultErrorHandler = class {
|
|
30214
30277
|
handle(error) {
|
|
@@ -30226,7 +30289,7 @@ var DefaultErrorHandler = class {
|
|
|
30226
30289
|
}
|
|
30227
30290
|
} else if (error instanceof NoticeError2) {
|
|
30228
30291
|
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
30229
|
-
} else if (error instanceof
|
|
30292
|
+
} else if (error instanceof RuntimeError51) {
|
|
30230
30293
|
ibiz.message.error(error.message, 10, true);
|
|
30231
30294
|
}
|
|
30232
30295
|
ibiz.log.error(error);
|
|
@@ -30354,7 +30417,7 @@ var GlobalUtil = class {
|
|
|
30354
30417
|
};
|
|
30355
30418
|
|
|
30356
30419
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
30357
|
-
import { RuntimeError as
|
|
30420
|
+
import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
30358
30421
|
var LogicExecutor = class {
|
|
30359
30422
|
/**
|
|
30360
30423
|
* @author lxm
|
|
@@ -30375,7 +30438,7 @@ var LogicExecutor = class {
|
|
|
30375
30438
|
*/
|
|
30376
30439
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30377
30440
|
execute(_executeParams) {
|
|
30378
|
-
throw new
|
|
30441
|
+
throw new RuntimeError52("Method not implemented.");
|
|
30379
30442
|
}
|
|
30380
30443
|
/**
|
|
30381
30444
|
* 销毁方法
|
|
@@ -30807,7 +30870,7 @@ var LogicSchedulerCenter = class {
|
|
|
30807
30870
|
};
|
|
30808
30871
|
|
|
30809
30872
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
30810
|
-
import { RuntimeError as
|
|
30873
|
+
import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
30811
30874
|
var LogicTrigger = class {
|
|
30812
30875
|
/**
|
|
30813
30876
|
* @author lxm
|
|
@@ -30867,7 +30930,7 @@ var LogicTrigger = class {
|
|
|
30867
30930
|
if (this.executor) {
|
|
30868
30931
|
return this.executor.execute(executeParams);
|
|
30869
30932
|
}
|
|
30870
|
-
throw new
|
|
30933
|
+
throw new RuntimeError53("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
30871
30934
|
}
|
|
30872
30935
|
/**
|
|
30873
30936
|
* 销毁方法
|
|
@@ -30884,12 +30947,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
30884
30947
|
};
|
|
30885
30948
|
|
|
30886
30949
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
30887
|
-
import { RuntimeError as
|
|
30950
|
+
import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
30888
30951
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
30889
30952
|
bindExecutor(executor) {
|
|
30890
30953
|
super.bindExecutor(executor);
|
|
30891
30954
|
if (this.executor.type !== "SCRIPT") {
|
|
30892
|
-
throw new
|
|
30955
|
+
throw new RuntimeError54(
|
|
30893
30956
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
30894
30957
|
);
|
|
30895
30958
|
}
|
|
@@ -30925,7 +30988,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
30925
30988
|
};
|
|
30926
30989
|
|
|
30927
30990
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
30928
|
-
import { RuntimeError as
|
|
30991
|
+
import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
30929
30992
|
var TimerTrigger = class extends LogicTrigger {
|
|
30930
30993
|
constructor() {
|
|
30931
30994
|
super(...arguments);
|
|
@@ -30934,7 +30997,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30934
30997
|
start() {
|
|
30935
30998
|
this.timer = setInterval(() => {
|
|
30936
30999
|
if (!this.scheduler.defaultParamsCb) {
|
|
30937
|
-
throw new
|
|
31000
|
+
throw new RuntimeError55("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
30938
31001
|
}
|
|
30939
31002
|
const params = this.scheduler.defaultParamsCb();
|
|
30940
31003
|
this.executor.execute(params);
|
|
@@ -30951,7 +31014,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30951
31014
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
30952
31015
|
import {
|
|
30953
31016
|
ModelError as ModelError31,
|
|
30954
|
-
RuntimeError as
|
|
31017
|
+
RuntimeError as RuntimeError56,
|
|
30955
31018
|
RuntimeModelError as RuntimeModelError58
|
|
30956
31019
|
} from "@ibiz-template/core";
|
|
30957
31020
|
import { notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
@@ -30987,7 +31050,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30987
31050
|
const { context, params, ...rest } = parameters;
|
|
30988
31051
|
const { data } = parameters;
|
|
30989
31052
|
if (!(data == null ? void 0 : data[0])) {
|
|
30990
|
-
throw new
|
|
31053
|
+
throw new RuntimeError56("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
30991
31054
|
}
|
|
30992
31055
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
30993
31056
|
let openViewRef;
|
|
@@ -31044,7 +31107,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31044
31107
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31045
31108
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
31046
31109
|
if (!findView) {
|
|
31047
|
-
throw new
|
|
31110
|
+
throw new RuntimeError56(
|
|
31048
31111
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31049
31112
|
);
|
|
31050
31113
|
}
|
|
@@ -31162,12 +31225,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31162
31225
|
}
|
|
31163
31226
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
31164
31227
|
if (!selectData) {
|
|
31165
|
-
throw new
|
|
31228
|
+
throw new RuntimeError56("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
31166
31229
|
}
|
|
31167
31230
|
const indexType = selectData.srfkey;
|
|
31168
31231
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
31169
31232
|
if (!findView) {
|
|
31170
|
-
throw new
|
|
31233
|
+
throw new RuntimeError56(
|
|
31171
31234
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31172
31235
|
);
|
|
31173
31236
|
}
|