@ibiz-template/runtime 0.1.33 → 0.1.35
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 +404 -218
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/control/control.controller.d.ts +1 -0
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +21 -1
- package/out/controller/common/control/md-control.controller.js +1 -1
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +1 -2
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +2 -1
- package/out/controller/control/calendar/calendar.controller.js +1 -1
- package/out/controller/control/data-view/data-view.controller.js +5 -3
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts +7 -7
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +22 -16
- package/out/controller/control/grid/grid/grid.controller.js +2 -2
- package/out/controller/control/panel/panel/panel-item.controller.d.ts +6 -0
- package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.controller.js +11 -0
- package/out/controller/control/panel/panel/panel.controller.d.ts +3 -0
- package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel.controller.js +13 -0
- package/out/controller/control/panel/view-layout-panel/view-layout-panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/view-layout-panel/view-layout-panel.controller.js +7 -0
- 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/interface/common/i-data-ability-params/i-data-ability-params.d.ts +4 -4
- package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts.map +1 -1
- package/out/interface/common/i-float-window-options/i-float-window-options.d.ts +75 -0
- package/out/interface/common/i-float-window-options/i-float-window-options.d.ts.map +1 -0
- package/out/interface/common/i-float-window-options/i-float-window-options.js +1 -0
- package/out/interface/common/index.d.ts +1 -0
- package/out/interface/common/index.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-control.controller.d.ts +1 -1
- package/out/interface/controller/controller/control/i-edit-form.controller.d.ts +6 -5
- package/out/interface/controller/controller/control/i-edit-form.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/i.controller.d.ts +1 -1
- package/out/interface/controller/event/argument/index.d.ts +1 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/panel-item.event.d.ts +26 -0
- package/out/interface/controller/event/argument/panel-item.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/panel-item.event.js +1 -0
- package/out/interface/controller/event/control/i-panel.event.d.ts +12 -1
- package/out/interface/controller/event/control/i-panel.event.d.ts.map +1 -1
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts +7 -0
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +25 -1
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/interface/util/i-overlay-controller/i-overlay-controller.d.ts +24 -1
- package/out/interface/util/i-overlay-controller/i-overlay-controller.d.ts.map +1 -1
- package/out/logic-scheduler/executor/app-ui-action-executor.d.ts +15 -0
- package/out/logic-scheduler/executor/app-ui-action-executor.d.ts.map +1 -0
- package/out/logic-scheduler/executor/app-ui-action-executor.js +16 -0
- package/out/logic-scheduler/index.d.ts.map +1 -1
- package/out/logic-scheduler/index.js +6 -0
- package/out/logic-scheduler/scheduler/control-logic-scheduler.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/control-logic-scheduler.js +6 -0
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts +2 -2
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.js +3 -3
- package/out/logic-scheduler/trigger/control-event-trigger.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/control-event-trigger.js +3 -1
- package/out/service/service/entity/de.service.d.ts +38 -3
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +84 -8
- package/out/service/service/entity/method/ac-fetch.d.ts +14 -0
- package/out/service/service/entity/method/ac-fetch.d.ts.map +1 -0
- package/out/service/service/entity/method/ac-fetch.js +15 -0
- package/out/service/service/entity/method/method.d.ts +1 -0
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +7 -4
- 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-link/ui-logic-link-single-cond/ui-logic-link-single-cond.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.js +12 -5
- 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/controller/common/control/control.controller.ts +25 -1
- package/src/controller/common/control/md-control.controller.ts +1 -1
- package/src/controller/common/editor/editor.controller.ts +1 -2
- package/src/controller/common/view/view.controller.ts +2 -0
- package/src/controller/control/calendar/calendar.controller.ts +1 -1
- package/src/controller/control/data-view/data-view.controller.ts +3 -3
- package/src/controller/control/form/edit-form/edit-form.controller.ts +27 -30
- package/src/controller/control/grid/grid/grid.controller.ts +2 -2
- package/src/controller/control/panel/panel/panel-item.controller.ts +12 -0
- package/src/controller/control/panel/panel/panel.controller.ts +20 -0
- package/src/controller/control/panel/view-layout-panel/view-layout-panel.controller.ts +11 -0
- 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/interface/common/i-data-ability-params/i-data-ability-params.ts +4 -4
- package/src/interface/common/i-float-window-options/i-float-window-options.ts +74 -0
- package/src/interface/common/index.ts +1 -0
- package/src/interface/controller/controller/control/i-control.controller.ts +1 -1
- package/src/interface/controller/controller/control/i-edit-form.controller.ts +6 -5
- package/src/interface/controller/controller/i.controller.ts +1 -1
- package/src/interface/controller/event/argument/index.ts +1 -0
- package/src/interface/controller/event/argument/panel-item.event.ts +27 -0
- package/src/interface/controller/event/control/i-panel.event.ts +13 -1
- package/src/interface/logic-scheduler/i-scheduler-logic.ts +8 -0
- package/src/interface/service/service/i-app-de.service.ts +37 -1
- package/src/interface/util/i-overlay-controller/i-overlay-controller.ts +39 -1
- package/src/logic-scheduler/executor/app-ui-action-executor.ts +20 -0
- package/src/logic-scheduler/index.ts +12 -0
- package/src/logic-scheduler/scheduler/control-logic-scheduler.ts +6 -0
- package/src/logic-scheduler/scheduler/logic-scheduler.ts +7 -4
- package/src/logic-scheduler/trigger/control-event-trigger.ts +3 -1
- package/src/service/service/entity/de.service.ts +107 -8
- package/src/service/service/entity/method/ac-fetch.ts +16 -0
- package/src/service/service/entity/method/method.ts +11 -4
- package/src/ui-logic/ui-logic-context.ts +7 -11
- package/src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts +12 -5
- 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
|
@@ -10638,7 +10638,10 @@ var CounterService = class {
|
|
|
10638
10638
|
CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
10639
10639
|
|
|
10640
10640
|
// src/service/service/entity/de.service.ts
|
|
10641
|
-
import {
|
|
10641
|
+
import {
|
|
10642
|
+
ModelError as ModelError13,
|
|
10643
|
+
RuntimeError as RuntimeError12
|
|
10644
|
+
} from "@ibiz-template/core";
|
|
10642
10645
|
|
|
10643
10646
|
// src/service/service/work-flow/work-flow.service.ts
|
|
10644
10647
|
import { RuntimeError as RuntimeError10 } from "@ibiz-template/core";
|
|
@@ -11453,23 +11456,26 @@ var Method = class {
|
|
|
11453
11456
|
switch (requestMethod) {
|
|
11454
11457
|
case "POST":
|
|
11455
11458
|
res = await this.app.net.post(
|
|
11456
|
-
|
|
11459
|
+
this.mergeRequestPath(path2, methodName),
|
|
11457
11460
|
notNilEmpty6(data) ? data : params
|
|
11458
11461
|
);
|
|
11459
11462
|
break;
|
|
11460
11463
|
case "GET":
|
|
11461
|
-
res = await this.app.net.get(
|
|
11464
|
+
res = await this.app.net.get(
|
|
11465
|
+
this.mergeRequestPath(path2, methodName),
|
|
11466
|
+
data || params
|
|
11467
|
+
);
|
|
11462
11468
|
break;
|
|
11463
11469
|
case "PUT": {
|
|
11464
11470
|
res = await this.app.net.put(
|
|
11465
|
-
|
|
11471
|
+
this.mergeRequestPath(path2, methodName),
|
|
11466
11472
|
notNilEmpty6(data) ? data : params
|
|
11467
11473
|
);
|
|
11468
11474
|
break;
|
|
11469
11475
|
}
|
|
11470
11476
|
case "DELETE":
|
|
11471
11477
|
res = await this.app.net.delete(
|
|
11472
|
-
|
|
11478
|
+
this.mergeRequestPath(path2, methodName),
|
|
11473
11479
|
data || params
|
|
11474
11480
|
);
|
|
11475
11481
|
break;
|
|
@@ -11487,6 +11493,9 @@ var Method = class {
|
|
|
11487
11493
|
}
|
|
11488
11494
|
throw new RuntimeModelError7(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
|
|
11489
11495
|
}
|
|
11496
|
+
mergeRequestPath(path2, methodName) {
|
|
11497
|
+
return "".concat(path2, "/").concat(methodName);
|
|
11498
|
+
}
|
|
11490
11499
|
/**
|
|
11491
11500
|
* 根据上下文计算当前请求路径
|
|
11492
11501
|
*
|
|
@@ -11547,13 +11556,10 @@ var DELogicContext = class {
|
|
|
11547
11556
|
* @param {Map<string, DELogicParam>} deLogicParams 实体逻辑参数集合
|
|
11548
11557
|
* @param {IParams} context 上下文
|
|
11549
11558
|
* @param {IData} data 数据对象
|
|
11550
|
-
* @param {IParams}
|
|
11559
|
+
* @param {IParams} params 视图参数
|
|
11551
11560
|
*/
|
|
11552
|
-
constructor(deLogicParams, context, data,
|
|
11561
|
+
constructor(deLogicParams, context, data, params) {
|
|
11553
11562
|
this.deLogicParams = deLogicParams;
|
|
11554
|
-
this.context = context;
|
|
11555
|
-
this.data = data;
|
|
11556
|
-
this.viewParams = viewParams;
|
|
11557
11563
|
/**
|
|
11558
11564
|
* 实体逻辑参数
|
|
11559
11565
|
*
|
|
@@ -11588,6 +11594,31 @@ var DELogicContext = class {
|
|
|
11588
11594
|
* @type {string}
|
|
11589
11595
|
*/
|
|
11590
11596
|
this.defaultParamName = "Default";
|
|
11597
|
+
this.parameters = { context, data, params };
|
|
11598
|
+
}
|
|
11599
|
+
/**
|
|
11600
|
+
* 上下文
|
|
11601
|
+
*/
|
|
11602
|
+
get context() {
|
|
11603
|
+
if (Object.prototype.hasOwnProperty.call(this.params, "context")) {
|
|
11604
|
+
return this.params.context;
|
|
11605
|
+
}
|
|
11606
|
+
return this.parameters.context;
|
|
11607
|
+
}
|
|
11608
|
+
/**
|
|
11609
|
+
* 数据
|
|
11610
|
+
*/
|
|
11611
|
+
get data() {
|
|
11612
|
+
return this.parameters.data;
|
|
11613
|
+
}
|
|
11614
|
+
/**
|
|
11615
|
+
* 视图参数
|
|
11616
|
+
*/
|
|
11617
|
+
get viewParam() {
|
|
11618
|
+
if (Object.prototype.hasOwnProperty.call(this.params, "viewParam")) {
|
|
11619
|
+
return this.params.viewParam;
|
|
11620
|
+
}
|
|
11621
|
+
return this.parameters.params;
|
|
11591
11622
|
}
|
|
11592
11623
|
/**
|
|
11593
11624
|
* 重置实体逻辑参数
|
|
@@ -11890,7 +11921,7 @@ var DEActionNode = class extends DELogicNode {
|
|
|
11890
11921
|
dstAppDEActionId,
|
|
11891
11922
|
ctx.context,
|
|
11892
11923
|
requestData,
|
|
11893
|
-
ctx.
|
|
11924
|
+
ctx.viewParam
|
|
11894
11925
|
);
|
|
11895
11926
|
if (res.ok) {
|
|
11896
11927
|
ctx.params[retDELogicParamId] = res.data;
|
|
@@ -11964,13 +11995,13 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
11964
11995
|
return ibiz.util.rawValue.format(srcValue);
|
|
11965
11996
|
case "WEBCONTEXT":
|
|
11966
11997
|
case "VIEWPARAM":
|
|
11967
|
-
value = ctx.
|
|
11998
|
+
value = ctx.parameters.params;
|
|
11968
11999
|
break;
|
|
11969
12000
|
case "APPLICATION":
|
|
11970
12001
|
case "SESSION":
|
|
11971
12002
|
case "APPDATA":
|
|
11972
12003
|
case "DATACONTEXT":
|
|
11973
|
-
value = ctx.context;
|
|
12004
|
+
value = ctx.parameters.context;
|
|
11974
12005
|
break;
|
|
11975
12006
|
case "ENVPARAM":
|
|
11976
12007
|
value = clone5(ibiz.env);
|
|
@@ -12146,14 +12177,13 @@ var DataSetNode = class extends DELogicNode {
|
|
|
12146
12177
|
dstDELogicParamId,
|
|
12147
12178
|
retDELogicParamId
|
|
12148
12179
|
} = this.model;
|
|
12149
|
-
const
|
|
12180
|
+
const queryParams = ctx.params[dstDELogicParamId];
|
|
12150
12181
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
12151
12182
|
const res = await app.deService.exec(
|
|
12152
12183
|
dstAppDataEntityId,
|
|
12153
12184
|
dstAppDEDataSetId,
|
|
12154
12185
|
ctx.context,
|
|
12155
|
-
|
|
12156
|
-
ctx.viewParams
|
|
12186
|
+
queryParams
|
|
12157
12187
|
);
|
|
12158
12188
|
if (res.ok) {
|
|
12159
12189
|
ctx.params[retDELogicParamId] = res.data;
|
|
@@ -12318,7 +12348,7 @@ var DELogicParam = class {
|
|
|
12318
12348
|
} else if (m.lastReturnParam) {
|
|
12319
12349
|
ctx.initLastReturnParam(tag);
|
|
12320
12350
|
} else if (m.appContextParam) {
|
|
12321
|
-
ctx.params[tag] = ctx.context;
|
|
12351
|
+
ctx.params[tag] = ctx.parameters.context;
|
|
12322
12352
|
} else if (m.simpleListParam) {
|
|
12323
12353
|
ctx.params[tag] = [];
|
|
12324
12354
|
} else if (m.simpleParam) {
|
|
@@ -13069,6 +13099,13 @@ var FetchMethod = class extends Method {
|
|
|
13069
13099
|
}
|
|
13070
13100
|
};
|
|
13071
13101
|
|
|
13102
|
+
// src/service/service/entity/method/ac-fetch.ts
|
|
13103
|
+
var AcFetchMethod = class extends FetchMethod {
|
|
13104
|
+
mergeRequestPath(path2, methodName) {
|
|
13105
|
+
return "".concat(path2, "/ac/").concat(methodName, "?srfac=ac");
|
|
13106
|
+
}
|
|
13107
|
+
};
|
|
13108
|
+
|
|
13072
13109
|
// src/service/service/entity/de.service.ts
|
|
13073
13110
|
var DEService = class {
|
|
13074
13111
|
/**
|
|
@@ -13109,14 +13146,16 @@ var DEService = class {
|
|
|
13109
13146
|
* 获取实体服务方法实例
|
|
13110
13147
|
*
|
|
13111
13148
|
* @author chitanda
|
|
13112
|
-
* @date
|
|
13149
|
+
* @date 2023-10-12 17:10:10
|
|
13113
13150
|
* @protected
|
|
13114
13151
|
* @param {string} id
|
|
13152
|
+
* @param {boolean} [acMode=false]
|
|
13115
13153
|
* @return {*} {Method}
|
|
13116
13154
|
*/
|
|
13117
|
-
getMethod(id) {
|
|
13118
|
-
|
|
13119
|
-
|
|
13155
|
+
getMethod(id, acMode = false) {
|
|
13156
|
+
const cacheId = acMode ? "ac-".concat(id) : id;
|
|
13157
|
+
if (this.methodMap.has(cacheId)) {
|
|
13158
|
+
return this.methodMap.get(cacheId);
|
|
13120
13159
|
}
|
|
13121
13160
|
const model = findModelChild(this.model.appDEMethods, id);
|
|
13122
13161
|
let method = null;
|
|
@@ -13126,7 +13165,11 @@ var DEService = class {
|
|
|
13126
13165
|
break;
|
|
13127
13166
|
case "FETCH":
|
|
13128
13167
|
case "FETCHTEMP":
|
|
13129
|
-
|
|
13168
|
+
if (acMode) {
|
|
13169
|
+
method = new AcFetchMethod(this.model, model);
|
|
13170
|
+
} else {
|
|
13171
|
+
method = new FetchMethod(this.model, model);
|
|
13172
|
+
}
|
|
13130
13173
|
break;
|
|
13131
13174
|
default:
|
|
13132
13175
|
throw new ModelError13(
|
|
@@ -13134,7 +13177,7 @@ var DEService = class {
|
|
|
13134
13177
|
"\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType)
|
|
13135
13178
|
);
|
|
13136
13179
|
}
|
|
13137
|
-
this.methodMap.set(
|
|
13180
|
+
this.methodMap.set(cacheId, method);
|
|
13138
13181
|
return method;
|
|
13139
13182
|
}
|
|
13140
13183
|
/**
|
|
@@ -13155,6 +13198,78 @@ var DEService = class {
|
|
|
13155
13198
|
}
|
|
13156
13199
|
throw new RuntimeError12("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
13157
13200
|
}
|
|
13201
|
+
/**
|
|
13202
|
+
* 执行服务方法 ac 模式
|
|
13203
|
+
*
|
|
13204
|
+
* @author chitanda
|
|
13205
|
+
* @date 2022-09-13 19:09:55
|
|
13206
|
+
* @param {string} id 执行服务方法标识
|
|
13207
|
+
* @param {IParams} context
|
|
13208
|
+
* @param {IData} [params={}] 请求参数
|
|
13209
|
+
* @param {IParams} [params2={}] 查询参数
|
|
13210
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
13211
|
+
*/
|
|
13212
|
+
execAc(id, context, params, params2 = {}) {
|
|
13213
|
+
const method = this.getMethod(id, true);
|
|
13214
|
+
if (method) {
|
|
13215
|
+
return method.exec(context, params, params2);
|
|
13216
|
+
}
|
|
13217
|
+
throw new RuntimeError12("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
13218
|
+
}
|
|
13219
|
+
/**
|
|
13220
|
+
* 实体级别 AI 聊天会话
|
|
13221
|
+
*
|
|
13222
|
+
* @author chitanda
|
|
13223
|
+
* @date 2023-10-16 16:10:16
|
|
13224
|
+
* @param {(data: IPortalAsyncAction) => void} onmessage
|
|
13225
|
+
* @param {IParams} context
|
|
13226
|
+
* @param {IParams} [params={}]
|
|
13227
|
+
* @param {IData} [data={}]
|
|
13228
|
+
* @return {*} {Promise<void>}
|
|
13229
|
+
*/
|
|
13230
|
+
aiChatSse(onmessage, context, params = {}, data = {}) {
|
|
13231
|
+
const app = ibiz.hub.getApp(this.model.appId);
|
|
13232
|
+
const path2 = this.calcSsePath(context);
|
|
13233
|
+
return new Promise((resolve, reject) => {
|
|
13234
|
+
app.net.sse(
|
|
13235
|
+
"/".concat(path2),
|
|
13236
|
+
{ srfactag: "AIChat", ...params },
|
|
13237
|
+
{
|
|
13238
|
+
headers: {
|
|
13239
|
+
"Content-Type": "application/json"
|
|
13240
|
+
},
|
|
13241
|
+
body: JSON.stringify(data),
|
|
13242
|
+
onmessage: (e) => {
|
|
13243
|
+
if (e.data) {
|
|
13244
|
+
const json = JSON.parse(e.data);
|
|
13245
|
+
onmessage(json);
|
|
13246
|
+
}
|
|
13247
|
+
},
|
|
13248
|
+
onclose: () => {
|
|
13249
|
+
resolve();
|
|
13250
|
+
},
|
|
13251
|
+
onerror: (e) => {
|
|
13252
|
+
reject(e);
|
|
13253
|
+
}
|
|
13254
|
+
}
|
|
13255
|
+
);
|
|
13256
|
+
});
|
|
13257
|
+
}
|
|
13258
|
+
/**
|
|
13259
|
+
* 计算请求路径
|
|
13260
|
+
*
|
|
13261
|
+
* @author chitanda
|
|
13262
|
+
* @date 2023-10-12 11:10:56
|
|
13263
|
+
* @protected
|
|
13264
|
+
* @param {IParams} context
|
|
13265
|
+
* @return {*} {string}
|
|
13266
|
+
*/
|
|
13267
|
+
calcSsePath(context) {
|
|
13268
|
+
const srfkey = context[this.model.codeName.toLowerCase()];
|
|
13269
|
+
const curPath = "/".concat(this.model.codeName2.toLowerCase(), "/ssechatcompletion").concat(srfkey ? "/".concat(srfkey) : "");
|
|
13270
|
+
const resPath = calcResPath(context, this.model);
|
|
13271
|
+
return resPath + curPath;
|
|
13272
|
+
}
|
|
13158
13273
|
};
|
|
13159
13274
|
|
|
13160
13275
|
// src/service/vo/control.vo.ts
|
|
@@ -16180,6 +16295,7 @@ var ViewController = class extends BaseController {
|
|
|
16180
16295
|
panel.evt.on("onControlEvent", (event) => {
|
|
16181
16296
|
this.scheduler.triggerControlEvent(
|
|
16182
16297
|
event.triggerControlName,
|
|
16298
|
+
event.triggerEventName,
|
|
16183
16299
|
event.triggerEvent
|
|
16184
16300
|
);
|
|
16185
16301
|
});
|
|
@@ -16363,8 +16479,7 @@ var EditorController = class {
|
|
|
16363
16479
|
if (navigateParams && data) {
|
|
16364
16480
|
selfParams = convertNavData(navigateParams, data, params, context);
|
|
16365
16481
|
}
|
|
16366
|
-
|
|
16367
|
-
return { context: _context, params: _params };
|
|
16482
|
+
return { context: _context, params: selfParams };
|
|
16368
16483
|
}
|
|
16369
16484
|
/**
|
|
16370
16485
|
* 字符串转对象、数组对象
|
|
@@ -16509,6 +16624,11 @@ var ControlController = class extends BaseController {
|
|
|
16509
16624
|
this.handleControlParams();
|
|
16510
16625
|
this.initControlScheduler(this.model.controlLogics);
|
|
16511
16626
|
}
|
|
16627
|
+
async onMounted() {
|
|
16628
|
+
var _a;
|
|
16629
|
+
await super.onMounted();
|
|
16630
|
+
(_a = this.scheduler) == null ? void 0 : _a.startTimerTrigger();
|
|
16631
|
+
}
|
|
16512
16632
|
async onDestroyed() {
|
|
16513
16633
|
await super.onDestroyed();
|
|
16514
16634
|
if (this.scheduler) {
|
|
@@ -16566,7 +16686,16 @@ var ControlController = class extends BaseController {
|
|
|
16566
16686
|
handlerAbilityParams(args) {
|
|
16567
16687
|
const context = this.context.clone();
|
|
16568
16688
|
const params = { ...this.params };
|
|
16569
|
-
|
|
16689
|
+
let data = this.getData() || [];
|
|
16690
|
+
if (args == null ? void 0 : args.data) {
|
|
16691
|
+
data = Array.isArray(args.data) ? args.data : [args.data];
|
|
16692
|
+
}
|
|
16693
|
+
if (args == null ? void 0 : args.context) {
|
|
16694
|
+
Object.assign(context, args.context);
|
|
16695
|
+
}
|
|
16696
|
+
if (args == null ? void 0 : args.viewParam) {
|
|
16697
|
+
Object.assign(params, args.viewParam);
|
|
16698
|
+
}
|
|
16570
16699
|
return { context, params, data };
|
|
16571
16700
|
}
|
|
16572
16701
|
/**
|
|
@@ -16594,6 +16723,9 @@ var ControlController = class extends BaseController {
|
|
|
16594
16723
|
* @memberof ControlController
|
|
16595
16724
|
*/
|
|
16596
16725
|
handleControlParams() {
|
|
16726
|
+
if (!this.model.controlParam) {
|
|
16727
|
+
return;
|
|
16728
|
+
}
|
|
16597
16729
|
const { ctrlParams } = this.model.controlParam;
|
|
16598
16730
|
let params = {};
|
|
16599
16731
|
if (notNilEmpty8(ctrlParams)) {
|
|
@@ -16799,7 +16931,7 @@ var MDControlController = class extends ControlController {
|
|
|
16799
16931
|
this.state.curPage += 1;
|
|
16800
16932
|
}
|
|
16801
16933
|
const { context } = this.handlerAbilityParams(args);
|
|
16802
|
-
const params = await this.getFetchParams(args == null ? void 0 : args.
|
|
16934
|
+
const params = await this.getFetchParams(args == null ? void 0 : args.viewParam);
|
|
16803
16935
|
const res = await this.service.fetch(context, params);
|
|
16804
16936
|
if (typeof res.total === "number") {
|
|
16805
16937
|
this.state.total = res.total;
|
|
@@ -17294,7 +17426,7 @@ var CalendarController = class extends MDControlController {
|
|
|
17294
17426
|
async load(args = {}) {
|
|
17295
17427
|
const isInitialLoad = args.isInitialLoad === true;
|
|
17296
17428
|
const { context } = this.handlerAbilityParams(args);
|
|
17297
|
-
const params = await this.getFetchParams(args == null ? void 0 : args.
|
|
17429
|
+
const params = await this.getFetchParams(args == null ? void 0 : args.viewParam);
|
|
17298
17430
|
await this.startLoading();
|
|
17299
17431
|
let items;
|
|
17300
17432
|
try {
|
|
@@ -18515,30 +18647,20 @@ var CaptionBarController = class extends ControlController {
|
|
|
18515
18647
|
import { recursiveIterate, RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
18516
18648
|
|
|
18517
18649
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
18518
|
-
import { RuntimeModelError as
|
|
18650
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
18519
18651
|
import { isArray as isArray4 } from "qx-util";
|
|
18520
18652
|
|
|
18521
18653
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
18522
|
-
import { RuntimeModelError as
|
|
18654
|
+
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
18523
18655
|
|
|
18524
18656
|
// src/ui-logic/index.ts
|
|
18525
18657
|
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
18526
18658
|
|
|
18527
18659
|
// src/ui-logic/ui-logic.ts
|
|
18528
|
-
import { ModelError as ModelError24, RuntimeModelError as
|
|
18660
|
+
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
18529
18661
|
|
|
18530
18662
|
// src/ui-logic/ui-logic-context.ts
|
|
18531
18663
|
var UILogicContext = class {
|
|
18532
|
-
/**
|
|
18533
|
-
* Creates an instance of DELogicContext.
|
|
18534
|
-
* @author lxm
|
|
18535
|
-
* @date 2023-03-24 09:15:14
|
|
18536
|
-
* @param {Map<string, DELogicParam>} deLogicParams 实体逻辑参数集合
|
|
18537
|
-
* @param {IParams} context 上下文
|
|
18538
|
-
* @param {IData} data 数据对象
|
|
18539
|
-
* @param {IParams} viewParams 视图参数
|
|
18540
|
-
* @param {IParams} [opt] 额外参数
|
|
18541
|
-
*/
|
|
18542
18664
|
/**
|
|
18543
18665
|
* Creates an instance of UILogicContext.
|
|
18544
18666
|
* @author lxm
|
|
@@ -18589,6 +18711,9 @@ var UILogicContext = class {
|
|
|
18589
18711
|
* 上下文
|
|
18590
18712
|
*/
|
|
18591
18713
|
get context() {
|
|
18714
|
+
if (Object.prototype.hasOwnProperty.call(this.params, "context")) {
|
|
18715
|
+
return this.params.context;
|
|
18716
|
+
}
|
|
18592
18717
|
return this.parameters.context;
|
|
18593
18718
|
}
|
|
18594
18719
|
/**
|
|
@@ -18600,7 +18725,10 @@ var UILogicContext = class {
|
|
|
18600
18725
|
/**
|
|
18601
18726
|
* 视图参数
|
|
18602
18727
|
*/
|
|
18603
|
-
get
|
|
18728
|
+
get viewParam() {
|
|
18729
|
+
if (Object.prototype.hasOwnProperty.call(this.params, "viewParam")) {
|
|
18730
|
+
return this.params.viewParam;
|
|
18731
|
+
}
|
|
18604
18732
|
return this.parameters.params;
|
|
18605
18733
|
}
|
|
18606
18734
|
/**
|
|
@@ -18662,7 +18790,7 @@ var UILogicContext = class {
|
|
|
18662
18790
|
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
18663
18791
|
|
|
18664
18792
|
// src/ui-logic/ui-logic-link/ui-logic-link.ts
|
|
18665
|
-
import { ModelError as
|
|
18793
|
+
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
18666
18794
|
|
|
18667
18795
|
// src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
|
|
18668
18796
|
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
@@ -18672,7 +18800,61 @@ var UILogicLinkCond = class {
|
|
|
18672
18800
|
};
|
|
18673
18801
|
|
|
18674
18802
|
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
18675
|
-
import { ModelError as
|
|
18803
|
+
import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
18804
|
+
|
|
18805
|
+
// src/ui-logic/utils/handle-src-val.ts
|
|
18806
|
+
import { ModelError as ModelError17 } from "@ibiz-template/core";
|
|
18807
|
+
import { clone as clone14 } from "ramda";
|
|
18808
|
+
function handleSrcVal2(ctx, srcValParams) {
|
|
18809
|
+
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
18810
|
+
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
18811
|
+
const srcField = srcFieldName;
|
|
18812
|
+
let value;
|
|
18813
|
+
switch (srcValueType) {
|
|
18814
|
+
case "SRCDLPARAM":
|
|
18815
|
+
value = ctx.params[srcDEUILogicParamId];
|
|
18816
|
+
break;
|
|
18817
|
+
case "NULLVALUE":
|
|
18818
|
+
return null;
|
|
18819
|
+
case "NONEVALUE":
|
|
18820
|
+
return void 0;
|
|
18821
|
+
case "SRCVALUE":
|
|
18822
|
+
return ibiz.util.rawValue.format(srcValue);
|
|
18823
|
+
case "WEBCONTEXT":
|
|
18824
|
+
case "VIEWPARAM":
|
|
18825
|
+
value = ctx.parameters.params;
|
|
18826
|
+
break;
|
|
18827
|
+
case "APPLICATION":
|
|
18828
|
+
case "SESSION":
|
|
18829
|
+
case "APPDATA":
|
|
18830
|
+
case "DATACONTEXT":
|
|
18831
|
+
value = ctx.parameters.context;
|
|
18832
|
+
break;
|
|
18833
|
+
case "ENVPARAM":
|
|
18834
|
+
value = clone14(ibiz.env);
|
|
18835
|
+
break;
|
|
18836
|
+
default:
|
|
18837
|
+
throw new ModelError17(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
18838
|
+
}
|
|
18839
|
+
if (value && srcField) {
|
|
18840
|
+
try {
|
|
18841
|
+
value = ScriptFactory.execScriptFn(
|
|
18842
|
+
{ srcValue: value },
|
|
18843
|
+
"srcValue.".concat(srcField),
|
|
18844
|
+
{
|
|
18845
|
+
singleRowReturn: true,
|
|
18846
|
+
isAsync: false
|
|
18847
|
+
}
|
|
18848
|
+
);
|
|
18849
|
+
} catch (error) {
|
|
18850
|
+
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
18851
|
+
throw error;
|
|
18852
|
+
}
|
|
18853
|
+
}
|
|
18854
|
+
return value;
|
|
18855
|
+
}
|
|
18856
|
+
|
|
18857
|
+
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
18676
18858
|
var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
18677
18859
|
constructor(model) {
|
|
18678
18860
|
super();
|
|
@@ -18703,7 +18885,10 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18703
18885
|
* @return {*} {boolean}
|
|
18704
18886
|
*/
|
|
18705
18887
|
test(ctx, context, data) {
|
|
18706
|
-
const
|
|
18888
|
+
const dstVal = handleSrcVal2(ctx, {
|
|
18889
|
+
srcDEUILogicParamId: this.dstParam,
|
|
18890
|
+
srcFieldName: this.dstField
|
|
18891
|
+
});
|
|
18707
18892
|
switch (this.type) {
|
|
18708
18893
|
case "ENTITYFIELD": {
|
|
18709
18894
|
if (!this.value) {
|
|
@@ -18713,7 +18898,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18713
18898
|
);
|
|
18714
18899
|
}
|
|
18715
18900
|
const value = data[this.value] != null ? data[this.value] : context[this.value];
|
|
18716
|
-
return testCond(
|
|
18901
|
+
return testCond(dstVal, this.op, value);
|
|
18717
18902
|
}
|
|
18718
18903
|
case "SRCENTITYFIELD": {
|
|
18719
18904
|
if (!this.value) {
|
|
@@ -18722,13 +18907,16 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18722
18907
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
18723
18908
|
);
|
|
18724
18909
|
}
|
|
18725
|
-
const
|
|
18726
|
-
|
|
18910
|
+
const srcVal = handleSrcVal2(ctx, {
|
|
18911
|
+
srcDEUILogicParamId: this.srcParam,
|
|
18912
|
+
srcFieldName: this.value
|
|
18913
|
+
});
|
|
18914
|
+
return testCond(dstVal, this.op, srcVal);
|
|
18727
18915
|
}
|
|
18728
18916
|
case "CURTIME":
|
|
18729
|
-
throw new
|
|
18917
|
+
throw new ModelError18(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
|
|
18730
18918
|
default:
|
|
18731
|
-
return testCond(
|
|
18919
|
+
return testCond(dstVal, this.op, this.value);
|
|
18732
18920
|
}
|
|
18733
18921
|
}
|
|
18734
18922
|
};
|
|
@@ -18868,13 +19056,13 @@ var UILogicLink = class {
|
|
|
18868
19056
|
case 1:
|
|
18869
19057
|
return true;
|
|
18870
19058
|
case 2:
|
|
18871
|
-
throw new
|
|
19059
|
+
throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u7ED3\u675F");
|
|
18872
19060
|
case 3:
|
|
18873
|
-
throw new
|
|
19061
|
+
throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u62D2\u7EDD");
|
|
18874
19062
|
case 9:
|
|
18875
|
-
throw new
|
|
19063
|
+
throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u5E38\u5904\u7406");
|
|
18876
19064
|
default:
|
|
18877
|
-
throw new
|
|
19065
|
+
throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B:".concat(linkMode));
|
|
18878
19066
|
}
|
|
18879
19067
|
}
|
|
18880
19068
|
};
|
|
@@ -18918,7 +19106,7 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
18918
19106
|
dstAppDEActionId,
|
|
18919
19107
|
ctx.context,
|
|
18920
19108
|
requestData,
|
|
18921
|
-
ctx.
|
|
19109
|
+
ctx.viewParam
|
|
18922
19110
|
);
|
|
18923
19111
|
if (res.ok) {
|
|
18924
19112
|
ctx.params[retDEUILogicParamId] = res.data;
|
|
@@ -18946,6 +19134,8 @@ var DEUIActionNode = class extends UILogicNode {
|
|
|
18946
19134
|
}
|
|
18947
19135
|
await UIActionUtil.execAndResolved(dstAppDEUIActionId, {
|
|
18948
19136
|
...parameters,
|
|
19137
|
+
context: ctx.context,
|
|
19138
|
+
params: ctx.viewParam,
|
|
18949
19139
|
data: actionData
|
|
18950
19140
|
});
|
|
18951
19141
|
}
|
|
@@ -18958,7 +19148,7 @@ var StartNode2 = class extends UILogicNode {
|
|
|
18958
19148
|
};
|
|
18959
19149
|
|
|
18960
19150
|
// src/ui-logic/ui-logic-node/end-node/end-node.ts
|
|
18961
|
-
import { ModelError as
|
|
19151
|
+
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
18962
19152
|
var EndNode2 = class extends UILogicNode {
|
|
18963
19153
|
async exec(ctx) {
|
|
18964
19154
|
ctx.isEndNode = true;
|
|
@@ -18982,7 +19172,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18982
19172
|
case "LOGICPARAMFIELD":
|
|
18983
19173
|
case "BREAK":
|
|
18984
19174
|
default:
|
|
18985
|
-
throw new
|
|
19175
|
+
throw new ModelError20(
|
|
18986
19176
|
this.model,
|
|
18987
19177
|
"\u6682\u672A\u652F\u6301\u7684\u7ED3\u675F\u8282\u70B9\u8FD4\u56DE\u503C\u7C7B\u578B: ".concat(returnType)
|
|
18988
19178
|
);
|
|
@@ -18993,63 +19183,6 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18993
19183
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
18994
19184
|
import { ModelError as ModelError21, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
18995
19185
|
import { clone as clone15 } from "ramda";
|
|
18996
|
-
|
|
18997
|
-
// src/ui-logic/utils/handle-src-val.ts
|
|
18998
|
-
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
18999
|
-
import { clone as clone14 } from "ramda";
|
|
19000
|
-
function handleSrcVal2(ctx, srcValParams) {
|
|
19001
|
-
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
19002
|
-
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
19003
|
-
let srcField = srcFieldName;
|
|
19004
|
-
let value;
|
|
19005
|
-
switch (srcValueType) {
|
|
19006
|
-
case "SRCDLPARAM":
|
|
19007
|
-
value = ctx.params[srcDEUILogicParamId];
|
|
19008
|
-
if (ctx.isEntityParam(srcDEUILogicParamId)) {
|
|
19009
|
-
srcField = srcField == null ? void 0 : srcField.toLowerCase();
|
|
19010
|
-
}
|
|
19011
|
-
break;
|
|
19012
|
-
case "NULLVALUE":
|
|
19013
|
-
return null;
|
|
19014
|
-
case "NONEVALUE":
|
|
19015
|
-
return void 0;
|
|
19016
|
-
case "SRCVALUE":
|
|
19017
|
-
return ibiz.util.rawValue.format(srcValue);
|
|
19018
|
-
case "WEBCONTEXT":
|
|
19019
|
-
case "VIEWPARAM":
|
|
19020
|
-
value = ctx.viewParams;
|
|
19021
|
-
break;
|
|
19022
|
-
case "APPLICATION":
|
|
19023
|
-
case "SESSION":
|
|
19024
|
-
case "APPDATA":
|
|
19025
|
-
case "DATACONTEXT":
|
|
19026
|
-
value = ctx.context;
|
|
19027
|
-
break;
|
|
19028
|
-
case "ENVPARAM":
|
|
19029
|
-
value = clone14(ibiz.env);
|
|
19030
|
-
break;
|
|
19031
|
-
default:
|
|
19032
|
-
throw new ModelError20(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
19033
|
-
}
|
|
19034
|
-
if (value && srcField) {
|
|
19035
|
-
try {
|
|
19036
|
-
value = ScriptFactory.execScriptFn(
|
|
19037
|
-
{ srcValue: value },
|
|
19038
|
-
"srcValue.".concat(srcField),
|
|
19039
|
-
{
|
|
19040
|
-
singleRowReturn: true,
|
|
19041
|
-
isAsync: false
|
|
19042
|
-
}
|
|
19043
|
-
);
|
|
19044
|
-
} catch (error) {
|
|
19045
|
-
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
19046
|
-
throw error;
|
|
19047
|
-
}
|
|
19048
|
-
}
|
|
19049
|
-
return value;
|
|
19050
|
-
}
|
|
19051
|
-
|
|
19052
|
-
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
19053
19186
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
19054
19187
|
async exec(ctx) {
|
|
19055
19188
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -19428,6 +19561,7 @@ var RenewParamNode2 = class extends UILogicNode {
|
|
|
19428
19561
|
};
|
|
19429
19562
|
|
|
19430
19563
|
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
19564
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
19431
19565
|
var DataSetNode2 = class extends UILogicNode {
|
|
19432
19566
|
async exec(ctx) {
|
|
19433
19567
|
const {
|
|
@@ -19436,14 +19570,16 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
19436
19570
|
dstDEUILogicParamId,
|
|
19437
19571
|
retDEUILogicParamId
|
|
19438
19572
|
} = this.model;
|
|
19439
|
-
|
|
19573
|
+
if (!dstDEUILogicParamId) {
|
|
19574
|
+
throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
|
|
19575
|
+
}
|
|
19576
|
+
const queryParams = ctx.params[dstDEUILogicParamId];
|
|
19440
19577
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
19441
19578
|
const res = await app.deService.exec(
|
|
19442
19579
|
dstAppDataEntityId,
|
|
19443
19580
|
dstAppDEDataSetId,
|
|
19444
19581
|
ctx.context,
|
|
19445
|
-
|
|
19446
|
-
ctx.viewParams
|
|
19582
|
+
queryParams
|
|
19447
19583
|
);
|
|
19448
19584
|
if (res.ok) {
|
|
19449
19585
|
ctx.params[retDEUILogicParamId] = res.data;
|
|
@@ -19461,19 +19597,19 @@ var ThrowExceptionNode2 = class extends UILogicNode {
|
|
|
19461
19597
|
};
|
|
19462
19598
|
|
|
19463
19599
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
19464
|
-
import { RuntimeError as RuntimeError34, RuntimeModelError as
|
|
19600
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
19465
19601
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
19466
19602
|
async exec(ctx) {
|
|
19467
19603
|
ctx.isEndNode = true;
|
|
19468
19604
|
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
19469
19605
|
if (!fireCtrlId) {
|
|
19470
|
-
throw new
|
|
19606
|
+
throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
19471
19607
|
}
|
|
19472
19608
|
if (!eventName) {
|
|
19473
|
-
throw new
|
|
19609
|
+
throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
19474
19610
|
}
|
|
19475
19611
|
if (!eventParamId) {
|
|
19476
|
-
throw new
|
|
19612
|
+
throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
19477
19613
|
}
|
|
19478
19614
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
19479
19615
|
if (!invokeCtrl) {
|
|
@@ -19488,7 +19624,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
19488
19624
|
};
|
|
19489
19625
|
|
|
19490
19626
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
19491
|
-
import { RuntimeError as RuntimeError35, RuntimeModelError as
|
|
19627
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
19492
19628
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
19493
19629
|
async exec(ctx) {
|
|
19494
19630
|
const {
|
|
@@ -19498,13 +19634,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
19498
19634
|
retDEUILogicParamId
|
|
19499
19635
|
} = this.model;
|
|
19500
19636
|
if (!dstAppDataEntityId) {
|
|
19501
|
-
throw new
|
|
19637
|
+
throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
19502
19638
|
}
|
|
19503
19639
|
if (!dstAppDELogicId) {
|
|
19504
|
-
throw new
|
|
19640
|
+
throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
19505
19641
|
}
|
|
19506
19642
|
if (!dstDEUILogicParamId) {
|
|
19507
|
-
throw new
|
|
19643
|
+
throw new RuntimeModelError43(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
19508
19644
|
}
|
|
19509
19645
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
19510
19646
|
if (!dstParam) {
|
|
@@ -19513,9 +19649,9 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
19513
19649
|
const result = await execDELogicById(
|
|
19514
19650
|
dstAppDELogicId,
|
|
19515
19651
|
dstAppDataEntityId,
|
|
19516
|
-
|
|
19517
|
-
dstParam
|
|
19518
|
-
|
|
19652
|
+
ctx.context,
|
|
19653
|
+
dstParam,
|
|
19654
|
+
ctx.params
|
|
19519
19655
|
);
|
|
19520
19656
|
if (retDEUILogicParamId) {
|
|
19521
19657
|
ctx.params[retDEUILogicParamId] = result;
|
|
@@ -19546,7 +19682,8 @@ var UILogicParam = class {
|
|
|
19546
19682
|
calc(ctx) {
|
|
19547
19683
|
const tag = this.model.id;
|
|
19548
19684
|
const m = this.model;
|
|
19549
|
-
const {
|
|
19685
|
+
const { parameters } = ctx;
|
|
19686
|
+
const { context, params, data } = parameters;
|
|
19550
19687
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
19551
19688
|
if (m.codeName === "layoutPanel") {
|
|
19552
19689
|
ctx.params[tag] = parameters.view.layoutPanel.panelItems;
|
|
@@ -19590,7 +19727,7 @@ var UILogicParam = class {
|
|
|
19590
19727
|
} else if (m.simpleParam) {
|
|
19591
19728
|
ctx.params[tag] = {};
|
|
19592
19729
|
} else if (m.viewNavDataParam) {
|
|
19593
|
-
ctx.params[tag] =
|
|
19730
|
+
ctx.params[tag] = params;
|
|
19594
19731
|
} else if (m.viewSessionParam) {
|
|
19595
19732
|
throw new ModelError23(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u5F53\u524D\u89C6\u56FE\u4F1A\u8BDD");
|
|
19596
19733
|
}
|
|
@@ -19644,7 +19781,7 @@ var UILogic = class {
|
|
|
19644
19781
|
this.params = /* @__PURE__ */ new Map();
|
|
19645
19782
|
var _a;
|
|
19646
19783
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
19647
|
-
throw new
|
|
19784
|
+
throw new RuntimeModelError44(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
19648
19785
|
}
|
|
19649
19786
|
model.deuilogicNodes.forEach((node) => {
|
|
19650
19787
|
const { logicNodeType } = node;
|
|
@@ -19759,7 +19896,7 @@ var UILogic = class {
|
|
|
19759
19896
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
19760
19897
|
await this.deepExec(start, ctx);
|
|
19761
19898
|
} else {
|
|
19762
|
-
throw new
|
|
19899
|
+
throw new RuntimeModelError44(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
19763
19900
|
}
|
|
19764
19901
|
if (ctx.isEndNode) {
|
|
19765
19902
|
return ctx.result;
|
|
@@ -19895,7 +20032,7 @@ var UIActionProviderBase = class {
|
|
|
19895
20032
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
19896
20033
|
if (uilogicAttachMode === "REPLACE") {
|
|
19897
20034
|
if (!appDEUILogicId) {
|
|
19898
|
-
throw new
|
|
20035
|
+
throw new RuntimeModelError45(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
19899
20036
|
}
|
|
19900
20037
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
19901
20038
|
return result;
|
|
@@ -19922,7 +20059,7 @@ var UIActionProviderBase = class {
|
|
|
19922
20059
|
}
|
|
19923
20060
|
if (action.uilogicAttachMode === "AFTER") {
|
|
19924
20061
|
if (!appDEUILogicId) {
|
|
19925
|
-
throw new
|
|
20062
|
+
throw new RuntimeModelError45(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
19926
20063
|
}
|
|
19927
20064
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
19928
20065
|
}
|
|
@@ -20105,7 +20242,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
20105
20242
|
const entityName = action.appDataEntityId;
|
|
20106
20243
|
const methodName = action.appDEMethodId;
|
|
20107
20244
|
if (!entityName || !methodName) {
|
|
20108
|
-
throw new
|
|
20245
|
+
throw new RuntimeModelError46(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
20109
20246
|
}
|
|
20110
20247
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
20111
20248
|
action,
|
|
@@ -20220,7 +20357,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
20220
20357
|
};
|
|
20221
20358
|
|
|
20222
20359
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
20223
|
-
import { StringUtil, RuntimeModelError as
|
|
20360
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError47, ModelError as ModelError25 } from "@ibiz-template/core";
|
|
20224
20361
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
20225
20362
|
async execAction(action, args) {
|
|
20226
20363
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -20235,7 +20372,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20235
20372
|
case "WIZARD": {
|
|
20236
20373
|
const frontPSAppView = action.frontAppViewId;
|
|
20237
20374
|
if (!frontPSAppView) {
|
|
20238
|
-
throw new
|
|
20375
|
+
throw new RuntimeModelError47(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
20239
20376
|
}
|
|
20240
20377
|
const { resultContext, resultParams } = await this.handleParams(
|
|
20241
20378
|
action,
|
|
@@ -20291,7 +20428,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20291
20428
|
);
|
|
20292
20429
|
return result || {};
|
|
20293
20430
|
}
|
|
20294
|
-
throw new
|
|
20431
|
+
throw new RuntimeModelError47(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
20295
20432
|
}
|
|
20296
20433
|
};
|
|
20297
20434
|
|
|
@@ -20891,7 +21028,7 @@ var MenuPortletController = class extends PortletPartController {
|
|
|
20891
21028
|
};
|
|
20892
21029
|
|
|
20893
21030
|
// src/controller/control/data-view/data-view.controller.ts
|
|
20894
|
-
import { RuntimeModelError as
|
|
21031
|
+
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
20895
21032
|
import { isNil as isNil18 } from "ramda";
|
|
20896
21033
|
|
|
20897
21034
|
// src/controller/control/data-view/data-view.service.ts
|
|
@@ -21006,6 +21143,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21006
21143
|
* @param {IData} data 选中的单条数据
|
|
21007
21144
|
*/
|
|
21008
21145
|
async onRowClick(data) {
|
|
21146
|
+
var _a;
|
|
21009
21147
|
super.onRowClick(data);
|
|
21010
21148
|
const { groupAppDEFieldId } = this.model;
|
|
21011
21149
|
if (groupAppDEFieldId) {
|
|
@@ -21023,19 +21161,20 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21023
21161
|
});
|
|
21024
21162
|
if (this.state.singleSelect) {
|
|
21025
21163
|
this.state.groups.forEach((group) => {
|
|
21164
|
+
var _a2, _b;
|
|
21026
21165
|
let tempData = data;
|
|
21027
21166
|
if (group.selectedData.indexOf(tempData) !== -1) {
|
|
21028
21167
|
if (tempData && tempData instanceof ControlVO) {
|
|
21029
21168
|
tempData = tempData.getOrigin();
|
|
21030
21169
|
}
|
|
21031
21170
|
if (tempData) {
|
|
21032
|
-
group.groupActionGroupState.update(
|
|
21171
|
+
(_a2 = group.groupActionGroupState) == null ? void 0 : _a2.update(
|
|
21033
21172
|
tempData,
|
|
21034
21173
|
this.model.appDataEntityId
|
|
21035
21174
|
);
|
|
21036
21175
|
}
|
|
21037
21176
|
} else {
|
|
21038
|
-
group.groupActionGroupState.update(
|
|
21177
|
+
(_b = group.groupActionGroupState) == null ? void 0 : _b.update(
|
|
21039
21178
|
void 0,
|
|
21040
21179
|
this.model.appDataEntityId
|
|
21041
21180
|
);
|
|
@@ -21046,7 +21185,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21046
21185
|
return group.children.indexOf(data) !== -1;
|
|
21047
21186
|
});
|
|
21048
21187
|
if (actionGroup) {
|
|
21049
|
-
actionGroup.groupActionGroupState.update(
|
|
21188
|
+
(_a = actionGroup.groupActionGroupState) == null ? void 0 : _a.update(
|
|
21050
21189
|
actionGroup.selectedData[0],
|
|
21051
21190
|
this.model.appDataEntityId
|
|
21052
21191
|
);
|
|
@@ -21102,7 +21241,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21102
21241
|
const optItemModel = this.getOptItemModel();
|
|
21103
21242
|
if (optItemModel) {
|
|
21104
21243
|
if (!optItemModel.deuiactionGroup) {
|
|
21105
|
-
throw new
|
|
21244
|
+
throw new RuntimeModelError48(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
21106
21245
|
}
|
|
21107
21246
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
21108
21247
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -21151,7 +21290,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21151
21290
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
21152
21291
|
if (enableGroup && groupMode) {
|
|
21153
21292
|
if (!groupAppDEFieldId) {
|
|
21154
|
-
throw new
|
|
21293
|
+
throw new RuntimeModelError48(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
21155
21294
|
}
|
|
21156
21295
|
if (groupMode === "AUTO") {
|
|
21157
21296
|
this.handleAutoGroup();
|
|
@@ -21218,7 +21357,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21218
21357
|
async handleCodeListGroup() {
|
|
21219
21358
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
21220
21359
|
if (!groupCodeListId) {
|
|
21221
|
-
throw new
|
|
21360
|
+
throw new RuntimeModelError48(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
21222
21361
|
}
|
|
21223
21362
|
const { items } = this.state;
|
|
21224
21363
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -21305,10 +21444,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21305
21444
|
};
|
|
21306
21445
|
|
|
21307
21446
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
21308
|
-
import { RuntimeModelError as
|
|
21447
|
+
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
21309
21448
|
|
|
21310
21449
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
21311
|
-
import { RuntimeError as RuntimeError39, RuntimeModelError as
|
|
21450
|
+
import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
21312
21451
|
var ExpBarControlController = class extends ControlController {
|
|
21313
21452
|
constructor() {
|
|
21314
21453
|
super(...arguments);
|
|
@@ -21363,7 +21502,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21363
21502
|
get xDataController() {
|
|
21364
21503
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21365
21504
|
if (!controller) {
|
|
21366
|
-
throw new
|
|
21505
|
+
throw new RuntimeModelError49(
|
|
21367
21506
|
this.model,
|
|
21368
21507
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21369
21508
|
);
|
|
@@ -21710,7 +21849,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21710
21849
|
get xDataController() {
|
|
21711
21850
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21712
21851
|
if (!controller) {
|
|
21713
|
-
throw new
|
|
21852
|
+
throw new RuntimeModelError50(
|
|
21714
21853
|
this.model,
|
|
21715
21854
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21716
21855
|
);
|
|
@@ -21765,7 +21904,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21765
21904
|
};
|
|
21766
21905
|
|
|
21767
21906
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
21768
|
-
import { RuntimeError as RuntimeError40, RuntimeModelError as
|
|
21907
|
+
import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
21769
21908
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
21770
21909
|
constructor() {
|
|
21771
21910
|
super(...arguments);
|
|
@@ -21788,7 +21927,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21788
21927
|
get xDataController() {
|
|
21789
21928
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21790
21929
|
if (!controller) {
|
|
21791
|
-
throw new
|
|
21930
|
+
throw new RuntimeModelError51(
|
|
21792
21931
|
this.model,
|
|
21793
21932
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21794
21933
|
);
|
|
@@ -23396,7 +23535,7 @@ import { clone as clone17 } from "ramda";
|
|
|
23396
23535
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
23397
23536
|
import {
|
|
23398
23537
|
recursiveIterate as recursiveIterate3,
|
|
23399
|
-
RuntimeModelError as
|
|
23538
|
+
RuntimeModelError as RuntimeModelError52
|
|
23400
23539
|
} from "@ibiz-template/core";
|
|
23401
23540
|
var EditFormService = class extends ControlService {
|
|
23402
23541
|
/**
|
|
@@ -23514,7 +23653,7 @@ var EditFormService = class extends ControlService {
|
|
|
23514
23653
|
const wizardForm = this.model;
|
|
23515
23654
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
23516
23655
|
if (!methodName) {
|
|
23517
|
-
throw new
|
|
23656
|
+
throw new RuntimeModelError52(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
23518
23657
|
}
|
|
23519
23658
|
let res = await this.exec(
|
|
23520
23659
|
methodName,
|
|
@@ -23704,15 +23843,15 @@ var EditFormController = class extends FormController {
|
|
|
23704
23843
|
* @date 2023-08-25 02:45:11
|
|
23705
23844
|
* @return {*} {Promise<IData>}
|
|
23706
23845
|
*/
|
|
23707
|
-
async loadDraft() {
|
|
23708
|
-
const queryParams =
|
|
23846
|
+
async loadDraft(args) {
|
|
23847
|
+
const { context, params: queryParams } = this.handlerAbilityParams(args);
|
|
23709
23848
|
const params = await this.getDraftParams();
|
|
23710
23849
|
Object.assign(queryParams, params);
|
|
23711
23850
|
let res;
|
|
23712
23851
|
try {
|
|
23713
23852
|
await this.startLoading();
|
|
23714
23853
|
await this.evt.emit("onBeforeLoadDraft", { params: queryParams });
|
|
23715
|
-
res = await this.service.getDraft(
|
|
23854
|
+
res = await this.service.getDraft(context, queryParams);
|
|
23716
23855
|
} catch (error) {
|
|
23717
23856
|
await this.evt.emit("onLoadDraftError", void 0);
|
|
23718
23857
|
this.actionNotification("GETDRAFTERROR", {
|
|
@@ -23781,7 +23920,7 @@ var EditFormController = class extends FormController {
|
|
|
23781
23920
|
* @author lxm
|
|
23782
23921
|
* @date 2022-08-19 14:08:50
|
|
23783
23922
|
*/
|
|
23784
|
-
async load() {
|
|
23923
|
+
async load(args) {
|
|
23785
23924
|
const copyMode = this.params.srfcopymode;
|
|
23786
23925
|
if (copyMode) {
|
|
23787
23926
|
return this.copy();
|
|
@@ -23793,12 +23932,13 @@ var EditFormController = class extends FormController {
|
|
|
23793
23932
|
if (isLoadDraft) {
|
|
23794
23933
|
return this.loadDraft();
|
|
23795
23934
|
}
|
|
23796
|
-
const
|
|
23935
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
23936
|
+
const queryParams = clone17(params);
|
|
23797
23937
|
let res;
|
|
23798
23938
|
try {
|
|
23799
23939
|
await this.startLoading();
|
|
23800
23940
|
await this.evt.emit("onBeforeLoad", void 0);
|
|
23801
|
-
res = await this.service.get(
|
|
23941
|
+
res = await this.service.get(context, queryParams);
|
|
23802
23942
|
} catch (error) {
|
|
23803
23943
|
await this.evt.emit("onLoadError", void 0);
|
|
23804
23944
|
this.actionNotification("GETERROR", {
|
|
@@ -23822,10 +23962,10 @@ var EditFormController = class extends FormController {
|
|
|
23822
23962
|
* @author lxm
|
|
23823
23963
|
* @date 2022-08-31 22:08:40
|
|
23824
23964
|
*/
|
|
23825
|
-
async save() {
|
|
23965
|
+
async save(args) {
|
|
23826
23966
|
if (this.state.processing) {
|
|
23827
|
-
const
|
|
23828
|
-
return
|
|
23967
|
+
const data2 = await awaitTimeout(500, this.save.bind(this));
|
|
23968
|
+
return data2;
|
|
23829
23969
|
}
|
|
23830
23970
|
const isValid = await this.validate();
|
|
23831
23971
|
if (!isValid) {
|
|
@@ -23833,10 +23973,12 @@ var EditFormController = class extends FormController {
|
|
|
23833
23973
|
}
|
|
23834
23974
|
await this.startLoading();
|
|
23835
23975
|
await this.evt.emit("onBeforeSave", void 0);
|
|
23836
|
-
const
|
|
23976
|
+
const { context, data } = this.handlerAbilityParams(args);
|
|
23977
|
+
const saveData = data[0];
|
|
23978
|
+
const isCreate = saveData.srfuf === 0 /* CREATE */;
|
|
23837
23979
|
let res;
|
|
23838
23980
|
try {
|
|
23839
|
-
res = isCreate ? await this.service.create(
|
|
23981
|
+
res = isCreate ? await this.service.create(context, saveData) : await this.service.update(context, saveData);
|
|
23840
23982
|
} catch (error) {
|
|
23841
23983
|
await this.evt.emit("onSaveError", void 0);
|
|
23842
23984
|
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "ERROR"), {
|
|
@@ -23870,7 +24012,8 @@ var EditFormController = class extends FormController {
|
|
|
23870
24012
|
* @date 2022-09-01 09:09:36
|
|
23871
24013
|
* @returns {*}
|
|
23872
24014
|
*/
|
|
23873
|
-
async remove() {
|
|
24015
|
+
async remove(args) {
|
|
24016
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
23874
24017
|
let res;
|
|
23875
24018
|
let ok = false;
|
|
23876
24019
|
await this.evt.emit("onBeforeRemove", void 0);
|
|
@@ -23884,7 +24027,7 @@ var EditFormController = class extends FormController {
|
|
|
23884
24027
|
}
|
|
23885
24028
|
await this.startLoading();
|
|
23886
24029
|
try {
|
|
23887
|
-
res = await this.service.remove(
|
|
24030
|
+
res = await this.service.remove(context, params);
|
|
23888
24031
|
} catch (error) {
|
|
23889
24032
|
await this.evt.emit("onRemoveError", void 0);
|
|
23890
24033
|
this.actionNotification("REMOVEERROR", {
|
|
@@ -23979,21 +24122,15 @@ var EditFormController = class extends FormController {
|
|
|
23979
24122
|
* @param {IParams} [extraParams={}] 不走工作流启动视图时使用
|
|
23980
24123
|
* @returns {*} {Promise<void>}
|
|
23981
24124
|
*/
|
|
23982
|
-
async wfStart(
|
|
24125
|
+
async wfStart(args) {
|
|
23983
24126
|
const isValid = await this.validate();
|
|
23984
24127
|
if (!isValid) {
|
|
23985
24128
|
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23986
24129
|
}
|
|
23987
24130
|
await this.startLoading();
|
|
24131
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
23988
24132
|
try {
|
|
23989
|
-
await this.service.wfStart(
|
|
23990
|
-
this.context,
|
|
23991
|
-
{
|
|
23992
|
-
...this.params,
|
|
23993
|
-
...extraParams
|
|
23994
|
-
},
|
|
23995
|
-
this.data
|
|
23996
|
-
);
|
|
24133
|
+
await this.service.wfStart(context, params, this.data);
|
|
23997
24134
|
} catch (error) {
|
|
23998
24135
|
this.actionNotification("WFSTARTERROR", {
|
|
23999
24136
|
error
|
|
@@ -24012,21 +24149,15 @@ var EditFormController = class extends FormController {
|
|
|
24012
24149
|
* @param {IParams} [extraParams={}] 不走工作流操作视图时使用
|
|
24013
24150
|
* @returns {*} {Promise<void>}
|
|
24014
24151
|
*/
|
|
24015
|
-
async wfSubmit(
|
|
24152
|
+
async wfSubmit(args) {
|
|
24016
24153
|
const isValid = await this.validate();
|
|
24017
24154
|
if (!isValid) {
|
|
24018
24155
|
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
24019
24156
|
}
|
|
24020
24157
|
await this.startLoading();
|
|
24158
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
24021
24159
|
try {
|
|
24022
|
-
await this.service.wfSubmit(
|
|
24023
|
-
this.context,
|
|
24024
|
-
{
|
|
24025
|
-
...this.params,
|
|
24026
|
-
...extraParams
|
|
24027
|
-
},
|
|
24028
|
-
this.data
|
|
24029
|
-
);
|
|
24160
|
+
await this.service.wfSubmit(context, params, this.data);
|
|
24030
24161
|
} catch (error) {
|
|
24031
24162
|
this.actionNotification("WFSUBMITERROR", {
|
|
24032
24163
|
error
|
|
@@ -25064,7 +25195,7 @@ import {
|
|
|
25064
25195
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
25065
25196
|
recursiveIterate as recursiveIterate4,
|
|
25066
25197
|
RuntimeError as RuntimeError44,
|
|
25067
|
-
RuntimeModelError as
|
|
25198
|
+
RuntimeModelError as RuntimeModelError53
|
|
25068
25199
|
} from "@ibiz-template/core";
|
|
25069
25200
|
import { clone as clone18 } from "ramda";
|
|
25070
25201
|
|
|
@@ -25260,11 +25391,11 @@ var GridController = class extends MDControlController {
|
|
|
25260
25391
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
25261
25392
|
);
|
|
25262
25393
|
if (!this.groupFieldColumn) {
|
|
25263
|
-
throw new
|
|
25394
|
+
throw new RuntimeModelError53(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
25264
25395
|
}
|
|
25265
25396
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
25266
25397
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
25267
|
-
throw new
|
|
25398
|
+
throw new RuntimeModelError53(
|
|
25268
25399
|
this.groupFieldColumn.model,
|
|
25269
25400
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
25270
25401
|
);
|
|
@@ -25274,7 +25405,7 @@ var GridController = class extends MDControlController {
|
|
|
25274
25405
|
);
|
|
25275
25406
|
if (index !== -1 && index !== 0) {
|
|
25276
25407
|
if (this.isMultistageHeader) {
|
|
25277
|
-
throw new
|
|
25408
|
+
throw new RuntimeModelError53(
|
|
25278
25409
|
this.model,
|
|
25279
25410
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
25280
25411
|
);
|
|
@@ -25284,10 +25415,10 @@ var GridController = class extends MDControlController {
|
|
|
25284
25415
|
}
|
|
25285
25416
|
if (groupMode === "CODELIST") {
|
|
25286
25417
|
if (!groupCodeListId) {
|
|
25287
|
-
throw new
|
|
25418
|
+
throw new RuntimeModelError53(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
25288
25419
|
}
|
|
25289
25420
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
25290
|
-
throw new
|
|
25421
|
+
throw new RuntimeModelError53(
|
|
25291
25422
|
this.model,
|
|
25292
25423
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
25293
25424
|
);
|
|
@@ -25369,7 +25500,7 @@ var GridController = class extends MDControlController {
|
|
|
25369
25500
|
return;
|
|
25370
25501
|
}
|
|
25371
25502
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
25372
|
-
throw new
|
|
25503
|
+
throw new RuntimeModelError53(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
25373
25504
|
}
|
|
25374
25505
|
const params = await this.getFetchParams();
|
|
25375
25506
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -25822,7 +25953,7 @@ var GridController = class extends MDControlController {
|
|
|
25822
25953
|
*/
|
|
25823
25954
|
async loadData(args) {
|
|
25824
25955
|
const { context } = this.handlerAbilityParams(args);
|
|
25825
|
-
const params = await this.getFetchParams(args == null ? void 0 : args.
|
|
25956
|
+
const params = await this.getFetchParams(args == null ? void 0 : args.viewParam);
|
|
25826
25957
|
let res;
|
|
25827
25958
|
await this.startLoading();
|
|
25828
25959
|
try {
|
|
@@ -25881,7 +26012,7 @@ var GridController = class extends MDControlController {
|
|
|
25881
26012
|
offset: (startPage - 1) * size,
|
|
25882
26013
|
size: (endPage - startPage + 1) * size
|
|
25883
26014
|
} : { size: 1e3, page: 0 };
|
|
25884
|
-
data2 = await this.loadData({ params });
|
|
26015
|
+
data2 = await this.loadData({ viewParam: params });
|
|
25885
26016
|
}
|
|
25886
26017
|
if (type === "selectedRows") {
|
|
25887
26018
|
data2 = this.getData();
|
|
@@ -26192,7 +26323,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26192
26323
|
};
|
|
26193
26324
|
|
|
26194
26325
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
26195
|
-
import { RuntimeModelError as
|
|
26326
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
26196
26327
|
var GridUAColumnController = class extends GridColumnController {
|
|
26197
26328
|
/**
|
|
26198
26329
|
* 给rowController初始化操作列的状态
|
|
@@ -26205,7 +26336,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
26205
26336
|
var _a;
|
|
26206
26337
|
const { deuiactionGroup } = this.model;
|
|
26207
26338
|
if (!deuiactionGroup) {
|
|
26208
|
-
throw new
|
|
26339
|
+
throw new RuntimeModelError54(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
26209
26340
|
}
|
|
26210
26341
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
26211
26342
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -26759,6 +26890,9 @@ var PanelController = class extends ControlController {
|
|
|
26759
26890
|
*/
|
|
26760
26891
|
this.providers = {};
|
|
26761
26892
|
}
|
|
26893
|
+
get _evt() {
|
|
26894
|
+
return this.evt;
|
|
26895
|
+
}
|
|
26762
26896
|
/**
|
|
26763
26897
|
* 面板数据
|
|
26764
26898
|
*
|
|
@@ -26777,9 +26911,22 @@ var PanelController = class extends ControlController {
|
|
|
26777
26911
|
setInputData(data) {
|
|
26778
26912
|
this.inputData = data;
|
|
26779
26913
|
}
|
|
26914
|
+
getData() {
|
|
26915
|
+
return [this.data];
|
|
26916
|
+
}
|
|
26780
26917
|
async onCreated() {
|
|
26918
|
+
var _a;
|
|
26781
26919
|
await super.onCreated();
|
|
26782
26920
|
await this.initPanelItemControllers();
|
|
26921
|
+
if ((_a = this.scheduler) == null ? void 0 : _a.hasControlEventTrigger) {
|
|
26922
|
+
this._evt.on("onPanelItemEvent", (event) => {
|
|
26923
|
+
this.scheduler.triggerControlEvent(
|
|
26924
|
+
event.panelItemName,
|
|
26925
|
+
event.panelItemEventName,
|
|
26926
|
+
event
|
|
26927
|
+
);
|
|
26928
|
+
});
|
|
26929
|
+
}
|
|
26783
26930
|
}
|
|
26784
26931
|
async onMounted() {
|
|
26785
26932
|
this.load();
|
|
@@ -26929,8 +27076,18 @@ var PanelController = class extends ControlController {
|
|
|
26929
27076
|
// src/controller/control/panel/view-layout-panel/view-layout-panel.controller.ts
|
|
26930
27077
|
var ViewLayoutPanelController = class extends PanelController {
|
|
26931
27078
|
async onCreated() {
|
|
27079
|
+
var _a;
|
|
26932
27080
|
this.preprocessModel();
|
|
26933
27081
|
await super.onCreated();
|
|
27082
|
+
if ((_a = this.scheduler) == null ? void 0 : _a.hasControlEventTrigger) {
|
|
27083
|
+
this.evt.on("onControlEvent", (event) => {
|
|
27084
|
+
this.scheduler.triggerControlEvent(
|
|
27085
|
+
event.triggerControlName,
|
|
27086
|
+
event.triggerEventName,
|
|
27087
|
+
event.triggerEvent
|
|
27088
|
+
);
|
|
27089
|
+
});
|
|
27090
|
+
}
|
|
26934
27091
|
}
|
|
26935
27092
|
registerToCtx() {
|
|
26936
27093
|
}
|
|
@@ -27300,6 +27457,17 @@ var PanelItemController = class {
|
|
|
27300
27457
|
}
|
|
27301
27458
|
}
|
|
27302
27459
|
}
|
|
27460
|
+
/**
|
|
27461
|
+
* 点击事件
|
|
27462
|
+
* @author lxm
|
|
27463
|
+
* @date 2023-10-11 05:03:26
|
|
27464
|
+
*/
|
|
27465
|
+
onClick() {
|
|
27466
|
+
this.panel.evt.emit("onPanelItemEvent", {
|
|
27467
|
+
panelItemName: this.model.id,
|
|
27468
|
+
panelItemEventName: "onClick"
|
|
27469
|
+
});
|
|
27470
|
+
}
|
|
27303
27471
|
};
|
|
27304
27472
|
|
|
27305
27473
|
// src/controller/control/pickup-view-panel/pickup-view-panel.controller.ts
|
|
@@ -28746,7 +28914,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
28746
28914
|
};
|
|
28747
28915
|
|
|
28748
28916
|
// src/controller/control/kanban/kanban.controller.ts
|
|
28749
|
-
import { RuntimeError as RuntimeError48, RuntimeModelError as
|
|
28917
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
28750
28918
|
import { isNil as isNil20 } from "ramda";
|
|
28751
28919
|
|
|
28752
28920
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -28821,10 +28989,10 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28821
28989
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
28822
28990
|
const { minorSortDir } = this.model;
|
|
28823
28991
|
if (!sortField) {
|
|
28824
|
-
throw new
|
|
28992
|
+
throw new RuntimeModelError55(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
28825
28993
|
}
|
|
28826
28994
|
if (!minorSortDir) {
|
|
28827
|
-
throw new
|
|
28995
|
+
throw new RuntimeModelError55(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
28828
28996
|
}
|
|
28829
28997
|
const isAsc = minorSortDir === "ASC";
|
|
28830
28998
|
items.forEach((item) => {
|
|
@@ -29917,7 +30085,7 @@ var ViewEngineBase = class {
|
|
|
29917
30085
|
};
|
|
29918
30086
|
|
|
29919
30087
|
// src/engine/md-view.engine.ts
|
|
29920
|
-
import { RuntimeModelError as
|
|
30088
|
+
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
29921
30089
|
import { clone as clone20 } from "ramda";
|
|
29922
30090
|
var MDViewEngine = class extends ViewEngineBase {
|
|
29923
30091
|
/**
|
|
@@ -30113,7 +30281,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30113
30281
|
(item) => item.id === "newdata"
|
|
30114
30282
|
);
|
|
30115
30283
|
if (!openAppViewLogic) {
|
|
30116
|
-
throw new
|
|
30284
|
+
throw new RuntimeModelError56(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30117
30285
|
}
|
|
30118
30286
|
const params = clone20(this.view.params);
|
|
30119
30287
|
if (copyMode) {
|
|
@@ -30129,7 +30297,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30129
30297
|
if (result instanceof Object && result.ok) {
|
|
30130
30298
|
this.refresh();
|
|
30131
30299
|
} else if (result === -1) {
|
|
30132
|
-
throw new
|
|
30300
|
+
throw new RuntimeModelError56(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30133
30301
|
}
|
|
30134
30302
|
}
|
|
30135
30303
|
/**
|
|
@@ -30267,7 +30435,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30267
30435
|
|
|
30268
30436
|
// src/utils/error-handler/default-error-handler.ts
|
|
30269
30437
|
import {
|
|
30270
|
-
RuntimeModelError as
|
|
30438
|
+
RuntimeModelError as RuntimeModelError57,
|
|
30271
30439
|
ModelError as ModelError28,
|
|
30272
30440
|
HttpError as HttpError4,
|
|
30273
30441
|
NoticeError as NoticeError2,
|
|
@@ -30275,7 +30443,7 @@ import {
|
|
|
30275
30443
|
} from "@ibiz-template/core";
|
|
30276
30444
|
var DefaultErrorHandler = class {
|
|
30277
30445
|
handle(error) {
|
|
30278
|
-
if (error instanceof
|
|
30446
|
+
if (error instanceof RuntimeModelError57 || error instanceof ModelError28) {
|
|
30279
30447
|
ibiz.message.error(error.message, 10, true);
|
|
30280
30448
|
} else if (error instanceof HttpError4) {
|
|
30281
30449
|
if (error.status === 401) {
|
|
@@ -30529,13 +30697,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
30529
30697
|
};
|
|
30530
30698
|
|
|
30531
30699
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
30532
|
-
import { RuntimeModelError as
|
|
30700
|
+
import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
30533
30701
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
30534
30702
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30535
30703
|
execute(executeParams) {
|
|
30536
30704
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
30537
30705
|
if (!appDEUILogicId) {
|
|
30538
|
-
throw new
|
|
30706
|
+
throw new RuntimeModelError58(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
30539
30707
|
}
|
|
30540
30708
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
30541
30709
|
}
|
|
@@ -30747,13 +30915,13 @@ var LogicScheduler = class {
|
|
|
30747
30915
|
* @param {Partial<IUILogicParams>} executeParams 执行参数
|
|
30748
30916
|
* @return {*} {(boolean | undefined)}
|
|
30749
30917
|
*/
|
|
30750
|
-
triggerControlEvent(ctrlName,
|
|
30918
|
+
triggerControlEvent(ctrlName, eventName, executeParams) {
|
|
30751
30919
|
const matchParams = {
|
|
30752
30920
|
ctrlName,
|
|
30753
|
-
eventName
|
|
30921
|
+
eventName,
|
|
30754
30922
|
triggerType: "CTRLEVENT"
|
|
30755
30923
|
};
|
|
30756
|
-
this.triggerAndExecute(matchParams,
|
|
30924
|
+
this.triggerAndExecute(matchParams, executeParams);
|
|
30757
30925
|
}
|
|
30758
30926
|
};
|
|
30759
30927
|
|
|
@@ -30763,6 +30931,11 @@ var ControlLogicScheduler = class extends LogicScheduler {
|
|
|
30763
30931
|
const filterLogics = logics.filter(
|
|
30764
30932
|
(item) => item.triggerType !== "APPVIEWENGINE"
|
|
30765
30933
|
);
|
|
30934
|
+
filterLogics.forEach((logic) => {
|
|
30935
|
+
if (logic.triggerType === "CTRLEVENT") {
|
|
30936
|
+
logic.ctrlName = logic.itemName;
|
|
30937
|
+
}
|
|
30938
|
+
});
|
|
30766
30939
|
super(filterLogics);
|
|
30767
30940
|
}
|
|
30768
30941
|
};
|
|
@@ -31015,7 +31188,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
31015
31188
|
import {
|
|
31016
31189
|
ModelError as ModelError31,
|
|
31017
31190
|
RuntimeError as RuntimeError56,
|
|
31018
|
-
RuntimeModelError as
|
|
31191
|
+
RuntimeModelError as RuntimeModelError59
|
|
31019
31192
|
} from "@ibiz-template/core";
|
|
31020
31193
|
import { notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
31021
31194
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -31059,7 +31232,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31059
31232
|
} else {
|
|
31060
31233
|
openViewRef = appUILogic.openDataAppView;
|
|
31061
31234
|
if (!openViewRef) {
|
|
31062
|
-
throw new
|
|
31235
|
+
throw new RuntimeModelError59(
|
|
31063
31236
|
appUILogic,
|
|
31064
31237
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
31065
31238
|
);
|
|
@@ -31067,7 +31240,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31067
31240
|
}
|
|
31068
31241
|
const openView = openViewRef.refAppViewId;
|
|
31069
31242
|
if (!openView) {
|
|
31070
|
-
throw new
|
|
31243
|
+
throw new RuntimeModelError59(
|
|
31071
31244
|
appUILogic,
|
|
31072
31245
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
31073
31246
|
);
|
|
@@ -31094,7 +31267,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31094
31267
|
const appDataEntityId = parameters.view.model.appDataEntityId;
|
|
31095
31268
|
const formTypeName = await getFormTypeFieldName(appDataEntityId);
|
|
31096
31269
|
if (!formTypeName) {
|
|
31097
|
-
throw new
|
|
31270
|
+
throw new RuntimeModelError59(
|
|
31098
31271
|
appUILogic,
|
|
31099
31272
|
"".concat(appDataEntityId, "\u5B9E\u4F53\u7F3A\u5C11\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027")
|
|
31100
31273
|
);
|
|
@@ -31102,7 +31275,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31102
31275
|
const { data } = parameters;
|
|
31103
31276
|
const formTypeValue = data[0][formTypeName];
|
|
31104
31277
|
if (!formTypeValue) {
|
|
31105
|
-
throw new
|
|
31278
|
+
throw new RuntimeModelError59(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
31106
31279
|
}
|
|
31107
31280
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31108
31281
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -31144,7 +31317,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31144
31317
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
31145
31318
|
});
|
|
31146
31319
|
if (!newViewRef) {
|
|
31147
|
-
throw new
|
|
31320
|
+
throw new RuntimeModelError59(
|
|
31148
31321
|
appUILogic,
|
|
31149
31322
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
31150
31323
|
);
|
|
@@ -31154,7 +31327,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31154
31327
|
} else {
|
|
31155
31328
|
newViewRef = newDataAppView;
|
|
31156
31329
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
31157
|
-
throw new
|
|
31330
|
+
throw new RuntimeModelError59(
|
|
31158
31331
|
appUILogic,
|
|
31159
31332
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
31160
31333
|
);
|
|
@@ -31211,7 +31384,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31211
31384
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
31212
31385
|
const { context, params, ...rest } = parameters;
|
|
31213
31386
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
31214
|
-
throw new
|
|
31387
|
+
throw new RuntimeModelError59(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
31215
31388
|
}
|
|
31216
31389
|
const result = await ibiz.commands.execute(
|
|
31217
31390
|
OpenAppViewCommand.TAG,
|
|
@@ -31257,7 +31430,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31257
31430
|
const minorDERs = selfDe.minorAppDERSs;
|
|
31258
31431
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
31259
31432
|
if (!minorDERs) {
|
|
31260
|
-
throw new
|
|
31433
|
+
throw new RuntimeModelError59(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
31261
31434
|
}
|
|
31262
31435
|
let pickParentFieldName;
|
|
31263
31436
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -31350,7 +31523,16 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
31350
31523
|
}
|
|
31351
31524
|
match(matchParams) {
|
|
31352
31525
|
const superResult = super.match(matchParams);
|
|
31353
|
-
return superResult &&
|
|
31526
|
+
return superResult && // 忽略大小写匹配
|
|
31527
|
+
matchParams.ctrlName.toLowerCase() === this.logic.ctrlName.toLowerCase() && this.listenEventNames.includes(matchParams.eventName);
|
|
31528
|
+
}
|
|
31529
|
+
};
|
|
31530
|
+
|
|
31531
|
+
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
31532
|
+
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
31533
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31534
|
+
execute(executeParams) {
|
|
31535
|
+
UIActionUtil.execAndResolved(this.logic.appDEUIActionId, executeParams);
|
|
31354
31536
|
}
|
|
31355
31537
|
};
|
|
31356
31538
|
|
|
@@ -31401,6 +31583,10 @@ function installLogicSchedule() {
|
|
|
31401
31583
|
"APPUILOGIC",
|
|
31402
31584
|
(logic, scheduler) => new AppUILogicExecutor(logic, scheduler)
|
|
31403
31585
|
);
|
|
31586
|
+
ibiz.scheduler.executorFactory.register(
|
|
31587
|
+
"APPDEUIACTION",
|
|
31588
|
+
(logic, scheduler) => new AppDEUIActionExecutor(logic, scheduler)
|
|
31589
|
+
);
|
|
31404
31590
|
}
|
|
31405
31591
|
|
|
31406
31592
|
// src/install.ts
|