@ibiz-template/runtime 0.7.25 → 0.7.26-alpha.0
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 +220 -151
- package/dist/index.system.min.js +1 -1
- 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 -1
- package/out/controller/control/kanban/kanban.controller.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.controller.js +39 -36
- 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/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -24656,7 +24656,8 @@ var DashboardController = class extends ControlController {
|
|
|
24656
24656
|
"CHART" /* CHART */,
|
|
24657
24657
|
"APPMENU" /* APP_MENU */,
|
|
24658
24658
|
"TOOLBAR" /* TOOLBAR */,
|
|
24659
|
-
"LIST" /* LIST
|
|
24659
|
+
"LIST" /* LIST */,
|
|
24660
|
+
"REPORTPANEL" /* REPORT_PANEL */
|
|
24660
24661
|
];
|
|
24661
24662
|
await Promise.all(
|
|
24662
24663
|
portletModels.map(async (portlet) => {
|
|
@@ -25319,6 +25320,21 @@ var ListPortletController = class extends PortletPartController {
|
|
|
25319
25320
|
var RawItemPortletController = class extends PortletPartController {
|
|
25320
25321
|
};
|
|
25321
25322
|
|
|
25323
|
+
// src/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.ts
|
|
25324
|
+
var ReportPortletController = class extends PortletPartController {
|
|
25325
|
+
/**
|
|
25326
|
+
* 刷新报表部件
|
|
25327
|
+
*
|
|
25328
|
+
* @author tony001
|
|
25329
|
+
* @date 2024-06-19 18:06:14
|
|
25330
|
+
*/
|
|
25331
|
+
refresh() {
|
|
25332
|
+
if (this.contentController) {
|
|
25333
|
+
this.contentController.refresh();
|
|
25334
|
+
}
|
|
25335
|
+
}
|
|
25336
|
+
};
|
|
25337
|
+
|
|
25322
25338
|
// src/controller/control/data-view/data-view.controller.ts
|
|
25323
25339
|
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
25324
25340
|
import { isNil as isNil26 } from "ramda";
|
|
@@ -28839,10 +28855,19 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
28839
28855
|
*/
|
|
28840
28856
|
setFormController(id, controller) {
|
|
28841
28857
|
this.formMap.set(id, controller);
|
|
28858
|
+
controller.evt.on("onLoadSuccess", (event) => {
|
|
28859
|
+
var _a, _b;
|
|
28860
|
+
const formData = (_a = event.data) == null ? void 0 : _a[0];
|
|
28861
|
+
const item = (_b = this.state.items) == null ? void 0 : _b.find((child) => child.id === id);
|
|
28862
|
+
if (item && formData) {
|
|
28863
|
+
item.title = formData.srfmajortext || "";
|
|
28864
|
+
}
|
|
28865
|
+
});
|
|
28842
28866
|
controller.evt.on("onSaveSuccess", (event) => {
|
|
28843
28867
|
const formData = event.data[0];
|
|
28844
28868
|
const item = this.state.items.find((x) => x.id === id);
|
|
28845
|
-
if (item) {
|
|
28869
|
+
if (item && formData) {
|
|
28870
|
+
item.title = formData.srfmajortext || "";
|
|
28846
28871
|
if (item.context[this.deName] !== formData.srfkey) {
|
|
28847
28872
|
item.context[this.deName] = formData.srfkey;
|
|
28848
28873
|
}
|
|
@@ -28881,7 +28906,8 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
28881
28906
|
})
|
|
28882
28907
|
);
|
|
28883
28908
|
}
|
|
28884
|
-
await controller.remove();
|
|
28909
|
+
await controller.remove({ silent: true });
|
|
28910
|
+
this.formMap.delete(id);
|
|
28885
28911
|
const index = this.state.items.findIndex((item) => item.id === id);
|
|
28886
28912
|
if (index !== -1) {
|
|
28887
28913
|
this.state.items.splice(index, 1);
|
|
@@ -30942,6 +30968,7 @@ var GridController = class extends MDControlController {
|
|
|
30942
30968
|
}
|
|
30943
30969
|
await this.updateRows(this.state.rows);
|
|
30944
30970
|
this.calcGroupData(this.state.items);
|
|
30971
|
+
await this.loadRemoteAgg();
|
|
30945
30972
|
this.calcAggResult(this.state.items);
|
|
30946
30973
|
this.calcShowMode(this.state.items);
|
|
30947
30974
|
return items;
|
|
@@ -31029,6 +31056,7 @@ var GridController = class extends MDControlController {
|
|
|
31029
31056
|
);
|
|
31030
31057
|
}
|
|
31031
31058
|
const params = await this.getFetchParams();
|
|
31059
|
+
delete params.sort;
|
|
31032
31060
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
31033
31061
|
const res = await app.deService.exec(
|
|
31034
31062
|
aggAppDataEntityId,
|
|
@@ -32145,46 +32173,52 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
32145
32173
|
*/
|
|
32146
32174
|
calcFieldAgg(items) {
|
|
32147
32175
|
const { aggField, aggMode, aggValueFormat, unitName } = this.model;
|
|
32148
|
-
if (isNil29(aggMode) || aggMode === "NONE") {
|
|
32149
|
-
return;
|
|
32150
|
-
}
|
|
32151
32176
|
const fieldName = aggField || this.model.id;
|
|
32152
|
-
items = items.filter((item) => !isNil29(item[fieldName]));
|
|
32153
32177
|
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
|
-
);
|
|
32178
|
+
if (this.grid.model.aggMode === "ALL") {
|
|
32179
|
+
if (!this.grid.state.remoteAggResult) {
|
|
32180
|
+
return;
|
|
32175
32181
|
}
|
|
32176
|
-
|
|
32177
|
-
throw new ModelError29(
|
|
32178
|
-
this.model,
|
|
32179
|
-
ibiz.i18n.t("runtime.controller.control.grid.remoteAggregation")
|
|
32180
|
-
);
|
|
32182
|
+
aggValue = this.grid.state.remoteAggResult[fieldName] || "";
|
|
32181
32183
|
} else {
|
|
32182
|
-
|
|
32183
|
-
|
|
32184
|
-
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
|
|
32184
|
+
if (isNil29(aggMode) || aggMode === "NONE") {
|
|
32185
|
+
return;
|
|
32186
|
+
}
|
|
32187
|
+
items = items.filter((item) => !isNil29(item[fieldName]));
|
|
32188
|
+
if (this.grid.model.aggMode === "PAGE") {
|
|
32189
|
+
switch (aggMode) {
|
|
32190
|
+
case "SUM":
|
|
32191
|
+
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0);
|
|
32192
|
+
break;
|
|
32193
|
+
case "AVG":
|
|
32194
|
+
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0) / items.length;
|
|
32195
|
+
break;
|
|
32196
|
+
case "MAX":
|
|
32197
|
+
aggValue = Math.max(
|
|
32198
|
+
...items.map((item) => item[fieldName])
|
|
32199
|
+
);
|
|
32200
|
+
break;
|
|
32201
|
+
case "MIN":
|
|
32202
|
+
aggValue = Math.min(
|
|
32203
|
+
...items.map((item) => item[fieldName])
|
|
32204
|
+
);
|
|
32205
|
+
break;
|
|
32206
|
+
default:
|
|
32207
|
+
throw new ModelError29(
|
|
32208
|
+
this.model,
|
|
32209
|
+
ibiz.i18n.t("runtime.controller.control.grid.noSupportedMode", {
|
|
32210
|
+
aggMode
|
|
32211
|
+
})
|
|
32212
|
+
);
|
|
32213
|
+
}
|
|
32214
|
+
} else {
|
|
32215
|
+
throw new ModelError29(
|
|
32216
|
+
this.grid.model,
|
|
32217
|
+
ibiz.i18n.t("runtime.controller.control.grid.aggregateMode", {
|
|
32218
|
+
aggMode: this.grid.model.aggMode
|
|
32219
|
+
})
|
|
32220
|
+
);
|
|
32221
|
+
}
|
|
32188
32222
|
}
|
|
32189
32223
|
let value = "".concat(aggValue);
|
|
32190
32224
|
if (aggValueFormat) {
|
|
@@ -37624,36 +37658,36 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37624
37658
|
);
|
|
37625
37659
|
}
|
|
37626
37660
|
this.state.updating = true;
|
|
37627
|
-
const computeMoveData = (_fromIndex, _toIndex, _draggedItem, targetArray
|
|
37661
|
+
const computeMoveData = (_fromIndex, _toIndex, _draggedItem, targetArray) => {
|
|
37628
37662
|
let moveData = {};
|
|
37629
37663
|
const targetItem = targetArray[_toIndex];
|
|
37630
37664
|
if (!targetItem) {
|
|
37631
37665
|
let tempArray = [];
|
|
37632
37666
|
if (targetArray.length > 0) {
|
|
37633
37667
|
tempArray = targetArray;
|
|
37634
|
-
} else if (allArray.length > 0) {
|
|
37635
|
-
tempArray = allArray;
|
|
37636
37668
|
}
|
|
37637
|
-
|
|
37638
|
-
const
|
|
37639
|
-
|
|
37669
|
+
if (tempArray.length > 0) {
|
|
37670
|
+
const maxItem = tempArray.reduce((prev, curr) => {
|
|
37671
|
+
const sortCondition = prev[sortField] > curr[sortField];
|
|
37672
|
+
if (sortCondition && prev[this.dataEntity.keyAppDEFieldId] !== _draggedItem.srfkey) {
|
|
37673
|
+
return prev;
|
|
37674
|
+
}
|
|
37675
|
+
if (!sortCondition && curr[this.dataEntity.keyAppDEFieldId] !== _draggedItem.srfkey) {
|
|
37676
|
+
return curr;
|
|
37677
|
+
}
|
|
37640
37678
|
return prev;
|
|
37679
|
+
});
|
|
37680
|
+
if (maxItem && maxItem[this.dataEntity.keyAppDEFieldId] !== _draggedItem.srfkey) {
|
|
37681
|
+
moveData = {
|
|
37682
|
+
srftargetkey: maxItem.srfkey,
|
|
37683
|
+
srfmovetype: "MOVEAFTER"
|
|
37684
|
+
};
|
|
37641
37685
|
}
|
|
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
37686
|
}
|
|
37653
37687
|
} else {
|
|
37654
37688
|
moveData = {
|
|
37655
37689
|
srftargetkey: targetItem.srfkey,
|
|
37656
|
-
srfmovetype: "MOVEBEFORE"
|
|
37690
|
+
srfmovetype: _fromIndex > _toIndex ? "MOVEBEFORE" : "MOVEAFTER"
|
|
37657
37691
|
};
|
|
37658
37692
|
}
|
|
37659
37693
|
return moveData;
|
|
@@ -37688,26 +37722,22 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37688
37722
|
);
|
|
37689
37723
|
}
|
|
37690
37724
|
}
|
|
37691
|
-
const params = computeMoveData(
|
|
37692
|
-
fromIndex,
|
|
37693
|
-
toIndex,
|
|
37694
|
-
draggedItem,
|
|
37695
|
-
originArr,
|
|
37696
|
-
this.state.items
|
|
37697
|
-
);
|
|
37725
|
+
const params = computeMoveData(fromIndex, toIndex, draggedItem, originArr);
|
|
37698
37726
|
try {
|
|
37699
|
-
const result = await this.moveOrderItem(draggedItem, params);
|
|
37700
|
-
if (
|
|
37701
|
-
|
|
37702
|
-
|
|
37703
|
-
|
|
37704
|
-
|
|
37705
|
-
|
|
37706
|
-
|
|
37707
|
-
|
|
37708
|
-
|
|
37709
|
-
|
|
37710
|
-
|
|
37727
|
+
const { ok, result } = await this.moveOrderItem(draggedItem, params);
|
|
37728
|
+
if (ok) {
|
|
37729
|
+
if (Array.isArray(result) && result.length > 0) {
|
|
37730
|
+
result.forEach((item) => {
|
|
37731
|
+
const index = this.state.items.findIndex(
|
|
37732
|
+
(x) => x.srfkey === item[this.dataEntity.keyAppDEFieldId]
|
|
37733
|
+
);
|
|
37734
|
+
if (index !== -1) {
|
|
37735
|
+
this.state.items[index][sortField] = item[sortField];
|
|
37736
|
+
}
|
|
37737
|
+
});
|
|
37738
|
+
} else {
|
|
37739
|
+
await this.refresh();
|
|
37740
|
+
}
|
|
37711
37741
|
}
|
|
37712
37742
|
} catch (error) {
|
|
37713
37743
|
this.state.updating = false;
|
|
@@ -37733,17 +37763,17 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37733
37763
|
const tempContext = this.context.clone();
|
|
37734
37764
|
tempContext[deName] = draggedItem.srfkey;
|
|
37735
37765
|
if (!moveMeta.srftargetkey || !moveMeta.srfmovetype) {
|
|
37736
|
-
|
|
37737
|
-
this.model,
|
|
37766
|
+
ibiz.log.error(
|
|
37738
37767
|
ibiz.i18n.t("runtime.controller.common.md.computeMoveMetaError")
|
|
37739
37768
|
);
|
|
37769
|
+
return { ok: false };
|
|
37740
37770
|
}
|
|
37741
37771
|
const res = await this.service.moveOrderItem(
|
|
37742
37772
|
tempContext,
|
|
37743
37773
|
draggedItem,
|
|
37744
37774
|
moveMeta
|
|
37745
37775
|
);
|
|
37746
|
-
return res.data;
|
|
37776
|
+
return { ok: true, result: res.data };
|
|
37747
37777
|
}
|
|
37748
37778
|
/**
|
|
37749
37779
|
* 批量更新修改的项,并更新后台返回的数据,然后重新计算分组和排序
|
|
@@ -39598,7 +39628,7 @@ var ReportPanelBaseGenerator = class {
|
|
|
39598
39628
|
* @param {IDEReportPanel} model
|
|
39599
39629
|
* @memberof ReportPanelBaseGenerator
|
|
39600
39630
|
*/
|
|
39601
|
-
constructor(model) {
|
|
39631
|
+
constructor(model, reportPanel) {
|
|
39602
39632
|
/**
|
|
39603
39633
|
* 配置
|
|
39604
39634
|
*
|
|
@@ -39607,6 +39637,7 @@ var ReportPanelBaseGenerator = class {
|
|
|
39607
39637
|
*/
|
|
39608
39638
|
this.config = {};
|
|
39609
39639
|
this.model = model;
|
|
39640
|
+
this.reportPanel = reportPanel;
|
|
39610
39641
|
this.setConfig();
|
|
39611
39642
|
}
|
|
39612
39643
|
/**
|
|
@@ -39633,7 +39664,7 @@ var ReportPanelBaseGenerator = class {
|
|
|
39633
39664
|
* @return {*} {Promise<IData>}
|
|
39634
39665
|
* @memberof ReportPanelBaseGenerator
|
|
39635
39666
|
*/
|
|
39636
|
-
load(data) {
|
|
39667
|
+
load(data = {}) {
|
|
39637
39668
|
return Promise.resolve(data);
|
|
39638
39669
|
}
|
|
39639
39670
|
};
|
|
@@ -39691,7 +39722,7 @@ var UserReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
39691
39722
|
* @return {*} {Promise<IData>}
|
|
39692
39723
|
* @memberof UserReportPanelGenerator
|
|
39693
39724
|
*/
|
|
39694
|
-
load(data) {
|
|
39725
|
+
load(data = {}) {
|
|
39695
39726
|
if (this.protoRef) {
|
|
39696
39727
|
this.protoRef.setData(data);
|
|
39697
39728
|
}
|
|
@@ -39731,6 +39762,20 @@ var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
39731
39762
|
sourceModel.reportTag = this.model.appDEReport.id;
|
|
39732
39763
|
this.config = sourceModel;
|
|
39733
39764
|
}
|
|
39765
|
+
/**
|
|
39766
|
+
* 加载数据
|
|
39767
|
+
*
|
|
39768
|
+
* @author tony001
|
|
39769
|
+
* @date 2024-06-20 11:06:52
|
|
39770
|
+
* @param {IData} data
|
|
39771
|
+
* @return {*} {Promise<IData>}
|
|
39772
|
+
*/
|
|
39773
|
+
load(data = {}) {
|
|
39774
|
+
if (this.protoRef) {
|
|
39775
|
+
this.protoRef.refresh("ALL");
|
|
39776
|
+
}
|
|
39777
|
+
return Promise.resolve(data);
|
|
39778
|
+
}
|
|
39734
39779
|
};
|
|
39735
39780
|
|
|
39736
39781
|
// src/controller/control/report-panel/generator/generator-factory.ts
|
|
@@ -39738,12 +39783,14 @@ var ReportPanelGeneratorFactory = class {
|
|
|
39738
39783
|
/**
|
|
39739
39784
|
* 获取报表面板生成器实例
|
|
39740
39785
|
*
|
|
39786
|
+
* @author tony001
|
|
39787
|
+
* @date 2024-06-20 15:06:18
|
|
39741
39788
|
* @static
|
|
39742
39789
|
* @param {IDEReportPanel} model
|
|
39790
|
+
* @param {IReportPanelController} reportPanel
|
|
39743
39791
|
* @return {*} {ReportPanelBaseGenerator}
|
|
39744
|
-
* @memberof ReportPanelGeneratorFactory
|
|
39745
39792
|
*/
|
|
39746
|
-
static getInstance(model) {
|
|
39793
|
+
static getInstance(model, reportPanel) {
|
|
39747
39794
|
if (!model || !model.appDEReport || !model.appDEReport.reportType) {
|
|
39748
39795
|
throw new Error(
|
|
39749
39796
|
ibiz.i18n.t("runtime.controller.control.reportPanel.reportType")
|
|
@@ -39751,9 +39798,9 @@ var ReportPanelGeneratorFactory = class {
|
|
|
39751
39798
|
}
|
|
39752
39799
|
switch (model.appDEReport.reportType) {
|
|
39753
39800
|
case "USER":
|
|
39754
|
-
return new UserReportPanelGenerator(model);
|
|
39801
|
+
return new UserReportPanelGenerator(model, reportPanel);
|
|
39755
39802
|
case "USER2":
|
|
39756
|
-
return new User2ReportPanelGenerator(model);
|
|
39803
|
+
return new User2ReportPanelGenerator(model, reportPanel);
|
|
39757
39804
|
case "DESYSBIREPORTS":
|
|
39758
39805
|
case "SYSBICUBE":
|
|
39759
39806
|
case "DESYSBICUBES":
|
|
@@ -39761,7 +39808,7 @@ var ReportPanelGeneratorFactory = class {
|
|
|
39761
39808
|
case "SYSBIREPORT":
|
|
39762
39809
|
case "SYSBICUBEREPORTS":
|
|
39763
39810
|
case "ALLSYSBIREPORTS":
|
|
39764
|
-
return new BIReportPanelGenerator(model);
|
|
39811
|
+
return new BIReportPanelGenerator(model, reportPanel);
|
|
39765
39812
|
default:
|
|
39766
39813
|
throw new Error(
|
|
39767
39814
|
ibiz.i18n.t("runtime.controller.control.reportPanel.noImplemented", {
|
|
@@ -39785,6 +39832,19 @@ var ReportPanelController = class extends ControlController {
|
|
|
39785
39832
|
get _evt() {
|
|
39786
39833
|
return this.evt;
|
|
39787
39834
|
}
|
|
39835
|
+
/**
|
|
39836
|
+
* 是否为bi报表
|
|
39837
|
+
*
|
|
39838
|
+
* @author tony001
|
|
39839
|
+
* @date 2024-06-19 18:06:02
|
|
39840
|
+
* @readonly
|
|
39841
|
+
*/
|
|
39842
|
+
get isBIReport() {
|
|
39843
|
+
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") {
|
|
39844
|
+
return true;
|
|
39845
|
+
}
|
|
39846
|
+
return false;
|
|
39847
|
+
}
|
|
39788
39848
|
/**
|
|
39789
39849
|
* 初始化状态
|
|
39790
39850
|
*
|
|
@@ -39805,7 +39865,7 @@ var ReportPanelController = class extends ControlController {
|
|
|
39805
39865
|
*/
|
|
39806
39866
|
async onCreated() {
|
|
39807
39867
|
await super.onCreated();
|
|
39808
|
-
this.generator = ReportPanelGeneratorFactory.getInstance(this.model);
|
|
39868
|
+
this.generator = ReportPanelGeneratorFactory.getInstance(this.model, this);
|
|
39809
39869
|
this.dataEntity = await ibiz.hub.getAppDataEntity(
|
|
39810
39870
|
this.model.appDataEntityId,
|
|
39811
39871
|
this.model.appId
|
|
@@ -39845,7 +39905,7 @@ var ReportPanelController = class extends ControlController {
|
|
|
39845
39905
|
* @memberof ReportPanelController
|
|
39846
39906
|
*/
|
|
39847
39907
|
async load(args = {}) {
|
|
39848
|
-
if (this.state.reportType &&
|
|
39908
|
+
if (this.state.reportType && this.isBIReport) {
|
|
39849
39909
|
return {};
|
|
39850
39910
|
}
|
|
39851
39911
|
await this.startLoading();
|
|
@@ -39906,6 +39966,10 @@ var ReportPanelController = class extends ControlController {
|
|
|
39906
39966
|
* @memberof ReportPanelController
|
|
39907
39967
|
*/
|
|
39908
39968
|
getData() {
|
|
39969
|
+
var _a;
|
|
39970
|
+
if (this.isBIReport) {
|
|
39971
|
+
return ((_a = this.generator.protoRef) == null ? void 0 : _a.state.items) || [];
|
|
39972
|
+
}
|
|
39909
39973
|
return [this.state.data];
|
|
39910
39974
|
}
|
|
39911
39975
|
/**
|
|
@@ -39913,23 +39977,27 @@ var ReportPanelController = class extends ControlController {
|
|
|
39913
39977
|
* @date 2023-05-23 03:42:41
|
|
39914
39978
|
*/
|
|
39915
39979
|
async refresh() {
|
|
39916
|
-
|
|
39917
|
-
|
|
39918
|
-
}
|
|
39980
|
+
if (this.isBIReport) {
|
|
39981
|
+
this.generator.load();
|
|
39982
|
+
} else {
|
|
39983
|
+
this.doNextActive(() => this.load({ isInitialLoad: false }), {
|
|
39984
|
+
key: "refresh"
|
|
39985
|
+
});
|
|
39986
|
+
}
|
|
39919
39987
|
}
|
|
39920
39988
|
/**
|
|
39921
39989
|
* 打开设计界面
|
|
39922
39990
|
*
|
|
39923
39991
|
* @author tony001
|
|
39924
39992
|
* @date 2024-06-18 16:06:46
|
|
39925
|
-
* @return {*} {Promise<
|
|
39993
|
+
* @return {*} {Promise<IModalData>}
|
|
39926
39994
|
*/
|
|
39927
39995
|
async openReportDesignPage() {
|
|
39928
|
-
if (this.state.reportType &&
|
|
39996
|
+
if (this.state.reportType && this.isBIReport) {
|
|
39929
39997
|
const modal = ibiz.overlay.createModal(
|
|
39930
39998
|
"iBizBIReportDesign",
|
|
39931
39999
|
{
|
|
39932
|
-
dismiss: () => modal.dismiss(),
|
|
40000
|
+
dismiss: (_data) => modal.dismiss(_data),
|
|
39933
40001
|
context: this.context,
|
|
39934
40002
|
viewParams: this.params,
|
|
39935
40003
|
config: this.generator.config
|
|
@@ -39942,9 +40010,9 @@ var ReportPanelController = class extends ControlController {
|
|
|
39942
40010
|
);
|
|
39943
40011
|
modal.present();
|
|
39944
40012
|
const result = await modal.onWillDismiss();
|
|
39945
|
-
return result
|
|
40013
|
+
return result;
|
|
39946
40014
|
}
|
|
39947
|
-
return
|
|
40015
|
+
return { ok: false, data: [] };
|
|
39948
40016
|
}
|
|
39949
40017
|
};
|
|
39950
40018
|
|
|
@@ -41871,6 +41939,33 @@ var ViewEngineBase = class {
|
|
|
41871
41939
|
get footerToolbar() {
|
|
41872
41940
|
return this.view.getController("footertoolbar");
|
|
41873
41941
|
}
|
|
41942
|
+
/**
|
|
41943
|
+
* 搜索表单控制器
|
|
41944
|
+
* @author lxm
|
|
41945
|
+
* @date 2023-05-22 01:56:25
|
|
41946
|
+
* @readonly
|
|
41947
|
+
*/
|
|
41948
|
+
get searchForm() {
|
|
41949
|
+
return this.view.getController("searchform");
|
|
41950
|
+
}
|
|
41951
|
+
/**
|
|
41952
|
+
* 搜索栏控制器
|
|
41953
|
+
* @author lxm
|
|
41954
|
+
* @date 2023-05-22 01:56:25
|
|
41955
|
+
* @readonly
|
|
41956
|
+
*/
|
|
41957
|
+
get searchBar() {
|
|
41958
|
+
return this.view.getController("searchbar");
|
|
41959
|
+
}
|
|
41960
|
+
/**
|
|
41961
|
+
* 获取分页搜索视图上移的搜索表单控制器
|
|
41962
|
+
* @author lxm
|
|
41963
|
+
* @date 2023-05-22 01:56:25
|
|
41964
|
+
* @readonly
|
|
41965
|
+
*/
|
|
41966
|
+
get tabSearchForm() {
|
|
41967
|
+
return this.view.getController("tabsearchform");
|
|
41968
|
+
}
|
|
41874
41969
|
/**
|
|
41875
41970
|
* 获取视图布局面板控制器
|
|
41876
41971
|
* @author lxm
|
|
@@ -42010,6 +42105,20 @@ var ViewEngineBase = class {
|
|
|
42010
42105
|
if (key === "ShortCut" /* SHOTR_CUT */) {
|
|
42011
42106
|
return this.onShortCut(_args);
|
|
42012
42107
|
}
|
|
42108
|
+
if (key === "ToggleFilter" /* TOGGLE_FILTER */) {
|
|
42109
|
+
this.toggleFilter();
|
|
42110
|
+
return null;
|
|
42111
|
+
}
|
|
42112
|
+
if (key === "Search" /* SEARCH */) {
|
|
42113
|
+
const searchForm = this.searchForm || this.tabSearchForm;
|
|
42114
|
+
await searchForm.search();
|
|
42115
|
+
return null;
|
|
42116
|
+
}
|
|
42117
|
+
if (key === "Reset" /* RESET */) {
|
|
42118
|
+
const searchForm = this.searchForm || this.tabSearchForm;
|
|
42119
|
+
await searchForm.reset();
|
|
42120
|
+
return null;
|
|
42121
|
+
}
|
|
42013
42122
|
return void 0;
|
|
42014
42123
|
}
|
|
42015
42124
|
/**
|
|
@@ -42191,6 +42300,20 @@ var ViewEngineBase = class {
|
|
|
42191
42300
|
data.srfdataaccaction
|
|
42192
42301
|
);
|
|
42193
42302
|
}
|
|
42303
|
+
/**
|
|
42304
|
+
* 切换搜索表单的显示与否
|
|
42305
|
+
* @author lxm
|
|
42306
|
+
* @date 2023-06-06 09:20:35
|
|
42307
|
+
* @protected
|
|
42308
|
+
*/
|
|
42309
|
+
toggleFilter() {
|
|
42310
|
+
if (this.searchForm) {
|
|
42311
|
+
const searchformContainer = this.viewLayoutPanel.panelItems.view_searchform;
|
|
42312
|
+
if (searchformContainer) {
|
|
42313
|
+
searchformContainer.state.visible = !searchformContainer.state.visible;
|
|
42314
|
+
}
|
|
42315
|
+
}
|
|
42316
|
+
}
|
|
42194
42317
|
};
|
|
42195
42318
|
|
|
42196
42319
|
// src/engine/md-view.engine.ts
|
|
@@ -42207,24 +42330,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42207
42330
|
get xdataControlName() {
|
|
42208
42331
|
return this.view.model.xdataControlName;
|
|
42209
42332
|
}
|
|
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
42333
|
/**
|
|
42229
42334
|
* 获取分页搜索视图上移的工具栏控制器
|
|
42230
42335
|
* @author lxm
|
|
@@ -42236,15 +42341,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42236
42341
|
get tabToolbar() {
|
|
42237
42342
|
return this.view.getController("tabtoolbar");
|
|
42238
42343
|
}
|
|
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
42344
|
/**
|
|
42249
42345
|
* 获取分页搜索视图上移的搜索栏控制器
|
|
42250
42346
|
* @author lxm
|
|
@@ -42383,10 +42479,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42383
42479
|
}
|
|
42384
42480
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
42385
42481
|
async call(key, args) {
|
|
42386
|
-
if (key === "ToggleFilter" /* TOGGLE_FILTER */) {
|
|
42387
|
-
this.toggleFilter();
|
|
42388
|
-
return null;
|
|
42389
|
-
}
|
|
42390
42482
|
if (key === "Edit" /* EDIT */ || key === "View" /* VIEW */) {
|
|
42391
42483
|
return this.openData(args);
|
|
42392
42484
|
}
|
|
@@ -42409,16 +42501,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42409
42501
|
await this.exportData(args);
|
|
42410
42502
|
return null;
|
|
42411
42503
|
}
|
|
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
42504
|
if (key === "Copy" /* COPY */) {
|
|
42423
42505
|
this.copy(args);
|
|
42424
42506
|
return null;
|
|
@@ -42634,20 +42716,6 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42634
42716
|
const visible = !!(searchBar.enableQuickSearch || searchBar.enableGroup || searchBar.enableFilter === true);
|
|
42635
42717
|
return visible;
|
|
42636
42718
|
}
|
|
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
42719
|
/**
|
|
42652
42720
|
* 计算移除的模型名称
|
|
42653
42721
|
*
|
|
@@ -45365,6 +45433,7 @@ export {
|
|
|
45365
45433
|
RemotePluginItem,
|
|
45366
45434
|
ReportPanelController,
|
|
45367
45435
|
ReportPanelService,
|
|
45436
|
+
ReportPortletController,
|
|
45368
45437
|
RouteConst,
|
|
45369
45438
|
ScriptFactory,
|
|
45370
45439
|
ScriptFunction,
|