@ibiz-template/runtime 0.7.24 → 0.7.25-alpha.1
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 +394 -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 +10 -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 +44 -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,15 @@ var ReportPanelGeneratorFactory = class {
|
|
|
39592
39754
|
return new UserReportPanelGenerator(model);
|
|
39593
39755
|
case "USER2":
|
|
39594
39756
|
return new User2ReportPanelGenerator(model);
|
|
39757
|
+
case "DESYSBIREPORTS":
|
|
39758
|
+
case "DESYSBIREPORTS":
|
|
39759
|
+
case "SYSBICUBE":
|
|
39760
|
+
case "DESYSBICUBES":
|
|
39761
|
+
case "ALLSYSBICUBES":
|
|
39762
|
+
case "SYSBIREPORT":
|
|
39763
|
+
case "SYSBICUBEREPORTS":
|
|
39764
|
+
case "ALLSYSBIREPORTS":
|
|
39765
|
+
return new BIReportPanelGenerator(model);
|
|
39595
39766
|
default:
|
|
39596
39767
|
throw new Error(
|
|
39597
39768
|
ibiz.i18n.t("runtime.controller.control.reportPanel.noImplemented", {
|
|
@@ -39675,6 +39846,9 @@ var ReportPanelController = class extends ControlController {
|
|
|
39675
39846
|
* @memberof ReportPanelController
|
|
39676
39847
|
*/
|
|
39677
39848
|
async load(args = {}) {
|
|
39849
|
+
if (this.state.reportType && (this.state.reportType === "DESYSBIREPORTS" || 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")) {
|
|
39850
|
+
return {};
|
|
39851
|
+
}
|
|
39678
39852
|
await this.startLoading();
|
|
39679
39853
|
try {
|
|
39680
39854
|
const { context } = this.handlerAbilityParams(args);
|
|
@@ -39744,12 +39918,41 @@ var ReportPanelController = class extends ControlController {
|
|
|
39744
39918
|
key: "refresh"
|
|
39745
39919
|
});
|
|
39746
39920
|
}
|
|
39921
|
+
/**
|
|
39922
|
+
* 打开设计界面
|
|
39923
|
+
*
|
|
39924
|
+
* @author tony001
|
|
39925
|
+
* @date 2024-06-18 16:06:46
|
|
39926
|
+
* @return {*} {Promise<boolean>}
|
|
39927
|
+
*/
|
|
39928
|
+
async openReportDesignPage() {
|
|
39929
|
+
if (this.state.reportType && (this.state.reportType === "DESYSBIREPORTS" || 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")) {
|
|
39930
|
+
const modal = ibiz.overlay.createModal(
|
|
39931
|
+
"BIReportDesign",
|
|
39932
|
+
{
|
|
39933
|
+
dismiss: () => modal.dismiss(),
|
|
39934
|
+
context: this.context,
|
|
39935
|
+
viewParams: this.params,
|
|
39936
|
+
config: this.generator.config
|
|
39937
|
+
},
|
|
39938
|
+
{
|
|
39939
|
+
width: "90%",
|
|
39940
|
+
height: "90%",
|
|
39941
|
+
footerHide: true
|
|
39942
|
+
}
|
|
39943
|
+
);
|
|
39944
|
+
modal.present();
|
|
39945
|
+
const result = await modal.onWillDismiss();
|
|
39946
|
+
return result.ok || false;
|
|
39947
|
+
}
|
|
39948
|
+
return true;
|
|
39949
|
+
}
|
|
39747
39950
|
};
|
|
39748
39951
|
|
|
39749
39952
|
// src/controller/control/gantt/gantt.controller.ts
|
|
39750
39953
|
import {
|
|
39751
39954
|
awaitTimeout as awaitTimeout4,
|
|
39752
|
-
RuntimeError as
|
|
39955
|
+
RuntimeError as RuntimeError67,
|
|
39753
39956
|
RuntimeModelError as RuntimeModelError72
|
|
39754
39957
|
} from "@ibiz-template/core";
|
|
39755
39958
|
|
|
@@ -40295,13 +40498,13 @@ var GanttController = class extends TreeGridExController {
|
|
|
40295
40498
|
*/
|
|
40296
40499
|
async modifyNodeTime(nodeData, { begin, end }) {
|
|
40297
40500
|
if (nodeData._nodeType !== "DE") {
|
|
40298
|
-
throw new
|
|
40501
|
+
throw new RuntimeError67(
|
|
40299
40502
|
ibiz.i18n.t("runtime.controller.control.gantt.noNode")
|
|
40300
40503
|
);
|
|
40301
40504
|
}
|
|
40302
40505
|
const rowState = this.getRowState(nodeData._id);
|
|
40303
40506
|
if (!rowState) {
|
|
40304
|
-
throw new
|
|
40507
|
+
throw new RuntimeError67(
|
|
40305
40508
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
40306
40509
|
);
|
|
40307
40510
|
}
|
|
@@ -40323,13 +40526,13 @@ var GanttController = class extends TreeGridExController {
|
|
|
40323
40526
|
return;
|
|
40324
40527
|
}
|
|
40325
40528
|
if (nodeData._nodeType !== "DE") {
|
|
40326
|
-
throw new
|
|
40529
|
+
throw new RuntimeError67(
|
|
40327
40530
|
ibiz.i18n.t("runtime.controller.control.gantt.nonentity")
|
|
40328
40531
|
);
|
|
40329
40532
|
}
|
|
40330
40533
|
const rowState = this.state.rows[nodeData._uuid];
|
|
40331
40534
|
if (!rowState) {
|
|
40332
|
-
throw new
|
|
40535
|
+
throw new RuntimeError67(
|
|
40333
40536
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
40334
40537
|
);
|
|
40335
40538
|
}
|
|
@@ -40379,7 +40582,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
40379
40582
|
async remove(args) {
|
|
40380
40583
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
40381
40584
|
if (!(data == null ? void 0 : data.length)) {
|
|
40382
|
-
throw new
|
|
40585
|
+
throw new RuntimeError67(
|
|
40383
40586
|
ibiz.i18n.t("runtime.controller.common.control.uncheckedData")
|
|
40384
40587
|
);
|
|
40385
40588
|
}
|
|
@@ -40502,7 +40705,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
40502
40705
|
(item) => item.showRowEdit
|
|
40503
40706
|
);
|
|
40504
40707
|
if (editingRow) {
|
|
40505
|
-
throw new
|
|
40708
|
+
throw new RuntimeError67(
|
|
40506
40709
|
ibiz.i18n.t("runtime.controller.common.md.firstComplete")
|
|
40507
40710
|
);
|
|
40508
40711
|
}
|
|
@@ -40760,7 +40963,7 @@ import { QXEvent as QXEvent11 } from "qx-util";
|
|
|
40760
40963
|
|
|
40761
40964
|
// src/controller/notification/async-action.controller.ts
|
|
40762
40965
|
import { QXEvent as QXEvent9 } from "qx-util";
|
|
40763
|
-
import { clone as
|
|
40966
|
+
import { clone as clone35 } from "ramda";
|
|
40764
40967
|
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
40765
40968
|
import dayjs8 from "dayjs";
|
|
40766
40969
|
var AsyncActionController = class {
|
|
@@ -40871,7 +41074,7 @@ var AsyncActionController = class {
|
|
|
40871
41074
|
} else {
|
|
40872
41075
|
this.noticeResult(action);
|
|
40873
41076
|
}
|
|
40874
|
-
this.evt.emit("add",
|
|
41077
|
+
this.evt.emit("add", clone35(action));
|
|
40875
41078
|
this.evt.emit("dataChange");
|
|
40876
41079
|
}
|
|
40877
41080
|
/**
|
|
@@ -40893,7 +41096,7 @@ var AsyncActionController = class {
|
|
|
40893
41096
|
}
|
|
40894
41097
|
this.noticeResult(action);
|
|
40895
41098
|
}
|
|
40896
|
-
this.evt.emit("change",
|
|
41099
|
+
this.evt.emit("change", clone35(action));
|
|
40897
41100
|
this.evt.emit("dataChange");
|
|
40898
41101
|
}
|
|
40899
41102
|
noticeResult(action) {
|
|
@@ -41361,7 +41564,7 @@ var AppHub = class {
|
|
|
41361
41564
|
this.registerAppView(appView);
|
|
41362
41565
|
return appView;
|
|
41363
41566
|
}
|
|
41364
|
-
throw new
|
|
41567
|
+
throw new RuntimeError68(ibiz.i18n.t("runtime.hub.noExist", { id }));
|
|
41365
41568
|
}
|
|
41366
41569
|
/**
|
|
41367
41570
|
* 根据DrControl的名称和子应用标识获取模型
|
|
@@ -41400,7 +41603,7 @@ var AppHub = class {
|
|
|
41400
41603
|
);
|
|
41401
41604
|
return model;
|
|
41402
41605
|
}
|
|
41403
|
-
throw new
|
|
41606
|
+
throw new RuntimeError68(
|
|
41404
41607
|
ibiz.i18n.t("runtime.hub.noExist", { id: modelPath })
|
|
41405
41608
|
);
|
|
41406
41609
|
}
|
|
@@ -41440,7 +41643,7 @@ var AppHub = class {
|
|
|
41440
41643
|
this.registerAppDataEntity(entity, appId2);
|
|
41441
41644
|
return entity;
|
|
41442
41645
|
}
|
|
41443
|
-
throw new
|
|
41646
|
+
throw new RuntimeError68(ibiz.i18n.t("runtime.service.noFound", { id }));
|
|
41444
41647
|
}
|
|
41445
41648
|
/**
|
|
41446
41649
|
* 新建 hub 应用
|
|
@@ -41455,7 +41658,7 @@ var AppHub = class {
|
|
|
41455
41658
|
return this.appMap.get(id);
|
|
41456
41659
|
}
|
|
41457
41660
|
if (!this.modelLoaderProvider) {
|
|
41458
|
-
throw new
|
|
41661
|
+
throw new RuntimeError68(ibiz.i18n.t("runtime.utils.firstregister"));
|
|
41459
41662
|
}
|
|
41460
41663
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
41461
41664
|
const app = new Application(appModel);
|
|
@@ -41601,7 +41804,7 @@ var EngineFactory = class {
|
|
|
41601
41804
|
|
|
41602
41805
|
// src/engine/view-base.engine.ts
|
|
41603
41806
|
import {
|
|
41604
|
-
RuntimeError as
|
|
41807
|
+
RuntimeError as RuntimeError69,
|
|
41605
41808
|
findRecursiveChild as findRecursiveChild3,
|
|
41606
41809
|
IBizContext as IBizContext7
|
|
41607
41810
|
} from "@ibiz-template/core";
|
|
@@ -41945,7 +42148,7 @@ var ViewEngineBase = class {
|
|
|
41945
42148
|
const { appDataEntityId } = this.view.model;
|
|
41946
42149
|
const { evt, context, params } = this.view;
|
|
41947
42150
|
if (!appDataEntityId) {
|
|
41948
|
-
throw new
|
|
42151
|
+
throw new RuntimeError69(ibiz.i18n.t("runtime.engine.loadEntityData"));
|
|
41949
42152
|
}
|
|
41950
42153
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
41951
42154
|
const res = await app.deService.exec(
|
|
@@ -41993,7 +42196,7 @@ var ViewEngineBase = class {
|
|
|
41993
42196
|
|
|
41994
42197
|
// src/engine/md-view.engine.ts
|
|
41995
42198
|
import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
41996
|
-
import { clone as
|
|
42199
|
+
import { clone as clone36 } from "ramda";
|
|
41997
42200
|
var MDViewEngine = class extends ViewEngineBase {
|
|
41998
42201
|
/**
|
|
41999
42202
|
* 多数据部件名称
|
|
@@ -42289,7 +42492,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42289
42492
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
42290
42493
|
);
|
|
42291
42494
|
}
|
|
42292
|
-
const params =
|
|
42495
|
+
const params = clone36(this.view.params);
|
|
42293
42496
|
if (copyMode) {
|
|
42294
42497
|
params.srfcopymode = copyMode;
|
|
42295
42498
|
}
|
|
@@ -42468,7 +42671,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42468
42671
|
};
|
|
42469
42672
|
|
|
42470
42673
|
// src/global/global-util/global-util.ts
|
|
42471
|
-
import { RuntimeError as
|
|
42674
|
+
import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
|
|
42472
42675
|
var sourceTitle = document.title;
|
|
42473
42676
|
var GlobalUtil = class {
|
|
42474
42677
|
constructor() {
|
|
@@ -42609,7 +42812,7 @@ var GlobalUtil = class {
|
|
|
42609
42812
|
* @return {*} {IParams}
|
|
42610
42813
|
*/
|
|
42611
42814
|
getGlobalParam() {
|
|
42612
|
-
throw new
|
|
42815
|
+
throw new RuntimeError70(ibiz.i18n.t("runtime.global.noImplemented"));
|
|
42613
42816
|
}
|
|
42614
42817
|
/**
|
|
42615
42818
|
* 获取视图路由参数变量,数组类型,基于路由解析出来的,每一个对象里面都有context和params
|
|
@@ -42618,12 +42821,12 @@ var GlobalUtil = class {
|
|
|
42618
42821
|
* @return {*} {IParams}
|
|
42619
42822
|
*/
|
|
42620
42823
|
getRouterParams() {
|
|
42621
|
-
throw new
|
|
42824
|
+
throw new RuntimeError70(ibiz.i18n.t("runtime.global.noImplementedRouting"));
|
|
42622
42825
|
}
|
|
42623
42826
|
};
|
|
42624
42827
|
|
|
42625
42828
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
42626
|
-
import { RuntimeError as
|
|
42829
|
+
import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
|
|
42627
42830
|
var LogicExecutor = class {
|
|
42628
42831
|
/**
|
|
42629
42832
|
* @author lxm
|
|
@@ -42644,7 +42847,7 @@ var LogicExecutor = class {
|
|
|
42644
42847
|
*/
|
|
42645
42848
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42646
42849
|
execute(_executeParams) {
|
|
42647
|
-
throw new
|
|
42850
|
+
throw new RuntimeError71(
|
|
42648
42851
|
ibiz.i18n.t("runtime.logicScheduler.executor.noImplementedMethod")
|
|
42649
42852
|
);
|
|
42650
42853
|
}
|
|
@@ -43096,7 +43299,7 @@ var LogicSchedulerCenter = class {
|
|
|
43096
43299
|
};
|
|
43097
43300
|
|
|
43098
43301
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
43099
|
-
import { RuntimeError as
|
|
43302
|
+
import { RuntimeError as RuntimeError72 } from "@ibiz-template/core";
|
|
43100
43303
|
var LogicTrigger = class {
|
|
43101
43304
|
/**
|
|
43102
43305
|
* @author lxm
|
|
@@ -43156,7 +43359,7 @@ var LogicTrigger = class {
|
|
|
43156
43359
|
if (this.executor) {
|
|
43157
43360
|
return this.executor.execute(executeParams);
|
|
43158
43361
|
}
|
|
43159
|
-
throw new
|
|
43362
|
+
throw new RuntimeError72(
|
|
43160
43363
|
ibiz.i18n.t("runtime.logicScheduler.trigger.noExecutorBound", {
|
|
43161
43364
|
id: this.logic.id
|
|
43162
43365
|
})
|
|
@@ -43177,12 +43380,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
43177
43380
|
};
|
|
43178
43381
|
|
|
43179
43382
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
43180
|
-
import { RuntimeError as
|
|
43383
|
+
import { RuntimeError as RuntimeError73 } from "@ibiz-template/core";
|
|
43181
43384
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
43182
43385
|
bindExecutor(executor) {
|
|
43183
43386
|
super.bindExecutor(executor);
|
|
43184
43387
|
if (this.executor.type !== "SCRIPT") {
|
|
43185
|
-
throw new
|
|
43388
|
+
throw new RuntimeError73(
|
|
43186
43389
|
ibiz.i18n.t("runtime.logicScheduler.trigger.triggerType")
|
|
43187
43390
|
);
|
|
43188
43391
|
}
|
|
@@ -43219,7 +43422,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
43219
43422
|
};
|
|
43220
43423
|
|
|
43221
43424
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
43222
|
-
import { RuntimeError as
|
|
43425
|
+
import { RuntimeError as RuntimeError74, RuntimeModelError as RuntimeModelError75 } from "@ibiz-template/core";
|
|
43223
43426
|
var TimerTrigger = class extends LogicTrigger {
|
|
43224
43427
|
constructor() {
|
|
43225
43428
|
super(...arguments);
|
|
@@ -43234,7 +43437,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
43234
43437
|
}
|
|
43235
43438
|
this.timer = setInterval(() => {
|
|
43236
43439
|
if (!this.scheduler.defaultParamsCb) {
|
|
43237
|
-
throw new
|
|
43440
|
+
throw new RuntimeError74(
|
|
43238
43441
|
ibiz.i18n.t("runtime.logicScheduler.trigger.parameterCallback")
|
|
43239
43442
|
);
|
|
43240
43443
|
}
|
|
@@ -43253,7 +43456,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
43253
43456
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
43254
43457
|
import {
|
|
43255
43458
|
ModelError as ModelError34,
|
|
43256
|
-
RuntimeError as
|
|
43459
|
+
RuntimeError as RuntimeError75,
|
|
43257
43460
|
RuntimeModelError as RuntimeModelError76
|
|
43258
43461
|
} from "@ibiz-template/core";
|
|
43259
43462
|
import { notNilEmpty as notNilEmpty11 } from "qx-util";
|
|
@@ -43291,7 +43494,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43291
43494
|
const { context, params, ...rest } = parameters;
|
|
43292
43495
|
const { data } = parameters;
|
|
43293
43496
|
if (!(data == null ? void 0 : data[0])) {
|
|
43294
|
-
throw new
|
|
43497
|
+
throw new RuntimeError75(
|
|
43295
43498
|
ibiz.i18n.t("runtime.logicScheduler.executor.noActionableData")
|
|
43296
43499
|
);
|
|
43297
43500
|
}
|
|
@@ -43360,7 +43563,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43360
43563
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
43361
43564
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
43362
43565
|
if (!findView) {
|
|
43363
|
-
throw new
|
|
43566
|
+
throw new RuntimeError75(
|
|
43364
43567
|
ibiz.i18n.t("runtime.logicScheduler.executor.editViews", {
|
|
43365
43568
|
formTypeValue
|
|
43366
43569
|
})
|
|
@@ -43493,7 +43696,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43493
43696
|
}
|
|
43494
43697
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
43495
43698
|
if (!selectData) {
|
|
43496
|
-
throw new
|
|
43699
|
+
throw new RuntimeError75(
|
|
43497
43700
|
ibiz.i18n.t("runtime.logicScheduler.executor.checkOne")
|
|
43498
43701
|
);
|
|
43499
43702
|
}
|
|
@@ -43505,7 +43708,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43505
43708
|
}
|
|
43506
43709
|
);
|
|
43507
43710
|
if (!findView) {
|
|
43508
|
-
throw new
|
|
43711
|
+
throw new RuntimeError75(
|
|
43509
43712
|
ibiz.i18n.t("runtime.logicScheduler.executor.entitiesAssociated", {
|
|
43510
43713
|
indexType
|
|
43511
43714
|
})
|
|
@@ -43547,7 +43750,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43547
43750
|
}
|
|
43548
43751
|
});
|
|
43549
43752
|
if (pickParentFieldName === void 0) {
|
|
43550
|
-
throw new
|
|
43753
|
+
throw new RuntimeError75(
|
|
43551
43754
|
ibiz.i18n.t("runtime.logicScheduler.executor.foreignKey", {
|
|
43552
43755
|
pickParentDeName
|
|
43553
43756
|
})
|
|
@@ -43862,7 +44065,10 @@ var en = {
|
|
|
43862
44065
|
simpleMode: "Simple mode, no saving",
|
|
43863
44066
|
dataDeleted: "Data [{str}] deleted successfully!",
|
|
43864
44067
|
noChange: "The value has not changed",
|
|
43865
|
-
firstComplete: "Please complete the current line in the line editor first"
|
|
44068
|
+
firstComplete: "Please complete the current line in the line editor first",
|
|
44069
|
+
noMoveDataCconfig: "No move data behavior config",
|
|
44070
|
+
changeGroupError: "Failed to switch the group",
|
|
44071
|
+
computeMoveMetaError: "Error in calculating target position and movement type"
|
|
43866
44072
|
},
|
|
43867
44073
|
editor: {
|
|
43868
44074
|
editorNoConfigured: "Editor type [{editorType}], code table not configured"
|
|
@@ -43973,7 +44179,8 @@ var en = {
|
|
|
43973
44179
|
},
|
|
43974
44180
|
reportPanel: {
|
|
43975
44181
|
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"
|
|
44182
|
+
noImplemented: "Specify the report {reportType} type report panel generator not implemented yet",
|
|
44183
|
+
noReportUIModel: "The report ui model is not configured"
|
|
43977
44184
|
},
|
|
43978
44185
|
searchBar: {
|
|
43979
44186
|
noFoundEntity: "Cannot find the associated entity corresponding to the attribute {targetField}.",
|
|
@@ -44440,7 +44647,10 @@ var zhCn = {
|
|
|
44440
44647
|
simpleMode: "\u7B80\u5355\u6A21\u5F0F\uFF0C\u4E0D\u4FDD\u5B58",
|
|
44441
44648
|
dataDeleted: "\u6570\u636E[{str}]\u5220\u9664\u6210\u529F!",
|
|
44442
44649
|
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"
|
|
44650
|
+
firstComplete: "\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C",
|
|
44651
|
+
noMoveDataCconfig: "\u65E0\u79FB\u52A8\u6570\u636E\u884C\u4E3A\u914D\u7F6E",
|
|
44652
|
+
changeGroupError: "\u5207\u6362\u5206\u7EC4\u5931\u8D25",
|
|
44653
|
+
computeMoveMetaError: "\u8BA1\u7B97\u76EE\u6807\u4F4D\u7F6E\u548C\u79FB\u52A8\u7C7B\u578B\u53D1\u751F\u9519\u8BEF"
|
|
44444
44654
|
},
|
|
44445
44655
|
editor: {
|
|
44446
44656
|
editorNoConfigured: "\u7F16\u8F91\u5668\u7C7B\u578B[{editorType}]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868"
|
|
@@ -44551,7 +44761,8 @@ var zhCn = {
|
|
|
44551
44761
|
},
|
|
44552
44762
|
reportPanel: {
|
|
44553
44763
|
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"
|
|
44764
|
+
noImplemented: "\u6307\u5B9A\u62A5\u8868{reportType}\u7C7B\u578B\u62A5\u8868\u9762\u677F\u751F\u6210\u5668\u6682\u672A\u5B9E\u73B0",
|
|
44765
|
+
noReportUIModel: "\u672A\u914D\u7F6E\u6307\u5B9A\u62A5\u8868\u754C\u9762\u6A21\u578B"
|
|
44555
44766
|
},
|
|
44556
44767
|
searchBar: {
|
|
44557
44768
|
noFoundEntity: "\u627E\u4E0D\u5230\u5C5E\u6027{targetField}\u5BF9\u5E94\u7684\u5173\u8054\u5B9E\u4F53",
|