@ibiz-template/runtime 0.1.34 → 0.1.36
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 +472 -152
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/constant/index.d.ts +1 -0
- package/out/constant/index.d.ts.map +1 -1
- package/out/constant/index.js +1 -0
- package/out/constant/value-op.d.ts +82 -0
- package/out/constant/value-op.d.ts.map +1 -0
- package/out/constant/value-op.js +83 -0
- package/out/controller/control/form/search-form/search-form.controller.d.ts +2 -2
- package/out/controller/control/form/search-form/search-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.controller.js +11 -3
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts +38 -3
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +110 -3
- package/out/controller/control/search-bar/search-bar-filter.controller.d.ts +65 -0
- package/out/controller/control/search-bar/search-bar-filter.controller.d.ts.map +1 -0
- package/out/controller/control/search-bar/search-bar-filter.controller.js +48 -0
- package/out/controller/control/search-bar/search-bar.controller.d.ts +63 -4
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +143 -9
- package/out/de-logic/de-logic-context.d.ts +25 -5
- package/out/de-logic/de-logic-context.d.ts.map +1 -1
- package/out/de-logic/de-logic-context.js +27 -5
- package/out/de-logic/de-logic-node/data-set-node/data-set-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/data-set-node/data-set-node.js +2 -2
- package/out/de-logic/de-logic-node/de-action-node/de-action-node.js +1 -1
- package/out/de-logic/de-logic-param/de-logic-param.js +1 -1
- package/out/de-logic/utils/handle-src-val.js +2 -2
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +2 -23
- package/out/interface/controller/controller/control/i-search-bar.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-search-bar.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-search-form.controller.d.ts +2 -2
- package/out/interface/controller/controller/control/i-search-form.controller.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-search-bar.state.d.ts +75 -0
- package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +3 -3
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.d.ts +5 -4
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +9 -5
- package/out/service/service/entity/method/method.js +2 -2
- package/out/ui-logic/ui-logic-context.d.ts +1 -11
- package/out/ui-logic/ui-logic-context.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-context.js +7 -11
- package/out/ui-logic/ui-logic-node/data-set-node/data-set-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/data-set-node/data-set-node.js +6 -2
- package/out/ui-logic/ui-logic-node/de-action-node/de-action-node.js +1 -1
- package/out/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.js +1 -1
- package/out/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.js +1 -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 +3 -2
- package/out/ui-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/ui-logic/utils/handle-src-val.js +3 -7
- package/package.json +3 -3
- package/src/constant/index.ts +1 -0
- package/src/constant/value-op.ts +82 -0
- package/src/controller/control/form/search-form/search-form.controller.ts +11 -3
- package/src/controller/control/md-ctrl/md-ctrl.controller.ts +136 -3
- package/src/controller/control/search-bar/search-bar-filter.controller.ts +112 -0
- package/src/controller/control/search-bar/search-bar.controller.ts +165 -9
- package/src/de-logic/de-logic-context.ts +42 -5
- package/src/de-logic/de-logic-node/data-set-node/data-set-node.ts +2 -3
- package/src/de-logic/de-logic-node/de-action-node/de-action-node.ts +1 -1
- package/src/de-logic/de-logic-param/de-logic-param.ts +1 -1
- package/src/de-logic/utils/handle-src-val.ts +2 -2
- package/src/engine/md-view.engine.ts +2 -27
- package/src/interface/controller/controller/control/i-search-bar.controller.ts +10 -1
- package/src/interface/controller/controller/control/i-search-form.controller.ts +2 -2
- package/src/interface/controller/state/control/i-search-bar.state.ts +86 -0
- package/src/interface/service/service/i-app-de.service.ts +3 -3
- package/src/service/service/entity/de.service.ts +15 -6
- package/src/service/service/entity/method/method.ts +2 -2
- package/src/ui-logic/ui-logic-context.ts +7 -11
- package/src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts +6 -3
- package/src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts +1 -1
- package/src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts +2 -0
- package/src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts +3 -4
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +3 -2
- package/src/ui-logic/utils/handle-src-val.ts +3 -7
package/dist/index.esm.js
CHANGED
|
@@ -8389,6 +8389,29 @@ var ViewCallTag = /* @__PURE__ */ ((ViewCallTag2) => {
|
|
|
8389
8389
|
return ViewCallTag2;
|
|
8390
8390
|
})(ViewCallTag || {});
|
|
8391
8391
|
|
|
8392
|
+
// src/constant/value-op.ts
|
|
8393
|
+
var ValueOP = /* @__PURE__ */ ((ValueOP2) => {
|
|
8394
|
+
ValueOP2["EQ"] = "EQ";
|
|
8395
|
+
ValueOP2["NOT_EQ"] = "NOTEQ";
|
|
8396
|
+
ValueOP2["GT"] = "GT";
|
|
8397
|
+
ValueOP2["GT_AND_EQ"] = "GTANDEQ";
|
|
8398
|
+
ValueOP2["LT"] = "LT";
|
|
8399
|
+
ValueOP2["LT_AND_EQ"] = "LTANDEQ";
|
|
8400
|
+
ValueOP2["IS_NULL"] = "ISNULL";
|
|
8401
|
+
ValueOP2["IS_NOT_NULL"] = "ISNOTNULL";
|
|
8402
|
+
ValueOP2["IN"] = "IN";
|
|
8403
|
+
ValueOP2["NOT_IN"] = "NOTIN";
|
|
8404
|
+
ValueOP2["LIKE"] = "LIKE";
|
|
8405
|
+
ValueOP2["LIFT_LIKE"] = "LIFTLIKE";
|
|
8406
|
+
ValueOP2["RIGHT_LIKE"] = "RIGHT_LIKE";
|
|
8407
|
+
ValueOP2["CHILD_OF"] = "CHILDOF";
|
|
8408
|
+
ValueOP2["USER_LIKE"] = "USERLIKE";
|
|
8409
|
+
ValueOP2["BIT_AND"] = "BITAND";
|
|
8410
|
+
ValueOP2["EXISTS"] = "EXISTS";
|
|
8411
|
+
ValueOP2["NOT_EXISTS"] = "NOTEXISTS";
|
|
8412
|
+
return ValueOP2;
|
|
8413
|
+
})(ValueOP || {});
|
|
8414
|
+
|
|
8392
8415
|
// src/constant/studio-event.ts
|
|
8393
8416
|
var StudioViewEvents = class {
|
|
8394
8417
|
};
|
|
@@ -10638,7 +10661,10 @@ var CounterService = class {
|
|
|
10638
10661
|
CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
10639
10662
|
|
|
10640
10663
|
// src/service/service/entity/de.service.ts
|
|
10641
|
-
import {
|
|
10664
|
+
import {
|
|
10665
|
+
ModelError as ModelError13,
|
|
10666
|
+
RuntimeError as RuntimeError12
|
|
10667
|
+
} from "@ibiz-template/core";
|
|
10642
10668
|
|
|
10643
10669
|
// src/service/service/work-flow/work-flow.service.ts
|
|
10644
10670
|
import { RuntimeError as RuntimeError10 } from "@ibiz-template/core";
|
|
@@ -11454,7 +11480,7 @@ var Method = class {
|
|
|
11454
11480
|
case "POST":
|
|
11455
11481
|
res = await this.app.net.post(
|
|
11456
11482
|
this.mergeRequestPath(path2, methodName),
|
|
11457
|
-
notNilEmpty6(data) ? data : params
|
|
11483
|
+
notNilEmpty6(data) ? data : params || {}
|
|
11458
11484
|
);
|
|
11459
11485
|
break;
|
|
11460
11486
|
case "GET":
|
|
@@ -11466,7 +11492,7 @@ var Method = class {
|
|
|
11466
11492
|
case "PUT": {
|
|
11467
11493
|
res = await this.app.net.put(
|
|
11468
11494
|
this.mergeRequestPath(path2, methodName),
|
|
11469
|
-
notNilEmpty6(data) ? data : params
|
|
11495
|
+
notNilEmpty6(data) ? data : params || {}
|
|
11470
11496
|
);
|
|
11471
11497
|
break;
|
|
11472
11498
|
}
|
|
@@ -11553,13 +11579,10 @@ var DELogicContext = class {
|
|
|
11553
11579
|
* @param {Map<string, DELogicParam>} deLogicParams 实体逻辑参数集合
|
|
11554
11580
|
* @param {IParams} context 上下文
|
|
11555
11581
|
* @param {IData} data 数据对象
|
|
11556
|
-
* @param {IParams}
|
|
11582
|
+
* @param {IParams} params 视图参数
|
|
11557
11583
|
*/
|
|
11558
|
-
constructor(deLogicParams, context, data,
|
|
11584
|
+
constructor(deLogicParams, context, data, params) {
|
|
11559
11585
|
this.deLogicParams = deLogicParams;
|
|
11560
|
-
this.context = context;
|
|
11561
|
-
this.data = data;
|
|
11562
|
-
this.viewParams = viewParams;
|
|
11563
11586
|
/**
|
|
11564
11587
|
* 实体逻辑参数
|
|
11565
11588
|
*
|
|
@@ -11594,6 +11617,31 @@ var DELogicContext = class {
|
|
|
11594
11617
|
* @type {string}
|
|
11595
11618
|
*/
|
|
11596
11619
|
this.defaultParamName = "Default";
|
|
11620
|
+
this.parameters = { context, data, params };
|
|
11621
|
+
}
|
|
11622
|
+
/**
|
|
11623
|
+
* 上下文
|
|
11624
|
+
*/
|
|
11625
|
+
get context() {
|
|
11626
|
+
if (Object.prototype.hasOwnProperty.call(this.params, "context")) {
|
|
11627
|
+
return this.params.context;
|
|
11628
|
+
}
|
|
11629
|
+
return this.parameters.context;
|
|
11630
|
+
}
|
|
11631
|
+
/**
|
|
11632
|
+
* 数据
|
|
11633
|
+
*/
|
|
11634
|
+
get data() {
|
|
11635
|
+
return this.parameters.data;
|
|
11636
|
+
}
|
|
11637
|
+
/**
|
|
11638
|
+
* 视图参数
|
|
11639
|
+
*/
|
|
11640
|
+
get viewParam() {
|
|
11641
|
+
if (Object.prototype.hasOwnProperty.call(this.params, "viewParam")) {
|
|
11642
|
+
return this.params.viewParam;
|
|
11643
|
+
}
|
|
11644
|
+
return this.parameters.params;
|
|
11597
11645
|
}
|
|
11598
11646
|
/**
|
|
11599
11647
|
* 重置实体逻辑参数
|
|
@@ -11896,7 +11944,7 @@ var DEActionNode = class extends DELogicNode {
|
|
|
11896
11944
|
dstAppDEActionId,
|
|
11897
11945
|
ctx.context,
|
|
11898
11946
|
requestData,
|
|
11899
|
-
ctx.
|
|
11947
|
+
ctx.viewParam
|
|
11900
11948
|
);
|
|
11901
11949
|
if (res.ok) {
|
|
11902
11950
|
ctx.params[retDELogicParamId] = res.data;
|
|
@@ -11970,13 +12018,13 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
11970
12018
|
return ibiz.util.rawValue.format(srcValue);
|
|
11971
12019
|
case "WEBCONTEXT":
|
|
11972
12020
|
case "VIEWPARAM":
|
|
11973
|
-
value = ctx.
|
|
12021
|
+
value = ctx.parameters.params;
|
|
11974
12022
|
break;
|
|
11975
12023
|
case "APPLICATION":
|
|
11976
12024
|
case "SESSION":
|
|
11977
12025
|
case "APPDATA":
|
|
11978
12026
|
case "DATACONTEXT":
|
|
11979
|
-
value = ctx.context;
|
|
12027
|
+
value = ctx.parameters.context;
|
|
11980
12028
|
break;
|
|
11981
12029
|
case "ENVPARAM":
|
|
11982
12030
|
value = clone5(ibiz.env);
|
|
@@ -12152,14 +12200,13 @@ var DataSetNode = class extends DELogicNode {
|
|
|
12152
12200
|
dstDELogicParamId,
|
|
12153
12201
|
retDELogicParamId
|
|
12154
12202
|
} = this.model;
|
|
12155
|
-
const
|
|
12203
|
+
const queryParams = ctx.params[dstDELogicParamId];
|
|
12156
12204
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
12157
12205
|
const res = await app.deService.exec(
|
|
12158
12206
|
dstAppDataEntityId,
|
|
12159
12207
|
dstAppDEDataSetId,
|
|
12160
12208
|
ctx.context,
|
|
12161
|
-
|
|
12162
|
-
ctx.viewParams
|
|
12209
|
+
queryParams
|
|
12163
12210
|
);
|
|
12164
12211
|
if (res.ok) {
|
|
12165
12212
|
ctx.params[retDELogicParamId] = res.data;
|
|
@@ -12324,7 +12371,7 @@ var DELogicParam = class {
|
|
|
12324
12371
|
} else if (m.lastReturnParam) {
|
|
12325
12372
|
ctx.initLastReturnParam(tag);
|
|
12326
12373
|
} else if (m.appContextParam) {
|
|
12327
|
-
ctx.params[tag] = ctx.context;
|
|
12374
|
+
ctx.params[tag] = ctx.parameters.context;
|
|
12328
12375
|
} else if (m.simpleListParam) {
|
|
12329
12376
|
ctx.params[tag] = [];
|
|
12330
12377
|
} else if (m.simpleParam) {
|
|
@@ -13196,10 +13243,11 @@ var DEService = class {
|
|
|
13196
13243
|
* 实体级别 AI 聊天会话
|
|
13197
13244
|
*
|
|
13198
13245
|
* @author chitanda
|
|
13199
|
-
* @date 2023-10-
|
|
13246
|
+
* @date 2023-10-16 16:10:16
|
|
13247
|
+
* @param {(data: IPortalAsyncAction) => void} onmessage
|
|
13200
13248
|
* @param {IParams} context
|
|
13201
13249
|
* @param {IParams} [params={}]
|
|
13202
|
-
* @param {
|
|
13250
|
+
* @param {IData} [data={}]
|
|
13203
13251
|
* @return {*} {Promise<void>}
|
|
13204
13252
|
*/
|
|
13205
13253
|
aiChatSse(onmessage, context, params = {}, data = {}) {
|
|
@@ -13215,7 +13263,10 @@ var DEService = class {
|
|
|
13215
13263
|
},
|
|
13216
13264
|
body: JSON.stringify(data),
|
|
13217
13265
|
onmessage: (e) => {
|
|
13218
|
-
|
|
13266
|
+
if (e.data) {
|
|
13267
|
+
const json = JSON.parse(e.data);
|
|
13268
|
+
onmessage(json);
|
|
13269
|
+
}
|
|
13219
13270
|
},
|
|
13220
13271
|
onclose: () => {
|
|
13221
13272
|
resolve();
|
|
@@ -18619,30 +18670,20 @@ var CaptionBarController = class extends ControlController {
|
|
|
18619
18670
|
import { recursiveIterate, RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
18620
18671
|
|
|
18621
18672
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
18622
|
-
import { RuntimeModelError as
|
|
18673
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
18623
18674
|
import { isArray as isArray4 } from "qx-util";
|
|
18624
18675
|
|
|
18625
18676
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
18626
|
-
import { RuntimeModelError as
|
|
18677
|
+
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
18627
18678
|
|
|
18628
18679
|
// src/ui-logic/index.ts
|
|
18629
18680
|
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
18630
18681
|
|
|
18631
18682
|
// src/ui-logic/ui-logic.ts
|
|
18632
|
-
import { ModelError as ModelError24, RuntimeModelError as
|
|
18683
|
+
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
18633
18684
|
|
|
18634
18685
|
// src/ui-logic/ui-logic-context.ts
|
|
18635
18686
|
var UILogicContext = class {
|
|
18636
|
-
/**
|
|
18637
|
-
* Creates an instance of DELogicContext.
|
|
18638
|
-
* @author lxm
|
|
18639
|
-
* @date 2023-03-24 09:15:14
|
|
18640
|
-
* @param {Map<string, DELogicParam>} deLogicParams 实体逻辑参数集合
|
|
18641
|
-
* @param {IParams} context 上下文
|
|
18642
|
-
* @param {IData} data 数据对象
|
|
18643
|
-
* @param {IParams} viewParams 视图参数
|
|
18644
|
-
* @param {IParams} [opt] 额外参数
|
|
18645
|
-
*/
|
|
18646
18687
|
/**
|
|
18647
18688
|
* Creates an instance of UILogicContext.
|
|
18648
18689
|
* @author lxm
|
|
@@ -18693,6 +18734,9 @@ var UILogicContext = class {
|
|
|
18693
18734
|
* 上下文
|
|
18694
18735
|
*/
|
|
18695
18736
|
get context() {
|
|
18737
|
+
if (Object.prototype.hasOwnProperty.call(this.params, "context")) {
|
|
18738
|
+
return this.params.context;
|
|
18739
|
+
}
|
|
18696
18740
|
return this.parameters.context;
|
|
18697
18741
|
}
|
|
18698
18742
|
/**
|
|
@@ -18704,7 +18748,10 @@ var UILogicContext = class {
|
|
|
18704
18748
|
/**
|
|
18705
18749
|
* 视图参数
|
|
18706
18750
|
*/
|
|
18707
|
-
get
|
|
18751
|
+
get viewParam() {
|
|
18752
|
+
if (Object.prototype.hasOwnProperty.call(this.params, "viewParam")) {
|
|
18753
|
+
return this.params.viewParam;
|
|
18754
|
+
}
|
|
18708
18755
|
return this.parameters.params;
|
|
18709
18756
|
}
|
|
18710
18757
|
/**
|
|
@@ -18784,14 +18831,11 @@ import { clone as clone14 } from "ramda";
|
|
|
18784
18831
|
function handleSrcVal2(ctx, srcValParams) {
|
|
18785
18832
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
18786
18833
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
18787
|
-
|
|
18834
|
+
const srcField = srcFieldName;
|
|
18788
18835
|
let value;
|
|
18789
18836
|
switch (srcValueType) {
|
|
18790
18837
|
case "SRCDLPARAM":
|
|
18791
18838
|
value = ctx.params[srcDEUILogicParamId];
|
|
18792
|
-
if (ctx.isEntityParam(srcDEUILogicParamId)) {
|
|
18793
|
-
srcField = srcField == null ? void 0 : srcField.toLowerCase();
|
|
18794
|
-
}
|
|
18795
18839
|
break;
|
|
18796
18840
|
case "NULLVALUE":
|
|
18797
18841
|
return null;
|
|
@@ -18801,13 +18845,13 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18801
18845
|
return ibiz.util.rawValue.format(srcValue);
|
|
18802
18846
|
case "WEBCONTEXT":
|
|
18803
18847
|
case "VIEWPARAM":
|
|
18804
|
-
value = ctx.
|
|
18848
|
+
value = ctx.parameters.params;
|
|
18805
18849
|
break;
|
|
18806
18850
|
case "APPLICATION":
|
|
18807
18851
|
case "SESSION":
|
|
18808
18852
|
case "APPDATA":
|
|
18809
18853
|
case "DATACONTEXT":
|
|
18810
|
-
value = ctx.context;
|
|
18854
|
+
value = ctx.parameters.context;
|
|
18811
18855
|
break;
|
|
18812
18856
|
case "ENVPARAM":
|
|
18813
18857
|
value = clone14(ibiz.env);
|
|
@@ -19085,7 +19129,7 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
19085
19129
|
dstAppDEActionId,
|
|
19086
19130
|
ctx.context,
|
|
19087
19131
|
requestData,
|
|
19088
|
-
ctx.
|
|
19132
|
+
ctx.viewParam
|
|
19089
19133
|
);
|
|
19090
19134
|
if (res.ok) {
|
|
19091
19135
|
ctx.params[retDEUILogicParamId] = res.data;
|
|
@@ -19113,6 +19157,8 @@ var DEUIActionNode = class extends UILogicNode {
|
|
|
19113
19157
|
}
|
|
19114
19158
|
await UIActionUtil.execAndResolved(dstAppDEUIActionId, {
|
|
19115
19159
|
...parameters,
|
|
19160
|
+
context: ctx.context,
|
|
19161
|
+
params: ctx.viewParam,
|
|
19116
19162
|
data: actionData
|
|
19117
19163
|
});
|
|
19118
19164
|
}
|
|
@@ -19538,6 +19584,7 @@ var RenewParamNode2 = class extends UILogicNode {
|
|
|
19538
19584
|
};
|
|
19539
19585
|
|
|
19540
19586
|
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
19587
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
19541
19588
|
var DataSetNode2 = class extends UILogicNode {
|
|
19542
19589
|
async exec(ctx) {
|
|
19543
19590
|
const {
|
|
@@ -19546,14 +19593,16 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
19546
19593
|
dstDEUILogicParamId,
|
|
19547
19594
|
retDEUILogicParamId
|
|
19548
19595
|
} = this.model;
|
|
19549
|
-
|
|
19596
|
+
if (!dstDEUILogicParamId) {
|
|
19597
|
+
throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
|
|
19598
|
+
}
|
|
19599
|
+
const queryParams = ctx.params[dstDEUILogicParamId];
|
|
19550
19600
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
19551
19601
|
const res = await app.deService.exec(
|
|
19552
19602
|
dstAppDataEntityId,
|
|
19553
19603
|
dstAppDEDataSetId,
|
|
19554
19604
|
ctx.context,
|
|
19555
|
-
|
|
19556
|
-
ctx.viewParams
|
|
19605
|
+
queryParams
|
|
19557
19606
|
);
|
|
19558
19607
|
if (res.ok) {
|
|
19559
19608
|
ctx.params[retDEUILogicParamId] = res.data;
|
|
@@ -19571,19 +19620,19 @@ var ThrowExceptionNode2 = class extends UILogicNode {
|
|
|
19571
19620
|
};
|
|
19572
19621
|
|
|
19573
19622
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
19574
|
-
import { RuntimeError as RuntimeError34, RuntimeModelError as
|
|
19623
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
19575
19624
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
19576
19625
|
async exec(ctx) {
|
|
19577
19626
|
ctx.isEndNode = true;
|
|
19578
19627
|
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
19579
19628
|
if (!fireCtrlId) {
|
|
19580
|
-
throw new
|
|
19629
|
+
throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
19581
19630
|
}
|
|
19582
19631
|
if (!eventName) {
|
|
19583
|
-
throw new
|
|
19632
|
+
throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
19584
19633
|
}
|
|
19585
19634
|
if (!eventParamId) {
|
|
19586
|
-
throw new
|
|
19635
|
+
throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
19587
19636
|
}
|
|
19588
19637
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
19589
19638
|
if (!invokeCtrl) {
|
|
@@ -19598,7 +19647,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
19598
19647
|
};
|
|
19599
19648
|
|
|
19600
19649
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
19601
|
-
import { RuntimeError as RuntimeError35, RuntimeModelError as
|
|
19650
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
19602
19651
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
19603
19652
|
async exec(ctx) {
|
|
19604
19653
|
const {
|
|
@@ -19608,13 +19657,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
19608
19657
|
retDEUILogicParamId
|
|
19609
19658
|
} = this.model;
|
|
19610
19659
|
if (!dstAppDataEntityId) {
|
|
19611
|
-
throw new
|
|
19660
|
+
throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
19612
19661
|
}
|
|
19613
19662
|
if (!dstAppDELogicId) {
|
|
19614
|
-
throw new
|
|
19663
|
+
throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
19615
19664
|
}
|
|
19616
19665
|
if (!dstDEUILogicParamId) {
|
|
19617
|
-
throw new
|
|
19666
|
+
throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
19618
19667
|
}
|
|
19619
19668
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
19620
19669
|
if (!dstParam) {
|
|
@@ -19623,9 +19672,9 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
19623
19672
|
const result = await execDELogicById(
|
|
19624
19673
|
dstAppDELogicId,
|
|
19625
19674
|
dstAppDataEntityId,
|
|
19626
|
-
|
|
19627
|
-
dstParam
|
|
19628
|
-
|
|
19675
|
+
ctx.context,
|
|
19676
|
+
dstParam,
|
|
19677
|
+
ctx.params
|
|
19629
19678
|
);
|
|
19630
19679
|
if (retDEUILogicParamId) {
|
|
19631
19680
|
ctx.params[retDEUILogicParamId] = result;
|
|
@@ -19656,7 +19705,8 @@ var UILogicParam = class {
|
|
|
19656
19705
|
calc(ctx) {
|
|
19657
19706
|
const tag = this.model.id;
|
|
19658
19707
|
const m = this.model;
|
|
19659
|
-
const {
|
|
19708
|
+
const { parameters } = ctx;
|
|
19709
|
+
const { context, params, data } = parameters;
|
|
19660
19710
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
19661
19711
|
if (m.codeName === "layoutPanel") {
|
|
19662
19712
|
ctx.params[tag] = parameters.view.layoutPanel.panelItems;
|
|
@@ -19700,7 +19750,7 @@ var UILogicParam = class {
|
|
|
19700
19750
|
} else if (m.simpleParam) {
|
|
19701
19751
|
ctx.params[tag] = {};
|
|
19702
19752
|
} else if (m.viewNavDataParam) {
|
|
19703
|
-
ctx.params[tag] =
|
|
19753
|
+
ctx.params[tag] = params;
|
|
19704
19754
|
} else if (m.viewSessionParam) {
|
|
19705
19755
|
throw new ModelError23(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5F53\u524D\u89C6\u56FE\u4F1A\u8BDD");
|
|
19706
19756
|
}
|
|
@@ -19754,7 +19804,7 @@ var UILogic = class {
|
|
|
19754
19804
|
this.params = /* @__PURE__ */ new Map();
|
|
19755
19805
|
var _a;
|
|
19756
19806
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
19757
|
-
throw new
|
|
19807
|
+
throw new RuntimeModelError44(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
19758
19808
|
}
|
|
19759
19809
|
model.deuilogicNodes.forEach((node) => {
|
|
19760
19810
|
const { logicNodeType } = node;
|
|
@@ -19869,7 +19919,7 @@ var UILogic = class {
|
|
|
19869
19919
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
19870
19920
|
await this.deepExec(start, ctx);
|
|
19871
19921
|
} else {
|
|
19872
|
-
throw new
|
|
19922
|
+
throw new RuntimeModelError44(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
19873
19923
|
}
|
|
19874
19924
|
if (ctx.isEndNode) {
|
|
19875
19925
|
return ctx.result;
|
|
@@ -20005,7 +20055,7 @@ var UIActionProviderBase = class {
|
|
|
20005
20055
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
20006
20056
|
if (uilogicAttachMode === "REPLACE") {
|
|
20007
20057
|
if (!appDEUILogicId) {
|
|
20008
|
-
throw new
|
|
20058
|
+
throw new RuntimeModelError45(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
20009
20059
|
}
|
|
20010
20060
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
20011
20061
|
return result;
|
|
@@ -20032,7 +20082,7 @@ var UIActionProviderBase = class {
|
|
|
20032
20082
|
}
|
|
20033
20083
|
if (action.uilogicAttachMode === "AFTER") {
|
|
20034
20084
|
if (!appDEUILogicId) {
|
|
20035
|
-
throw new
|
|
20085
|
+
throw new RuntimeModelError45(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
20036
20086
|
}
|
|
20037
20087
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
20038
20088
|
}
|
|
@@ -20215,7 +20265,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
20215
20265
|
const entityName = action.appDataEntityId;
|
|
20216
20266
|
const methodName = action.appDEMethodId;
|
|
20217
20267
|
if (!entityName || !methodName) {
|
|
20218
|
-
throw new
|
|
20268
|
+
throw new RuntimeModelError46(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
20219
20269
|
}
|
|
20220
20270
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
20221
20271
|
action,
|
|
@@ -20330,7 +20380,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
20330
20380
|
};
|
|
20331
20381
|
|
|
20332
20382
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
20333
|
-
import { StringUtil, RuntimeModelError as
|
|
20383
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError47, ModelError as ModelError25 } from "@ibiz-template/core";
|
|
20334
20384
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
20335
20385
|
async execAction(action, args) {
|
|
20336
20386
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -20345,7 +20395,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20345
20395
|
case "WIZARD": {
|
|
20346
20396
|
const frontPSAppView = action.frontAppViewId;
|
|
20347
20397
|
if (!frontPSAppView) {
|
|
20348
|
-
throw new
|
|
20398
|
+
throw new RuntimeModelError47(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
20349
20399
|
}
|
|
20350
20400
|
const { resultContext, resultParams } = await this.handleParams(
|
|
20351
20401
|
action,
|
|
@@ -20401,7 +20451,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20401
20451
|
);
|
|
20402
20452
|
return result || {};
|
|
20403
20453
|
}
|
|
20404
|
-
throw new
|
|
20454
|
+
throw new RuntimeModelError47(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
20405
20455
|
}
|
|
20406
20456
|
};
|
|
20407
20457
|
|
|
@@ -21001,7 +21051,7 @@ var MenuPortletController = class extends PortletPartController {
|
|
|
21001
21051
|
};
|
|
21002
21052
|
|
|
21003
21053
|
// src/controller/control/data-view/data-view.controller.ts
|
|
21004
|
-
import { RuntimeModelError as
|
|
21054
|
+
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
21005
21055
|
import { isNil as isNil18 } from "ramda";
|
|
21006
21056
|
|
|
21007
21057
|
// src/controller/control/data-view/data-view.service.ts
|
|
@@ -21214,7 +21264,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21214
21264
|
const optItemModel = this.getOptItemModel();
|
|
21215
21265
|
if (optItemModel) {
|
|
21216
21266
|
if (!optItemModel.deuiactionGroup) {
|
|
21217
|
-
throw new
|
|
21267
|
+
throw new RuntimeModelError48(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
21218
21268
|
}
|
|
21219
21269
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
21220
21270
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -21263,7 +21313,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21263
21313
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
21264
21314
|
if (enableGroup && groupMode) {
|
|
21265
21315
|
if (!groupAppDEFieldId) {
|
|
21266
|
-
throw new
|
|
21316
|
+
throw new RuntimeModelError48(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
21267
21317
|
}
|
|
21268
21318
|
if (groupMode === "AUTO") {
|
|
21269
21319
|
this.handleAutoGroup();
|
|
@@ -21330,7 +21380,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21330
21380
|
async handleCodeListGroup() {
|
|
21331
21381
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
21332
21382
|
if (!groupCodeListId) {
|
|
21333
|
-
throw new
|
|
21383
|
+
throw new RuntimeModelError48(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
21334
21384
|
}
|
|
21335
21385
|
const { items } = this.state;
|
|
21336
21386
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -21417,10 +21467,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21417
21467
|
};
|
|
21418
21468
|
|
|
21419
21469
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
21420
|
-
import { RuntimeModelError as
|
|
21470
|
+
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
21421
21471
|
|
|
21422
21472
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
21423
|
-
import { RuntimeError as RuntimeError39, RuntimeModelError as
|
|
21473
|
+
import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
21424
21474
|
var ExpBarControlController = class extends ControlController {
|
|
21425
21475
|
constructor() {
|
|
21426
21476
|
super(...arguments);
|
|
@@ -21475,7 +21525,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21475
21525
|
get xDataController() {
|
|
21476
21526
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21477
21527
|
if (!controller) {
|
|
21478
|
-
throw new
|
|
21528
|
+
throw new RuntimeModelError49(
|
|
21479
21529
|
this.model,
|
|
21480
21530
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21481
21531
|
);
|
|
@@ -21822,7 +21872,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21822
21872
|
get xDataController() {
|
|
21823
21873
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21824
21874
|
if (!controller) {
|
|
21825
|
-
throw new
|
|
21875
|
+
throw new RuntimeModelError50(
|
|
21826
21876
|
this.model,
|
|
21827
21877
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21828
21878
|
);
|
|
@@ -21877,7 +21927,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21877
21927
|
};
|
|
21878
21928
|
|
|
21879
21929
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
21880
|
-
import { RuntimeError as RuntimeError40, RuntimeModelError as
|
|
21930
|
+
import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
21881
21931
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
21882
21932
|
constructor() {
|
|
21883
21933
|
super(...arguments);
|
|
@@ -21900,7 +21950,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21900
21950
|
get xDataController() {
|
|
21901
21951
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21902
21952
|
if (!controller) {
|
|
21903
|
-
throw new
|
|
21953
|
+
throw new RuntimeModelError51(
|
|
21904
21954
|
this.model,
|
|
21905
21955
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21906
21956
|
);
|
|
@@ -22313,14 +22363,21 @@ var SearchFormController = class extends FormController {
|
|
|
22313
22363
|
return this.data;
|
|
22314
22364
|
}
|
|
22315
22365
|
/**
|
|
22316
|
-
*
|
|
22366
|
+
* 获取搜索表单的过滤参数
|
|
22317
22367
|
*
|
|
22318
22368
|
* @author lxm
|
|
22319
22369
|
* @date 2022-09-22 17:09:21
|
|
22320
22370
|
* @returns {*} {IParams}
|
|
22321
22371
|
*/
|
|
22322
|
-
|
|
22323
|
-
|
|
22372
|
+
getFilterParams() {
|
|
22373
|
+
const filterParams = {};
|
|
22374
|
+
Object.keys(this.state.data).forEach((key) => {
|
|
22375
|
+
const value = this.state.data[key];
|
|
22376
|
+
if (value !== null && value !== void 0 && value !== "") {
|
|
22377
|
+
filterParams[key] = value;
|
|
22378
|
+
}
|
|
22379
|
+
});
|
|
22380
|
+
return filterParams;
|
|
22324
22381
|
}
|
|
22325
22382
|
/**
|
|
22326
22383
|
* 执行搜索行为
|
|
@@ -23508,7 +23565,7 @@ import { clone as clone17 } from "ramda";
|
|
|
23508
23565
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
23509
23566
|
import {
|
|
23510
23567
|
recursiveIterate as recursiveIterate3,
|
|
23511
|
-
RuntimeModelError as
|
|
23568
|
+
RuntimeModelError as RuntimeModelError52
|
|
23512
23569
|
} from "@ibiz-template/core";
|
|
23513
23570
|
var EditFormService = class extends ControlService {
|
|
23514
23571
|
/**
|
|
@@ -23626,7 +23683,7 @@ var EditFormService = class extends ControlService {
|
|
|
23626
23683
|
const wizardForm = this.model;
|
|
23627
23684
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
23628
23685
|
if (!methodName) {
|
|
23629
|
-
throw new
|
|
23686
|
+
throw new RuntimeModelError52(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
23630
23687
|
}
|
|
23631
23688
|
let res = await this.exec(
|
|
23632
23689
|
methodName,
|
|
@@ -25168,7 +25225,7 @@ import {
|
|
|
25168
25225
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
25169
25226
|
recursiveIterate as recursiveIterate4,
|
|
25170
25227
|
RuntimeError as RuntimeError44,
|
|
25171
|
-
RuntimeModelError as
|
|
25228
|
+
RuntimeModelError as RuntimeModelError53
|
|
25172
25229
|
} from "@ibiz-template/core";
|
|
25173
25230
|
import { clone as clone18 } from "ramda";
|
|
25174
25231
|
|
|
@@ -25364,11 +25421,11 @@ var GridController = class extends MDControlController {
|
|
|
25364
25421
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
25365
25422
|
);
|
|
25366
25423
|
if (!this.groupFieldColumn) {
|
|
25367
|
-
throw new
|
|
25424
|
+
throw new RuntimeModelError53(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
25368
25425
|
}
|
|
25369
25426
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
25370
25427
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
25371
|
-
throw new
|
|
25428
|
+
throw new RuntimeModelError53(
|
|
25372
25429
|
this.groupFieldColumn.model,
|
|
25373
25430
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
25374
25431
|
);
|
|
@@ -25378,7 +25435,7 @@ var GridController = class extends MDControlController {
|
|
|
25378
25435
|
);
|
|
25379
25436
|
if (index !== -1 && index !== 0) {
|
|
25380
25437
|
if (this.isMultistageHeader) {
|
|
25381
|
-
throw new
|
|
25438
|
+
throw new RuntimeModelError53(
|
|
25382
25439
|
this.model,
|
|
25383
25440
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
25384
25441
|
);
|
|
@@ -25388,10 +25445,10 @@ var GridController = class extends MDControlController {
|
|
|
25388
25445
|
}
|
|
25389
25446
|
if (groupMode === "CODELIST") {
|
|
25390
25447
|
if (!groupCodeListId) {
|
|
25391
|
-
throw new
|
|
25448
|
+
throw new RuntimeModelError53(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
25392
25449
|
}
|
|
25393
25450
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
25394
|
-
throw new
|
|
25451
|
+
throw new RuntimeModelError53(
|
|
25395
25452
|
this.model,
|
|
25396
25453
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
25397
25454
|
);
|
|
@@ -25473,7 +25530,7 @@ var GridController = class extends MDControlController {
|
|
|
25473
25530
|
return;
|
|
25474
25531
|
}
|
|
25475
25532
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
25476
|
-
throw new
|
|
25533
|
+
throw new RuntimeModelError53(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
25477
25534
|
}
|
|
25478
25535
|
const params = await this.getFetchParams();
|
|
25479
25536
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -26296,7 +26353,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26296
26353
|
};
|
|
26297
26354
|
|
|
26298
26355
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
26299
|
-
import { RuntimeModelError as
|
|
26356
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
26300
26357
|
var GridUAColumnController = class extends GridColumnController {
|
|
26301
26358
|
/**
|
|
26302
26359
|
* 给rowController初始化操作列的状态
|
|
@@ -26309,7 +26366,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
26309
26366
|
var _a;
|
|
26310
26367
|
const { deuiactionGroup } = this.model;
|
|
26311
26368
|
if (!deuiactionGroup) {
|
|
26312
|
-
throw new
|
|
26369
|
+
throw new RuntimeModelError54(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
26313
26370
|
}
|
|
26314
26371
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
26315
26372
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -27531,45 +27588,116 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
27531
27588
|
}
|
|
27532
27589
|
};
|
|
27533
27590
|
|
|
27591
|
+
// src/controller/control/search-bar/search-bar.controller.ts
|
|
27592
|
+
import { recursiveIterate as recursiveIterate6 } from "@ibiz-template/core";
|
|
27593
|
+
import { isNil as isNil20 } from "ramda";
|
|
27594
|
+
|
|
27595
|
+
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
27596
|
+
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
27597
|
+
var SearchBarFilterController = class {
|
|
27598
|
+
constructor(model, searchBar) {
|
|
27599
|
+
this.model = model;
|
|
27600
|
+
this.searchBar = searchBar;
|
|
27601
|
+
var _a;
|
|
27602
|
+
let field;
|
|
27603
|
+
if (model.appDEFieldId) {
|
|
27604
|
+
field = findFieldById(searchBar.appDataEntity, model.appDEFieldId);
|
|
27605
|
+
}
|
|
27606
|
+
this.fieldName = field ? field.codeName.toLowerCase() : model.id;
|
|
27607
|
+
this.label = model.caption || (field == null ? void 0 : field.logicName) || model.id;
|
|
27608
|
+
this.valueOP = (_a = model.defsearchMode) == null ? void 0 : _a.valueOP;
|
|
27609
|
+
}
|
|
27610
|
+
get context() {
|
|
27611
|
+
return this.searchBar.context;
|
|
27612
|
+
}
|
|
27613
|
+
get params() {
|
|
27614
|
+
return this.searchBar.params;
|
|
27615
|
+
}
|
|
27616
|
+
/**
|
|
27617
|
+
* 初始化
|
|
27618
|
+
* @author lxm
|
|
27619
|
+
* @date 2023-10-12 05:47:19
|
|
27620
|
+
* @return {*} {Promise<void>}
|
|
27621
|
+
*/
|
|
27622
|
+
async init() {
|
|
27623
|
+
if (!this.model.editor) {
|
|
27624
|
+
throw new RuntimeModelError55(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
|
|
27625
|
+
}
|
|
27626
|
+
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
27627
|
+
if (this.editorProvider) {
|
|
27628
|
+
this.editor = await this.editorProvider.createController(
|
|
27629
|
+
this.model.editor,
|
|
27630
|
+
this
|
|
27631
|
+
);
|
|
27632
|
+
}
|
|
27633
|
+
}
|
|
27634
|
+
};
|
|
27635
|
+
|
|
27534
27636
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
27535
27637
|
var SearchBarController = class extends ControlController {
|
|
27536
27638
|
constructor() {
|
|
27537
27639
|
super(...arguments);
|
|
27538
27640
|
/**
|
|
27539
|
-
*
|
|
27641
|
+
* 快速搜索占位符
|
|
27540
27642
|
* @return {*}
|
|
27541
27643
|
* @author: zhujiamin
|
|
27542
27644
|
* @Date: 2023-08-11 14:13:10
|
|
27543
27645
|
*/
|
|
27544
27646
|
this.placeHolder = "";
|
|
27647
|
+
/**
|
|
27648
|
+
* 过滤项控制器集合
|
|
27649
|
+
* @author lxm
|
|
27650
|
+
* @date 2023-10-13 03:31:26
|
|
27651
|
+
* @type {SearchBarFilterController[]}
|
|
27652
|
+
*/
|
|
27653
|
+
this.filterControllers = [];
|
|
27545
27654
|
}
|
|
27546
27655
|
initState() {
|
|
27547
27656
|
super.initState();
|
|
27548
27657
|
this.state.query = "";
|
|
27549
27658
|
this.state.selectedGroupItem = null;
|
|
27550
27659
|
this.state.visible = !!(this.model.enableQuickSearch || this.model.enableGroup || this.model.enableFilter);
|
|
27660
|
+
if (this.model.enableFilter) {
|
|
27661
|
+
this.resetFilter();
|
|
27662
|
+
}
|
|
27551
27663
|
}
|
|
27552
27664
|
async onCreated() {
|
|
27553
|
-
var _a;
|
|
27554
27665
|
await super.onCreated();
|
|
27555
27666
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
27556
27667
|
this.model.appDataEntityId,
|
|
27557
27668
|
this.context.srfappid
|
|
27558
27669
|
);
|
|
27559
27670
|
if (appDataEntity) {
|
|
27560
|
-
|
|
27561
|
-
|
|
27562
|
-
|
|
27671
|
+
this.appDataEntity = appDataEntity;
|
|
27672
|
+
this.calcQuickSearchPlaceholder();
|
|
27673
|
+
}
|
|
27674
|
+
await this.initSearchBarFilters();
|
|
27675
|
+
}
|
|
27676
|
+
/**
|
|
27677
|
+
* 计算快速搜索的占位
|
|
27678
|
+
* @author lxm
|
|
27679
|
+
* @date 2023-10-16 03:49:47
|
|
27680
|
+
* @protected
|
|
27681
|
+
* @return {*} {void}
|
|
27682
|
+
*/
|
|
27683
|
+
calcQuickSearchPlaceholder() {
|
|
27684
|
+
if (!this.appDataEntity) {
|
|
27685
|
+
return;
|
|
27686
|
+
}
|
|
27687
|
+
const searchFields = this.appDataEntity.appDEFields.filter((field) => {
|
|
27688
|
+
return field.enableQuickSearch;
|
|
27689
|
+
});
|
|
27690
|
+
if (searchFields.length) {
|
|
27563
27691
|
const placeHolders = [];
|
|
27564
|
-
searchFields
|
|
27565
|
-
if (
|
|
27692
|
+
searchFields.forEach((searchField) => {
|
|
27693
|
+
if (searchField.lnlanguageRes && searchField.lnlanguageRes.lanResTag) {
|
|
27566
27694
|
placeHolders.push(
|
|
27567
27695
|
ibiz.i18n.t(
|
|
27568
27696
|
searchField.lnlanguageRes.lanResTag,
|
|
27569
27697
|
searchField.logicName
|
|
27570
27698
|
)
|
|
27571
27699
|
);
|
|
27572
|
-
} else if (searchField
|
|
27700
|
+
} else if (searchField.logicName) {
|
|
27573
27701
|
placeHolders.push(searchField.logicName);
|
|
27574
27702
|
}
|
|
27575
27703
|
});
|
|
@@ -27594,9 +27722,114 @@ var SearchBarController = class extends ControlController {
|
|
|
27594
27722
|
* @author: zhujiamin
|
|
27595
27723
|
* @Date: 2023-06-01 18:08:18
|
|
27596
27724
|
*/
|
|
27597
|
-
|
|
27725
|
+
onSearch() {
|
|
27598
27726
|
this.evt.emit("onSearch", void 0);
|
|
27599
27727
|
}
|
|
27728
|
+
/**
|
|
27729
|
+
* 获取搜索栏的过滤参数(包括快速搜索,快速分组和过滤器的参数)
|
|
27730
|
+
* @author lxm
|
|
27731
|
+
* @date 2023-10-16 03:54:07
|
|
27732
|
+
* @return {*} {IParams}
|
|
27733
|
+
*/
|
|
27734
|
+
getFilterParams() {
|
|
27735
|
+
var _a;
|
|
27736
|
+
const params = {};
|
|
27737
|
+
if (this.state.query) {
|
|
27738
|
+
params.query = this.state.query;
|
|
27739
|
+
}
|
|
27740
|
+
if ((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) {
|
|
27741
|
+
const func = new Function(
|
|
27742
|
+
"return (".concat(this.state.selectedGroupItem.data, ");")
|
|
27743
|
+
);
|
|
27744
|
+
const addParams = func();
|
|
27745
|
+
Object.assign(params, addParams);
|
|
27746
|
+
}
|
|
27747
|
+
const filters = this.calcFilters();
|
|
27748
|
+
if (filters) {
|
|
27749
|
+
params.filters = filters;
|
|
27750
|
+
}
|
|
27751
|
+
return params;
|
|
27752
|
+
}
|
|
27753
|
+
/**
|
|
27754
|
+
* 重置过滤器
|
|
27755
|
+
* @author lxm
|
|
27756
|
+
* @date 2023-10-16 03:52:44
|
|
27757
|
+
*/
|
|
27758
|
+
resetFilter() {
|
|
27759
|
+
this.state.filterNodes = [
|
|
27760
|
+
{
|
|
27761
|
+
leaf: false,
|
|
27762
|
+
logicType: "AND",
|
|
27763
|
+
children: [{ leaf: true, field: null, valueOP: null, value: null }]
|
|
27764
|
+
}
|
|
27765
|
+
];
|
|
27766
|
+
}
|
|
27767
|
+
/**
|
|
27768
|
+
* 初始化过滤项控制器
|
|
27769
|
+
* @author lxm
|
|
27770
|
+
* @date 2023-10-13 03:33:17
|
|
27771
|
+
* @protected
|
|
27772
|
+
* @return {*} {Promise<void>}
|
|
27773
|
+
*/
|
|
27774
|
+
async initSearchBarFilters() {
|
|
27775
|
+
var _a;
|
|
27776
|
+
if ((_a = this.model.searchBarFilters) == null ? void 0 : _a.length) {
|
|
27777
|
+
this.model.searchBarFilters.forEach((item) => {
|
|
27778
|
+
const filterController = new SearchBarFilterController(item, this);
|
|
27779
|
+
this.filterControllers.push(filterController);
|
|
27780
|
+
});
|
|
27781
|
+
await Promise.all(
|
|
27782
|
+
this.filterControllers.map((controller) => controller.init())
|
|
27783
|
+
);
|
|
27784
|
+
}
|
|
27785
|
+
}
|
|
27786
|
+
/**
|
|
27787
|
+
* 计算过滤项参数
|
|
27788
|
+
* @author lxm
|
|
27789
|
+
* @date 2023-10-13 05:53:35
|
|
27790
|
+
* @return {*} {IData}
|
|
27791
|
+
*/
|
|
27792
|
+
calcFilters() {
|
|
27793
|
+
if (!this.model.enableFilter) {
|
|
27794
|
+
return;
|
|
27795
|
+
}
|
|
27796
|
+
let hasFilter = false;
|
|
27797
|
+
let hasError = false;
|
|
27798
|
+
recursiveIterate6(this.state.filterNodes[0], (node) => {
|
|
27799
|
+
if (node.leaf) {
|
|
27800
|
+
if (node.field && node.valueOP && !isNil20(node.value)) {
|
|
27801
|
+
hasFilter = true;
|
|
27802
|
+
} else {
|
|
27803
|
+
hasError = true;
|
|
27804
|
+
}
|
|
27805
|
+
}
|
|
27806
|
+
});
|
|
27807
|
+
if (hasFilter && !hasError) {
|
|
27808
|
+
const filter = this.formatFilters(this.state.filterNodes[0]);
|
|
27809
|
+
return filter;
|
|
27810
|
+
}
|
|
27811
|
+
}
|
|
27812
|
+
/**
|
|
27813
|
+
* 格式化过滤项
|
|
27814
|
+
* @author lxm
|
|
27815
|
+
* @date 2023-10-16 03:45:41
|
|
27816
|
+
* @param {IFilterNode} node
|
|
27817
|
+
* @return {*} {IData}
|
|
27818
|
+
*/
|
|
27819
|
+
formatFilters(node) {
|
|
27820
|
+
if (!node.leaf) {
|
|
27821
|
+
return {
|
|
27822
|
+
["$".concat(node.logicType.toLowerCase())]: node.children.map(
|
|
27823
|
+
(item) => this.formatFilters(item)
|
|
27824
|
+
)
|
|
27825
|
+
};
|
|
27826
|
+
}
|
|
27827
|
+
return {
|
|
27828
|
+
["".concat(node.field)]: {
|
|
27829
|
+
["$".concat(node.valueOP.toLowerCase())]: node.value
|
|
27830
|
+
}
|
|
27831
|
+
};
|
|
27832
|
+
}
|
|
27600
27833
|
};
|
|
27601
27834
|
|
|
27602
27835
|
// src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts
|
|
@@ -27822,7 +28055,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
27822
28055
|
};
|
|
27823
28056
|
|
|
27824
28057
|
// src/controller/control/tree/tree.controller.ts
|
|
27825
|
-
import { recursiveIterate as
|
|
28058
|
+
import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
|
|
27826
28059
|
|
|
27827
28060
|
// src/controller/control/tree/tree.service.ts
|
|
27828
28061
|
import { ModelError as ModelError27 } from "@ibiz-template/core";
|
|
@@ -28192,7 +28425,7 @@ var TreeController = class extends MDControlController {
|
|
|
28192
28425
|
this.state.rootNodes = nodes;
|
|
28193
28426
|
}
|
|
28194
28427
|
this.state.items = [];
|
|
28195
|
-
|
|
28428
|
+
recursiveIterate7(
|
|
28196
28429
|
{ children: this.state.rootNodes },
|
|
28197
28430
|
(node) => {
|
|
28198
28431
|
this.state.items.push(node);
|
|
@@ -28334,7 +28567,7 @@ var TreeController = class extends MDControlController {
|
|
|
28334
28567
|
*/
|
|
28335
28568
|
calcExpandedKeys(nodes) {
|
|
28336
28569
|
let expandedKeys = [...this.state.expandedKeys];
|
|
28337
|
-
|
|
28570
|
+
recursiveIterate7({ children: nodes }, (node) => {
|
|
28338
28571
|
var _a;
|
|
28339
28572
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
28340
28573
|
expandedKeys.push(node.id);
|
|
@@ -28675,6 +28908,10 @@ var WizardPanelController = class extends ControlController {
|
|
|
28675
28908
|
}
|
|
28676
28909
|
};
|
|
28677
28910
|
|
|
28911
|
+
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
28912
|
+
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
28913
|
+
import { isNil as isNil21 } from "ramda";
|
|
28914
|
+
|
|
28678
28915
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
28679
28916
|
var MDCtrlService = class extends MDControlService {
|
|
28680
28917
|
/**
|
|
@@ -28785,7 +29022,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
28785
29022
|
async refresh() {
|
|
28786
29023
|
await this.load({ isInitialLoad: true });
|
|
28787
29024
|
}
|
|
28788
|
-
afterLoad(args, items) {
|
|
29025
|
+
async afterLoad(args, items) {
|
|
28789
29026
|
if (args.isInitialLoad) {
|
|
28790
29027
|
this.state.rows = [];
|
|
28791
29028
|
}
|
|
@@ -28798,6 +29035,8 @@ var MDCtrlController = class extends MDControlController {
|
|
|
28798
29035
|
})
|
|
28799
29036
|
);
|
|
28800
29037
|
}
|
|
29038
|
+
await this.initGroupCodeListItems();
|
|
29039
|
+
await this.handleDataGroup();
|
|
28801
29040
|
return super.afterLoad(args, items);
|
|
28802
29041
|
}
|
|
28803
29042
|
/**
|
|
@@ -28806,7 +29045,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
28806
29045
|
* @author zk
|
|
28807
29046
|
* @date 2023-05-26 02:05:46
|
|
28808
29047
|
* @param {IData[]} items
|
|
28809
|
-
* @memberof
|
|
29048
|
+
* @memberof MDCtrlController
|
|
28810
29049
|
*/
|
|
28811
29050
|
setData(items) {
|
|
28812
29051
|
const rows = items.map((item) => {
|
|
@@ -28821,7 +29060,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
28821
29060
|
* @author zk
|
|
28822
29061
|
* @date 2023-05-26 02:05:35
|
|
28823
29062
|
* @return {*} {IData[]}
|
|
28824
|
-
* @memberof
|
|
29063
|
+
* @memberof MDCtrlController
|
|
28825
29064
|
*/
|
|
28826
29065
|
getAllData() {
|
|
28827
29066
|
return this.state.rows.map((row) => row.data);
|
|
@@ -28884,11 +29123,114 @@ var MDCtrlController = class extends MDControlController {
|
|
|
28884
29123
|
containerState.update(row.data.getOrigin());
|
|
28885
29124
|
row.uaColStates[group.id] = containerState;
|
|
28886
29125
|
}
|
|
29126
|
+
/**
|
|
29127
|
+
* 处理数据分组
|
|
29128
|
+
*
|
|
29129
|
+
* @memberof MDCtrlController
|
|
29130
|
+
*/
|
|
29131
|
+
async handleDataGroup() {
|
|
29132
|
+
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
29133
|
+
if (enableGroup && groupMode) {
|
|
29134
|
+
if (!groupAppDEFieldId) {
|
|
29135
|
+
throw new RuntimeModelError56(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
29136
|
+
}
|
|
29137
|
+
if (groupMode === "AUTO") {
|
|
29138
|
+
this.handleAutoGroup();
|
|
29139
|
+
} else if (groupMode === "CODELIST") {
|
|
29140
|
+
await this.handleCodeListGroup();
|
|
29141
|
+
}
|
|
29142
|
+
}
|
|
29143
|
+
}
|
|
29144
|
+
/**
|
|
29145
|
+
* 处理自动分组
|
|
29146
|
+
*
|
|
29147
|
+
* @memberof MDCtrlController
|
|
29148
|
+
*/
|
|
29149
|
+
handleAutoGroup() {
|
|
29150
|
+
const { groupAppDEFieldId } = this.model;
|
|
29151
|
+
if (groupAppDEFieldId) {
|
|
29152
|
+
const { items } = this.state;
|
|
29153
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
29154
|
+
items.forEach((item) => {
|
|
29155
|
+
const groupVal = item[groupAppDEFieldId];
|
|
29156
|
+
if (isNil21(groupVal)) {
|
|
29157
|
+
return;
|
|
29158
|
+
}
|
|
29159
|
+
if (!groupMap.has(groupVal)) {
|
|
29160
|
+
groupMap.set(groupVal, []);
|
|
29161
|
+
}
|
|
29162
|
+
groupMap.get(groupVal).push(new MobMDCtrlRowState(item, this));
|
|
29163
|
+
});
|
|
29164
|
+
const groups = [];
|
|
29165
|
+
groupMap.forEach((value, key) => {
|
|
29166
|
+
groups.push({
|
|
29167
|
+
caption: key,
|
|
29168
|
+
key,
|
|
29169
|
+
children: [...value]
|
|
29170
|
+
});
|
|
29171
|
+
});
|
|
29172
|
+
this.state.groups = groups;
|
|
29173
|
+
}
|
|
29174
|
+
}
|
|
29175
|
+
/**
|
|
29176
|
+
* 加载并初始化分组代码表项集合
|
|
29177
|
+
* @author lxm
|
|
29178
|
+
* @date 2023-08-29 05:11:39
|
|
29179
|
+
* @protected
|
|
29180
|
+
* @return {*} {Promise<void>}
|
|
29181
|
+
*/
|
|
29182
|
+
async initGroupCodeListItems() {
|
|
29183
|
+
const { groupCodeListId } = this.model;
|
|
29184
|
+
if (!groupCodeListId) {
|
|
29185
|
+
return;
|
|
29186
|
+
}
|
|
29187
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
29188
|
+
this.groupCodeListItems = await app.codeList.get(
|
|
29189
|
+
groupCodeListId,
|
|
29190
|
+
this.context,
|
|
29191
|
+
this.params
|
|
29192
|
+
);
|
|
29193
|
+
}
|
|
29194
|
+
/**
|
|
29195
|
+
* 处理代码表分组
|
|
29196
|
+
*
|
|
29197
|
+
* @memberof MDCtrlController
|
|
29198
|
+
*/
|
|
29199
|
+
async handleCodeListGroup() {
|
|
29200
|
+
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
29201
|
+
if (!groupCodeListId) {
|
|
29202
|
+
throw new RuntimeModelError56(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
29203
|
+
}
|
|
29204
|
+
const { items } = this.state;
|
|
29205
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
29206
|
+
this.groupCodeListItems.forEach((item) => {
|
|
29207
|
+
groupMap.set(item.value, []);
|
|
29208
|
+
});
|
|
29209
|
+
items.forEach((item) => {
|
|
29210
|
+
const groupVal = item[groupAppDEFieldId];
|
|
29211
|
+
const groupArr = groupMap.get(groupVal);
|
|
29212
|
+
if (groupArr) {
|
|
29213
|
+
groupArr.push(new MobMDCtrlRowState(item, this));
|
|
29214
|
+
}
|
|
29215
|
+
});
|
|
29216
|
+
const groups = [];
|
|
29217
|
+
groupMap.forEach((arr, key) => {
|
|
29218
|
+
const codeListItem = this.groupCodeListItems.find(
|
|
29219
|
+
(item) => item.value === key
|
|
29220
|
+
);
|
|
29221
|
+
groups.push({
|
|
29222
|
+
caption: codeListItem.text,
|
|
29223
|
+
key: codeListItem.value,
|
|
29224
|
+
children: arr
|
|
29225
|
+
});
|
|
29226
|
+
});
|
|
29227
|
+
this.state.groups = groups;
|
|
29228
|
+
}
|
|
28887
29229
|
};
|
|
28888
29230
|
|
|
28889
29231
|
// src/controller/control/kanban/kanban.controller.ts
|
|
28890
|
-
import { RuntimeError as RuntimeError48, RuntimeModelError as
|
|
28891
|
-
import { isNil as
|
|
29232
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
29233
|
+
import { isNil as isNil22 } from "ramda";
|
|
28892
29234
|
|
|
28893
29235
|
// src/controller/control/kanban/kanban.service.ts
|
|
28894
29236
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -28962,15 +29304,15 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28962
29304
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
28963
29305
|
const { minorSortDir } = this.model;
|
|
28964
29306
|
if (!sortField) {
|
|
28965
|
-
throw new
|
|
29307
|
+
throw new RuntimeModelError57(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
28966
29308
|
}
|
|
28967
29309
|
if (!minorSortDir) {
|
|
28968
|
-
throw new
|
|
29310
|
+
throw new RuntimeModelError57(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
28969
29311
|
}
|
|
28970
29312
|
const isAsc = minorSortDir === "ASC";
|
|
28971
29313
|
items.forEach((item) => {
|
|
28972
29314
|
const sortValue = item[sortField];
|
|
28973
|
-
if (
|
|
29315
|
+
if (isNil22(sortValue)) {
|
|
28974
29316
|
item[sortField] = 0;
|
|
28975
29317
|
} else {
|
|
28976
29318
|
const toNum = Number(sortValue);
|
|
@@ -29115,7 +29457,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
29115
29457
|
};
|
|
29116
29458
|
|
|
29117
29459
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
29118
|
-
import { recursiveIterate as
|
|
29460
|
+
import { recursiveIterate as recursiveIterate8 } from "@ibiz-template/core";
|
|
29119
29461
|
|
|
29120
29462
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
29121
29463
|
import { isArray as isArray6 } from "qx-util";
|
|
@@ -29355,7 +29697,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
29355
29697
|
* @memberof TreeGridExController
|
|
29356
29698
|
*/
|
|
29357
29699
|
initColumnStates() {
|
|
29358
|
-
|
|
29700
|
+
recursiveIterate8(
|
|
29359
29701
|
this.model,
|
|
29360
29702
|
(column) => {
|
|
29361
29703
|
if (column.columnType !== "GROUPGRIDCOLUMN") {
|
|
@@ -29443,7 +29785,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
29443
29785
|
this.state.rootNodes = nodes;
|
|
29444
29786
|
}
|
|
29445
29787
|
this.state.items = [];
|
|
29446
|
-
|
|
29788
|
+
recursiveIterate8(
|
|
29447
29789
|
{ children: this.state.rootNodes },
|
|
29448
29790
|
(node) => {
|
|
29449
29791
|
this.state.items.push(node);
|
|
@@ -29462,7 +29804,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
29462
29804
|
*/
|
|
29463
29805
|
calcExpandedKeys(nodes) {
|
|
29464
29806
|
let expandedKeys = [];
|
|
29465
|
-
|
|
29807
|
+
recursiveIterate8({ children: nodes }, (node) => {
|
|
29466
29808
|
var _a;
|
|
29467
29809
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
29468
29810
|
expandedKeys.push(node.id);
|
|
@@ -30058,7 +30400,7 @@ var ViewEngineBase = class {
|
|
|
30058
30400
|
};
|
|
30059
30401
|
|
|
30060
30402
|
// src/engine/md-view.engine.ts
|
|
30061
|
-
import { RuntimeModelError as
|
|
30403
|
+
import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
30062
30404
|
import { clone as clone20 } from "ramda";
|
|
30063
30405
|
var MDViewEngine = class extends ViewEngineBase {
|
|
30064
30406
|
/**
|
|
@@ -30254,7 +30596,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30254
30596
|
(item) => item.id === "newdata"
|
|
30255
30597
|
);
|
|
30256
30598
|
if (!openAppViewLogic) {
|
|
30257
|
-
throw new
|
|
30599
|
+
throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30258
30600
|
}
|
|
30259
30601
|
const params = clone20(this.view.params);
|
|
30260
30602
|
if (copyMode) {
|
|
@@ -30270,7 +30612,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30270
30612
|
if (result instanceof Object && result.ok) {
|
|
30271
30613
|
this.refresh();
|
|
30272
30614
|
} else if (result === -1) {
|
|
30273
|
-
throw new
|
|
30615
|
+
throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30274
30616
|
}
|
|
30275
30617
|
}
|
|
30276
30618
|
/**
|
|
@@ -30317,35 +30659,12 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30317
30659
|
* @return {*} {IParams}
|
|
30318
30660
|
*/
|
|
30319
30661
|
getSearchParams() {
|
|
30320
|
-
var _a;
|
|
30321
30662
|
const params = {};
|
|
30322
30663
|
if (this.searchForm) {
|
|
30323
|
-
|
|
30324
|
-
const filteredParams = Object.entries(addParams).reduce(
|
|
30325
|
-
(result, [key, value]) => {
|
|
30326
|
-
if (value !== null && value !== void 0 && value !== "") {
|
|
30327
|
-
result[key] = value;
|
|
30328
|
-
}
|
|
30329
|
-
return result;
|
|
30330
|
-
},
|
|
30331
|
-
{}
|
|
30332
|
-
);
|
|
30333
|
-
Object.assign(params, filteredParams);
|
|
30664
|
+
Object.assign(params, this.searchForm.getFilterParams());
|
|
30334
30665
|
}
|
|
30335
30666
|
if (this.searchBar) {
|
|
30336
|
-
|
|
30337
|
-
const addParams = {
|
|
30338
|
-
query: this.searchBar.state.query
|
|
30339
|
-
};
|
|
30340
|
-
Object.assign(params, addParams);
|
|
30341
|
-
}
|
|
30342
|
-
if ((_a = this.searchBar.state.selectedGroupItem) == null ? void 0 : _a.data) {
|
|
30343
|
-
const func = new Function(
|
|
30344
|
-
"return (".concat(this.searchBar.state.selectedGroupItem.data, ");")
|
|
30345
|
-
);
|
|
30346
|
-
const addParams = func();
|
|
30347
|
-
Object.assign(params, addParams);
|
|
30348
|
-
}
|
|
30667
|
+
Object.assign(params, this.searchBar.getFilterParams());
|
|
30349
30668
|
}
|
|
30350
30669
|
return params;
|
|
30351
30670
|
}
|
|
@@ -30408,7 +30727,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30408
30727
|
|
|
30409
30728
|
// src/utils/error-handler/default-error-handler.ts
|
|
30410
30729
|
import {
|
|
30411
|
-
RuntimeModelError as
|
|
30730
|
+
RuntimeModelError as RuntimeModelError59,
|
|
30412
30731
|
ModelError as ModelError28,
|
|
30413
30732
|
HttpError as HttpError4,
|
|
30414
30733
|
NoticeError as NoticeError2,
|
|
@@ -30416,7 +30735,7 @@ import {
|
|
|
30416
30735
|
} from "@ibiz-template/core";
|
|
30417
30736
|
var DefaultErrorHandler = class {
|
|
30418
30737
|
handle(error) {
|
|
30419
|
-
if (error instanceof
|
|
30738
|
+
if (error instanceof RuntimeModelError59 || error instanceof ModelError28) {
|
|
30420
30739
|
ibiz.message.error(error.message, 10, true);
|
|
30421
30740
|
} else if (error instanceof HttpError4) {
|
|
30422
30741
|
if (error.status === 401) {
|
|
@@ -30670,13 +30989,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
30670
30989
|
};
|
|
30671
30990
|
|
|
30672
30991
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
30673
|
-
import { RuntimeModelError as
|
|
30992
|
+
import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
30674
30993
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
30675
30994
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30676
30995
|
execute(executeParams) {
|
|
30677
30996
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
30678
30997
|
if (!appDEUILogicId) {
|
|
30679
|
-
throw new
|
|
30998
|
+
throw new RuntimeModelError60(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
30680
30999
|
}
|
|
30681
31000
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
30682
31001
|
}
|
|
@@ -31161,7 +31480,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
31161
31480
|
import {
|
|
31162
31481
|
ModelError as ModelError31,
|
|
31163
31482
|
RuntimeError as RuntimeError56,
|
|
31164
|
-
RuntimeModelError as
|
|
31483
|
+
RuntimeModelError as RuntimeModelError61
|
|
31165
31484
|
} from "@ibiz-template/core";
|
|
31166
31485
|
import { notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
31167
31486
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -31205,7 +31524,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31205
31524
|
} else {
|
|
31206
31525
|
openViewRef = appUILogic.openDataAppView;
|
|
31207
31526
|
if (!openViewRef) {
|
|
31208
|
-
throw new
|
|
31527
|
+
throw new RuntimeModelError61(
|
|
31209
31528
|
appUILogic,
|
|
31210
31529
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
31211
31530
|
);
|
|
@@ -31213,7 +31532,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31213
31532
|
}
|
|
31214
31533
|
const openView = openViewRef.refAppViewId;
|
|
31215
31534
|
if (!openView) {
|
|
31216
|
-
throw new
|
|
31535
|
+
throw new RuntimeModelError61(
|
|
31217
31536
|
appUILogic,
|
|
31218
31537
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
31219
31538
|
);
|
|
@@ -31240,7 +31559,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31240
31559
|
const appDataEntityId = parameters.view.model.appDataEntityId;
|
|
31241
31560
|
const formTypeName = await getFormTypeFieldName(appDataEntityId);
|
|
31242
31561
|
if (!formTypeName) {
|
|
31243
|
-
throw new
|
|
31562
|
+
throw new RuntimeModelError61(
|
|
31244
31563
|
appUILogic,
|
|
31245
31564
|
"".concat(appDataEntityId, "\u5B9E\u4F53\u7F3A\u5C11\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027")
|
|
31246
31565
|
);
|
|
@@ -31248,7 +31567,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31248
31567
|
const { data } = parameters;
|
|
31249
31568
|
const formTypeValue = data[0][formTypeName];
|
|
31250
31569
|
if (!formTypeValue) {
|
|
31251
|
-
throw new
|
|
31570
|
+
throw new RuntimeModelError61(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
31252
31571
|
}
|
|
31253
31572
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31254
31573
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -31290,7 +31609,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31290
31609
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
31291
31610
|
});
|
|
31292
31611
|
if (!newViewRef) {
|
|
31293
|
-
throw new
|
|
31612
|
+
throw new RuntimeModelError61(
|
|
31294
31613
|
appUILogic,
|
|
31295
31614
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
31296
31615
|
);
|
|
@@ -31300,7 +31619,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31300
31619
|
} else {
|
|
31301
31620
|
newViewRef = newDataAppView;
|
|
31302
31621
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
31303
|
-
throw new
|
|
31622
|
+
throw new RuntimeModelError61(
|
|
31304
31623
|
appUILogic,
|
|
31305
31624
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
31306
31625
|
);
|
|
@@ -31357,7 +31676,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31357
31676
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
31358
31677
|
const { context, params, ...rest } = parameters;
|
|
31359
31678
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
31360
|
-
throw new
|
|
31679
|
+
throw new RuntimeModelError61(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
31361
31680
|
}
|
|
31362
31681
|
const result = await ibiz.commands.execute(
|
|
31363
31682
|
OpenAppViewCommand.TAG,
|
|
@@ -31403,7 +31722,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31403
31722
|
const minorDERs = selfDe.minorAppDERSs;
|
|
31404
31723
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
31405
31724
|
if (!minorDERs) {
|
|
31406
|
-
throw new
|
|
31725
|
+
throw new RuntimeModelError61(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
31407
31726
|
}
|
|
31408
31727
|
let pickParentFieldName;
|
|
31409
31728
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -31826,6 +32145,7 @@ export {
|
|
|
31826
32145
|
V7AuthService,
|
|
31827
32146
|
VIEW_PROVIDER_PREFIX,
|
|
31828
32147
|
ValueExUtil,
|
|
32148
|
+
ValueOP,
|
|
31829
32149
|
ViewCallTag,
|
|
31830
32150
|
ViewController,
|
|
31831
32151
|
ViewEngineBase,
|