@ibiz-template/runtime 0.1.32 → 0.1.34
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 +448 -235
- 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 +2 -2
- package/out/controller/common/editor/code-list-editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/code-list-editor.controller.js +1 -1
- package/out/controller/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/form/search-form/search-form.service.d.ts +8 -0
- package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.service.js +19 -2
- package/out/controller/control/grid/grid/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/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +15 -7
- 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 +24 -0
- 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 +36 -2
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +79 -7
- 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/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +2 -1
- 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-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/prepare-js-param-node/prepare-js-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.js +16 -2
- package/out/ui-logic/ui-logic-param/ui-logic-param.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +5 -0
- package/package.json +5 -5
- package/src/controller/common/control/control.controller.ts +25 -1
- package/src/controller/common/control/md-control.controller.ts +2 -2
- package/src/controller/common/editor/code-list-editor.controller.ts +4 -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/form/search-form/search-form.service.ts +20 -2
- 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/controller/control/tree/tree.controller.ts +15 -8
- 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 +36 -0
- 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 +97 -7
- package/src/service/service/entity/method/ac-fetch.ts +16 -0
- package/src/service/service/entity/method/de-action.ts +7 -1
- package/src/service/service/entity/method/method.ts +11 -4
- 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/prepare-js-param-node/prepare-js-param-node.ts +24 -2
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +7 -0
package/dist/index.esm.js
CHANGED
|
@@ -8649,7 +8649,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
8649
8649
|
|
|
8650
8650
|
// src/command/app/open-app-view/open-app-view.ts
|
|
8651
8651
|
import { ModelError as ModelError14, RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
8652
|
-
import { clone as
|
|
8652
|
+
import { clone as clone12 } from "ramda";
|
|
8653
8653
|
|
|
8654
8654
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
8655
8655
|
import { isEmpty as isEmpty3 } from "ramda";
|
|
@@ -10988,6 +10988,7 @@ import {
|
|
|
10988
10988
|
HttpResponse as HttpResponse3,
|
|
10989
10989
|
RuntimeModelError as RuntimeModelError18
|
|
10990
10990
|
} from "@ibiz-template/core";
|
|
10991
|
+
import { clone as clone9 } from "ramda";
|
|
10991
10992
|
|
|
10992
10993
|
// src/service/service/entity/method/method.ts
|
|
10993
10994
|
import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
@@ -11452,23 +11453,26 @@ var Method = class {
|
|
|
11452
11453
|
switch (requestMethod) {
|
|
11453
11454
|
case "POST":
|
|
11454
11455
|
res = await this.app.net.post(
|
|
11455
|
-
|
|
11456
|
+
this.mergeRequestPath(path2, methodName),
|
|
11456
11457
|
notNilEmpty6(data) ? data : params
|
|
11457
11458
|
);
|
|
11458
11459
|
break;
|
|
11459
11460
|
case "GET":
|
|
11460
|
-
res = await this.app.net.get(
|
|
11461
|
+
res = await this.app.net.get(
|
|
11462
|
+
this.mergeRequestPath(path2, methodName),
|
|
11463
|
+
data || params
|
|
11464
|
+
);
|
|
11461
11465
|
break;
|
|
11462
11466
|
case "PUT": {
|
|
11463
11467
|
res = await this.app.net.put(
|
|
11464
|
-
|
|
11468
|
+
this.mergeRequestPath(path2, methodName),
|
|
11465
11469
|
notNilEmpty6(data) ? data : params
|
|
11466
11470
|
);
|
|
11467
11471
|
break;
|
|
11468
11472
|
}
|
|
11469
11473
|
case "DELETE":
|
|
11470
11474
|
res = await this.app.net.delete(
|
|
11471
|
-
|
|
11475
|
+
this.mergeRequestPath(path2, methodName),
|
|
11472
11476
|
data || params
|
|
11473
11477
|
);
|
|
11474
11478
|
break;
|
|
@@ -11486,6 +11490,9 @@ var Method = class {
|
|
|
11486
11490
|
}
|
|
11487
11491
|
throw new RuntimeModelError7(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
|
|
11488
11492
|
}
|
|
11493
|
+
mergeRequestPath(path2, methodName) {
|
|
11494
|
+
return "".concat(path2, "/").concat(methodName);
|
|
11495
|
+
}
|
|
11489
11496
|
/**
|
|
11490
11497
|
* 根据上下文计算当前请求路径
|
|
11491
11498
|
*
|
|
@@ -12602,7 +12609,12 @@ var DEActionMethod = class extends Method {
|
|
|
12602
12609
|
if (!deLogic) {
|
|
12603
12610
|
throw new RuntimeModelError18(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
|
|
12604
12611
|
}
|
|
12605
|
-
return execDELogicAction(
|
|
12612
|
+
return execDELogicAction(
|
|
12613
|
+
deLogic,
|
|
12614
|
+
clone9(context),
|
|
12615
|
+
data ? clone9(data) : {},
|
|
12616
|
+
params ? clone9(params) : {}
|
|
12617
|
+
);
|
|
12606
12618
|
}
|
|
12607
12619
|
if (data && !this.isLocalMode) {
|
|
12608
12620
|
data = await this.input.handle(context, data);
|
|
@@ -12893,7 +12905,7 @@ import {
|
|
|
12893
12905
|
RuntimeModelError as RuntimeModelError19
|
|
12894
12906
|
} from "@ibiz-template/core";
|
|
12895
12907
|
import { ascSort, descSort } from "qx-util";
|
|
12896
|
-
import { clone as
|
|
12908
|
+
import { clone as clone10, equals as equals2, isEmpty as isEmpty7, isNil as isNil8, where as where2 } from "ramda";
|
|
12897
12909
|
var FetchMethod = class extends Method {
|
|
12898
12910
|
get isLocalMode() {
|
|
12899
12911
|
return isLocalMode(this.method);
|
|
@@ -13033,7 +13045,7 @@ var FetchMethod = class extends Method {
|
|
|
13033
13045
|
const { page, size } = filter;
|
|
13034
13046
|
const start = page * size;
|
|
13035
13047
|
const end = (page + 1) * size - 1;
|
|
13036
|
-
const items = list.slice(start, end).map((item) =>
|
|
13048
|
+
const items = list.slice(start, end).map((item) => clone10(item));
|
|
13037
13049
|
return items;
|
|
13038
13050
|
}
|
|
13039
13051
|
/**
|
|
@@ -13063,6 +13075,13 @@ var FetchMethod = class extends Method {
|
|
|
13063
13075
|
}
|
|
13064
13076
|
};
|
|
13065
13077
|
|
|
13078
|
+
// src/service/service/entity/method/ac-fetch.ts
|
|
13079
|
+
var AcFetchMethod = class extends FetchMethod {
|
|
13080
|
+
mergeRequestPath(path2, methodName) {
|
|
13081
|
+
return "".concat(path2, "/ac/").concat(methodName, "?srfac=ac");
|
|
13082
|
+
}
|
|
13083
|
+
};
|
|
13084
|
+
|
|
13066
13085
|
// src/service/service/entity/de.service.ts
|
|
13067
13086
|
var DEService = class {
|
|
13068
13087
|
/**
|
|
@@ -13103,14 +13122,16 @@ var DEService = class {
|
|
|
13103
13122
|
* 获取实体服务方法实例
|
|
13104
13123
|
*
|
|
13105
13124
|
* @author chitanda
|
|
13106
|
-
* @date
|
|
13125
|
+
* @date 2023-10-12 17:10:10
|
|
13107
13126
|
* @protected
|
|
13108
13127
|
* @param {string} id
|
|
13128
|
+
* @param {boolean} [acMode=false]
|
|
13109
13129
|
* @return {*} {Method}
|
|
13110
13130
|
*/
|
|
13111
|
-
getMethod(id) {
|
|
13112
|
-
|
|
13113
|
-
|
|
13131
|
+
getMethod(id, acMode = false) {
|
|
13132
|
+
const cacheId = acMode ? "ac-".concat(id) : id;
|
|
13133
|
+
if (this.methodMap.has(cacheId)) {
|
|
13134
|
+
return this.methodMap.get(cacheId);
|
|
13114
13135
|
}
|
|
13115
13136
|
const model = findModelChild(this.model.appDEMethods, id);
|
|
13116
13137
|
let method = null;
|
|
@@ -13120,7 +13141,11 @@ var DEService = class {
|
|
|
13120
13141
|
break;
|
|
13121
13142
|
case "FETCH":
|
|
13122
13143
|
case "FETCHTEMP":
|
|
13123
|
-
|
|
13144
|
+
if (acMode) {
|
|
13145
|
+
method = new AcFetchMethod(this.model, model);
|
|
13146
|
+
} else {
|
|
13147
|
+
method = new FetchMethod(this.model, model);
|
|
13148
|
+
}
|
|
13124
13149
|
break;
|
|
13125
13150
|
default:
|
|
13126
13151
|
throw new ModelError13(
|
|
@@ -13128,7 +13153,7 @@ var DEService = class {
|
|
|
13128
13153
|
"\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType)
|
|
13129
13154
|
);
|
|
13130
13155
|
}
|
|
13131
|
-
this.methodMap.set(
|
|
13156
|
+
this.methodMap.set(cacheId, method);
|
|
13132
13157
|
return method;
|
|
13133
13158
|
}
|
|
13134
13159
|
/**
|
|
@@ -13149,10 +13174,78 @@ var DEService = class {
|
|
|
13149
13174
|
}
|
|
13150
13175
|
throw new RuntimeError12("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
13151
13176
|
}
|
|
13177
|
+
/**
|
|
13178
|
+
* 执行服务方法 ac 模式
|
|
13179
|
+
*
|
|
13180
|
+
* @author chitanda
|
|
13181
|
+
* @date 2022-09-13 19:09:55
|
|
13182
|
+
* @param {string} id 执行服务方法标识
|
|
13183
|
+
* @param {IParams} context
|
|
13184
|
+
* @param {IData} [params={}] 请求参数
|
|
13185
|
+
* @param {IParams} [params2={}] 查询参数
|
|
13186
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
13187
|
+
*/
|
|
13188
|
+
execAc(id, context, params, params2 = {}) {
|
|
13189
|
+
const method = this.getMethod(id, true);
|
|
13190
|
+
if (method) {
|
|
13191
|
+
return method.exec(context, params, params2);
|
|
13192
|
+
}
|
|
13193
|
+
throw new RuntimeError12("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
13194
|
+
}
|
|
13195
|
+
/**
|
|
13196
|
+
* 实体级别 AI 聊天会话
|
|
13197
|
+
*
|
|
13198
|
+
* @author chitanda
|
|
13199
|
+
* @date 2023-10-12 11:10:00
|
|
13200
|
+
* @param {IParams} context
|
|
13201
|
+
* @param {IParams} [params={}]
|
|
13202
|
+
* @param {FetchEventSourceInit} [options={}]
|
|
13203
|
+
* @return {*} {Promise<void>}
|
|
13204
|
+
*/
|
|
13205
|
+
aiChatSse(onmessage, context, params = {}, data = {}) {
|
|
13206
|
+
const app = ibiz.hub.getApp(this.model.appId);
|
|
13207
|
+
const path2 = this.calcSsePath(context);
|
|
13208
|
+
return new Promise((resolve, reject) => {
|
|
13209
|
+
app.net.sse(
|
|
13210
|
+
"/".concat(path2),
|
|
13211
|
+
{ srfactag: "AIChat", ...params },
|
|
13212
|
+
{
|
|
13213
|
+
headers: {
|
|
13214
|
+
"Content-Type": "application/json"
|
|
13215
|
+
},
|
|
13216
|
+
body: JSON.stringify(data),
|
|
13217
|
+
onmessage: (e) => {
|
|
13218
|
+
onmessage(e);
|
|
13219
|
+
},
|
|
13220
|
+
onclose: () => {
|
|
13221
|
+
resolve();
|
|
13222
|
+
},
|
|
13223
|
+
onerror: (e) => {
|
|
13224
|
+
reject(e);
|
|
13225
|
+
}
|
|
13226
|
+
}
|
|
13227
|
+
);
|
|
13228
|
+
});
|
|
13229
|
+
}
|
|
13230
|
+
/**
|
|
13231
|
+
* 计算请求路径
|
|
13232
|
+
*
|
|
13233
|
+
* @author chitanda
|
|
13234
|
+
* @date 2023-10-12 11:10:56
|
|
13235
|
+
* @protected
|
|
13236
|
+
* @param {IParams} context
|
|
13237
|
+
* @return {*} {string}
|
|
13238
|
+
*/
|
|
13239
|
+
calcSsePath(context) {
|
|
13240
|
+
const srfkey = context[this.model.codeName.toLowerCase()];
|
|
13241
|
+
const curPath = "/".concat(this.model.codeName2.toLowerCase(), "/ssechatcompletion").concat(srfkey ? "/".concat(srfkey) : "");
|
|
13242
|
+
const resPath = calcResPath(context, this.model);
|
|
13243
|
+
return resPath + curPath;
|
|
13244
|
+
}
|
|
13152
13245
|
};
|
|
13153
13246
|
|
|
13154
13247
|
// src/service/vo/control.vo.ts
|
|
13155
|
-
import { clone as
|
|
13248
|
+
import { clone as clone11, isNil as isNil9 } from "ramda";
|
|
13156
13249
|
var ControlVO = class _ControlVO {
|
|
13157
13250
|
/**
|
|
13158
13251
|
* 是否是新建数据,0为新建
|
|
@@ -13320,7 +13413,7 @@ var ControlVO = class _ControlVO {
|
|
|
13320
13413
|
* @return {*} {ControlVO}
|
|
13321
13414
|
*/
|
|
13322
13415
|
clone() {
|
|
13323
|
-
const cloneOrigin =
|
|
13416
|
+
const cloneOrigin = clone11(this.$origin);
|
|
13324
13417
|
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
13325
13418
|
Object.keys(this).forEach((key) => {
|
|
13326
13419
|
newVal[key] = this[key];
|
|
@@ -14193,7 +14286,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
14193
14286
|
* @return {*} {(Promise<IModalData | void>)}
|
|
14194
14287
|
*/
|
|
14195
14288
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
14196
|
-
const context =
|
|
14289
|
+
const context = clone12(_context);
|
|
14197
14290
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
14198
14291
|
if (!appView) {
|
|
14199
14292
|
throw new RuntimeError16("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -14457,7 +14550,7 @@ function installCommand() {
|
|
|
14457
14550
|
}
|
|
14458
14551
|
|
|
14459
14552
|
// src/app-hub.ts
|
|
14460
|
-
import { RuntimeError as
|
|
14553
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
14461
14554
|
|
|
14462
14555
|
// src/application.ts
|
|
14463
14556
|
import { Net } from "@ibiz-template/core";
|
|
@@ -16174,6 +16267,7 @@ var ViewController = class extends BaseController {
|
|
|
16174
16267
|
panel.evt.on("onControlEvent", (event) => {
|
|
16175
16268
|
this.scheduler.triggerControlEvent(
|
|
16176
16269
|
event.triggerControlName,
|
|
16270
|
+
event.triggerEventName,
|
|
16177
16271
|
event.triggerEvent
|
|
16178
16272
|
);
|
|
16179
16273
|
});
|
|
@@ -16357,8 +16451,7 @@ var EditorController = class {
|
|
|
16357
16451
|
if (navigateParams && data) {
|
|
16358
16452
|
selfParams = convertNavData(navigateParams, data, params, context);
|
|
16359
16453
|
}
|
|
16360
|
-
|
|
16361
|
-
return { context: _context, params: _params };
|
|
16454
|
+
return { context: _context, params: selfParams };
|
|
16362
16455
|
}
|
|
16363
16456
|
/**
|
|
16364
16457
|
* 字符串转对象、数组对象
|
|
@@ -16413,7 +16506,10 @@ var CodeListEditorController = class extends EditorController {
|
|
|
16413
16506
|
);
|
|
16414
16507
|
return dataItems;
|
|
16415
16508
|
}
|
|
16416
|
-
throw new RuntimeModelError21(
|
|
16509
|
+
throw new RuntimeModelError21(
|
|
16510
|
+
this.model,
|
|
16511
|
+
"\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
16512
|
+
);
|
|
16417
16513
|
}
|
|
16418
16514
|
};
|
|
16419
16515
|
|
|
@@ -16500,6 +16596,11 @@ var ControlController = class extends BaseController {
|
|
|
16500
16596
|
this.handleControlParams();
|
|
16501
16597
|
this.initControlScheduler(this.model.controlLogics);
|
|
16502
16598
|
}
|
|
16599
|
+
async onMounted() {
|
|
16600
|
+
var _a;
|
|
16601
|
+
await super.onMounted();
|
|
16602
|
+
(_a = this.scheduler) == null ? void 0 : _a.startTimerTrigger();
|
|
16603
|
+
}
|
|
16503
16604
|
async onDestroyed() {
|
|
16504
16605
|
await super.onDestroyed();
|
|
16505
16606
|
if (this.scheduler) {
|
|
@@ -16557,7 +16658,16 @@ var ControlController = class extends BaseController {
|
|
|
16557
16658
|
handlerAbilityParams(args) {
|
|
16558
16659
|
const context = this.context.clone();
|
|
16559
16660
|
const params = { ...this.params };
|
|
16560
|
-
|
|
16661
|
+
let data = this.getData() || [];
|
|
16662
|
+
if (args == null ? void 0 : args.data) {
|
|
16663
|
+
data = Array.isArray(args.data) ? args.data : [args.data];
|
|
16664
|
+
}
|
|
16665
|
+
if (args == null ? void 0 : args.context) {
|
|
16666
|
+
Object.assign(context, args.context);
|
|
16667
|
+
}
|
|
16668
|
+
if (args == null ? void 0 : args.viewParam) {
|
|
16669
|
+
Object.assign(params, args.viewParam);
|
|
16670
|
+
}
|
|
16561
16671
|
return { context, params, data };
|
|
16562
16672
|
}
|
|
16563
16673
|
/**
|
|
@@ -16585,6 +16695,9 @@ var ControlController = class extends BaseController {
|
|
|
16585
16695
|
* @memberof ControlController
|
|
16586
16696
|
*/
|
|
16587
16697
|
handleControlParams() {
|
|
16698
|
+
if (!this.model.controlParam) {
|
|
16699
|
+
return;
|
|
16700
|
+
}
|
|
16588
16701
|
const { ctrlParams } = this.model.controlParam;
|
|
16589
16702
|
let params = {};
|
|
16590
16703
|
if (notNilEmpty8(ctrlParams)) {
|
|
@@ -16790,7 +16903,7 @@ var MDControlController = class extends ControlController {
|
|
|
16790
16903
|
this.state.curPage += 1;
|
|
16791
16904
|
}
|
|
16792
16905
|
const { context } = this.handlerAbilityParams(args);
|
|
16793
|
-
const params = await this.getFetchParams(args == null ? void 0 : args.
|
|
16906
|
+
const params = await this.getFetchParams(args == null ? void 0 : args.viewParam);
|
|
16794
16907
|
const res = await this.service.fetch(context, params);
|
|
16795
16908
|
if (typeof res.total === "number") {
|
|
16796
16909
|
this.state.total = res.total;
|
|
@@ -16881,7 +16994,7 @@ var MDControlController = class extends ControlController {
|
|
|
16881
16994
|
});
|
|
16882
16995
|
}
|
|
16883
16996
|
if (needRefresh) {
|
|
16884
|
-
this.refresh();
|
|
16997
|
+
await this.refresh();
|
|
16885
16998
|
}
|
|
16886
16999
|
} catch (error) {
|
|
16887
17000
|
await this._evt.emit("onRemoveError", void 0);
|
|
@@ -17285,7 +17398,7 @@ var CalendarController = class extends MDControlController {
|
|
|
17285
17398
|
async load(args = {}) {
|
|
17286
17399
|
const isInitialLoad = args.isInitialLoad === true;
|
|
17287
17400
|
const { context } = this.handlerAbilityParams(args);
|
|
17288
|
-
const params = await this.getFetchParams(args == null ? void 0 : args.
|
|
17401
|
+
const params = await this.getFetchParams(args == null ? void 0 : args.viewParam);
|
|
17289
17402
|
await this.startLoading();
|
|
17290
17403
|
let items;
|
|
17291
17404
|
try {
|
|
@@ -17420,7 +17533,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
17420
17533
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
17421
17534
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
17422
17535
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
17423
|
-
import { clone as
|
|
17536
|
+
import { clone as clone13, isNil as isNil17, mergeDeepRight } from "ramda";
|
|
17424
17537
|
dayjs3.extend(minMax);
|
|
17425
17538
|
dayjs3.extend(isSameOrBefore);
|
|
17426
17539
|
dayjs3.extend(quarterOfYear);
|
|
@@ -17643,7 +17756,7 @@ var BaseSeriesGenerator = class {
|
|
|
17643
17756
|
dataPreprocess(data) {
|
|
17644
17757
|
const tempData = [];
|
|
17645
17758
|
data.forEach((singleData) => {
|
|
17646
|
-
tempData.push(
|
|
17759
|
+
tempData.push(clone13(singleData));
|
|
17647
17760
|
});
|
|
17648
17761
|
const { groupMode } = this.model;
|
|
17649
17762
|
if (groupMode) {
|
|
@@ -18503,7 +18616,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
18503
18616
|
};
|
|
18504
18617
|
|
|
18505
18618
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
18506
|
-
import { recursiveIterate, RuntimeError as
|
|
18619
|
+
import { recursiveIterate, RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
18507
18620
|
|
|
18508
18621
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
18509
18622
|
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
@@ -18513,7 +18626,7 @@ import { isArray as isArray4 } from "qx-util";
|
|
|
18513
18626
|
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
18514
18627
|
|
|
18515
18628
|
// src/ui-logic/index.ts
|
|
18516
|
-
import { RuntimeError as
|
|
18629
|
+
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
18517
18630
|
|
|
18518
18631
|
// src/ui-logic/ui-logic.ts
|
|
18519
18632
|
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
@@ -18653,7 +18766,7 @@ var UILogicContext = class {
|
|
|
18653
18766
|
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
18654
18767
|
|
|
18655
18768
|
// src/ui-logic/ui-logic-link/ui-logic-link.ts
|
|
18656
|
-
import { ModelError as
|
|
18769
|
+
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
18657
18770
|
|
|
18658
18771
|
// src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
|
|
18659
18772
|
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
@@ -18663,7 +18776,64 @@ var UILogicLinkCond = class {
|
|
|
18663
18776
|
};
|
|
18664
18777
|
|
|
18665
18778
|
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
18666
|
-
import { ModelError as
|
|
18779
|
+
import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
18780
|
+
|
|
18781
|
+
// src/ui-logic/utils/handle-src-val.ts
|
|
18782
|
+
import { ModelError as ModelError17 } from "@ibiz-template/core";
|
|
18783
|
+
import { clone as clone14 } from "ramda";
|
|
18784
|
+
function handleSrcVal2(ctx, srcValParams) {
|
|
18785
|
+
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
18786
|
+
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
18787
|
+
let srcField = srcFieldName;
|
|
18788
|
+
let value;
|
|
18789
|
+
switch (srcValueType) {
|
|
18790
|
+
case "SRCDLPARAM":
|
|
18791
|
+
value = ctx.params[srcDEUILogicParamId];
|
|
18792
|
+
if (ctx.isEntityParam(srcDEUILogicParamId)) {
|
|
18793
|
+
srcField = srcField == null ? void 0 : srcField.toLowerCase();
|
|
18794
|
+
}
|
|
18795
|
+
break;
|
|
18796
|
+
case "NULLVALUE":
|
|
18797
|
+
return null;
|
|
18798
|
+
case "NONEVALUE":
|
|
18799
|
+
return void 0;
|
|
18800
|
+
case "SRCVALUE":
|
|
18801
|
+
return ibiz.util.rawValue.format(srcValue);
|
|
18802
|
+
case "WEBCONTEXT":
|
|
18803
|
+
case "VIEWPARAM":
|
|
18804
|
+
value = ctx.viewParams;
|
|
18805
|
+
break;
|
|
18806
|
+
case "APPLICATION":
|
|
18807
|
+
case "SESSION":
|
|
18808
|
+
case "APPDATA":
|
|
18809
|
+
case "DATACONTEXT":
|
|
18810
|
+
value = ctx.context;
|
|
18811
|
+
break;
|
|
18812
|
+
case "ENVPARAM":
|
|
18813
|
+
value = clone14(ibiz.env);
|
|
18814
|
+
break;
|
|
18815
|
+
default:
|
|
18816
|
+
throw new ModelError17(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
18817
|
+
}
|
|
18818
|
+
if (value && srcField) {
|
|
18819
|
+
try {
|
|
18820
|
+
value = ScriptFactory.execScriptFn(
|
|
18821
|
+
{ srcValue: value },
|
|
18822
|
+
"srcValue.".concat(srcField),
|
|
18823
|
+
{
|
|
18824
|
+
singleRowReturn: true,
|
|
18825
|
+
isAsync: false
|
|
18826
|
+
}
|
|
18827
|
+
);
|
|
18828
|
+
} catch (error) {
|
|
18829
|
+
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
18830
|
+
throw error;
|
|
18831
|
+
}
|
|
18832
|
+
}
|
|
18833
|
+
return value;
|
|
18834
|
+
}
|
|
18835
|
+
|
|
18836
|
+
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
18667
18837
|
var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
18668
18838
|
constructor(model) {
|
|
18669
18839
|
super();
|
|
@@ -18694,7 +18864,10 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18694
18864
|
* @return {*} {boolean}
|
|
18695
18865
|
*/
|
|
18696
18866
|
test(ctx, context, data) {
|
|
18697
|
-
const
|
|
18867
|
+
const dstVal = handleSrcVal2(ctx, {
|
|
18868
|
+
srcDEUILogicParamId: this.dstParam,
|
|
18869
|
+
srcFieldName: this.dstField
|
|
18870
|
+
});
|
|
18698
18871
|
switch (this.type) {
|
|
18699
18872
|
case "ENTITYFIELD": {
|
|
18700
18873
|
if (!this.value) {
|
|
@@ -18704,7 +18877,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18704
18877
|
);
|
|
18705
18878
|
}
|
|
18706
18879
|
const value = data[this.value] != null ? data[this.value] : context[this.value];
|
|
18707
|
-
return testCond(
|
|
18880
|
+
return testCond(dstVal, this.op, value);
|
|
18708
18881
|
}
|
|
18709
18882
|
case "SRCENTITYFIELD": {
|
|
18710
18883
|
if (!this.value) {
|
|
@@ -18713,13 +18886,16 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18713
18886
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
18714
18887
|
);
|
|
18715
18888
|
}
|
|
18716
|
-
const
|
|
18717
|
-
|
|
18889
|
+
const srcVal = handleSrcVal2(ctx, {
|
|
18890
|
+
srcDEUILogicParamId: this.srcParam,
|
|
18891
|
+
srcFieldName: this.value
|
|
18892
|
+
});
|
|
18893
|
+
return testCond(dstVal, this.op, srcVal);
|
|
18718
18894
|
}
|
|
18719
18895
|
case "CURTIME":
|
|
18720
|
-
throw new
|
|
18896
|
+
throw new ModelError18(this.model, "\u6682\u672A\u652F\u6301\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u5F53\u524D\u65F6\u95F4]");
|
|
18721
18897
|
default:
|
|
18722
|
-
return testCond(
|
|
18898
|
+
return testCond(dstVal, this.op, this.value);
|
|
18723
18899
|
}
|
|
18724
18900
|
}
|
|
18725
18901
|
};
|
|
@@ -18859,13 +19035,13 @@ var UILogicLink = class {
|
|
|
18859
19035
|
case 1:
|
|
18860
19036
|
return true;
|
|
18861
19037
|
case 2:
|
|
18862
|
-
throw new
|
|
19038
|
+
throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u7ED3\u675F");
|
|
18863
19039
|
case 3:
|
|
18864
|
-
throw new
|
|
19040
|
+
throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u6B65\u62D2\u7EDD");
|
|
18865
19041
|
case 9:
|
|
18866
|
-
throw new
|
|
19042
|
+
throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B: \u5F02\u5E38\u5904\u7406");
|
|
18867
19043
|
default:
|
|
18868
|
-
throw new
|
|
19044
|
+
throw new ModelError19(this.model, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8FDE\u63A5\u7C7B\u578B:".concat(linkMode));
|
|
18869
19045
|
}
|
|
18870
19046
|
}
|
|
18871
19047
|
};
|
|
@@ -18949,7 +19125,7 @@ var StartNode2 = class extends UILogicNode {
|
|
|
18949
19125
|
};
|
|
18950
19126
|
|
|
18951
19127
|
// src/ui-logic/ui-logic-node/end-node/end-node.ts
|
|
18952
|
-
import { ModelError as
|
|
19128
|
+
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
18953
19129
|
var EndNode2 = class extends UILogicNode {
|
|
18954
19130
|
async exec(ctx) {
|
|
18955
19131
|
ctx.isEndNode = true;
|
|
@@ -18973,7 +19149,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18973
19149
|
case "LOGICPARAMFIELD":
|
|
18974
19150
|
case "BREAK":
|
|
18975
19151
|
default:
|
|
18976
|
-
throw new
|
|
19152
|
+
throw new ModelError20(
|
|
18977
19153
|
this.model,
|
|
18978
19154
|
"\u6682\u672A\u652F\u6301\u7684\u7ED3\u675F\u8282\u70B9\u8FD4\u56DE\u503C\u7C7B\u578B: ".concat(returnType)
|
|
18979
19155
|
);
|
|
@@ -18982,65 +19158,8 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18982
19158
|
};
|
|
18983
19159
|
|
|
18984
19160
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
18985
|
-
import { ModelError as ModelError21 } from "@ibiz-template/core";
|
|
18986
|
-
import { clone as
|
|
18987
|
-
|
|
18988
|
-
// src/ui-logic/utils/handle-src-val.ts
|
|
18989
|
-
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
18990
|
-
import { clone as clone13 } from "ramda";
|
|
18991
|
-
function handleSrcVal2(ctx, srcValParams) {
|
|
18992
|
-
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
18993
|
-
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
18994
|
-
let srcField = srcFieldName;
|
|
18995
|
-
let value;
|
|
18996
|
-
switch (srcValueType) {
|
|
18997
|
-
case "SRCDLPARAM":
|
|
18998
|
-
value = ctx.params[srcDEUILogicParamId];
|
|
18999
|
-
if (ctx.isEntityParam(srcDEUILogicParamId)) {
|
|
19000
|
-
srcField = srcField == null ? void 0 : srcField.toLowerCase();
|
|
19001
|
-
}
|
|
19002
|
-
break;
|
|
19003
|
-
case "NULLVALUE":
|
|
19004
|
-
return null;
|
|
19005
|
-
case "NONEVALUE":
|
|
19006
|
-
return void 0;
|
|
19007
|
-
case "SRCVALUE":
|
|
19008
|
-
return ibiz.util.rawValue.format(srcValue);
|
|
19009
|
-
case "WEBCONTEXT":
|
|
19010
|
-
case "VIEWPARAM":
|
|
19011
|
-
value = ctx.viewParams;
|
|
19012
|
-
break;
|
|
19013
|
-
case "APPLICATION":
|
|
19014
|
-
case "SESSION":
|
|
19015
|
-
case "APPDATA":
|
|
19016
|
-
case "DATACONTEXT":
|
|
19017
|
-
value = ctx.context;
|
|
19018
|
-
break;
|
|
19019
|
-
case "ENVPARAM":
|
|
19020
|
-
value = clone13(ibiz.env);
|
|
19021
|
-
break;
|
|
19022
|
-
default:
|
|
19023
|
-
throw new ModelError20(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
19024
|
-
}
|
|
19025
|
-
if (value && srcField) {
|
|
19026
|
-
try {
|
|
19027
|
-
value = ScriptFactory.execScriptFn(
|
|
19028
|
-
{ srcValue: value },
|
|
19029
|
-
"srcValue.".concat(srcField),
|
|
19030
|
-
{
|
|
19031
|
-
singleRowReturn: true,
|
|
19032
|
-
isAsync: false
|
|
19033
|
-
}
|
|
19034
|
-
);
|
|
19035
|
-
} catch (error) {
|
|
19036
|
-
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
19037
|
-
throw error;
|
|
19038
|
-
}
|
|
19039
|
-
}
|
|
19040
|
-
return value;
|
|
19041
|
-
}
|
|
19042
|
-
|
|
19043
|
-
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
19161
|
+
import { ModelError as ModelError21, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
19162
|
+
import { clone as clone15 } from "ramda";
|
|
19044
19163
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
19045
19164
|
async exec(ctx) {
|
|
19046
19165
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -19088,13 +19207,31 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19088
19207
|
*/
|
|
19089
19208
|
setParamValue(nodeParam, ctx) {
|
|
19090
19209
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
19210
|
+
if (!dstDEUILogicParamId) {
|
|
19211
|
+
throw new RuntimeError31("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
|
|
19212
|
+
}
|
|
19091
19213
|
let dstField = dstFieldName;
|
|
19092
19214
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
19093
19215
|
dstField = dstField == null ? void 0 : dstField.toLowerCase();
|
|
19094
19216
|
}
|
|
19095
19217
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
19096
19218
|
if (dstField) {
|
|
19097
|
-
|
|
19219
|
+
try {
|
|
19220
|
+
ScriptFactory.execScriptFn(
|
|
19221
|
+
{ srcVal, dstParam: ctx.params[dstDEUILogicParamId] },
|
|
19222
|
+
"dstParam.".concat(dstFieldName, " = srcVal"),
|
|
19223
|
+
{
|
|
19224
|
+
singleRowReturn: false,
|
|
19225
|
+
isAsync: false
|
|
19226
|
+
}
|
|
19227
|
+
);
|
|
19228
|
+
} catch (error) {
|
|
19229
|
+
ibiz.log.error(
|
|
19230
|
+
"\u7ED9\u76EE\u6807\u53C2\u6570\u5C5E\u6027".concat(dstFieldName, "\u8D4B\u503C\u62A5\u9519\uFF0C\u76EE\u6807\u53C2\u6570\uFF1A"),
|
|
19231
|
+
ctx.params[dstDEUILogicParamId]
|
|
19232
|
+
);
|
|
19233
|
+
throw error;
|
|
19234
|
+
}
|
|
19098
19235
|
} else {
|
|
19099
19236
|
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
19100
19237
|
}
|
|
@@ -19111,7 +19248,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19111
19248
|
copyParam(nodeParam, ctx) {
|
|
19112
19249
|
const { dstDEUILogicParamId } = nodeParam;
|
|
19113
19250
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
19114
|
-
ctx.params[dstDEUILogicParamId] =
|
|
19251
|
+
ctx.params[dstDEUILogicParamId] = clone15(srcVal);
|
|
19115
19252
|
}
|
|
19116
19253
|
/**
|
|
19117
19254
|
* 绑定参数
|
|
@@ -19188,7 +19325,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19188
19325
|
};
|
|
19189
19326
|
|
|
19190
19327
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
19191
|
-
import { RuntimeError as
|
|
19328
|
+
import { RuntimeError as RuntimeError32, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
19192
19329
|
import { isFunction } from "lodash-es";
|
|
19193
19330
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
19194
19331
|
async exec(ctx) {
|
|
@@ -19205,14 +19342,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
19205
19342
|
}
|
|
19206
19343
|
const invokeParam = ctx.params[invokeParamId];
|
|
19207
19344
|
if (!invokeParam) {
|
|
19208
|
-
throw new
|
|
19345
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
19209
19346
|
}
|
|
19210
19347
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
19211
19348
|
if (!invokeCtrl) {
|
|
19212
|
-
throw new
|
|
19349
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
19213
19350
|
}
|
|
19214
19351
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
19215
|
-
throw new
|
|
19352
|
+
throw new RuntimeError32("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
19216
19353
|
}
|
|
19217
19354
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
19218
19355
|
}
|
|
@@ -19328,7 +19465,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
19328
19465
|
|
|
19329
19466
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
19330
19467
|
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
19331
|
-
import { clone as
|
|
19468
|
+
import { clone as clone16 } from "ramda";
|
|
19332
19469
|
var CopyParamNode2 = class extends UILogicNode {
|
|
19333
19470
|
async exec(ctx) {
|
|
19334
19471
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -19339,7 +19476,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
19339
19476
|
);
|
|
19340
19477
|
}
|
|
19341
19478
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
19342
|
-
ctx.params[dstDEUILogicParamId] =
|
|
19479
|
+
ctx.params[dstDEUILogicParamId] = clone16(srcVal);
|
|
19343
19480
|
}
|
|
19344
19481
|
};
|
|
19345
19482
|
|
|
@@ -19425,16 +19562,16 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
19425
19562
|
};
|
|
19426
19563
|
|
|
19427
19564
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
19428
|
-
import { RuntimeError as
|
|
19565
|
+
import { RuntimeError as RuntimeError33 } from "@ibiz-template/core";
|
|
19429
19566
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
19430
19567
|
async exec(_ctx) {
|
|
19431
19568
|
const { errorInfo } = this.model;
|
|
19432
|
-
throw new
|
|
19569
|
+
throw new RuntimeError33(errorInfo);
|
|
19433
19570
|
}
|
|
19434
19571
|
};
|
|
19435
19572
|
|
|
19436
19573
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
19437
|
-
import { RuntimeError as
|
|
19574
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
19438
19575
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
19439
19576
|
async exec(ctx) {
|
|
19440
19577
|
ctx.isEndNode = true;
|
|
@@ -19450,18 +19587,18 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
19450
19587
|
}
|
|
19451
19588
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
19452
19589
|
if (!invokeCtrl) {
|
|
19453
|
-
throw new
|
|
19590
|
+
throw new RuntimeError34("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
19454
19591
|
}
|
|
19455
19592
|
const eventParam = ctx.params[eventParamId];
|
|
19456
19593
|
if (!eventParam) {
|
|
19457
|
-
throw new
|
|
19594
|
+
throw new RuntimeError34("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
19458
19595
|
}
|
|
19459
19596
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
19460
19597
|
}
|
|
19461
19598
|
};
|
|
19462
19599
|
|
|
19463
19600
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
19464
|
-
import { RuntimeError as
|
|
19601
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
19465
19602
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
19466
19603
|
async exec(ctx) {
|
|
19467
19604
|
const {
|
|
@@ -19481,7 +19618,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
19481
19618
|
}
|
|
19482
19619
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
19483
19620
|
if (!dstParam) {
|
|
19484
|
-
throw new
|
|
19621
|
+
throw new RuntimeError35("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
19485
19622
|
}
|
|
19486
19623
|
const result = await execDELogicById(
|
|
19487
19624
|
dstAppDELogicId,
|
|
@@ -19521,6 +19658,10 @@ var UILogicParam = class {
|
|
|
19521
19658
|
const m = this.model;
|
|
19522
19659
|
const { context, viewParams, data, parameters } = ctx;
|
|
19523
19660
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
19661
|
+
if (m.codeName === "layoutPanel") {
|
|
19662
|
+
ctx.params[tag] = parameters.view.layoutPanel.panelItems;
|
|
19663
|
+
return;
|
|
19664
|
+
}
|
|
19524
19665
|
if (m.default) {
|
|
19525
19666
|
ctx.params[tag] = data && data.length > 0 ? data[0] : {};
|
|
19526
19667
|
} else if (m.activeContainerParam) {
|
|
@@ -19774,7 +19915,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19774
19915
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
19775
19916
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
19776
19917
|
if (!deUILogic) {
|
|
19777
|
-
throw new
|
|
19918
|
+
throw new RuntimeError36(
|
|
19778
19919
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
19779
19920
|
);
|
|
19780
19921
|
}
|
|
@@ -19787,7 +19928,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19787
19928
|
}
|
|
19788
19929
|
|
|
19789
19930
|
// src/ui-action/uiaction-util.ts
|
|
19790
|
-
import { RuntimeError as
|
|
19931
|
+
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
19791
19932
|
var UIActionUtil = class {
|
|
19792
19933
|
/**
|
|
19793
19934
|
* 执行界面行为
|
|
@@ -19802,7 +19943,7 @@ var UIActionUtil = class {
|
|
|
19802
19943
|
static async exec(actionId, params) {
|
|
19803
19944
|
const action = await getUIActionById(actionId);
|
|
19804
19945
|
if (!action) {
|
|
19805
|
-
throw new
|
|
19946
|
+
throw new RuntimeError37("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
19806
19947
|
}
|
|
19807
19948
|
if (action.actionTarget === "SINGLEDATA") {
|
|
19808
19949
|
const validateResult = await params.view.call("Validate" /* VALIDATE */);
|
|
@@ -20327,7 +20468,7 @@ var ToolbarController = class extends ControlController {
|
|
|
20327
20468
|
const actionId = item.uiactionId;
|
|
20328
20469
|
const uiAction = await getUIActionById(actionId);
|
|
20329
20470
|
if (!uiAction) {
|
|
20330
|
-
throw new
|
|
20471
|
+
throw new RuntimeError38("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
20331
20472
|
}
|
|
20332
20473
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
20333
20474
|
if (enableLoading) {
|
|
@@ -20975,6 +21116,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20975
21116
|
* @param {IData} data 选中的单条数据
|
|
20976
21117
|
*/
|
|
20977
21118
|
async onRowClick(data) {
|
|
21119
|
+
var _a;
|
|
20978
21120
|
super.onRowClick(data);
|
|
20979
21121
|
const { groupAppDEFieldId } = this.model;
|
|
20980
21122
|
if (groupAppDEFieldId) {
|
|
@@ -20992,19 +21134,20 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20992
21134
|
});
|
|
20993
21135
|
if (this.state.singleSelect) {
|
|
20994
21136
|
this.state.groups.forEach((group) => {
|
|
21137
|
+
var _a2, _b;
|
|
20995
21138
|
let tempData = data;
|
|
20996
21139
|
if (group.selectedData.indexOf(tempData) !== -1) {
|
|
20997
21140
|
if (tempData && tempData instanceof ControlVO) {
|
|
20998
21141
|
tempData = tempData.getOrigin();
|
|
20999
21142
|
}
|
|
21000
21143
|
if (tempData) {
|
|
21001
|
-
group.groupActionGroupState.update(
|
|
21144
|
+
(_a2 = group.groupActionGroupState) == null ? void 0 : _a2.update(
|
|
21002
21145
|
tempData,
|
|
21003
21146
|
this.model.appDataEntityId
|
|
21004
21147
|
);
|
|
21005
21148
|
}
|
|
21006
21149
|
} else {
|
|
21007
|
-
group.groupActionGroupState.update(
|
|
21150
|
+
(_b = group.groupActionGroupState) == null ? void 0 : _b.update(
|
|
21008
21151
|
void 0,
|
|
21009
21152
|
this.model.appDataEntityId
|
|
21010
21153
|
);
|
|
@@ -21015,7 +21158,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21015
21158
|
return group.children.indexOf(data) !== -1;
|
|
21016
21159
|
});
|
|
21017
21160
|
if (actionGroup) {
|
|
21018
|
-
actionGroup.groupActionGroupState.update(
|
|
21161
|
+
(_a = actionGroup.groupActionGroupState) == null ? void 0 : _a.update(
|
|
21019
21162
|
actionGroup.selectedData[0],
|
|
21020
21163
|
this.model.appDataEntityId
|
|
21021
21164
|
);
|
|
@@ -21277,7 +21420,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21277
21420
|
import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
21278
21421
|
|
|
21279
21422
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
21280
|
-
import { RuntimeError as
|
|
21423
|
+
import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
21281
21424
|
var ExpBarControlController = class extends ControlController {
|
|
21282
21425
|
constructor() {
|
|
21283
21426
|
super(...arguments);
|
|
@@ -21591,7 +21734,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21591
21734
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
21592
21735
|
return this.XDataModel.navAppViewId;
|
|
21593
21736
|
}
|
|
21594
|
-
throw new
|
|
21737
|
+
throw new RuntimeError39("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
21595
21738
|
}
|
|
21596
21739
|
/**
|
|
21597
21740
|
* 获取导航视图
|
|
@@ -21734,7 +21877,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21734
21877
|
};
|
|
21735
21878
|
|
|
21736
21879
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
21737
|
-
import { RuntimeError as
|
|
21880
|
+
import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
21738
21881
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
21739
21882
|
constructor() {
|
|
21740
21883
|
super(...arguments);
|
|
@@ -21809,7 +21952,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21809
21952
|
const deData = node.deData || node;
|
|
21810
21953
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
21811
21954
|
if (!nodeModel) {
|
|
21812
|
-
throw new
|
|
21955
|
+
throw new RuntimeError40("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
21813
21956
|
}
|
|
21814
21957
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
21815
21958
|
result.context.currentSrfNav = nodeId;
|
|
@@ -22069,7 +22212,8 @@ var SearchFormService = class extends ControlService {
|
|
|
22069
22212
|
* @returns {*} {Promise<IHttpResponse>}
|
|
22070
22213
|
*/
|
|
22071
22214
|
async getDraft(_context, params = {}) {
|
|
22072
|
-
|
|
22215
|
+
const tempData = this.getFilteredData({ ...params });
|
|
22216
|
+
let res = { ok: true, status: 200, data: tempData };
|
|
22073
22217
|
res = this.handleResponse(res);
|
|
22074
22218
|
return res;
|
|
22075
22219
|
}
|
|
@@ -22089,7 +22233,7 @@ var SearchFormService = class extends ControlService {
|
|
|
22089
22233
|
}
|
|
22090
22234
|
},
|
|
22091
22235
|
{
|
|
22092
|
-
childrenFields: ["deformPages", "deformDetails"]
|
|
22236
|
+
childrenFields: ["deformPages", "deformTabPages", "deformDetails"]
|
|
22093
22237
|
}
|
|
22094
22238
|
);
|
|
22095
22239
|
}
|
|
@@ -22108,6 +22252,22 @@ var SearchFormService = class extends ControlService {
|
|
|
22108
22252
|
}
|
|
22109
22253
|
return res;
|
|
22110
22254
|
}
|
|
22255
|
+
/**
|
|
22256
|
+
* 根据表单项过滤出数据
|
|
22257
|
+
*
|
|
22258
|
+
* @return {*}
|
|
22259
|
+
* @author: zhujiamin
|
|
22260
|
+
* @Date: 2023-09-01 10:04:25
|
|
22261
|
+
*/
|
|
22262
|
+
getFilteredData(data) {
|
|
22263
|
+
const tempData = {};
|
|
22264
|
+
this.dataUIMap.forEach((dataUI) => {
|
|
22265
|
+
if (data[dataUI.dataKey] !== void 0) {
|
|
22266
|
+
tempData[dataUI.dataKey] = data[dataUI.dataKey];
|
|
22267
|
+
}
|
|
22268
|
+
});
|
|
22269
|
+
return tempData;
|
|
22270
|
+
}
|
|
22111
22271
|
};
|
|
22112
22272
|
|
|
22113
22273
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
@@ -23214,7 +23374,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
23214
23374
|
};
|
|
23215
23375
|
|
|
23216
23376
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
23217
|
-
import { RuntimeError as
|
|
23377
|
+
import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
23218
23378
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
23219
23379
|
/**
|
|
23220
23380
|
* 初始化
|
|
@@ -23229,7 +23389,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
23229
23389
|
const { model } = this.parent;
|
|
23230
23390
|
const { contentControl } = model;
|
|
23231
23391
|
if (!contentControl) {
|
|
23232
|
-
throw new
|
|
23392
|
+
throw new RuntimeError41("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
23233
23393
|
}
|
|
23234
23394
|
this.controlModel = contentControl;
|
|
23235
23395
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -23339,11 +23499,11 @@ import { isArray as isArray5 } from "lodash-es";
|
|
|
23339
23499
|
import {
|
|
23340
23500
|
awaitTimeout,
|
|
23341
23501
|
mergeInLeft,
|
|
23342
|
-
RuntimeError as
|
|
23502
|
+
RuntimeError as RuntimeError42,
|
|
23343
23503
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
23344
23504
|
} from "@ibiz-template/core";
|
|
23345
23505
|
import { debounce } from "lodash-es";
|
|
23346
|
-
import { clone as
|
|
23506
|
+
import { clone as clone17 } from "ramda";
|
|
23347
23507
|
|
|
23348
23508
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
23349
23509
|
import {
|
|
@@ -23656,15 +23816,15 @@ var EditFormController = class extends FormController {
|
|
|
23656
23816
|
* @date 2023-08-25 02:45:11
|
|
23657
23817
|
* @return {*} {Promise<IData>}
|
|
23658
23818
|
*/
|
|
23659
|
-
async loadDraft() {
|
|
23660
|
-
const queryParams =
|
|
23819
|
+
async loadDraft(args) {
|
|
23820
|
+
const { context, params: queryParams } = this.handlerAbilityParams(args);
|
|
23661
23821
|
const params = await this.getDraftParams();
|
|
23662
23822
|
Object.assign(queryParams, params);
|
|
23663
23823
|
let res;
|
|
23664
23824
|
try {
|
|
23665
23825
|
await this.startLoading();
|
|
23666
23826
|
await this.evt.emit("onBeforeLoadDraft", { params: queryParams });
|
|
23667
|
-
res = await this.service.getDraft(
|
|
23827
|
+
res = await this.service.getDraft(context, queryParams);
|
|
23668
23828
|
} catch (error) {
|
|
23669
23829
|
await this.evt.emit("onLoadDraftError", void 0);
|
|
23670
23830
|
this.actionNotification("GETDRAFTERROR", {
|
|
@@ -23690,8 +23850,8 @@ var EditFormController = class extends FormController {
|
|
|
23690
23850
|
* @return {*} {Promise<IData>}
|
|
23691
23851
|
*/
|
|
23692
23852
|
async copy() {
|
|
23693
|
-
const context =
|
|
23694
|
-
const queryParams =
|
|
23853
|
+
const context = clone17(this.context);
|
|
23854
|
+
const queryParams = clone17(this.params);
|
|
23695
23855
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
23696
23856
|
this.model.appDataEntityId
|
|
23697
23857
|
);
|
|
@@ -23733,7 +23893,7 @@ var EditFormController = class extends FormController {
|
|
|
23733
23893
|
* @author lxm
|
|
23734
23894
|
* @date 2022-08-19 14:08:50
|
|
23735
23895
|
*/
|
|
23736
|
-
async load() {
|
|
23896
|
+
async load(args) {
|
|
23737
23897
|
const copyMode = this.params.srfcopymode;
|
|
23738
23898
|
if (copyMode) {
|
|
23739
23899
|
return this.copy();
|
|
@@ -23745,12 +23905,13 @@ var EditFormController = class extends FormController {
|
|
|
23745
23905
|
if (isLoadDraft) {
|
|
23746
23906
|
return this.loadDraft();
|
|
23747
23907
|
}
|
|
23748
|
-
const
|
|
23908
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
23909
|
+
const queryParams = clone17(params);
|
|
23749
23910
|
let res;
|
|
23750
23911
|
try {
|
|
23751
23912
|
await this.startLoading();
|
|
23752
23913
|
await this.evt.emit("onBeforeLoad", void 0);
|
|
23753
|
-
res = await this.service.get(
|
|
23914
|
+
res = await this.service.get(context, queryParams);
|
|
23754
23915
|
} catch (error) {
|
|
23755
23916
|
await this.evt.emit("onLoadError", void 0);
|
|
23756
23917
|
this.actionNotification("GETERROR", {
|
|
@@ -23774,21 +23935,23 @@ var EditFormController = class extends FormController {
|
|
|
23774
23935
|
* @author lxm
|
|
23775
23936
|
* @date 2022-08-31 22:08:40
|
|
23776
23937
|
*/
|
|
23777
|
-
async save() {
|
|
23938
|
+
async save(args) {
|
|
23778
23939
|
if (this.state.processing) {
|
|
23779
|
-
const
|
|
23780
|
-
return
|
|
23940
|
+
const data2 = await awaitTimeout(500, this.save.bind(this));
|
|
23941
|
+
return data2;
|
|
23781
23942
|
}
|
|
23782
23943
|
const isValid = await this.validate();
|
|
23783
23944
|
if (!isValid) {
|
|
23784
|
-
throw new
|
|
23945
|
+
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23785
23946
|
}
|
|
23786
23947
|
await this.startLoading();
|
|
23787
23948
|
await this.evt.emit("onBeforeSave", void 0);
|
|
23788
|
-
const
|
|
23949
|
+
const { context, data } = this.handlerAbilityParams(args);
|
|
23950
|
+
const saveData = data[0];
|
|
23951
|
+
const isCreate = saveData.srfuf === 0 /* CREATE */;
|
|
23789
23952
|
let res;
|
|
23790
23953
|
try {
|
|
23791
|
-
res = isCreate ? await this.service.create(
|
|
23954
|
+
res = isCreate ? await this.service.create(context, saveData) : await this.service.update(context, saveData);
|
|
23792
23955
|
} catch (error) {
|
|
23793
23956
|
await this.evt.emit("onSaveError", void 0);
|
|
23794
23957
|
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "ERROR"), {
|
|
@@ -23822,7 +23985,8 @@ var EditFormController = class extends FormController {
|
|
|
23822
23985
|
* @date 2022-09-01 09:09:36
|
|
23823
23986
|
* @returns {*}
|
|
23824
23987
|
*/
|
|
23825
|
-
async remove() {
|
|
23988
|
+
async remove(args) {
|
|
23989
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
23826
23990
|
let res;
|
|
23827
23991
|
let ok = false;
|
|
23828
23992
|
await this.evt.emit("onBeforeRemove", void 0);
|
|
@@ -23836,7 +24000,7 @@ var EditFormController = class extends FormController {
|
|
|
23836
24000
|
}
|
|
23837
24001
|
await this.startLoading();
|
|
23838
24002
|
try {
|
|
23839
|
-
res = await this.service.remove(
|
|
24003
|
+
res = await this.service.remove(context, params);
|
|
23840
24004
|
} catch (error) {
|
|
23841
24005
|
await this.evt.emit("onRemoveError", void 0);
|
|
23842
24006
|
this.actionNotification("REMOVEERROR", {
|
|
@@ -23890,7 +24054,7 @@ var EditFormController = class extends FormController {
|
|
|
23890
24054
|
(item) => item.id === formItemUpdateId
|
|
23891
24055
|
);
|
|
23892
24056
|
if (!formItemUpdate) {
|
|
23893
|
-
throw new
|
|
24057
|
+
throw new RuntimeError42("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
23894
24058
|
}
|
|
23895
24059
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
23896
24060
|
const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
|
|
@@ -23931,21 +24095,15 @@ var EditFormController = class extends FormController {
|
|
|
23931
24095
|
* @param {IParams} [extraParams={}] 不走工作流启动视图时使用
|
|
23932
24096
|
* @returns {*} {Promise<void>}
|
|
23933
24097
|
*/
|
|
23934
|
-
async wfStart(
|
|
24098
|
+
async wfStart(args) {
|
|
23935
24099
|
const isValid = await this.validate();
|
|
23936
24100
|
if (!isValid) {
|
|
23937
|
-
throw new
|
|
24101
|
+
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23938
24102
|
}
|
|
23939
24103
|
await this.startLoading();
|
|
24104
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
23940
24105
|
try {
|
|
23941
|
-
await this.service.wfStart(
|
|
23942
|
-
this.context,
|
|
23943
|
-
{
|
|
23944
|
-
...this.params,
|
|
23945
|
-
...extraParams
|
|
23946
|
-
},
|
|
23947
|
-
this.data
|
|
23948
|
-
);
|
|
24106
|
+
await this.service.wfStart(context, params, this.data);
|
|
23949
24107
|
} catch (error) {
|
|
23950
24108
|
this.actionNotification("WFSTARTERROR", {
|
|
23951
24109
|
error
|
|
@@ -23964,21 +24122,15 @@ var EditFormController = class extends FormController {
|
|
|
23964
24122
|
* @param {IParams} [extraParams={}] 不走工作流操作视图时使用
|
|
23965
24123
|
* @returns {*} {Promise<void>}
|
|
23966
24124
|
*/
|
|
23967
|
-
async wfSubmit(
|
|
24125
|
+
async wfSubmit(args) {
|
|
23968
24126
|
const isValid = await this.validate();
|
|
23969
24127
|
if (!isValid) {
|
|
23970
|
-
throw new
|
|
24128
|
+
throw new RuntimeError42("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23971
24129
|
}
|
|
23972
24130
|
await this.startLoading();
|
|
24131
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
23973
24132
|
try {
|
|
23974
|
-
await this.service.wfSubmit(
|
|
23975
|
-
this.context,
|
|
23976
|
-
{
|
|
23977
|
-
...this.params,
|
|
23978
|
-
...extraParams
|
|
23979
|
-
},
|
|
23980
|
-
this.data
|
|
23981
|
-
);
|
|
24133
|
+
await this.service.wfSubmit(context, params, this.data);
|
|
23982
24134
|
} catch (error) {
|
|
23983
24135
|
this.actionNotification("WFSUBMITERROR", {
|
|
23984
24136
|
error
|
|
@@ -24198,7 +24350,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
24198
24350
|
};
|
|
24199
24351
|
|
|
24200
24352
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
24201
|
-
import { RuntimeError as
|
|
24353
|
+
import { RuntimeError as RuntimeError43, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
24202
24354
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
24203
24355
|
constructor() {
|
|
24204
24356
|
super(...arguments);
|
|
@@ -24303,7 +24455,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
24303
24455
|
const { model } = this.parent;
|
|
24304
24456
|
const { contentControl } = model;
|
|
24305
24457
|
if (!contentControl) {
|
|
24306
|
-
throw new
|
|
24458
|
+
throw new RuntimeError43("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
24307
24459
|
}
|
|
24308
24460
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
24309
24461
|
this.controlModel = contentControl;
|
|
@@ -25015,10 +25167,10 @@ import {
|
|
|
25015
25167
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
25016
25168
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
25017
25169
|
recursiveIterate as recursiveIterate4,
|
|
25018
|
-
RuntimeError as
|
|
25170
|
+
RuntimeError as RuntimeError44,
|
|
25019
25171
|
RuntimeModelError as RuntimeModelError52
|
|
25020
25172
|
} from "@ibiz-template/core";
|
|
25021
|
-
import { clone as
|
|
25173
|
+
import { clone as clone18 } from "ramda";
|
|
25022
25174
|
|
|
25023
25175
|
// src/controller/control/grid/grid/grid.service.ts
|
|
25024
25176
|
var GridService = class extends MDControlService {
|
|
@@ -25389,7 +25541,7 @@ var GridController = class extends MDControlController {
|
|
|
25389
25541
|
}
|
|
25390
25542
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
25391
25543
|
if (editingRow) {
|
|
25392
|
-
throw new
|
|
25544
|
+
throw new RuntimeError44("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
25393
25545
|
}
|
|
25394
25546
|
const queryParams = { ...this.params };
|
|
25395
25547
|
const defaultData = this.calcDefaultValue({}, true);
|
|
@@ -25428,7 +25580,7 @@ var GridController = class extends MDControlController {
|
|
|
25428
25580
|
(item) => item.data.srfkey === data.srfkey
|
|
25429
25581
|
);
|
|
25430
25582
|
if (!rowState) {
|
|
25431
|
-
throw new
|
|
25583
|
+
throw new RuntimeError44("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
25432
25584
|
}
|
|
25433
25585
|
if (!rowState.modified) {
|
|
25434
25586
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -25440,7 +25592,7 @@ var GridController = class extends MDControlController {
|
|
|
25440
25592
|
}
|
|
25441
25593
|
const isValid = await this.validate(rowState);
|
|
25442
25594
|
if (!isValid) {
|
|
25443
|
-
throw new
|
|
25595
|
+
throw new RuntimeError44("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
25444
25596
|
}
|
|
25445
25597
|
await this.startLoading();
|
|
25446
25598
|
let res;
|
|
@@ -25647,7 +25799,7 @@ var GridController = class extends MDControlController {
|
|
|
25647
25799
|
}
|
|
25648
25800
|
async toggleRowEdit() {
|
|
25649
25801
|
if (!this.model.enableRowNew) {
|
|
25650
|
-
throw new
|
|
25802
|
+
throw new RuntimeError44("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
25651
25803
|
}
|
|
25652
25804
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
25653
25805
|
}
|
|
@@ -25680,10 +25832,10 @@ var GridController = class extends MDControlController {
|
|
|
25680
25832
|
} else {
|
|
25681
25833
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
25682
25834
|
if (editingRow) {
|
|
25683
|
-
throw new
|
|
25835
|
+
throw new RuntimeError44("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
25684
25836
|
}
|
|
25685
25837
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
25686
|
-
row.cacheData =
|
|
25838
|
+
row.cacheData = clone18(row.data);
|
|
25687
25839
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
25688
25840
|
Object.assign(row.data, defaultVal);
|
|
25689
25841
|
}
|
|
@@ -25730,7 +25882,7 @@ var GridController = class extends MDControlController {
|
|
|
25730
25882
|
(item) => item.id === updateId
|
|
25731
25883
|
);
|
|
25732
25884
|
if (!findUpdate) {
|
|
25733
|
-
throw new
|
|
25885
|
+
throw new RuntimeError44("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
25734
25886
|
}
|
|
25735
25887
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
25736
25888
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -25774,7 +25926,7 @@ var GridController = class extends MDControlController {
|
|
|
25774
25926
|
*/
|
|
25775
25927
|
async loadData(args) {
|
|
25776
25928
|
const { context } = this.handlerAbilityParams(args);
|
|
25777
|
-
const params = await this.getFetchParams(args == null ? void 0 : args.
|
|
25929
|
+
const params = await this.getFetchParams(args == null ? void 0 : args.viewParam);
|
|
25778
25930
|
let res;
|
|
25779
25931
|
await this.startLoading();
|
|
25780
25932
|
try {
|
|
@@ -25800,7 +25952,7 @@ var GridController = class extends MDControlController {
|
|
|
25800
25952
|
codeListMap.set(key, items[key].codeListItems);
|
|
25801
25953
|
}
|
|
25802
25954
|
});
|
|
25803
|
-
const cloneData =
|
|
25955
|
+
const cloneData = clone18(
|
|
25804
25956
|
data2.map((item) => {
|
|
25805
25957
|
return item.getOrigin();
|
|
25806
25958
|
})
|
|
@@ -25833,13 +25985,13 @@ var GridController = class extends MDControlController {
|
|
|
25833
25985
|
offset: (startPage - 1) * size,
|
|
25834
25986
|
size: (endPage - startPage + 1) * size
|
|
25835
25987
|
} : { size: 1e3, page: 0 };
|
|
25836
|
-
data2 = await this.loadData({ params });
|
|
25988
|
+
data2 = await this.loadData({ viewParam: params });
|
|
25837
25989
|
}
|
|
25838
25990
|
if (type === "selectedRows") {
|
|
25839
25991
|
data2 = this.getData();
|
|
25840
25992
|
}
|
|
25841
25993
|
if (data2.length === 0) {
|
|
25842
|
-
throw new
|
|
25994
|
+
throw new RuntimeError44("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
25843
25995
|
}
|
|
25844
25996
|
return formatExcelData(data2);
|
|
25845
25997
|
};
|
|
@@ -25858,11 +26010,11 @@ var GridController = class extends MDControlController {
|
|
|
25858
26010
|
);
|
|
25859
26011
|
const data = formatArrayData(filterVal, await getExportData());
|
|
25860
26012
|
if (!ibiz.util.getExportExcel) {
|
|
25861
|
-
throw new
|
|
26013
|
+
throw new RuntimeError44("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
25862
26014
|
}
|
|
25863
26015
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
25864
26016
|
if (!exportExcel) {
|
|
25865
|
-
throw new
|
|
26017
|
+
throw new RuntimeError44("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
25866
26018
|
}
|
|
25867
26019
|
exportExcel.exportJsonToExcel({
|
|
25868
26020
|
header,
|
|
@@ -25910,7 +26062,7 @@ var GridController = class extends MDControlController {
|
|
|
25910
26062
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
25911
26063
|
import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
25912
26064
|
import dayjs4 from "dayjs";
|
|
25913
|
-
import { clone as
|
|
26065
|
+
import { clone as clone19, isNil as isNil19 } from "ramda";
|
|
25914
26066
|
var GridFieldColumnController = class extends GridColumnController {
|
|
25915
26067
|
constructor() {
|
|
25916
26068
|
super(...arguments);
|
|
@@ -26006,7 +26158,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26006
26158
|
srfkey: value,
|
|
26007
26159
|
...wfContext
|
|
26008
26160
|
});
|
|
26009
|
-
const tempParams =
|
|
26161
|
+
const tempParams = clone19(this.params);
|
|
26010
26162
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
26011
26163
|
row.data,
|
|
26012
26164
|
tempContext,
|
|
@@ -26198,7 +26350,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
26198
26350
|
};
|
|
26199
26351
|
|
|
26200
26352
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
26201
|
-
import { RuntimeError as
|
|
26353
|
+
import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
26202
26354
|
import Schema2 from "async-validator";
|
|
26203
26355
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
26204
26356
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -26332,7 +26484,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
26332
26484
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
26333
26485
|
const result = await this.validate(row);
|
|
26334
26486
|
if (!result) {
|
|
26335
|
-
throw new
|
|
26487
|
+
throw new RuntimeError45(
|
|
26336
26488
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
26337
26489
|
);
|
|
26338
26490
|
}
|
|
@@ -26690,7 +26842,7 @@ var ListController = class extends MDControlController {
|
|
|
26690
26842
|
};
|
|
26691
26843
|
|
|
26692
26844
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
26693
|
-
import { recursiveIterate as recursiveIterate5, RuntimeError as
|
|
26845
|
+
import { recursiveIterate as recursiveIterate5, RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
26694
26846
|
var PanelController = class extends ControlController {
|
|
26695
26847
|
constructor() {
|
|
26696
26848
|
super(...arguments);
|
|
@@ -26711,6 +26863,9 @@ var PanelController = class extends ControlController {
|
|
|
26711
26863
|
*/
|
|
26712
26864
|
this.providers = {};
|
|
26713
26865
|
}
|
|
26866
|
+
get _evt() {
|
|
26867
|
+
return this.evt;
|
|
26868
|
+
}
|
|
26714
26869
|
/**
|
|
26715
26870
|
* 面板数据
|
|
26716
26871
|
*
|
|
@@ -26729,9 +26884,22 @@ var PanelController = class extends ControlController {
|
|
|
26729
26884
|
setInputData(data) {
|
|
26730
26885
|
this.inputData = data;
|
|
26731
26886
|
}
|
|
26887
|
+
getData() {
|
|
26888
|
+
return [this.data];
|
|
26889
|
+
}
|
|
26732
26890
|
async onCreated() {
|
|
26891
|
+
var _a;
|
|
26733
26892
|
await super.onCreated();
|
|
26734
26893
|
await this.initPanelItemControllers();
|
|
26894
|
+
if ((_a = this.scheduler) == null ? void 0 : _a.hasControlEventTrigger) {
|
|
26895
|
+
this._evt.on("onPanelItemEvent", (event) => {
|
|
26896
|
+
this.scheduler.triggerControlEvent(
|
|
26897
|
+
event.panelItemName,
|
|
26898
|
+
event.panelItemEventName,
|
|
26899
|
+
event
|
|
26900
|
+
);
|
|
26901
|
+
});
|
|
26902
|
+
}
|
|
26735
26903
|
}
|
|
26736
26904
|
async onMounted() {
|
|
26737
26905
|
this.load();
|
|
@@ -26788,7 +26956,7 @@ var PanelController = class extends ControlController {
|
|
|
26788
26956
|
async load() {
|
|
26789
26957
|
const data = await this.prepareData();
|
|
26790
26958
|
if (!data) {
|
|
26791
|
-
throw new
|
|
26959
|
+
throw new RuntimeError46("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
26792
26960
|
}
|
|
26793
26961
|
const panelData = this.convertData(data);
|
|
26794
26962
|
this.state.data = panelData;
|
|
@@ -26881,8 +27049,18 @@ var PanelController = class extends ControlController {
|
|
|
26881
27049
|
// src/controller/control/panel/view-layout-panel/view-layout-panel.controller.ts
|
|
26882
27050
|
var ViewLayoutPanelController = class extends PanelController {
|
|
26883
27051
|
async onCreated() {
|
|
27052
|
+
var _a;
|
|
26884
27053
|
this.preprocessModel();
|
|
26885
27054
|
await super.onCreated();
|
|
27055
|
+
if ((_a = this.scheduler) == null ? void 0 : _a.hasControlEventTrigger) {
|
|
27056
|
+
this.evt.on("onControlEvent", (event) => {
|
|
27057
|
+
this.scheduler.triggerControlEvent(
|
|
27058
|
+
event.triggerControlName,
|
|
27059
|
+
event.triggerEventName,
|
|
27060
|
+
event.triggerEvent
|
|
27061
|
+
);
|
|
27062
|
+
});
|
|
27063
|
+
}
|
|
26886
27064
|
}
|
|
26887
27065
|
registerToCtx() {
|
|
26888
27066
|
}
|
|
@@ -27252,6 +27430,17 @@ var PanelItemController = class {
|
|
|
27252
27430
|
}
|
|
27253
27431
|
}
|
|
27254
27432
|
}
|
|
27433
|
+
/**
|
|
27434
|
+
* 点击事件
|
|
27435
|
+
* @author lxm
|
|
27436
|
+
* @date 2023-10-11 05:03:26
|
|
27437
|
+
*/
|
|
27438
|
+
onClick() {
|
|
27439
|
+
this.panel.evt.emit("onPanelItemEvent", {
|
|
27440
|
+
panelItemName: this.model.id,
|
|
27441
|
+
panelItemEventName: "onClick"
|
|
27442
|
+
});
|
|
27443
|
+
}
|
|
27255
27444
|
};
|
|
27256
27445
|
|
|
27257
27446
|
// src/controller/control/pickup-view-panel/pickup-view-panel.controller.ts
|
|
@@ -27985,12 +28174,18 @@ var TreeController = class extends MDControlController {
|
|
|
27985
28174
|
async loadNodes(parentNode) {
|
|
27986
28175
|
const params = await this.getFetchParams();
|
|
27987
28176
|
const hasQuery = !!params.query;
|
|
27988
|
-
|
|
27989
|
-
|
|
27990
|
-
|
|
27991
|
-
|
|
27992
|
-
|
|
27993
|
-
|
|
28177
|
+
this.state.isLoading = true;
|
|
28178
|
+
let nodes;
|
|
28179
|
+
try {
|
|
28180
|
+
nodes = await this.service.fetchChildNodes(parentNode, {
|
|
28181
|
+
context: this.context.clone(),
|
|
28182
|
+
params,
|
|
28183
|
+
hasQuery,
|
|
28184
|
+
defaultExpandedKeys: this.state.expandedKeys
|
|
28185
|
+
}) || [];
|
|
28186
|
+
} finally {
|
|
28187
|
+
this.state.isLoading = false;
|
|
28188
|
+
}
|
|
27994
28189
|
if (parentNode) {
|
|
27995
28190
|
parentNode.children = nodes;
|
|
27996
28191
|
} else {
|
|
@@ -28182,7 +28377,7 @@ var TreeController = class extends MDControlController {
|
|
|
28182
28377
|
};
|
|
28183
28378
|
|
|
28184
28379
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
28185
|
-
import { RuntimeError as
|
|
28380
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
28186
28381
|
|
|
28187
28382
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
28188
28383
|
var WizardPanelService = class extends ControlService {
|
|
@@ -28341,7 +28536,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28341
28536
|
const { activeFormTag } = this.state;
|
|
28342
28537
|
const controller = this.formControllers.get(activeFormTag);
|
|
28343
28538
|
if (!controller) {
|
|
28344
|
-
throw new
|
|
28539
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
28345
28540
|
}
|
|
28346
28541
|
return controller;
|
|
28347
28542
|
}
|
|
@@ -28416,7 +28611,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28416
28611
|
this.tagHistory.pop();
|
|
28417
28612
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
28418
28613
|
if (!prevTag) {
|
|
28419
|
-
throw new
|
|
28614
|
+
throw new RuntimeError47("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
28420
28615
|
}
|
|
28421
28616
|
this.state.activeFormTag = prevTag;
|
|
28422
28617
|
}
|
|
@@ -28437,7 +28632,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28437
28632
|
}
|
|
28438
28633
|
);
|
|
28439
28634
|
if (!wizardForm) {
|
|
28440
|
-
throw new
|
|
28635
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
28441
28636
|
}
|
|
28442
28637
|
nextTag = data.srfnextform;
|
|
28443
28638
|
} else {
|
|
@@ -28449,7 +28644,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28449
28644
|
});
|
|
28450
28645
|
const nextWizardStep = wizardSteps[index + 1];
|
|
28451
28646
|
if (!nextWizardStep) {
|
|
28452
|
-
throw new
|
|
28647
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
28453
28648
|
}
|
|
28454
28649
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
28455
28650
|
(wizardForm) => {
|
|
@@ -28462,7 +28657,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28462
28657
|
}
|
|
28463
28658
|
}
|
|
28464
28659
|
if (!nextTag) {
|
|
28465
|
-
throw new
|
|
28660
|
+
throw new RuntimeError47("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
28466
28661
|
}
|
|
28467
28662
|
this.state.activeFormTag = nextTag;
|
|
28468
28663
|
this.tagHistory.push(nextTag);
|
|
@@ -28692,7 +28887,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
28692
28887
|
};
|
|
28693
28888
|
|
|
28694
28889
|
// src/controller/control/kanban/kanban.controller.ts
|
|
28695
|
-
import { RuntimeError as
|
|
28890
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
28696
28891
|
import { isNil as isNil20 } from "ramda";
|
|
28697
28892
|
|
|
28698
28893
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -28780,7 +28975,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28780
28975
|
} else {
|
|
28781
28976
|
const toNum = Number(sortValue);
|
|
28782
28977
|
if (Number.isNaN(toNum)) {
|
|
28783
|
-
throw new
|
|
28978
|
+
throw new RuntimeError48(
|
|
28784
28979
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
28785
28980
|
);
|
|
28786
28981
|
}
|
|
@@ -28796,7 +28991,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28796
28991
|
}
|
|
28797
28992
|
handleDataGroup() {
|
|
28798
28993
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
28799
|
-
throw new
|
|
28994
|
+
throw new RuntimeError48("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
28800
28995
|
}
|
|
28801
28996
|
return super.handleDataGroup();
|
|
28802
28997
|
}
|
|
@@ -29504,7 +29699,7 @@ var AppHub = class {
|
|
|
29504
29699
|
this.registerAppView(appView);
|
|
29505
29700
|
return appView;
|
|
29506
29701
|
}
|
|
29507
|
-
throw new
|
|
29702
|
+
throw new RuntimeError49("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
29508
29703
|
}
|
|
29509
29704
|
/**
|
|
29510
29705
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -29535,7 +29730,7 @@ var AppHub = class {
|
|
|
29535
29730
|
this.registerAppDataEntity(entity, appId);
|
|
29536
29731
|
return entity;
|
|
29537
29732
|
}
|
|
29538
|
-
throw new
|
|
29733
|
+
throw new RuntimeError49("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
29539
29734
|
}
|
|
29540
29735
|
/**
|
|
29541
29736
|
* 新建 hub 应用
|
|
@@ -29556,7 +29751,7 @@ var AppHub = class {
|
|
|
29556
29751
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
29557
29752
|
this.registerApp(appModel);
|
|
29558
29753
|
} else {
|
|
29559
|
-
throw new
|
|
29754
|
+
throw new RuntimeError49("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
29560
29755
|
}
|
|
29561
29756
|
const app = new Application(appModel);
|
|
29562
29757
|
this.appMap.set(id, app);
|
|
@@ -29654,7 +29849,7 @@ var EngineFactory = class {
|
|
|
29654
29849
|
};
|
|
29655
29850
|
|
|
29656
29851
|
// src/engine/view-base.engine.ts
|
|
29657
|
-
import { RuntimeError as
|
|
29852
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
29658
29853
|
var ViewEngineBase = class {
|
|
29659
29854
|
/**
|
|
29660
29855
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -29842,7 +30037,7 @@ var ViewEngineBase = class {
|
|
|
29842
30037
|
const { appDataEntityId } = this.view.model;
|
|
29843
30038
|
const { evt, context, params } = this.view;
|
|
29844
30039
|
if (!appDataEntityId) {
|
|
29845
|
-
throw new
|
|
30040
|
+
throw new RuntimeError50("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
29846
30041
|
}
|
|
29847
30042
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
29848
30043
|
const res = await app.deService.exec(
|
|
@@ -29864,7 +30059,7 @@ var ViewEngineBase = class {
|
|
|
29864
30059
|
|
|
29865
30060
|
// src/engine/md-view.engine.ts
|
|
29866
30061
|
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
29867
|
-
import { clone as
|
|
30062
|
+
import { clone as clone20 } from "ramda";
|
|
29868
30063
|
var MDViewEngine = class extends ViewEngineBase {
|
|
29869
30064
|
/**
|
|
29870
30065
|
* 多数据部件名称
|
|
@@ -30061,7 +30256,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30061
30256
|
if (!openAppViewLogic) {
|
|
30062
30257
|
throw new RuntimeModelError55(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30063
30258
|
}
|
|
30064
|
-
const params =
|
|
30259
|
+
const params = clone20(this.view.params);
|
|
30065
30260
|
if (copyMode) {
|
|
30066
30261
|
params.srfcopymode = copyMode;
|
|
30067
30262
|
}
|
|
@@ -30217,7 +30412,7 @@ import {
|
|
|
30217
30412
|
ModelError as ModelError28,
|
|
30218
30413
|
HttpError as HttpError4,
|
|
30219
30414
|
NoticeError as NoticeError2,
|
|
30220
|
-
RuntimeError as
|
|
30415
|
+
RuntimeError as RuntimeError51
|
|
30221
30416
|
} from "@ibiz-template/core";
|
|
30222
30417
|
var DefaultErrorHandler = class {
|
|
30223
30418
|
handle(error) {
|
|
@@ -30235,7 +30430,7 @@ var DefaultErrorHandler = class {
|
|
|
30235
30430
|
}
|
|
30236
30431
|
} else if (error instanceof NoticeError2) {
|
|
30237
30432
|
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
30238
|
-
} else if (error instanceof
|
|
30433
|
+
} else if (error instanceof RuntimeError51) {
|
|
30239
30434
|
ibiz.message.error(error.message, 10, true);
|
|
30240
30435
|
}
|
|
30241
30436
|
ibiz.log.error(error);
|
|
@@ -30363,7 +30558,7 @@ var GlobalUtil = class {
|
|
|
30363
30558
|
};
|
|
30364
30559
|
|
|
30365
30560
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
30366
|
-
import { RuntimeError as
|
|
30561
|
+
import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
30367
30562
|
var LogicExecutor = class {
|
|
30368
30563
|
/**
|
|
30369
30564
|
* @author lxm
|
|
@@ -30384,7 +30579,7 @@ var LogicExecutor = class {
|
|
|
30384
30579
|
*/
|
|
30385
30580
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30386
30581
|
execute(_executeParams) {
|
|
30387
|
-
throw new
|
|
30582
|
+
throw new RuntimeError52("Method not implemented.");
|
|
30388
30583
|
}
|
|
30389
30584
|
/**
|
|
30390
30585
|
* 销毁方法
|
|
@@ -30693,13 +30888,13 @@ var LogicScheduler = class {
|
|
|
30693
30888
|
* @param {Partial<IUILogicParams>} executeParams 执行参数
|
|
30694
30889
|
* @return {*} {(boolean | undefined)}
|
|
30695
30890
|
*/
|
|
30696
|
-
triggerControlEvent(ctrlName,
|
|
30891
|
+
triggerControlEvent(ctrlName, eventName, executeParams) {
|
|
30697
30892
|
const matchParams = {
|
|
30698
30893
|
ctrlName,
|
|
30699
|
-
eventName
|
|
30894
|
+
eventName,
|
|
30700
30895
|
triggerType: "CTRLEVENT"
|
|
30701
30896
|
};
|
|
30702
|
-
this.triggerAndExecute(matchParams,
|
|
30897
|
+
this.triggerAndExecute(matchParams, executeParams);
|
|
30703
30898
|
}
|
|
30704
30899
|
};
|
|
30705
30900
|
|
|
@@ -30709,6 +30904,11 @@ var ControlLogicScheduler = class extends LogicScheduler {
|
|
|
30709
30904
|
const filterLogics = logics.filter(
|
|
30710
30905
|
(item) => item.triggerType !== "APPVIEWENGINE"
|
|
30711
30906
|
);
|
|
30907
|
+
filterLogics.forEach((logic) => {
|
|
30908
|
+
if (logic.triggerType === "CTRLEVENT") {
|
|
30909
|
+
logic.ctrlName = logic.itemName;
|
|
30910
|
+
}
|
|
30911
|
+
});
|
|
30712
30912
|
super(filterLogics);
|
|
30713
30913
|
}
|
|
30714
30914
|
};
|
|
@@ -30816,7 +31016,7 @@ var LogicSchedulerCenter = class {
|
|
|
30816
31016
|
};
|
|
30817
31017
|
|
|
30818
31018
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
30819
|
-
import { RuntimeError as
|
|
31019
|
+
import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
30820
31020
|
var LogicTrigger = class {
|
|
30821
31021
|
/**
|
|
30822
31022
|
* @author lxm
|
|
@@ -30876,7 +31076,7 @@ var LogicTrigger = class {
|
|
|
30876
31076
|
if (this.executor) {
|
|
30877
31077
|
return this.executor.execute(executeParams);
|
|
30878
31078
|
}
|
|
30879
|
-
throw new
|
|
31079
|
+
throw new RuntimeError53("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
30880
31080
|
}
|
|
30881
31081
|
/**
|
|
30882
31082
|
* 销毁方法
|
|
@@ -30893,12 +31093,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
30893
31093
|
};
|
|
30894
31094
|
|
|
30895
31095
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
30896
|
-
import { RuntimeError as
|
|
31096
|
+
import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
30897
31097
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
30898
31098
|
bindExecutor(executor) {
|
|
30899
31099
|
super.bindExecutor(executor);
|
|
30900
31100
|
if (this.executor.type !== "SCRIPT") {
|
|
30901
|
-
throw new
|
|
31101
|
+
throw new RuntimeError54(
|
|
30902
31102
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
30903
31103
|
);
|
|
30904
31104
|
}
|
|
@@ -30934,7 +31134,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
30934
31134
|
};
|
|
30935
31135
|
|
|
30936
31136
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
30937
|
-
import { RuntimeError as
|
|
31137
|
+
import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
30938
31138
|
var TimerTrigger = class extends LogicTrigger {
|
|
30939
31139
|
constructor() {
|
|
30940
31140
|
super(...arguments);
|
|
@@ -30943,7 +31143,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30943
31143
|
start() {
|
|
30944
31144
|
this.timer = setInterval(() => {
|
|
30945
31145
|
if (!this.scheduler.defaultParamsCb) {
|
|
30946
|
-
throw new
|
|
31146
|
+
throw new RuntimeError55("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
30947
31147
|
}
|
|
30948
31148
|
const params = this.scheduler.defaultParamsCb();
|
|
30949
31149
|
this.executor.execute(params);
|
|
@@ -30960,7 +31160,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30960
31160
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
30961
31161
|
import {
|
|
30962
31162
|
ModelError as ModelError31,
|
|
30963
|
-
RuntimeError as
|
|
31163
|
+
RuntimeError as RuntimeError56,
|
|
30964
31164
|
RuntimeModelError as RuntimeModelError58
|
|
30965
31165
|
} from "@ibiz-template/core";
|
|
30966
31166
|
import { notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
@@ -30996,7 +31196,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30996
31196
|
const { context, params, ...rest } = parameters;
|
|
30997
31197
|
const { data } = parameters;
|
|
30998
31198
|
if (!(data == null ? void 0 : data[0])) {
|
|
30999
|
-
throw new
|
|
31199
|
+
throw new RuntimeError56("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
31000
31200
|
}
|
|
31001
31201
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31002
31202
|
let openViewRef;
|
|
@@ -31053,7 +31253,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31053
31253
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31054
31254
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
31055
31255
|
if (!findView) {
|
|
31056
|
-
throw new
|
|
31256
|
+
throw new RuntimeError56(
|
|
31057
31257
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31058
31258
|
);
|
|
31059
31259
|
}
|
|
@@ -31171,12 +31371,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31171
31371
|
}
|
|
31172
31372
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
31173
31373
|
if (!selectData) {
|
|
31174
|
-
throw new
|
|
31374
|
+
throw new RuntimeError56("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
31175
31375
|
}
|
|
31176
31376
|
const indexType = selectData.srfkey;
|
|
31177
31377
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
31178
31378
|
if (!findView) {
|
|
31179
|
-
throw new
|
|
31379
|
+
throw new RuntimeError56(
|
|
31180
31380
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31181
31381
|
);
|
|
31182
31382
|
}
|
|
@@ -31296,7 +31496,16 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
31296
31496
|
}
|
|
31297
31497
|
match(matchParams) {
|
|
31298
31498
|
const superResult = super.match(matchParams);
|
|
31299
|
-
return superResult &&
|
|
31499
|
+
return superResult && // 忽略大小写匹配
|
|
31500
|
+
matchParams.ctrlName.toLowerCase() === this.logic.ctrlName.toLowerCase() && this.listenEventNames.includes(matchParams.eventName);
|
|
31501
|
+
}
|
|
31502
|
+
};
|
|
31503
|
+
|
|
31504
|
+
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
31505
|
+
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
31506
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31507
|
+
execute(executeParams) {
|
|
31508
|
+
UIActionUtil.execAndResolved(this.logic.appDEUIActionId, executeParams);
|
|
31300
31509
|
}
|
|
31301
31510
|
};
|
|
31302
31511
|
|
|
@@ -31347,6 +31556,10 @@ function installLogicSchedule() {
|
|
|
31347
31556
|
"APPUILOGIC",
|
|
31348
31557
|
(logic, scheduler) => new AppUILogicExecutor(logic, scheduler)
|
|
31349
31558
|
);
|
|
31559
|
+
ibiz.scheduler.executorFactory.register(
|
|
31560
|
+
"APPDEUIACTION",
|
|
31561
|
+
(logic, scheduler) => new AppDEUIActionExecutor(logic, scheduler)
|
|
31562
|
+
);
|
|
31350
31563
|
}
|
|
31351
31564
|
|
|
31352
31565
|
// src/install.ts
|