@ibiz-template/runtime 0.1.32 → 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 +166 -112
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- 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/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +15 -7
- 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-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/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/tree/tree.controller.ts +15 -8
- package/src/service/service/entity/method/de-action.ts +7 -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
|
@@ -8649,7 +8649,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
8649
8649
|
|
|
8650
8650
|
// src/command/app/open-app-view/open-app-view.ts
|
|
8651
8651
|
import { ModelError as ModelError14, RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
8652
|
-
import { clone as
|
|
8652
|
+
import { clone as clone12 } from "ramda";
|
|
8653
8653
|
|
|
8654
8654
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
8655
8655
|
import { isEmpty as isEmpty3 } from "ramda";
|
|
@@ -10988,6 +10988,7 @@ import {
|
|
|
10988
10988
|
HttpResponse as HttpResponse3,
|
|
10989
10989
|
RuntimeModelError as RuntimeModelError18
|
|
10990
10990
|
} from "@ibiz-template/core";
|
|
10991
|
+
import { clone as clone9 } from "ramda";
|
|
10991
10992
|
|
|
10992
10993
|
// src/service/service/entity/method/method.ts
|
|
10993
10994
|
import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
@@ -12602,7 +12603,12 @@ var DEActionMethod = class extends Method {
|
|
|
12602
12603
|
if (!deLogic) {
|
|
12603
12604
|
throw new RuntimeModelError18(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
|
|
12604
12605
|
}
|
|
12605
|
-
return execDELogicAction(
|
|
12606
|
+
return execDELogicAction(
|
|
12607
|
+
deLogic,
|
|
12608
|
+
clone9(context),
|
|
12609
|
+
data ? clone9(data) : {},
|
|
12610
|
+
params ? clone9(params) : {}
|
|
12611
|
+
);
|
|
12606
12612
|
}
|
|
12607
12613
|
if (data && !this.isLocalMode) {
|
|
12608
12614
|
data = await this.input.handle(context, data);
|
|
@@ -12893,7 +12899,7 @@ import {
|
|
|
12893
12899
|
RuntimeModelError as RuntimeModelError19
|
|
12894
12900
|
} from "@ibiz-template/core";
|
|
12895
12901
|
import { ascSort, descSort } from "qx-util";
|
|
12896
|
-
import { clone as
|
|
12902
|
+
import { clone as clone10, equals as equals2, isEmpty as isEmpty7, isNil as isNil8, where as where2 } from "ramda";
|
|
12897
12903
|
var FetchMethod = class extends Method {
|
|
12898
12904
|
get isLocalMode() {
|
|
12899
12905
|
return isLocalMode(this.method);
|
|
@@ -13033,7 +13039,7 @@ var FetchMethod = class extends Method {
|
|
|
13033
13039
|
const { page, size } = filter;
|
|
13034
13040
|
const start = page * size;
|
|
13035
13041
|
const end = (page + 1) * size - 1;
|
|
13036
|
-
const items = list.slice(start, end).map((item) =>
|
|
13042
|
+
const items = list.slice(start, end).map((item) => clone10(item));
|
|
13037
13043
|
return items;
|
|
13038
13044
|
}
|
|
13039
13045
|
/**
|
|
@@ -13152,7 +13158,7 @@ var DEService = class {
|
|
|
13152
13158
|
};
|
|
13153
13159
|
|
|
13154
13160
|
// src/service/vo/control.vo.ts
|
|
13155
|
-
import { clone as
|
|
13161
|
+
import { clone as clone11, isNil as isNil9 } from "ramda";
|
|
13156
13162
|
var ControlVO = class _ControlVO {
|
|
13157
13163
|
/**
|
|
13158
13164
|
* 是否是新建数据,0为新建
|
|
@@ -13320,7 +13326,7 @@ var ControlVO = class _ControlVO {
|
|
|
13320
13326
|
* @return {*} {ControlVO}
|
|
13321
13327
|
*/
|
|
13322
13328
|
clone() {
|
|
13323
|
-
const cloneOrigin =
|
|
13329
|
+
const cloneOrigin = clone11(this.$origin);
|
|
13324
13330
|
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
13325
13331
|
Object.keys(this).forEach((key) => {
|
|
13326
13332
|
newVal[key] = this[key];
|
|
@@ -14193,7 +14199,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
14193
14199
|
* @return {*} {(Promise<IModalData | void>)}
|
|
14194
14200
|
*/
|
|
14195
14201
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
14196
|
-
const context =
|
|
14202
|
+
const context = clone12(_context);
|
|
14197
14203
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
14198
14204
|
if (!appView) {
|
|
14199
14205
|
throw new RuntimeError16("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -14457,7 +14463,7 @@ function installCommand() {
|
|
|
14457
14463
|
}
|
|
14458
14464
|
|
|
14459
14465
|
// src/app-hub.ts
|
|
14460
|
-
import { RuntimeError as
|
|
14466
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
14461
14467
|
|
|
14462
14468
|
// src/application.ts
|
|
14463
14469
|
import { Net } from "@ibiz-template/core";
|
|
@@ -16413,7 +16419,10 @@ var CodeListEditorController = class extends EditorController {
|
|
|
16413
16419
|
);
|
|
16414
16420
|
return dataItems;
|
|
16415
16421
|
}
|
|
16416
|
-
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
|
+
);
|
|
16417
16426
|
}
|
|
16418
16427
|
};
|
|
16419
16428
|
|
|
@@ -16881,7 +16890,7 @@ var MDControlController = class extends ControlController {
|
|
|
16881
16890
|
});
|
|
16882
16891
|
}
|
|
16883
16892
|
if (needRefresh) {
|
|
16884
|
-
this.refresh();
|
|
16893
|
+
await this.refresh();
|
|
16885
16894
|
}
|
|
16886
16895
|
} catch (error) {
|
|
16887
16896
|
await this._evt.emit("onRemoveError", void 0);
|
|
@@ -17420,7 +17429,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
17420
17429
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
17421
17430
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
17422
17431
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
17423
|
-
import { clone as
|
|
17432
|
+
import { clone as clone13, isNil as isNil17, mergeDeepRight } from "ramda";
|
|
17424
17433
|
dayjs3.extend(minMax);
|
|
17425
17434
|
dayjs3.extend(isSameOrBefore);
|
|
17426
17435
|
dayjs3.extend(quarterOfYear);
|
|
@@ -17643,7 +17652,7 @@ var BaseSeriesGenerator = class {
|
|
|
17643
17652
|
dataPreprocess(data) {
|
|
17644
17653
|
const tempData = [];
|
|
17645
17654
|
data.forEach((singleData) => {
|
|
17646
|
-
tempData.push(
|
|
17655
|
+
tempData.push(clone13(singleData));
|
|
17647
17656
|
});
|
|
17648
17657
|
const { groupMode } = this.model;
|
|
17649
17658
|
if (groupMode) {
|
|
@@ -18503,7 +18512,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
18503
18512
|
};
|
|
18504
18513
|
|
|
18505
18514
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
18506
|
-
import { recursiveIterate, RuntimeError as
|
|
18515
|
+
import { recursiveIterate, RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
18507
18516
|
|
|
18508
18517
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
18509
18518
|
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
@@ -18513,7 +18522,7 @@ import { isArray as isArray4 } from "qx-util";
|
|
|
18513
18522
|
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
18514
18523
|
|
|
18515
18524
|
// src/ui-logic/index.ts
|
|
18516
|
-
import { RuntimeError as
|
|
18525
|
+
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
18517
18526
|
|
|
18518
18527
|
// src/ui-logic/ui-logic.ts
|
|
18519
18528
|
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
@@ -18982,12 +18991,12 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18982
18991
|
};
|
|
18983
18992
|
|
|
18984
18993
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
18985
|
-
import { ModelError as ModelError21 } from "@ibiz-template/core";
|
|
18986
|
-
import { clone as
|
|
18994
|
+
import { ModelError as ModelError21, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
18995
|
+
import { clone as clone15 } from "ramda";
|
|
18987
18996
|
|
|
18988
18997
|
// src/ui-logic/utils/handle-src-val.ts
|
|
18989
18998
|
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
18990
|
-
import { clone as
|
|
18999
|
+
import { clone as clone14 } from "ramda";
|
|
18991
19000
|
function handleSrcVal2(ctx, srcValParams) {
|
|
18992
19001
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
18993
19002
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -19017,7 +19026,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
19017
19026
|
value = ctx.context;
|
|
19018
19027
|
break;
|
|
19019
19028
|
case "ENVPARAM":
|
|
19020
|
-
value =
|
|
19029
|
+
value = clone14(ibiz.env);
|
|
19021
19030
|
break;
|
|
19022
19031
|
default:
|
|
19023
19032
|
throw new ModelError20(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -19088,13 +19097,31 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19088
19097
|
*/
|
|
19089
19098
|
setParamValue(nodeParam, ctx) {
|
|
19090
19099
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
19100
|
+
if (!dstDEUILogicParamId) {
|
|
19101
|
+
throw new RuntimeError31("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
|
|
19102
|
+
}
|
|
19091
19103
|
let dstField = dstFieldName;
|
|
19092
19104
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
19093
19105
|
dstField = dstField == null ? void 0 : dstField.toLowerCase();
|
|
19094
19106
|
}
|
|
19095
19107
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
19096
19108
|
if (dstField) {
|
|
19097
|
-
|
|
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
|
+
}
|
|
19098
19125
|
} else {
|
|
19099
19126
|
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
19100
19127
|
}
|
|
@@ -19111,7 +19138,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19111
19138
|
copyParam(nodeParam, ctx) {
|
|
19112
19139
|
const { dstDEUILogicParamId } = nodeParam;
|
|
19113
19140
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
19114
|
-
ctx.params[dstDEUILogicParamId] =
|
|
19141
|
+
ctx.params[dstDEUILogicParamId] = clone15(srcVal);
|
|
19115
19142
|
}
|
|
19116
19143
|
/**
|
|
19117
19144
|
* 绑定参数
|
|
@@ -19188,7 +19215,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19188
19215
|
};
|
|
19189
19216
|
|
|
19190
19217
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
19191
|
-
import { RuntimeError as
|
|
19218
|
+
import { RuntimeError as RuntimeError32, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
19192
19219
|
import { isFunction } from "lodash-es";
|
|
19193
19220
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
19194
19221
|
async exec(ctx) {
|
|
@@ -19205,14 +19232,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
19205
19232
|
}
|
|
19206
19233
|
const invokeParam = ctx.params[invokeParamId];
|
|
19207
19234
|
if (!invokeParam) {
|
|
19208
|
-
throw new
|
|
19235
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
19209
19236
|
}
|
|
19210
19237
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
19211
19238
|
if (!invokeCtrl) {
|
|
19212
|
-
throw new
|
|
19239
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
19213
19240
|
}
|
|
19214
19241
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
19215
|
-
throw new
|
|
19242
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
19216
19243
|
}
|
|
19217
19244
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
19218
19245
|
}
|
|
@@ -19328,7 +19355,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
19328
19355
|
|
|
19329
19356
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
19330
19357
|
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
19331
|
-
import { clone as
|
|
19358
|
+
import { clone as clone16 } from "ramda";
|
|
19332
19359
|
var CopyParamNode2 = class extends UILogicNode {
|
|
19333
19360
|
async exec(ctx) {
|
|
19334
19361
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -19339,7 +19366,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
19339
19366
|
);
|
|
19340
19367
|
}
|
|
19341
19368
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
19342
|
-
ctx.params[dstDEUILogicParamId] =
|
|
19369
|
+
ctx.params[dstDEUILogicParamId] = clone16(srcVal);
|
|
19343
19370
|
}
|
|
19344
19371
|
};
|
|
19345
19372
|
|
|
@@ -19425,16 +19452,16 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
19425
19452
|
};
|
|
19426
19453
|
|
|
19427
19454
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
19428
|
-
import { RuntimeError as
|
|
19455
|
+
import { RuntimeError as RuntimeError33 } from "@ibiz-template/core";
|
|
19429
19456
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
19430
19457
|
async exec(_ctx) {
|
|
19431
19458
|
const { errorInfo } = this.model;
|
|
19432
|
-
throw new
|
|
19459
|
+
throw new RuntimeError33(errorInfo);
|
|
19433
19460
|
}
|
|
19434
19461
|
};
|
|
19435
19462
|
|
|
19436
19463
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
19437
|
-
import { RuntimeError as
|
|
19464
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
19438
19465
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
19439
19466
|
async exec(ctx) {
|
|
19440
19467
|
ctx.isEndNode = true;
|
|
@@ -19450,18 +19477,18 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
19450
19477
|
}
|
|
19451
19478
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
19452
19479
|
if (!invokeCtrl) {
|
|
19453
|
-
throw new
|
|
19480
|
+
throw new RuntimeError34("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
19454
19481
|
}
|
|
19455
19482
|
const eventParam = ctx.params[eventParamId];
|
|
19456
19483
|
if (!eventParam) {
|
|
19457
|
-
throw new
|
|
19484
|
+
throw new RuntimeError34("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
19458
19485
|
}
|
|
19459
19486
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
19460
19487
|
}
|
|
19461
19488
|
};
|
|
19462
19489
|
|
|
19463
19490
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
19464
|
-
import { RuntimeError as
|
|
19491
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
19465
19492
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
19466
19493
|
async exec(ctx) {
|
|
19467
19494
|
const {
|
|
@@ -19481,7 +19508,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
19481
19508
|
}
|
|
19482
19509
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
19483
19510
|
if (!dstParam) {
|
|
19484
|
-
throw new
|
|
19511
|
+
throw new RuntimeError35("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
19485
19512
|
}
|
|
19486
19513
|
const result = await execDELogicById(
|
|
19487
19514
|
dstAppDELogicId,
|
|
@@ -19521,6 +19548,10 @@ var UILogicParam = class {
|
|
|
19521
19548
|
const m = this.model;
|
|
19522
19549
|
const { context, viewParams, data, parameters } = ctx;
|
|
19523
19550
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
19551
|
+
if (m.codeName === "layoutPanel") {
|
|
19552
|
+
ctx.params[tag] = parameters.view.layoutPanel.panelItems;
|
|
19553
|
+
return;
|
|
19554
|
+
}
|
|
19524
19555
|
if (m.default) {
|
|
19525
19556
|
ctx.params[tag] = data && data.length > 0 ? data[0] : {};
|
|
19526
19557
|
} else if (m.activeContainerParam) {
|
|
@@ -19774,7 +19805,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19774
19805
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
19775
19806
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
19776
19807
|
if (!deUILogic) {
|
|
19777
|
-
throw new
|
|
19808
|
+
throw new RuntimeError36(
|
|
19778
19809
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
19779
19810
|
);
|
|
19780
19811
|
}
|
|
@@ -19787,7 +19818,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19787
19818
|
}
|
|
19788
19819
|
|
|
19789
19820
|
// src/ui-action/uiaction-util.ts
|
|
19790
|
-
import { RuntimeError as
|
|
19821
|
+
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
19791
19822
|
var UIActionUtil = class {
|
|
19792
19823
|
/**
|
|
19793
19824
|
* 执行界面行为
|
|
@@ -19802,7 +19833,7 @@ var UIActionUtil = class {
|
|
|
19802
19833
|
static async exec(actionId, params) {
|
|
19803
19834
|
const action = await getUIActionById(actionId);
|
|
19804
19835
|
if (!action) {
|
|
19805
|
-
throw new
|
|
19836
|
+
throw new RuntimeError37("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
19806
19837
|
}
|
|
19807
19838
|
if (action.actionTarget === "SINGLEDATA") {
|
|
19808
19839
|
const validateResult = await params.view.call("Validate" /* VALIDATE */);
|
|
@@ -20327,7 +20358,7 @@ var ToolbarController = class extends ControlController {
|
|
|
20327
20358
|
const actionId = item.uiactionId;
|
|
20328
20359
|
const uiAction = await getUIActionById(actionId);
|
|
20329
20360
|
if (!uiAction) {
|
|
20330
|
-
throw new
|
|
20361
|
+
throw new RuntimeError38("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
20331
20362
|
}
|
|
20332
20363
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
20333
20364
|
if (enableLoading) {
|
|
@@ -21277,7 +21308,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21277
21308
|
import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
21278
21309
|
|
|
21279
21310
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
21280
|
-
import { RuntimeError as
|
|
21311
|
+
import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
21281
21312
|
var ExpBarControlController = class extends ControlController {
|
|
21282
21313
|
constructor() {
|
|
21283
21314
|
super(...arguments);
|
|
@@ -21591,7 +21622,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21591
21622
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
21592
21623
|
return this.XDataModel.navAppViewId;
|
|
21593
21624
|
}
|
|
21594
|
-
throw new
|
|
21625
|
+
throw new RuntimeError39("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
21595
21626
|
}
|
|
21596
21627
|
/**
|
|
21597
21628
|
* 获取导航视图
|
|
@@ -21734,7 +21765,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21734
21765
|
};
|
|
21735
21766
|
|
|
21736
21767
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
21737
|
-
import { RuntimeError as
|
|
21768
|
+
import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
21738
21769
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
21739
21770
|
constructor() {
|
|
21740
21771
|
super(...arguments);
|
|
@@ -21809,7 +21840,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21809
21840
|
const deData = node.deData || node;
|
|
21810
21841
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
21811
21842
|
if (!nodeModel) {
|
|
21812
|
-
throw new
|
|
21843
|
+
throw new RuntimeError40("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
21813
21844
|
}
|
|
21814
21845
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
21815
21846
|
result.context.currentSrfNav = nodeId;
|
|
@@ -22069,7 +22100,8 @@ var SearchFormService = class extends ControlService {
|
|
|
22069
22100
|
* @returns {*} {Promise<IHttpResponse>}
|
|
22070
22101
|
*/
|
|
22071
22102
|
async getDraft(_context, params = {}) {
|
|
22072
|
-
|
|
22103
|
+
const tempData = this.getFilteredData({ ...params });
|
|
22104
|
+
let res = { ok: true, status: 200, data: tempData };
|
|
22073
22105
|
res = this.handleResponse(res);
|
|
22074
22106
|
return res;
|
|
22075
22107
|
}
|
|
@@ -22089,7 +22121,7 @@ var SearchFormService = class extends ControlService {
|
|
|
22089
22121
|
}
|
|
22090
22122
|
},
|
|
22091
22123
|
{
|
|
22092
|
-
childrenFields: ["deformPages", "deformDetails"]
|
|
22124
|
+
childrenFields: ["deformPages", "deformTabPages", "deformDetails"]
|
|
22093
22125
|
}
|
|
22094
22126
|
);
|
|
22095
22127
|
}
|
|
@@ -22108,6 +22140,22 @@ var SearchFormService = class extends ControlService {
|
|
|
22108
22140
|
}
|
|
22109
22141
|
return res;
|
|
22110
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
|
+
}
|
|
22111
22159
|
};
|
|
22112
22160
|
|
|
22113
22161
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
@@ -23214,7 +23262,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
23214
23262
|
};
|
|
23215
23263
|
|
|
23216
23264
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
23217
|
-
import { RuntimeError as
|
|
23265
|
+
import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
23218
23266
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
23219
23267
|
/**
|
|
23220
23268
|
* 初始化
|
|
@@ -23229,7 +23277,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
23229
23277
|
const { model } = this.parent;
|
|
23230
23278
|
const { contentControl } = model;
|
|
23231
23279
|
if (!contentControl) {
|
|
23232
|
-
throw new
|
|
23280
|
+
throw new RuntimeError41("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
23233
23281
|
}
|
|
23234
23282
|
this.controlModel = contentControl;
|
|
23235
23283
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -23339,11 +23387,11 @@ import { isArray as isArray5 } from "lodash-es";
|
|
|
23339
23387
|
import {
|
|
23340
23388
|
awaitTimeout,
|
|
23341
23389
|
mergeInLeft,
|
|
23342
|
-
RuntimeError as
|
|
23390
|
+
RuntimeError as RuntimeError42,
|
|
23343
23391
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
23344
23392
|
} from "@ibiz-template/core";
|
|
23345
23393
|
import { debounce } from "lodash-es";
|
|
23346
|
-
import { clone as
|
|
23394
|
+
import { clone as clone17 } from "ramda";
|
|
23347
23395
|
|
|
23348
23396
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
23349
23397
|
import {
|
|
@@ -23690,8 +23738,8 @@ var EditFormController = class extends FormController {
|
|
|
23690
23738
|
* @return {*} {Promise<IData>}
|
|
23691
23739
|
*/
|
|
23692
23740
|
async copy() {
|
|
23693
|
-
const context =
|
|
23694
|
-
const queryParams =
|
|
23741
|
+
const context = clone17(this.context);
|
|
23742
|
+
const queryParams = clone17(this.params);
|
|
23695
23743
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
23696
23744
|
this.model.appDataEntityId
|
|
23697
23745
|
);
|
|
@@ -23745,7 +23793,7 @@ var EditFormController = class extends FormController {
|
|
|
23745
23793
|
if (isLoadDraft) {
|
|
23746
23794
|
return this.loadDraft();
|
|
23747
23795
|
}
|
|
23748
|
-
const queryParams =
|
|
23796
|
+
const queryParams = clone17(this.params);
|
|
23749
23797
|
let res;
|
|
23750
23798
|
try {
|
|
23751
23799
|
await this.startLoading();
|
|
@@ -23781,7 +23829,7 @@ var EditFormController = class extends FormController {
|
|
|
23781
23829
|
}
|
|
23782
23830
|
const isValid = await this.validate();
|
|
23783
23831
|
if (!isValid) {
|
|
23784
|
-
throw new
|
|
23832
|
+
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23785
23833
|
}
|
|
23786
23834
|
await this.startLoading();
|
|
23787
23835
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -23890,7 +23938,7 @@ var EditFormController = class extends FormController {
|
|
|
23890
23938
|
(item) => item.id === formItemUpdateId
|
|
23891
23939
|
);
|
|
23892
23940
|
if (!formItemUpdate) {
|
|
23893
|
-
throw new
|
|
23941
|
+
throw new RuntimeError42("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
23894
23942
|
}
|
|
23895
23943
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
23896
23944
|
const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
|
|
@@ -23934,7 +23982,7 @@ var EditFormController = class extends FormController {
|
|
|
23934
23982
|
async wfStart(extraParams = {}) {
|
|
23935
23983
|
const isValid = await this.validate();
|
|
23936
23984
|
if (!isValid) {
|
|
23937
|
-
throw new
|
|
23985
|
+
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23938
23986
|
}
|
|
23939
23987
|
await this.startLoading();
|
|
23940
23988
|
try {
|
|
@@ -23967,7 +24015,7 @@ var EditFormController = class extends FormController {
|
|
|
23967
24015
|
async wfSubmit(extraParams = {}) {
|
|
23968
24016
|
const isValid = await this.validate();
|
|
23969
24017
|
if (!isValid) {
|
|
23970
|
-
throw new
|
|
24018
|
+
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23971
24019
|
}
|
|
23972
24020
|
await this.startLoading();
|
|
23973
24021
|
try {
|
|
@@ -24198,7 +24246,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
24198
24246
|
};
|
|
24199
24247
|
|
|
24200
24248
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
24201
|
-
import { RuntimeError as
|
|
24249
|
+
import { RuntimeError as RuntimeError43, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
24202
24250
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
24203
24251
|
constructor() {
|
|
24204
24252
|
super(...arguments);
|
|
@@ -24303,7 +24351,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
24303
24351
|
const { model } = this.parent;
|
|
24304
24352
|
const { contentControl } = model;
|
|
24305
24353
|
if (!contentControl) {
|
|
24306
|
-
throw new
|
|
24354
|
+
throw new RuntimeError43("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
24307
24355
|
}
|
|
24308
24356
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
24309
24357
|
this.controlModel = contentControl;
|
|
@@ -25015,10 +25063,10 @@ import {
|
|
|
25015
25063
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
25016
25064
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
25017
25065
|
recursiveIterate as recursiveIterate4,
|
|
25018
|
-
RuntimeError as
|
|
25066
|
+
RuntimeError as RuntimeError44,
|
|
25019
25067
|
RuntimeModelError as RuntimeModelError52
|
|
25020
25068
|
} from "@ibiz-template/core";
|
|
25021
|
-
import { clone as
|
|
25069
|
+
import { clone as clone18 } from "ramda";
|
|
25022
25070
|
|
|
25023
25071
|
// src/controller/control/grid/grid/grid.service.ts
|
|
25024
25072
|
var GridService = class extends MDControlService {
|
|
@@ -25389,7 +25437,7 @@ var GridController = class extends MDControlController {
|
|
|
25389
25437
|
}
|
|
25390
25438
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
25391
25439
|
if (editingRow) {
|
|
25392
|
-
throw new
|
|
25440
|
+
throw new RuntimeError44("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
25393
25441
|
}
|
|
25394
25442
|
const queryParams = { ...this.params };
|
|
25395
25443
|
const defaultData = this.calcDefaultValue({}, true);
|
|
@@ -25428,7 +25476,7 @@ var GridController = class extends MDControlController {
|
|
|
25428
25476
|
(item) => item.data.srfkey === data.srfkey
|
|
25429
25477
|
);
|
|
25430
25478
|
if (!rowState) {
|
|
25431
|
-
throw new
|
|
25479
|
+
throw new RuntimeError44("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
25432
25480
|
}
|
|
25433
25481
|
if (!rowState.modified) {
|
|
25434
25482
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -25440,7 +25488,7 @@ var GridController = class extends MDControlController {
|
|
|
25440
25488
|
}
|
|
25441
25489
|
const isValid = await this.validate(rowState);
|
|
25442
25490
|
if (!isValid) {
|
|
25443
|
-
throw new
|
|
25491
|
+
throw new RuntimeError44("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
25444
25492
|
}
|
|
25445
25493
|
await this.startLoading();
|
|
25446
25494
|
let res;
|
|
@@ -25647,7 +25695,7 @@ var GridController = class extends MDControlController {
|
|
|
25647
25695
|
}
|
|
25648
25696
|
async toggleRowEdit() {
|
|
25649
25697
|
if (!this.model.enableRowNew) {
|
|
25650
|
-
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");
|
|
25651
25699
|
}
|
|
25652
25700
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
25653
25701
|
}
|
|
@@ -25680,10 +25728,10 @@ var GridController = class extends MDControlController {
|
|
|
25680
25728
|
} else {
|
|
25681
25729
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
25682
25730
|
if (editingRow) {
|
|
25683
|
-
throw new
|
|
25731
|
+
throw new RuntimeError44("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
25684
25732
|
}
|
|
25685
25733
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
25686
|
-
row.cacheData =
|
|
25734
|
+
row.cacheData = clone18(row.data);
|
|
25687
25735
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
25688
25736
|
Object.assign(row.data, defaultVal);
|
|
25689
25737
|
}
|
|
@@ -25730,7 +25778,7 @@ var GridController = class extends MDControlController {
|
|
|
25730
25778
|
(item) => item.id === updateId
|
|
25731
25779
|
);
|
|
25732
25780
|
if (!findUpdate) {
|
|
25733
|
-
throw new
|
|
25781
|
+
throw new RuntimeError44("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
25734
25782
|
}
|
|
25735
25783
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
25736
25784
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -25800,7 +25848,7 @@ var GridController = class extends MDControlController {
|
|
|
25800
25848
|
codeListMap.set(key, items[key].codeListItems);
|
|
25801
25849
|
}
|
|
25802
25850
|
});
|
|
25803
|
-
const cloneData =
|
|
25851
|
+
const cloneData = clone18(
|
|
25804
25852
|
data2.map((item) => {
|
|
25805
25853
|
return item.getOrigin();
|
|
25806
25854
|
})
|
|
@@ -25839,7 +25887,7 @@ var GridController = class extends MDControlController {
|
|
|
25839
25887
|
data2 = this.getData();
|
|
25840
25888
|
}
|
|
25841
25889
|
if (data2.length === 0) {
|
|
25842
|
-
throw new
|
|
25890
|
+
throw new RuntimeError44("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
25843
25891
|
}
|
|
25844
25892
|
return formatExcelData(data2);
|
|
25845
25893
|
};
|
|
@@ -25858,11 +25906,11 @@ var GridController = class extends MDControlController {
|
|
|
25858
25906
|
);
|
|
25859
25907
|
const data = formatArrayData(filterVal, await getExportData());
|
|
25860
25908
|
if (!ibiz.util.getExportExcel) {
|
|
25861
|
-
throw new
|
|
25909
|
+
throw new RuntimeError44("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
25862
25910
|
}
|
|
25863
25911
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
25864
25912
|
if (!exportExcel) {
|
|
25865
|
-
throw new
|
|
25913
|
+
throw new RuntimeError44("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
25866
25914
|
}
|
|
25867
25915
|
exportExcel.exportJsonToExcel({
|
|
25868
25916
|
header,
|
|
@@ -25910,7 +25958,7 @@ var GridController = class extends MDControlController {
|
|
|
25910
25958
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
25911
25959
|
import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
25912
25960
|
import dayjs4 from "dayjs";
|
|
25913
|
-
import { clone as
|
|
25961
|
+
import { clone as clone19, isNil as isNil19 } from "ramda";
|
|
25914
25962
|
var GridFieldColumnController = class extends GridColumnController {
|
|
25915
25963
|
constructor() {
|
|
25916
25964
|
super(...arguments);
|
|
@@ -26006,7 +26054,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26006
26054
|
srfkey: value,
|
|
26007
26055
|
...wfContext
|
|
26008
26056
|
});
|
|
26009
|
-
const tempParams =
|
|
26057
|
+
const tempParams = clone19(this.params);
|
|
26010
26058
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
26011
26059
|
row.data,
|
|
26012
26060
|
tempContext,
|
|
@@ -26198,7 +26246,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
26198
26246
|
};
|
|
26199
26247
|
|
|
26200
26248
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
26201
|
-
import { RuntimeError as
|
|
26249
|
+
import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
26202
26250
|
import Schema2 from "async-validator";
|
|
26203
26251
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
26204
26252
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -26332,7 +26380,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
26332
26380
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
26333
26381
|
const result = await this.validate(row);
|
|
26334
26382
|
if (!result) {
|
|
26335
|
-
throw new
|
|
26383
|
+
throw new RuntimeError45(
|
|
26336
26384
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
26337
26385
|
);
|
|
26338
26386
|
}
|
|
@@ -26690,7 +26738,7 @@ var ListController = class extends MDControlController {
|
|
|
26690
26738
|
};
|
|
26691
26739
|
|
|
26692
26740
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
26693
|
-
import { recursiveIterate as recursiveIterate5, RuntimeError as
|
|
26741
|
+
import { recursiveIterate as recursiveIterate5, RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
26694
26742
|
var PanelController = class extends ControlController {
|
|
26695
26743
|
constructor() {
|
|
26696
26744
|
super(...arguments);
|
|
@@ -26788,7 +26836,7 @@ var PanelController = class extends ControlController {
|
|
|
26788
26836
|
async load() {
|
|
26789
26837
|
const data = await this.prepareData();
|
|
26790
26838
|
if (!data) {
|
|
26791
|
-
throw new
|
|
26839
|
+
throw new RuntimeError46("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
26792
26840
|
}
|
|
26793
26841
|
const panelData = this.convertData(data);
|
|
26794
26842
|
this.state.data = panelData;
|
|
@@ -27985,12 +28033,18 @@ var TreeController = class extends MDControlController {
|
|
|
27985
28033
|
async loadNodes(parentNode) {
|
|
27986
28034
|
const params = await this.getFetchParams();
|
|
27987
28035
|
const hasQuery = !!params.query;
|
|
27988
|
-
|
|
27989
|
-
|
|
27990
|
-
|
|
27991
|
-
|
|
27992
|
-
|
|
27993
|
-
|
|
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
|
+
}
|
|
27994
28048
|
if (parentNode) {
|
|
27995
28049
|
parentNode.children = nodes;
|
|
27996
28050
|
} else {
|
|
@@ -28182,7 +28236,7 @@ var TreeController = class extends MDControlController {
|
|
|
28182
28236
|
};
|
|
28183
28237
|
|
|
28184
28238
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
28185
|
-
import { RuntimeError as
|
|
28239
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
28186
28240
|
|
|
28187
28241
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
28188
28242
|
var WizardPanelService = class extends ControlService {
|
|
@@ -28341,7 +28395,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28341
28395
|
const { activeFormTag } = this.state;
|
|
28342
28396
|
const controller = this.formControllers.get(activeFormTag);
|
|
28343
28397
|
if (!controller) {
|
|
28344
|
-
throw new
|
|
28398
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
28345
28399
|
}
|
|
28346
28400
|
return controller;
|
|
28347
28401
|
}
|
|
@@ -28416,7 +28470,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28416
28470
|
this.tagHistory.pop();
|
|
28417
28471
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
28418
28472
|
if (!prevTag) {
|
|
28419
|
-
throw new
|
|
28473
|
+
throw new RuntimeError47("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
28420
28474
|
}
|
|
28421
28475
|
this.state.activeFormTag = prevTag;
|
|
28422
28476
|
}
|
|
@@ -28437,7 +28491,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28437
28491
|
}
|
|
28438
28492
|
);
|
|
28439
28493
|
if (!wizardForm) {
|
|
28440
|
-
throw new
|
|
28494
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
28441
28495
|
}
|
|
28442
28496
|
nextTag = data.srfnextform;
|
|
28443
28497
|
} else {
|
|
@@ -28449,7 +28503,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28449
28503
|
});
|
|
28450
28504
|
const nextWizardStep = wizardSteps[index + 1];
|
|
28451
28505
|
if (!nextWizardStep) {
|
|
28452
|
-
throw new
|
|
28506
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
28453
28507
|
}
|
|
28454
28508
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
28455
28509
|
(wizardForm) => {
|
|
@@ -28462,7 +28516,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28462
28516
|
}
|
|
28463
28517
|
}
|
|
28464
28518
|
if (!nextTag) {
|
|
28465
|
-
throw new
|
|
28519
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
28466
28520
|
}
|
|
28467
28521
|
this.state.activeFormTag = nextTag;
|
|
28468
28522
|
this.tagHistory.push(nextTag);
|
|
@@ -28692,7 +28746,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
28692
28746
|
};
|
|
28693
28747
|
|
|
28694
28748
|
// src/controller/control/kanban/kanban.controller.ts
|
|
28695
|
-
import { RuntimeError as
|
|
28749
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
28696
28750
|
import { isNil as isNil20 } from "ramda";
|
|
28697
28751
|
|
|
28698
28752
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -28780,7 +28834,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28780
28834
|
} else {
|
|
28781
28835
|
const toNum = Number(sortValue);
|
|
28782
28836
|
if (Number.isNaN(toNum)) {
|
|
28783
|
-
throw new
|
|
28837
|
+
throw new RuntimeError48(
|
|
28784
28838
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
28785
28839
|
);
|
|
28786
28840
|
}
|
|
@@ -28796,7 +28850,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28796
28850
|
}
|
|
28797
28851
|
handleDataGroup() {
|
|
28798
28852
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
28799
|
-
throw new
|
|
28853
|
+
throw new RuntimeError48("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
28800
28854
|
}
|
|
28801
28855
|
return super.handleDataGroup();
|
|
28802
28856
|
}
|
|
@@ -29504,7 +29558,7 @@ var AppHub = class {
|
|
|
29504
29558
|
this.registerAppView(appView);
|
|
29505
29559
|
return appView;
|
|
29506
29560
|
}
|
|
29507
|
-
throw new
|
|
29561
|
+
throw new RuntimeError49("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
29508
29562
|
}
|
|
29509
29563
|
/**
|
|
29510
29564
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -29535,7 +29589,7 @@ var AppHub = class {
|
|
|
29535
29589
|
this.registerAppDataEntity(entity, appId);
|
|
29536
29590
|
return entity;
|
|
29537
29591
|
}
|
|
29538
|
-
throw new
|
|
29592
|
+
throw new RuntimeError49("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
29539
29593
|
}
|
|
29540
29594
|
/**
|
|
29541
29595
|
* 新建 hub 应用
|
|
@@ -29556,7 +29610,7 @@ var AppHub = class {
|
|
|
29556
29610
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
29557
29611
|
this.registerApp(appModel);
|
|
29558
29612
|
} else {
|
|
29559
|
-
throw new
|
|
29613
|
+
throw new RuntimeError49("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
29560
29614
|
}
|
|
29561
29615
|
const app = new Application(appModel);
|
|
29562
29616
|
this.appMap.set(id, app);
|
|
@@ -29654,7 +29708,7 @@ var EngineFactory = class {
|
|
|
29654
29708
|
};
|
|
29655
29709
|
|
|
29656
29710
|
// src/engine/view-base.engine.ts
|
|
29657
|
-
import { RuntimeError as
|
|
29711
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
29658
29712
|
var ViewEngineBase = class {
|
|
29659
29713
|
/**
|
|
29660
29714
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -29842,7 +29896,7 @@ var ViewEngineBase = class {
|
|
|
29842
29896
|
const { appDataEntityId } = this.view.model;
|
|
29843
29897
|
const { evt, context, params } = this.view;
|
|
29844
29898
|
if (!appDataEntityId) {
|
|
29845
|
-
throw new
|
|
29899
|
+
throw new RuntimeError50("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
29846
29900
|
}
|
|
29847
29901
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
29848
29902
|
const res = await app.deService.exec(
|
|
@@ -29864,7 +29918,7 @@ var ViewEngineBase = class {
|
|
|
29864
29918
|
|
|
29865
29919
|
// src/engine/md-view.engine.ts
|
|
29866
29920
|
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
29867
|
-
import { clone as
|
|
29921
|
+
import { clone as clone20 } from "ramda";
|
|
29868
29922
|
var MDViewEngine = class extends ViewEngineBase {
|
|
29869
29923
|
/**
|
|
29870
29924
|
* 多数据部件名称
|
|
@@ -30061,7 +30115,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30061
30115
|
if (!openAppViewLogic) {
|
|
30062
30116
|
throw new RuntimeModelError55(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30063
30117
|
}
|
|
30064
|
-
const params =
|
|
30118
|
+
const params = clone20(this.view.params);
|
|
30065
30119
|
if (copyMode) {
|
|
30066
30120
|
params.srfcopymode = copyMode;
|
|
30067
30121
|
}
|
|
@@ -30217,7 +30271,7 @@ import {
|
|
|
30217
30271
|
ModelError as ModelError28,
|
|
30218
30272
|
HttpError as HttpError4,
|
|
30219
30273
|
NoticeError as NoticeError2,
|
|
30220
|
-
RuntimeError as
|
|
30274
|
+
RuntimeError as RuntimeError51
|
|
30221
30275
|
} from "@ibiz-template/core";
|
|
30222
30276
|
var DefaultErrorHandler = class {
|
|
30223
30277
|
handle(error) {
|
|
@@ -30235,7 +30289,7 @@ var DefaultErrorHandler = class {
|
|
|
30235
30289
|
}
|
|
30236
30290
|
} else if (error instanceof NoticeError2) {
|
|
30237
30291
|
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
30238
|
-
} else if (error instanceof
|
|
30292
|
+
} else if (error instanceof RuntimeError51) {
|
|
30239
30293
|
ibiz.message.error(error.message, 10, true);
|
|
30240
30294
|
}
|
|
30241
30295
|
ibiz.log.error(error);
|
|
@@ -30363,7 +30417,7 @@ var GlobalUtil = class {
|
|
|
30363
30417
|
};
|
|
30364
30418
|
|
|
30365
30419
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
30366
|
-
import { RuntimeError as
|
|
30420
|
+
import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
30367
30421
|
var LogicExecutor = class {
|
|
30368
30422
|
/**
|
|
30369
30423
|
* @author lxm
|
|
@@ -30384,7 +30438,7 @@ var LogicExecutor = class {
|
|
|
30384
30438
|
*/
|
|
30385
30439
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30386
30440
|
execute(_executeParams) {
|
|
30387
|
-
throw new
|
|
30441
|
+
throw new RuntimeError52("Method not implemented.");
|
|
30388
30442
|
}
|
|
30389
30443
|
/**
|
|
30390
30444
|
* 销毁方法
|
|
@@ -30816,7 +30870,7 @@ var LogicSchedulerCenter = class {
|
|
|
30816
30870
|
};
|
|
30817
30871
|
|
|
30818
30872
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
30819
|
-
import { RuntimeError as
|
|
30873
|
+
import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
30820
30874
|
var LogicTrigger = class {
|
|
30821
30875
|
/**
|
|
30822
30876
|
* @author lxm
|
|
@@ -30876,7 +30930,7 @@ var LogicTrigger = class {
|
|
|
30876
30930
|
if (this.executor) {
|
|
30877
30931
|
return this.executor.execute(executeParams);
|
|
30878
30932
|
}
|
|
30879
|
-
throw new
|
|
30933
|
+
throw new RuntimeError53("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
30880
30934
|
}
|
|
30881
30935
|
/**
|
|
30882
30936
|
* 销毁方法
|
|
@@ -30893,12 +30947,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
30893
30947
|
};
|
|
30894
30948
|
|
|
30895
30949
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
30896
|
-
import { RuntimeError as
|
|
30950
|
+
import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
30897
30951
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
30898
30952
|
bindExecutor(executor) {
|
|
30899
30953
|
super.bindExecutor(executor);
|
|
30900
30954
|
if (this.executor.type !== "SCRIPT") {
|
|
30901
|
-
throw new
|
|
30955
|
+
throw new RuntimeError54(
|
|
30902
30956
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
30903
30957
|
);
|
|
30904
30958
|
}
|
|
@@ -30934,7 +30988,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
30934
30988
|
};
|
|
30935
30989
|
|
|
30936
30990
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
30937
|
-
import { RuntimeError as
|
|
30991
|
+
import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
30938
30992
|
var TimerTrigger = class extends LogicTrigger {
|
|
30939
30993
|
constructor() {
|
|
30940
30994
|
super(...arguments);
|
|
@@ -30943,7 +30997,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30943
30997
|
start() {
|
|
30944
30998
|
this.timer = setInterval(() => {
|
|
30945
30999
|
if (!this.scheduler.defaultParamsCb) {
|
|
30946
|
-
throw new
|
|
31000
|
+
throw new RuntimeError55("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
30947
31001
|
}
|
|
30948
31002
|
const params = this.scheduler.defaultParamsCb();
|
|
30949
31003
|
this.executor.execute(params);
|
|
@@ -30960,7 +31014,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30960
31014
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
30961
31015
|
import {
|
|
30962
31016
|
ModelError as ModelError31,
|
|
30963
|
-
RuntimeError as
|
|
31017
|
+
RuntimeError as RuntimeError56,
|
|
30964
31018
|
RuntimeModelError as RuntimeModelError58
|
|
30965
31019
|
} from "@ibiz-template/core";
|
|
30966
31020
|
import { notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
@@ -30996,7 +31050,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30996
31050
|
const { context, params, ...rest } = parameters;
|
|
30997
31051
|
const { data } = parameters;
|
|
30998
31052
|
if (!(data == null ? void 0 : data[0])) {
|
|
30999
|
-
throw new
|
|
31053
|
+
throw new RuntimeError56("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
31000
31054
|
}
|
|
31001
31055
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31002
31056
|
let openViewRef;
|
|
@@ -31053,7 +31107,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31053
31107
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31054
31108
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
31055
31109
|
if (!findView) {
|
|
31056
|
-
throw new
|
|
31110
|
+
throw new RuntimeError56(
|
|
31057
31111
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31058
31112
|
);
|
|
31059
31113
|
}
|
|
@@ -31171,12 +31225,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31171
31225
|
}
|
|
31172
31226
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
31173
31227
|
if (!selectData) {
|
|
31174
|
-
throw new
|
|
31228
|
+
throw new RuntimeError56("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
31175
31229
|
}
|
|
31176
31230
|
const indexType = selectData.srfkey;
|
|
31177
31231
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
31178
31232
|
if (!findView) {
|
|
31179
|
-
throw new
|
|
31233
|
+
throw new RuntimeError56(
|
|
31180
31234
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31181
31235
|
);
|
|
31182
31236
|
}
|