@ibiz-template/runtime 0.7.25 → 0.7.26-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 +509 -194
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +2 -1
- package/out/application.d.ts +3 -2
- package/out/application.d.ts.map +1 -1
- package/out/application.js +3 -2
- package/out/controller/control/chart/generator/base-series-generator.d.ts +16 -0
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +111 -4
- package/out/controller/control/chart/generator/chart-options-generator.d.ts +7 -0
- package/out/controller/control/chart/generator/chart-options-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/chart-options-generator.js +167 -2
- package/out/controller/control/dashboard/dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/dashboard.controller.js +1 -0
- package/out/controller/control/dashboard/portlet/index.d.ts +1 -0
- package/out/controller/control/dashboard/portlet/index.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/index.js +1 -0
- package/out/controller/control/dashboard/portlet/report-portlet/index.d.ts +2 -0
- package/out/controller/control/dashboard/portlet/report-portlet/index.d.ts.map +1 -0
- package/out/controller/control/dashboard/portlet/report-portlet/index.js +1 -0
- package/out/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.d.ts +12 -0
- package/out/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.d.ts.map +1 -0
- package/out/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.js +14 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.js +12 -2
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.d.ts +8 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +2 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +40 -42
- package/out/controller/control/kanban/kanban.controller.d.ts +4 -7
- package/out/controller/control/kanban/kanban.controller.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.controller.js +44 -71
- package/out/controller/control/report-panel/generator/base-generator.d.ts +13 -3
- package/out/controller/control/report-panel/generator/base-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/base-generator.js +3 -2
- package/out/controller/control/report-panel/generator/bi-generator.d.ts +9 -0
- package/out/controller/control/report-panel/generator/bi-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/bi-generator.js +14 -0
- package/out/controller/control/report-panel/generator/generator-factory.d.ts +5 -2
- package/out/controller/control/report-panel/generator/generator-factory.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/generator-factory.js +7 -5
- package/out/controller/control/report-panel/generator/user-generator.d.ts +1 -1
- package/out/controller/control/report-panel/generator/user-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/user-generator.js +1 -1
- package/out/controller/control/report-panel/report-panel.controller.d.ts +11 -3
- package/out/controller/control/report-panel/report-panel.controller.d.ts.map +1 -1
- package/out/controller/control/report-panel/report-panel.controller.js +38 -24
- package/out/engine/md-view.engine.d.ts +1 -29
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +0 -55
- package/out/engine/view-base.engine.d.ts +29 -1
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +55 -0
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts +11 -2
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-report-panel.state.d.ts +1 -1
- package/out/interface/controller/state/control/i-report-panel.state.d.ts.map +1 -1
- package/out/interface/provider/model-loader.provider.d.ts +10 -1
- package/out/interface/provider/model-loader.provider.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +3 -0
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +3 -0
- package/out/locale/zh-CN/index.d.ts +3 -0
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +3 -0
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -15461,8 +15461,9 @@ var Application = class {
|
|
|
15461
15461
|
* @date 2022-12-22 15:12:26
|
|
15462
15462
|
* @param {IApplication} model
|
|
15463
15463
|
*/
|
|
15464
|
-
constructor(model) {
|
|
15464
|
+
constructor(model, subAppRef) {
|
|
15465
15465
|
this.model = model;
|
|
15466
|
+
this.subAppRef = subAppRef;
|
|
15466
15467
|
/**
|
|
15467
15468
|
* 应用实体名称到应用实体代码名称的映射
|
|
15468
15469
|
*
|
|
@@ -15496,7 +15497,7 @@ var Application = class {
|
|
|
15496
15497
|
*/
|
|
15497
15498
|
this.appBIReportMap = /* @__PURE__ */ new Map();
|
|
15498
15499
|
this.net = new Net({
|
|
15499
|
-
baseURL: "".concat(ibiz.env.baseUrl, "/").concat(this.appId)
|
|
15500
|
+
baseURL: "".concat(ibiz.env.baseUrl, "/").concat(subAppRef && subAppRef.serviceId ? subAppRef.serviceId : this.appId)
|
|
15500
15501
|
});
|
|
15501
15502
|
this.configCache = new ConfigService(
|
|
15502
15503
|
this.appId,
|
|
@@ -20343,6 +20344,20 @@ var BaseSeriesGenerator = class {
|
|
|
20343
20344
|
constructor(model, chartGenerator) {
|
|
20344
20345
|
this.model = model;
|
|
20345
20346
|
this.chartGenerator = chartGenerator;
|
|
20347
|
+
/**
|
|
20348
|
+
* 分类属性(小写)
|
|
20349
|
+
* @author lxm
|
|
20350
|
+
* @date 2023-06-09 02:44:57
|
|
20351
|
+
* @type {string}
|
|
20352
|
+
*/
|
|
20353
|
+
this.catalogField = "";
|
|
20354
|
+
/**
|
|
20355
|
+
* 分类属性(小写)数组,用于构建多维度分层
|
|
20356
|
+
*
|
|
20357
|
+
* @type {string[]}
|
|
20358
|
+
* @memberof BaseSeriesGenerator
|
|
20359
|
+
*/
|
|
20360
|
+
this.catalogFields = [];
|
|
20346
20361
|
/**
|
|
20347
20362
|
* 根据分组处理出来的图表数据数组
|
|
20348
20363
|
* @author lxm
|
|
@@ -20364,6 +20379,7 @@ var BaseSeriesGenerator = class {
|
|
|
20364
20379
|
* @type {boolean}
|
|
20365
20380
|
*/
|
|
20366
20381
|
this.autoCompleteCategory = true;
|
|
20382
|
+
var _a;
|
|
20367
20383
|
this.model = model;
|
|
20368
20384
|
this.chartGenerator = chartGenerator;
|
|
20369
20385
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
@@ -20379,6 +20395,18 @@ var BaseSeriesGenerator = class {
|
|
|
20379
20395
|
ibiz.i18n.t("runtime.controller.control.chart.missingValue")
|
|
20380
20396
|
);
|
|
20381
20397
|
}
|
|
20398
|
+
if (chartGenerator.model.controlParam && ((_a = chartGenerator.model.controlParam.ctrlParams) == null ? void 0 : _a.CATALOGFIELDS)) {
|
|
20399
|
+
try {
|
|
20400
|
+
const tempCatalogFields = JSON.parse(
|
|
20401
|
+
chartGenerator.model.controlParam.ctrlParams.CATALOGFIELDS
|
|
20402
|
+
);
|
|
20403
|
+
if (Array.isArray(tempCatalogFields)) {
|
|
20404
|
+
this.catalogFields = tempCatalogFields;
|
|
20405
|
+
}
|
|
20406
|
+
} catch (e) {
|
|
20407
|
+
throw new Error(ibiz.i18n.t("runtime.control.chart.errorJson"));
|
|
20408
|
+
}
|
|
20409
|
+
}
|
|
20382
20410
|
this.catalogField = chartGenerator.getFieldKey(model.catalogField);
|
|
20383
20411
|
this.valueField = chartGenerator.getFieldKey(model.valueField);
|
|
20384
20412
|
this.groupField = model.seriesField ? chartGenerator.getFieldKey(model.seriesField) : void 0;
|
|
@@ -20463,6 +20491,42 @@ var BaseSeriesGenerator = class {
|
|
|
20463
20491
|
groupData[group].get(catalog).chartData = tempChartData;
|
|
20464
20492
|
(_a = this.chartDataArr) == null ? void 0 : _a.push(tempChartData);
|
|
20465
20493
|
}
|
|
20494
|
+
/**
|
|
20495
|
+
* 处理多分类分组
|
|
20496
|
+
*
|
|
20497
|
+
* @param {IData[]} prevItems
|
|
20498
|
+
* @param {IData[]} nextItems
|
|
20499
|
+
* @return {*}
|
|
20500
|
+
* @memberof BaseSeriesGenerator
|
|
20501
|
+
*/
|
|
20502
|
+
handleMultiCatalogGroup(prevItems, nextItems) {
|
|
20503
|
+
let tempItems = [];
|
|
20504
|
+
if (prevItems.length === 0) {
|
|
20505
|
+
tempItems = nextItems.map((item) => {
|
|
20506
|
+
return {
|
|
20507
|
+
text: item.text,
|
|
20508
|
+
value: item.value
|
|
20509
|
+
};
|
|
20510
|
+
});
|
|
20511
|
+
} else {
|
|
20512
|
+
for (let prev = 0; prev < prevItems.length; prev++) {
|
|
20513
|
+
if (nextItems.length > 0) {
|
|
20514
|
+
for (let next = 0; next < nextItems.length; next++) {
|
|
20515
|
+
tempItems.push({
|
|
20516
|
+
text: "".concat(prevItems[prev].text, "_").concat(nextItems[next].text),
|
|
20517
|
+
value: nextItems[next].value
|
|
20518
|
+
});
|
|
20519
|
+
}
|
|
20520
|
+
} else {
|
|
20521
|
+
tempItems.push({
|
|
20522
|
+
text: prevItems[prev].text,
|
|
20523
|
+
value: prevItems[prev].value
|
|
20524
|
+
});
|
|
20525
|
+
}
|
|
20526
|
+
}
|
|
20527
|
+
}
|
|
20528
|
+
return tempItems;
|
|
20529
|
+
}
|
|
20466
20530
|
/**
|
|
20467
20531
|
* 计算分组数据
|
|
20468
20532
|
* @author lxm
|
|
@@ -20489,7 +20553,35 @@ var BaseSeriesGenerator = class {
|
|
|
20489
20553
|
}
|
|
20490
20554
|
if (!groupData[group]) {
|
|
20491
20555
|
groupData[group] = /* @__PURE__ */ new Map();
|
|
20492
|
-
if (
|
|
20556
|
+
if (this.catalogFields.length > 0) {
|
|
20557
|
+
let tempCodes = [];
|
|
20558
|
+
const tempCodeLists = [];
|
|
20559
|
+
this.catalogFields.forEach((catalog2) => {
|
|
20560
|
+
const { codelistId } = catalog2;
|
|
20561
|
+
if (codelistId && this.autoCompleteCategory) {
|
|
20562
|
+
const codeListItems = this.chartGenerator.codeListMap.get(codelistId);
|
|
20563
|
+
tempCodeLists.push(clone21(codeListItems));
|
|
20564
|
+
}
|
|
20565
|
+
});
|
|
20566
|
+
for (let i = 0; i < tempCodeLists.length; i++) {
|
|
20567
|
+
tempCodes = this.handleMultiCatalogGroup(
|
|
20568
|
+
tempCodes,
|
|
20569
|
+
tempCodeLists[i]
|
|
20570
|
+
);
|
|
20571
|
+
}
|
|
20572
|
+
tempCodes.forEach((x) => {
|
|
20573
|
+
groupData[group].set(x.text, { value: 0 });
|
|
20574
|
+
this.prepareChartData(
|
|
20575
|
+
groupData,
|
|
20576
|
+
{
|
|
20577
|
+
[this.valueField]: 0,
|
|
20578
|
+
[this.catalogField]: x.value
|
|
20579
|
+
},
|
|
20580
|
+
x.text,
|
|
20581
|
+
group
|
|
20582
|
+
);
|
|
20583
|
+
});
|
|
20584
|
+
} else if (catalogCodeListId && this.autoCompleteCategory) {
|
|
20493
20585
|
const codeListItems = this.chartGenerator.codeListMap.get(catalogCodeListId);
|
|
20494
20586
|
codeListItems.forEach((x) => {
|
|
20495
20587
|
groupData[group].set(x.text, { value: 0 });
|
|
@@ -20505,11 +20597,31 @@ var BaseSeriesGenerator = class {
|
|
|
20505
20597
|
});
|
|
20506
20598
|
}
|
|
20507
20599
|
}
|
|
20508
|
-
|
|
20509
|
-
|
|
20510
|
-
|
|
20511
|
-
|
|
20512
|
-
|
|
20600
|
+
let catalog = "";
|
|
20601
|
+
if (this.catalogFields.length > 0) {
|
|
20602
|
+
const tempCatalog = [];
|
|
20603
|
+
this.catalogFields.forEach((_catalog) => {
|
|
20604
|
+
const mergeCatalog = this.translateVal(
|
|
20605
|
+
_catalog.codelistId,
|
|
20606
|
+
item[_catalog.codename],
|
|
20607
|
+
true
|
|
20608
|
+
);
|
|
20609
|
+
if (!mergeCatalog) {
|
|
20610
|
+
return;
|
|
20611
|
+
}
|
|
20612
|
+
tempCatalog.push(mergeCatalog);
|
|
20613
|
+
});
|
|
20614
|
+
if (tempCatalog.length !== this.catalogFields.length) {
|
|
20615
|
+
return;
|
|
20616
|
+
}
|
|
20617
|
+
catalog = tempCatalog.join("_");
|
|
20618
|
+
} else {
|
|
20619
|
+
catalog = this.translateVal(
|
|
20620
|
+
catalogCodeListId,
|
|
20621
|
+
item[this.catalogField],
|
|
20622
|
+
true
|
|
20623
|
+
);
|
|
20624
|
+
}
|
|
20513
20625
|
if (!catalog) {
|
|
20514
20626
|
return;
|
|
20515
20627
|
}
|
|
@@ -20525,7 +20637,10 @@ var BaseSeriesGenerator = class {
|
|
|
20525
20637
|
} else {
|
|
20526
20638
|
this.prepareChartData(
|
|
20527
20639
|
groupData,
|
|
20528
|
-
{
|
|
20640
|
+
{
|
|
20641
|
+
...item,
|
|
20642
|
+
[this.valueField]: groupData[group].get(catalog).value
|
|
20643
|
+
},
|
|
20529
20644
|
catalog,
|
|
20530
20645
|
group
|
|
20531
20646
|
);
|
|
@@ -21255,6 +21370,140 @@ var ChartOptionsGenerator2 = class {
|
|
|
21255
21370
|
});
|
|
21256
21371
|
return AxisOption;
|
|
21257
21372
|
}
|
|
21373
|
+
/**
|
|
21374
|
+
* 初始化多分类的X轴配置
|
|
21375
|
+
*
|
|
21376
|
+
* @return {*} {Promise<void>}
|
|
21377
|
+
* @memberof ChartOptionsGenerator
|
|
21378
|
+
*/
|
|
21379
|
+
async initMultiCatalogxAxis(context, params) {
|
|
21380
|
+
var _a, _b, _c, _d, _e;
|
|
21381
|
+
const { controlParam } = this.model;
|
|
21382
|
+
if (controlParam && ((_a = controlParam.ctrlParams) == null ? void 0 : _a.CATALOGFIELDS)) {
|
|
21383
|
+
try {
|
|
21384
|
+
const tempCatalogFields = JSON.parse(
|
|
21385
|
+
controlParam.ctrlParams.CATALOGFIELDS
|
|
21386
|
+
);
|
|
21387
|
+
const tempaxis = [];
|
|
21388
|
+
let titleshow = true;
|
|
21389
|
+
let labelshoww = true;
|
|
21390
|
+
let gridIndex = 0;
|
|
21391
|
+
if (Array.isArray(tempCatalogFields)) {
|
|
21392
|
+
const app = ibiz.hub.getApp(context.srfappid);
|
|
21393
|
+
if (this.chartUserParam && this.chartUserParam.xAxis) {
|
|
21394
|
+
if (Array.isArray(this.chartUserParam.xAxis)) {
|
|
21395
|
+
const tempconfig = this.chartUserParam.xAxis[this.chartUserParam.xAxis.length - 1];
|
|
21396
|
+
titleshow = tempconfig.name === void 0 ? true : !!tempconfig.name;
|
|
21397
|
+
labelshoww = ((_b = tempconfig.axisLabel) == null ? void 0 : _b.show) === void 0 ? true : (_c = tempconfig.axisLabel) == null ? void 0 : _c.show;
|
|
21398
|
+
} else {
|
|
21399
|
+
titleshow = this.chartUserParam.xAxis.name === void 0 ? true : !!this.chartUserParam.xAxis.name;
|
|
21400
|
+
labelshoww = ((_d = this.chartUserParam.xAxis.axisLabel) == null ? void 0 : _d.show) === void 0 ? true : (_e = this.chartUserParam.xAxis.axisLabel) == null ? void 0 : _e.show;
|
|
21401
|
+
}
|
|
21402
|
+
}
|
|
21403
|
+
if (this.chartUserParam && this.chartUserParam.grid && Array.isArray(this.chartUserParam.grid)) {
|
|
21404
|
+
gridIndex = this.chartUserParam.grid.length - 1;
|
|
21405
|
+
}
|
|
21406
|
+
await Promise.all(
|
|
21407
|
+
tempCatalogFields.slice(0, -1).map(async (catalog, index) => {
|
|
21408
|
+
if (catalog.mode === "codelist" && catalog.codelistId) {
|
|
21409
|
+
const codeListItems = await app.codeList.get(
|
|
21410
|
+
catalog.codelistId,
|
|
21411
|
+
context,
|
|
21412
|
+
params
|
|
21413
|
+
);
|
|
21414
|
+
if (codeListItems) {
|
|
21415
|
+
const tempxAxisData = [];
|
|
21416
|
+
const xAxisData = codeListItems.map((code) => {
|
|
21417
|
+
return {
|
|
21418
|
+
value: code.text,
|
|
21419
|
+
textStyle: {
|
|
21420
|
+
lineHeight: 45 * (tempCatalogFields.length - 1 - index)
|
|
21421
|
+
}
|
|
21422
|
+
};
|
|
21423
|
+
});
|
|
21424
|
+
if (index === 0) {
|
|
21425
|
+
tempaxis.push({
|
|
21426
|
+
show: labelshoww,
|
|
21427
|
+
gridIndex,
|
|
21428
|
+
type: "category",
|
|
21429
|
+
data: xAxisData,
|
|
21430
|
+
position: "bottom"
|
|
21431
|
+
});
|
|
21432
|
+
} else {
|
|
21433
|
+
let length = 1;
|
|
21434
|
+
for (let i = 0; i < tempaxis.length; i++) {
|
|
21435
|
+
length *= tempaxis[i].data.length;
|
|
21436
|
+
}
|
|
21437
|
+
for (let i = 0; i < length; i++) {
|
|
21438
|
+
tempxAxisData.push(...xAxisData);
|
|
21439
|
+
}
|
|
21440
|
+
tempaxis.push({
|
|
21441
|
+
show: labelshoww,
|
|
21442
|
+
gridIndex,
|
|
21443
|
+
type: "category",
|
|
21444
|
+
data: tempxAxisData,
|
|
21445
|
+
position: "bottom"
|
|
21446
|
+
});
|
|
21447
|
+
}
|
|
21448
|
+
}
|
|
21449
|
+
}
|
|
21450
|
+
})
|
|
21451
|
+
);
|
|
21452
|
+
const mergeName = tempCatalogFields.map((catalog) => {
|
|
21453
|
+
return catalog.name;
|
|
21454
|
+
}).join("/");
|
|
21455
|
+
tempaxis.push({
|
|
21456
|
+
type: "category",
|
|
21457
|
+
gridIndex,
|
|
21458
|
+
show: titleshow,
|
|
21459
|
+
data: [
|
|
21460
|
+
{
|
|
21461
|
+
value: mergeName,
|
|
21462
|
+
textStyle: {
|
|
21463
|
+
lineHeight: labelshoww ? 45 * tempCatalogFields.length : 45
|
|
21464
|
+
}
|
|
21465
|
+
}
|
|
21466
|
+
],
|
|
21467
|
+
position: "bottom"
|
|
21468
|
+
});
|
|
21469
|
+
if (this.chartUserParam) {
|
|
21470
|
+
if (this.chartUserParam.xAxis && Array.isArray(this.chartUserParam.xAxis)) {
|
|
21471
|
+
this.chartUserParam.xAxis = [
|
|
21472
|
+
...this.chartUserParam.xAxis,
|
|
21473
|
+
...tempaxis
|
|
21474
|
+
];
|
|
21475
|
+
} else if (this.chartUserParam.xAxis) {
|
|
21476
|
+
this.chartUserParam.xAxis = [
|
|
21477
|
+
this.chartUserParam.xAxis,
|
|
21478
|
+
...tempaxis
|
|
21479
|
+
];
|
|
21480
|
+
}
|
|
21481
|
+
if (!this.chartUserParam.grid) {
|
|
21482
|
+
this.chartUserParam.grid = {};
|
|
21483
|
+
}
|
|
21484
|
+
let { length } = tempCatalogFields;
|
|
21485
|
+
if (!labelshoww) {
|
|
21486
|
+
length = 1;
|
|
21487
|
+
}
|
|
21488
|
+
if (!titleshow) {
|
|
21489
|
+
length -= 1;
|
|
21490
|
+
}
|
|
21491
|
+
if (length === 0) {
|
|
21492
|
+
Object.assign(this.chartUserParam.grid, {
|
|
21493
|
+
bottom: 45
|
|
21494
|
+
});
|
|
21495
|
+
} else {
|
|
21496
|
+
Object.assign(this.chartUserParam.grid, {
|
|
21497
|
+
bottom: (length > 2 ? length - 1 : length) * 45
|
|
21498
|
+
});
|
|
21499
|
+
}
|
|
21500
|
+
}
|
|
21501
|
+
}
|
|
21502
|
+
} catch (e) {
|
|
21503
|
+
throw new Error(ibiz.i18n.t("runtime.control.chart.errorJson"));
|
|
21504
|
+
}
|
|
21505
|
+
}
|
|
21506
|
+
}
|
|
21258
21507
|
/**
|
|
21259
21508
|
* 初始化
|
|
21260
21509
|
* @author lxm
|
|
@@ -21265,6 +21514,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
21265
21514
|
*/
|
|
21266
21515
|
async init(context, params) {
|
|
21267
21516
|
await this.loadCodeList(context, params);
|
|
21517
|
+
await this.initMultiCatalogxAxis(context, params);
|
|
21268
21518
|
this.entity = await ibiz.hub.getAppDataEntity(
|
|
21269
21519
|
this.model.appDataEntityId,
|
|
21270
21520
|
this.model.appId
|
|
@@ -21293,7 +21543,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
21293
21543
|
* @return {*} {Promise<void>}
|
|
21294
21544
|
*/
|
|
21295
21545
|
async loadCodeList(context, params) {
|
|
21296
|
-
var _a;
|
|
21546
|
+
var _a, _b, _c;
|
|
21297
21547
|
this.codeListMap.clear();
|
|
21298
21548
|
if (!((_a = this.model.dechartSerieses) == null ? void 0 : _a.length)) {
|
|
21299
21549
|
return;
|
|
@@ -21306,11 +21556,29 @@ var ChartOptionsGenerator2 = class {
|
|
|
21306
21556
|
const codeListItems = await app.codeList.get(key, context, params);
|
|
21307
21557
|
this.codeListMap.set(key, codeListItems);
|
|
21308
21558
|
};
|
|
21559
|
+
if ((_c = (_b = this.model.controlParam) == null ? void 0 : _b.ctrlParams) == null ? void 0 : _c.CATALOGFIELDS) {
|
|
21560
|
+
try {
|
|
21561
|
+
const tempCatalogFields = JSON.parse(
|
|
21562
|
+
this.model.controlParam.ctrlParams.CATALOGFIELDS
|
|
21563
|
+
);
|
|
21564
|
+
if (Array.isArray(tempCatalogFields)) {
|
|
21565
|
+
await Promise.all(
|
|
21566
|
+
tempCatalogFields.map(async (catalog) => {
|
|
21567
|
+
if (catalog.mode === "codelist") {
|
|
21568
|
+
await loadCodeList(catalog.codelistId);
|
|
21569
|
+
}
|
|
21570
|
+
})
|
|
21571
|
+
);
|
|
21572
|
+
}
|
|
21573
|
+
} catch (e) {
|
|
21574
|
+
throw new Error(ibiz.i18n.t("runtime.control.chart.errorJson"));
|
|
21575
|
+
}
|
|
21576
|
+
}
|
|
21309
21577
|
await Promise.all(
|
|
21310
21578
|
this.model.dechartSerieses.map(async (series) => {
|
|
21311
21579
|
const { seriesCodeListId, catalogCodeListId } = series;
|
|
21312
|
-
await loadCodeList(seriesCodeListId);
|
|
21313
21580
|
await loadCodeList(catalogCodeListId);
|
|
21581
|
+
await loadCodeList(seriesCodeListId);
|
|
21314
21582
|
})
|
|
21315
21583
|
);
|
|
21316
21584
|
}
|
|
@@ -24656,7 +24924,8 @@ var DashboardController = class extends ControlController {
|
|
|
24656
24924
|
"CHART" /* CHART */,
|
|
24657
24925
|
"APPMENU" /* APP_MENU */,
|
|
24658
24926
|
"TOOLBAR" /* TOOLBAR */,
|
|
24659
|
-
"LIST" /* LIST
|
|
24927
|
+
"LIST" /* LIST */,
|
|
24928
|
+
"REPORTPANEL" /* REPORT_PANEL */
|
|
24660
24929
|
];
|
|
24661
24930
|
await Promise.all(
|
|
24662
24931
|
portletModels.map(async (portlet) => {
|
|
@@ -25319,6 +25588,21 @@ var ListPortletController = class extends PortletPartController {
|
|
|
25319
25588
|
var RawItemPortletController = class extends PortletPartController {
|
|
25320
25589
|
};
|
|
25321
25590
|
|
|
25591
|
+
// src/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.ts
|
|
25592
|
+
var ReportPortletController = class extends PortletPartController {
|
|
25593
|
+
/**
|
|
25594
|
+
* 刷新报表部件
|
|
25595
|
+
*
|
|
25596
|
+
* @author tony001
|
|
25597
|
+
* @date 2024-06-19 18:06:14
|
|
25598
|
+
*/
|
|
25599
|
+
refresh() {
|
|
25600
|
+
if (this.contentController) {
|
|
25601
|
+
this.contentController.refresh();
|
|
25602
|
+
}
|
|
25603
|
+
}
|
|
25604
|
+
};
|
|
25605
|
+
|
|
25322
25606
|
// src/controller/control/data-view/data-view.controller.ts
|
|
25323
25607
|
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
25324
25608
|
import { isNil as isNil26 } from "ramda";
|
|
@@ -28839,10 +29123,19 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
28839
29123
|
*/
|
|
28840
29124
|
setFormController(id, controller) {
|
|
28841
29125
|
this.formMap.set(id, controller);
|
|
29126
|
+
controller.evt.on("onLoadSuccess", (event) => {
|
|
29127
|
+
var _a, _b;
|
|
29128
|
+
const formData = (_a = event.data) == null ? void 0 : _a[0];
|
|
29129
|
+
const item = (_b = this.state.items) == null ? void 0 : _b.find((child) => child.id === id);
|
|
29130
|
+
if (item && formData) {
|
|
29131
|
+
item.title = formData.srfmajortext || "";
|
|
29132
|
+
}
|
|
29133
|
+
});
|
|
28842
29134
|
controller.evt.on("onSaveSuccess", (event) => {
|
|
28843
29135
|
const formData = event.data[0];
|
|
28844
29136
|
const item = this.state.items.find((x) => x.id === id);
|
|
28845
|
-
if (item) {
|
|
29137
|
+
if (item && formData) {
|
|
29138
|
+
item.title = formData.srfmajortext || "";
|
|
28846
29139
|
if (item.context[this.deName] !== formData.srfkey) {
|
|
28847
29140
|
item.context[this.deName] = formData.srfkey;
|
|
28848
29141
|
}
|
|
@@ -28881,7 +29174,8 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
28881
29174
|
})
|
|
28882
29175
|
);
|
|
28883
29176
|
}
|
|
28884
|
-
await controller.remove();
|
|
29177
|
+
await controller.remove({ silent: true });
|
|
29178
|
+
this.formMap.delete(id);
|
|
28885
29179
|
const index = this.state.items.findIndex((item) => item.id === id);
|
|
28886
29180
|
if (index !== -1) {
|
|
28887
29181
|
this.state.items.splice(index, 1);
|
|
@@ -30942,6 +31236,7 @@ var GridController = class extends MDControlController {
|
|
|
30942
31236
|
}
|
|
30943
31237
|
await this.updateRows(this.state.rows);
|
|
30944
31238
|
this.calcGroupData(this.state.items);
|
|
31239
|
+
await this.loadRemoteAgg();
|
|
30945
31240
|
this.calcAggResult(this.state.items);
|
|
30946
31241
|
this.calcShowMode(this.state.items);
|
|
30947
31242
|
return items;
|
|
@@ -31029,6 +31324,7 @@ var GridController = class extends MDControlController {
|
|
|
31029
31324
|
);
|
|
31030
31325
|
}
|
|
31031
31326
|
const params = await this.getFetchParams();
|
|
31327
|
+
delete params.sort;
|
|
31032
31328
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
31033
31329
|
const res = await app.deService.exec(
|
|
31034
31330
|
aggAppDataEntityId,
|
|
@@ -32145,46 +32441,52 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
32145
32441
|
*/
|
|
32146
32442
|
calcFieldAgg(items) {
|
|
32147
32443
|
const { aggField, aggMode, aggValueFormat, unitName } = this.model;
|
|
32148
|
-
if (isNil29(aggMode) || aggMode === "NONE") {
|
|
32149
|
-
return;
|
|
32150
|
-
}
|
|
32151
32444
|
const fieldName = aggField || this.model.id;
|
|
32152
|
-
items = items.filter((item) => !isNil29(item[fieldName]));
|
|
32153
32445
|
let aggValue;
|
|
32154
|
-
if (this.grid.model.aggMode === "
|
|
32155
|
-
|
|
32156
|
-
|
|
32157
|
-
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0);
|
|
32158
|
-
break;
|
|
32159
|
-
case "AVG":
|
|
32160
|
-
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0) / items.length;
|
|
32161
|
-
break;
|
|
32162
|
-
case "MAX":
|
|
32163
|
-
aggValue = Math.max(...items.map((item) => item[fieldName]));
|
|
32164
|
-
break;
|
|
32165
|
-
case "MIN":
|
|
32166
|
-
aggValue = Math.min(...items.map((item) => item[fieldName]));
|
|
32167
|
-
break;
|
|
32168
|
-
default:
|
|
32169
|
-
throw new ModelError29(
|
|
32170
|
-
this.model,
|
|
32171
|
-
ibiz.i18n.t("runtime.controller.control.grid.noSupportedMode", {
|
|
32172
|
-
aggMode
|
|
32173
|
-
})
|
|
32174
|
-
);
|
|
32446
|
+
if (this.grid.model.aggMode === "ALL") {
|
|
32447
|
+
if (!this.grid.state.remoteAggResult) {
|
|
32448
|
+
return;
|
|
32175
32449
|
}
|
|
32176
|
-
|
|
32177
|
-
throw new ModelError29(
|
|
32178
|
-
this.model,
|
|
32179
|
-
ibiz.i18n.t("runtime.controller.control.grid.remoteAggregation")
|
|
32180
|
-
);
|
|
32450
|
+
aggValue = this.grid.state.remoteAggResult[fieldName] || "";
|
|
32181
32451
|
} else {
|
|
32182
|
-
|
|
32183
|
-
|
|
32184
|
-
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
|
|
32452
|
+
if (isNil29(aggMode) || aggMode === "NONE") {
|
|
32453
|
+
return;
|
|
32454
|
+
}
|
|
32455
|
+
items = items.filter((item) => !isNil29(item[fieldName]));
|
|
32456
|
+
if (this.grid.model.aggMode === "PAGE") {
|
|
32457
|
+
switch (aggMode) {
|
|
32458
|
+
case "SUM":
|
|
32459
|
+
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0);
|
|
32460
|
+
break;
|
|
32461
|
+
case "AVG":
|
|
32462
|
+
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0) / items.length;
|
|
32463
|
+
break;
|
|
32464
|
+
case "MAX":
|
|
32465
|
+
aggValue = Math.max(
|
|
32466
|
+
...items.map((item) => item[fieldName])
|
|
32467
|
+
);
|
|
32468
|
+
break;
|
|
32469
|
+
case "MIN":
|
|
32470
|
+
aggValue = Math.min(
|
|
32471
|
+
...items.map((item) => item[fieldName])
|
|
32472
|
+
);
|
|
32473
|
+
break;
|
|
32474
|
+
default:
|
|
32475
|
+
throw new ModelError29(
|
|
32476
|
+
this.model,
|
|
32477
|
+
ibiz.i18n.t("runtime.controller.control.grid.noSupportedMode", {
|
|
32478
|
+
aggMode
|
|
32479
|
+
})
|
|
32480
|
+
);
|
|
32481
|
+
}
|
|
32482
|
+
} else {
|
|
32483
|
+
throw new ModelError29(
|
|
32484
|
+
this.grid.model,
|
|
32485
|
+
ibiz.i18n.t("runtime.controller.control.grid.aggregateMode", {
|
|
32486
|
+
aggMode: this.grid.model.aggMode
|
|
32487
|
+
})
|
|
32488
|
+
);
|
|
32489
|
+
}
|
|
32188
32490
|
}
|
|
32189
32491
|
let value = "".concat(aggValue);
|
|
32190
32492
|
if (aggValueFormat) {
|
|
@@ -37507,41 +37809,6 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37507
37809
|
}
|
|
37508
37810
|
return super.handleDataGroup();
|
|
37509
37811
|
}
|
|
37510
|
-
/**
|
|
37511
|
-
* 处理自动分组
|
|
37512
|
-
*
|
|
37513
|
-
* @memberof KanbanController
|
|
37514
|
-
*/
|
|
37515
|
-
handleAutoGroup() {
|
|
37516
|
-
const { groupAppDEFieldId } = this.model;
|
|
37517
|
-
if (groupAppDEFieldId) {
|
|
37518
|
-
const { items } = this.state;
|
|
37519
|
-
const groupMap = /* @__PURE__ */ new Map();
|
|
37520
|
-
items.forEach((item) => {
|
|
37521
|
-
const groupVal = item[groupAppDEFieldId];
|
|
37522
|
-
if (isNil33(groupVal)) {
|
|
37523
|
-
return;
|
|
37524
|
-
}
|
|
37525
|
-
if (!groupMap.has(groupVal)) {
|
|
37526
|
-
groupMap.set(groupVal, []);
|
|
37527
|
-
}
|
|
37528
|
-
groupMap.get(groupVal).push(item);
|
|
37529
|
-
});
|
|
37530
|
-
const groups = [];
|
|
37531
|
-
groupMap.forEach((value, key) => {
|
|
37532
|
-
const codeListItem = this.groupCodeListItems.find(
|
|
37533
|
-
(item) => item.value === key
|
|
37534
|
-
);
|
|
37535
|
-
groups.push({
|
|
37536
|
-
caption: codeListItem.text,
|
|
37537
|
-
color: codeListItem.color,
|
|
37538
|
-
key: codeListItem.value,
|
|
37539
|
-
children: [...value]
|
|
37540
|
-
});
|
|
37541
|
-
});
|
|
37542
|
-
this.state.groups = groups;
|
|
37543
|
-
}
|
|
37544
|
-
}
|
|
37545
37812
|
/**
|
|
37546
37813
|
* 处理代码表分组
|
|
37547
37814
|
*
|
|
@@ -37624,36 +37891,36 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37624
37891
|
);
|
|
37625
37892
|
}
|
|
37626
37893
|
this.state.updating = true;
|
|
37627
|
-
const computeMoveData = (_fromIndex, _toIndex, _draggedItem, targetArray,
|
|
37894
|
+
const computeMoveData = (_fromIndex, _toIndex, _draggedItem, targetArray, isCrossGroup) => {
|
|
37628
37895
|
let moveData = {};
|
|
37629
37896
|
const targetItem = targetArray[_toIndex];
|
|
37630
37897
|
if (!targetItem) {
|
|
37631
37898
|
let tempArray = [];
|
|
37632
37899
|
if (targetArray.length > 0) {
|
|
37633
37900
|
tempArray = targetArray;
|
|
37634
|
-
} else if (allArray.length > 0) {
|
|
37635
|
-
tempArray = allArray;
|
|
37636
37901
|
}
|
|
37637
|
-
|
|
37638
|
-
const
|
|
37639
|
-
|
|
37902
|
+
if (tempArray.length > 0) {
|
|
37903
|
+
const maxItem = tempArray.reduce((prev, curr) => {
|
|
37904
|
+
const sortCondition = prev[sortField] > curr[sortField];
|
|
37905
|
+
if (sortCondition && prev[this.dataEntity.keyAppDEFieldId] !== _draggedItem.srfkey) {
|
|
37906
|
+
return prev;
|
|
37907
|
+
}
|
|
37908
|
+
if (!sortCondition && curr[this.dataEntity.keyAppDEFieldId] !== _draggedItem.srfkey) {
|
|
37909
|
+
return curr;
|
|
37910
|
+
}
|
|
37640
37911
|
return prev;
|
|
37912
|
+
});
|
|
37913
|
+
if (maxItem && maxItem[this.dataEntity.keyAppDEFieldId] !== _draggedItem.srfkey) {
|
|
37914
|
+
moveData = {
|
|
37915
|
+
srftargetkey: maxItem.srfkey,
|
|
37916
|
+
srfmovetype: "MOVEAFTER"
|
|
37917
|
+
};
|
|
37641
37918
|
}
|
|
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
37919
|
}
|
|
37653
37920
|
} else {
|
|
37654
37921
|
moveData = {
|
|
37655
37922
|
srftargetkey: targetItem.srfkey,
|
|
37656
|
-
srfmovetype: "MOVEBEFORE"
|
|
37923
|
+
srfmovetype: _toIndex < targetArray.length - 1 ? "MOVEBEFORE" : isCrossGroup ? "MOVEBEFORE" : "MOVEAFTER"
|
|
37657
37924
|
};
|
|
37658
37925
|
}
|
|
37659
37926
|
return moveData;
|
|
@@ -37693,21 +37960,23 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37693
37960
|
toIndex,
|
|
37694
37961
|
draggedItem,
|
|
37695
37962
|
originArr,
|
|
37696
|
-
|
|
37963
|
+
info.from !== info.to
|
|
37697
37964
|
);
|
|
37698
37965
|
try {
|
|
37699
|
-
const result = await this.moveOrderItem(draggedItem, params);
|
|
37700
|
-
if (
|
|
37701
|
-
|
|
37702
|
-
|
|
37703
|
-
|
|
37704
|
-
|
|
37705
|
-
|
|
37706
|
-
|
|
37707
|
-
|
|
37708
|
-
|
|
37709
|
-
|
|
37710
|
-
|
|
37966
|
+
const { ok, result } = await this.moveOrderItem(draggedItem, params);
|
|
37967
|
+
if (ok) {
|
|
37968
|
+
if (Array.isArray(result) && result.length > 0) {
|
|
37969
|
+
result.forEach((item) => {
|
|
37970
|
+
const index = this.state.items.findIndex(
|
|
37971
|
+
(x) => x.srfkey === item[this.dataEntity.keyAppDEFieldId]
|
|
37972
|
+
);
|
|
37973
|
+
if (index !== -1) {
|
|
37974
|
+
this.state.items[index][sortField] = item[sortField];
|
|
37975
|
+
}
|
|
37976
|
+
});
|
|
37977
|
+
} else {
|
|
37978
|
+
await this.refresh();
|
|
37979
|
+
}
|
|
37711
37980
|
}
|
|
37712
37981
|
} catch (error) {
|
|
37713
37982
|
this.state.updating = false;
|
|
@@ -37733,17 +38002,17 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37733
38002
|
const tempContext = this.context.clone();
|
|
37734
38003
|
tempContext[deName] = draggedItem.srfkey;
|
|
37735
38004
|
if (!moveMeta.srftargetkey || !moveMeta.srfmovetype) {
|
|
37736
|
-
|
|
37737
|
-
this.model,
|
|
38005
|
+
ibiz.log.error(
|
|
37738
38006
|
ibiz.i18n.t("runtime.controller.common.md.computeMoveMetaError")
|
|
37739
38007
|
);
|
|
38008
|
+
return { ok: false };
|
|
37740
38009
|
}
|
|
37741
38010
|
const res = await this.service.moveOrderItem(
|
|
37742
38011
|
tempContext,
|
|
37743
38012
|
draggedItem,
|
|
37744
38013
|
moveMeta
|
|
37745
38014
|
);
|
|
37746
|
-
return res.data;
|
|
38015
|
+
return { ok: true, result: res.data };
|
|
37747
38016
|
}
|
|
37748
38017
|
/**
|
|
37749
38018
|
* 批量更新修改的项,并更新后台返回的数据,然后重新计算分组和排序
|
|
@@ -39598,7 +39867,7 @@ var ReportPanelBaseGenerator = class {
|
|
|
39598
39867
|
* @param {IDEReportPanel} model
|
|
39599
39868
|
* @memberof ReportPanelBaseGenerator
|
|
39600
39869
|
*/
|
|
39601
|
-
constructor(model) {
|
|
39870
|
+
constructor(model, reportPanel) {
|
|
39602
39871
|
/**
|
|
39603
39872
|
* 配置
|
|
39604
39873
|
*
|
|
@@ -39607,6 +39876,7 @@ var ReportPanelBaseGenerator = class {
|
|
|
39607
39876
|
*/
|
|
39608
39877
|
this.config = {};
|
|
39609
39878
|
this.model = model;
|
|
39879
|
+
this.reportPanel = reportPanel;
|
|
39610
39880
|
this.setConfig();
|
|
39611
39881
|
}
|
|
39612
39882
|
/**
|
|
@@ -39633,7 +39903,7 @@ var ReportPanelBaseGenerator = class {
|
|
|
39633
39903
|
* @return {*} {Promise<IData>}
|
|
39634
39904
|
* @memberof ReportPanelBaseGenerator
|
|
39635
39905
|
*/
|
|
39636
|
-
load(data) {
|
|
39906
|
+
load(data = {}) {
|
|
39637
39907
|
return Promise.resolve(data);
|
|
39638
39908
|
}
|
|
39639
39909
|
};
|
|
@@ -39691,7 +39961,7 @@ var UserReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
39691
39961
|
* @return {*} {Promise<IData>}
|
|
39692
39962
|
* @memberof UserReportPanelGenerator
|
|
39693
39963
|
*/
|
|
39694
|
-
load(data) {
|
|
39964
|
+
load(data = {}) {
|
|
39695
39965
|
if (this.protoRef) {
|
|
39696
39966
|
this.protoRef.setData(data);
|
|
39697
39967
|
}
|
|
@@ -39731,6 +40001,20 @@ var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
39731
40001
|
sourceModel.reportTag = this.model.appDEReport.id;
|
|
39732
40002
|
this.config = sourceModel;
|
|
39733
40003
|
}
|
|
40004
|
+
/**
|
|
40005
|
+
* 加载数据
|
|
40006
|
+
*
|
|
40007
|
+
* @author tony001
|
|
40008
|
+
* @date 2024-06-20 11:06:52
|
|
40009
|
+
* @param {IData} data
|
|
40010
|
+
* @return {*} {Promise<IData>}
|
|
40011
|
+
*/
|
|
40012
|
+
load(data = {}) {
|
|
40013
|
+
if (this.protoRef) {
|
|
40014
|
+
this.protoRef.refresh("ALL");
|
|
40015
|
+
}
|
|
40016
|
+
return Promise.resolve(data);
|
|
40017
|
+
}
|
|
39734
40018
|
};
|
|
39735
40019
|
|
|
39736
40020
|
// src/controller/control/report-panel/generator/generator-factory.ts
|
|
@@ -39738,12 +40022,14 @@ var ReportPanelGeneratorFactory = class {
|
|
|
39738
40022
|
/**
|
|
39739
40023
|
* 获取报表面板生成器实例
|
|
39740
40024
|
*
|
|
40025
|
+
* @author tony001
|
|
40026
|
+
* @date 2024-06-20 15:06:18
|
|
39741
40027
|
* @static
|
|
39742
40028
|
* @param {IDEReportPanel} model
|
|
40029
|
+
* @param {IReportPanelController} reportPanel
|
|
39743
40030
|
* @return {*} {ReportPanelBaseGenerator}
|
|
39744
|
-
* @memberof ReportPanelGeneratorFactory
|
|
39745
40031
|
*/
|
|
39746
|
-
static getInstance(model) {
|
|
40032
|
+
static getInstance(model, reportPanel) {
|
|
39747
40033
|
if (!model || !model.appDEReport || !model.appDEReport.reportType) {
|
|
39748
40034
|
throw new Error(
|
|
39749
40035
|
ibiz.i18n.t("runtime.controller.control.reportPanel.reportType")
|
|
@@ -39751,9 +40037,9 @@ var ReportPanelGeneratorFactory = class {
|
|
|
39751
40037
|
}
|
|
39752
40038
|
switch (model.appDEReport.reportType) {
|
|
39753
40039
|
case "USER":
|
|
39754
|
-
return new UserReportPanelGenerator(model);
|
|
40040
|
+
return new UserReportPanelGenerator(model, reportPanel);
|
|
39755
40041
|
case "USER2":
|
|
39756
|
-
return new User2ReportPanelGenerator(model);
|
|
40042
|
+
return new User2ReportPanelGenerator(model, reportPanel);
|
|
39757
40043
|
case "DESYSBIREPORTS":
|
|
39758
40044
|
case "SYSBICUBE":
|
|
39759
40045
|
case "DESYSBICUBES":
|
|
@@ -39761,7 +40047,7 @@ var ReportPanelGeneratorFactory = class {
|
|
|
39761
40047
|
case "SYSBIREPORT":
|
|
39762
40048
|
case "SYSBICUBEREPORTS":
|
|
39763
40049
|
case "ALLSYSBIREPORTS":
|
|
39764
|
-
return new BIReportPanelGenerator(model);
|
|
40050
|
+
return new BIReportPanelGenerator(model, reportPanel);
|
|
39765
40051
|
default:
|
|
39766
40052
|
throw new Error(
|
|
39767
40053
|
ibiz.i18n.t("runtime.controller.control.reportPanel.noImplemented", {
|
|
@@ -39785,6 +40071,19 @@ var ReportPanelController = class extends ControlController {
|
|
|
39785
40071
|
get _evt() {
|
|
39786
40072
|
return this.evt;
|
|
39787
40073
|
}
|
|
40074
|
+
/**
|
|
40075
|
+
* 是否为bi报表
|
|
40076
|
+
*
|
|
40077
|
+
* @author tony001
|
|
40078
|
+
* @date 2024-06-19 18:06:02
|
|
40079
|
+
* @readonly
|
|
40080
|
+
*/
|
|
40081
|
+
get isBIReport() {
|
|
40082
|
+
if (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") {
|
|
40083
|
+
return true;
|
|
40084
|
+
}
|
|
40085
|
+
return false;
|
|
40086
|
+
}
|
|
39788
40087
|
/**
|
|
39789
40088
|
* 初始化状态
|
|
39790
40089
|
*
|
|
@@ -39805,7 +40104,7 @@ var ReportPanelController = class extends ControlController {
|
|
|
39805
40104
|
*/
|
|
39806
40105
|
async onCreated() {
|
|
39807
40106
|
await super.onCreated();
|
|
39808
|
-
this.generator = ReportPanelGeneratorFactory.getInstance(this.model);
|
|
40107
|
+
this.generator = ReportPanelGeneratorFactory.getInstance(this.model, this);
|
|
39809
40108
|
this.dataEntity = await ibiz.hub.getAppDataEntity(
|
|
39810
40109
|
this.model.appDataEntityId,
|
|
39811
40110
|
this.model.appId
|
|
@@ -39845,7 +40144,7 @@ var ReportPanelController = class extends ControlController {
|
|
|
39845
40144
|
* @memberof ReportPanelController
|
|
39846
40145
|
*/
|
|
39847
40146
|
async load(args = {}) {
|
|
39848
|
-
if (this.state.reportType &&
|
|
40147
|
+
if (this.state.reportType && this.isBIReport) {
|
|
39849
40148
|
return {};
|
|
39850
40149
|
}
|
|
39851
40150
|
await this.startLoading();
|
|
@@ -39906,6 +40205,10 @@ var ReportPanelController = class extends ControlController {
|
|
|
39906
40205
|
* @memberof ReportPanelController
|
|
39907
40206
|
*/
|
|
39908
40207
|
getData() {
|
|
40208
|
+
var _a;
|
|
40209
|
+
if (this.isBIReport) {
|
|
40210
|
+
return ((_a = this.generator.protoRef) == null ? void 0 : _a.state.items) || [];
|
|
40211
|
+
}
|
|
39909
40212
|
return [this.state.data];
|
|
39910
40213
|
}
|
|
39911
40214
|
/**
|
|
@@ -39913,23 +40216,27 @@ var ReportPanelController = class extends ControlController {
|
|
|
39913
40216
|
* @date 2023-05-23 03:42:41
|
|
39914
40217
|
*/
|
|
39915
40218
|
async refresh() {
|
|
39916
|
-
|
|
39917
|
-
|
|
39918
|
-
}
|
|
40219
|
+
if (this.isBIReport) {
|
|
40220
|
+
this.generator.load();
|
|
40221
|
+
} else {
|
|
40222
|
+
this.doNextActive(() => this.load({ isInitialLoad: false }), {
|
|
40223
|
+
key: "refresh"
|
|
40224
|
+
});
|
|
40225
|
+
}
|
|
39919
40226
|
}
|
|
39920
40227
|
/**
|
|
39921
40228
|
* 打开设计界面
|
|
39922
40229
|
*
|
|
39923
40230
|
* @author tony001
|
|
39924
40231
|
* @date 2024-06-18 16:06:46
|
|
39925
|
-
* @return {*} {Promise<
|
|
40232
|
+
* @return {*} {Promise<IModalData>}
|
|
39926
40233
|
*/
|
|
39927
40234
|
async openReportDesignPage() {
|
|
39928
|
-
if (this.state.reportType &&
|
|
40235
|
+
if (this.state.reportType && this.isBIReport) {
|
|
39929
40236
|
const modal = ibiz.overlay.createModal(
|
|
39930
40237
|
"iBizBIReportDesign",
|
|
39931
40238
|
{
|
|
39932
|
-
dismiss: () => modal.dismiss(),
|
|
40239
|
+
dismiss: (_data) => modal.dismiss(_data),
|
|
39933
40240
|
context: this.context,
|
|
39934
40241
|
viewParams: this.params,
|
|
39935
40242
|
config: this.generator.config
|
|
@@ -39942,9 +40249,9 @@ var ReportPanelController = class extends ControlController {
|
|
|
39942
40249
|
);
|
|
39943
40250
|
modal.present();
|
|
39944
40251
|
const result = await modal.onWillDismiss();
|
|
39945
|
-
return result
|
|
40252
|
+
return result;
|
|
39946
40253
|
}
|
|
39947
|
-
return
|
|
40254
|
+
return { ok: false, data: [] };
|
|
39948
40255
|
}
|
|
39949
40256
|
};
|
|
39950
40257
|
|
|
@@ -41660,7 +41967,8 @@ var AppHub = class {
|
|
|
41660
41967
|
throw new RuntimeError68(ibiz.i18n.t("runtime.utils.firstregister"));
|
|
41661
41968
|
}
|
|
41662
41969
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
41663
|
-
const
|
|
41970
|
+
const subAppRef = await this.modelLoaderProvider.getSubAppRef(id);
|
|
41971
|
+
const app = new Application(appModel, subAppRef);
|
|
41664
41972
|
this.appMap.set(id, app);
|
|
41665
41973
|
await this.modelLoaderProvider.initApp(id);
|
|
41666
41974
|
await app.init();
|
|
@@ -41871,6 +42179,33 @@ var ViewEngineBase = class {
|
|
|
41871
42179
|
get footerToolbar() {
|
|
41872
42180
|
return this.view.getController("footertoolbar");
|
|
41873
42181
|
}
|
|
42182
|
+
/**
|
|
42183
|
+
* 搜索表单控制器
|
|
42184
|
+
* @author lxm
|
|
42185
|
+
* @date 2023-05-22 01:56:25
|
|
42186
|
+
* @readonly
|
|
42187
|
+
*/
|
|
42188
|
+
get searchForm() {
|
|
42189
|
+
return this.view.getController("searchform");
|
|
42190
|
+
}
|
|
42191
|
+
/**
|
|
42192
|
+
* 搜索栏控制器
|
|
42193
|
+
* @author lxm
|
|
42194
|
+
* @date 2023-05-22 01:56:25
|
|
42195
|
+
* @readonly
|
|
42196
|
+
*/
|
|
42197
|
+
get searchBar() {
|
|
42198
|
+
return this.view.getController("searchbar");
|
|
42199
|
+
}
|
|
42200
|
+
/**
|
|
42201
|
+
* 获取分页搜索视图上移的搜索表单控制器
|
|
42202
|
+
* @author lxm
|
|
42203
|
+
* @date 2023-05-22 01:56:25
|
|
42204
|
+
* @readonly
|
|
42205
|
+
*/
|
|
42206
|
+
get tabSearchForm() {
|
|
42207
|
+
return this.view.getController("tabsearchform");
|
|
42208
|
+
}
|
|
41874
42209
|
/**
|
|
41875
42210
|
* 获取视图布局面板控制器
|
|
41876
42211
|
* @author lxm
|
|
@@ -42010,6 +42345,20 @@ var ViewEngineBase = class {
|
|
|
42010
42345
|
if (key === "ShortCut" /* SHOTR_CUT */) {
|
|
42011
42346
|
return this.onShortCut(_args);
|
|
42012
42347
|
}
|
|
42348
|
+
if (key === "ToggleFilter" /* TOGGLE_FILTER */) {
|
|
42349
|
+
this.toggleFilter();
|
|
42350
|
+
return null;
|
|
42351
|
+
}
|
|
42352
|
+
if (key === "Search" /* SEARCH */) {
|
|
42353
|
+
const searchForm = this.searchForm || this.tabSearchForm;
|
|
42354
|
+
await searchForm.search();
|
|
42355
|
+
return null;
|
|
42356
|
+
}
|
|
42357
|
+
if (key === "Reset" /* RESET */) {
|
|
42358
|
+
const searchForm = this.searchForm || this.tabSearchForm;
|
|
42359
|
+
await searchForm.reset();
|
|
42360
|
+
return null;
|
|
42361
|
+
}
|
|
42013
42362
|
return void 0;
|
|
42014
42363
|
}
|
|
42015
42364
|
/**
|
|
@@ -42191,6 +42540,20 @@ var ViewEngineBase = class {
|
|
|
42191
42540
|
data.srfdataaccaction
|
|
42192
42541
|
);
|
|
42193
42542
|
}
|
|
42543
|
+
/**
|
|
42544
|
+
* 切换搜索表单的显示与否
|
|
42545
|
+
* @author lxm
|
|
42546
|
+
* @date 2023-06-06 09:20:35
|
|
42547
|
+
* @protected
|
|
42548
|
+
*/
|
|
42549
|
+
toggleFilter() {
|
|
42550
|
+
if (this.searchForm) {
|
|
42551
|
+
const searchformContainer = this.viewLayoutPanel.panelItems.view_searchform;
|
|
42552
|
+
if (searchformContainer) {
|
|
42553
|
+
searchformContainer.state.visible = !searchformContainer.state.visible;
|
|
42554
|
+
}
|
|
42555
|
+
}
|
|
42556
|
+
}
|
|
42194
42557
|
};
|
|
42195
42558
|
|
|
42196
42559
|
// src/engine/md-view.engine.ts
|
|
@@ -42207,24 +42570,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42207
42570
|
get xdataControlName() {
|
|
42208
42571
|
return this.view.model.xdataControlName;
|
|
42209
42572
|
}
|
|
42210
|
-
/**
|
|
42211
|
-
* 搜索表单控制器
|
|
42212
|
-
* @author lxm
|
|
42213
|
-
* @date 2023-05-22 01:56:25
|
|
42214
|
-
* @readonly
|
|
42215
|
-
*/
|
|
42216
|
-
get searchForm() {
|
|
42217
|
-
return this.view.getController("searchform");
|
|
42218
|
-
}
|
|
42219
|
-
/**
|
|
42220
|
-
* 搜索栏控制器
|
|
42221
|
-
* @author lxm
|
|
42222
|
-
* @date 2023-05-22 01:56:25
|
|
42223
|
-
* @readonly
|
|
42224
|
-
*/
|
|
42225
|
-
get searchBar() {
|
|
42226
|
-
return this.view.getController("searchbar");
|
|
42227
|
-
}
|
|
42228
42573
|
/**
|
|
42229
42574
|
* 获取分页搜索视图上移的工具栏控制器
|
|
42230
42575
|
* @author lxm
|
|
@@ -42236,15 +42581,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42236
42581
|
get tabToolbar() {
|
|
42237
42582
|
return this.view.getController("tabtoolbar");
|
|
42238
42583
|
}
|
|
42239
|
-
/**
|
|
42240
|
-
* 获取分页搜索视图上移的搜索表单控制器
|
|
42241
|
-
* @author lxm
|
|
42242
|
-
* @date 2023-05-22 01:56:25
|
|
42243
|
-
* @readonly
|
|
42244
|
-
*/
|
|
42245
|
-
get tabSearchForm() {
|
|
42246
|
-
return this.view.getController("tabsearchform");
|
|
42247
|
-
}
|
|
42248
42584
|
/**
|
|
42249
42585
|
* 获取分页搜索视图上移的搜索栏控制器
|
|
42250
42586
|
* @author lxm
|
|
@@ -42383,10 +42719,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42383
42719
|
}
|
|
42384
42720
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
42385
42721
|
async call(key, args) {
|
|
42386
|
-
if (key === "ToggleFilter" /* TOGGLE_FILTER */) {
|
|
42387
|
-
this.toggleFilter();
|
|
42388
|
-
return null;
|
|
42389
|
-
}
|
|
42390
42722
|
if (key === "Edit" /* EDIT */ || key === "View" /* VIEW */) {
|
|
42391
42723
|
return this.openData(args);
|
|
42392
42724
|
}
|
|
@@ -42409,16 +42741,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42409
42741
|
await this.exportData(args);
|
|
42410
42742
|
return null;
|
|
42411
42743
|
}
|
|
42412
|
-
if (key === "Search" /* SEARCH */) {
|
|
42413
|
-
const searchForm = this.searchForm || this.tabSearchForm;
|
|
42414
|
-
await searchForm.search();
|
|
42415
|
-
return null;
|
|
42416
|
-
}
|
|
42417
|
-
if (key === "Reset" /* RESET */) {
|
|
42418
|
-
const searchForm = this.searchForm || this.tabSearchForm;
|
|
42419
|
-
await searchForm.reset();
|
|
42420
|
-
return null;
|
|
42421
|
-
}
|
|
42422
42744
|
if (key === "Copy" /* COPY */) {
|
|
42423
42745
|
this.copy(args);
|
|
42424
42746
|
return null;
|
|
@@ -42634,20 +42956,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42634
42956
|
const visible = !!(searchBar.enableQuickSearch || searchBar.enableGroup || searchBar.enableFilter === true);
|
|
42635
42957
|
return visible;
|
|
42636
42958
|
}
|
|
42637
|
-
/**
|
|
42638
|
-
* 切换搜索表单的显示与否
|
|
42639
|
-
* @author lxm
|
|
42640
|
-
* @date 2023-06-06 09:20:35
|
|
42641
|
-
* @protected
|
|
42642
|
-
*/
|
|
42643
|
-
toggleFilter() {
|
|
42644
|
-
if (this.searchForm) {
|
|
42645
|
-
const searchformContainer = this.viewLayoutPanel.panelItems.view_searchform;
|
|
42646
|
-
if (searchformContainer) {
|
|
42647
|
-
searchformContainer.state.visible = !searchformContainer.state.visible;
|
|
42648
|
-
}
|
|
42649
|
-
}
|
|
42650
|
-
}
|
|
42651
42959
|
/**
|
|
42652
42960
|
* 计算移除的模型名称
|
|
42653
42961
|
*
|
|
@@ -44097,7 +44405,10 @@ var en = {
|
|
|
44097
44405
|
noSupportSequence: "Charts do not support sequence types at this time {seriesType}",
|
|
44098
44406
|
noFindSequence: "Cannot find generator for {seriesIndex} sequence!",
|
|
44099
44407
|
noInitialised: "The chart object is not properly initialised",
|
|
44100
|
-
noCalculated: "Options have not been calculated."
|
|
44408
|
+
noCalculated: "Options have not been calculated.",
|
|
44409
|
+
classificationNotArray: "The configured classification attribute value is not an array",
|
|
44410
|
+
classificationNotString: "The configured classification attribute value is not an string",
|
|
44411
|
+
errorJson: "JSON parsing error"
|
|
44101
44412
|
},
|
|
44102
44413
|
dataView: {
|
|
44103
44414
|
noBehaviourGroup: "No interface behaviour group is configured for the action",
|
|
@@ -44679,7 +44990,10 @@ var zhCn = {
|
|
|
44679
44990
|
noSupportSequence: "\u56FE\u8868\u6682\u672A\u652F\u6301\u5E8F\u5217\u7C7B\u578B{seriesType}",
|
|
44680
44991
|
noFindSequence: "\u627E\u4E0D\u5230{seriesIndex}\u5E8F\u5217\u7684generator\uFF01",
|
|
44681
44992
|
noInitialised: "chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316",
|
|
44682
|
-
noCalculated: "options\u8FD8\u6CA1\u8BA1\u7B97"
|
|
44993
|
+
noCalculated: "options\u8FD8\u6CA1\u8BA1\u7B97",
|
|
44994
|
+
classificationNotArray: "\u914D\u7F6E\u7684\u5206\u7C7B\u5C5E\u6027\u503C\u4E0D\u662F\u4E00\u4E2A\u6570\u7EC4",
|
|
44995
|
+
classificationNotString: "\u914D\u7F6E\u7684\u5206\u7C7B\u5C5E\u6027\u503C\u4E0D\u662F\u4E00\u4E2A\u5B57\u7B26\u4E32",
|
|
44996
|
+
errorJson: "JSON\u89E3\u6790\u9519\u8BEF"
|
|
44683
44997
|
},
|
|
44684
44998
|
dataView: {
|
|
44685
44999
|
noBehaviourGroup: "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4",
|
|
@@ -45365,6 +45679,7 @@ export {
|
|
|
45365
45679
|
RemotePluginItem,
|
|
45366
45680
|
ReportPanelController,
|
|
45367
45681
|
ReportPanelService,
|
|
45682
|
+
ReportPortletController,
|
|
45368
45683
|
RouteConst,
|
|
45369
45684
|
ScriptFactory,
|
|
45370
45685
|
ScriptFunction,
|