@ibiz-template/runtime 0.7.26 → 0.7.28-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 +384 -302
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/chart/chart.controller.d.ts +3 -1
- package/out/controller/control/chart/chart.controller.d.ts.map +1 -1
- package/out/controller/control/chart/chart.controller.js +5 -1
- package/out/controller/control/chart/generator/base-series-generator.d.ts +8 -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 +22 -0
- package/out/controller/control/dashboard/dashboard.controller.d.ts +0 -8
- package/out/controller/control/dashboard/dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/dashboard.controller.js +29 -20
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.js +10 -3
- package/out/controller/control/gantt/gantt.controller.d.ts +0 -10
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +0 -96
- package/out/controller/control/grid/grid/grid.controller.d.ts +5 -5
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +17 -31
- package/out/controller/control/grid/grid/grid.service.d.ts +10 -0
- package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.service.js +19 -0
- 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 +6 -2
- package/out/controller/control/report-panel/generator/bi-generator.d.ts +0 -10
- package/out/controller/control/report-panel/generator/bi-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/bi-generator.js +5 -62
- package/out/controller/control/report-panel/report-panel.controller.d.ts +1 -9
- package/out/controller/control/report-panel/report-panel.controller.d.ts.map +1 -1
- package/out/controller/control/report-panel/report-panel.controller.js +0 -25
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +13 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +24 -85
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts +0 -9
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-chart.event.d.ts +10 -0
- package/out/interface/controller/event/control/i-chart.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-edit-form.event.d.ts +26 -0
- package/out/interface/controller/event/control/i-edit-form.event.d.ts.map +1 -1
- package/out/interface/controller/state/view/i-pickup-tree-view.state.d.ts +8 -0
- package/out/interface/controller/state/view/i-pickup-tree-view.state.d.ts.map +1 -1
- package/out/interface/provider/model-loader.provider.d.ts +2 -2
- package/out/interface/provider/model-loader.provider.d.ts.map +1 -1
- package/out/utils/bi-report-util/bi-report-util.d.ts +49 -2
- package/out/utils/bi-report-util/bi-report-util.d.ts.map +1 -1
- package/out/utils/bi-report-util/bi-report-util.js +203 -10
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -15107,13 +15107,19 @@ var BIReportUtil = class {
|
|
|
15107
15107
|
params
|
|
15108
15108
|
);
|
|
15109
15109
|
if (res.data) {
|
|
15110
|
-
config = this.
|
|
15110
|
+
config = await this.translateDEReportToConfig(res.data);
|
|
15111
|
+
if (data.srfreporttag) {
|
|
15112
|
+
config.reportTag = data.srfreporttag;
|
|
15113
|
+
}
|
|
15114
|
+
if (data.srfbischematag) {
|
|
15115
|
+
config.selectedSchemeId = data.srfbischematag;
|
|
15116
|
+
}
|
|
15111
15117
|
}
|
|
15112
15118
|
} catch (error) {
|
|
15113
15119
|
throw new RuntimeError25(error.message);
|
|
15114
15120
|
}
|
|
15115
15121
|
} else if (data.mode === "UI") {
|
|
15116
|
-
config = data.reportPanel.
|
|
15122
|
+
config = this.translateReportPanelToConfig(data.reportPanel.model);
|
|
15117
15123
|
}
|
|
15118
15124
|
const modal = ibiz.overlay.createModal(
|
|
15119
15125
|
"iBizBIReportDesign",
|
|
@@ -15134,7 +15140,7 @@ var BIReportUtil = class {
|
|
|
15134
15140
|
return result;
|
|
15135
15141
|
}
|
|
15136
15142
|
/**
|
|
15137
|
-
*
|
|
15143
|
+
* 实体报表数据转化配置数据
|
|
15138
15144
|
*
|
|
15139
15145
|
* @author tony001
|
|
15140
15146
|
* @date 2024-06-30 11:06:00
|
|
@@ -15142,7 +15148,7 @@ var BIReportUtil = class {
|
|
|
15142
15148
|
* @param {IData} data
|
|
15143
15149
|
* @return {*} {IData}
|
|
15144
15150
|
*/
|
|
15145
|
-
|
|
15151
|
+
async translateDEReportToConfig(data) {
|
|
15146
15152
|
const config = {};
|
|
15147
15153
|
let biReportUIModel = {};
|
|
15148
15154
|
if (data.bireportuimodel) {
|
|
@@ -15151,7 +15157,9 @@ var BIReportUtil = class {
|
|
|
15151
15157
|
config.selectChartType = (biReportUIModel == null ? void 0 : biReportUIModel.selectChartType) || "NUMBER";
|
|
15152
15158
|
config.reportTag = "bi_report";
|
|
15153
15159
|
config.selectCubeId = data.pssysbicubeid;
|
|
15160
|
+
config.selectedSchemeId = data.pssysbischemeid;
|
|
15154
15161
|
const biReportItems = {};
|
|
15162
|
+
const extendDimension = (biReportUIModel == null ? void 0 : biReportUIModel.extendDimension) || [];
|
|
15155
15163
|
if (data.pssysbireportitems && data.pssysbireportitems.length > 0) {
|
|
15156
15164
|
data.pssysbireportitems.forEach((item) => {
|
|
15157
15165
|
var _a, _b;
|
|
@@ -15163,19 +15171,35 @@ var BIReportUtil = class {
|
|
|
15163
15171
|
pssysbischemeid: item.pssysbischemeid,
|
|
15164
15172
|
pssysbicubemeasureid: item.pssysbicubemeasureid,
|
|
15165
15173
|
pssysbicubeid: item.pssysbicubeid,
|
|
15166
|
-
codename: (_a = item.pssysbicubemeasureid) == null ? void 0 : _a.split(".").pop()
|
|
15174
|
+
codename: (_a = item.pssysbicubemeasureid) == null ? void 0 : _a.split(".").pop(),
|
|
15175
|
+
pssysbicubemeasurename: item.pssysbicubemeasurename
|
|
15167
15176
|
});
|
|
15168
15177
|
}
|
|
15169
15178
|
if (item.birepitemtype === "DIMENSION") {
|
|
15170
15179
|
if (!biReportItems.dimension) {
|
|
15171
15180
|
biReportItems.dimension = [];
|
|
15172
15181
|
}
|
|
15173
|
-
biReportItems.
|
|
15174
|
-
|
|
15175
|
-
|
|
15176
|
-
|
|
15177
|
-
|
|
15178
|
-
|
|
15182
|
+
if (extendDimension.length > 0 && !biReportItems.extendDimension) {
|
|
15183
|
+
biReportItems.extendDimension = [];
|
|
15184
|
+
}
|
|
15185
|
+
const codename = (_b = item.pssysbicubedimensionid) == null ? void 0 : _b.split(".").pop();
|
|
15186
|
+
if (extendDimension.includes(codename)) {
|
|
15187
|
+
biReportItems.extendDimension.push({
|
|
15188
|
+
pssysbischemeid: item.pssysbischemeid,
|
|
15189
|
+
pssysbicubedimensionid: item.pssysbicubedimensionid,
|
|
15190
|
+
pssysbicubeid: item.pssysbicubeid,
|
|
15191
|
+
codename,
|
|
15192
|
+
pssysbicubedimensionname: item.pssysbicubedimensionname
|
|
15193
|
+
});
|
|
15194
|
+
} else {
|
|
15195
|
+
biReportItems.dimension.push({
|
|
15196
|
+
pssysbischemeid: item.pssysbischemeid,
|
|
15197
|
+
pssysbicubedimensionid: item.pssysbicubedimensionid,
|
|
15198
|
+
pssysbicubeid: item.pssysbicubeid,
|
|
15199
|
+
codename,
|
|
15200
|
+
pssysbicubedimensionname: item.pssysbicubedimensionname
|
|
15201
|
+
});
|
|
15202
|
+
}
|
|
15179
15203
|
}
|
|
15180
15204
|
});
|
|
15181
15205
|
}
|
|
@@ -15188,9 +15212,179 @@ var BIReportUtil = class {
|
|
|
15188
15212
|
if (biReportUIModel.style) {
|
|
15189
15213
|
Object.assign(propertyData, { style: biReportUIModel.style });
|
|
15190
15214
|
}
|
|
15215
|
+
if (biReportUIModel.filter) {
|
|
15216
|
+
propertyData.data.filter = biReportUIModel.filter;
|
|
15217
|
+
}
|
|
15191
15218
|
config.propertyData = propertyData;
|
|
15192
15219
|
return config;
|
|
15193
15220
|
}
|
|
15221
|
+
/**
|
|
15222
|
+
* 报表面板数据转化配置界面数据
|
|
15223
|
+
*
|
|
15224
|
+
* @param {IDEReportPanel} model
|
|
15225
|
+
* @return {*} {Promise<IData>}
|
|
15226
|
+
* @memberof BIReportUtil
|
|
15227
|
+
*/
|
|
15228
|
+
async translateReportPanelToConfig(model) {
|
|
15229
|
+
const config = {};
|
|
15230
|
+
const biReportDatas = {};
|
|
15231
|
+
const { appDEReport } = model;
|
|
15232
|
+
const propertyData = {
|
|
15233
|
+
data: biReportDatas
|
|
15234
|
+
};
|
|
15235
|
+
config.reportTag = appDEReport.id;
|
|
15236
|
+
const tempAppBISchemeId = appDEReport.appBISchemeId.split(".").pop();
|
|
15237
|
+
config.selectedSchemeId = tempAppBISchemeId;
|
|
15238
|
+
const {
|
|
15239
|
+
name,
|
|
15240
|
+
appBICubeId,
|
|
15241
|
+
appBIReportDimensions,
|
|
15242
|
+
appBIReportMeasures,
|
|
15243
|
+
reportUIModel
|
|
15244
|
+
} = appDEReport.appBIReport;
|
|
15245
|
+
propertyData.caption = name;
|
|
15246
|
+
config.selectCubeId = "".concat(tempAppBISchemeId, ".").concat(appBICubeId);
|
|
15247
|
+
let extendDimension = [];
|
|
15248
|
+
if (reportUIModel) {
|
|
15249
|
+
const reportUIModelObj = JSON.parse(reportUIModel);
|
|
15250
|
+
config.selectChartType = reportUIModelObj.selectChartType;
|
|
15251
|
+
propertyData.style = reportUIModelObj.style;
|
|
15252
|
+
propertyData.data.filter = reportUIModelObj.filter;
|
|
15253
|
+
if (reportUIModelObj.extendDimension) {
|
|
15254
|
+
extendDimension = reportUIModelObj.extendDimension;
|
|
15255
|
+
}
|
|
15256
|
+
} else {
|
|
15257
|
+
config.selectChartType = "NUMBER";
|
|
15258
|
+
}
|
|
15259
|
+
if (appBIReportMeasures && appBIReportMeasures.length > 0) {
|
|
15260
|
+
appBIReportMeasures.forEach((measure) => {
|
|
15261
|
+
if (!biReportDatas.measure) {
|
|
15262
|
+
biReportDatas.measure = [];
|
|
15263
|
+
}
|
|
15264
|
+
biReportDatas.measure.push({
|
|
15265
|
+
pssysbischemeid: tempAppBISchemeId,
|
|
15266
|
+
pssysbicubemeasureid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(measure.measureTag),
|
|
15267
|
+
pssysbicubemeasurename: measure.measureName,
|
|
15268
|
+
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
15269
|
+
codename: measure.measureTag
|
|
15270
|
+
});
|
|
15271
|
+
});
|
|
15272
|
+
}
|
|
15273
|
+
if (appBIReportDimensions && appBIReportDimensions.length > 0) {
|
|
15274
|
+
appBIReportDimensions.forEach((dimension) => {
|
|
15275
|
+
if (!biReportDatas.dimension) {
|
|
15276
|
+
biReportDatas.dimension = [];
|
|
15277
|
+
}
|
|
15278
|
+
if (extendDimension.length > 0 && !biReportDatas.extendDimension) {
|
|
15279
|
+
biReportDatas.extendDimension = [];
|
|
15280
|
+
}
|
|
15281
|
+
if (extendDimension.includes(dimension.dimensionTag)) {
|
|
15282
|
+
biReportDatas.extendDimension.push({
|
|
15283
|
+
pssysbischemeid: tempAppBISchemeId,
|
|
15284
|
+
pssysbicubedimensionid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(dimension.dimensionTag),
|
|
15285
|
+
pssysbicubedimensionname: dimension.dimensionName,
|
|
15286
|
+
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
15287
|
+
codename: dimension.dimensionTag,
|
|
15288
|
+
pscodelistid: dimension.appCodeListId
|
|
15289
|
+
});
|
|
15290
|
+
} else {
|
|
15291
|
+
biReportDatas.dimension.push({
|
|
15292
|
+
pssysbischemeid: tempAppBISchemeId,
|
|
15293
|
+
pssysbicubedimensionid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(dimension.dimensionTag),
|
|
15294
|
+
pssysbicubedimensionname: dimension.dimensionName,
|
|
15295
|
+
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
15296
|
+
codename: dimension.dimensionTag,
|
|
15297
|
+
pscodelistid: dimension.appCodeListId
|
|
15298
|
+
});
|
|
15299
|
+
}
|
|
15300
|
+
});
|
|
15301
|
+
}
|
|
15302
|
+
config.propertyData = propertyData;
|
|
15303
|
+
return config;
|
|
15304
|
+
}
|
|
15305
|
+
/**
|
|
15306
|
+
* 指定参数数据转化为应用BI报表数据
|
|
15307
|
+
*
|
|
15308
|
+
* @param {{
|
|
15309
|
+
* reportTag: string;
|
|
15310
|
+
* selectChartType: string;
|
|
15311
|
+
* selectCubeId: string;
|
|
15312
|
+
* caption: string;
|
|
15313
|
+
* data: IData;
|
|
15314
|
+
* style: IData;
|
|
15315
|
+
* }} arg
|
|
15316
|
+
* @return {*} {Promise<IData>}
|
|
15317
|
+
* @memberof BIReportUtil
|
|
15318
|
+
*/
|
|
15319
|
+
async translateDataToAppBIReport(arg) {
|
|
15320
|
+
const { reportTag, selectChartType, selectCubeId, caption, data, style } = arg;
|
|
15321
|
+
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
15322
|
+
const targetData = {
|
|
15323
|
+
pssysbireportitems: [],
|
|
15324
|
+
pssysbischemeid: selectCubeId.split(".")[0],
|
|
15325
|
+
pssysbicubeid: selectCubeId,
|
|
15326
|
+
bireportuimodel: JSON.stringify({
|
|
15327
|
+
selectChartType,
|
|
15328
|
+
style,
|
|
15329
|
+
filter: data == null ? void 0 : data.filter,
|
|
15330
|
+
group: data == null ? void 0 : data.group
|
|
15331
|
+
}),
|
|
15332
|
+
pssysappid: app.model.codeName,
|
|
15333
|
+
bireporttag: reportTag,
|
|
15334
|
+
pssysbireportname: caption,
|
|
15335
|
+
validflag: 1
|
|
15336
|
+
};
|
|
15337
|
+
if (data && data.measure) {
|
|
15338
|
+
data.measure.forEach((measure) => {
|
|
15339
|
+
const tempMeasure = {
|
|
15340
|
+
birepitemtype: "MEASURE",
|
|
15341
|
+
pssysbischemeid: measure.pssysbischemeid,
|
|
15342
|
+
pssysbicubemeasureid: measure.pssysbicubemeasureid,
|
|
15343
|
+
pssysbicubeid: measure.pssysbicubeid,
|
|
15344
|
+
pssysbicubename: measure.pssysbicubename,
|
|
15345
|
+
pssysbicubemeasurename: measure.pssysbicubemeasurename,
|
|
15346
|
+
validflag: 1
|
|
15347
|
+
};
|
|
15348
|
+
targetData.pssysbireportitems.push(tempMeasure);
|
|
15349
|
+
});
|
|
15350
|
+
}
|
|
15351
|
+
if (data && data.dimension) {
|
|
15352
|
+
data.dimension.forEach((dimension) => {
|
|
15353
|
+
const tempDimension = {
|
|
15354
|
+
birepitemtype: "DIMENSION",
|
|
15355
|
+
pssysbischemeid: dimension.pssysbischemeid,
|
|
15356
|
+
pssysbicubedimensionid: dimension.pssysbicubedimensionid,
|
|
15357
|
+
pssysbicubeid: dimension.pssysbicubeid,
|
|
15358
|
+
pssysbicubename: dimension.pssysbicubename,
|
|
15359
|
+
pssysbicubedimensionname: dimension.pssysbicubedimensionname,
|
|
15360
|
+
validflag: 1
|
|
15361
|
+
};
|
|
15362
|
+
targetData.pssysbireportitems.push(tempDimension);
|
|
15363
|
+
});
|
|
15364
|
+
}
|
|
15365
|
+
if (data && data.extendDimension) {
|
|
15366
|
+
const extendDimension = [];
|
|
15367
|
+
data.extendDimension.forEach((dimension) => {
|
|
15368
|
+
extendDimension.push(dimension.codename);
|
|
15369
|
+
const tempDimension = {
|
|
15370
|
+
birepitemtype: "DIMENSION",
|
|
15371
|
+
pssysbischemeid: dimension.pssysbischemeid,
|
|
15372
|
+
pssysbicubedimensionid: dimension.pssysbicubedimensionid,
|
|
15373
|
+
pssysbicubeid: dimension.pssysbicubeid,
|
|
15374
|
+
pssysbicubename: dimension.pssysbicubename,
|
|
15375
|
+
pssysbicubedimensionname: dimension.pssysbicubedimensionname,
|
|
15376
|
+
validflag: 1
|
|
15377
|
+
};
|
|
15378
|
+
targetData.pssysbireportitems.push(tempDimension);
|
|
15379
|
+
});
|
|
15380
|
+
const uiModel = JSON.parse(targetData.bireportuimodel);
|
|
15381
|
+
targetData.bireportuimodel = JSON.stringify({
|
|
15382
|
+
...uiModel,
|
|
15383
|
+
extendDimension
|
|
15384
|
+
});
|
|
15385
|
+
}
|
|
15386
|
+
return targetData;
|
|
15387
|
+
}
|
|
15194
15388
|
};
|
|
15195
15389
|
|
|
15196
15390
|
// src/utils/dr-ctrl-util/index.ts
|
|
@@ -20717,6 +20911,23 @@ var BaseSeriesGenerator = class {
|
|
|
20717
20911
|
}
|
|
20718
20912
|
return isExclude ? void 0 : val;
|
|
20719
20913
|
}
|
|
20914
|
+
/**
|
|
20915
|
+
* 获取序列颜色
|
|
20916
|
+
*
|
|
20917
|
+
* @param {string} group
|
|
20918
|
+
* @return {*} {string}
|
|
20919
|
+
* @memberof BaseSeriesGenerator
|
|
20920
|
+
*/
|
|
20921
|
+
getSeriesColor(group) {
|
|
20922
|
+
let color = "";
|
|
20923
|
+
const maps = this.chartGenerator.codeListMap.values();
|
|
20924
|
+
const codeListItems = [...maps].flat();
|
|
20925
|
+
const item = codeListItems.find((x) => x.text === group);
|
|
20926
|
+
if (item) {
|
|
20927
|
+
color = item.color || "";
|
|
20928
|
+
}
|
|
20929
|
+
return color;
|
|
20930
|
+
}
|
|
20720
20931
|
/**
|
|
20721
20932
|
* 准备图表数据
|
|
20722
20933
|
* @return {*}
|
|
@@ -20909,6 +21120,10 @@ var BaseSeriesGenerator = class {
|
|
|
20909
21120
|
if (group !== DEFAULT_GROUP) {
|
|
20910
21121
|
options.name = group;
|
|
20911
21122
|
}
|
|
21123
|
+
const color = this.getSeriesColor(group);
|
|
21124
|
+
if (color) {
|
|
21125
|
+
options.color = color;
|
|
21126
|
+
}
|
|
20912
21127
|
if (this.seriesUserParam) {
|
|
20913
21128
|
options = mergeDeepRight(options, this.seriesUserParam);
|
|
20914
21129
|
}
|
|
@@ -22129,6 +22344,9 @@ var ChartService = class extends MDControlService {
|
|
|
22129
22344
|
|
|
22130
22345
|
// src/controller/control/chart/chart.controller.ts
|
|
22131
22346
|
var ChartController = class extends MDControlController {
|
|
22347
|
+
get _evt() {
|
|
22348
|
+
return this.evt;
|
|
22349
|
+
}
|
|
22132
22350
|
initState() {
|
|
22133
22351
|
super.initState();
|
|
22134
22352
|
this.state.size = 1e3;
|
|
@@ -22347,7 +22565,7 @@ var ChartController = class extends MDControlController {
|
|
|
22347
22565
|
* @author lxm
|
|
22348
22566
|
* @date 2023-06-07 10:03:48
|
|
22349
22567
|
*/
|
|
22350
|
-
updateChart() {
|
|
22568
|
+
async updateChart() {
|
|
22351
22569
|
if (!this.chart) {
|
|
22352
22570
|
throw new RuntimeError43(
|
|
22353
22571
|
ibiz.i18n.t("runtime.controller.control.chart.noInitialised")
|
|
@@ -22358,6 +22576,7 @@ var ChartController = class extends MDControlController {
|
|
|
22358
22576
|
ibiz.i18n.t("runtime.controller.control.chart.noCalculated")
|
|
22359
22577
|
);
|
|
22360
22578
|
}
|
|
22579
|
+
await this._evt.emit("onBeforeUpdate", void 0);
|
|
22361
22580
|
this.chart.setOption(this.options, { notMerge: true });
|
|
22362
22581
|
this.resizeChart();
|
|
22363
22582
|
}
|
|
@@ -25160,6 +25379,22 @@ var ToolbarController = class extends ControlController {
|
|
|
25160
25379
|
}
|
|
25161
25380
|
}
|
|
25162
25381
|
}
|
|
25382
|
+
const groupItem = item;
|
|
25383
|
+
if (groupItem.groupExtractMode && groupItem.uiactionGroup && groupItem.uiactionGroup.uiactionGroupDetails) {
|
|
25384
|
+
groupItem.uiactionGroup.uiactionGroupDetails.forEach(
|
|
25385
|
+
(detail) => {
|
|
25386
|
+
const actionid = detail.uiactionId;
|
|
25387
|
+
if (actionid) {
|
|
25388
|
+
const buttonState = new UIActionButtonState(
|
|
25389
|
+
detail.id,
|
|
25390
|
+
this.context.srfappid,
|
|
25391
|
+
actionid
|
|
25392
|
+
);
|
|
25393
|
+
this.state.buttonsState.addState(detail.id, buttonState);
|
|
25394
|
+
}
|
|
25395
|
+
}
|
|
25396
|
+
);
|
|
25397
|
+
}
|
|
25163
25398
|
},
|
|
25164
25399
|
{ childrenFields: ["detoolbarItems"] }
|
|
25165
25400
|
);
|
|
@@ -25316,14 +25551,6 @@ var DashboardController = class extends ControlController {
|
|
|
25316
25551
|
* @type {{ [key: string]: IPortletController }}
|
|
25317
25552
|
*/
|
|
25318
25553
|
this.portlets = {};
|
|
25319
|
-
/**
|
|
25320
|
-
* 启用动态
|
|
25321
|
-
*
|
|
25322
|
-
* @author tony001
|
|
25323
|
-
* @date 2024-06-27 11:06:24
|
|
25324
|
-
* @type {boolean}
|
|
25325
|
-
*/
|
|
25326
|
-
this.enableDynamic = false;
|
|
25327
25554
|
}
|
|
25328
25555
|
initState() {
|
|
25329
25556
|
super.initState();
|
|
@@ -25332,9 +25559,6 @@ var DashboardController = class extends ControlController {
|
|
|
25332
25559
|
this.model.enableCustomized = true;
|
|
25333
25560
|
await super.onCreated();
|
|
25334
25561
|
await this.initPortlets(this.model.controls);
|
|
25335
|
-
if (this.controlParams.enabledynamic === "true") {
|
|
25336
|
-
this.enableDynamic = true;
|
|
25337
|
-
}
|
|
25338
25562
|
const { appDataEntityId } = this.view.model;
|
|
25339
25563
|
if (appDataEntityId) {
|
|
25340
25564
|
this.view.evt.on("onDataChange", (event) => {
|
|
@@ -25430,20 +25654,47 @@ var DashboardController = class extends ControlController {
|
|
|
25430
25654
|
async loadAllDynaPortlet() {
|
|
25431
25655
|
var _a;
|
|
25432
25656
|
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
25433
|
-
const
|
|
25434
|
-
|
|
25435
|
-
|
|
25436
|
-
|
|
25437
|
-
|
|
25438
|
-
|
|
25439
|
-
|
|
25440
|
-
|
|
25657
|
+
const result = [];
|
|
25658
|
+
if (this.controlParams.dynamiccodelist) {
|
|
25659
|
+
const dynamicCodeListTag = this.controlParams.dynamiccodelist;
|
|
25660
|
+
const codeListItems = await app.codeList.get(
|
|
25661
|
+
dynamicCodeListTag,
|
|
25662
|
+
this.context,
|
|
25663
|
+
this.params
|
|
25664
|
+
);
|
|
25665
|
+
if (codeListItems && codeListItems.length > 0) {
|
|
25666
|
+
codeListItems.forEach((item) => {
|
|
25667
|
+
result.push({
|
|
25668
|
+
...item.data,
|
|
25669
|
+
psappportletid: item.value,
|
|
25670
|
+
psappportletname: item.text
|
|
25671
|
+
});
|
|
25672
|
+
});
|
|
25673
|
+
}
|
|
25674
|
+
} else {
|
|
25675
|
+
const res = await app.deService.exec(
|
|
25676
|
+
"psappportlet",
|
|
25677
|
+
"fetchdefault",
|
|
25678
|
+
this.context,
|
|
25679
|
+
{
|
|
25680
|
+
size: 1e3,
|
|
25681
|
+
n_pssysappid_eq: app.model.codeName,
|
|
25682
|
+
n_dynamodelflag_noteq: 0
|
|
25683
|
+
}
|
|
25684
|
+
);
|
|
25685
|
+
if (res && ((_a = res.data) == null ? void 0 : _a.length) > 0) {
|
|
25686
|
+
res.data.forEach((item) => {
|
|
25687
|
+
result.push({
|
|
25688
|
+
psappportletid: item.psappportletid,
|
|
25689
|
+
codename: item.codename,
|
|
25690
|
+
psappportletname: item.psappportletname,
|
|
25691
|
+
groupcodename: "Ungroup",
|
|
25692
|
+
groupname: "\u672A\u5206\u7C7B"
|
|
25693
|
+
});
|
|
25694
|
+
});
|
|
25441
25695
|
}
|
|
25442
|
-
);
|
|
25443
|
-
if (res && ((_a = res.data) == null ? void 0 : _a.length) > 0) {
|
|
25444
|
-
return res.data;
|
|
25445
25696
|
}
|
|
25446
|
-
return
|
|
25697
|
+
return result;
|
|
25447
25698
|
}
|
|
25448
25699
|
/**
|
|
25449
25700
|
* 通过指定标识加载门户部件
|
|
@@ -29875,18 +30126,22 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
29875
30126
|
* @date 2023-11-22 04:50:19
|
|
29876
30127
|
*/
|
|
29877
30128
|
create(index) {
|
|
30129
|
+
const item = {};
|
|
29878
30130
|
if (this.isSingleData) {
|
|
29879
|
-
this.setValue(
|
|
30131
|
+
this.setValue(item);
|
|
29880
30132
|
} else {
|
|
29881
30133
|
let tempValue = this.value;
|
|
29882
30134
|
tempValue = tempValue ? [...tempValue] : [];
|
|
29883
30135
|
if (index !== void 0) {
|
|
29884
|
-
tempValue.splice(index, 0,
|
|
30136
|
+
tempValue.splice(index, 0, item);
|
|
29885
30137
|
} else {
|
|
29886
|
-
tempValue.push(
|
|
30138
|
+
tempValue.push(item);
|
|
29887
30139
|
}
|
|
29888
30140
|
this.setValue(tempValue);
|
|
29889
30141
|
}
|
|
30142
|
+
this.form.evt.emit("onMDCtrlNew", {
|
|
30143
|
+
args: item
|
|
30144
|
+
});
|
|
29890
30145
|
}
|
|
29891
30146
|
/**
|
|
29892
30147
|
* 删除数据
|
|
@@ -29903,6 +30158,9 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
29903
30158
|
return index !== i;
|
|
29904
30159
|
});
|
|
29905
30160
|
this.setValue(newArr);
|
|
30161
|
+
this.form.evt.emit("onMDCtrlRemove", {
|
|
30162
|
+
args: newArr
|
|
30163
|
+
});
|
|
29906
30164
|
}
|
|
29907
30165
|
/**
|
|
29908
30166
|
* 表单数据变更通知
|
|
@@ -31217,6 +31475,24 @@ var GridService = class extends MDControlService {
|
|
|
31217
31475
|
res = this.handleResponse(res);
|
|
31218
31476
|
return res;
|
|
31219
31477
|
}
|
|
31478
|
+
/**
|
|
31479
|
+
* 移动并排序数据
|
|
31480
|
+
*
|
|
31481
|
+
* @param {IContext} context
|
|
31482
|
+
* @param {ControlVO} data
|
|
31483
|
+
* @param {IData} args
|
|
31484
|
+
* @return {*} {Promise<IHttpResponse<ControlVO[]>>}
|
|
31485
|
+
* @memberof GridService
|
|
31486
|
+
*/
|
|
31487
|
+
async moveOrderItem(context, data, params) {
|
|
31488
|
+
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
31489
|
+
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
31490
|
+
const tempContext = context.clone();
|
|
31491
|
+
tempContext[deName] = data.srfkey;
|
|
31492
|
+
let res = await this.exec(moveAction, tempContext, params);
|
|
31493
|
+
res = this.handleResponse(res);
|
|
31494
|
+
return res;
|
|
31495
|
+
}
|
|
31220
31496
|
};
|
|
31221
31497
|
|
|
31222
31498
|
// src/controller/control/grid/grid/entity-schema.ts
|
|
@@ -32685,35 +32961,32 @@ var GridController = class extends MDControlController {
|
|
|
32685
32961
|
super.actionNotification(tag, { ...opts || {} });
|
|
32686
32962
|
}
|
|
32687
32963
|
/**
|
|
32688
|
-
*
|
|
32689
|
-
* @
|
|
32690
|
-
* @
|
|
32691
|
-
* @
|
|
32964
|
+
* 拖拽改变
|
|
32965
|
+
* @param dragging 拖拽目标
|
|
32966
|
+
* @param drop 放置目标
|
|
32967
|
+
* @param dropType 放置类型
|
|
32692
32968
|
*/
|
|
32693
|
-
async onDragChange() {
|
|
32694
|
-
|
|
32695
|
-
const
|
|
32696
|
-
|
|
32969
|
+
async onDragChange(dragging, drop, dropType) {
|
|
32970
|
+
var _a;
|
|
32971
|
+
const moveAction = (_a = this.model.moveControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
32972
|
+
if (!moveAction) {
|
|
32973
|
+
throw new RuntimeModelError63(
|
|
32974
|
+
this.model,
|
|
32975
|
+
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
32976
|
+
);
|
|
32977
|
+
}
|
|
32978
|
+
const moveParams = {
|
|
32979
|
+
srftargetkey: drop.data.srfkey,
|
|
32980
|
+
srfmovetype: dropType === "prev" ? "MOVEBEFORE" : "MOVEAFTER"
|
|
32697
32981
|
};
|
|
32698
|
-
const
|
|
32699
|
-
|
|
32700
|
-
|
|
32701
|
-
|
|
32702
|
-
|
|
32703
|
-
|
|
32704
|
-
|
|
32705
|
-
|
|
32706
|
-
modifiedItems.push(item);
|
|
32707
|
-
}
|
|
32708
|
-
} else {
|
|
32709
|
-
if (!item[sortField] || lastSort >= item[sortField]) {
|
|
32710
|
-
item[sortField] = getNextSort(lastSort);
|
|
32711
|
-
modifiedItems.push(item);
|
|
32712
|
-
}
|
|
32713
|
-
lastSort = item[sortField];
|
|
32714
|
-
}
|
|
32715
|
-
});
|
|
32716
|
-
this.updateChangedItems(modifiedItems);
|
|
32982
|
+
const res = await this.service.moveOrderItem(
|
|
32983
|
+
this.context,
|
|
32984
|
+
dragging.data,
|
|
32985
|
+
moveParams
|
|
32986
|
+
);
|
|
32987
|
+
if (res.ok) {
|
|
32988
|
+
this.refresh();
|
|
32989
|
+
}
|
|
32717
32990
|
}
|
|
32718
32991
|
/**
|
|
32719
32992
|
* 更新改变项数据
|
|
@@ -32764,7 +33037,13 @@ var GridController = class extends MDControlController {
|
|
|
32764
33037
|
};
|
|
32765
33038
|
|
|
32766
33039
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
32767
|
-
import {
|
|
33040
|
+
import {
|
|
33041
|
+
DataTypes as DataTypes4,
|
|
33042
|
+
ModelError as ModelError29,
|
|
33043
|
+
plus as plus3,
|
|
33044
|
+
base64ToStr,
|
|
33045
|
+
isEmoji
|
|
33046
|
+
} from "@ibiz-template/core";
|
|
32768
33047
|
import dayjs6 from "dayjs";
|
|
32769
33048
|
import { debounce as debounce2 } from "lodash-es";
|
|
32770
33049
|
import { clone as clone32, isNil as isNil29 } from "ramda";
|
|
@@ -33061,6 +33340,9 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
33061
33340
|
return ValueExUtil.toText(this.model, value);
|
|
33062
33341
|
}
|
|
33063
33342
|
const strVal = "".concat(isNilOrEmpty8(value) ? "" : value);
|
|
33343
|
+
if (isEmoji(strVal)) {
|
|
33344
|
+
return base64ToStr(strVal);
|
|
33345
|
+
}
|
|
33064
33346
|
if (!this.valueFormat) {
|
|
33065
33347
|
return strVal;
|
|
33066
33348
|
}
|
|
@@ -37126,92 +37408,59 @@ var TreeController = class extends MDControlController {
|
|
|
37126
37408
|
* @return {*} {Promise<void>}
|
|
37127
37409
|
*/
|
|
37128
37410
|
async onNodeDrop(draggingNode, dropNode, dropType) {
|
|
37129
|
-
var _a, _b
|
|
37411
|
+
var _a, _b;
|
|
37130
37412
|
if (dropType === "inner" && !dropNode._leaf && dropNode._children === void 0) {
|
|
37131
37413
|
await this.expandNodeByKey([dropNode._id]);
|
|
37132
37414
|
}
|
|
37133
|
-
const modifiedNodeDatas = [];
|
|
37134
37415
|
const draggingNodeModel = this.getNodeModel(draggingNode._nodeId);
|
|
37135
37416
|
const dropInNode = dropType === "inner" ? dropNode : dropNode._parent;
|
|
37136
|
-
const isChangedParent = (dropNode == null ? void 0 :
|
|
37417
|
+
const isChangedParent = ((_a = dropNode._parent) == null ? void 0 : _a._id) !== ((_b = draggingNode._parent) == null ? void 0 : _b._id);
|
|
37137
37418
|
let orderNodeModel = this.getNodeModel(dropNode._nodeId);
|
|
37138
|
-
if (dropType === "inner" ||
|
|
37419
|
+
if (dropType === "inner" || isChangedParent) {
|
|
37139
37420
|
const dropNodeRs = this.findDropNodeRS(
|
|
37140
37421
|
dropInNode._nodeId,
|
|
37141
37422
|
draggingNodeModel.appDataEntityId
|
|
37142
37423
|
);
|
|
37143
37424
|
if (dropNodeRs) {
|
|
37144
37425
|
draggingNode._deData[dropNodeRs.pickupDEFName] = dropInNode._value;
|
|
37145
|
-
modifiedNodeDatas.push(draggingNode);
|
|
37146
37426
|
orderNodeModel = this.getNodeModel(dropNodeRs.childDETreeNodeId);
|
|
37147
37427
|
}
|
|
37148
|
-
}
|
|
37149
|
-
const originArr = draggingNode._parent._children;
|
|
37150
|
-
originArr.splice(originArr.indexOf(draggingNode), 1);
|
|
37151
|
-
if (dropType === "inner") {
|
|
37152
|
-
if (!dropNode._children) {
|
|
37153
|
-
dropNode._children = [];
|
|
37154
|
-
dropNode._leaf = true;
|
|
37155
|
-
this.state.expandedKeys.push(dropNode._id);
|
|
37156
|
-
}
|
|
37157
|
-
dropNode._children.push(draggingNode);
|
|
37158
|
-
} else {
|
|
37159
|
-
let insertIndex = dropInNode._children.indexOf(dropNode);
|
|
37160
|
-
if (dropType === "next") {
|
|
37161
|
-
insertIndex += 1;
|
|
37162
|
-
}
|
|
37163
|
-
dropInNode._children.splice(insertIndex, 0, draggingNode);
|
|
37164
|
-
}
|
|
37165
|
-
if (dropType === "inner" || isChangedParent) {
|
|
37166
37428
|
draggingNode._parent = dropInNode;
|
|
37167
37429
|
draggingNode._nodeId = orderNodeModel.id;
|
|
37168
37430
|
this.state.expandedKeys = this.calcExpandedKeys([dropInNode]);
|
|
37431
|
+
await this.updateDeNodeData([draggingNode]);
|
|
37169
37432
|
}
|
|
37170
|
-
const {
|
|
37171
|
-
if (
|
|
37172
|
-
|
|
37173
|
-
|
|
37174
|
-
|
|
37175
|
-
|
|
37176
|
-
|
|
37177
|
-
|
|
37178
|
-
const
|
|
37179
|
-
|
|
37180
|
-
|
|
37181
|
-
if (!isAsc) {
|
|
37182
|
-
changedArr.reverse();
|
|
37183
|
-
}
|
|
37184
|
-
const getNextSort = (num) => {
|
|
37185
|
-
return num + (100 - num % 100);
|
|
37186
|
-
};
|
|
37187
|
-
const getSort = (deData) => {
|
|
37188
|
-
return deData[sortField] || 0;
|
|
37433
|
+
const { moveAppDEActionId, appDataEntityId, allowOrder } = orderNodeModel;
|
|
37434
|
+
if (!moveAppDEActionId) {
|
|
37435
|
+
throw new RuntimeModelError66(
|
|
37436
|
+
this.model,
|
|
37437
|
+
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
37438
|
+
);
|
|
37439
|
+
}
|
|
37440
|
+
if (dropType !== "inner" && allowOrder) {
|
|
37441
|
+
const moveParams = {
|
|
37442
|
+
srftargetkey: dropNode.srfkey,
|
|
37443
|
+
srfmovetype: dropType === "prev" ? "MOVEBEFORE" : "MOVEAFTER"
|
|
37189
37444
|
};
|
|
37190
|
-
|
|
37191
|
-
|
|
37192
|
-
|
|
37193
|
-
|
|
37194
|
-
|
|
37195
|
-
|
|
37196
|
-
|
|
37197
|
-
|
|
37198
|
-
|
|
37199
|
-
|
|
37200
|
-
|
|
37201
|
-
|
|
37202
|
-
|
|
37203
|
-
|
|
37204
|
-
}
|
|
37445
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
37446
|
+
const deName = calcDeCodeNameById(appDataEntityId);
|
|
37447
|
+
const tempContext = this.context.clone();
|
|
37448
|
+
tempContext[deName] = draggingNode.srfkey;
|
|
37449
|
+
const res = await app.deService.exec(
|
|
37450
|
+
appDataEntityId,
|
|
37451
|
+
moveAppDEActionId,
|
|
37452
|
+
tempContext,
|
|
37453
|
+
moveParams
|
|
37454
|
+
);
|
|
37455
|
+
if (res.ok) {
|
|
37456
|
+
if (isChangedParent) {
|
|
37457
|
+
await this.refreshNodeChildren(draggingNode, true);
|
|
37458
|
+
await this.refreshNodeChildren(dropInNode);
|
|
37205
37459
|
} else {
|
|
37206
|
-
|
|
37207
|
-
deData[sortField] = getNextSort(lastSort);
|
|
37208
|
-
modifiedNodeDatas.push(item);
|
|
37209
|
-
}
|
|
37210
|
-
lastSort = getSort(deData);
|
|
37460
|
+
await this.refreshNodeChildren(dropInNode);
|
|
37211
37461
|
}
|
|
37212
|
-
}
|
|
37462
|
+
}
|
|
37213
37463
|
}
|
|
37214
|
-
await this.updateDeNodeData(modifiedNodeDatas);
|
|
37215
37464
|
this._evt.emit("onAfterNodeDrop", { isChangedParent });
|
|
37216
37465
|
}
|
|
37217
37466
|
/**
|
|
@@ -40526,7 +40775,11 @@ var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
40526
40775
|
* @return {*} {Promise<void>}
|
|
40527
40776
|
*/
|
|
40528
40777
|
async initConfig() {
|
|
40529
|
-
|
|
40778
|
+
const { appDEReport } = this.model;
|
|
40779
|
+
const { appBIReport } = appDEReport;
|
|
40780
|
+
const appBISchemeId = appDEReport.appBISchemeId.split(".").pop();
|
|
40781
|
+
appBIReport.appBISchemeId = appBISchemeId;
|
|
40782
|
+
this.config = appBIReport;
|
|
40530
40783
|
}
|
|
40531
40784
|
/**
|
|
40532
40785
|
* 加载数据
|
|
@@ -40542,71 +40795,6 @@ var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
40542
40795
|
}
|
|
40543
40796
|
return Promise.resolve(data);
|
|
40544
40797
|
}
|
|
40545
|
-
/**
|
|
40546
|
-
* 转化报表数据到配置数据
|
|
40547
|
-
*
|
|
40548
|
-
* @author tony001
|
|
40549
|
-
* @date 2024-06-28 14:06:43
|
|
40550
|
-
* @private
|
|
40551
|
-
* @param {IModel} model
|
|
40552
|
-
* @return {*} {IData}
|
|
40553
|
-
*/
|
|
40554
|
-
translateReportToConfig(model) {
|
|
40555
|
-
const config = {};
|
|
40556
|
-
const biReportDatas = {};
|
|
40557
|
-
const propertyData = {
|
|
40558
|
-
caption: model.logicName,
|
|
40559
|
-
data: biReportDatas
|
|
40560
|
-
};
|
|
40561
|
-
const { appDEReport } = model;
|
|
40562
|
-
console.log(appDEReport);
|
|
40563
|
-
config.reportTag = appDEReport.id;
|
|
40564
|
-
const tempAppBISchemeId = appDEReport.appBISchemeId.split(".").pop();
|
|
40565
|
-
config.selectedSchemeId = tempAppBISchemeId;
|
|
40566
|
-
const {
|
|
40567
|
-
appBICubeId,
|
|
40568
|
-
appBIReportDimensions,
|
|
40569
|
-
appBIReportMeasures,
|
|
40570
|
-
reportUIModel
|
|
40571
|
-
} = appDEReport.appBIReport;
|
|
40572
|
-
config.selectCubeId = "".concat(tempAppBISchemeId, ".").concat(appBICubeId);
|
|
40573
|
-
if (reportUIModel) {
|
|
40574
|
-
const reportUIModelObj = JSON.parse(reportUIModel);
|
|
40575
|
-
config.selectChartType = reportUIModelObj.selectChartType;
|
|
40576
|
-
propertyData.style = reportUIModelObj.style;
|
|
40577
|
-
} else {
|
|
40578
|
-
config.selectChartType = "NUMBER";
|
|
40579
|
-
}
|
|
40580
|
-
if (appBIReportMeasures && appBIReportMeasures.length > 0) {
|
|
40581
|
-
appBIReportMeasures.forEach((measure) => {
|
|
40582
|
-
if (!biReportDatas.measure) {
|
|
40583
|
-
biReportDatas.measure = [];
|
|
40584
|
-
}
|
|
40585
|
-
biReportDatas.measure.push({
|
|
40586
|
-
pssysbischemeid: tempAppBISchemeId,
|
|
40587
|
-
pssysbicubemeasureid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(measure.measureTag),
|
|
40588
|
-
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
40589
|
-
codename: measure.measureTag
|
|
40590
|
-
});
|
|
40591
|
-
});
|
|
40592
|
-
}
|
|
40593
|
-
if (appBIReportDimensions && appBIReportDimensions.length > 0) {
|
|
40594
|
-
appBIReportDimensions.forEach((dimension) => {
|
|
40595
|
-
if (!biReportDatas.dimension) {
|
|
40596
|
-
biReportDatas.dimension = [];
|
|
40597
|
-
}
|
|
40598
|
-
biReportDatas.dimension.push({
|
|
40599
|
-
pssysbischemeid: tempAppBISchemeId,
|
|
40600
|
-
pssysbicubedimensionid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(dimension.dimensionTag),
|
|
40601
|
-
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
40602
|
-
codename: dimension.dimensionTag,
|
|
40603
|
-
pscodelistid: dimension.appCodeListId
|
|
40604
|
-
});
|
|
40605
|
-
});
|
|
40606
|
-
}
|
|
40607
|
-
config.propertyData = propertyData;
|
|
40608
|
-
return config;
|
|
40609
|
-
}
|
|
40610
40798
|
};
|
|
40611
40799
|
|
|
40612
40800
|
// src/controller/control/report-panel/generator/generator-factory.ts
|
|
@@ -40819,35 +41007,6 @@ var ReportPanelController = class extends ControlController {
|
|
|
40819
41007
|
});
|
|
40820
41008
|
}
|
|
40821
41009
|
}
|
|
40822
|
-
/**
|
|
40823
|
-
* 打开设计界面
|
|
40824
|
-
*
|
|
40825
|
-
* @author tony001
|
|
40826
|
-
* @date 2024-06-18 16:06:46
|
|
40827
|
-
* @return {*} {Promise<IModalData>}
|
|
40828
|
-
*/
|
|
40829
|
-
async openReportDesignPage() {
|
|
40830
|
-
if (this.state.reportType && this.isBIReport) {
|
|
40831
|
-
const modal = ibiz.overlay.createModal(
|
|
40832
|
-
"iBizBIReportDesign",
|
|
40833
|
-
{
|
|
40834
|
-
dismiss: (_data) => modal.dismiss(_data),
|
|
40835
|
-
context: this.context,
|
|
40836
|
-
viewParams: this.params,
|
|
40837
|
-
config: this.generator.config
|
|
40838
|
-
},
|
|
40839
|
-
{
|
|
40840
|
-
width: "90%",
|
|
40841
|
-
height: "90%",
|
|
40842
|
-
footerHide: true
|
|
40843
|
-
}
|
|
40844
|
-
);
|
|
40845
|
-
modal.present();
|
|
40846
|
-
const result = await modal.onWillDismiss();
|
|
40847
|
-
return result;
|
|
40848
|
-
}
|
|
40849
|
-
return { ok: false, data: [] };
|
|
40850
|
-
}
|
|
40851
41010
|
};
|
|
40852
41011
|
|
|
40853
41012
|
// src/controller/control/gantt/gantt.controller.ts
|
|
@@ -41674,83 +41833,6 @@ var GanttController = class extends TreeGridExController {
|
|
|
41674
41833
|
}
|
|
41675
41834
|
}
|
|
41676
41835
|
}
|
|
41677
|
-
/**
|
|
41678
|
-
* 处理节点拖入事件
|
|
41679
|
-
*
|
|
41680
|
-
* @param {IGanttNodeData} draggingNode 拖动节点
|
|
41681
|
-
* @param {IGanttNodeData} dropNode 目标节点
|
|
41682
|
-
* @param {('inner' | 'prev' | 'next')} dropType 拖放类型
|
|
41683
|
-
* @return {*} {Promise<void>}
|
|
41684
|
-
* @memberof GanttController
|
|
41685
|
-
*/
|
|
41686
|
-
async onNodeDrop(draggingNode, dropNode, dropType) {
|
|
41687
|
-
var _a, _b;
|
|
41688
|
-
if (dropType === "inner" && !dropNode._leaf && dropNode._children === void 0) {
|
|
41689
|
-
await this.expandNodeByKey([dropNode._id]);
|
|
41690
|
-
}
|
|
41691
|
-
const modifiedNodeDatas = [];
|
|
41692
|
-
const draggingNodeModel = this.getNodeModel(draggingNode._nodeId);
|
|
41693
|
-
const dropInNode = dropType === "inner" ? dropNode : dropNode._parent;
|
|
41694
|
-
let orderNodeModel = this.getNodeModel(dropNode._nodeId);
|
|
41695
|
-
if (dropType === "inner" || ((_a = dropNode._parent) == null ? void 0 : _a._id) !== ((_b = draggingNode._parent) == null ? void 0 : _b._id)) {
|
|
41696
|
-
const dropNodeRs = this.findDropNodeRS(
|
|
41697
|
-
dropInNode._nodeId,
|
|
41698
|
-
draggingNodeModel.appDataEntityId
|
|
41699
|
-
);
|
|
41700
|
-
if (dropNodeRs) {
|
|
41701
|
-
draggingNode._deData[dropNodeRs.pickupDEFName] = dropInNode._value;
|
|
41702
|
-
modifiedNodeDatas.push(draggingNode);
|
|
41703
|
-
orderNodeModel = this.getNodeModel(dropNodeRs.childDETreeNodeId);
|
|
41704
|
-
}
|
|
41705
|
-
draggingNode._parent = dropInNode;
|
|
41706
|
-
draggingNode._nodeId = orderNodeModel.id;
|
|
41707
|
-
}
|
|
41708
|
-
const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
|
|
41709
|
-
if (allowOrder === true) {
|
|
41710
|
-
if (!sortAppDEFieldId) {
|
|
41711
|
-
throw new RuntimeModelError72(
|
|
41712
|
-
orderNodeModel,
|
|
41713
|
-
ibiz.i18n.t("runtime.controller.control.tree.sortAttribute")
|
|
41714
|
-
);
|
|
41715
|
-
}
|
|
41716
|
-
const sortField = sortAppDEFieldId.toLowerCase();
|
|
41717
|
-
const isAsc = sortDir === "ASC";
|
|
41718
|
-
const changedArr = dropInNode._children;
|
|
41719
|
-
if (!isAsc) {
|
|
41720
|
-
changedArr.reverse();
|
|
41721
|
-
}
|
|
41722
|
-
const getNextSort = (num) => {
|
|
41723
|
-
return num + (100 - num % 100);
|
|
41724
|
-
};
|
|
41725
|
-
const getSort = (deData) => {
|
|
41726
|
-
return deData[sortField] || 0;
|
|
41727
|
-
};
|
|
41728
|
-
let lastSort;
|
|
41729
|
-
changedArr.forEach((item, index) => {
|
|
41730
|
-
const deData = item._deData;
|
|
41731
|
-
if (lastSort === void 0) {
|
|
41732
|
-
if (item === draggingNode) {
|
|
41733
|
-
if (index === 0) {
|
|
41734
|
-
lastSort = 100;
|
|
41735
|
-
} else {
|
|
41736
|
-
lastSort = getNextSort(getSort(changedArr[index - 1]._deData));
|
|
41737
|
-
}
|
|
41738
|
-
deData[sortField] = lastSort;
|
|
41739
|
-
if (modifiedNodeDatas.indexOf(item) === -1) {
|
|
41740
|
-
modifiedNodeDatas.push(item);
|
|
41741
|
-
}
|
|
41742
|
-
}
|
|
41743
|
-
} else {
|
|
41744
|
-
if (lastSort >= getSort(deData)) {
|
|
41745
|
-
deData[sortField] = getNextSort(lastSort);
|
|
41746
|
-
modifiedNodeDatas.push(item);
|
|
41747
|
-
}
|
|
41748
|
-
lastSort = getSort(deData);
|
|
41749
|
-
}
|
|
41750
|
-
});
|
|
41751
|
-
}
|
|
41752
|
-
await this.updateDeNodeData(modifiedNodeDatas);
|
|
41753
|
-
}
|
|
41754
41836
|
onDEDataChange(msg) {
|
|
41755
41837
|
}
|
|
41756
41838
|
};
|