@ibiz-template/runtime 0.7.25-alpha.0 → 0.7.25
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 +393 -183
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +8 -1
- package/out/controller/control/chart/generator/chart-options-generator.d.ts +1 -1
- package/out/controller/control/chart/generator/chart-options-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/chart-options-generator.js +9 -0
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +26 -2
- package/out/controller/control/dashboard/portlet/view-portlet/view-portlet.controller.js +2 -2
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +1 -1
- package/out/controller/control/kanban/kanban.controller.d.ts +10 -0
- package/out/controller/control/kanban/kanban.controller.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.controller.js +109 -68
- package/out/controller/control/kanban/kanban.service.d.ts +10 -0
- package/out/controller/control/kanban/kanban.service.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.service.js +20 -0
- package/out/controller/control/report-panel/generator/bi-generator.d.ts +21 -0
- package/out/controller/control/report-panel/generator/bi-generator.d.ts.map +1 -0
- package/out/controller/control/report-panel/generator/bi-generator.js +33 -0
- package/out/controller/control/report-panel/generator/generator-factory.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/generator-factory.js +9 -0
- package/out/controller/control/report-panel/report-panel.controller.d.ts +8 -0
- package/out/controller/control/report-panel/report-panel.controller.d.ts.map +1 -1
- package/out/controller/control/report-panel/report-panel.controller.js +42 -0
- package/out/controller/control/search-bar/entity-schema.d.ts.map +1 -1
- package/out/controller/control/search-bar/entity-schema.js +29 -27
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +4 -0
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +4 -0
- package/out/locale/zh-CN/index.d.ts +4 -0
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +4 -0
- package/out/service/service/entity/method/de-action.d.ts +2 -2
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +15 -12
- package/out/service/service/entity/method/method.d.ts +10 -0
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +19 -0
- package/out/service/utils/de-cache/de-cache.d.ts +2 -2
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +11 -32
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +5 -1
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -4843,7 +4843,8 @@ var DynamicCodeListCache = class {
|
|
|
4843
4843
|
beginValueAppDEFieldId,
|
|
4844
4844
|
endValueAppDEFieldId,
|
|
4845
4845
|
incBeginValueMode,
|
|
4846
|
-
incEndValueMode
|
|
4846
|
+
incEndValueMode,
|
|
4847
|
+
bkcolorAppDEFieldId
|
|
4847
4848
|
} = this.codeList;
|
|
4848
4849
|
const value = valueAppDEFieldId ? data[valueAppDEFieldId] : data.srfkey;
|
|
4849
4850
|
result.id = value;
|
|
@@ -4873,6 +4874,9 @@ var DynamicCodeListCache = class {
|
|
|
4873
4874
|
if (colorAppDEFieldId) {
|
|
4874
4875
|
result.color = data[colorAppDEFieldId];
|
|
4875
4876
|
}
|
|
4877
|
+
if (bkcolorAppDEFieldId) {
|
|
4878
|
+
result.bkcolor = data[bkcolorAppDEFieldId];
|
|
4879
|
+
}
|
|
4876
4880
|
if (dataAppDEFieldId && data[dataAppDEFieldId]) {
|
|
4877
4881
|
try {
|
|
4878
4882
|
result.data = ScriptFactory.execSingleLine(
|
|
@@ -5527,45 +5531,23 @@ var DECache = class {
|
|
|
5527
5531
|
* @date 2022-03-23 10:03:40
|
|
5528
5532
|
* @param {IContext} context 上下文
|
|
5529
5533
|
* @param {string[]} srfKeys 需要删除的数据主键
|
|
5530
|
-
* @return {*} {
|
|
5534
|
+
* @return {*} {IDataEntity[]} 未能删除的数据主键
|
|
5531
5535
|
*/
|
|
5532
5536
|
deleteBatch(context, srfKeys) {
|
|
5533
5537
|
try {
|
|
5534
|
-
|
|
5538
|
+
const entities = [];
|
|
5539
|
+
for (let i = 0; i < srfKeys.length; i++) {
|
|
5540
|
+
const srfKey = srfKeys[i];
|
|
5541
|
+
const removeData = this.delete(context, srfKey);
|
|
5542
|
+
if (removeData) {
|
|
5543
|
+
entities.push(removeData);
|
|
5544
|
+
}
|
|
5545
|
+
}
|
|
5546
|
+
return entities;
|
|
5535
5547
|
} catch (err) {
|
|
5536
5548
|
ibiz.log.error(err);
|
|
5537
|
-
return
|
|
5538
|
-
}
|
|
5539
|
-
const notRemoveKeys = [];
|
|
5540
|
-
for (let i = 0; i < srfKeys.length; i++) {
|
|
5541
|
-
const key = srfKeys[i];
|
|
5542
|
-
if (!this.cacheMap.has(key)) {
|
|
5543
|
-
notRemoveKeys.push(key);
|
|
5544
|
-
}
|
|
5545
|
-
}
|
|
5546
|
-
if (notRemoveKeys.length > 0) {
|
|
5547
|
-
throw new Error(
|
|
5548
|
-
ibiz.i18n.t("runtime.service.noDeleted", {
|
|
5549
|
-
notRemoveKey: notRemoveKeys.join("\u3001")
|
|
5550
|
-
})
|
|
5551
|
-
);
|
|
5552
|
-
}
|
|
5553
|
-
const commit = (key) => {
|
|
5554
|
-
this.cacheMap.delete(key);
|
|
5555
|
-
ibiz.log.warn("delete", key);
|
|
5556
|
-
};
|
|
5557
|
-
const t = this.getTransaction(context);
|
|
5558
|
-
for (let i = 0; i < srfKeys.length; i++) {
|
|
5559
|
-
const key = srfKeys[i];
|
|
5560
|
-
if (t) {
|
|
5561
|
-
t.change(key, () => {
|
|
5562
|
-
commit(key);
|
|
5563
|
-
});
|
|
5564
|
-
} else {
|
|
5565
|
-
commit(key);
|
|
5566
|
-
}
|
|
5549
|
+
return null;
|
|
5567
5550
|
}
|
|
5568
|
-
return [];
|
|
5569
5551
|
}
|
|
5570
5552
|
/**
|
|
5571
5553
|
* 检查数据是否已经存在
|
|
@@ -8741,6 +8723,25 @@ var Method = class {
|
|
|
8741
8723
|
createEntity(data) {
|
|
8742
8724
|
return this.service.createEntity(data);
|
|
8743
8725
|
}
|
|
8726
|
+
/**
|
|
8727
|
+
* 计算多数据主键,根据;分隔
|
|
8728
|
+
*
|
|
8729
|
+
* @protected
|
|
8730
|
+
* @param {IContext} context
|
|
8731
|
+
* @param {IParams} [params]
|
|
8732
|
+
* @return {*} {string[]}
|
|
8733
|
+
* @memberof Method
|
|
8734
|
+
*/
|
|
8735
|
+
calcMultiData(context, params) {
|
|
8736
|
+
let key = "";
|
|
8737
|
+
if (params) {
|
|
8738
|
+
key = params[this.entity.keyAppDEFieldId.toLowerCase()];
|
|
8739
|
+
}
|
|
8740
|
+
if (!key && context) {
|
|
8741
|
+
key = context[this.entity.codeName.toLowerCase()];
|
|
8742
|
+
}
|
|
8743
|
+
return key.split(";");
|
|
8744
|
+
}
|
|
8744
8745
|
};
|
|
8745
8746
|
|
|
8746
8747
|
// src/de-logic/index.ts
|
|
@@ -10250,6 +10251,10 @@ var DEActionMethod = class extends Method {
|
|
|
10250
10251
|
*/
|
|
10251
10252
|
async remove(context, params, header) {
|
|
10252
10253
|
if (this.isLocalMode) {
|
|
10254
|
+
const srfKeys = this.calcMultiData(context, params);
|
|
10255
|
+
if (srfKeys.length > 1) {
|
|
10256
|
+
return this.removeBatchTemp(context, srfKeys);
|
|
10257
|
+
}
|
|
10253
10258
|
return this.removeTemp(context, params);
|
|
10254
10259
|
}
|
|
10255
10260
|
const path2 = this.calcPath(context);
|
|
@@ -10593,8 +10598,16 @@ var DEActionMethod = class extends Method {
|
|
|
10593
10598
|
* @param {IParams} [params]
|
|
10594
10599
|
* @return {*} {Promise<IHttpResponse>}
|
|
10595
10600
|
*/
|
|
10596
|
-
async removeBatchTemp(
|
|
10597
|
-
|
|
10601
|
+
async removeBatchTemp(context, srfKeys) {
|
|
10602
|
+
try {
|
|
10603
|
+
const items = this.service.local.deleteBatch(context, srfKeys);
|
|
10604
|
+
if (items) {
|
|
10605
|
+
return new HttpResponse3(items);
|
|
10606
|
+
}
|
|
10607
|
+
return new HttpResponse3(items, 500);
|
|
10608
|
+
} catch (err) {
|
|
10609
|
+
throw new HttpError5(err);
|
|
10610
|
+
}
|
|
10598
10611
|
}
|
|
10599
10612
|
/**
|
|
10600
10613
|
* 在新建、更新时,根据界面域下的关系,自动填充相关父属性
|
|
@@ -13058,8 +13071,8 @@ var baseStyle = {
|
|
|
13058
13071
|
position: "fixed",
|
|
13059
13072
|
zIndex: "10000"
|
|
13060
13073
|
};
|
|
13061
|
-
function cloneElement(
|
|
13062
|
-
const element = getAnimationElement(
|
|
13074
|
+
function cloneElement(clone37, teleport = document.body, isRemoveChild = true) {
|
|
13075
|
+
const element = getAnimationElement(clone37);
|
|
13063
13076
|
if (element == null) {
|
|
13064
13077
|
throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
|
|
13065
13078
|
}
|
|
@@ -13478,11 +13491,11 @@ function arrayContains(arr, val) {
|
|
|
13478
13491
|
});
|
|
13479
13492
|
}
|
|
13480
13493
|
function cloneObject(o) {
|
|
13481
|
-
var
|
|
13494
|
+
var clone37 = {};
|
|
13482
13495
|
for (var p in o) {
|
|
13483
|
-
|
|
13496
|
+
clone37[p] = o[p];
|
|
13484
13497
|
}
|
|
13485
|
-
return
|
|
13498
|
+
return clone37;
|
|
13486
13499
|
}
|
|
13487
13500
|
function replaceObjectProps(o1, o2) {
|
|
13488
13501
|
var o = cloneObject(o1);
|
|
@@ -15436,7 +15449,7 @@ function installCommand() {
|
|
|
15436
15449
|
}
|
|
15437
15450
|
|
|
15438
15451
|
// src/app-hub.ts
|
|
15439
|
-
import { RuntimeError as
|
|
15452
|
+
import { RuntimeError as RuntimeError68 } from "@ibiz-template/core";
|
|
15440
15453
|
|
|
15441
15454
|
// src/application.ts
|
|
15442
15455
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -20554,7 +20567,12 @@ var BaseSeriesGenerator = class {
|
|
|
20554
20567
|
calcSeriesData(catalogData) {
|
|
20555
20568
|
const temData = [];
|
|
20556
20569
|
catalogData.forEach((catalog, key) => {
|
|
20557
|
-
|
|
20570
|
+
var _a;
|
|
20571
|
+
if (this.chartGenerator.model.controlParam && ((_a = this.chartGenerator.model.controlParam.ctrlParams) == null ? void 0 : _a.MODE) === "ROW") {
|
|
20572
|
+
temData.push([catalog.value, key, catalog.chartData]);
|
|
20573
|
+
} else {
|
|
20574
|
+
temData.push([key, catalog.value, catalog.chartData]);
|
|
20575
|
+
}
|
|
20558
20576
|
});
|
|
20559
20577
|
return temData;
|
|
20560
20578
|
}
|
|
@@ -21025,6 +21043,13 @@ var convertStringFunc = (option) => {
|
|
|
21025
21043
|
result[key] = new Function(strFunction)();
|
|
21026
21044
|
} else if (isObject2(option[key])) {
|
|
21027
21045
|
result[key] = convertStringFunc(option[key]);
|
|
21046
|
+
} else if (Array.isArray(option[key])) {
|
|
21047
|
+
result[key] = option[key].map((item) => {
|
|
21048
|
+
if (typeof item !== "object") {
|
|
21049
|
+
return item;
|
|
21050
|
+
}
|
|
21051
|
+
return convertStringFunc(item);
|
|
21052
|
+
});
|
|
21028
21053
|
} else {
|
|
21029
21054
|
result[key] = option[key];
|
|
21030
21055
|
}
|
|
@@ -25146,19 +25171,33 @@ var PortletPartController = class {
|
|
|
25146
25171
|
* @param {MouseEvent} event
|
|
25147
25172
|
*/
|
|
25148
25173
|
async onActionClick(detail, event, data = []) {
|
|
25174
|
+
var _a, _b;
|
|
25149
25175
|
const actionId = detail.uiactionId;
|
|
25150
|
-
|
|
25151
|
-
|
|
25152
|
-
|
|
25153
|
-
|
|
25154
|
-
|
|
25155
|
-
|
|
25156
|
-
|
|
25157
|
-
|
|
25158
|
-
|
|
25159
|
-
|
|
25160
|
-
|
|
25161
|
-
)
|
|
25176
|
+
const eventArgs = {
|
|
25177
|
+
context: this.context,
|
|
25178
|
+
params: this.params,
|
|
25179
|
+
data,
|
|
25180
|
+
view: this.dashboard.view,
|
|
25181
|
+
ctrl: this,
|
|
25182
|
+
event
|
|
25183
|
+
};
|
|
25184
|
+
const result = await UIActionUtil.exec(actionId, eventArgs, detail.appId);
|
|
25185
|
+
if (result.closeView) {
|
|
25186
|
+
this.dashboard.view.closeView();
|
|
25187
|
+
} else if (result.refresh) {
|
|
25188
|
+
switch (result.refreshMode) {
|
|
25189
|
+
case 1:
|
|
25190
|
+
this.refresh();
|
|
25191
|
+
break;
|
|
25192
|
+
case 2:
|
|
25193
|
+
(_a = this.dashboard.view) == null ? void 0 : _a.callUIAction("Refresh" /* REFRESH */);
|
|
25194
|
+
break;
|
|
25195
|
+
case 3:
|
|
25196
|
+
(_b = this.dashboard.view.getTopView()) == null ? void 0 : _b.callUIAction("Refresh" /* REFRESH */);
|
|
25197
|
+
break;
|
|
25198
|
+
default:
|
|
25199
|
+
}
|
|
25200
|
+
}
|
|
25162
25201
|
}
|
|
25163
25202
|
/**
|
|
25164
25203
|
* 表单数据变更通知(由表单控制器调用)
|
|
@@ -25215,8 +25254,8 @@ var ViewPortletController = class extends PortletPartController {
|
|
|
25215
25254
|
*/
|
|
25216
25255
|
get contentController() {
|
|
25217
25256
|
const { portletAppView } = this.model;
|
|
25218
|
-
if (portletAppView && portletAppView.
|
|
25219
|
-
return this.dashboard.getController(portletAppView.
|
|
25257
|
+
if (portletAppView && portletAppView.name) {
|
|
25258
|
+
return this.dashboard.getController(portletAppView.name);
|
|
25220
25259
|
}
|
|
25221
25260
|
}
|
|
25222
25261
|
/**
|
|
@@ -32175,7 +32214,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
32175
32214
|
if (this.model.valueType !== "SIMPLE") {
|
|
32176
32215
|
return ValueExUtil.toText(this.model, value);
|
|
32177
32216
|
}
|
|
32178
|
-
const strVal = "".concat(value);
|
|
32217
|
+
const strVal = "".concat(value || "");
|
|
32179
32218
|
if (!this.valueFormat) {
|
|
32180
32219
|
return strVal;
|
|
32181
32220
|
}
|
|
@@ -33965,35 +34004,6 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
33965
34004
|
if (!(Object.keys(properties).length > 0)) {
|
|
33966
34005
|
return [];
|
|
33967
34006
|
}
|
|
33968
|
-
const addFields = [];
|
|
33969
|
-
Object.keys(properties).forEach((key) => {
|
|
33970
|
-
let type;
|
|
33971
|
-
switch (properties[key].type) {
|
|
33972
|
-
case "string":
|
|
33973
|
-
type = "string";
|
|
33974
|
-
if (properties[key].format === "date-time") {
|
|
33975
|
-
type = "date";
|
|
33976
|
-
}
|
|
33977
|
-
break;
|
|
33978
|
-
case "integer":
|
|
33979
|
-
case "number":
|
|
33980
|
-
type = "number";
|
|
33981
|
-
break;
|
|
33982
|
-
default:
|
|
33983
|
-
ibiz.log.error(
|
|
33984
|
-
ibiz.i18n.t("runtime.controller.control.grid.unsupported", {
|
|
33985
|
-
type: properties[key].type
|
|
33986
|
-
})
|
|
33987
|
-
);
|
|
33988
|
-
return;
|
|
33989
|
-
}
|
|
33990
|
-
addFields.push({
|
|
33991
|
-
key,
|
|
33992
|
-
description: properties[key].description,
|
|
33993
|
-
type,
|
|
33994
|
-
enumSource: properties[key].enumSource
|
|
33995
|
-
});
|
|
33996
|
-
});
|
|
33997
34007
|
const codeNameToId = {};
|
|
33998
34008
|
const dataEntity = await ibiz.hub.getAppDataEntity(
|
|
33999
34009
|
appDataEntityId,
|
|
@@ -34002,6 +34012,37 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
34002
34012
|
(_a = dataEntity.appDEFields) == null ? void 0 : _a.forEach((field) => {
|
|
34003
34013
|
codeNameToId[field.codeName.toLowerCase()] = field.id;
|
|
34004
34014
|
});
|
|
34015
|
+
const addFields = [];
|
|
34016
|
+
Object.keys(properties).forEach((key) => {
|
|
34017
|
+
if (!codeNameToId[key]) {
|
|
34018
|
+
let type;
|
|
34019
|
+
switch (properties[key].type) {
|
|
34020
|
+
case "string":
|
|
34021
|
+
type = "string";
|
|
34022
|
+
if (properties[key].format === "date-time") {
|
|
34023
|
+
type = "date";
|
|
34024
|
+
}
|
|
34025
|
+
break;
|
|
34026
|
+
case "integer":
|
|
34027
|
+
case "number":
|
|
34028
|
+
type = "number";
|
|
34029
|
+
break;
|
|
34030
|
+
default:
|
|
34031
|
+
ibiz.log.error(
|
|
34032
|
+
ibiz.i18n.t("runtime.controller.control.grid.unsupported", {
|
|
34033
|
+
type: properties[key].type
|
|
34034
|
+
})
|
|
34035
|
+
);
|
|
34036
|
+
return;
|
|
34037
|
+
}
|
|
34038
|
+
addFields.push({
|
|
34039
|
+
key,
|
|
34040
|
+
description: properties[key].description,
|
|
34041
|
+
type,
|
|
34042
|
+
enumSource: properties[key].enumSource
|
|
34043
|
+
});
|
|
34044
|
+
}
|
|
34045
|
+
});
|
|
34005
34046
|
const addSearchBarFilters = [];
|
|
34006
34047
|
addFields.forEach((item) => {
|
|
34007
34048
|
const ops = typeToOPs[item.type];
|
|
@@ -37218,9 +37259,10 @@ var MDCtrlController = class extends MDControlController {
|
|
|
37218
37259
|
|
|
37219
37260
|
// src/controller/control/kanban/kanban.controller.ts
|
|
37220
37261
|
import { RuntimeError as RuntimeError62, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
37221
|
-
import { isNil as isNil33 } from "ramda";
|
|
37262
|
+
import { clone as clone32, isNil as isNil33 } from "ramda";
|
|
37222
37263
|
|
|
37223
37264
|
// src/controller/control/kanban/kanban.service.ts
|
|
37265
|
+
import { clone as clone31 } from "ramda";
|
|
37224
37266
|
var KanbanService = class extends DataViewControlService {
|
|
37225
37267
|
/**
|
|
37226
37268
|
* 更新分组数据
|
|
@@ -37238,6 +37280,25 @@ var KanbanService = class extends DataViewControlService {
|
|
|
37238
37280
|
res = this.handleResponse(res);
|
|
37239
37281
|
return res;
|
|
37240
37282
|
}
|
|
37283
|
+
/**
|
|
37284
|
+
* 移动并排序数据
|
|
37285
|
+
*
|
|
37286
|
+
* @author tony001
|
|
37287
|
+
* @date 2024-06-16 12:06:02
|
|
37288
|
+
* @param {IContext} context
|
|
37289
|
+
* @param {ControlVO} data
|
|
37290
|
+
* @return {*} {Promise<IHttpResponse<ControlVO[]>>}
|
|
37291
|
+
*/
|
|
37292
|
+
async moveOrderItem(context, data, args) {
|
|
37293
|
+
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
37294
|
+
const params = clone31(data.getOrigin());
|
|
37295
|
+
Object.assign(params, args);
|
|
37296
|
+
let res = await this.exec(moveAction, context, params, {
|
|
37297
|
+
srfupdateitem: true
|
|
37298
|
+
});
|
|
37299
|
+
res = this.handleResponse(res);
|
|
37300
|
+
return res;
|
|
37301
|
+
}
|
|
37241
37302
|
};
|
|
37242
37303
|
|
|
37243
37304
|
// src/controller/control/kanban/kanban.controller.ts
|
|
@@ -37529,6 +37590,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37529
37590
|
* @return {*} {Promise<void>}
|
|
37530
37591
|
*/
|
|
37531
37592
|
async onDragChange(info) {
|
|
37593
|
+
var _a;
|
|
37532
37594
|
if (!this.enableEditGroup) {
|
|
37533
37595
|
if (info.from !== info.to) {
|
|
37534
37596
|
ibiz.message.warning(
|
|
@@ -37537,11 +37599,9 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37537
37599
|
return;
|
|
37538
37600
|
}
|
|
37539
37601
|
}
|
|
37540
|
-
const isAsc = this.model.minorSortDir === "ASC";
|
|
37541
37602
|
const { from, to, fromIndex, toIndex } = info;
|
|
37542
37603
|
const groupField = this.model.groupAppDEFieldId;
|
|
37543
37604
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
37544
|
-
const modifiedItems = [];
|
|
37545
37605
|
const fromGroup = this.state.groups.find((x) => x.key === from);
|
|
37546
37606
|
const toGroup = this.state.groups.find((x) => x.key === to);
|
|
37547
37607
|
if (!this.enableEditOrder) {
|
|
@@ -37555,63 +37615,135 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37555
37615
|
draggedItem2[groupField] = info.to;
|
|
37556
37616
|
return this.updateChangedItems([draggedItem2]);
|
|
37557
37617
|
}
|
|
37558
|
-
const getNextSort = (num) => {
|
|
37559
|
-
return num + (100 - num % 100);
|
|
37560
|
-
};
|
|
37561
37618
|
const originArr = [...toGroup.children];
|
|
37562
|
-
const
|
|
37563
|
-
|
|
37564
|
-
|
|
37565
|
-
|
|
37566
|
-
|
|
37567
|
-
|
|
37568
|
-
|
|
37569
|
-
|
|
37570
|
-
|
|
37619
|
+
const moveAction = (_a = this.model.moveControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
37620
|
+
if (!moveAction) {
|
|
37621
|
+
throw new RuntimeModelError68(
|
|
37622
|
+
this.model,
|
|
37623
|
+
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
37624
|
+
);
|
|
37625
|
+
}
|
|
37626
|
+
this.state.updating = true;
|
|
37627
|
+
const computeMoveData = (_fromIndex, _toIndex, _draggedItem, targetArray, allArray) => {
|
|
37628
|
+
let moveData = {};
|
|
37629
|
+
const targetItem = targetArray[_toIndex];
|
|
37630
|
+
if (!targetItem) {
|
|
37631
|
+
let tempArray = [];
|
|
37632
|
+
if (targetArray.length > 0) {
|
|
37633
|
+
tempArray = targetArray;
|
|
37634
|
+
} else if (allArray.length > 0) {
|
|
37635
|
+
tempArray = allArray;
|
|
37636
|
+
}
|
|
37637
|
+
const maxItem = tempArray.reduce((prev, curr) => {
|
|
37638
|
+
const sortCondition = prev[sortField] > curr[sortField];
|
|
37639
|
+
if (sortCondition && prev[this.dataEntity.keyAppDEFieldId] !== _draggedItem.srfkey) {
|
|
37640
|
+
return prev;
|
|
37641
|
+
}
|
|
37642
|
+
if (!sortCondition && curr[this.dataEntity.keyAppDEFieldId] !== _draggedItem.srfkey) {
|
|
37643
|
+
return curr;
|
|
37644
|
+
}
|
|
37645
|
+
return prev;
|
|
37646
|
+
});
|
|
37647
|
+
if (maxItem) {
|
|
37648
|
+
moveData = {
|
|
37649
|
+
srftargetkey: maxItem.srfkey,
|
|
37650
|
+
srfmovetype: "MOVEAFTER"
|
|
37651
|
+
};
|
|
37652
|
+
}
|
|
37653
|
+
} else {
|
|
37654
|
+
moveData = {
|
|
37655
|
+
srftargetkey: targetItem.srfkey,
|
|
37656
|
+
srfmovetype: "MOVEBEFORE"
|
|
37657
|
+
};
|
|
37658
|
+
}
|
|
37659
|
+
return moveData;
|
|
37660
|
+
};
|
|
37661
|
+
const draggedItem = clone32(fromGroup.children[fromIndex]);
|
|
37571
37662
|
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
37572
37663
|
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
37573
|
-
if (
|
|
37574
|
-
|
|
37575
|
-
|
|
37664
|
+
if (info.from !== info.to) {
|
|
37665
|
+
draggedItem[groupField] = info.to;
|
|
37666
|
+
const app = ibiz.hub.getApp(this.model.appId);
|
|
37667
|
+
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
37668
|
+
const tempContext = this.context.clone();
|
|
37669
|
+
tempContext[deName] = draggedItem.srfkey;
|
|
37670
|
+
try {
|
|
37671
|
+
await app.deService.exec(
|
|
37672
|
+
this.model.appDataEntityId,
|
|
37673
|
+
"update",
|
|
37674
|
+
tempContext,
|
|
37675
|
+
draggedItem
|
|
37676
|
+
);
|
|
37677
|
+
const index = this.state.items.findIndex(
|
|
37678
|
+
(x) => x.srfkey === draggedItem[this.dataEntity.keyAppDEFieldId]
|
|
37679
|
+
);
|
|
37680
|
+
if (index !== -1) {
|
|
37681
|
+
this.state.items.splice(index, 1, draggedItem);
|
|
37682
|
+
}
|
|
37683
|
+
} catch (error) {
|
|
37684
|
+
this.state.updating = false;
|
|
37685
|
+
throw new RuntimeModelError68(
|
|
37686
|
+
this.model,
|
|
37687
|
+
ibiz.i18n.t("runtime.controller.common.md.changeGroupError")
|
|
37688
|
+
);
|
|
37689
|
+
}
|
|
37576
37690
|
}
|
|
37577
|
-
|
|
37578
|
-
|
|
37579
|
-
|
|
37580
|
-
|
|
37581
|
-
|
|
37582
|
-
|
|
37583
|
-
|
|
37584
|
-
|
|
37585
|
-
|
|
37586
|
-
|
|
37691
|
+
const params = computeMoveData(
|
|
37692
|
+
fromIndex,
|
|
37693
|
+
toIndex,
|
|
37694
|
+
draggedItem,
|
|
37695
|
+
originArr,
|
|
37696
|
+
this.state.items
|
|
37697
|
+
);
|
|
37698
|
+
try {
|
|
37699
|
+
const result = await this.moveOrderItem(draggedItem, params);
|
|
37700
|
+
if (Array.isArray(result) && result.length > 0) {
|
|
37701
|
+
result.forEach((item) => {
|
|
37702
|
+
const index = this.state.items.findIndex(
|
|
37703
|
+
(x) => x.srfkey === item[this.dataEntity.keyAppDEFieldId]
|
|
37704
|
+
);
|
|
37705
|
+
if (index !== -1) {
|
|
37706
|
+
this.state.items[index][sortField] = item[sortField];
|
|
37587
37707
|
}
|
|
37588
|
-
|
|
37589
|
-
modifiedItems.push(item);
|
|
37590
|
-
}
|
|
37708
|
+
});
|
|
37591
37709
|
} else {
|
|
37592
|
-
|
|
37593
|
-
if (cacheArr.length > 0) {
|
|
37594
|
-
cacheArr.forEach((cache2) => {
|
|
37595
|
-
cache2[sortField] = getNextSort(cacheLastSort);
|
|
37596
|
-
modifiedItems.push(cache2);
|
|
37597
|
-
cacheLastSort = cache2[sortField];
|
|
37598
|
-
});
|
|
37599
|
-
lastSort = cacheLastSort;
|
|
37600
|
-
cacheLastSort = 0;
|
|
37601
|
-
cacheArr = [];
|
|
37602
|
-
}
|
|
37603
|
-
item[sortField] = getNextSort(lastSort);
|
|
37604
|
-
modifiedItems.push(item);
|
|
37605
|
-
} else {
|
|
37606
|
-
if (cacheArr.length === 0) {
|
|
37607
|
-
cacheLastSort = lastSort;
|
|
37608
|
-
}
|
|
37609
|
-
cacheArr.push(item);
|
|
37610
|
-
}
|
|
37611
|
-
lastSort = item[sortField];
|
|
37710
|
+
await this.refresh();
|
|
37612
37711
|
}
|
|
37613
|
-
})
|
|
37614
|
-
|
|
37712
|
+
} catch (error) {
|
|
37713
|
+
this.state.updating = false;
|
|
37714
|
+
this.actionNotification("MOVEERROR", {
|
|
37715
|
+
error
|
|
37716
|
+
});
|
|
37717
|
+
} finally {
|
|
37718
|
+
await this.afterLoad({}, this.state.items);
|
|
37719
|
+
this.state.updating = false;
|
|
37720
|
+
}
|
|
37721
|
+
}
|
|
37722
|
+
/**
|
|
37723
|
+
* 移动并排序数据
|
|
37724
|
+
*
|
|
37725
|
+
* @author tony001
|
|
37726
|
+
* @date 2024-06-17 15:06:22
|
|
37727
|
+
* @param {IData} draggedItem
|
|
37728
|
+
* @param {IData} moveMeta
|
|
37729
|
+
* @return {*} {Promise<ControlVO[]>}
|
|
37730
|
+
*/
|
|
37731
|
+
async moveOrderItem(draggedItem, moveMeta) {
|
|
37732
|
+
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
37733
|
+
const tempContext = this.context.clone();
|
|
37734
|
+
tempContext[deName] = draggedItem.srfkey;
|
|
37735
|
+
if (!moveMeta.srftargetkey || !moveMeta.srfmovetype) {
|
|
37736
|
+
throw new RuntimeModelError68(
|
|
37737
|
+
this.model,
|
|
37738
|
+
ibiz.i18n.t("runtime.controller.common.md.computeMoveMetaError")
|
|
37739
|
+
);
|
|
37740
|
+
}
|
|
37741
|
+
const res = await this.service.moveOrderItem(
|
|
37742
|
+
tempContext,
|
|
37743
|
+
draggedItem,
|
|
37744
|
+
moveMeta
|
|
37745
|
+
);
|
|
37746
|
+
return res.data;
|
|
37615
37747
|
}
|
|
37616
37748
|
/**
|
|
37617
37749
|
* 批量更新修改的项,并更新后台返回的数据,然后重新计算分组和排序
|
|
@@ -37797,7 +37929,7 @@ import {
|
|
|
37797
37929
|
awaitTimeout as awaitTimeout3,
|
|
37798
37930
|
recursiveIterate as recursiveIterate12
|
|
37799
37931
|
} from "@ibiz-template/core";
|
|
37800
|
-
import { clone as
|
|
37932
|
+
import { clone as clone33 } from "ramda";
|
|
37801
37933
|
|
|
37802
37934
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
37803
37935
|
var TreeGridExService = class extends TreeService {
|
|
@@ -38269,7 +38401,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
38269
38401
|
);
|
|
38270
38402
|
}
|
|
38271
38403
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
38272
|
-
row.cacheData =
|
|
38404
|
+
row.cacheData = clone33(row.data);
|
|
38273
38405
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
38274
38406
|
Object.assign(row.data, defaultVal);
|
|
38275
38407
|
}
|
|
@@ -38382,7 +38514,7 @@ import {
|
|
|
38382
38514
|
RuntimeError as RuntimeError64,
|
|
38383
38515
|
RuntimeModelError as RuntimeModelError70
|
|
38384
38516
|
} from "@ibiz-template/core";
|
|
38385
|
-
import { clone as
|
|
38517
|
+
import { clone as clone34 } from "ramda";
|
|
38386
38518
|
import dayjs7 from "dayjs";
|
|
38387
38519
|
var TreeGridExNodeColumnController = class {
|
|
38388
38520
|
/**
|
|
@@ -38599,7 +38731,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
38599
38731
|
srfkey: value,
|
|
38600
38732
|
...wfContext
|
|
38601
38733
|
});
|
|
38602
|
-
const tempParams =
|
|
38734
|
+
const tempParams = clone34(this.params);
|
|
38603
38735
|
const { userParam } = this.nodeColumn;
|
|
38604
38736
|
if (userParam) {
|
|
38605
38737
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -39571,6 +39703,36 @@ var UserReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
39571
39703
|
var User2ReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
39572
39704
|
};
|
|
39573
39705
|
|
|
39706
|
+
// src/controller/control/report-panel/generator/bi-generator.ts
|
|
39707
|
+
import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
|
|
39708
|
+
var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
39709
|
+
/**
|
|
39710
|
+
* 设置配置
|
|
39711
|
+
*
|
|
39712
|
+
* @author tony001
|
|
39713
|
+
* @date 2024-06-18 14:06:38
|
|
39714
|
+
* @protected
|
|
39715
|
+
*/
|
|
39716
|
+
setConfig() {
|
|
39717
|
+
var _a;
|
|
39718
|
+
if (!((_a = this.model.appDEReport) == null ? void 0 : _a.reportUIModel)) {
|
|
39719
|
+
throw new RuntimeError66(
|
|
39720
|
+
ibiz.i18n.t("runtime.controller.control.reportPanel.noReportUIModel")
|
|
39721
|
+
);
|
|
39722
|
+
}
|
|
39723
|
+
const sourceModel = ScriptFactory.execScriptFn(
|
|
39724
|
+
{},
|
|
39725
|
+
this.model.appDEReport.reportUIModel,
|
|
39726
|
+
{
|
|
39727
|
+
isAsync: false,
|
|
39728
|
+
singleRowReturn: true
|
|
39729
|
+
}
|
|
39730
|
+
);
|
|
39731
|
+
sourceModel.reportTag = this.model.appDEReport.id;
|
|
39732
|
+
this.config = sourceModel;
|
|
39733
|
+
}
|
|
39734
|
+
};
|
|
39735
|
+
|
|
39574
39736
|
// src/controller/control/report-panel/generator/generator-factory.ts
|
|
39575
39737
|
var ReportPanelGeneratorFactory = class {
|
|
39576
39738
|
/**
|
|
@@ -39592,6 +39754,14 @@ var ReportPanelGeneratorFactory = class {
|
|
|
39592
39754
|
return new UserReportPanelGenerator(model);
|
|
39593
39755
|
case "USER2":
|
|
39594
39756
|
return new User2ReportPanelGenerator(model);
|
|
39757
|
+
case "DESYSBIREPORTS":
|
|
39758
|
+
case "SYSBICUBE":
|
|
39759
|
+
case "DESYSBICUBES":
|
|
39760
|
+
case "ALLSYSBICUBES":
|
|
39761
|
+
case "SYSBIREPORT":
|
|
39762
|
+
case "SYSBICUBEREPORTS":
|
|
39763
|
+
case "ALLSYSBIREPORTS":
|
|
39764
|
+
return new BIReportPanelGenerator(model);
|
|
39595
39765
|
default:
|
|
39596
39766
|
throw new Error(
|
|
39597
39767
|
ibiz.i18n.t("runtime.controller.control.reportPanel.noImplemented", {
|
|
@@ -39675,6 +39845,9 @@ var ReportPanelController = class extends ControlController {
|
|
|
39675
39845
|
* @memberof ReportPanelController
|
|
39676
39846
|
*/
|
|
39677
39847
|
async load(args = {}) {
|
|
39848
|
+
if (this.state.reportType && (this.state.reportType === "DESYSBIREPORTS" || this.state.reportType === "SYSBICUBE" || this.state.reportType === "DESYSBICUBES" || this.state.reportType === "ALLSYSBICUBES" || this.state.reportType === "SYSBIREPORT" || this.state.reportType === "SYSBICUBEREPORTS" || this.state.reportType === "ALLSYSBIREPORTS")) {
|
|
39849
|
+
return {};
|
|
39850
|
+
}
|
|
39678
39851
|
await this.startLoading();
|
|
39679
39852
|
try {
|
|
39680
39853
|
const { context } = this.handlerAbilityParams(args);
|
|
@@ -39744,12 +39917,41 @@ var ReportPanelController = class extends ControlController {
|
|
|
39744
39917
|
key: "refresh"
|
|
39745
39918
|
});
|
|
39746
39919
|
}
|
|
39920
|
+
/**
|
|
39921
|
+
* 打开设计界面
|
|
39922
|
+
*
|
|
39923
|
+
* @author tony001
|
|
39924
|
+
* @date 2024-06-18 16:06:46
|
|
39925
|
+
* @return {*} {Promise<boolean>}
|
|
39926
|
+
*/
|
|
39927
|
+
async openReportDesignPage() {
|
|
39928
|
+
if (this.state.reportType && (this.state.reportType === "DESYSBIREPORTS" || this.state.reportType === "SYSBICUBE" || this.state.reportType === "DESYSBICUBES" || this.state.reportType === "ALLSYSBICUBES" || this.state.reportType === "SYSBIREPORT" || this.state.reportType === "SYSBICUBEREPORTS" || this.state.reportType === "ALLSYSBIREPORTS")) {
|
|
39929
|
+
const modal = ibiz.overlay.createModal(
|
|
39930
|
+
"iBizBIReportDesign",
|
|
39931
|
+
{
|
|
39932
|
+
dismiss: () => modal.dismiss(),
|
|
39933
|
+
context: this.context,
|
|
39934
|
+
viewParams: this.params,
|
|
39935
|
+
config: this.generator.config
|
|
39936
|
+
},
|
|
39937
|
+
{
|
|
39938
|
+
width: "90%",
|
|
39939
|
+
height: "90%",
|
|
39940
|
+
footerHide: true
|
|
39941
|
+
}
|
|
39942
|
+
);
|
|
39943
|
+
modal.present();
|
|
39944
|
+
const result = await modal.onWillDismiss();
|
|
39945
|
+
return result.ok || false;
|
|
39946
|
+
}
|
|
39947
|
+
return true;
|
|
39948
|
+
}
|
|
39747
39949
|
};
|
|
39748
39950
|
|
|
39749
39951
|
// src/controller/control/gantt/gantt.controller.ts
|
|
39750
39952
|
import {
|
|
39751
39953
|
awaitTimeout as awaitTimeout4,
|
|
39752
|
-
RuntimeError as
|
|
39954
|
+
RuntimeError as RuntimeError67,
|
|
39753
39955
|
RuntimeModelError as RuntimeModelError72
|
|
39754
39956
|
} from "@ibiz-template/core";
|
|
39755
39957
|
|
|
@@ -40295,13 +40497,13 @@ var GanttController = class extends TreeGridExController {
|
|
|
40295
40497
|
*/
|
|
40296
40498
|
async modifyNodeTime(nodeData, { begin, end }) {
|
|
40297
40499
|
if (nodeData._nodeType !== "DE") {
|
|
40298
|
-
throw new
|
|
40500
|
+
throw new RuntimeError67(
|
|
40299
40501
|
ibiz.i18n.t("runtime.controller.control.gantt.noNode")
|
|
40300
40502
|
);
|
|
40301
40503
|
}
|
|
40302
40504
|
const rowState = this.getRowState(nodeData._id);
|
|
40303
40505
|
if (!rowState) {
|
|
40304
|
-
throw new
|
|
40506
|
+
throw new RuntimeError67(
|
|
40305
40507
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
40306
40508
|
);
|
|
40307
40509
|
}
|
|
@@ -40323,13 +40525,13 @@ var GanttController = class extends TreeGridExController {
|
|
|
40323
40525
|
return;
|
|
40324
40526
|
}
|
|
40325
40527
|
if (nodeData._nodeType !== "DE") {
|
|
40326
|
-
throw new
|
|
40528
|
+
throw new RuntimeError67(
|
|
40327
40529
|
ibiz.i18n.t("runtime.controller.control.gantt.nonentity")
|
|
40328
40530
|
);
|
|
40329
40531
|
}
|
|
40330
40532
|
const rowState = this.state.rows[nodeData._uuid];
|
|
40331
40533
|
if (!rowState) {
|
|
40332
|
-
throw new
|
|
40534
|
+
throw new RuntimeError67(
|
|
40333
40535
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
40334
40536
|
);
|
|
40335
40537
|
}
|
|
@@ -40379,7 +40581,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
40379
40581
|
async remove(args) {
|
|
40380
40582
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
40381
40583
|
if (!(data == null ? void 0 : data.length)) {
|
|
40382
|
-
throw new
|
|
40584
|
+
throw new RuntimeError67(
|
|
40383
40585
|
ibiz.i18n.t("runtime.controller.common.control.uncheckedData")
|
|
40384
40586
|
);
|
|
40385
40587
|
}
|
|
@@ -40502,7 +40704,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
40502
40704
|
(item) => item.showRowEdit
|
|
40503
40705
|
);
|
|
40504
40706
|
if (editingRow) {
|
|
40505
|
-
throw new
|
|
40707
|
+
throw new RuntimeError67(
|
|
40506
40708
|
ibiz.i18n.t("runtime.controller.common.md.firstComplete")
|
|
40507
40709
|
);
|
|
40508
40710
|
}
|
|
@@ -40760,7 +40962,7 @@ import { QXEvent as QXEvent11 } from "qx-util";
|
|
|
40760
40962
|
|
|
40761
40963
|
// src/controller/notification/async-action.controller.ts
|
|
40762
40964
|
import { QXEvent as QXEvent9 } from "qx-util";
|
|
40763
|
-
import { clone as
|
|
40965
|
+
import { clone as clone35 } from "ramda";
|
|
40764
40966
|
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
40765
40967
|
import dayjs8 from "dayjs";
|
|
40766
40968
|
var AsyncActionController = class {
|
|
@@ -40871,7 +41073,7 @@ var AsyncActionController = class {
|
|
|
40871
41073
|
} else {
|
|
40872
41074
|
this.noticeResult(action);
|
|
40873
41075
|
}
|
|
40874
|
-
this.evt.emit("add",
|
|
41076
|
+
this.evt.emit("add", clone35(action));
|
|
40875
41077
|
this.evt.emit("dataChange");
|
|
40876
41078
|
}
|
|
40877
41079
|
/**
|
|
@@ -40893,7 +41095,7 @@ var AsyncActionController = class {
|
|
|
40893
41095
|
}
|
|
40894
41096
|
this.noticeResult(action);
|
|
40895
41097
|
}
|
|
40896
|
-
this.evt.emit("change",
|
|
41098
|
+
this.evt.emit("change", clone35(action));
|
|
40897
41099
|
this.evt.emit("dataChange");
|
|
40898
41100
|
}
|
|
40899
41101
|
noticeResult(action) {
|
|
@@ -41361,7 +41563,7 @@ var AppHub = class {
|
|
|
41361
41563
|
this.registerAppView(appView);
|
|
41362
41564
|
return appView;
|
|
41363
41565
|
}
|
|
41364
|
-
throw new
|
|
41566
|
+
throw new RuntimeError68(ibiz.i18n.t("runtime.hub.noExist", { id }));
|
|
41365
41567
|
}
|
|
41366
41568
|
/**
|
|
41367
41569
|
* 根据DrControl的名称和子应用标识获取模型
|
|
@@ -41400,7 +41602,7 @@ var AppHub = class {
|
|
|
41400
41602
|
);
|
|
41401
41603
|
return model;
|
|
41402
41604
|
}
|
|
41403
|
-
throw new
|
|
41605
|
+
throw new RuntimeError68(
|
|
41404
41606
|
ibiz.i18n.t("runtime.hub.noExist", { id: modelPath })
|
|
41405
41607
|
);
|
|
41406
41608
|
}
|
|
@@ -41440,7 +41642,7 @@ var AppHub = class {
|
|
|
41440
41642
|
this.registerAppDataEntity(entity, appId2);
|
|
41441
41643
|
return entity;
|
|
41442
41644
|
}
|
|
41443
|
-
throw new
|
|
41645
|
+
throw new RuntimeError68(ibiz.i18n.t("runtime.service.noFound", { id }));
|
|
41444
41646
|
}
|
|
41445
41647
|
/**
|
|
41446
41648
|
* 新建 hub 应用
|
|
@@ -41455,7 +41657,7 @@ var AppHub = class {
|
|
|
41455
41657
|
return this.appMap.get(id);
|
|
41456
41658
|
}
|
|
41457
41659
|
if (!this.modelLoaderProvider) {
|
|
41458
|
-
throw new
|
|
41660
|
+
throw new RuntimeError68(ibiz.i18n.t("runtime.utils.firstregister"));
|
|
41459
41661
|
}
|
|
41460
41662
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
41461
41663
|
const app = new Application(appModel);
|
|
@@ -41601,7 +41803,7 @@ var EngineFactory = class {
|
|
|
41601
41803
|
|
|
41602
41804
|
// src/engine/view-base.engine.ts
|
|
41603
41805
|
import {
|
|
41604
|
-
RuntimeError as
|
|
41806
|
+
RuntimeError as RuntimeError69,
|
|
41605
41807
|
findRecursiveChild as findRecursiveChild3,
|
|
41606
41808
|
IBizContext as IBizContext7
|
|
41607
41809
|
} from "@ibiz-template/core";
|
|
@@ -41945,7 +42147,7 @@ var ViewEngineBase = class {
|
|
|
41945
42147
|
const { appDataEntityId } = this.view.model;
|
|
41946
42148
|
const { evt, context, params } = this.view;
|
|
41947
42149
|
if (!appDataEntityId) {
|
|
41948
|
-
throw new
|
|
42150
|
+
throw new RuntimeError69(ibiz.i18n.t("runtime.engine.loadEntityData"));
|
|
41949
42151
|
}
|
|
41950
42152
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
41951
42153
|
const res = await app.deService.exec(
|
|
@@ -41993,7 +42195,7 @@ var ViewEngineBase = class {
|
|
|
41993
42195
|
|
|
41994
42196
|
// src/engine/md-view.engine.ts
|
|
41995
42197
|
import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
41996
|
-
import { clone as
|
|
42198
|
+
import { clone as clone36 } from "ramda";
|
|
41997
42199
|
var MDViewEngine = class extends ViewEngineBase {
|
|
41998
42200
|
/**
|
|
41999
42201
|
* 多数据部件名称
|
|
@@ -42289,7 +42491,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42289
42491
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
42290
42492
|
);
|
|
42291
42493
|
}
|
|
42292
|
-
const params =
|
|
42494
|
+
const params = clone36(this.view.params);
|
|
42293
42495
|
if (copyMode) {
|
|
42294
42496
|
params.srfcopymode = copyMode;
|
|
42295
42497
|
}
|
|
@@ -42468,7 +42670,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42468
42670
|
};
|
|
42469
42671
|
|
|
42470
42672
|
// src/global/global-util/global-util.ts
|
|
42471
|
-
import { RuntimeError as
|
|
42673
|
+
import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
|
|
42472
42674
|
var sourceTitle = document.title;
|
|
42473
42675
|
var GlobalUtil = class {
|
|
42474
42676
|
constructor() {
|
|
@@ -42609,7 +42811,7 @@ var GlobalUtil = class {
|
|
|
42609
42811
|
* @return {*} {IParams}
|
|
42610
42812
|
*/
|
|
42611
42813
|
getGlobalParam() {
|
|
42612
|
-
throw new
|
|
42814
|
+
throw new RuntimeError70(ibiz.i18n.t("runtime.global.noImplemented"));
|
|
42613
42815
|
}
|
|
42614
42816
|
/**
|
|
42615
42817
|
* 获取视图路由参数变量,数组类型,基于路由解析出来的,每一个对象里面都有context和params
|
|
@@ -42618,12 +42820,12 @@ var GlobalUtil = class {
|
|
|
42618
42820
|
* @return {*} {IParams}
|
|
42619
42821
|
*/
|
|
42620
42822
|
getRouterParams() {
|
|
42621
|
-
throw new
|
|
42823
|
+
throw new RuntimeError70(ibiz.i18n.t("runtime.global.noImplementedRouting"));
|
|
42622
42824
|
}
|
|
42623
42825
|
};
|
|
42624
42826
|
|
|
42625
42827
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
42626
|
-
import { RuntimeError as
|
|
42828
|
+
import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
|
|
42627
42829
|
var LogicExecutor = class {
|
|
42628
42830
|
/**
|
|
42629
42831
|
* @author lxm
|
|
@@ -42644,7 +42846,7 @@ var LogicExecutor = class {
|
|
|
42644
42846
|
*/
|
|
42645
42847
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42646
42848
|
execute(_executeParams) {
|
|
42647
|
-
throw new
|
|
42849
|
+
throw new RuntimeError71(
|
|
42648
42850
|
ibiz.i18n.t("runtime.logicScheduler.executor.noImplementedMethod")
|
|
42649
42851
|
);
|
|
42650
42852
|
}
|
|
@@ -43096,7 +43298,7 @@ var LogicSchedulerCenter = class {
|
|
|
43096
43298
|
};
|
|
43097
43299
|
|
|
43098
43300
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
43099
|
-
import { RuntimeError as
|
|
43301
|
+
import { RuntimeError as RuntimeError72 } from "@ibiz-template/core";
|
|
43100
43302
|
var LogicTrigger = class {
|
|
43101
43303
|
/**
|
|
43102
43304
|
* @author lxm
|
|
@@ -43156,7 +43358,7 @@ var LogicTrigger = class {
|
|
|
43156
43358
|
if (this.executor) {
|
|
43157
43359
|
return this.executor.execute(executeParams);
|
|
43158
43360
|
}
|
|
43159
|
-
throw new
|
|
43361
|
+
throw new RuntimeError72(
|
|
43160
43362
|
ibiz.i18n.t("runtime.logicScheduler.trigger.noExecutorBound", {
|
|
43161
43363
|
id: this.logic.id
|
|
43162
43364
|
})
|
|
@@ -43177,12 +43379,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
43177
43379
|
};
|
|
43178
43380
|
|
|
43179
43381
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
43180
|
-
import { RuntimeError as
|
|
43382
|
+
import { RuntimeError as RuntimeError73 } from "@ibiz-template/core";
|
|
43181
43383
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
43182
43384
|
bindExecutor(executor) {
|
|
43183
43385
|
super.bindExecutor(executor);
|
|
43184
43386
|
if (this.executor.type !== "SCRIPT") {
|
|
43185
|
-
throw new
|
|
43387
|
+
throw new RuntimeError73(
|
|
43186
43388
|
ibiz.i18n.t("runtime.logicScheduler.trigger.triggerType")
|
|
43187
43389
|
);
|
|
43188
43390
|
}
|
|
@@ -43219,7 +43421,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
43219
43421
|
};
|
|
43220
43422
|
|
|
43221
43423
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
43222
|
-
import { RuntimeError as
|
|
43424
|
+
import { RuntimeError as RuntimeError74, RuntimeModelError as RuntimeModelError75 } from "@ibiz-template/core";
|
|
43223
43425
|
var TimerTrigger = class extends LogicTrigger {
|
|
43224
43426
|
constructor() {
|
|
43225
43427
|
super(...arguments);
|
|
@@ -43234,7 +43436,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
43234
43436
|
}
|
|
43235
43437
|
this.timer = setInterval(() => {
|
|
43236
43438
|
if (!this.scheduler.defaultParamsCb) {
|
|
43237
|
-
throw new
|
|
43439
|
+
throw new RuntimeError74(
|
|
43238
43440
|
ibiz.i18n.t("runtime.logicScheduler.trigger.parameterCallback")
|
|
43239
43441
|
);
|
|
43240
43442
|
}
|
|
@@ -43253,7 +43455,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
43253
43455
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
43254
43456
|
import {
|
|
43255
43457
|
ModelError as ModelError34,
|
|
43256
|
-
RuntimeError as
|
|
43458
|
+
RuntimeError as RuntimeError75,
|
|
43257
43459
|
RuntimeModelError as RuntimeModelError76
|
|
43258
43460
|
} from "@ibiz-template/core";
|
|
43259
43461
|
import { notNilEmpty as notNilEmpty11 } from "qx-util";
|
|
@@ -43291,7 +43493,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43291
43493
|
const { context, params, ...rest } = parameters;
|
|
43292
43494
|
const { data } = parameters;
|
|
43293
43495
|
if (!(data == null ? void 0 : data[0])) {
|
|
43294
|
-
throw new
|
|
43496
|
+
throw new RuntimeError75(
|
|
43295
43497
|
ibiz.i18n.t("runtime.logicScheduler.executor.noActionableData")
|
|
43296
43498
|
);
|
|
43297
43499
|
}
|
|
@@ -43360,7 +43562,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43360
43562
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
43361
43563
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
43362
43564
|
if (!findView) {
|
|
43363
|
-
throw new
|
|
43565
|
+
throw new RuntimeError75(
|
|
43364
43566
|
ibiz.i18n.t("runtime.logicScheduler.executor.editViews", {
|
|
43365
43567
|
formTypeValue
|
|
43366
43568
|
})
|
|
@@ -43493,7 +43695,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43493
43695
|
}
|
|
43494
43696
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
43495
43697
|
if (!selectData) {
|
|
43496
|
-
throw new
|
|
43698
|
+
throw new RuntimeError75(
|
|
43497
43699
|
ibiz.i18n.t("runtime.logicScheduler.executor.checkOne")
|
|
43498
43700
|
);
|
|
43499
43701
|
}
|
|
@@ -43505,7 +43707,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43505
43707
|
}
|
|
43506
43708
|
);
|
|
43507
43709
|
if (!findView) {
|
|
43508
|
-
throw new
|
|
43710
|
+
throw new RuntimeError75(
|
|
43509
43711
|
ibiz.i18n.t("runtime.logicScheduler.executor.entitiesAssociated", {
|
|
43510
43712
|
indexType
|
|
43511
43713
|
})
|
|
@@ -43547,7 +43749,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43547
43749
|
}
|
|
43548
43750
|
});
|
|
43549
43751
|
if (pickParentFieldName === void 0) {
|
|
43550
|
-
throw new
|
|
43752
|
+
throw new RuntimeError75(
|
|
43551
43753
|
ibiz.i18n.t("runtime.logicScheduler.executor.foreignKey", {
|
|
43552
43754
|
pickParentDeName
|
|
43553
43755
|
})
|
|
@@ -43862,7 +44064,10 @@ var en = {
|
|
|
43862
44064
|
simpleMode: "Simple mode, no saving",
|
|
43863
44065
|
dataDeleted: "Data [{str}] deleted successfully!",
|
|
43864
44066
|
noChange: "The value has not changed",
|
|
43865
|
-
firstComplete: "Please complete the current line in the line editor first"
|
|
44067
|
+
firstComplete: "Please complete the current line in the line editor first",
|
|
44068
|
+
noMoveDataCconfig: "No move data behavior config",
|
|
44069
|
+
changeGroupError: "Failed to switch the group",
|
|
44070
|
+
computeMoveMetaError: "Error in calculating target position and movement type"
|
|
43866
44071
|
},
|
|
43867
44072
|
editor: {
|
|
43868
44073
|
editorNoConfigured: "Editor type [{editorType}], code table not configured"
|
|
@@ -43973,7 +44178,8 @@ var en = {
|
|
|
43973
44178
|
},
|
|
43974
44179
|
reportPanel: {
|
|
43975
44180
|
reportType: "Report panel generator factory parameter error, report panel does not specify report type",
|
|
43976
|
-
noImplemented: "Specify the report {reportType} type report panel generator not implemented yet"
|
|
44181
|
+
noImplemented: "Specify the report {reportType} type report panel generator not implemented yet",
|
|
44182
|
+
noReportUIModel: "The report ui model is not configured"
|
|
43977
44183
|
},
|
|
43978
44184
|
searchBar: {
|
|
43979
44185
|
noFoundEntity: "Cannot find the associated entity corresponding to the attribute {targetField}.",
|
|
@@ -44440,7 +44646,10 @@ var zhCn = {
|
|
|
44440
44646
|
simpleMode: "\u7B80\u5355\u6A21\u5F0F\uFF0C\u4E0D\u4FDD\u5B58",
|
|
44441
44647
|
dataDeleted: "\u6570\u636E[{str}]\u5220\u9664\u6210\u529F!",
|
|
44442
44648
|
noChange: "\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8",
|
|
44443
|
-
firstComplete: "\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C"
|
|
44649
|
+
firstComplete: "\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C",
|
|
44650
|
+
noMoveDataCconfig: "\u65E0\u79FB\u52A8\u6570\u636E\u884C\u4E3A\u914D\u7F6E",
|
|
44651
|
+
changeGroupError: "\u5207\u6362\u5206\u7EC4\u5931\u8D25",
|
|
44652
|
+
computeMoveMetaError: "\u8BA1\u7B97\u76EE\u6807\u4F4D\u7F6E\u548C\u79FB\u52A8\u7C7B\u578B\u53D1\u751F\u9519\u8BEF"
|
|
44444
44653
|
},
|
|
44445
44654
|
editor: {
|
|
44446
44655
|
editorNoConfigured: "\u7F16\u8F91\u5668\u7C7B\u578B[{editorType}]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868"
|
|
@@ -44551,7 +44760,8 @@ var zhCn = {
|
|
|
44551
44760
|
},
|
|
44552
44761
|
reportPanel: {
|
|
44553
44762
|
reportType: "\u62A5\u8868\u9762\u677F\u751F\u6210\u5668\u5DE5\u5382\u53C2\u6570\u9519\u8BEF\uFF0C\u62A5\u8868\u9762\u677F\u672A\u6307\u5B9A\u62A5\u8868\u7C7B\u578B",
|
|
44554
|
-
noImplemented: "\u6307\u5B9A\u62A5\u8868{reportType}\u7C7B\u578B\u62A5\u8868\u9762\u677F\u751F\u6210\u5668\u6682\u672A\u5B9E\u73B0"
|
|
44763
|
+
noImplemented: "\u6307\u5B9A\u62A5\u8868{reportType}\u7C7B\u578B\u62A5\u8868\u9762\u677F\u751F\u6210\u5668\u6682\u672A\u5B9E\u73B0",
|
|
44764
|
+
noReportUIModel: "\u672A\u914D\u7F6E\u6307\u5B9A\u62A5\u8868\u754C\u9762\u6A21\u578B"
|
|
44555
44765
|
},
|
|
44556
44766
|
searchBar: {
|
|
44557
44767
|
noFoundEntity: "\u627E\u4E0D\u5230\u5C5E\u6027{targetField}\u5BF9\u5E94\u7684\u5173\u8054\u5B9E\u4F53",
|