@ibiz-template/runtime 0.7.26-alpha.2 → 0.7.27
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 +967 -543
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts +1 -0
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +5 -0
- 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/chart/generator/chart-options-generator.d.ts +39 -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 +217 -174
- package/out/controller/control/chart/generator/radar-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/radar-series-generator.js +5 -2
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts +1 -8
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.js +1 -9
- package/out/controller/control/dashboard/dashboard.controller.d.ts +25 -0
- package/out/controller/control/dashboard/dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/dashboard.controller.js +52 -0
- 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/entity-schema.d.ts.map +1 -1
- package/out/controller/control/grid/grid/entity-schema.js +1 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts +20 -7
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +49 -33
- 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 +7 -2
- package/out/controller/control/report-panel/generator/base-generator.d.ts +4 -4
- package/out/controller/control/report-panel/generator/base-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/base-generator.js +4 -5
- package/out/controller/control/report-panel/generator/bi-generator.d.ts +4 -4
- package/out/controller/control/report-panel/generator/bi-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/bi-generator.js +9 -16
- package/out/controller/control/report-panel/generator/user-generator.d.ts +2 -2
- package/out/controller/control/report-panel/generator/user-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/user-generator.js +2 -2
- package/out/controller/control/report-panel/report-panel.controller.d.ts.map +1 -1
- package/out/controller/control/report-panel/report-panel.controller.js +4 -1
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +7 -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/global/global-util/global-util.d.ts +8 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +8 -1
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +10 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts.map +1 -1
- package/out/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/control/i-grid.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-grid.state.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 +10 -0
- package/out/interface/provider/model-loader.provider.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +2 -1
- package/out/ui-action/provider/front-ui-action-provider.js +1 -1
- package/out/utils/bi-report-util/bi-report-util.d.ts +90 -0
- package/out/utils/bi-report-util/bi-report-util.d.ts.map +1 -0
- package/out/utils/bi-report-util/bi-report-util.js +292 -0
- package/out/utils/bi-report-util/index.d.ts +2 -0
- package/out/utils/bi-report-util/index.d.ts.map +1 -0
- package/out/utils/bi-report-util/index.js +1 -0
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/script/script-factory.d.ts.map +1 -1
- package/out/utils/script/script-factory.js +1 -1
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -80,7 +80,7 @@ var RegisterCenter = class {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
// src/command/app/app-func/app-func.ts
|
|
83
|
-
import { ModelError as ModelError16, RuntimeError as
|
|
83
|
+
import { ModelError as ModelError16, RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
84
84
|
|
|
85
85
|
// src/utils/error-handler/default-error-handler.ts
|
|
86
86
|
import {
|
|
@@ -1829,7 +1829,7 @@ var ScriptFactory = class {
|
|
|
1829
1829
|
* @param {IScriptFunctionOpts} options 选项
|
|
1830
1830
|
* @return {*}
|
|
1831
1831
|
*/
|
|
1832
|
-
static execScriptFn(args, scriptCode, options
|
|
1832
|
+
static execScriptFn(args, scriptCode, options) {
|
|
1833
1833
|
return this.createScriptFn(Object.keys(args), scriptCode, options).exec(
|
|
1834
1834
|
args
|
|
1835
1835
|
);
|
|
@@ -11463,10 +11463,11 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11463
11463
|
});
|
|
11464
11464
|
}
|
|
11465
11465
|
calcIcon(model) {
|
|
11466
|
-
|
|
11466
|
+
let icon = super.calcIcon(model) || {};
|
|
11467
11467
|
const { iconAppDEFieldId, detreeNodeDataItems } = model;
|
|
11468
11468
|
if (iconAppDEFieldId && this._deData[iconAppDEFieldId]) {
|
|
11469
11469
|
const value = this._deData[iconAppDEFieldId];
|
|
11470
|
+
icon = {};
|
|
11470
11471
|
if (value.indexOf("fa-") !== -1) {
|
|
11471
11472
|
icon.cssClass = value;
|
|
11472
11473
|
} else {
|
|
@@ -13091,8 +13092,8 @@ var baseStyle = {
|
|
|
13091
13092
|
position: "fixed",
|
|
13092
13093
|
zIndex: "10000"
|
|
13093
13094
|
};
|
|
13094
|
-
function cloneElement(
|
|
13095
|
-
const element = getAnimationElement(
|
|
13095
|
+
function cloneElement(clone41, teleport = document.body, isRemoveChild = true) {
|
|
13096
|
+
const element = getAnimationElement(clone41);
|
|
13096
13097
|
if (element == null) {
|
|
13097
13098
|
throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
|
|
13098
13099
|
}
|
|
@@ -13511,11 +13512,11 @@ function arrayContains(arr, val) {
|
|
|
13511
13512
|
});
|
|
13512
13513
|
}
|
|
13513
13514
|
function cloneObject(o) {
|
|
13514
|
-
var
|
|
13515
|
+
var clone41 = {};
|
|
13515
13516
|
for (var p in o) {
|
|
13516
|
-
|
|
13517
|
+
clone41[p] = o[p];
|
|
13517
13518
|
}
|
|
13518
|
-
return
|
|
13519
|
+
return clone41;
|
|
13519
13520
|
}
|
|
13520
13521
|
function replaceObjectProps(o1, o2) {
|
|
13521
13522
|
var o = cloneObject(o1);
|
|
@@ -15076,6 +15077,309 @@ var ShortCutUtil = class {
|
|
|
15076
15077
|
}
|
|
15077
15078
|
};
|
|
15078
15079
|
|
|
15080
|
+
// src/utils/bi-report-util/bi-report-util.ts
|
|
15081
|
+
import { clone as clone18 } from "ramda";
|
|
15082
|
+
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
15083
|
+
var BIReportUtil = class {
|
|
15084
|
+
/**
|
|
15085
|
+
* 打开设计界面
|
|
15086
|
+
*
|
|
15087
|
+
* @author tony001
|
|
15088
|
+
* @date 2024-06-30 11:06:21
|
|
15089
|
+
* @param {IContext} context
|
|
15090
|
+
* @param {IParams} params
|
|
15091
|
+
* @param {IData} data
|
|
15092
|
+
* @return {*} {Promise<IModalData>}
|
|
15093
|
+
*/
|
|
15094
|
+
async openDesignPage(context, params, data) {
|
|
15095
|
+
if (!data.mode)
|
|
15096
|
+
data.mode = "DATA";
|
|
15097
|
+
const tempContext = clone18(context);
|
|
15098
|
+
let config = {};
|
|
15099
|
+
if (data.mode === "DATA") {
|
|
15100
|
+
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
15101
|
+
try {
|
|
15102
|
+
Object.assign(tempContext, { pssysbireport: data.reportId });
|
|
15103
|
+
const res = await app.deService.exec(
|
|
15104
|
+
"pssysbireport",
|
|
15105
|
+
"get",
|
|
15106
|
+
tempContext,
|
|
15107
|
+
params
|
|
15108
|
+
);
|
|
15109
|
+
if (res.data) {
|
|
15110
|
+
config = await this.translateDEReportToConfig(res.data);
|
|
15111
|
+
}
|
|
15112
|
+
} catch (error) {
|
|
15113
|
+
throw new RuntimeError25(error.message);
|
|
15114
|
+
}
|
|
15115
|
+
} else if (data.mode === "UI") {
|
|
15116
|
+
config = data.reportPanel.generator.config;
|
|
15117
|
+
}
|
|
15118
|
+
const modal = ibiz.overlay.createModal(
|
|
15119
|
+
"iBizBIReportDesign",
|
|
15120
|
+
{
|
|
15121
|
+
dismiss: (_data) => modal.dismiss(_data),
|
|
15122
|
+
context: tempContext,
|
|
15123
|
+
viewParams: params,
|
|
15124
|
+
config
|
|
15125
|
+
},
|
|
15126
|
+
{
|
|
15127
|
+
width: "90%",
|
|
15128
|
+
height: "90%",
|
|
15129
|
+
footerHide: true
|
|
15130
|
+
}
|
|
15131
|
+
);
|
|
15132
|
+
modal.present();
|
|
15133
|
+
const result = await modal.onWillDismiss();
|
|
15134
|
+
return result;
|
|
15135
|
+
}
|
|
15136
|
+
/**
|
|
15137
|
+
* 实体报表数据转化配置数据
|
|
15138
|
+
*
|
|
15139
|
+
* @author tony001
|
|
15140
|
+
* @date 2024-06-30 11:06:00
|
|
15141
|
+
* @private
|
|
15142
|
+
* @param {IData} data
|
|
15143
|
+
* @return {*} {IData}
|
|
15144
|
+
*/
|
|
15145
|
+
async translateDEReportToConfig(data) {
|
|
15146
|
+
const config = {};
|
|
15147
|
+
let biReportUIModel = {};
|
|
15148
|
+
if (data.bireportuimodel) {
|
|
15149
|
+
biReportUIModel = JSON.parse(data.bireportuimodel);
|
|
15150
|
+
}
|
|
15151
|
+
config.selectChartType = (biReportUIModel == null ? void 0 : biReportUIModel.selectChartType) || "NUMBER";
|
|
15152
|
+
config.reportTag = "bi_report";
|
|
15153
|
+
config.selectCubeId = data.pssysbicubeid;
|
|
15154
|
+
config.selectedSchemeId = data.pssysbischemeid;
|
|
15155
|
+
const biReportItems = {};
|
|
15156
|
+
const extendDimension = (biReportUIModel == null ? void 0 : biReportUIModel.extendDimension) || [];
|
|
15157
|
+
if (data.pssysbireportitems && data.pssysbireportitems.length > 0) {
|
|
15158
|
+
data.pssysbireportitems.forEach((item) => {
|
|
15159
|
+
var _a, _b;
|
|
15160
|
+
if (item.birepitemtype === "MEASURE") {
|
|
15161
|
+
if (!biReportItems.measure) {
|
|
15162
|
+
biReportItems.measure = [];
|
|
15163
|
+
}
|
|
15164
|
+
biReportItems.measure.push({
|
|
15165
|
+
pssysbischemeid: item.pssysbischemeid,
|
|
15166
|
+
pssysbicubemeasureid: item.pssysbicubemeasureid,
|
|
15167
|
+
pssysbicubeid: item.pssysbicubeid,
|
|
15168
|
+
codename: (_a = item.pssysbicubemeasureid) == null ? void 0 : _a.split(".").pop(),
|
|
15169
|
+
pssysbicubemeasurename: item.pssysbicubemeasurename
|
|
15170
|
+
});
|
|
15171
|
+
}
|
|
15172
|
+
if (item.birepitemtype === "DIMENSION") {
|
|
15173
|
+
if (!biReportItems.dimension) {
|
|
15174
|
+
biReportItems.dimension = [];
|
|
15175
|
+
}
|
|
15176
|
+
if (extendDimension.length > 0 && !biReportItems.extendDimension) {
|
|
15177
|
+
biReportItems.extendDimension = [];
|
|
15178
|
+
}
|
|
15179
|
+
const codename = (_b = item.pssysbicubedimensionid) == null ? void 0 : _b.split(".").pop();
|
|
15180
|
+
if (extendDimension.includes(codename)) {
|
|
15181
|
+
biReportItems.extendDimension.push({
|
|
15182
|
+
pssysbischemeid: item.pssysbischemeid,
|
|
15183
|
+
pssysbicubedimensionid: item.pssysbicubedimensionid,
|
|
15184
|
+
pssysbicubeid: item.pssysbicubeid,
|
|
15185
|
+
codename,
|
|
15186
|
+
pssysbicubedimensionname: item.pssysbicubedimensionname
|
|
15187
|
+
});
|
|
15188
|
+
} else {
|
|
15189
|
+
biReportItems.dimension.push({
|
|
15190
|
+
pssysbischemeid: item.pssysbischemeid,
|
|
15191
|
+
pssysbicubedimensionid: item.pssysbicubedimensionid,
|
|
15192
|
+
pssysbicubeid: item.pssysbicubeid,
|
|
15193
|
+
codename,
|
|
15194
|
+
pssysbicubedimensionname: item.pssysbicubedimensionname
|
|
15195
|
+
});
|
|
15196
|
+
}
|
|
15197
|
+
}
|
|
15198
|
+
});
|
|
15199
|
+
}
|
|
15200
|
+
const propertyData = {
|
|
15201
|
+
caption: data.pssysbireportname
|
|
15202
|
+
};
|
|
15203
|
+
if (Object.keys(biReportItems).length > 0) {
|
|
15204
|
+
Object.assign(propertyData, { data: biReportItems });
|
|
15205
|
+
}
|
|
15206
|
+
if (biReportUIModel.style) {
|
|
15207
|
+
Object.assign(propertyData, { style: biReportUIModel.style });
|
|
15208
|
+
}
|
|
15209
|
+
if (biReportUIModel.filter) {
|
|
15210
|
+
propertyData.data.filter = biReportUIModel.filter;
|
|
15211
|
+
}
|
|
15212
|
+
config.propertyData = propertyData;
|
|
15213
|
+
return config;
|
|
15214
|
+
}
|
|
15215
|
+
/**
|
|
15216
|
+
* 报表面板数据转化配置界面数据
|
|
15217
|
+
*
|
|
15218
|
+
* @param {IDEReportPanel} model
|
|
15219
|
+
* @return {*} {Promise<IData>}
|
|
15220
|
+
* @memberof BIReportUtil
|
|
15221
|
+
*/
|
|
15222
|
+
async translateReportPanelToConfig(model) {
|
|
15223
|
+
const config = {};
|
|
15224
|
+
const biReportDatas = {};
|
|
15225
|
+
const { appDEReport } = model;
|
|
15226
|
+
const propertyData = {
|
|
15227
|
+
data: biReportDatas
|
|
15228
|
+
};
|
|
15229
|
+
config.reportTag = appDEReport.id;
|
|
15230
|
+
const tempAppBISchemeId = appDEReport.appBISchemeId.split(".").pop();
|
|
15231
|
+
config.selectedSchemeId = tempAppBISchemeId;
|
|
15232
|
+
const {
|
|
15233
|
+
name,
|
|
15234
|
+
appBICubeId,
|
|
15235
|
+
appBIReportDimensions,
|
|
15236
|
+
appBIReportMeasures,
|
|
15237
|
+
reportUIModel
|
|
15238
|
+
} = appDEReport.appBIReport;
|
|
15239
|
+
propertyData.caption = name;
|
|
15240
|
+
config.selectCubeId = "".concat(tempAppBISchemeId, ".").concat(appBICubeId);
|
|
15241
|
+
let extendDimension = [];
|
|
15242
|
+
if (reportUIModel) {
|
|
15243
|
+
const reportUIModelObj = JSON.parse(reportUIModel);
|
|
15244
|
+
config.selectChartType = reportUIModelObj.selectChartType;
|
|
15245
|
+
propertyData.style = reportUIModelObj.style;
|
|
15246
|
+
propertyData.data.filter = reportUIModelObj.filter;
|
|
15247
|
+
if (reportUIModelObj.extendDimension) {
|
|
15248
|
+
extendDimension = reportUIModelObj.extendDimension;
|
|
15249
|
+
}
|
|
15250
|
+
} else {
|
|
15251
|
+
config.selectChartType = "NUMBER";
|
|
15252
|
+
}
|
|
15253
|
+
if (appBIReportMeasures && appBIReportMeasures.length > 0) {
|
|
15254
|
+
appBIReportMeasures.forEach((measure) => {
|
|
15255
|
+
if (!biReportDatas.measure) {
|
|
15256
|
+
biReportDatas.measure = [];
|
|
15257
|
+
}
|
|
15258
|
+
biReportDatas.measure.push({
|
|
15259
|
+
pssysbischemeid: tempAppBISchemeId,
|
|
15260
|
+
pssysbicubemeasureid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(measure.measureTag),
|
|
15261
|
+
pssysbicubemeasurename: measure.measureName,
|
|
15262
|
+
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
15263
|
+
codename: measure.measureTag
|
|
15264
|
+
});
|
|
15265
|
+
});
|
|
15266
|
+
}
|
|
15267
|
+
if (appBIReportDimensions && appBIReportDimensions.length > 0) {
|
|
15268
|
+
appBIReportDimensions.forEach((dimension) => {
|
|
15269
|
+
if (!biReportDatas.dimension) {
|
|
15270
|
+
biReportDatas.dimension = [];
|
|
15271
|
+
}
|
|
15272
|
+
if (extendDimension.length > 0 && !biReportDatas.extendDimension) {
|
|
15273
|
+
biReportDatas.extendDimension = [];
|
|
15274
|
+
}
|
|
15275
|
+
if (extendDimension.includes(dimension.dimensionTag)) {
|
|
15276
|
+
biReportDatas.extendDimension.push({
|
|
15277
|
+
pssysbischemeid: tempAppBISchemeId,
|
|
15278
|
+
pssysbicubedimensionid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(dimension.dimensionTag),
|
|
15279
|
+
pssysbicubedimensionname: dimension.dimensionName,
|
|
15280
|
+
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
15281
|
+
codename: dimension.dimensionTag,
|
|
15282
|
+
pscodelistid: dimension.appCodeListId
|
|
15283
|
+
});
|
|
15284
|
+
} else {
|
|
15285
|
+
biReportDatas.dimension.push({
|
|
15286
|
+
pssysbischemeid: tempAppBISchemeId,
|
|
15287
|
+
pssysbicubedimensionid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(dimension.dimensionTag),
|
|
15288
|
+
pssysbicubedimensionname: dimension.dimensionName,
|
|
15289
|
+
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
15290
|
+
codename: dimension.dimensionTag,
|
|
15291
|
+
pscodelistid: dimension.appCodeListId
|
|
15292
|
+
});
|
|
15293
|
+
}
|
|
15294
|
+
});
|
|
15295
|
+
}
|
|
15296
|
+
config.propertyData = propertyData;
|
|
15297
|
+
return config;
|
|
15298
|
+
}
|
|
15299
|
+
/**
|
|
15300
|
+
* 指定参数数据转化为应用BI报表数据
|
|
15301
|
+
*
|
|
15302
|
+
* @param {{
|
|
15303
|
+
* reportTag: string;
|
|
15304
|
+
* selectChartType: string;
|
|
15305
|
+
* selectCubeId: string;
|
|
15306
|
+
* caption: string;
|
|
15307
|
+
* data: IData;
|
|
15308
|
+
* style: IData;
|
|
15309
|
+
* }} arg
|
|
15310
|
+
* @return {*} {Promise<IData>}
|
|
15311
|
+
* @memberof BIReportUtil
|
|
15312
|
+
*/
|
|
15313
|
+
async translateDataToAppBIReport(arg) {
|
|
15314
|
+
const { reportTag, selectChartType, selectCubeId, caption, data, style } = arg;
|
|
15315
|
+
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
15316
|
+
const targetData = {
|
|
15317
|
+
pssysbireportitems: [],
|
|
15318
|
+
pssysbischemeid: selectCubeId.split(".")[0],
|
|
15319
|
+
pssysbicubeid: selectCubeId,
|
|
15320
|
+
bireportuimodel: JSON.stringify({
|
|
15321
|
+
selectChartType,
|
|
15322
|
+
style,
|
|
15323
|
+
filter: data == null ? void 0 : data.filter
|
|
15324
|
+
}),
|
|
15325
|
+
pssysappid: app.model.codeName,
|
|
15326
|
+
bireporttag: reportTag,
|
|
15327
|
+
pssysbireportname: caption,
|
|
15328
|
+
validflag: 1
|
|
15329
|
+
};
|
|
15330
|
+
if (data && data.measure) {
|
|
15331
|
+
data.measure.forEach((measure) => {
|
|
15332
|
+
const tempMeasure = {
|
|
15333
|
+
birepitemtype: "MEASURE",
|
|
15334
|
+
pssysbischemeid: measure.pssysbischemeid,
|
|
15335
|
+
pssysbicubemeasureid: measure.pssysbicubemeasureid,
|
|
15336
|
+
pssysbicubeid: measure.pssysbicubeid,
|
|
15337
|
+
pssysbicubename: measure.pssysbicubename,
|
|
15338
|
+
pssysbicubemeasurename: measure.pssysbicubemeasurename,
|
|
15339
|
+
validflag: 1
|
|
15340
|
+
};
|
|
15341
|
+
targetData.pssysbireportitems.push(tempMeasure);
|
|
15342
|
+
});
|
|
15343
|
+
}
|
|
15344
|
+
if (data && data.dimension) {
|
|
15345
|
+
data.dimension.forEach((dimension) => {
|
|
15346
|
+
const tempDimension = {
|
|
15347
|
+
birepitemtype: "DIMENSION",
|
|
15348
|
+
pssysbischemeid: dimension.pssysbischemeid,
|
|
15349
|
+
pssysbicubedimensionid: dimension.pssysbicubedimensionid,
|
|
15350
|
+
pssysbicubeid: dimension.pssysbicubeid,
|
|
15351
|
+
pssysbicubename: dimension.pssysbicubename,
|
|
15352
|
+
pssysbicubedimensionname: dimension.pssysbicubedimensionname,
|
|
15353
|
+
validflag: 1
|
|
15354
|
+
};
|
|
15355
|
+
targetData.pssysbireportitems.push(tempDimension);
|
|
15356
|
+
});
|
|
15357
|
+
}
|
|
15358
|
+
if (data && data.extendDimension) {
|
|
15359
|
+
const extendDimension = [];
|
|
15360
|
+
data.extendDimension.forEach((dimension) => {
|
|
15361
|
+
extendDimension.push(dimension.codename);
|
|
15362
|
+
const tempDimension = {
|
|
15363
|
+
birepitemtype: "DIMENSION",
|
|
15364
|
+
pssysbischemeid: dimension.pssysbischemeid,
|
|
15365
|
+
pssysbicubedimensionid: dimension.pssysbicubedimensionid,
|
|
15366
|
+
pssysbicubeid: dimension.pssysbicubeid,
|
|
15367
|
+
pssysbicubename: dimension.pssysbicubename,
|
|
15368
|
+
pssysbicubedimensionname: dimension.pssysbicubedimensionname,
|
|
15369
|
+
validflag: 1
|
|
15370
|
+
};
|
|
15371
|
+
targetData.pssysbireportitems.push(tempDimension);
|
|
15372
|
+
});
|
|
15373
|
+
const uiModel = JSON.parse(targetData.bireportuimodel);
|
|
15374
|
+
targetData.bireportuimodel = JSON.stringify({
|
|
15375
|
+
...uiModel,
|
|
15376
|
+
extendDimension
|
|
15377
|
+
});
|
|
15378
|
+
}
|
|
15379
|
+
return targetData;
|
|
15380
|
+
}
|
|
15381
|
+
};
|
|
15382
|
+
|
|
15079
15383
|
// src/utils/dr-ctrl-util/index.ts
|
|
15080
15384
|
function calcItemVisibleByCounter(item, counter) {
|
|
15081
15385
|
const { enableMode, counterId } = item;
|
|
@@ -15133,8 +15437,8 @@ async function calcItemVisible(item, context, params, appDeId, appId2, data) {
|
|
|
15133
15437
|
}
|
|
15134
15438
|
|
|
15135
15439
|
// src/command/app/open-app-view/open-app-view.ts
|
|
15136
|
-
import { ModelError as ModelError15, RuntimeError as
|
|
15137
|
-
import { clone as
|
|
15440
|
+
import { ModelError as ModelError15, RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
15441
|
+
import { clone as clone19 } from "ramda";
|
|
15138
15442
|
var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
15139
15443
|
constructor() {
|
|
15140
15444
|
ibiz.commands.register(_OpenAppViewCommand.TAG, this.exec.bind(this));
|
|
@@ -15151,13 +15455,13 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
15151
15455
|
* @return {*} {(Promise<IModalData | void>)}
|
|
15152
15456
|
*/
|
|
15153
15457
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
15154
|
-
const context =
|
|
15458
|
+
const context = clone19(_context);
|
|
15155
15459
|
if (context.srfsimple) {
|
|
15156
15460
|
delete context.srfsimple;
|
|
15157
15461
|
}
|
|
15158
15462
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
15159
15463
|
if (!appView) {
|
|
15160
|
-
throw new
|
|
15464
|
+
throw new RuntimeError26(
|
|
15161
15465
|
ibiz.i18n.t("runtime.command.app.noFindApplicationView", {
|
|
15162
15466
|
appViewId
|
|
15163
15467
|
})
|
|
@@ -15280,7 +15584,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
15280
15584
|
async openPopover(appView, context, params = {}, opts = {}) {
|
|
15281
15585
|
const { event, modalOption } = opts;
|
|
15282
15586
|
if (!event) {
|
|
15283
|
-
throw new
|
|
15587
|
+
throw new RuntimeError26(ibiz.i18n.t("runtime.command.app.missingEvent"));
|
|
15284
15588
|
}
|
|
15285
15589
|
return ibiz.openView.popover(appView.id, event, context, params, {
|
|
15286
15590
|
...modalOption
|
|
@@ -15338,7 +15642,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15338
15642
|
const app = await ibiz.hub.getAppAsync(context.srfappid);
|
|
15339
15643
|
const appFunc = app.getAppFunc(appFuncId);
|
|
15340
15644
|
if (!appFunc) {
|
|
15341
|
-
throw new
|
|
15645
|
+
throw new RuntimeError27(
|
|
15342
15646
|
ibiz.i18n.t("runtime.command.app.noFindApplicationFunction", {
|
|
15343
15647
|
appFuncId
|
|
15344
15648
|
})
|
|
@@ -15382,7 +15686,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15382
15686
|
*/
|
|
15383
15687
|
async openAppView(appFunc, context, params, opts) {
|
|
15384
15688
|
if (!appFunc.appViewId) {
|
|
15385
|
-
throw new
|
|
15689
|
+
throw new RuntimeError27(
|
|
15386
15690
|
ibiz.i18n.t("runtime.command.app.noFindApplicationView", {
|
|
15387
15691
|
appViewId: appFunc.appViewId
|
|
15388
15692
|
})
|
|
@@ -15420,7 +15724,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15420
15724
|
*/
|
|
15421
15725
|
openPdAppFunc(appFunc, context, params) {
|
|
15422
15726
|
ibiz.log.warn("openPdAppFunc", appFunc, context, params);
|
|
15423
|
-
throw new
|
|
15727
|
+
throw new RuntimeError27(ibiz.i18n.t("runtime.common.unrealized"));
|
|
15424
15728
|
}
|
|
15425
15729
|
/**
|
|
15426
15730
|
* 执行 JavaScript 脚本
|
|
@@ -15434,7 +15738,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15434
15738
|
*/
|
|
15435
15739
|
executeJavaScript(appFunc, context, params) {
|
|
15436
15740
|
ibiz.log.warn("executeJavaScript", appFunc, context, params);
|
|
15437
|
-
throw new
|
|
15741
|
+
throw new RuntimeError27(ibiz.i18n.t("runtime.common.unrealized"));
|
|
15438
15742
|
}
|
|
15439
15743
|
/**
|
|
15440
15744
|
* 自定义应用功能
|
|
@@ -15448,7 +15752,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15448
15752
|
*/
|
|
15449
15753
|
custom(appFunc, context, params) {
|
|
15450
15754
|
ibiz.log.warn("custom", appFunc, context, params);
|
|
15451
|
-
throw new
|
|
15755
|
+
throw new RuntimeError27(ibiz.i18n.t("runtime.common.unrealized"));
|
|
15452
15756
|
}
|
|
15453
15757
|
};
|
|
15454
15758
|
/**
|
|
@@ -15725,7 +16029,7 @@ var Convert = class {
|
|
|
15725
16029
|
};
|
|
15726
16030
|
|
|
15727
16031
|
// src/hub/config/app-view-config-service.ts
|
|
15728
|
-
import { RuntimeError as
|
|
16032
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
15729
16033
|
var AppViewConfigService = class {
|
|
15730
16034
|
constructor() {
|
|
15731
16035
|
/**
|
|
@@ -15796,7 +16100,7 @@ var AppViewConfigService = class {
|
|
|
15796
16100
|
if (!this.viewConfigs.has(id)) {
|
|
15797
16101
|
const model = await ibiz.hub.getAppView(id);
|
|
15798
16102
|
if (!model) {
|
|
15799
|
-
throw new
|
|
16103
|
+
throw new RuntimeError28(ibiz.i18n.t("runtime.hub.noExist", { id }));
|
|
15800
16104
|
}
|
|
15801
16105
|
this.set(model.id, {
|
|
15802
16106
|
id: model.id,
|
|
@@ -15866,7 +16170,7 @@ import {
|
|
|
15866
16170
|
HttpError as HttpError7,
|
|
15867
16171
|
IBizContext as IBizContext3,
|
|
15868
16172
|
Namespace,
|
|
15869
|
-
RuntimeError as
|
|
16173
|
+
RuntimeError as RuntimeError35
|
|
15870
16174
|
} from "@ibiz-template/core";
|
|
15871
16175
|
import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ramda";
|
|
15872
16176
|
|
|
@@ -15874,7 +16178,7 @@ import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ra
|
|
|
15874
16178
|
import { NOOP } from "@ibiz-template/core";
|
|
15875
16179
|
|
|
15876
16180
|
// src/controller/utils/counter/counter.ts
|
|
15877
|
-
import { RuntimeError as
|
|
16181
|
+
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
15878
16182
|
var Counter = class {
|
|
15879
16183
|
/**
|
|
15880
16184
|
* Creates an instance of Counter.
|
|
@@ -15936,7 +16240,7 @@ var Counter = class {
|
|
|
15936
16240
|
return;
|
|
15937
16241
|
}
|
|
15938
16242
|
if (this.count === 0) {
|
|
15939
|
-
throw new
|
|
16243
|
+
throw new RuntimeError29(
|
|
15940
16244
|
ibiz.i18n.t("runtime.controller.utils.counter.decrement")
|
|
15941
16245
|
);
|
|
15942
16246
|
}
|
|
@@ -16545,7 +16849,7 @@ function getOriginData(data) {
|
|
|
16545
16849
|
}
|
|
16546
16850
|
|
|
16547
16851
|
// src/controller/utils/value-rule/value-rule.ts
|
|
16548
|
-
import { RuntimeError as
|
|
16852
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
16549
16853
|
import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
|
|
16550
16854
|
import { isNil as isNil18 } from "ramda";
|
|
16551
16855
|
function generateRules(itemVRs, name, valueItemName) {
|
|
@@ -16595,7 +16899,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
16595
16899
|
deRule.groupCond
|
|
16596
16900
|
);
|
|
16597
16901
|
if (!isPast) {
|
|
16598
|
-
callback(new
|
|
16902
|
+
callback(new RuntimeError30(infoMessage || deRule.ruleInfo));
|
|
16599
16903
|
}
|
|
16600
16904
|
return true;
|
|
16601
16905
|
},
|
|
@@ -16668,7 +16972,7 @@ function generateEditorRules(editor) {
|
|
|
16668
16972
|
}
|
|
16669
16973
|
|
|
16670
16974
|
// src/controller/utils/value-ex/value-ex.ts
|
|
16671
|
-
import { RuntimeError as
|
|
16975
|
+
import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
16672
16976
|
import { isNil as isNil19, mergeLeft } from "ramda";
|
|
16673
16977
|
var ValueExUtil = class {
|
|
16674
16978
|
/**
|
|
@@ -16700,7 +17004,7 @@ var ValueExUtil = class {
|
|
|
16700
17004
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
16701
17005
|
if (["OBJECTS", "OBJECT"].includes(valueType)) {
|
|
16702
17006
|
if (!objectNameField) {
|
|
16703
|
-
throw new
|
|
17007
|
+
throw new RuntimeError31(
|
|
16704
17008
|
ibiz.i18n.t("runtime.controller.utils.valueEx.objectNameField")
|
|
16705
17009
|
);
|
|
16706
17010
|
}
|
|
@@ -16718,7 +17022,7 @@ var ValueExUtil = class {
|
|
|
16718
17022
|
};
|
|
16719
17023
|
|
|
16720
17024
|
// src/controller/utils/value-default/value-default.ts
|
|
16721
|
-
import { RuntimeError as
|
|
17025
|
+
import { RuntimeError as RuntimeError32, ModelError as ModelError17 } from "@ibiz-template/core";
|
|
16722
17026
|
import dayjs from "dayjs";
|
|
16723
17027
|
import { createUUID as createUUID8 } from "qx-util";
|
|
16724
17028
|
import { isNil as isNil20, isNotNil } from "ramda";
|
|
@@ -16759,7 +17063,7 @@ function getDefaultValue(opts, origins) {
|
|
|
16759
17063
|
case "SESSION":
|
|
16760
17064
|
case "APPLICATION":
|
|
16761
17065
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
16762
|
-
throw new
|
|
17066
|
+
throw new RuntimeError32(
|
|
16763
17067
|
ibiz.i18n.t("runtime.controller.utils.valueDefault.noExist")
|
|
16764
17068
|
);
|
|
16765
17069
|
}
|
|
@@ -16780,7 +17084,7 @@ function getDefaultValue(opts, origins) {
|
|
|
16780
17084
|
|
|
16781
17085
|
// src/controller/utils/data-file-util/data-file-util.ts
|
|
16782
17086
|
import {
|
|
16783
|
-
RuntimeError as
|
|
17087
|
+
RuntimeError as RuntimeError33,
|
|
16784
17088
|
selectFile
|
|
16785
17089
|
} from "@ibiz-template/core";
|
|
16786
17090
|
import { mergeRight as mergeRight2 } from "ramda";
|
|
@@ -16885,13 +17189,13 @@ async function importData2(opts) {
|
|
|
16885
17189
|
}
|
|
16886
17190
|
async function exportData(header, data, fileName) {
|
|
16887
17191
|
if (!ibiz.util.getExcelUtil) {
|
|
16888
|
-
throw new
|
|
17192
|
+
throw new RuntimeError33(
|
|
16889
17193
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.noExist")
|
|
16890
17194
|
);
|
|
16891
17195
|
}
|
|
16892
17196
|
const exportExcel = await ibiz.util.getExcelUtil();
|
|
16893
17197
|
if (!exportExcel) {
|
|
16894
|
-
throw new
|
|
17198
|
+
throw new RuntimeError33(
|
|
16895
17199
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.loadError")
|
|
16896
17200
|
);
|
|
16897
17201
|
}
|
|
@@ -16921,7 +17225,7 @@ async function getDataImportModels(opts) {
|
|
|
16921
17225
|
(item) => item.id === opts.deDataImportId
|
|
16922
17226
|
);
|
|
16923
17227
|
if (!deDataImport) {
|
|
16924
|
-
throw new
|
|
17228
|
+
throw new RuntimeError33(
|
|
16925
17229
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.importData")
|
|
16926
17230
|
);
|
|
16927
17231
|
}
|
|
@@ -17118,7 +17422,7 @@ async function getEntitySchema(entityId, context) {
|
|
|
17118
17422
|
}
|
|
17119
17423
|
|
|
17120
17424
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
17121
|
-
import { RuntimeError as
|
|
17425
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
17122
17426
|
import { isNil as isNil21, mergeRight as mergeRight3 } from "ramda";
|
|
17123
17427
|
var VIEW_MSG_PREFIX = "VIEW_MSG";
|
|
17124
17428
|
var ViewMsgController = class _ViewMsgController {
|
|
@@ -17153,7 +17457,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
17153
17457
|
(item) => item.id === this.msgGroupId
|
|
17154
17458
|
);
|
|
17155
17459
|
if (!msgGroup) {
|
|
17156
|
-
throw new
|
|
17460
|
+
throw new RuntimeError34(
|
|
17157
17461
|
ibiz.i18n.t("runtime.controller.utils.viewMsg.message", {
|
|
17158
17462
|
msgGroupId: this.msgGroupId
|
|
17159
17463
|
})
|
|
@@ -17171,7 +17475,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
17171
17475
|
}
|
|
17172
17476
|
});
|
|
17173
17477
|
if (msgDetailsViewMsgIds.length) {
|
|
17174
|
-
throw new
|
|
17478
|
+
throw new RuntimeError34(
|
|
17175
17479
|
ibiz.i18n.t("runtime.controller.utils.viewMsg.noFound", {
|
|
17176
17480
|
message: msgDetailsViewMsgIds.join(",")
|
|
17177
17481
|
})
|
|
@@ -18059,7 +18363,7 @@ var ViewController = class extends BaseController {
|
|
|
18059
18363
|
async callUIAction(key, args) {
|
|
18060
18364
|
const result = this.call(key, args);
|
|
18061
18365
|
if (result === void 0) {
|
|
18062
|
-
throw new
|
|
18366
|
+
throw new RuntimeError35(
|
|
18063
18367
|
ibiz.i18n.t("runtime.controller.common.view.noSupportBehavior", {
|
|
18064
18368
|
key
|
|
18065
18369
|
})
|
|
@@ -18548,9 +18852,9 @@ import {
|
|
|
18548
18852
|
IBizContext as IBizContext4,
|
|
18549
18853
|
IBizParams,
|
|
18550
18854
|
NoticeError as NoticeError2,
|
|
18551
|
-
RuntimeError as
|
|
18855
|
+
RuntimeError as RuntimeError36
|
|
18552
18856
|
} from "@ibiz-template/core";
|
|
18553
|
-
import { clone as
|
|
18857
|
+
import { clone as clone20, isNil as isNil23 } from "ramda";
|
|
18554
18858
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
18555
18859
|
var ControlController = class extends BaseController {
|
|
18556
18860
|
/**
|
|
@@ -18614,7 +18918,7 @@ var ControlController = class extends BaseController {
|
|
|
18614
18918
|
"".concat(model.controlType, "_DEFAULT")
|
|
18615
18919
|
);
|
|
18616
18920
|
if (panelModel) {
|
|
18617
|
-
this.controlPanel =
|
|
18921
|
+
this.controlPanel = clone20(panelModel);
|
|
18618
18922
|
}
|
|
18619
18923
|
}
|
|
18620
18924
|
this.updateContextParams({});
|
|
@@ -18975,7 +19279,7 @@ var ControlController = class extends BaseController {
|
|
|
18975
19279
|
ibiz.mc.command.remove.send(msg, meta);
|
|
18976
19280
|
break;
|
|
18977
19281
|
default:
|
|
18978
|
-
throw new
|
|
19282
|
+
throw new RuntimeError36(
|
|
18979
19283
|
ibiz.i18n.t("runtime.controller.common.control.unsupportedType", {
|
|
18980
19284
|
type
|
|
18981
19285
|
})
|
|
@@ -19016,7 +19320,7 @@ var ControlController = class extends BaseController {
|
|
|
19016
19320
|
// src/controller/common/control/md-control.controller.ts
|
|
19017
19321
|
import {
|
|
19018
19322
|
isElementSame,
|
|
19019
|
-
RuntimeError as
|
|
19323
|
+
RuntimeError as RuntimeError37,
|
|
19020
19324
|
RuntimeModelError as RuntimeModelError26
|
|
19021
19325
|
} from "@ibiz-template/core";
|
|
19022
19326
|
import { isNil as isNil24 } from "ramda";
|
|
@@ -19289,7 +19593,7 @@ var MDControlController = class extends ControlController {
|
|
|
19289
19593
|
async remove(args) {
|
|
19290
19594
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
19291
19595
|
if (!(data == null ? void 0 : data.length)) {
|
|
19292
|
-
throw new
|
|
19596
|
+
throw new RuntimeError37(
|
|
19293
19597
|
ibiz.i18n.t("runtime.controller.common.control.uncheckedData")
|
|
19294
19598
|
);
|
|
19295
19599
|
}
|
|
@@ -19526,7 +19830,7 @@ var MDControlController = class extends ControlController {
|
|
|
19526
19830
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
19527
19831
|
import {
|
|
19528
19832
|
findRecursiveChild,
|
|
19529
|
-
RuntimeError as
|
|
19833
|
+
RuntimeError as RuntimeError38,
|
|
19530
19834
|
RuntimeModelError as RuntimeModelError27
|
|
19531
19835
|
} from "@ibiz-template/core";
|
|
19532
19836
|
|
|
@@ -19782,7 +20086,7 @@ var AppMenuController = class extends ControlController {
|
|
|
19782
20086
|
childrenFields: ["appMenuItems"]
|
|
19783
20087
|
});
|
|
19784
20088
|
if (!menuItem) {
|
|
19785
|
-
throw new
|
|
20089
|
+
throw new RuntimeError38(
|
|
19786
20090
|
ibiz.i18n.t("runtime.controller.control.menu.noFindMenu", { id })
|
|
19787
20091
|
);
|
|
19788
20092
|
}
|
|
@@ -19917,7 +20221,7 @@ var AppMenuController = class extends ControlController {
|
|
|
19917
20221
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
19918
20222
|
import {
|
|
19919
20223
|
findRecursiveChild as findRecursiveChild2,
|
|
19920
|
-
RuntimeError as
|
|
20224
|
+
RuntimeError as RuntimeError39,
|
|
19921
20225
|
RuntimeModelError as RuntimeModelError28
|
|
19922
20226
|
} from "@ibiz-template/core";
|
|
19923
20227
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -19927,7 +20231,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
19927
20231
|
childrenFields: ["appMenuItems"]
|
|
19928
20232
|
});
|
|
19929
20233
|
if (!menuItem) {
|
|
19930
|
-
throw new
|
|
20234
|
+
throw new RuntimeError39(
|
|
19931
20235
|
ibiz.i18n.t("runtime.controller.control.menu.noFindMenu", { id })
|
|
19932
20236
|
);
|
|
19933
20237
|
}
|
|
@@ -19958,11 +20262,11 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
19958
20262
|
|
|
19959
20263
|
// src/controller/control/calendar/calendar.controller.ts
|
|
19960
20264
|
import dayjs3 from "dayjs";
|
|
19961
|
-
import { RuntimeError as
|
|
20265
|
+
import { RuntimeError as RuntimeError41, RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
19962
20266
|
|
|
19963
20267
|
// src/controller/control/calendar/calendar.service.ts
|
|
19964
|
-
import { RuntimeError as
|
|
19965
|
-
import { clone as
|
|
20268
|
+
import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
|
|
20269
|
+
import { clone as clone21 } from "ramda";
|
|
19966
20270
|
var CalendarService = class extends MDControlService {
|
|
19967
20271
|
/**
|
|
19968
20272
|
* 执行查询多条数据的方法
|
|
@@ -20017,13 +20321,13 @@ var CalendarService = class extends MDControlService {
|
|
|
20017
20321
|
setCalendarConfigData(items, index) {
|
|
20018
20322
|
const { sysCalendarItems } = this.model;
|
|
20019
20323
|
if (!sysCalendarItems) {
|
|
20020
|
-
throw new
|
|
20324
|
+
throw new RuntimeError40(
|
|
20021
20325
|
ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
|
|
20022
20326
|
);
|
|
20023
20327
|
}
|
|
20024
20328
|
const calendarItem = sysCalendarItems[index];
|
|
20025
20329
|
if (!calendarItem) {
|
|
20026
|
-
throw new
|
|
20330
|
+
throw new RuntimeError40(
|
|
20027
20331
|
ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
|
|
20028
20332
|
);
|
|
20029
20333
|
}
|
|
@@ -20064,7 +20368,7 @@ var CalendarService = class extends MDControlService {
|
|
|
20064
20368
|
* @memberof CalendarService
|
|
20065
20369
|
*/
|
|
20066
20370
|
handleRequestParams(item, params) {
|
|
20067
|
-
const tempParams =
|
|
20371
|
+
const tempParams = clone21(params);
|
|
20068
20372
|
const { srfstartdate, srfenddate } = tempParams;
|
|
20069
20373
|
Object.assign(tempParams, {
|
|
20070
20374
|
["n_".concat(item.beginTimeAppDEFieldId, "_gtandeq")]: srfstartdate,
|
|
@@ -20120,7 +20424,7 @@ var CalendarController = class extends MDControlController {
|
|
|
20120
20424
|
initCalendarLegends() {
|
|
20121
20425
|
const { sysCalendarItems } = this.model;
|
|
20122
20426
|
if (!sysCalendarItems) {
|
|
20123
|
-
throw new
|
|
20427
|
+
throw new RuntimeError41(
|
|
20124
20428
|
ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
|
|
20125
20429
|
);
|
|
20126
20430
|
}
|
|
@@ -20437,12 +20741,12 @@ var CalendarController = class extends MDControlController {
|
|
|
20437
20741
|
};
|
|
20438
20742
|
|
|
20439
20743
|
// src/controller/control/chart/chart.controller.ts
|
|
20440
|
-
import { RuntimeError as
|
|
20744
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
20441
20745
|
|
|
20442
20746
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
20443
|
-
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
20747
|
+
import { clone as clone24, mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
20444
20748
|
import { isObject as isObject2, isString as isString2 } from "qx-util";
|
|
20445
|
-
import { RuntimeError as
|
|
20749
|
+
import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
|
|
20446
20750
|
|
|
20447
20751
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
20448
20752
|
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
@@ -20455,7 +20759,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
20455
20759
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
20456
20760
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
20457
20761
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
20458
|
-
import { clone as
|
|
20762
|
+
import { clone as clone22, isNil as isNil25, mergeDeepRight } from "ramda";
|
|
20459
20763
|
dayjs4.extend(minMax2);
|
|
20460
20764
|
dayjs4.extend(isSameOrBefore);
|
|
20461
20765
|
dayjs4.extend(quarterOfYear);
|
|
@@ -20600,6 +20904,23 @@ var BaseSeriesGenerator = class {
|
|
|
20600
20904
|
}
|
|
20601
20905
|
return isExclude ? void 0 : val;
|
|
20602
20906
|
}
|
|
20907
|
+
/**
|
|
20908
|
+
* 获取序列颜色
|
|
20909
|
+
*
|
|
20910
|
+
* @param {string} group
|
|
20911
|
+
* @return {*} {string}
|
|
20912
|
+
* @memberof BaseSeriesGenerator
|
|
20913
|
+
*/
|
|
20914
|
+
getSeriesColor(group) {
|
|
20915
|
+
let color = "";
|
|
20916
|
+
const maps = this.chartGenerator.codeListMap.values();
|
|
20917
|
+
const codeListItems = [...maps].flat();
|
|
20918
|
+
const item = codeListItems.find((x) => x.text === group);
|
|
20919
|
+
if (item) {
|
|
20920
|
+
color = item.color || "";
|
|
20921
|
+
}
|
|
20922
|
+
return color;
|
|
20923
|
+
}
|
|
20603
20924
|
/**
|
|
20604
20925
|
* 准备图表数据
|
|
20605
20926
|
* @return {*}
|
|
@@ -20689,7 +21010,7 @@ var BaseSeriesGenerator = class {
|
|
|
20689
21010
|
const { codelistId } = catalog2;
|
|
20690
21011
|
if (codelistId && this.autoCompleteCategory) {
|
|
20691
21012
|
const codeListItems = this.chartGenerator.codeListMap.get(codelistId);
|
|
20692
|
-
tempCodeLists.push(
|
|
21013
|
+
tempCodeLists.push(clone22(codeListItems));
|
|
20693
21014
|
}
|
|
20694
21015
|
});
|
|
20695
21016
|
for (let i = 0; i < tempCodeLists.length; i++) {
|
|
@@ -20792,6 +21113,10 @@ var BaseSeriesGenerator = class {
|
|
|
20792
21113
|
if (group !== DEFAULT_GROUP) {
|
|
20793
21114
|
options.name = group;
|
|
20794
21115
|
}
|
|
21116
|
+
const color = this.getSeriesColor(group);
|
|
21117
|
+
if (color) {
|
|
21118
|
+
options.color = color;
|
|
21119
|
+
}
|
|
20795
21120
|
if (this.seriesUserParam) {
|
|
20796
21121
|
options = mergeDeepRight(options, this.seriesUserParam);
|
|
20797
21122
|
}
|
|
@@ -20855,7 +21180,7 @@ var BaseSeriesGenerator = class {
|
|
|
20855
21180
|
dataPreprocess(data) {
|
|
20856
21181
|
const tempData = [];
|
|
20857
21182
|
data.forEach((singleData) => {
|
|
20858
|
-
tempData.push(
|
|
21183
|
+
tempData.push(clone22(singleData));
|
|
20859
21184
|
});
|
|
20860
21185
|
const { groupMode } = this.model;
|
|
20861
21186
|
if (groupMode) {
|
|
@@ -21163,7 +21488,7 @@ var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
21163
21488
|
};
|
|
21164
21489
|
|
|
21165
21490
|
// src/controller/control/chart/generator/radar-series-generator.ts
|
|
21166
|
-
import { mergeDeepRight as mergeDeepRight2 } from "ramda";
|
|
21491
|
+
import { clone as clone23, mergeDeepRight as mergeDeepRight2 } from "ramda";
|
|
21167
21492
|
|
|
21168
21493
|
// src/controller/control/chart/generator/radar-coord-system.ts
|
|
21169
21494
|
var RadarCoordSystem = class {
|
|
@@ -21238,7 +21563,10 @@ var RadarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
21238
21563
|
* @param {IData[]} data
|
|
21239
21564
|
*/
|
|
21240
21565
|
calcRadarCoordSystem(data) {
|
|
21241
|
-
const
|
|
21566
|
+
const tempItems = data.map((item) => {
|
|
21567
|
+
return clone23(item);
|
|
21568
|
+
});
|
|
21569
|
+
const groupData = this.calcGroupData(tempItems);
|
|
21242
21570
|
if (!this.chartGenerator.radarMap.has(this.catalogField)) {
|
|
21243
21571
|
this.chartGenerator.radarMap.set(
|
|
21244
21572
|
this.catalogField,
|
|
@@ -21498,6 +21826,112 @@ var ChartOptionsGenerator2 = class {
|
|
|
21498
21826
|
});
|
|
21499
21827
|
return AxisOption;
|
|
21500
21828
|
}
|
|
21829
|
+
/**
|
|
21830
|
+
* 处理轴布局位置
|
|
21831
|
+
*
|
|
21832
|
+
* @param {CodeListItem[]} items
|
|
21833
|
+
* @param {number} padding
|
|
21834
|
+
* @param {number} total
|
|
21835
|
+
* @param {number} index
|
|
21836
|
+
* @param {boolean} isRow 是否横向
|
|
21837
|
+
* @return {*}
|
|
21838
|
+
* @memberof ChartOptionsGenerator
|
|
21839
|
+
*/
|
|
21840
|
+
handleAxisLayout(items, padding, total, index, isRow = true) {
|
|
21841
|
+
const axisData = items.map((code) => {
|
|
21842
|
+
if (isRow) {
|
|
21843
|
+
return {
|
|
21844
|
+
value: code.text,
|
|
21845
|
+
textStyle: {
|
|
21846
|
+
padding: [0, padding * (total - 1 - index), 0, 0]
|
|
21847
|
+
}
|
|
21848
|
+
};
|
|
21849
|
+
}
|
|
21850
|
+
return {
|
|
21851
|
+
value: code.text,
|
|
21852
|
+
textStyle: {
|
|
21853
|
+
padding: [padding * (total - 1 - index), 0, 0, 0]
|
|
21854
|
+
}
|
|
21855
|
+
};
|
|
21856
|
+
});
|
|
21857
|
+
return axisData;
|
|
21858
|
+
}
|
|
21859
|
+
/**
|
|
21860
|
+
* 处理轴层级
|
|
21861
|
+
*
|
|
21862
|
+
* @param {IData[]} tempaxis
|
|
21863
|
+
* @param {number} index
|
|
21864
|
+
* @param {IData[]} axisData
|
|
21865
|
+
* @return {*}
|
|
21866
|
+
* @memberof ChartOptionsGenerator
|
|
21867
|
+
*/
|
|
21868
|
+
handleAxisLevel(tempaxis, index, axisData) {
|
|
21869
|
+
const tempAxisData = [];
|
|
21870
|
+
if (index === 0) {
|
|
21871
|
+
return axisData;
|
|
21872
|
+
}
|
|
21873
|
+
let length = 1;
|
|
21874
|
+
for (let i = 0; i < tempaxis.length; i++) {
|
|
21875
|
+
length *= tempaxis[i].data.length;
|
|
21876
|
+
}
|
|
21877
|
+
for (let i = 0; i < length; i++) {
|
|
21878
|
+
tempAxisData.push(...axisData);
|
|
21879
|
+
}
|
|
21880
|
+
return tempAxisData;
|
|
21881
|
+
}
|
|
21882
|
+
/**
|
|
21883
|
+
* 合并轴参数
|
|
21884
|
+
*
|
|
21885
|
+
* @param {(IData[] | IData)} axisData
|
|
21886
|
+
* @param {IData[]} tempAxis
|
|
21887
|
+
* @return {*}
|
|
21888
|
+
* @memberof ChartOptionsGenerator
|
|
21889
|
+
*/
|
|
21890
|
+
mergeAxisData(axisData, tempAxis) {
|
|
21891
|
+
if (axisData && Array.isArray(axisData)) {
|
|
21892
|
+
return [...axisData, ...tempAxis];
|
|
21893
|
+
}
|
|
21894
|
+
return [axisData, ...tempAxis];
|
|
21895
|
+
}
|
|
21896
|
+
/**
|
|
21897
|
+
* 处理分区模式下序列模型的坐标轴位置
|
|
21898
|
+
*
|
|
21899
|
+
* @param {IData[]} seriesModel
|
|
21900
|
+
* @param {IData} opts
|
|
21901
|
+
* @memberof ChartOptionsGenerator
|
|
21902
|
+
*/
|
|
21903
|
+
handleSeriesModelCoordinateAxis(seriesModel, opts) {
|
|
21904
|
+
const { xAxisParam, yAxisParam } = opts;
|
|
21905
|
+
const xaxis = [];
|
|
21906
|
+
const yaxis = [];
|
|
21907
|
+
for (let i = 0; i < seriesModel.length; i++) {
|
|
21908
|
+
const tempXAxis = clone24(xAxisParam);
|
|
21909
|
+
const tempYAxis = clone24(yAxisParam);
|
|
21910
|
+
Object.assign(tempXAxis, { gridIndex: i });
|
|
21911
|
+
Object.assign(tempYAxis, { gridIndex: i });
|
|
21912
|
+
tempYAxis.axisLabel.formatter = function(_param) {
|
|
21913
|
+
if (_param === 0) {
|
|
21914
|
+
return "{top|".concat(_param, "}");
|
|
21915
|
+
}
|
|
21916
|
+
return "{bottom|".concat(_param, "}");
|
|
21917
|
+
};
|
|
21918
|
+
if (i !== seriesModel.length - 1) {
|
|
21919
|
+
tempXAxis.name = "";
|
|
21920
|
+
tempXAxis.axisLine.show = false;
|
|
21921
|
+
tempXAxis.axisLabel.show = false;
|
|
21922
|
+
tempXAxis.axisTick.show = false;
|
|
21923
|
+
}
|
|
21924
|
+
if (tempYAxis.showTitle) {
|
|
21925
|
+
Object.assign(tempYAxis, {
|
|
21926
|
+
name: seriesModel[i].serieText
|
|
21927
|
+
});
|
|
21928
|
+
}
|
|
21929
|
+
xaxis.push(tempXAxis);
|
|
21930
|
+
yaxis.push(tempYAxis);
|
|
21931
|
+
}
|
|
21932
|
+
this.chartUserParam.xAxis = xaxis;
|
|
21933
|
+
this.chartUserParam.yAxis = yaxis;
|
|
21934
|
+
}
|
|
21501
21935
|
/**
|
|
21502
21936
|
* 初始化多分类的X轴配置
|
|
21503
21937
|
*
|
|
@@ -21505,9 +21939,32 @@ var ChartOptionsGenerator2 = class {
|
|
|
21505
21939
|
* @memberof ChartOptionsGenerator
|
|
21506
21940
|
*/
|
|
21507
21941
|
async initMultiCatalogxAxis(context, params) {
|
|
21508
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i
|
|
21942
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
21509
21943
|
const { controlParam } = this.model;
|
|
21510
|
-
if (controlParam && ((_a = controlParam.ctrlParams) == null ? void 0 : _a.
|
|
21944
|
+
if (controlParam && ((_a = controlParam.ctrlParams) == null ? void 0 : _a.ZONE)) {
|
|
21945
|
+
const length = (_b = this.model.dechartSerieses) == null ? void 0 : _b.length;
|
|
21946
|
+
if (length) {
|
|
21947
|
+
const height = 90 / length;
|
|
21948
|
+
const items = [];
|
|
21949
|
+
for (let i = 0; i < length; i++) {
|
|
21950
|
+
const top = i * height + 5;
|
|
21951
|
+
const bottom = 100 - (height + top);
|
|
21952
|
+
items.push({
|
|
21953
|
+
top: "".concat(top, "%"),
|
|
21954
|
+
bottom: "".concat(bottom, "%"),
|
|
21955
|
+
containLabel: true
|
|
21956
|
+
});
|
|
21957
|
+
}
|
|
21958
|
+
if (this.chartUserParam) {
|
|
21959
|
+
this.chartUserParam.grid = items;
|
|
21960
|
+
this.handleSeriesModelCoordinateAxis(this.model.dechartSerieses, {
|
|
21961
|
+
xAxisParam: ((_c = this.chartUserParam) == null ? void 0 : _c.xAxis) || {},
|
|
21962
|
+
yAxisParam: ((_d = this.chartUserParam) == null ? void 0 : _d.yAxis) || {}
|
|
21963
|
+
});
|
|
21964
|
+
}
|
|
21965
|
+
}
|
|
21966
|
+
}
|
|
21967
|
+
if (controlParam && ((_e = controlParam.ctrlParams) == null ? void 0 : _e.CATALOGFIELDS)) {
|
|
21511
21968
|
try {
|
|
21512
21969
|
const tempCatalogFields = JSON.parse(
|
|
21513
21970
|
controlParam.ctrlParams.CATALOGFIELDS
|
|
@@ -21518,23 +21975,22 @@ var ChartOptionsGenerator2 = class {
|
|
|
21518
21975
|
let gridIndex = 0;
|
|
21519
21976
|
if (Array.isArray(tempCatalogFields)) {
|
|
21520
21977
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
21521
|
-
if (this.chartUserParam
|
|
21522
|
-
|
|
21978
|
+
if (this.chartUserParam) {
|
|
21979
|
+
let tempconfig = {};
|
|
21980
|
+
if (((_f = controlParam.ctrlParams) == null ? void 0 : _f.MODE) === "ROW") {
|
|
21523
21981
|
if (Array.isArray(this.chartUserParam.yAxis)) {
|
|
21524
|
-
|
|
21525
|
-
titleshow = tempconfig.name === void 0 ? true : !!tempconfig.name;
|
|
21526
|
-
labelshow = ((_c = tempconfig.axisLabel) == null ? void 0 : _c.show) === void 0 ? true : (_d = tempconfig.axisLabel) == null ? void 0 : _d.show;
|
|
21982
|
+
tempconfig = this.chartUserParam.yAxis[this.chartUserParam.yAxis.length - 1];
|
|
21527
21983
|
} else {
|
|
21528
|
-
|
|
21529
|
-
labelshow = ((_g = (_f = this.chartUserParam.yAxis) == null ? void 0 : _f.axisLabel) == null ? void 0 : _g.show) === void 0 ? true : (_h = this.chartUserParam.yAxis.axisLabel) == null ? void 0 : _h.show;
|
|
21984
|
+
tempconfig = this.chartUserParam.yAxis;
|
|
21530
21985
|
}
|
|
21531
21986
|
} else if (Array.isArray(this.chartUserParam.xAxis)) {
|
|
21532
|
-
|
|
21533
|
-
titleshow = tempconfig.name === void 0 ? true : !!tempconfig.name;
|
|
21534
|
-
labelshow = ((_i = tempconfig.axisLabel) == null ? void 0 : _i.show) === void 0 ? true : (_j = tempconfig.axisLabel) == null ? void 0 : _j.show;
|
|
21987
|
+
tempconfig = this.chartUserParam.xAxis[this.chartUserParam.xAxis.length - 1];
|
|
21535
21988
|
} else {
|
|
21536
|
-
|
|
21537
|
-
|
|
21989
|
+
tempconfig = this.chartUserParam.xAxis;
|
|
21990
|
+
}
|
|
21991
|
+
if (tempconfig) {
|
|
21992
|
+
titleshow = tempconfig.name === void 0 ? true : !!tempconfig.name;
|
|
21993
|
+
labelshow = ((_g = tempconfig.axisLabel) == null ? void 0 : _g.show) === void 0 ? true : (_h = tempconfig.axisLabel) == null ? void 0 : _h.show;
|
|
21538
21994
|
}
|
|
21539
21995
|
}
|
|
21540
21996
|
if (this.chartUserParam && this.chartUserParam.grid && Array.isArray(this.chartUserParam.grid)) {
|
|
@@ -21550,78 +22006,45 @@ var ChartOptionsGenerator2 = class {
|
|
|
21550
22006
|
params
|
|
21551
22007
|
);
|
|
21552
22008
|
if (codeListItems) {
|
|
21553
|
-
const tempxAxisData = [];
|
|
21554
22009
|
if (((_a2 = controlParam.ctrlParams) == null ? void 0 : _a2.MODE) === "ROW") {
|
|
21555
|
-
const yAxisData =
|
|
21556
|
-
|
|
21557
|
-
|
|
21558
|
-
|
|
21559
|
-
|
|
21560
|
-
|
|
21561
|
-
|
|
21562
|
-
|
|
21563
|
-
|
|
21564
|
-
|
|
21565
|
-
|
|
21566
|
-
|
|
22010
|
+
const yAxisData = this.handleAxisLayout(
|
|
22011
|
+
codeListItems,
|
|
22012
|
+
40,
|
|
22013
|
+
tempCatalogFields.length,
|
|
22014
|
+
index
|
|
22015
|
+
);
|
|
22016
|
+
const tempxAxisData = this.handleAxisLevel(
|
|
22017
|
+
tempaxis,
|
|
22018
|
+
index,
|
|
22019
|
+
yAxisData
|
|
22020
|
+
);
|
|
22021
|
+
tempaxis.push({
|
|
22022
|
+
show: labelshow,
|
|
22023
|
+
gridIndex,
|
|
22024
|
+
type: "category",
|
|
22025
|
+
data: tempxAxisData,
|
|
22026
|
+
position: "left"
|
|
21567
22027
|
});
|
|
21568
|
-
if (index === 0) {
|
|
21569
|
-
tempaxis.push({
|
|
21570
|
-
show: labelshow,
|
|
21571
|
-
gridIndex,
|
|
21572
|
-
type: "category",
|
|
21573
|
-
data: yAxisData,
|
|
21574
|
-
position: "left"
|
|
21575
|
-
});
|
|
21576
|
-
} else {
|
|
21577
|
-
let length = 1;
|
|
21578
|
-
for (let i = 0; i < tempaxis.length; i++) {
|
|
21579
|
-
length *= tempaxis[i].data.length;
|
|
21580
|
-
}
|
|
21581
|
-
for (let i = 0; i < length; i++) {
|
|
21582
|
-
tempxAxisData.push(...yAxisData);
|
|
21583
|
-
}
|
|
21584
|
-
tempaxis.push({
|
|
21585
|
-
show: labelshow,
|
|
21586
|
-
gridIndex,
|
|
21587
|
-
type: "category",
|
|
21588
|
-
data: tempxAxisData,
|
|
21589
|
-
position: "left"
|
|
21590
|
-
});
|
|
21591
|
-
}
|
|
21592
22028
|
} else {
|
|
21593
|
-
const xAxisData =
|
|
21594
|
-
|
|
21595
|
-
|
|
21596
|
-
|
|
21597
|
-
|
|
21598
|
-
|
|
21599
|
-
|
|
22029
|
+
const xAxisData = this.handleAxisLayout(
|
|
22030
|
+
codeListItems,
|
|
22031
|
+
24,
|
|
22032
|
+
tempCatalogFields.length,
|
|
22033
|
+
index,
|
|
22034
|
+
false
|
|
22035
|
+
);
|
|
22036
|
+
const tempxAxisData = this.handleAxisLevel(
|
|
22037
|
+
tempaxis,
|
|
22038
|
+
index,
|
|
22039
|
+
xAxisData
|
|
22040
|
+
);
|
|
22041
|
+
tempaxis.push({
|
|
22042
|
+
show: labelshow,
|
|
22043
|
+
gridIndex,
|
|
22044
|
+
type: "category",
|
|
22045
|
+
data: tempxAxisData,
|
|
22046
|
+
position: "bottom"
|
|
21600
22047
|
});
|
|
21601
|
-
if (index === 0) {
|
|
21602
|
-
tempaxis.push({
|
|
21603
|
-
show: labelshow,
|
|
21604
|
-
gridIndex,
|
|
21605
|
-
type: "category",
|
|
21606
|
-
data: xAxisData,
|
|
21607
|
-
position: "bottom"
|
|
21608
|
-
});
|
|
21609
|
-
} else {
|
|
21610
|
-
let length = 1;
|
|
21611
|
-
for (let i = 0; i < tempaxis.length; i++) {
|
|
21612
|
-
length *= tempaxis[i].data.length;
|
|
21613
|
-
}
|
|
21614
|
-
for (let i = 0; i < length; i++) {
|
|
21615
|
-
tempxAxisData.push(...xAxisData);
|
|
21616
|
-
}
|
|
21617
|
-
tempaxis.push({
|
|
21618
|
-
show: labelshow,
|
|
21619
|
-
gridIndex,
|
|
21620
|
-
type: "category",
|
|
21621
|
-
data: tempxAxisData,
|
|
21622
|
-
position: "bottom"
|
|
21623
|
-
});
|
|
21624
|
-
}
|
|
21625
22048
|
}
|
|
21626
22049
|
}
|
|
21627
22050
|
}
|
|
@@ -21629,42 +22052,26 @@ var ChartOptionsGenerator2 = class {
|
|
|
21629
22052
|
);
|
|
21630
22053
|
const mergeName = tempCatalogFields.map((catalog) => {
|
|
21631
22054
|
return catalog.name;
|
|
21632
|
-
}).join("/")
|
|
21633
|
-
|
|
21634
|
-
|
|
21635
|
-
|
|
21636
|
-
|
|
21637
|
-
|
|
21638
|
-
|
|
21639
|
-
{
|
|
21640
|
-
value: mergeName,
|
|
21641
|
-
textStyle: {
|
|
21642
|
-
lineHeight: labelshow ? 45 * tempCatalogFields.length : 45
|
|
21643
|
-
}
|
|
21644
|
-
}
|
|
21645
|
-
],
|
|
21646
|
-
position: "bottom"
|
|
21647
|
-
});
|
|
22055
|
+
}).join("/");
|
|
22056
|
+
let catalogLength = tempCatalogFields.length;
|
|
22057
|
+
if (!labelshow) {
|
|
22058
|
+
catalogLength = 1;
|
|
22059
|
+
}
|
|
22060
|
+
if (!titleshow) {
|
|
22061
|
+
catalogLength -= 1;
|
|
21648
22062
|
}
|
|
21649
22063
|
if (this.chartUserParam) {
|
|
21650
|
-
if (
|
|
21651
|
-
|
|
21652
|
-
|
|
21653
|
-
|
|
21654
|
-
|
|
21655
|
-
if (!labelshow) {
|
|
21656
|
-
length = 1;
|
|
21657
|
-
}
|
|
21658
|
-
if (!titleshow) {
|
|
21659
|
-
length -= 1;
|
|
21660
|
-
}
|
|
21661
|
-
if (length === 0) {
|
|
22064
|
+
if (!this.chartUserParam.grid) {
|
|
22065
|
+
this.chartUserParam.grid = {};
|
|
22066
|
+
}
|
|
22067
|
+
if (((_i = controlParam.ctrlParams) == null ? void 0 : _i.MODE) === "ROW") {
|
|
22068
|
+
if (catalogLength === 0) {
|
|
21662
22069
|
Object.assign(this.chartUserParam.grid, {
|
|
21663
22070
|
bottom: 45
|
|
21664
22071
|
});
|
|
21665
22072
|
} else {
|
|
21666
22073
|
Object.assign(this.chartUserParam.grid, {
|
|
21667
|
-
left: (
|
|
22074
|
+
left: (catalogLength + 1) * 40
|
|
21668
22075
|
});
|
|
21669
22076
|
}
|
|
21670
22077
|
tempaxis.push({
|
|
@@ -21673,56 +22080,50 @@ var ChartOptionsGenerator2 = class {
|
|
|
21673
22080
|
show: titleshow,
|
|
21674
22081
|
data: [
|
|
21675
22082
|
{
|
|
21676
|
-
value: mergeName,
|
|
22083
|
+
value: mergeName.split("").join("\n"),
|
|
21677
22084
|
textStyle: {
|
|
21678
|
-
padding: [0,
|
|
22085
|
+
padding: [0, catalogLength * 40, 0, 0]
|
|
21679
22086
|
}
|
|
21680
22087
|
}
|
|
21681
22088
|
],
|
|
21682
22089
|
position: "left"
|
|
21683
22090
|
});
|
|
21684
|
-
if (this.chartUserParam.yAxis
|
|
21685
|
-
this.chartUserParam.yAxis =
|
|
21686
|
-
...this.chartUserParam.yAxis,
|
|
21687
|
-
...tempaxis
|
|
21688
|
-
];
|
|
21689
|
-
} else if (this.chartUserParam.yAxis) {
|
|
21690
|
-
this.chartUserParam.yAxis = [
|
|
22091
|
+
if (this.chartUserParam.yAxis) {
|
|
22092
|
+
this.chartUserParam.yAxis = this.mergeAxisData(
|
|
21691
22093
|
this.chartUserParam.yAxis,
|
|
21692
|
-
|
|
21693
|
-
|
|
22094
|
+
tempaxis
|
|
22095
|
+
);
|
|
21694
22096
|
}
|
|
21695
22097
|
} else {
|
|
21696
|
-
if (
|
|
21697
|
-
this.chartUserParam.xAxis = [
|
|
21698
|
-
...this.chartUserParam.xAxis,
|
|
21699
|
-
...tempaxis
|
|
21700
|
-
];
|
|
21701
|
-
} else if (this.chartUserParam.xAxis) {
|
|
21702
|
-
this.chartUserParam.xAxis = [
|
|
21703
|
-
this.chartUserParam.xAxis,
|
|
21704
|
-
...tempaxis
|
|
21705
|
-
];
|
|
21706
|
-
}
|
|
21707
|
-
if (!this.chartUserParam.grid) {
|
|
21708
|
-
this.chartUserParam.grid = {};
|
|
21709
|
-
}
|
|
21710
|
-
let { length } = tempCatalogFields;
|
|
21711
|
-
if (!labelshow) {
|
|
21712
|
-
length = 1;
|
|
21713
|
-
}
|
|
21714
|
-
if (!titleshow) {
|
|
21715
|
-
length -= 1;
|
|
21716
|
-
}
|
|
21717
|
-
if (length === 0) {
|
|
22098
|
+
if (catalogLength === 0) {
|
|
21718
22099
|
Object.assign(this.chartUserParam.grid, {
|
|
21719
|
-
bottom:
|
|
22100
|
+
bottom: 30
|
|
21720
22101
|
});
|
|
21721
22102
|
} else {
|
|
21722
22103
|
Object.assign(this.chartUserParam.grid, {
|
|
21723
|
-
bottom: (
|
|
22104
|
+
bottom: (catalogLength + 1) * 24
|
|
21724
22105
|
});
|
|
21725
22106
|
}
|
|
22107
|
+
tempaxis.push({
|
|
22108
|
+
type: "category",
|
|
22109
|
+
gridIndex,
|
|
22110
|
+
show: titleshow,
|
|
22111
|
+
data: [
|
|
22112
|
+
{
|
|
22113
|
+
value: mergeName,
|
|
22114
|
+
textStyle: {
|
|
22115
|
+
padding: [24 * catalogLength, 0, 0, 0]
|
|
22116
|
+
}
|
|
22117
|
+
}
|
|
22118
|
+
],
|
|
22119
|
+
position: "bottom"
|
|
22120
|
+
});
|
|
22121
|
+
if (this.chartUserParam.xAxis) {
|
|
22122
|
+
this.chartUserParam.xAxis = this.mergeAxisData(
|
|
22123
|
+
this.chartUserParam.xAxis,
|
|
22124
|
+
tempaxis
|
|
22125
|
+
);
|
|
22126
|
+
}
|
|
21726
22127
|
}
|
|
21727
22128
|
}
|
|
21728
22129
|
}
|
|
@@ -21872,7 +22273,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
21872
22273
|
getChartDataByParams(params) {
|
|
21873
22274
|
const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
|
|
21874
22275
|
if (!generator) {
|
|
21875
|
-
throw new
|
|
22276
|
+
throw new RuntimeError42(
|
|
21876
22277
|
ibiz.i18n.t("runtime.controller.control.chart.noFindSequence", {
|
|
21877
22278
|
seriesIndex: params.seriesIndex
|
|
21878
22279
|
})
|
|
@@ -21936,6 +22337,9 @@ var ChartService = class extends MDControlService {
|
|
|
21936
22337
|
|
|
21937
22338
|
// src/controller/control/chart/chart.controller.ts
|
|
21938
22339
|
var ChartController = class extends MDControlController {
|
|
22340
|
+
get _evt() {
|
|
22341
|
+
return this.evt;
|
|
22342
|
+
}
|
|
21939
22343
|
initState() {
|
|
21940
22344
|
super.initState();
|
|
21941
22345
|
this.state.size = 1e3;
|
|
@@ -22154,17 +22558,18 @@ var ChartController = class extends MDControlController {
|
|
|
22154
22558
|
* @author lxm
|
|
22155
22559
|
* @date 2023-06-07 10:03:48
|
|
22156
22560
|
*/
|
|
22157
|
-
updateChart() {
|
|
22561
|
+
async updateChart() {
|
|
22158
22562
|
if (!this.chart) {
|
|
22159
|
-
throw new
|
|
22563
|
+
throw new RuntimeError43(
|
|
22160
22564
|
ibiz.i18n.t("runtime.controller.control.chart.noInitialised")
|
|
22161
22565
|
);
|
|
22162
22566
|
}
|
|
22163
22567
|
if (!this.options) {
|
|
22164
|
-
throw new
|
|
22568
|
+
throw new RuntimeError43(
|
|
22165
22569
|
ibiz.i18n.t("runtime.controller.control.chart.noCalculated")
|
|
22166
22570
|
);
|
|
22167
22571
|
}
|
|
22572
|
+
await this._evt.emit("onBeforeUpdate", void 0);
|
|
22168
22573
|
this.chart.setOption(this.options, { notMerge: true });
|
|
22169
22574
|
this.resizeChart();
|
|
22170
22575
|
}
|
|
@@ -22213,7 +22618,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
22213
22618
|
};
|
|
22214
22619
|
|
|
22215
22620
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
22216
|
-
import { recursiveIterate as recursiveIterate2, RuntimeError as
|
|
22621
|
+
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
22217
22622
|
|
|
22218
22623
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
22219
22624
|
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
@@ -22223,7 +22628,7 @@ import { isArray as isArray8 } from "qx-util";
|
|
|
22223
22628
|
import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
22224
22629
|
|
|
22225
22630
|
// src/ui-logic/index.ts
|
|
22226
|
-
import { RuntimeError as
|
|
22631
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
22227
22632
|
|
|
22228
22633
|
// src/ui-logic/ui-logic.ts
|
|
22229
22634
|
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
@@ -22396,7 +22801,7 @@ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError34 }
|
|
|
22396
22801
|
|
|
22397
22802
|
// src/ui-logic/utils/handle-src-val.ts
|
|
22398
22803
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
22399
|
-
import { clone as
|
|
22804
|
+
import { clone as clone25 } from "ramda";
|
|
22400
22805
|
function handleSrcVal2(ctx, srcValParams) {
|
|
22401
22806
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
22402
22807
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -22423,7 +22828,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
22423
22828
|
value = ctx.parameters.context;
|
|
22424
22829
|
break;
|
|
22425
22830
|
case "ENVPARAM":
|
|
22426
|
-
value =
|
|
22831
|
+
value = clone25(ibiz.env);
|
|
22427
22832
|
break;
|
|
22428
22833
|
default:
|
|
22429
22834
|
throw new ModelError18(
|
|
@@ -22879,8 +23284,8 @@ var EndNode2 = class extends UILogicNode {
|
|
|
22879
23284
|
};
|
|
22880
23285
|
|
|
22881
23286
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
22882
|
-
import { ModelError as ModelError22, RuntimeError as
|
|
22883
|
-
import { clone as
|
|
23287
|
+
import { ModelError as ModelError22, RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
23288
|
+
import { clone as clone26 } from "ramda";
|
|
22884
23289
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
22885
23290
|
async exec(ctx) {
|
|
22886
23291
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -22890,7 +23295,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
22890
23295
|
for (const nodeParam of nodeParams) {
|
|
22891
23296
|
let originValue;
|
|
22892
23297
|
if (nodeParam.dstDEUILogicParamId && ibiz.env.logLevel === "DEBUG") {
|
|
22893
|
-
originValue =
|
|
23298
|
+
originValue = clone26(ctx.params[nodeParam.dstDEUILogicParamId]);
|
|
22894
23299
|
}
|
|
22895
23300
|
switch (nodeParam.paramAction) {
|
|
22896
23301
|
case "SETPARAMVALUE":
|
|
@@ -22945,7 +23350,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
22945
23350
|
setParamValue(nodeParam, ctx) {
|
|
22946
23351
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
22947
23352
|
if (!dstDEUILogicParamId) {
|
|
22948
|
-
throw new
|
|
23353
|
+
throw new RuntimeError44(ibiz.i18n.t("runtime.uiLogic.noTargetParameter"));
|
|
22949
23354
|
}
|
|
22950
23355
|
let dstField = dstFieldName;
|
|
22951
23356
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
@@ -22985,7 +23390,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
22985
23390
|
copyParam(nodeParam, ctx) {
|
|
22986
23391
|
const { dstDEUILogicParamId } = nodeParam;
|
|
22987
23392
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
22988
|
-
ctx.params[dstDEUILogicParamId] =
|
|
23393
|
+
ctx.params[dstDEUILogicParamId] = clone26(srcVal);
|
|
22989
23394
|
}
|
|
22990
23395
|
/**
|
|
22991
23396
|
* 绑定参数
|
|
@@ -23062,7 +23467,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23062
23467
|
};
|
|
23063
23468
|
|
|
23064
23469
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
23065
|
-
import { RuntimeError as
|
|
23470
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
23066
23471
|
import { isFunction } from "lodash-es";
|
|
23067
23472
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
23068
23473
|
async exec(ctx) {
|
|
@@ -23088,7 +23493,7 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
23088
23493
|
}
|
|
23089
23494
|
const invokeParam = ctx.params[invokeParamId];
|
|
23090
23495
|
if (!invokeParam) {
|
|
23091
|
-
throw new
|
|
23496
|
+
throw new RuntimeError45(
|
|
23092
23497
|
ibiz.i18n.t("runtime.uiLogic.noFoundOperationParameter", {
|
|
23093
23498
|
invokeParamId
|
|
23094
23499
|
})
|
|
@@ -23096,14 +23501,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
23096
23501
|
}
|
|
23097
23502
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
23098
23503
|
if (!invokeCtrl) {
|
|
23099
|
-
throw new
|
|
23504
|
+
throw new RuntimeError45(
|
|
23100
23505
|
ibiz.i18n.t("runtime.uiLogic.noFoundInterfaceObject", {
|
|
23101
23506
|
invokeCtrlId
|
|
23102
23507
|
})
|
|
23103
23508
|
);
|
|
23104
23509
|
}
|
|
23105
23510
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
23106
|
-
throw new
|
|
23511
|
+
throw new RuntimeError45(
|
|
23107
23512
|
ibiz.i18n.t("runtime.uiLogic.noFoundInvokeMethod", {
|
|
23108
23513
|
invokeMethod
|
|
23109
23514
|
})
|
|
@@ -23292,7 +23697,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
23292
23697
|
|
|
23293
23698
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
23294
23699
|
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
23295
|
-
import { clone as
|
|
23700
|
+
import { clone as clone27 } from "ramda";
|
|
23296
23701
|
var CopyParamNode2 = class extends UILogicNode {
|
|
23297
23702
|
async exec(ctx) {
|
|
23298
23703
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -23303,7 +23708,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
23303
23708
|
);
|
|
23304
23709
|
}
|
|
23305
23710
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
23306
|
-
ctx.params[dstDEUILogicParamId] =
|
|
23711
|
+
ctx.params[dstDEUILogicParamId] = clone27(srcVal);
|
|
23307
23712
|
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
23308
23713
|
ibiz.log.debug(
|
|
23309
23714
|
ibiz.i18n.t("runtime.uiLogic.copyParameter", {
|
|
@@ -23443,7 +23848,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
23443
23848
|
};
|
|
23444
23849
|
|
|
23445
23850
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
23446
|
-
import { RuntimeError as
|
|
23851
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
23447
23852
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
23448
23853
|
async exec(_ctx) {
|
|
23449
23854
|
const { errorInfo } = this.model;
|
|
@@ -23453,12 +23858,12 @@ var ThrowExceptionNode2 = class extends UILogicNode {
|
|
|
23453
23858
|
errorInfo
|
|
23454
23859
|
})
|
|
23455
23860
|
);
|
|
23456
|
-
throw new
|
|
23861
|
+
throw new RuntimeError46(errorInfo);
|
|
23457
23862
|
}
|
|
23458
23863
|
};
|
|
23459
23864
|
|
|
23460
23865
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
23461
|
-
import { RuntimeError as
|
|
23866
|
+
import { RuntimeError as RuntimeError47, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
23462
23867
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
23463
23868
|
async exec(ctx) {
|
|
23464
23869
|
ctx.isEndNode = true;
|
|
@@ -23483,13 +23888,13 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
23483
23888
|
}
|
|
23484
23889
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
23485
23890
|
if (!invokeCtrl) {
|
|
23486
|
-
throw new
|
|
23891
|
+
throw new RuntimeError47(
|
|
23487
23892
|
ibiz.i18n.t("runtime.uiLogic.noFoundTriggerObject", { fireCtrlId })
|
|
23488
23893
|
);
|
|
23489
23894
|
}
|
|
23490
23895
|
const eventParam = ctx.params[eventParamId];
|
|
23491
23896
|
if (!eventParam) {
|
|
23492
|
-
throw new
|
|
23897
|
+
throw new RuntimeError47(
|
|
23493
23898
|
ibiz.i18n.t("runtime.uiLogic.noFoundEventParameterObject", {
|
|
23494
23899
|
eventParamId
|
|
23495
23900
|
})
|
|
@@ -23511,7 +23916,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
23511
23916
|
};
|
|
23512
23917
|
|
|
23513
23918
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
23514
|
-
import { RuntimeError as
|
|
23919
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
23515
23920
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
23516
23921
|
async exec(ctx) {
|
|
23517
23922
|
const {
|
|
@@ -23540,7 +23945,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
23540
23945
|
}
|
|
23541
23946
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
23542
23947
|
if (!dstParam) {
|
|
23543
|
-
throw new
|
|
23948
|
+
throw new RuntimeError48(
|
|
23544
23949
|
ibiz.i18n.t("runtime.uiLogic.passedParameter", { dstDEUILogicParamId })
|
|
23545
23950
|
);
|
|
23546
23951
|
}
|
|
@@ -23939,7 +24344,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
23939
24344
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
23940
24345
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
23941
24346
|
if (!deUILogic) {
|
|
23942
|
-
throw new
|
|
24347
|
+
throw new RuntimeError49(
|
|
23943
24348
|
ibiz.i18n.t("runtime.uiLogic.interfaceLogic", {
|
|
23944
24349
|
appDataEntityId,
|
|
23945
24350
|
deUILogicId
|
|
@@ -23967,7 +24372,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
23967
24372
|
}
|
|
23968
24373
|
|
|
23969
24374
|
// src/ui-action/uiaction-util.ts
|
|
23970
|
-
import { RuntimeError as
|
|
24375
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
23971
24376
|
var UIActionUtil = class {
|
|
23972
24377
|
/**
|
|
23973
24378
|
* 执行界面行为
|
|
@@ -23982,7 +24387,7 @@ var UIActionUtil = class {
|
|
|
23982
24387
|
static async exec(actionId, params, appId2) {
|
|
23983
24388
|
const action = await getUIActionById(actionId, appId2);
|
|
23984
24389
|
if (!action) {
|
|
23985
|
-
throw new
|
|
24390
|
+
throw new RuntimeError50(
|
|
23986
24391
|
ibiz.i18n.t("runtime.uiAction.noFoundBehaviorModel", { actionId })
|
|
23987
24392
|
);
|
|
23988
24393
|
}
|
|
@@ -24490,7 +24895,7 @@ import {
|
|
|
24490
24895
|
StringUtil,
|
|
24491
24896
|
RuntimeModelError as RuntimeModelError53,
|
|
24492
24897
|
ModelError as ModelError26,
|
|
24493
|
-
RuntimeError as
|
|
24898
|
+
RuntimeError as RuntimeError51
|
|
24494
24899
|
} from "@ibiz-template/core";
|
|
24495
24900
|
import { mergeRight as mergeRight4 } from "ramda";
|
|
24496
24901
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
@@ -24578,7 +24983,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24578
24983
|
return result || {};
|
|
24579
24984
|
}
|
|
24580
24985
|
if (scriptCode) {
|
|
24581
|
-
const result = ScriptFactory.
|
|
24986
|
+
const result = await ScriptFactory.asyncExecScriptFn(
|
|
24582
24987
|
{ context, params, data, el: event == null ? void 0 : event.target, view },
|
|
24583
24988
|
scriptCode
|
|
24584
24989
|
);
|
|
@@ -24616,7 +25021,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24616
25021
|
if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
24617
25022
|
requestUrl += "/".concat(appDataEntity.deapicodeName2, "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
|
|
24618
25023
|
} else {
|
|
24619
|
-
throw new
|
|
25024
|
+
throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.dataPrimaryKey"));
|
|
24620
25025
|
}
|
|
24621
25026
|
const res = await ibiz.net.request(requestUrl, {
|
|
24622
25027
|
method: "get",
|
|
@@ -24642,10 +25047,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24642
25047
|
window.open(link, "_blank");
|
|
24643
25048
|
}
|
|
24644
25049
|
} else {
|
|
24645
|
-
throw new
|
|
25050
|
+
throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.printFailure"));
|
|
24646
25051
|
}
|
|
24647
25052
|
} else {
|
|
24648
|
-
throw new
|
|
25053
|
+
throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.physicalPrint"));
|
|
24649
25054
|
}
|
|
24650
25055
|
}
|
|
24651
25056
|
/**
|
|
@@ -24730,12 +25135,12 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24730
25135
|
URL.revokeObjectURL(elink.href);
|
|
24731
25136
|
document.body.removeChild(elink);
|
|
24732
25137
|
} else {
|
|
24733
|
-
throw new
|
|
25138
|
+
throw new RuntimeError51(
|
|
24734
25139
|
ibiz.i18n.t("runtime.uiAction.exportRequestFailed")
|
|
24735
25140
|
);
|
|
24736
25141
|
}
|
|
24737
25142
|
} else {
|
|
24738
|
-
throw new
|
|
25143
|
+
throw new RuntimeError51(
|
|
24739
25144
|
ibiz.i18n.t("runtime.uiAction.noEntityExportsFound")
|
|
24740
25145
|
);
|
|
24741
25146
|
}
|
|
@@ -24753,7 +25158,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24753
25158
|
const actionResult = {};
|
|
24754
25159
|
const { context, params, data, event } = args;
|
|
24755
25160
|
if (!event) {
|
|
24756
|
-
throw new
|
|
25161
|
+
throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.lackNativeEvent"));
|
|
24757
25162
|
}
|
|
24758
25163
|
const { resultContext, resultParams } = await this.handleParams(
|
|
24759
25164
|
action,
|
|
@@ -24892,7 +25297,7 @@ var ToolbarController = class extends ControlController {
|
|
|
24892
25297
|
const actionId = item.uiactionId;
|
|
24893
25298
|
const uiAction = await getUIActionById(actionId, item.appId);
|
|
24894
25299
|
if (!uiAction) {
|
|
24895
|
-
throw new
|
|
25300
|
+
throw new RuntimeError52(
|
|
24896
25301
|
ibiz.i18n.t("runtime.controller.control.toolbar.noFound", {
|
|
24897
25302
|
actionId
|
|
24898
25303
|
})
|
|
@@ -25005,6 +25410,12 @@ var ToolbarController = class extends ControlController {
|
|
|
25005
25410
|
_data = data.getOrigin();
|
|
25006
25411
|
}
|
|
25007
25412
|
await this.state.buttonsState.update(this.context, _data, appDeId);
|
|
25413
|
+
this.allToolbarItems.forEach((item) => {
|
|
25414
|
+
const itemState = this.state.buttonsState[item.id];
|
|
25415
|
+
if (item.hiddenItem) {
|
|
25416
|
+
itemState.visible = false;
|
|
25417
|
+
}
|
|
25418
|
+
});
|
|
25008
25419
|
if (this.scheduler) {
|
|
25009
25420
|
const logicParams = {};
|
|
25010
25421
|
if (_data) {
|
|
@@ -25097,6 +25508,7 @@ var ContextMenuController = class extends ToolbarController {
|
|
|
25097
25508
|
};
|
|
25098
25509
|
|
|
25099
25510
|
// src/controller/control/dashboard/dashboard.controller.ts
|
|
25511
|
+
import { clone as clone28 } from "ramda";
|
|
25100
25512
|
var DashboardController = class extends ControlController {
|
|
25101
25513
|
constructor() {
|
|
25102
25514
|
super(...arguments);
|
|
@@ -25116,13 +25528,25 @@ var DashboardController = class extends ControlController {
|
|
|
25116
25528
|
* @type {{ [key: string]: IPortletController }}
|
|
25117
25529
|
*/
|
|
25118
25530
|
this.portlets = {};
|
|
25531
|
+
/**
|
|
25532
|
+
* 启用动态
|
|
25533
|
+
*
|
|
25534
|
+
* @author tony001
|
|
25535
|
+
* @date 2024-06-27 11:06:24
|
|
25536
|
+
* @type {boolean}
|
|
25537
|
+
*/
|
|
25538
|
+
this.enableDynamic = false;
|
|
25119
25539
|
}
|
|
25120
25540
|
initState() {
|
|
25121
25541
|
super.initState();
|
|
25122
25542
|
}
|
|
25123
25543
|
async onCreated() {
|
|
25544
|
+
this.model.enableCustomized = true;
|
|
25124
25545
|
await super.onCreated();
|
|
25125
25546
|
await this.initPortlets(this.model.controls);
|
|
25547
|
+
if (this.controlParams.enabledynamic === "true") {
|
|
25548
|
+
this.enableDynamic = true;
|
|
25549
|
+
}
|
|
25126
25550
|
const { appDataEntityId } = this.view.model;
|
|
25127
25551
|
if (appDataEntityId) {
|
|
25128
25552
|
this.view.evt.on("onDataChange", (event) => {
|
|
@@ -25208,6 +25632,57 @@ var DashboardController = class extends ControlController {
|
|
|
25208
25632
|
});
|
|
25209
25633
|
this.evt.emit("onResetPortlet", void 0);
|
|
25210
25634
|
}
|
|
25635
|
+
/**
|
|
25636
|
+
* 加载动态
|
|
25637
|
+
*
|
|
25638
|
+
* @author tony001
|
|
25639
|
+
* @date 2024-06-27 16:06:21
|
|
25640
|
+
* @return {*} {Promise<IData[]>}
|
|
25641
|
+
*/
|
|
25642
|
+
async loadAllDynaPortlet() {
|
|
25643
|
+
var _a;
|
|
25644
|
+
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
25645
|
+
const res = await app.deService.exec(
|
|
25646
|
+
"psappportlet",
|
|
25647
|
+
"fetchdefault",
|
|
25648
|
+
this.context,
|
|
25649
|
+
{
|
|
25650
|
+
size: 1e3,
|
|
25651
|
+
n_pssysappid_eq: app.model.codeName,
|
|
25652
|
+
n_dynamodelflag_noteq: 0
|
|
25653
|
+
}
|
|
25654
|
+
);
|
|
25655
|
+
if (res && ((_a = res.data) == null ? void 0 : _a.length) > 0) {
|
|
25656
|
+
return res.data;
|
|
25657
|
+
}
|
|
25658
|
+
return [];
|
|
25659
|
+
}
|
|
25660
|
+
/**
|
|
25661
|
+
* 通过指定标识加载门户部件
|
|
25662
|
+
*
|
|
25663
|
+
* @author tony001
|
|
25664
|
+
* @date 2024-06-27 17:06:12
|
|
25665
|
+
* @param {string} id
|
|
25666
|
+
* @return {*} {(Promise<IDBPortletPart | undefined>)}
|
|
25667
|
+
*/
|
|
25668
|
+
async loadDynaPortletById(id) {
|
|
25669
|
+
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
25670
|
+
const tempContext = clone28(this.context);
|
|
25671
|
+
Object.assign(tempContext, { psappportlet: id });
|
|
25672
|
+
const res = await app.deService.exec(
|
|
25673
|
+
"psappportlet",
|
|
25674
|
+
"get",
|
|
25675
|
+
tempContext,
|
|
25676
|
+
this.params
|
|
25677
|
+
);
|
|
25678
|
+
if (res && res.data && res.data.controlmodel) {
|
|
25679
|
+
const controlModel = JSON.parse(res.data.controlmodel);
|
|
25680
|
+
return await ibiz.hub.translationModelToDsl(
|
|
25681
|
+
controlModel,
|
|
25682
|
+
"CTRL"
|
|
25683
|
+
);
|
|
25684
|
+
}
|
|
25685
|
+
}
|
|
25211
25686
|
/**
|
|
25212
25687
|
* 通知所有表单成员表单操作过程中的数据变更
|
|
25213
25688
|
*
|
|
@@ -25264,7 +25739,7 @@ var CustomDashboardController = class {
|
|
|
25264
25739
|
*/
|
|
25265
25740
|
this.portletConfig = {};
|
|
25266
25741
|
/**
|
|
25267
|
-
* 自定义定制范围类型(public:公开,personal:个人,data
|
|
25742
|
+
* 自定义定制范围类型(public:公开,personal:个人,data:数据,dynamic: 自定义动态,默认是按照个人区分,配置了应用功能组件才生效)
|
|
25268
25743
|
*
|
|
25269
25744
|
* @author tony001
|
|
25270
25745
|
* @date 2024-04-24 19:04:47
|
|
@@ -25287,13 +25762,6 @@ var CustomDashboardController = class {
|
|
|
25287
25762
|
* @type {string}
|
|
25288
25763
|
*/
|
|
25289
25764
|
this.ownerId = "";
|
|
25290
|
-
/**
|
|
25291
|
-
* 是否多模式
|
|
25292
|
-
*
|
|
25293
|
-
* @type {boolean}
|
|
25294
|
-
* @memberof CustomDashboardController
|
|
25295
|
-
*/
|
|
25296
|
-
this.multiMode = false;
|
|
25297
25765
|
this.context = dashboard.context;
|
|
25298
25766
|
this.params = dashboard.params;
|
|
25299
25767
|
this.init(dashboard.controlParams);
|
|
@@ -25319,7 +25787,6 @@ var CustomDashboardController = class {
|
|
|
25319
25787
|
this.ownerId = this.context[controlParams.owner_id];
|
|
25320
25788
|
}
|
|
25321
25789
|
if (controlParams.multimode === "true") {
|
|
25322
|
-
this.multiMode = true;
|
|
25323
25790
|
this.type = "dynamic";
|
|
25324
25791
|
}
|
|
25325
25792
|
if (this.model.appDynaDashboardUtilId) {
|
|
@@ -26333,7 +26800,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26333
26800
|
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
26334
26801
|
|
|
26335
26802
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
26336
|
-
import { RuntimeError as
|
|
26803
|
+
import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
26337
26804
|
var ExpBarControlController = class extends ControlController {
|
|
26338
26805
|
constructor() {
|
|
26339
26806
|
super(...arguments);
|
|
@@ -26666,7 +27133,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
26666
27133
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
26667
27134
|
return this.XDataModel.navAppViewId;
|
|
26668
27135
|
}
|
|
26669
|
-
throw new
|
|
27136
|
+
throw new RuntimeError53(
|
|
26670
27137
|
ibiz.i18n.t("runtime.controller.control.expBar.multiNode")
|
|
26671
27138
|
);
|
|
26672
27139
|
}
|
|
@@ -26813,7 +27280,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
26813
27280
|
};
|
|
26814
27281
|
|
|
26815
27282
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
26816
|
-
import { RuntimeError as
|
|
27283
|
+
import { RuntimeError as RuntimeError54, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
26817
27284
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
26818
27285
|
constructor() {
|
|
26819
27286
|
super(...arguments);
|
|
@@ -26904,7 +27371,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
26904
27371
|
const deData = node._deData || node;
|
|
26905
27372
|
const nodeModel = this.getNodeModel(node._nodeId);
|
|
26906
27373
|
if (!nodeModel) {
|
|
26907
|
-
throw new
|
|
27374
|
+
throw new RuntimeError54(
|
|
26908
27375
|
ibiz.i18n.t("runtime.controller.control.expBar.noFindNodeModel", {
|
|
26909
27376
|
nodeId: node._nodeId
|
|
26910
27377
|
})
|
|
@@ -27099,7 +27566,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
27099
27566
|
};
|
|
27100
27567
|
|
|
27101
27568
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
27102
|
-
import { RuntimeError as
|
|
27569
|
+
import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
27103
27570
|
|
|
27104
27571
|
// src/controller/control/form/form/form.controller.ts
|
|
27105
27572
|
import {
|
|
@@ -27745,7 +28212,7 @@ var SearchFormController = class extends FormController {
|
|
|
27745
28212
|
applyStoredFilter(index) {
|
|
27746
28213
|
const filter = this.state.storedFilters[index];
|
|
27747
28214
|
if (!filter) {
|
|
27748
|
-
throw new
|
|
28215
|
+
throw new RuntimeError55(
|
|
27749
28216
|
ibiz.i18n.t("runtime.controller.control.form.searchTerms")
|
|
27750
28217
|
);
|
|
27751
28218
|
}
|
|
@@ -27763,7 +28230,7 @@ var SearchFormController = class extends FormController {
|
|
|
27763
28230
|
async removeStoredFilter(index) {
|
|
27764
28231
|
const filter = this.state.storedFilters[index];
|
|
27765
28232
|
if (!filter) {
|
|
27766
|
-
throw new
|
|
28233
|
+
throw new RuntimeError55(
|
|
27767
28234
|
ibiz.i18n.t("runtime.controller.control.form.saveSearch")
|
|
27768
28235
|
);
|
|
27769
28236
|
}
|
|
@@ -29253,7 +29720,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
29253
29720
|
};
|
|
29254
29721
|
|
|
29255
29722
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
29256
|
-
import { RuntimeError as
|
|
29723
|
+
import { RuntimeError as RuntimeError56, RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
29257
29724
|
import { createUUID as createUUID11 } from "qx-util";
|
|
29258
29725
|
|
|
29259
29726
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -29426,7 +29893,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
29426
29893
|
async remove(id) {
|
|
29427
29894
|
const controller = this.formMap.get(id);
|
|
29428
29895
|
if (!controller) {
|
|
29429
|
-
throw new
|
|
29896
|
+
throw new RuntimeError56(
|
|
29430
29897
|
ibiz.i18n.t("runtime.controller.control.form.noFoundFormController", {
|
|
29431
29898
|
id
|
|
29432
29899
|
})
|
|
@@ -29489,7 +29956,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
29489
29956
|
|
|
29490
29957
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
29491
29958
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
29492
|
-
import { clone as
|
|
29959
|
+
import { clone as clone29 } from "ramda";
|
|
29493
29960
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
29494
29961
|
constructor() {
|
|
29495
29962
|
super(...arguments);
|
|
@@ -29581,7 +30048,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
29581
30048
|
copyFields.forEach((key) => {
|
|
29582
30049
|
tempForm[key] = this.form.model[key];
|
|
29583
30050
|
});
|
|
29584
|
-
this.repeatedForm =
|
|
30051
|
+
this.repeatedForm = clone29(tempForm);
|
|
29585
30052
|
}
|
|
29586
30053
|
/**
|
|
29587
30054
|
* 设置重复器控制器
|
|
@@ -29620,18 +30087,22 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
29620
30087
|
* @date 2023-11-22 04:50:19
|
|
29621
30088
|
*/
|
|
29622
30089
|
create(index) {
|
|
30090
|
+
const item = {};
|
|
29623
30091
|
if (this.isSingleData) {
|
|
29624
|
-
this.setValue(
|
|
30092
|
+
this.setValue(item);
|
|
29625
30093
|
} else {
|
|
29626
30094
|
let tempValue = this.value;
|
|
29627
30095
|
tempValue = tempValue ? [...tempValue] : [];
|
|
29628
30096
|
if (index !== void 0) {
|
|
29629
|
-
tempValue.splice(index, 0,
|
|
30097
|
+
tempValue.splice(index, 0, item);
|
|
29630
30098
|
} else {
|
|
29631
|
-
tempValue.push(
|
|
30099
|
+
tempValue.push(item);
|
|
29632
30100
|
}
|
|
29633
30101
|
this.setValue(tempValue);
|
|
29634
30102
|
}
|
|
30103
|
+
this.form.evt.emit("onMDCtrlNew", {
|
|
30104
|
+
args: item
|
|
30105
|
+
});
|
|
29635
30106
|
}
|
|
29636
30107
|
/**
|
|
29637
30108
|
* 删除数据
|
|
@@ -29648,6 +30119,9 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
29648
30119
|
return index !== i;
|
|
29649
30120
|
});
|
|
29650
30121
|
this.setValue(newArr);
|
|
30122
|
+
this.form.evt.emit("onMDCtrlRemove", {
|
|
30123
|
+
args: newArr
|
|
30124
|
+
});
|
|
29651
30125
|
}
|
|
29652
30126
|
/**
|
|
29653
30127
|
* 表单数据变更通知
|
|
@@ -29778,11 +30252,11 @@ import {
|
|
|
29778
30252
|
IBizContext as IBizContext6,
|
|
29779
30253
|
isElementSame as isElementSame2,
|
|
29780
30254
|
mergeInLeft as mergeInLeft2,
|
|
29781
|
-
RuntimeError as
|
|
30255
|
+
RuntimeError as RuntimeError57
|
|
29782
30256
|
} from "@ibiz-template/core";
|
|
29783
30257
|
import { debounce } from "lodash-es";
|
|
29784
30258
|
import { createUUID as createUUID12 } from "qx-util";
|
|
29785
|
-
import { clone as
|
|
30259
|
+
import { clone as clone30, isNil as isNil27 } from "ramda";
|
|
29786
30260
|
|
|
29787
30261
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
29788
30262
|
import {
|
|
@@ -30151,8 +30625,8 @@ var EditFormController = class extends FormController {
|
|
|
30151
30625
|
* @return {*} {Promise<IData>}
|
|
30152
30626
|
*/
|
|
30153
30627
|
async copy() {
|
|
30154
|
-
const context =
|
|
30155
|
-
const queryParams =
|
|
30628
|
+
const context = clone30(this.context);
|
|
30629
|
+
const queryParams = clone30(this.params);
|
|
30156
30630
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
30157
30631
|
this.model.appDataEntityId,
|
|
30158
30632
|
this.model.appId
|
|
@@ -30209,7 +30683,7 @@ var EditFormController = class extends FormController {
|
|
|
30209
30683
|
return this.loadDraft();
|
|
30210
30684
|
}
|
|
30211
30685
|
const { context, params } = this.handlerAbilityParams(args);
|
|
30212
|
-
const queryParams =
|
|
30686
|
+
const queryParams = clone30(params);
|
|
30213
30687
|
let res;
|
|
30214
30688
|
try {
|
|
30215
30689
|
await this.startLoading();
|
|
@@ -30247,7 +30721,7 @@ var EditFormController = class extends FormController {
|
|
|
30247
30721
|
}
|
|
30248
30722
|
const isValid = await this.validate();
|
|
30249
30723
|
if (!isValid) {
|
|
30250
|
-
throw new
|
|
30724
|
+
throw new RuntimeError57(
|
|
30251
30725
|
ibiz.i18n.t("runtime.controller.control.form.formCompletion")
|
|
30252
30726
|
);
|
|
30253
30727
|
}
|
|
@@ -30383,7 +30857,7 @@ var EditFormController = class extends FormController {
|
|
|
30383
30857
|
(item) => item.id === formItemUpdateId
|
|
30384
30858
|
);
|
|
30385
30859
|
if (!formItemUpdate) {
|
|
30386
|
-
throw new
|
|
30860
|
+
throw new RuntimeError57(
|
|
30387
30861
|
ibiz.i18n.t("runtime.controller.control.form.itemUpdate", {
|
|
30388
30862
|
formItemUpdateId
|
|
30389
30863
|
})
|
|
@@ -30446,7 +30920,7 @@ var EditFormController = class extends FormController {
|
|
|
30446
30920
|
async wfStart(args) {
|
|
30447
30921
|
const isValid = await this.validate();
|
|
30448
30922
|
if (!isValid) {
|
|
30449
|
-
throw new
|
|
30923
|
+
throw new RuntimeError57(
|
|
30450
30924
|
ibiz.i18n.t("runtime.controller.control.form.formCompletion")
|
|
30451
30925
|
);
|
|
30452
30926
|
}
|
|
@@ -30479,7 +30953,7 @@ var EditFormController = class extends FormController {
|
|
|
30479
30953
|
async wfSubmit(args) {
|
|
30480
30954
|
const isValid = await this.validate();
|
|
30481
30955
|
if (!isValid) {
|
|
30482
|
-
throw new
|
|
30956
|
+
throw new RuntimeError57(
|
|
30483
30957
|
ibiz.i18n.t("runtime.controller.control.form.formCompletion")
|
|
30484
30958
|
);
|
|
30485
30959
|
}
|
|
@@ -30891,11 +31365,12 @@ import {
|
|
|
30891
31365
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
30892
31366
|
EntityError as EntityError2,
|
|
30893
31367
|
mergeDefaultInLeft,
|
|
31368
|
+
plus as plus2,
|
|
30894
31369
|
recursiveIterate as recursiveIterate7,
|
|
30895
|
-
RuntimeError as
|
|
31370
|
+
RuntimeError as RuntimeError58,
|
|
30896
31371
|
RuntimeModelError as RuntimeModelError63
|
|
30897
31372
|
} from "@ibiz-template/core";
|
|
30898
|
-
import { clone as
|
|
31373
|
+
import { clone as clone31, isNil as isNil28 } from "ramda";
|
|
30899
31374
|
import dayjs5 from "dayjs";
|
|
30900
31375
|
|
|
30901
31376
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -30961,6 +31436,24 @@ var GridService = class extends MDControlService {
|
|
|
30961
31436
|
res = this.handleResponse(res);
|
|
30962
31437
|
return res;
|
|
30963
31438
|
}
|
|
31439
|
+
/**
|
|
31440
|
+
* 移动并排序数据
|
|
31441
|
+
*
|
|
31442
|
+
* @param {IContext} context
|
|
31443
|
+
* @param {ControlVO} data
|
|
31444
|
+
* @param {IData} args
|
|
31445
|
+
* @return {*} {Promise<IHttpResponse<ControlVO[]>>}
|
|
31446
|
+
* @memberof GridService
|
|
31447
|
+
*/
|
|
31448
|
+
async moveOrderItem(context, data, params) {
|
|
31449
|
+
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
31450
|
+
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
31451
|
+
const tempContext = context.clone();
|
|
31452
|
+
tempContext[deName] = data.srfkey;
|
|
31453
|
+
let res = await this.exec(moveAction, tempContext, params);
|
|
31454
|
+
res = this.handleResponse(res);
|
|
31455
|
+
return res;
|
|
31456
|
+
}
|
|
30964
31457
|
};
|
|
30965
31458
|
|
|
30966
31459
|
// src/controller/control/grid/grid/entity-schema.ts
|
|
@@ -31032,6 +31525,7 @@ async function calcColumnModelBySchema(json, c) {
|
|
|
31032
31525
|
widthUnit: "PX",
|
|
31033
31526
|
valueType: "SIMPLE",
|
|
31034
31527
|
caption: item.description,
|
|
31528
|
+
hideDefault: true,
|
|
31035
31529
|
dataItemName: item.key
|
|
31036
31530
|
});
|
|
31037
31531
|
addDataItems.push({
|
|
@@ -31070,6 +31564,13 @@ var GridController = class extends MDControlController {
|
|
|
31070
31564
|
* @type {boolean}
|
|
31071
31565
|
*/
|
|
31072
31566
|
this.addSchemaColumn = false;
|
|
31567
|
+
/**
|
|
31568
|
+
* 是否显示百分比
|
|
31569
|
+
*
|
|
31570
|
+
* @type {boolean}
|
|
31571
|
+
* @memberof GridController
|
|
31572
|
+
*/
|
|
31573
|
+
this.showPercent = false;
|
|
31073
31574
|
/**
|
|
31074
31575
|
* 所有表格列控制器集合
|
|
31075
31576
|
*
|
|
@@ -31232,6 +31733,7 @@ var GridController = class extends MDControlController {
|
|
|
31232
31733
|
*/
|
|
31233
31734
|
async onCreated() {
|
|
31234
31735
|
this.addSchemaColumn = this.controlParams.enablejsonschema === "true";
|
|
31736
|
+
this.showPercent = this.controlParams.showpercent === "true";
|
|
31235
31737
|
await this.initByEntitySchema();
|
|
31236
31738
|
await super.onCreated();
|
|
31237
31739
|
this.service = new GridService(this.model);
|
|
@@ -31295,7 +31797,7 @@ var GridController = class extends MDControlController {
|
|
|
31295
31797
|
const result = await calcColumnModelBySchema(json, this);
|
|
31296
31798
|
if (result && result.degridColumns.length > 0) {
|
|
31297
31799
|
const { degridColumns, degridDataItems } = result;
|
|
31298
|
-
this.model =
|
|
31800
|
+
this.model = clone31(this.model);
|
|
31299
31801
|
this.model.degridColumns = [
|
|
31300
31802
|
...this.model.degridColumns || [],
|
|
31301
31803
|
...degridColumns
|
|
@@ -31463,7 +31965,7 @@ var GridController = class extends MDControlController {
|
|
|
31463
31965
|
} else {
|
|
31464
31966
|
const toNum = Number(sortValue);
|
|
31465
31967
|
if (Number.isNaN(toNum)) {
|
|
31466
|
-
throw new
|
|
31968
|
+
throw new RuntimeError58(
|
|
31467
31969
|
ibiz.i18n.t("runtime.controller.control.grid.convertedValue", {
|
|
31468
31970
|
srfmajortext: item.srfmajortext
|
|
31469
31971
|
})
|
|
@@ -31497,6 +31999,7 @@ var GridController = class extends MDControlController {
|
|
|
31497
31999
|
await this.loadRemoteAgg();
|
|
31498
32000
|
this.calcAggResult(this.state.items);
|
|
31499
32001
|
this.calcShowMode(this.state.items);
|
|
32002
|
+
this.calcTotalData();
|
|
31500
32003
|
return items;
|
|
31501
32004
|
}
|
|
31502
32005
|
/**
|
|
@@ -31605,7 +32108,6 @@ var GridController = class extends MDControlController {
|
|
|
31605
32108
|
* 计算当前页的聚合数据
|
|
31606
32109
|
* @author lxm
|
|
31607
32110
|
* @date 2023-08-07 04:22:09
|
|
31608
|
-
* @protected
|
|
31609
32111
|
* @param {IData[]} items
|
|
31610
32112
|
*/
|
|
31611
32113
|
calcAggResult(items) {
|
|
@@ -31654,7 +32156,7 @@ var GridController = class extends MDControlController {
|
|
|
31654
32156
|
if (editShowMode === "row") {
|
|
31655
32157
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
31656
32158
|
if (editingRow) {
|
|
31657
|
-
throw new
|
|
32159
|
+
throw new RuntimeError58(
|
|
31658
32160
|
ibiz.i18n.t("runtime.controller.common.md.firstComplete")
|
|
31659
32161
|
);
|
|
31660
32162
|
}
|
|
@@ -31697,7 +32199,7 @@ var GridController = class extends MDControlController {
|
|
|
31697
32199
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
31698
32200
|
const rowState = this.findRowState(data);
|
|
31699
32201
|
if (!rowState) {
|
|
31700
|
-
throw new
|
|
32202
|
+
throw new RuntimeError58(
|
|
31701
32203
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
31702
32204
|
);
|
|
31703
32205
|
}
|
|
@@ -31711,7 +32213,7 @@ var GridController = class extends MDControlController {
|
|
|
31711
32213
|
}
|
|
31712
32214
|
const isValid = await this.validate(rowState);
|
|
31713
32215
|
if (!isValid) {
|
|
31714
|
-
throw new
|
|
32216
|
+
throw new RuntimeError58(
|
|
31715
32217
|
ibiz.i18n.t("runtime.controller.control.grid.saveCancel")
|
|
31716
32218
|
);
|
|
31717
32219
|
}
|
|
@@ -31967,7 +32469,7 @@ var GridController = class extends MDControlController {
|
|
|
31967
32469
|
}
|
|
31968
32470
|
async toggleRowEdit() {
|
|
31969
32471
|
if (!this.model.enableRowNew) {
|
|
31970
|
-
throw new
|
|
32472
|
+
throw new RuntimeError58(
|
|
31971
32473
|
ibiz.i18n.t("runtime.controller.control.grid.noSupportRowEditing")
|
|
31972
32474
|
);
|
|
31973
32475
|
}
|
|
@@ -32002,12 +32504,12 @@ var GridController = class extends MDControlController {
|
|
|
32002
32504
|
} else {
|
|
32003
32505
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
32004
32506
|
if (editingRow) {
|
|
32005
|
-
throw new
|
|
32507
|
+
throw new RuntimeError58(
|
|
32006
32508
|
ibiz.i18n.t("runtime.controller.control.grid.lineEditing")
|
|
32007
32509
|
);
|
|
32008
32510
|
}
|
|
32009
32511
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
32010
|
-
row.cacheData =
|
|
32512
|
+
row.cacheData = clone31(row.data);
|
|
32011
32513
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
32012
32514
|
Object.assign(row.data, defaultVal);
|
|
32013
32515
|
}
|
|
@@ -32059,7 +32561,7 @@ var GridController = class extends MDControlController {
|
|
|
32059
32561
|
(item) => item.id === updateId
|
|
32060
32562
|
);
|
|
32061
32563
|
if (!findUpdate) {
|
|
32062
|
-
throw new
|
|
32564
|
+
throw new RuntimeError58(
|
|
32063
32565
|
ibiz.i18n.t("runtime.controller.control.grid.updateColumns", {
|
|
32064
32566
|
updateId
|
|
32065
32567
|
})
|
|
@@ -32150,7 +32652,7 @@ var GridController = class extends MDControlController {
|
|
|
32150
32652
|
*/
|
|
32151
32653
|
formatExcelData(data) {
|
|
32152
32654
|
const { fields = [] } = this.dataExportParam;
|
|
32153
|
-
const cloneData =
|
|
32655
|
+
const cloneData = clone31(
|
|
32154
32656
|
data.map((item) => {
|
|
32155
32657
|
return fields.reduce((obj, key) => {
|
|
32156
32658
|
obj[key] = item[key];
|
|
@@ -32203,7 +32705,7 @@ var GridController = class extends MDControlController {
|
|
|
32203
32705
|
data = this.getData();
|
|
32204
32706
|
}
|
|
32205
32707
|
if (data.length === 0) {
|
|
32206
|
-
throw new
|
|
32708
|
+
throw new RuntimeError58(
|
|
32207
32709
|
ibiz.i18n.t("runtime.controller.control.grid.exported")
|
|
32208
32710
|
);
|
|
32209
32711
|
}
|
|
@@ -32219,7 +32721,7 @@ var GridController = class extends MDControlController {
|
|
|
32219
32721
|
async exportData(args) {
|
|
32220
32722
|
const { header } = this.dataExportParam;
|
|
32221
32723
|
if (!header) {
|
|
32222
|
-
throw new
|
|
32724
|
+
throw new RuntimeError58(
|
|
32223
32725
|
ibiz.i18n.t("runtime.controller.control.grid.tabularColumns")
|
|
32224
32726
|
);
|
|
32225
32727
|
}
|
|
@@ -32420,35 +32922,32 @@ var GridController = class extends MDControlController {
|
|
|
32420
32922
|
super.actionNotification(tag, { ...opts || {} });
|
|
32421
32923
|
}
|
|
32422
32924
|
/**
|
|
32423
|
-
*
|
|
32424
|
-
* @
|
|
32425
|
-
* @
|
|
32426
|
-
* @
|
|
32925
|
+
* 拖拽改变
|
|
32926
|
+
* @param dragging 拖拽目标
|
|
32927
|
+
* @param drop 放置目标
|
|
32928
|
+
* @param dropType 放置类型
|
|
32427
32929
|
*/
|
|
32428
|
-
async onDragChange() {
|
|
32429
|
-
|
|
32430
|
-
const
|
|
32431
|
-
|
|
32930
|
+
async onDragChange(dragging, drop, dropType) {
|
|
32931
|
+
var _a;
|
|
32932
|
+
const moveAction = (_a = this.model.moveControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
32933
|
+
if (!moveAction) {
|
|
32934
|
+
throw new RuntimeModelError63(
|
|
32935
|
+
this.model,
|
|
32936
|
+
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
32937
|
+
);
|
|
32938
|
+
}
|
|
32939
|
+
const moveParams = {
|
|
32940
|
+
srftargetkey: drop.data.srfkey,
|
|
32941
|
+
srfmovetype: dropType === "prev" ? "MOVEBEFORE" : "MOVEAFTER"
|
|
32432
32942
|
};
|
|
32433
|
-
const
|
|
32434
|
-
|
|
32435
|
-
|
|
32436
|
-
|
|
32437
|
-
|
|
32438
|
-
|
|
32439
|
-
|
|
32440
|
-
|
|
32441
|
-
modifiedItems.push(item);
|
|
32442
|
-
}
|
|
32443
|
-
} else {
|
|
32444
|
-
if (!item[sortField] || lastSort >= item[sortField]) {
|
|
32445
|
-
item[sortField] = getNextSort(lastSort);
|
|
32446
|
-
modifiedItems.push(item);
|
|
32447
|
-
}
|
|
32448
|
-
lastSort = item[sortField];
|
|
32449
|
-
}
|
|
32450
|
-
});
|
|
32451
|
-
this.updateChangedItems(modifiedItems);
|
|
32943
|
+
const res = await this.service.moveOrderItem(
|
|
32944
|
+
this.context,
|
|
32945
|
+
dragging.data,
|
|
32946
|
+
moveParams
|
|
32947
|
+
);
|
|
32948
|
+
if (res.ok) {
|
|
32949
|
+
this.refresh();
|
|
32950
|
+
}
|
|
32452
32951
|
}
|
|
32453
32952
|
/**
|
|
32454
32953
|
* 更新改变项数据
|
|
@@ -32476,13 +32975,40 @@ var GridController = class extends MDControlController {
|
|
|
32476
32975
|
await this.afterLoad({}, this.state.items);
|
|
32477
32976
|
}
|
|
32478
32977
|
}
|
|
32978
|
+
/**
|
|
32979
|
+
* 计算统计数据
|
|
32980
|
+
* @author: zzq
|
|
32981
|
+
* @date 2024-06-28 17:12:58
|
|
32982
|
+
* @return {*} {Promise<void>}
|
|
32983
|
+
*/
|
|
32984
|
+
calcTotalData() {
|
|
32985
|
+
if (!this.showPercent) {
|
|
32986
|
+
return;
|
|
32987
|
+
}
|
|
32988
|
+
const totalResult = {};
|
|
32989
|
+
Object.values(this.fieldColumns).forEach((column) => {
|
|
32990
|
+
const fieldName = column.model.id;
|
|
32991
|
+
const result = this.state.items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0);
|
|
32992
|
+
if (result) {
|
|
32993
|
+
totalResult[fieldName] = result;
|
|
32994
|
+
}
|
|
32995
|
+
});
|
|
32996
|
+
this.state.totalResult = totalResult;
|
|
32997
|
+
}
|
|
32479
32998
|
};
|
|
32480
32999
|
|
|
32481
33000
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
32482
|
-
import {
|
|
33001
|
+
import {
|
|
33002
|
+
DataTypes as DataTypes4,
|
|
33003
|
+
ModelError as ModelError29,
|
|
33004
|
+
plus as plus3,
|
|
33005
|
+
base64ToStr,
|
|
33006
|
+
isBase64
|
|
33007
|
+
} from "@ibiz-template/core";
|
|
32483
33008
|
import dayjs6 from "dayjs";
|
|
32484
33009
|
import { debounce as debounce2 } from "lodash-es";
|
|
32485
|
-
import { clone as
|
|
33010
|
+
import { clone as clone32, isNil as isNil29 } from "ramda";
|
|
33011
|
+
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
32486
33012
|
var GridFieldColumnController = class extends GridColumnController {
|
|
32487
33013
|
constructor() {
|
|
32488
33014
|
super(...arguments);
|
|
@@ -32625,7 +33151,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
32625
33151
|
srfkey: value,
|
|
32626
33152
|
...wfContext
|
|
32627
33153
|
});
|
|
32628
|
-
const tempParams =
|
|
33154
|
+
const tempParams = clone32(this.params);
|
|
32629
33155
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
32630
33156
|
row.data,
|
|
32631
33157
|
tempContext,
|
|
@@ -32714,10 +33240,10 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
32714
33240
|
if (this.grid.model.aggMode === "PAGE") {
|
|
32715
33241
|
switch (aggMode) {
|
|
32716
33242
|
case "SUM":
|
|
32717
|
-
aggValue = items.map((item) => item[fieldName]).reduce((a, b) =>
|
|
33243
|
+
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus3(a, b), 0);
|
|
32718
33244
|
break;
|
|
32719
33245
|
case "AVG":
|
|
32720
|
-
aggValue = items.map((item) => item[fieldName]).reduce((a, b) =>
|
|
33246
|
+
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus3(a, b), 0) / items.length;
|
|
32721
33247
|
break;
|
|
32722
33248
|
case "MAX":
|
|
32723
33249
|
aggValue = Math.max(
|
|
@@ -32774,7 +33300,10 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
32774
33300
|
if (this.model.valueType !== "SIMPLE") {
|
|
32775
33301
|
return ValueExUtil.toText(this.model, value);
|
|
32776
33302
|
}
|
|
32777
|
-
const strVal = "".concat(value
|
|
33303
|
+
const strVal = "".concat(isNilOrEmpty8(value) ? "" : value);
|
|
33304
|
+
if (Number.isNaN(Number(strVal)) && isBase64(strVal)) {
|
|
33305
|
+
return base64ToStr(strVal);
|
|
33306
|
+
}
|
|
32778
33307
|
if (!this.valueFormat) {
|
|
32779
33308
|
return strVal;
|
|
32780
33309
|
}
|
|
@@ -32879,9 +33408,9 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
32879
33408
|
};
|
|
32880
33409
|
|
|
32881
33410
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
32882
|
-
import { RuntimeError as
|
|
33411
|
+
import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
|
|
32883
33412
|
import Schema2 from "async-validator";
|
|
32884
|
-
import { isNilOrEmpty as
|
|
33413
|
+
import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
|
|
32885
33414
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
32886
33415
|
constructor() {
|
|
32887
33416
|
super(...arguments);
|
|
@@ -33019,7 +33548,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
33019
33548
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
33020
33549
|
const result = await this.validate(row);
|
|
33021
33550
|
if (!result) {
|
|
33022
|
-
throw new
|
|
33551
|
+
throw new RuntimeError59(
|
|
33023
33552
|
ibiz.i18n.t("runtime.controller.control.grid.checksumErrors", {
|
|
33024
33553
|
codeName: this.editItem.codeName,
|
|
33025
33554
|
fieldName: row.errors[this.fieldName]
|
|
@@ -33125,7 +33654,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
33125
33654
|
*/
|
|
33126
33655
|
async validate(row) {
|
|
33127
33656
|
const editName = this.fieldName;
|
|
33128
|
-
if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required === true && (typeof row.data[editName] === "string" ?
|
|
33657
|
+
if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required === true && (typeof row.data[editName] === "string" ? isNilOrEmpty9(row.data[editName].trimEnd()) : isNilOrEmpty9(row.data[editName]))) {
|
|
33129
33658
|
row.errors[editName] = ibiz.i18n.t(
|
|
33130
33659
|
"runtime.controller.control.form.fillIn",
|
|
33131
33660
|
{
|
|
@@ -33343,7 +33872,7 @@ var ListController = class extends MDControlController {
|
|
|
33343
33872
|
};
|
|
33344
33873
|
|
|
33345
33874
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
33346
|
-
import { recursiveIterate as recursiveIterate8, RuntimeError as
|
|
33875
|
+
import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError60 } from "@ibiz-template/core";
|
|
33347
33876
|
import { AsyncSeriesHook as AsyncSeriesHook2 } from "qx-util";
|
|
33348
33877
|
var PanelController = class extends ControlController {
|
|
33349
33878
|
constructor(model, context, params, ctx, container) {
|
|
@@ -33500,7 +34029,7 @@ var PanelController = class extends ControlController {
|
|
|
33500
34029
|
var _a, _b;
|
|
33501
34030
|
const data = await this.prepareData();
|
|
33502
34031
|
if (!data) {
|
|
33503
|
-
throw new
|
|
34032
|
+
throw new RuntimeError60(
|
|
33504
34033
|
ibiz.i18n.t("runtime.controller.control.panel.panelData")
|
|
33505
34034
|
);
|
|
33506
34035
|
}
|
|
@@ -34146,7 +34675,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
34146
34675
|
|
|
34147
34676
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
34148
34677
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
34149
|
-
import { clone as
|
|
34678
|
+
import { clone as clone34 } from "ramda";
|
|
34150
34679
|
import { isString as isString3 } from "lodash-es";
|
|
34151
34680
|
|
|
34152
34681
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -34634,8 +35163,8 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
34634
35163
|
}
|
|
34635
35164
|
|
|
34636
35165
|
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
34637
|
-
import { RuntimeError as
|
|
34638
|
-
import { clone as
|
|
35166
|
+
import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
35167
|
+
import { clone as clone33 } from "ramda";
|
|
34639
35168
|
var SubFieldRegex2 = /^N_(.\w+)_(.\w+)$/;
|
|
34640
35169
|
var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
34641
35170
|
constructor(filterModels, appDataEntity, context, params) {
|
|
@@ -34693,7 +35222,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
34693
35222
|
return false;
|
|
34694
35223
|
});
|
|
34695
35224
|
if (!minorDEId) {
|
|
34696
|
-
throw new
|
|
35225
|
+
throw new RuntimeError61(
|
|
34697
35226
|
ibiz.i18n.t("runtime.controller.control.searchBar.noFoundEntity", {
|
|
34698
35227
|
targetField
|
|
34699
35228
|
})
|
|
@@ -34720,7 +35249,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
34720
35249
|
const matches = subStr.match(SubFieldRegex2);
|
|
34721
35250
|
const subField = matches[1];
|
|
34722
35251
|
const subOP = matches[2];
|
|
34723
|
-
const cloneItem =
|
|
35252
|
+
const cloneItem = clone33(item);
|
|
34724
35253
|
cloneItem.defsearchMode.valueOP = subOP;
|
|
34725
35254
|
cloneItem.id = subField;
|
|
34726
35255
|
const filterC = new SearchBarFilterController(
|
|
@@ -35172,7 +35701,7 @@ var SearchBarController = class extends ControlController {
|
|
|
35172
35701
|
}
|
|
35173
35702
|
});
|
|
35174
35703
|
if (addSearchBarFilters.length > 0) {
|
|
35175
|
-
this.model =
|
|
35704
|
+
this.model = clone34(this.model);
|
|
35176
35705
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
35177
35706
|
this.model.enableFilter = true;
|
|
35178
35707
|
}
|
|
@@ -35892,7 +36421,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
35892
36421
|
|
|
35893
36422
|
// src/controller/control/tree/tree.controller.ts
|
|
35894
36423
|
import {
|
|
35895
|
-
RuntimeError as
|
|
36424
|
+
RuntimeError as RuntimeError62,
|
|
35896
36425
|
RuntimeModelError as RuntimeModelError66,
|
|
35897
36426
|
recursiveIterate as recursiveIterate11
|
|
35898
36427
|
} from "@ibiz-template/core";
|
|
@@ -36840,92 +37369,59 @@ var TreeController = class extends MDControlController {
|
|
|
36840
37369
|
* @return {*} {Promise<void>}
|
|
36841
37370
|
*/
|
|
36842
37371
|
async onNodeDrop(draggingNode, dropNode, dropType) {
|
|
36843
|
-
var _a, _b
|
|
37372
|
+
var _a, _b;
|
|
36844
37373
|
if (dropType === "inner" && !dropNode._leaf && dropNode._children === void 0) {
|
|
36845
37374
|
await this.expandNodeByKey([dropNode._id]);
|
|
36846
37375
|
}
|
|
36847
|
-
const modifiedNodeDatas = [];
|
|
36848
37376
|
const draggingNodeModel = this.getNodeModel(draggingNode._nodeId);
|
|
36849
37377
|
const dropInNode = dropType === "inner" ? dropNode : dropNode._parent;
|
|
36850
|
-
const isChangedParent = (dropNode == null ? void 0 :
|
|
37378
|
+
const isChangedParent = ((_a = dropNode._parent) == null ? void 0 : _a._id) !== ((_b = draggingNode._parent) == null ? void 0 : _b._id);
|
|
36851
37379
|
let orderNodeModel = this.getNodeModel(dropNode._nodeId);
|
|
36852
|
-
if (dropType === "inner" ||
|
|
37380
|
+
if (dropType === "inner" || isChangedParent) {
|
|
36853
37381
|
const dropNodeRs = this.findDropNodeRS(
|
|
36854
37382
|
dropInNode._nodeId,
|
|
36855
37383
|
draggingNodeModel.appDataEntityId
|
|
36856
37384
|
);
|
|
36857
37385
|
if (dropNodeRs) {
|
|
36858
37386
|
draggingNode._deData[dropNodeRs.pickupDEFName] = dropInNode._value;
|
|
36859
|
-
modifiedNodeDatas.push(draggingNode);
|
|
36860
37387
|
orderNodeModel = this.getNodeModel(dropNodeRs.childDETreeNodeId);
|
|
36861
37388
|
}
|
|
36862
|
-
}
|
|
36863
|
-
const originArr = draggingNode._parent._children;
|
|
36864
|
-
originArr.splice(originArr.indexOf(draggingNode), 1);
|
|
36865
|
-
if (dropType === "inner") {
|
|
36866
|
-
if (!dropNode._children) {
|
|
36867
|
-
dropNode._children = [];
|
|
36868
|
-
dropNode._leaf = true;
|
|
36869
|
-
this.state.expandedKeys.push(dropNode._id);
|
|
36870
|
-
}
|
|
36871
|
-
dropNode._children.push(draggingNode);
|
|
36872
|
-
} else {
|
|
36873
|
-
let insertIndex = dropInNode._children.indexOf(dropNode);
|
|
36874
|
-
if (dropType === "next") {
|
|
36875
|
-
insertIndex += 1;
|
|
36876
|
-
}
|
|
36877
|
-
dropInNode._children.splice(insertIndex, 0, draggingNode);
|
|
36878
|
-
}
|
|
36879
|
-
if (dropType === "inner" || isChangedParent) {
|
|
36880
37389
|
draggingNode._parent = dropInNode;
|
|
36881
37390
|
draggingNode._nodeId = orderNodeModel.id;
|
|
36882
37391
|
this.state.expandedKeys = this.calcExpandedKeys([dropInNode]);
|
|
37392
|
+
await this.updateDeNodeData([draggingNode]);
|
|
36883
37393
|
}
|
|
36884
|
-
const {
|
|
36885
|
-
if (
|
|
36886
|
-
|
|
36887
|
-
|
|
36888
|
-
|
|
36889
|
-
|
|
36890
|
-
|
|
36891
|
-
|
|
36892
|
-
const
|
|
36893
|
-
|
|
36894
|
-
|
|
36895
|
-
if (!isAsc) {
|
|
36896
|
-
changedArr.reverse();
|
|
36897
|
-
}
|
|
36898
|
-
const getNextSort = (num) => {
|
|
36899
|
-
return num + (100 - num % 100);
|
|
36900
|
-
};
|
|
36901
|
-
const getSort = (deData) => {
|
|
36902
|
-
return deData[sortField] || 0;
|
|
37394
|
+
const { moveAppDEActionId, appDataEntityId, allowOrder } = orderNodeModel;
|
|
37395
|
+
if (!moveAppDEActionId) {
|
|
37396
|
+
throw new RuntimeModelError66(
|
|
37397
|
+
this.model,
|
|
37398
|
+
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
37399
|
+
);
|
|
37400
|
+
}
|
|
37401
|
+
if (dropType !== "inner" && allowOrder) {
|
|
37402
|
+
const moveParams = {
|
|
37403
|
+
srftargetkey: dropNode.srfkey,
|
|
37404
|
+
srfmovetype: dropType === "prev" ? "MOVEBEFORE" : "MOVEAFTER"
|
|
36903
37405
|
};
|
|
36904
|
-
|
|
36905
|
-
|
|
36906
|
-
|
|
36907
|
-
|
|
36908
|
-
|
|
36909
|
-
|
|
36910
|
-
|
|
36911
|
-
|
|
36912
|
-
|
|
36913
|
-
|
|
36914
|
-
|
|
36915
|
-
|
|
36916
|
-
|
|
36917
|
-
|
|
36918
|
-
}
|
|
37406
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
37407
|
+
const deName = calcDeCodeNameById(appDataEntityId);
|
|
37408
|
+
const tempContext = this.context.clone();
|
|
37409
|
+
tempContext[deName] = draggingNode.srfkey;
|
|
37410
|
+
const res = await app.deService.exec(
|
|
37411
|
+
appDataEntityId,
|
|
37412
|
+
moveAppDEActionId,
|
|
37413
|
+
tempContext,
|
|
37414
|
+
moveParams
|
|
37415
|
+
);
|
|
37416
|
+
if (res.ok) {
|
|
37417
|
+
if (isChangedParent) {
|
|
37418
|
+
await this.refreshNodeChildren(draggingNode, true);
|
|
37419
|
+
await this.refreshNodeChildren(dropInNode);
|
|
36919
37420
|
} else {
|
|
36920
|
-
|
|
36921
|
-
deData[sortField] = getNextSort(lastSort);
|
|
36922
|
-
modifiedNodeDatas.push(item);
|
|
36923
|
-
}
|
|
36924
|
-
lastSort = getSort(deData);
|
|
37421
|
+
await this.refreshNodeChildren(dropInNode);
|
|
36925
37422
|
}
|
|
36926
|
-
}
|
|
37423
|
+
}
|
|
36927
37424
|
}
|
|
36928
|
-
await this.updateDeNodeData(modifiedNodeDatas);
|
|
36929
37425
|
this._evt.emit("onAfterNodeDrop", { isChangedParent });
|
|
36930
37426
|
}
|
|
36931
37427
|
/**
|
|
@@ -36978,7 +37474,7 @@ var TreeController = class extends MDControlController {
|
|
|
36978
37474
|
);
|
|
36979
37475
|
}
|
|
36980
37476
|
if (nodeData._nodeType !== "DE") {
|
|
36981
|
-
throw new
|
|
37477
|
+
throw new RuntimeError62(
|
|
36982
37478
|
ibiz.i18n.t("runtime.controller.control.tree.nodeData")
|
|
36983
37479
|
);
|
|
36984
37480
|
}
|
|
@@ -36996,7 +37492,7 @@ var TreeController = class extends MDControlController {
|
|
|
36996
37492
|
let needRefresh = false;
|
|
36997
37493
|
const treeNode = this.getNodeModel(item._nodeId);
|
|
36998
37494
|
if (!treeNode) {
|
|
36999
|
-
throw new
|
|
37495
|
+
throw new RuntimeError62(
|
|
37000
37496
|
ibiz.i18n.t("runtime.controller.control.tree.noFoundTreeNode")
|
|
37001
37497
|
);
|
|
37002
37498
|
}
|
|
@@ -37042,7 +37538,7 @@ var TreeController = class extends MDControlController {
|
|
|
37042
37538
|
};
|
|
37043
37539
|
|
|
37044
37540
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
37045
|
-
import { RuntimeError as
|
|
37541
|
+
import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
|
|
37046
37542
|
|
|
37047
37543
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
37048
37544
|
var WizardPanelService = class extends ControlService {
|
|
@@ -37230,7 +37726,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37230
37726
|
const { activeFormTag } = this.state;
|
|
37231
37727
|
const controller = this.formControllers.get(activeFormTag);
|
|
37232
37728
|
if (!controller) {
|
|
37233
|
-
throw new
|
|
37729
|
+
throw new RuntimeError63(
|
|
37234
37730
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.formController", {
|
|
37235
37731
|
activeFormTag
|
|
37236
37732
|
})
|
|
@@ -37280,7 +37776,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37280
37776
|
getWizardFormByTag(tag) {
|
|
37281
37777
|
var _a;
|
|
37282
37778
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
37283
|
-
throw new
|
|
37779
|
+
throw new RuntimeError63(
|
|
37284
37780
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.noConfiguration")
|
|
37285
37781
|
);
|
|
37286
37782
|
return;
|
|
@@ -37291,7 +37787,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37291
37787
|
}
|
|
37292
37788
|
);
|
|
37293
37789
|
if (!wizardForm) {
|
|
37294
|
-
throw new
|
|
37790
|
+
throw new RuntimeError63(
|
|
37295
37791
|
ibiz.i18n.t(
|
|
37296
37792
|
"runtime.controller.control.wizardPanel.wizardFormIdentifier",
|
|
37297
37793
|
{ tag }
|
|
@@ -37383,7 +37879,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37383
37879
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
37384
37880
|
}
|
|
37385
37881
|
if (!prevTag) {
|
|
37386
|
-
throw new
|
|
37882
|
+
throw new RuntimeError63(
|
|
37387
37883
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.noPreviousForm")
|
|
37388
37884
|
);
|
|
37389
37885
|
}
|
|
@@ -37421,7 +37917,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37421
37917
|
});
|
|
37422
37918
|
const nextWizardStep = wizardSteps[index + 1];
|
|
37423
37919
|
if (!nextWizardStep) {
|
|
37424
|
-
throw new
|
|
37920
|
+
throw new RuntimeError63(
|
|
37425
37921
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.nextStep")
|
|
37426
37922
|
);
|
|
37427
37923
|
}
|
|
@@ -37432,7 +37928,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37432
37928
|
}
|
|
37433
37929
|
}
|
|
37434
37930
|
if (!nextTag) {
|
|
37435
|
-
throw new
|
|
37931
|
+
throw new RuntimeError63(
|
|
37436
37932
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.nextForm")
|
|
37437
37933
|
);
|
|
37438
37934
|
}
|
|
@@ -37818,11 +38314,11 @@ var MDCtrlController = class extends MDControlController {
|
|
|
37818
38314
|
};
|
|
37819
38315
|
|
|
37820
38316
|
// src/controller/control/kanban/kanban.controller.ts
|
|
37821
|
-
import { RuntimeError as
|
|
37822
|
-
import { clone as
|
|
38317
|
+
import { RuntimeError as RuntimeError64, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
38318
|
+
import { clone as clone36, isNil as isNil33 } from "ramda";
|
|
37823
38319
|
|
|
37824
38320
|
// src/controller/control/kanban/kanban.service.ts
|
|
37825
|
-
import { clone as
|
|
38321
|
+
import { clone as clone35 } from "ramda";
|
|
37826
38322
|
var KanbanService = class extends DataViewControlService {
|
|
37827
38323
|
/**
|
|
37828
38324
|
* 更新分组数据
|
|
@@ -37851,7 +38347,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
37851
38347
|
*/
|
|
37852
38348
|
async moveOrderItem(context, data, args) {
|
|
37853
38349
|
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
37854
|
-
const params =
|
|
38350
|
+
const params = clone35(data.getOrigin());
|
|
37855
38351
|
Object.assign(params, args);
|
|
37856
38352
|
let res = await this.exec(moveAction, context, params, {
|
|
37857
38353
|
srfupdateitem: true
|
|
@@ -37937,7 +38433,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37937
38433
|
} else {
|
|
37938
38434
|
const toNum = Number(sortValue);
|
|
37939
38435
|
if (Number.isNaN(toNum)) {
|
|
37940
|
-
throw new
|
|
38436
|
+
throw new RuntimeError64(
|
|
37941
38437
|
ibiz.i18n.t("runtime.controller.control.grid.convertedValue", {
|
|
37942
38438
|
srfmajortext: item.srfmajortext
|
|
37943
38439
|
})
|
|
@@ -38061,7 +38557,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
38061
38557
|
}
|
|
38062
38558
|
handleDataGroup() {
|
|
38063
38559
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
38064
|
-
throw new
|
|
38560
|
+
throw new RuntimeError64(
|
|
38065
38561
|
ibiz.i18n.t("runtime.controller.control.kanban.groupedOn")
|
|
38066
38562
|
);
|
|
38067
38563
|
}
|
|
@@ -38183,7 +38679,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
38183
38679
|
}
|
|
38184
38680
|
return moveData;
|
|
38185
38681
|
};
|
|
38186
|
-
const draggedItem =
|
|
38682
|
+
const draggedItem = clone36(fromGroup.children[fromIndex]);
|
|
38187
38683
|
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
38188
38684
|
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
38189
38685
|
if (info.from !== info.to) {
|
|
@@ -38451,12 +38947,12 @@ var KanbanController = class extends DataViewControlController {
|
|
|
38451
38947
|
|
|
38452
38948
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
38453
38949
|
import {
|
|
38454
|
-
RuntimeError as
|
|
38950
|
+
RuntimeError as RuntimeError65,
|
|
38455
38951
|
RuntimeModelError as RuntimeModelError69,
|
|
38456
38952
|
awaitTimeout as awaitTimeout3,
|
|
38457
38953
|
recursiveIterate as recursiveIterate12
|
|
38458
38954
|
} from "@ibiz-template/core";
|
|
38459
|
-
import { clone as
|
|
38955
|
+
import { clone as clone37 } from "ramda";
|
|
38460
38956
|
|
|
38461
38957
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
38462
38958
|
var TreeGridExService = class extends TreeService {
|
|
@@ -38736,13 +39232,13 @@ var TreeGridExController = class extends TreeController {
|
|
|
38736
39232
|
return;
|
|
38737
39233
|
}
|
|
38738
39234
|
if (nodeData._nodeType !== "DE") {
|
|
38739
|
-
throw new
|
|
39235
|
+
throw new RuntimeError65(
|
|
38740
39236
|
ibiz.i18n.t("runtime.controller.control.gantt.nonentity")
|
|
38741
39237
|
);
|
|
38742
39238
|
}
|
|
38743
39239
|
const rowState = this.state.rows[nodeData._uuid];
|
|
38744
39240
|
if (!rowState) {
|
|
38745
|
-
throw new
|
|
39241
|
+
throw new RuntimeError65(
|
|
38746
39242
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
38747
39243
|
);
|
|
38748
39244
|
}
|
|
@@ -38758,7 +39254,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
38758
39254
|
const { appDataEntityId, updateAppDEActionId } = nodeModel;
|
|
38759
39255
|
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
38760
39256
|
if (isCreate) {
|
|
38761
|
-
throw new
|
|
39257
|
+
throw new RuntimeError65(
|
|
38762
39258
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.noSupportCreation")
|
|
38763
39259
|
);
|
|
38764
39260
|
}
|
|
@@ -38923,12 +39419,12 @@ var TreeGridExController = class extends TreeController {
|
|
|
38923
39419
|
(item) => item.showRowEdit
|
|
38924
39420
|
);
|
|
38925
39421
|
if (editingRow) {
|
|
38926
|
-
throw new
|
|
39422
|
+
throw new RuntimeError65(
|
|
38927
39423
|
ibiz.i18n.t("runtime.controller.control.grid.lineEditing")
|
|
38928
39424
|
);
|
|
38929
39425
|
}
|
|
38930
39426
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
38931
|
-
row.cacheData =
|
|
39427
|
+
row.cacheData = clone37(row.data);
|
|
38932
39428
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
38933
39429
|
Object.assign(row.data, defaultVal);
|
|
38934
39430
|
}
|
|
@@ -39038,10 +39534,10 @@ var TreeGridExColumnController = class {
|
|
|
39038
39534
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
|
|
39039
39535
|
import {
|
|
39040
39536
|
DataTypes as DataTypes5,
|
|
39041
|
-
RuntimeError as
|
|
39537
|
+
RuntimeError as RuntimeError66,
|
|
39042
39538
|
RuntimeModelError as RuntimeModelError70
|
|
39043
39539
|
} from "@ibiz-template/core";
|
|
39044
|
-
import { clone as
|
|
39540
|
+
import { clone as clone38 } from "ramda";
|
|
39045
39541
|
import dayjs7 from "dayjs";
|
|
39046
39542
|
var TreeGridExNodeColumnController = class {
|
|
39047
39543
|
/**
|
|
@@ -39243,7 +39739,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
39243
39739
|
const valueItem = this.nodeColumn.linkValueItem || "srfkey";
|
|
39244
39740
|
const value = row.data[valueItem];
|
|
39245
39741
|
if (value == null) {
|
|
39246
|
-
throw new
|
|
39742
|
+
throw new RuntimeError66(
|
|
39247
39743
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.noPickedUp", {
|
|
39248
39744
|
valueItem
|
|
39249
39745
|
})
|
|
@@ -39258,7 +39754,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
39258
39754
|
srfkey: value,
|
|
39259
39755
|
...wfContext
|
|
39260
39756
|
});
|
|
39261
|
-
const tempParams =
|
|
39757
|
+
const tempParams = clone38(this.params);
|
|
39262
39758
|
const { userParam } = this.nodeColumn;
|
|
39263
39759
|
if (userParam) {
|
|
39264
39760
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -39672,7 +40168,7 @@ var TreeGridService = class extends GridService {
|
|
|
39672
40168
|
};
|
|
39673
40169
|
|
|
39674
40170
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
39675
|
-
import { RuntimeError as
|
|
40171
|
+
import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
|
|
39676
40172
|
import { createUUID as createUUID14 } from "qx-util";
|
|
39677
40173
|
|
|
39678
40174
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -39892,7 +40388,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
39892
40388
|
(item) => item.id === id
|
|
39893
40389
|
);
|
|
39894
40390
|
if (panelUiItemIndex < 0) {
|
|
39895
|
-
throw new
|
|
40391
|
+
throw new RuntimeError67(
|
|
39896
40392
|
ibiz.i18n.t("runtime.controller.control.meditViewPanel.dataExist")
|
|
39897
40393
|
);
|
|
39898
40394
|
}
|
|
@@ -40135,15 +40631,14 @@ var ReportPanelBaseGenerator = class {
|
|
|
40135
40631
|
this.config = {};
|
|
40136
40632
|
this.model = model;
|
|
40137
40633
|
this.reportPanel = reportPanel;
|
|
40138
|
-
this.setConfig();
|
|
40139
40634
|
}
|
|
40140
40635
|
/**
|
|
40141
|
-
*
|
|
40636
|
+
* 初始化配置
|
|
40142
40637
|
*
|
|
40143
|
-
* @
|
|
40144
|
-
* @
|
|
40638
|
+
* @author tony001
|
|
40639
|
+
* @date 2024-06-26 16:06:01
|
|
40145
40640
|
*/
|
|
40146
|
-
|
|
40641
|
+
async initConfig() {
|
|
40147
40642
|
}
|
|
40148
40643
|
/**
|
|
40149
40644
|
* 初始化
|
|
@@ -40169,12 +40664,12 @@ var ReportPanelBaseGenerator = class {
|
|
|
40169
40664
|
// src/controller/control/report-panel/generator/user-generator.ts
|
|
40170
40665
|
var UserReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
40171
40666
|
/**
|
|
40172
|
-
*
|
|
40667
|
+
* 初始化配置
|
|
40173
40668
|
*
|
|
40174
40669
|
* @protected
|
|
40175
40670
|
* @memberof UserReportPanelGenerator
|
|
40176
40671
|
*/
|
|
40177
|
-
|
|
40672
|
+
async initConfig() {
|
|
40178
40673
|
this.config = {
|
|
40179
40674
|
CONFIG: {
|
|
40180
40675
|
fitView: true,
|
|
@@ -40232,32 +40727,20 @@ var User2ReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
40232
40727
|
};
|
|
40233
40728
|
|
|
40234
40729
|
// src/controller/control/report-panel/generator/bi-generator.ts
|
|
40235
|
-
import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
|
|
40236
40730
|
var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
40237
40731
|
/**
|
|
40238
|
-
*
|
|
40732
|
+
* 初始化配置
|
|
40239
40733
|
*
|
|
40240
40734
|
* @author tony001
|
|
40241
|
-
* @date 2024-06-
|
|
40242
|
-
* @
|
|
40735
|
+
* @date 2024-06-26 16:06:54
|
|
40736
|
+
* @return {*} {Promise<void>}
|
|
40243
40737
|
*/
|
|
40244
|
-
|
|
40245
|
-
|
|
40246
|
-
|
|
40247
|
-
|
|
40248
|
-
|
|
40249
|
-
|
|
40250
|
-
}
|
|
40251
|
-
const sourceModel = ScriptFactory.execScriptFn(
|
|
40252
|
-
{},
|
|
40253
|
-
this.model.appDEReport.reportUIModel,
|
|
40254
|
-
{
|
|
40255
|
-
isAsync: false,
|
|
40256
|
-
singleRowReturn: true
|
|
40257
|
-
}
|
|
40258
|
-
);
|
|
40259
|
-
sourceModel.reportTag = this.model.appDEReport.id;
|
|
40260
|
-
this.config = sourceModel;
|
|
40738
|
+
async initConfig() {
|
|
40739
|
+
const { appDEReport } = this.model;
|
|
40740
|
+
const { appBIReport } = appDEReport;
|
|
40741
|
+
const appBISchemeId = appDEReport.appBISchemeId.split(".").pop();
|
|
40742
|
+
appBIReport.appBISchemeId = appBISchemeId;
|
|
40743
|
+
this.config = appBIReport;
|
|
40261
40744
|
}
|
|
40262
40745
|
/**
|
|
40263
40746
|
* 加载数据
|
|
@@ -40363,6 +40846,9 @@ var ReportPanelController = class extends ControlController {
|
|
|
40363
40846
|
async onCreated() {
|
|
40364
40847
|
await super.onCreated();
|
|
40365
40848
|
this.generator = ReportPanelGeneratorFactory.getInstance(this.model, this);
|
|
40849
|
+
if (this.generator) {
|
|
40850
|
+
await this.generator.initConfig();
|
|
40851
|
+
}
|
|
40366
40852
|
this.dataEntity = await ibiz.hub.getAppDataEntity(
|
|
40367
40853
|
this.model.appDataEntityId,
|
|
40368
40854
|
this.model.appId
|
|
@@ -40497,7 +40983,9 @@ var ReportPanelController = class extends ControlController {
|
|
|
40497
40983
|
dismiss: (_data) => modal.dismiss(_data),
|
|
40498
40984
|
context: this.context,
|
|
40499
40985
|
viewParams: this.params,
|
|
40500
|
-
config:
|
|
40986
|
+
config: await ibiz.util.biReport.translateReportPanelToConfig(
|
|
40987
|
+
this.model
|
|
40988
|
+
)
|
|
40501
40989
|
},
|
|
40502
40990
|
{
|
|
40503
40991
|
width: "90%",
|
|
@@ -41337,83 +41825,6 @@ var GanttController = class extends TreeGridExController {
|
|
|
41337
41825
|
}
|
|
41338
41826
|
}
|
|
41339
41827
|
}
|
|
41340
|
-
/**
|
|
41341
|
-
* 处理节点拖入事件
|
|
41342
|
-
*
|
|
41343
|
-
* @param {IGanttNodeData} draggingNode 拖动节点
|
|
41344
|
-
* @param {IGanttNodeData} dropNode 目标节点
|
|
41345
|
-
* @param {('inner' | 'prev' | 'next')} dropType 拖放类型
|
|
41346
|
-
* @return {*} {Promise<void>}
|
|
41347
|
-
* @memberof GanttController
|
|
41348
|
-
*/
|
|
41349
|
-
async onNodeDrop(draggingNode, dropNode, dropType) {
|
|
41350
|
-
var _a, _b;
|
|
41351
|
-
if (dropType === "inner" && !dropNode._leaf && dropNode._children === void 0) {
|
|
41352
|
-
await this.expandNodeByKey([dropNode._id]);
|
|
41353
|
-
}
|
|
41354
|
-
const modifiedNodeDatas = [];
|
|
41355
|
-
const draggingNodeModel = this.getNodeModel(draggingNode._nodeId);
|
|
41356
|
-
const dropInNode = dropType === "inner" ? dropNode : dropNode._parent;
|
|
41357
|
-
let orderNodeModel = this.getNodeModel(dropNode._nodeId);
|
|
41358
|
-
if (dropType === "inner" || ((_a = dropNode._parent) == null ? void 0 : _a._id) !== ((_b = draggingNode._parent) == null ? void 0 : _b._id)) {
|
|
41359
|
-
const dropNodeRs = this.findDropNodeRS(
|
|
41360
|
-
dropInNode._nodeId,
|
|
41361
|
-
draggingNodeModel.appDataEntityId
|
|
41362
|
-
);
|
|
41363
|
-
if (dropNodeRs) {
|
|
41364
|
-
draggingNode._deData[dropNodeRs.pickupDEFName] = dropInNode._value;
|
|
41365
|
-
modifiedNodeDatas.push(draggingNode);
|
|
41366
|
-
orderNodeModel = this.getNodeModel(dropNodeRs.childDETreeNodeId);
|
|
41367
|
-
}
|
|
41368
|
-
draggingNode._parent = dropInNode;
|
|
41369
|
-
draggingNode._nodeId = orderNodeModel.id;
|
|
41370
|
-
}
|
|
41371
|
-
const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
|
|
41372
|
-
if (allowOrder === true) {
|
|
41373
|
-
if (!sortAppDEFieldId) {
|
|
41374
|
-
throw new RuntimeModelError72(
|
|
41375
|
-
orderNodeModel,
|
|
41376
|
-
ibiz.i18n.t("runtime.controller.control.tree.sortAttribute")
|
|
41377
|
-
);
|
|
41378
|
-
}
|
|
41379
|
-
const sortField = sortAppDEFieldId.toLowerCase();
|
|
41380
|
-
const isAsc = sortDir === "ASC";
|
|
41381
|
-
const changedArr = dropInNode._children;
|
|
41382
|
-
if (!isAsc) {
|
|
41383
|
-
changedArr.reverse();
|
|
41384
|
-
}
|
|
41385
|
-
const getNextSort = (num) => {
|
|
41386
|
-
return num + (100 - num % 100);
|
|
41387
|
-
};
|
|
41388
|
-
const getSort = (deData) => {
|
|
41389
|
-
return deData[sortField] || 0;
|
|
41390
|
-
};
|
|
41391
|
-
let lastSort;
|
|
41392
|
-
changedArr.forEach((item, index) => {
|
|
41393
|
-
const deData = item._deData;
|
|
41394
|
-
if (lastSort === void 0) {
|
|
41395
|
-
if (item === draggingNode) {
|
|
41396
|
-
if (index === 0) {
|
|
41397
|
-
lastSort = 100;
|
|
41398
|
-
} else {
|
|
41399
|
-
lastSort = getNextSort(getSort(changedArr[index - 1]._deData));
|
|
41400
|
-
}
|
|
41401
|
-
deData[sortField] = lastSort;
|
|
41402
|
-
if (modifiedNodeDatas.indexOf(item) === -1) {
|
|
41403
|
-
modifiedNodeDatas.push(item);
|
|
41404
|
-
}
|
|
41405
|
-
}
|
|
41406
|
-
} else {
|
|
41407
|
-
if (lastSort >= getSort(deData)) {
|
|
41408
|
-
deData[sortField] = getNextSort(lastSort);
|
|
41409
|
-
modifiedNodeDatas.push(item);
|
|
41410
|
-
}
|
|
41411
|
-
lastSort = getSort(deData);
|
|
41412
|
-
}
|
|
41413
|
-
});
|
|
41414
|
-
}
|
|
41415
|
-
await this.updateDeNodeData(modifiedNodeDatas);
|
|
41416
|
-
}
|
|
41417
41828
|
onDEDataChange(msg) {
|
|
41418
41829
|
}
|
|
41419
41830
|
};
|
|
@@ -41527,7 +41938,7 @@ import { QXEvent as QXEvent11 } from "qx-util";
|
|
|
41527
41938
|
|
|
41528
41939
|
// src/controller/notification/async-action.controller.ts
|
|
41529
41940
|
import { QXEvent as QXEvent9 } from "qx-util";
|
|
41530
|
-
import { clone as
|
|
41941
|
+
import { clone as clone39 } from "ramda";
|
|
41531
41942
|
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
41532
41943
|
import dayjs8 from "dayjs";
|
|
41533
41944
|
var AsyncActionController = class {
|
|
@@ -41638,7 +42049,7 @@ var AsyncActionController = class {
|
|
|
41638
42049
|
} else {
|
|
41639
42050
|
this.noticeResult(action);
|
|
41640
42051
|
}
|
|
41641
|
-
this.evt.emit("add",
|
|
42052
|
+
this.evt.emit("add", clone39(action));
|
|
41642
42053
|
this.evt.emit("dataChange");
|
|
41643
42054
|
}
|
|
41644
42055
|
/**
|
|
@@ -41660,7 +42071,7 @@ var AsyncActionController = class {
|
|
|
41660
42071
|
}
|
|
41661
42072
|
this.noticeResult(action);
|
|
41662
42073
|
}
|
|
41663
|
-
this.evt.emit("change",
|
|
42074
|
+
this.evt.emit("change", clone39(action));
|
|
41664
42075
|
this.evt.emit("dataChange");
|
|
41665
42076
|
}
|
|
41666
42077
|
noticeResult(action) {
|
|
@@ -42302,6 +42713,11 @@ var AppHub = class {
|
|
|
42302
42713
|
const app = await this.getAppAsync(appId2);
|
|
42303
42714
|
return app.deService.getService(context, entityId);
|
|
42304
42715
|
}
|
|
42716
|
+
async translationModelToDsl(data, type) {
|
|
42717
|
+
if (this.modelLoaderProvider) {
|
|
42718
|
+
return this.modelLoaderProvider.translationModelToDsl(data, type);
|
|
42719
|
+
}
|
|
42720
|
+
}
|
|
42305
42721
|
reset() {
|
|
42306
42722
|
this.appMap.clear();
|
|
42307
42723
|
this.configCache = void 0;
|
|
@@ -42820,7 +43236,7 @@ var ViewEngineBase = class {
|
|
|
42820
43236
|
|
|
42821
43237
|
// src/engine/md-view.engine.ts
|
|
42822
43238
|
import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
42823
|
-
import { clone as
|
|
43239
|
+
import { clone as clone40 } from "ramda";
|
|
42824
43240
|
var MDViewEngine = class extends ViewEngineBase {
|
|
42825
43241
|
/**
|
|
42826
43242
|
* 多数据部件名称
|
|
@@ -43075,7 +43491,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
43075
43491
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
43076
43492
|
);
|
|
43077
43493
|
}
|
|
43078
|
-
const params =
|
|
43494
|
+
const params = clone40(this.view.params);
|
|
43079
43495
|
if (copyMode) {
|
|
43080
43496
|
params.srfcopymode = copyMode;
|
|
43081
43497
|
}
|
|
@@ -43323,6 +43739,13 @@ var GlobalUtil = class {
|
|
|
43323
43739
|
* @memberof GlobalUtil
|
|
43324
43740
|
*/
|
|
43325
43741
|
this.file = new FileUtil();
|
|
43742
|
+
/**
|
|
43743
|
+
* bi报表工具类
|
|
43744
|
+
*
|
|
43745
|
+
* @author tony001
|
|
43746
|
+
* @date 2024-06-30 11:06:13
|
|
43747
|
+
*/
|
|
43748
|
+
this.biReport = new BIReportUtil();
|
|
43326
43749
|
this.error.register(new DefaultErrorHandler());
|
|
43327
43750
|
}
|
|
43328
43751
|
/**
|
|
@@ -45788,6 +46211,7 @@ export {
|
|
|
45788
46211
|
Application,
|
|
45789
46212
|
AsyncActionService,
|
|
45790
46213
|
AuthorityService,
|
|
46214
|
+
BIReportUtil,
|
|
45791
46215
|
BackendUIActionProvider,
|
|
45792
46216
|
BaseController,
|
|
45793
46217
|
BrowserPlatformProvider,
|