@ibiz-template/runtime 0.7.26-alpha.1 → 0.7.26
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 +962 -350
- 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/common/control/md-control.controller.js +2 -1
- package/out/controller/control/calendar/calendar.controller.d.ts +15 -0
- package/out/controller/control/calendar/calendar.controller.d.ts.map +1 -1
- package/out/controller/control/calendar/calendar.controller.js +85 -16
- package/out/controller/control/calendar/calendar.service.d.ts +10 -0
- package/out/controller/control/calendar/calendar.service.d.ts.map +1 -1
- package/out/controller/control/calendar/calendar.service.js +21 -1
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +3 -1
- 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 +242 -80
- 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-form.controller.d.ts +14 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.js +29 -1
- 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 +15 -2
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +32 -2
- 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 +2 -1
- 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 +14 -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 +66 -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 +3 -0
- 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/notification/internal-message.controller.d.ts.map +1 -1
- package/out/controller/notification/internal-message.controller.js +7 -1
- 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/state/control/i-calendar.state.d.ts +21 -0
- package/out/interface/controller/state/control/i-calendar.state.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/provider/model-loader.provider.d.ts +10 -0
- package/out/interface/provider/model-loader.provider.d.ts.map +1 -1
- package/out/interface/service/i-data-entity/i-data-entity.d.ts +7 -0
- package/out/interface/service/i-data-entity/i-data-entity.d.ts.map +1 -1
- package/out/service/app-data-entity/app-data-entity.d.ts +1 -0
- package/out/service/app-data-entity/app-data-entity.d.ts.map +1 -1
- package/out/service/app-data-entity/app-data-entity.js +2 -0
- 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/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.d.ts +15 -0
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.js +17 -2
- package/out/utils/bi-report-util/bi-report-util.d.ts +59 -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 +108 -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 +12 -0
- package/out/utils/script/script-factory.d.ts.map +1 -1
- package/out/utils/script/script-factory.js +15 -0
- 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 {
|
|
@@ -1834,6 +1834,24 @@ var ScriptFactory = class {
|
|
|
1834
1834
|
args
|
|
1835
1835
|
);
|
|
1836
1836
|
}
|
|
1837
|
+
/**
|
|
1838
|
+
* 直接创建并同步执行脚本
|
|
1839
|
+
*
|
|
1840
|
+
* @author tony001
|
|
1841
|
+
* @date 2024-06-25 14:06:25
|
|
1842
|
+
* @static
|
|
1843
|
+
* @param {IParams} args
|
|
1844
|
+
* @param {string} scriptCode
|
|
1845
|
+
* @param {IScriptFunctionOpts} [options={}]
|
|
1846
|
+
* @return {*} {Promise<unknown>}
|
|
1847
|
+
*/
|
|
1848
|
+
static async asyncExecScriptFn(args, scriptCode, options = {}) {
|
|
1849
|
+
const result = await this.createScriptFn(Object.keys(args), scriptCode, {
|
|
1850
|
+
...options,
|
|
1851
|
+
isAsync: true
|
|
1852
|
+
}).exec(args);
|
|
1853
|
+
return result;
|
|
1854
|
+
}
|
|
1837
1855
|
/**
|
|
1838
1856
|
* 执行单行脚本
|
|
1839
1857
|
* @author lxm
|
|
@@ -6708,6 +6726,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
6708
6726
|
clone() {
|
|
6709
6727
|
const entity = new _AppDataEntity(this._entity, this._data);
|
|
6710
6728
|
entity.srfkey = this.srfkey;
|
|
6729
|
+
entity.srfordervalue = this.srfordervalue;
|
|
6711
6730
|
return entity;
|
|
6712
6731
|
}
|
|
6713
6732
|
/**
|
|
@@ -6722,6 +6741,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
6722
6741
|
let _data = {};
|
|
6723
6742
|
if (data instanceof _AppDataEntity) {
|
|
6724
6743
|
_data = data._data;
|
|
6744
|
+
this.srfordervalue = data.srfordervalue;
|
|
6725
6745
|
} else {
|
|
6726
6746
|
_data = data;
|
|
6727
6747
|
}
|
|
@@ -11443,10 +11463,11 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11443
11463
|
});
|
|
11444
11464
|
}
|
|
11445
11465
|
calcIcon(model) {
|
|
11446
|
-
|
|
11466
|
+
let icon = super.calcIcon(model) || {};
|
|
11447
11467
|
const { iconAppDEFieldId, detreeNodeDataItems } = model;
|
|
11448
11468
|
if (iconAppDEFieldId && this._deData[iconAppDEFieldId]) {
|
|
11449
11469
|
const value = this._deData[iconAppDEFieldId];
|
|
11470
|
+
icon = {};
|
|
11450
11471
|
if (value.indexOf("fa-") !== -1) {
|
|
11451
11472
|
icon.cssClass = value;
|
|
11452
11473
|
} else {
|
|
@@ -13071,8 +13092,8 @@ var baseStyle = {
|
|
|
13071
13092
|
position: "fixed",
|
|
13072
13093
|
zIndex: "10000"
|
|
13073
13094
|
};
|
|
13074
|
-
function cloneElement(
|
|
13075
|
-
const element = getAnimationElement(
|
|
13095
|
+
function cloneElement(clone41, teleport = document.body, isRemoveChild = true) {
|
|
13096
|
+
const element = getAnimationElement(clone41);
|
|
13076
13097
|
if (element == null) {
|
|
13077
13098
|
throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
|
|
13078
13099
|
}
|
|
@@ -13491,11 +13512,11 @@ function arrayContains(arr, val) {
|
|
|
13491
13512
|
});
|
|
13492
13513
|
}
|
|
13493
13514
|
function cloneObject(o) {
|
|
13494
|
-
var
|
|
13515
|
+
var clone41 = {};
|
|
13495
13516
|
for (var p in o) {
|
|
13496
|
-
|
|
13517
|
+
clone41[p] = o[p];
|
|
13497
13518
|
}
|
|
13498
|
-
return
|
|
13519
|
+
return clone41;
|
|
13499
13520
|
}
|
|
13500
13521
|
function replaceObjectProps(o1, o2) {
|
|
13501
13522
|
var o = cloneObject(o1);
|
|
@@ -15056,6 +15077,122 @@ var ShortCutUtil = class {
|
|
|
15056
15077
|
}
|
|
15057
15078
|
};
|
|
15058
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 = this.translateReportToConfig(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
|
+
translateReportToConfig(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
|
+
const biReportItems = {};
|
|
15155
|
+
if (data.pssysbireportitems && data.pssysbireportitems.length > 0) {
|
|
15156
|
+
data.pssysbireportitems.forEach((item) => {
|
|
15157
|
+
var _a, _b;
|
|
15158
|
+
if (item.birepitemtype === "MEASURE") {
|
|
15159
|
+
if (!biReportItems.measure) {
|
|
15160
|
+
biReportItems.measure = [];
|
|
15161
|
+
}
|
|
15162
|
+
biReportItems.measure.push({
|
|
15163
|
+
pssysbischemeid: item.pssysbischemeid,
|
|
15164
|
+
pssysbicubemeasureid: item.pssysbicubemeasureid,
|
|
15165
|
+
pssysbicubeid: item.pssysbicubeid,
|
|
15166
|
+
codename: (_a = item.pssysbicubemeasureid) == null ? void 0 : _a.split(".").pop()
|
|
15167
|
+
});
|
|
15168
|
+
}
|
|
15169
|
+
if (item.birepitemtype === "DIMENSION") {
|
|
15170
|
+
if (!biReportItems.dimension) {
|
|
15171
|
+
biReportItems.dimension = [];
|
|
15172
|
+
}
|
|
15173
|
+
biReportItems.dimension.push({
|
|
15174
|
+
pssysbischemeid: item.pssysbischemeid,
|
|
15175
|
+
pssysbicubedimensionid: item.pssysbicubedimensionid,
|
|
15176
|
+
pssysbicubeid: item.pssysbicubeid,
|
|
15177
|
+
codename: (_b = item.pssysbicubedimensionid) == null ? void 0 : _b.split(".").pop()
|
|
15178
|
+
});
|
|
15179
|
+
}
|
|
15180
|
+
});
|
|
15181
|
+
}
|
|
15182
|
+
const propertyData = {
|
|
15183
|
+
caption: data.pssysbireportname
|
|
15184
|
+
};
|
|
15185
|
+
if (Object.keys(biReportItems).length > 0) {
|
|
15186
|
+
Object.assign(propertyData, { data: biReportItems });
|
|
15187
|
+
}
|
|
15188
|
+
if (biReportUIModel.style) {
|
|
15189
|
+
Object.assign(propertyData, { style: biReportUIModel.style });
|
|
15190
|
+
}
|
|
15191
|
+
config.propertyData = propertyData;
|
|
15192
|
+
return config;
|
|
15193
|
+
}
|
|
15194
|
+
};
|
|
15195
|
+
|
|
15059
15196
|
// src/utils/dr-ctrl-util/index.ts
|
|
15060
15197
|
function calcItemVisibleByCounter(item, counter) {
|
|
15061
15198
|
const { enableMode, counterId } = item;
|
|
@@ -15113,8 +15250,8 @@ async function calcItemVisible(item, context, params, appDeId, appId2, data) {
|
|
|
15113
15250
|
}
|
|
15114
15251
|
|
|
15115
15252
|
// src/command/app/open-app-view/open-app-view.ts
|
|
15116
|
-
import { ModelError as ModelError15, RuntimeError as
|
|
15117
|
-
import { clone as
|
|
15253
|
+
import { ModelError as ModelError15, RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
15254
|
+
import { clone as clone19 } from "ramda";
|
|
15118
15255
|
var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
15119
15256
|
constructor() {
|
|
15120
15257
|
ibiz.commands.register(_OpenAppViewCommand.TAG, this.exec.bind(this));
|
|
@@ -15131,13 +15268,13 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
15131
15268
|
* @return {*} {(Promise<IModalData | void>)}
|
|
15132
15269
|
*/
|
|
15133
15270
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
15134
|
-
const context =
|
|
15271
|
+
const context = clone19(_context);
|
|
15135
15272
|
if (context.srfsimple) {
|
|
15136
15273
|
delete context.srfsimple;
|
|
15137
15274
|
}
|
|
15138
15275
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
15139
15276
|
if (!appView) {
|
|
15140
|
-
throw new
|
|
15277
|
+
throw new RuntimeError26(
|
|
15141
15278
|
ibiz.i18n.t("runtime.command.app.noFindApplicationView", {
|
|
15142
15279
|
appViewId
|
|
15143
15280
|
})
|
|
@@ -15260,7 +15397,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
15260
15397
|
async openPopover(appView, context, params = {}, opts = {}) {
|
|
15261
15398
|
const { event, modalOption } = opts;
|
|
15262
15399
|
if (!event) {
|
|
15263
|
-
throw new
|
|
15400
|
+
throw new RuntimeError26(ibiz.i18n.t("runtime.command.app.missingEvent"));
|
|
15264
15401
|
}
|
|
15265
15402
|
return ibiz.openView.popover(appView.id, event, context, params, {
|
|
15266
15403
|
...modalOption
|
|
@@ -15318,7 +15455,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15318
15455
|
const app = await ibiz.hub.getAppAsync(context.srfappid);
|
|
15319
15456
|
const appFunc = app.getAppFunc(appFuncId);
|
|
15320
15457
|
if (!appFunc) {
|
|
15321
|
-
throw new
|
|
15458
|
+
throw new RuntimeError27(
|
|
15322
15459
|
ibiz.i18n.t("runtime.command.app.noFindApplicationFunction", {
|
|
15323
15460
|
appFuncId
|
|
15324
15461
|
})
|
|
@@ -15362,7 +15499,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15362
15499
|
*/
|
|
15363
15500
|
async openAppView(appFunc, context, params, opts) {
|
|
15364
15501
|
if (!appFunc.appViewId) {
|
|
15365
|
-
throw new
|
|
15502
|
+
throw new RuntimeError27(
|
|
15366
15503
|
ibiz.i18n.t("runtime.command.app.noFindApplicationView", {
|
|
15367
15504
|
appViewId: appFunc.appViewId
|
|
15368
15505
|
})
|
|
@@ -15400,7 +15537,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15400
15537
|
*/
|
|
15401
15538
|
openPdAppFunc(appFunc, context, params) {
|
|
15402
15539
|
ibiz.log.warn("openPdAppFunc", appFunc, context, params);
|
|
15403
|
-
throw new
|
|
15540
|
+
throw new RuntimeError27(ibiz.i18n.t("runtime.common.unrealized"));
|
|
15404
15541
|
}
|
|
15405
15542
|
/**
|
|
15406
15543
|
* 执行 JavaScript 脚本
|
|
@@ -15414,7 +15551,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15414
15551
|
*/
|
|
15415
15552
|
executeJavaScript(appFunc, context, params) {
|
|
15416
15553
|
ibiz.log.warn("executeJavaScript", appFunc, context, params);
|
|
15417
|
-
throw new
|
|
15554
|
+
throw new RuntimeError27(ibiz.i18n.t("runtime.common.unrealized"));
|
|
15418
15555
|
}
|
|
15419
15556
|
/**
|
|
15420
15557
|
* 自定义应用功能
|
|
@@ -15428,7 +15565,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15428
15565
|
*/
|
|
15429
15566
|
custom(appFunc, context, params) {
|
|
15430
15567
|
ibiz.log.warn("custom", appFunc, context, params);
|
|
15431
|
-
throw new
|
|
15568
|
+
throw new RuntimeError27(ibiz.i18n.t("runtime.common.unrealized"));
|
|
15432
15569
|
}
|
|
15433
15570
|
};
|
|
15434
15571
|
/**
|
|
@@ -15449,7 +15586,7 @@ function installCommand() {
|
|
|
15449
15586
|
}
|
|
15450
15587
|
|
|
15451
15588
|
// src/app-hub.ts
|
|
15452
|
-
import { RuntimeError as
|
|
15589
|
+
import { RuntimeError as RuntimeError69 } from "@ibiz-template/core";
|
|
15453
15590
|
|
|
15454
15591
|
// src/application.ts
|
|
15455
15592
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -15705,7 +15842,7 @@ var Convert = class {
|
|
|
15705
15842
|
};
|
|
15706
15843
|
|
|
15707
15844
|
// src/hub/config/app-view-config-service.ts
|
|
15708
|
-
import { RuntimeError as
|
|
15845
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
15709
15846
|
var AppViewConfigService = class {
|
|
15710
15847
|
constructor() {
|
|
15711
15848
|
/**
|
|
@@ -15776,7 +15913,7 @@ var AppViewConfigService = class {
|
|
|
15776
15913
|
if (!this.viewConfigs.has(id)) {
|
|
15777
15914
|
const model = await ibiz.hub.getAppView(id);
|
|
15778
15915
|
if (!model) {
|
|
15779
|
-
throw new
|
|
15916
|
+
throw new RuntimeError28(ibiz.i18n.t("runtime.hub.noExist", { id }));
|
|
15780
15917
|
}
|
|
15781
15918
|
this.set(model.id, {
|
|
15782
15919
|
id: model.id,
|
|
@@ -15846,7 +15983,7 @@ import {
|
|
|
15846
15983
|
HttpError as HttpError7,
|
|
15847
15984
|
IBizContext as IBizContext3,
|
|
15848
15985
|
Namespace,
|
|
15849
|
-
RuntimeError as
|
|
15986
|
+
RuntimeError as RuntimeError35
|
|
15850
15987
|
} from "@ibiz-template/core";
|
|
15851
15988
|
import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ramda";
|
|
15852
15989
|
|
|
@@ -15854,7 +15991,7 @@ import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ra
|
|
|
15854
15991
|
import { NOOP } from "@ibiz-template/core";
|
|
15855
15992
|
|
|
15856
15993
|
// src/controller/utils/counter/counter.ts
|
|
15857
|
-
import { RuntimeError as
|
|
15994
|
+
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
15858
15995
|
var Counter = class {
|
|
15859
15996
|
/**
|
|
15860
15997
|
* Creates an instance of Counter.
|
|
@@ -15916,7 +16053,7 @@ var Counter = class {
|
|
|
15916
16053
|
return;
|
|
15917
16054
|
}
|
|
15918
16055
|
if (this.count === 0) {
|
|
15919
|
-
throw new
|
|
16056
|
+
throw new RuntimeError29(
|
|
15920
16057
|
ibiz.i18n.t("runtime.controller.utils.counter.decrement")
|
|
15921
16058
|
);
|
|
15922
16059
|
}
|
|
@@ -16525,7 +16662,7 @@ function getOriginData(data) {
|
|
|
16525
16662
|
}
|
|
16526
16663
|
|
|
16527
16664
|
// src/controller/utils/value-rule/value-rule.ts
|
|
16528
|
-
import { RuntimeError as
|
|
16665
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
16529
16666
|
import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
|
|
16530
16667
|
import { isNil as isNil18 } from "ramda";
|
|
16531
16668
|
function generateRules(itemVRs, name, valueItemName) {
|
|
@@ -16575,7 +16712,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
16575
16712
|
deRule.groupCond
|
|
16576
16713
|
);
|
|
16577
16714
|
if (!isPast) {
|
|
16578
|
-
callback(new
|
|
16715
|
+
callback(new RuntimeError30(infoMessage || deRule.ruleInfo));
|
|
16579
16716
|
}
|
|
16580
16717
|
return true;
|
|
16581
16718
|
},
|
|
@@ -16648,7 +16785,7 @@ function generateEditorRules(editor) {
|
|
|
16648
16785
|
}
|
|
16649
16786
|
|
|
16650
16787
|
// src/controller/utils/value-ex/value-ex.ts
|
|
16651
|
-
import { RuntimeError as
|
|
16788
|
+
import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
16652
16789
|
import { isNil as isNil19, mergeLeft } from "ramda";
|
|
16653
16790
|
var ValueExUtil = class {
|
|
16654
16791
|
/**
|
|
@@ -16680,7 +16817,7 @@ var ValueExUtil = class {
|
|
|
16680
16817
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
16681
16818
|
if (["OBJECTS", "OBJECT"].includes(valueType)) {
|
|
16682
16819
|
if (!objectNameField) {
|
|
16683
|
-
throw new
|
|
16820
|
+
throw new RuntimeError31(
|
|
16684
16821
|
ibiz.i18n.t("runtime.controller.utils.valueEx.objectNameField")
|
|
16685
16822
|
);
|
|
16686
16823
|
}
|
|
@@ -16698,7 +16835,7 @@ var ValueExUtil = class {
|
|
|
16698
16835
|
};
|
|
16699
16836
|
|
|
16700
16837
|
// src/controller/utils/value-default/value-default.ts
|
|
16701
|
-
import { RuntimeError as
|
|
16838
|
+
import { RuntimeError as RuntimeError32, ModelError as ModelError17 } from "@ibiz-template/core";
|
|
16702
16839
|
import dayjs from "dayjs";
|
|
16703
16840
|
import { createUUID as createUUID8 } from "qx-util";
|
|
16704
16841
|
import { isNil as isNil20, isNotNil } from "ramda";
|
|
@@ -16739,7 +16876,7 @@ function getDefaultValue(opts, origins) {
|
|
|
16739
16876
|
case "SESSION":
|
|
16740
16877
|
case "APPLICATION":
|
|
16741
16878
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
16742
|
-
throw new
|
|
16879
|
+
throw new RuntimeError32(
|
|
16743
16880
|
ibiz.i18n.t("runtime.controller.utils.valueDefault.noExist")
|
|
16744
16881
|
);
|
|
16745
16882
|
}
|
|
@@ -16760,7 +16897,7 @@ function getDefaultValue(opts, origins) {
|
|
|
16760
16897
|
|
|
16761
16898
|
// src/controller/utils/data-file-util/data-file-util.ts
|
|
16762
16899
|
import {
|
|
16763
|
-
RuntimeError as
|
|
16900
|
+
RuntimeError as RuntimeError33,
|
|
16764
16901
|
selectFile
|
|
16765
16902
|
} from "@ibiz-template/core";
|
|
16766
16903
|
import { mergeRight as mergeRight2 } from "ramda";
|
|
@@ -16865,13 +17002,13 @@ async function importData2(opts) {
|
|
|
16865
17002
|
}
|
|
16866
17003
|
async function exportData(header, data, fileName) {
|
|
16867
17004
|
if (!ibiz.util.getExcelUtil) {
|
|
16868
|
-
throw new
|
|
17005
|
+
throw new RuntimeError33(
|
|
16869
17006
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.noExist")
|
|
16870
17007
|
);
|
|
16871
17008
|
}
|
|
16872
17009
|
const exportExcel = await ibiz.util.getExcelUtil();
|
|
16873
17010
|
if (!exportExcel) {
|
|
16874
|
-
throw new
|
|
17011
|
+
throw new RuntimeError33(
|
|
16875
17012
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.loadError")
|
|
16876
17013
|
);
|
|
16877
17014
|
}
|
|
@@ -16901,7 +17038,7 @@ async function getDataImportModels(opts) {
|
|
|
16901
17038
|
(item) => item.id === opts.deDataImportId
|
|
16902
17039
|
);
|
|
16903
17040
|
if (!deDataImport) {
|
|
16904
|
-
throw new
|
|
17041
|
+
throw new RuntimeError33(
|
|
16905
17042
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.importData")
|
|
16906
17043
|
);
|
|
16907
17044
|
}
|
|
@@ -17098,7 +17235,7 @@ async function getEntitySchema(entityId, context) {
|
|
|
17098
17235
|
}
|
|
17099
17236
|
|
|
17100
17237
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
17101
|
-
import { RuntimeError as
|
|
17238
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
17102
17239
|
import { isNil as isNil21, mergeRight as mergeRight3 } from "ramda";
|
|
17103
17240
|
var VIEW_MSG_PREFIX = "VIEW_MSG";
|
|
17104
17241
|
var ViewMsgController = class _ViewMsgController {
|
|
@@ -17133,7 +17270,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
17133
17270
|
(item) => item.id === this.msgGroupId
|
|
17134
17271
|
);
|
|
17135
17272
|
if (!msgGroup) {
|
|
17136
|
-
throw new
|
|
17273
|
+
throw new RuntimeError34(
|
|
17137
17274
|
ibiz.i18n.t("runtime.controller.utils.viewMsg.message", {
|
|
17138
17275
|
msgGroupId: this.msgGroupId
|
|
17139
17276
|
})
|
|
@@ -17151,7 +17288,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
17151
17288
|
}
|
|
17152
17289
|
});
|
|
17153
17290
|
if (msgDetailsViewMsgIds.length) {
|
|
17154
|
-
throw new
|
|
17291
|
+
throw new RuntimeError34(
|
|
17155
17292
|
ibiz.i18n.t("runtime.controller.utils.viewMsg.noFound", {
|
|
17156
17293
|
message: msgDetailsViewMsgIds.join(",")
|
|
17157
17294
|
})
|
|
@@ -18039,7 +18176,7 @@ var ViewController = class extends BaseController {
|
|
|
18039
18176
|
async callUIAction(key, args) {
|
|
18040
18177
|
const result = this.call(key, args);
|
|
18041
18178
|
if (result === void 0) {
|
|
18042
|
-
throw new
|
|
18179
|
+
throw new RuntimeError35(
|
|
18043
18180
|
ibiz.i18n.t("runtime.controller.common.view.noSupportBehavior", {
|
|
18044
18181
|
key
|
|
18045
18182
|
})
|
|
@@ -18528,9 +18665,9 @@ import {
|
|
|
18528
18665
|
IBizContext as IBizContext4,
|
|
18529
18666
|
IBizParams,
|
|
18530
18667
|
NoticeError as NoticeError2,
|
|
18531
|
-
RuntimeError as
|
|
18668
|
+
RuntimeError as RuntimeError36
|
|
18532
18669
|
} from "@ibiz-template/core";
|
|
18533
|
-
import { clone as
|
|
18670
|
+
import { clone as clone20, isNil as isNil23 } from "ramda";
|
|
18534
18671
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
18535
18672
|
var ControlController = class extends BaseController {
|
|
18536
18673
|
/**
|
|
@@ -18594,7 +18731,7 @@ var ControlController = class extends BaseController {
|
|
|
18594
18731
|
"".concat(model.controlType, "_DEFAULT")
|
|
18595
18732
|
);
|
|
18596
18733
|
if (panelModel) {
|
|
18597
|
-
this.controlPanel =
|
|
18734
|
+
this.controlPanel = clone20(panelModel);
|
|
18598
18735
|
}
|
|
18599
18736
|
}
|
|
18600
18737
|
this.updateContextParams({});
|
|
@@ -18955,7 +19092,7 @@ var ControlController = class extends BaseController {
|
|
|
18955
19092
|
ibiz.mc.command.remove.send(msg, meta);
|
|
18956
19093
|
break;
|
|
18957
19094
|
default:
|
|
18958
|
-
throw new
|
|
19095
|
+
throw new RuntimeError36(
|
|
18959
19096
|
ibiz.i18n.t("runtime.controller.common.control.unsupportedType", {
|
|
18960
19097
|
type
|
|
18961
19098
|
})
|
|
@@ -18996,7 +19133,7 @@ var ControlController = class extends BaseController {
|
|
|
18996
19133
|
// src/controller/common/control/md-control.controller.ts
|
|
18997
19134
|
import {
|
|
18998
19135
|
isElementSame,
|
|
18999
|
-
RuntimeError as
|
|
19136
|
+
RuntimeError as RuntimeError37,
|
|
19000
19137
|
RuntimeModelError as RuntimeModelError26
|
|
19001
19138
|
} from "@ibiz-template/core";
|
|
19002
19139
|
import { isNil as isNil24 } from "ramda";
|
|
@@ -19269,7 +19406,7 @@ var MDControlController = class extends ControlController {
|
|
|
19269
19406
|
async remove(args) {
|
|
19270
19407
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
19271
19408
|
if (!(data == null ? void 0 : data.length)) {
|
|
19272
|
-
throw new
|
|
19409
|
+
throw new RuntimeError37(
|
|
19273
19410
|
ibiz.i18n.t("runtime.controller.common.control.uncheckedData")
|
|
19274
19411
|
);
|
|
19275
19412
|
}
|
|
@@ -19469,10 +19606,11 @@ var MDControlController = class extends ControlController {
|
|
|
19469
19606
|
* @return {*} {void}
|
|
19470
19607
|
*/
|
|
19471
19608
|
onDEDataChange(msg) {
|
|
19609
|
+
var _a;
|
|
19472
19610
|
if (!isNil24(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
19473
19611
|
return;
|
|
19474
19612
|
}
|
|
19475
|
-
if (!msg.data || msg.data.srfdecodename !== this.dataEntity.codeName) {
|
|
19613
|
+
if (!msg.data || msg.data.srfdecodename !== ((_a = this.dataEntity) == null ? void 0 : _a.codeName)) {
|
|
19476
19614
|
return;
|
|
19477
19615
|
}
|
|
19478
19616
|
let isRefresh = false;
|
|
@@ -19505,7 +19643,7 @@ var MDControlController = class extends ControlController {
|
|
|
19505
19643
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
19506
19644
|
import {
|
|
19507
19645
|
findRecursiveChild,
|
|
19508
|
-
RuntimeError as
|
|
19646
|
+
RuntimeError as RuntimeError38,
|
|
19509
19647
|
RuntimeModelError as RuntimeModelError27
|
|
19510
19648
|
} from "@ibiz-template/core";
|
|
19511
19649
|
|
|
@@ -19761,7 +19899,7 @@ var AppMenuController = class extends ControlController {
|
|
|
19761
19899
|
childrenFields: ["appMenuItems"]
|
|
19762
19900
|
});
|
|
19763
19901
|
if (!menuItem) {
|
|
19764
|
-
throw new
|
|
19902
|
+
throw new RuntimeError38(
|
|
19765
19903
|
ibiz.i18n.t("runtime.controller.control.menu.noFindMenu", { id })
|
|
19766
19904
|
);
|
|
19767
19905
|
}
|
|
@@ -19896,7 +20034,7 @@ var AppMenuController = class extends ControlController {
|
|
|
19896
20034
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
19897
20035
|
import {
|
|
19898
20036
|
findRecursiveChild as findRecursiveChild2,
|
|
19899
|
-
RuntimeError as
|
|
20037
|
+
RuntimeError as RuntimeError39,
|
|
19900
20038
|
RuntimeModelError as RuntimeModelError28
|
|
19901
20039
|
} from "@ibiz-template/core";
|
|
19902
20040
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -19906,7 +20044,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
19906
20044
|
childrenFields: ["appMenuItems"]
|
|
19907
20045
|
});
|
|
19908
20046
|
if (!menuItem) {
|
|
19909
|
-
throw new
|
|
20047
|
+
throw new RuntimeError39(
|
|
19910
20048
|
ibiz.i18n.t("runtime.controller.control.menu.noFindMenu", { id })
|
|
19911
20049
|
);
|
|
19912
20050
|
}
|
|
@@ -19937,11 +20075,11 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
19937
20075
|
|
|
19938
20076
|
// src/controller/control/calendar/calendar.controller.ts
|
|
19939
20077
|
import dayjs3 from "dayjs";
|
|
19940
|
-
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
20078
|
+
import { RuntimeError as RuntimeError41, RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
19941
20079
|
|
|
19942
20080
|
// src/controller/control/calendar/calendar.service.ts
|
|
19943
|
-
import { RuntimeError as
|
|
19944
|
-
import { clone as
|
|
20081
|
+
import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
|
|
20082
|
+
import { clone as clone21 } from "ramda";
|
|
19945
20083
|
var CalendarService = class extends MDControlService {
|
|
19946
20084
|
/**
|
|
19947
20085
|
* 执行查询多条数据的方法
|
|
@@ -19962,7 +20100,7 @@ var CalendarService = class extends MDControlService {
|
|
|
19962
20100
|
async (item) => {
|
|
19963
20101
|
const fetchAction = item.appDEDataSetId || "fetchdefault";
|
|
19964
20102
|
const tempContext = context.clone();
|
|
19965
|
-
const tempParams =
|
|
20103
|
+
const tempParams = this.handleRequestParams(item, params);
|
|
19966
20104
|
if (item.maxSize) {
|
|
19967
20105
|
tempParams.size = item.maxSize;
|
|
19968
20106
|
}
|
|
@@ -19996,13 +20134,13 @@ var CalendarService = class extends MDControlService {
|
|
|
19996
20134
|
setCalendarConfigData(items, index) {
|
|
19997
20135
|
const { sysCalendarItems } = this.model;
|
|
19998
20136
|
if (!sysCalendarItems) {
|
|
19999
|
-
throw new
|
|
20137
|
+
throw new RuntimeError40(
|
|
20000
20138
|
ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
|
|
20001
20139
|
);
|
|
20002
20140
|
}
|
|
20003
20141
|
const calendarItem = sysCalendarItems[index];
|
|
20004
20142
|
if (!calendarItem) {
|
|
20005
|
-
throw new
|
|
20143
|
+
throw new RuntimeError40(
|
|
20006
20144
|
ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
|
|
20007
20145
|
);
|
|
20008
20146
|
}
|
|
@@ -20033,6 +20171,26 @@ var CalendarService = class extends MDControlService {
|
|
|
20033
20171
|
);
|
|
20034
20172
|
return res;
|
|
20035
20173
|
}
|
|
20174
|
+
/**
|
|
20175
|
+
* 处理请求参数
|
|
20176
|
+
*
|
|
20177
|
+
* @private
|
|
20178
|
+
* @param {ISysCalendarItem} item
|
|
20179
|
+
* @param {IParams} params
|
|
20180
|
+
* @return {*} {IParams}
|
|
20181
|
+
* @memberof CalendarService
|
|
20182
|
+
*/
|
|
20183
|
+
handleRequestParams(item, params) {
|
|
20184
|
+
const tempParams = clone21(params);
|
|
20185
|
+
const { srfstartdate, srfenddate } = tempParams;
|
|
20186
|
+
Object.assign(tempParams, {
|
|
20187
|
+
["n_".concat(item.beginTimeAppDEFieldId, "_gtandeq")]: srfstartdate,
|
|
20188
|
+
["n_".concat(item.endTimeAppDEFieldId, "_ltandeq")]: srfenddate
|
|
20189
|
+
});
|
|
20190
|
+
delete tempParams.srfstartdate;
|
|
20191
|
+
delete tempParams.srfenddate;
|
|
20192
|
+
return tempParams;
|
|
20193
|
+
}
|
|
20036
20194
|
};
|
|
20037
20195
|
|
|
20038
20196
|
// src/controller/control/calendar/calendar.controller.ts
|
|
@@ -20046,9 +20204,13 @@ var CalendarController = class extends MDControlController {
|
|
|
20046
20204
|
* @memberof CalendarController
|
|
20047
20205
|
*/
|
|
20048
20206
|
initState() {
|
|
20207
|
+
var _a, _b;
|
|
20049
20208
|
super.initState();
|
|
20050
20209
|
this.state.selectedDate = /* @__PURE__ */ new Date();
|
|
20051
20210
|
this.state.size = 1e3;
|
|
20211
|
+
this.state.legends = [];
|
|
20212
|
+
this.state.calendarTitle = this.model.logicName || "";
|
|
20213
|
+
this.state.showDetail = ((_b = (_a = this.model.controlParam) == null ? void 0 : _a.ctrlParams) == null ? void 0 : _b.SHOWDETAIL) || false;
|
|
20052
20214
|
}
|
|
20053
20215
|
/**
|
|
20054
20216
|
* 生命周期-创建完成
|
|
@@ -20064,6 +20226,30 @@ var CalendarController = class extends MDControlController {
|
|
|
20064
20226
|
this.service = new CalendarService(this.model);
|
|
20065
20227
|
await this.service.init(this.context);
|
|
20066
20228
|
this.initViewScheduler();
|
|
20229
|
+
this.initCalendarLegends();
|
|
20230
|
+
}
|
|
20231
|
+
/**
|
|
20232
|
+
* 初始化日历图例
|
|
20233
|
+
*
|
|
20234
|
+
* @protected
|
|
20235
|
+
* @memberof CalendarController
|
|
20236
|
+
*/
|
|
20237
|
+
initCalendarLegends() {
|
|
20238
|
+
const { sysCalendarItems } = this.model;
|
|
20239
|
+
if (!sysCalendarItems) {
|
|
20240
|
+
throw new RuntimeError41(
|
|
20241
|
+
ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
|
|
20242
|
+
);
|
|
20243
|
+
}
|
|
20244
|
+
sysCalendarItems.forEach((calendarItem) => {
|
|
20245
|
+
const { id, name, bkcolor, color } = calendarItem;
|
|
20246
|
+
this.state.legends.push({
|
|
20247
|
+
id,
|
|
20248
|
+
name,
|
|
20249
|
+
bkcolor,
|
|
20250
|
+
color
|
|
20251
|
+
});
|
|
20252
|
+
});
|
|
20067
20253
|
}
|
|
20068
20254
|
/**
|
|
20069
20255
|
* 初始化视图触发器
|
|
@@ -20072,7 +20258,7 @@ var CalendarController = class extends MDControlController {
|
|
|
20072
20258
|
* @memberof CalendarService
|
|
20073
20259
|
*/
|
|
20074
20260
|
initViewScheduler() {
|
|
20075
|
-
const viewLogics = this.model
|
|
20261
|
+
const viewLogics = getViewLogics(this.model);
|
|
20076
20262
|
if (viewLogics.length !== 0) {
|
|
20077
20263
|
this.viewScheduler = ibiz.scheduler.createViewScheduler(viewLogics);
|
|
20078
20264
|
this.viewScheduler.defaultParamsCb = () => {
|
|
@@ -20085,6 +20271,19 @@ var CalendarController = class extends MDControlController {
|
|
|
20085
20271
|
}
|
|
20086
20272
|
}
|
|
20087
20273
|
}
|
|
20274
|
+
/**
|
|
20275
|
+
* 销毁
|
|
20276
|
+
*
|
|
20277
|
+
* @protected
|
|
20278
|
+
* @return {*} {Promise<void>}
|
|
20279
|
+
* @memberof LightCalendarController
|
|
20280
|
+
*/
|
|
20281
|
+
async onDestroyed() {
|
|
20282
|
+
await super.onDestroyed();
|
|
20283
|
+
if (this.viewScheduler) {
|
|
20284
|
+
this.viewScheduler.destroy();
|
|
20285
|
+
}
|
|
20286
|
+
}
|
|
20088
20287
|
/**
|
|
20089
20288
|
* 设置激活数据
|
|
20090
20289
|
*
|
|
@@ -20093,10 +20292,13 @@ var CalendarController = class extends MDControlController {
|
|
|
20093
20292
|
* @memberof CalendarService
|
|
20094
20293
|
*/
|
|
20095
20294
|
async setActive(item) {
|
|
20096
|
-
this.
|
|
20097
|
-
|
|
20098
|
-
data: [item]
|
|
20295
|
+
this._evt.emit("onActive", {
|
|
20296
|
+
data: item ? [item] : []
|
|
20099
20297
|
});
|
|
20298
|
+
if (!item) {
|
|
20299
|
+
return;
|
|
20300
|
+
}
|
|
20301
|
+
await this.openData(item);
|
|
20100
20302
|
}
|
|
20101
20303
|
/**
|
|
20102
20304
|
* 打开编辑数据视图
|
|
@@ -20105,11 +20307,11 @@ var CalendarController = class extends MDControlController {
|
|
|
20105
20307
|
* @memberof CalendarService
|
|
20106
20308
|
*/
|
|
20107
20309
|
async openData(item) {
|
|
20108
|
-
var _a, _b;
|
|
20310
|
+
var _a, _b, _c;
|
|
20109
20311
|
const context = this.context.clone();
|
|
20110
|
-
const deName = ((_a = item.deData.srfdecodename) == null ? void 0 :
|
|
20312
|
+
const deName = ((_b = (_a = item.deData) == null ? void 0 : _a.srfdecodename) == null ? void 0 : _b.toLowerCase()) || calcDeCodeNameById(this.model.appDataEntityId);
|
|
20111
20313
|
context[deName.toLowerCase()] = item.deData.srfkey;
|
|
20112
|
-
const result = await ((
|
|
20314
|
+
const result = await ((_c = this.viewScheduler) == null ? void 0 : _c.triggerCustom(
|
|
20113
20315
|
"".concat(item.itemType.toLowerCase(), "_opendata"),
|
|
20114
20316
|
{
|
|
20115
20317
|
context,
|
|
@@ -20216,21 +20418,61 @@ var CalendarController = class extends MDControlController {
|
|
|
20216
20418
|
*/
|
|
20217
20419
|
getCurSelectDate(param) {
|
|
20218
20420
|
const { selectedDate } = this.state;
|
|
20219
|
-
const {
|
|
20421
|
+
const { calendarStyle } = this.model;
|
|
20422
|
+
let { srfstartdate, srfenddate } = param;
|
|
20220
20423
|
if (!srfstartdate || !srfenddate) {
|
|
20221
|
-
|
|
20222
|
-
|
|
20223
|
-
|
|
20224
|
-
|
|
20225
|
-
|
|
20226
|
-
|
|
20227
|
-
|
|
20228
|
-
|
|
20229
|
-
|
|
20230
|
-
|
|
20424
|
+
switch (calendarStyle) {
|
|
20425
|
+
case "DAY":
|
|
20426
|
+
srfstartdate = new Date(
|
|
20427
|
+
selectedDate.getFullYear(),
|
|
20428
|
+
selectedDate.getMonth(),
|
|
20429
|
+
selectedDate.getDate()
|
|
20430
|
+
);
|
|
20431
|
+
srfenddate = new Date(
|
|
20432
|
+
new Date(
|
|
20433
|
+
selectedDate.getFullYear(),
|
|
20434
|
+
selectedDate.getMonth(),
|
|
20435
|
+
selectedDate.getDate() + 1
|
|
20436
|
+
).getTime() - 1
|
|
20437
|
+
);
|
|
20438
|
+
break;
|
|
20439
|
+
case "WEEK":
|
|
20440
|
+
const currentDayOfWeek = selectedDate.getDay();
|
|
20441
|
+
const offset = currentDayOfWeek > 0 ? -currentDayOfWeek + 1 : -6;
|
|
20442
|
+
srfstartdate = new Date(
|
|
20443
|
+
selectedDate.getFullYear(),
|
|
20444
|
+
selectedDate.getMonth(),
|
|
20445
|
+
selectedDate.getDate() + offset
|
|
20446
|
+
);
|
|
20447
|
+
srfenddate = new Date(
|
|
20448
|
+
new Date(
|
|
20449
|
+
srfstartdate.getFullYear(),
|
|
20450
|
+
srfstartdate.getMonth(),
|
|
20451
|
+
srfstartdate.getDate() + 7
|
|
20452
|
+
).getTime() - 1
|
|
20453
|
+
);
|
|
20454
|
+
break;
|
|
20455
|
+
case "MONTH":
|
|
20456
|
+
srfstartdate = new Date(
|
|
20457
|
+
selectedDate.getFullYear(),
|
|
20458
|
+
selectedDate.getMonth(),
|
|
20459
|
+
1
|
|
20460
|
+
);
|
|
20461
|
+
srfenddate = new Date(
|
|
20462
|
+
new Date(
|
|
20463
|
+
selectedDate.getFullYear(),
|
|
20464
|
+
selectedDate.getMonth() + 1,
|
|
20465
|
+
1
|
|
20466
|
+
).getTime() - 1
|
|
20467
|
+
);
|
|
20468
|
+
break;
|
|
20469
|
+
default:
|
|
20470
|
+
ibiz.log.warn("\u65E5\u5386".concat(calendarStyle, "\u6837\u5F0F\u6682\u672A\u652F\u6301"));
|
|
20471
|
+
break;
|
|
20472
|
+
}
|
|
20231
20473
|
return {
|
|
20232
|
-
srfstartdate: dayjs3(
|
|
20233
|
-
srfenddate: dayjs3(
|
|
20474
|
+
srfstartdate: dayjs3(srfstartdate).format("YYYY-MM-DD HH:mm:ss"),
|
|
20475
|
+
srfenddate: dayjs3(srfenddate).format("YYYY-MM-DD HH:mm:ss")
|
|
20234
20476
|
};
|
|
20235
20477
|
}
|
|
20236
20478
|
return { srfstartdate, srfenddate };
|
|
@@ -20279,6 +20521,10 @@ var CalendarController = class extends MDControlController {
|
|
|
20279
20521
|
* @memberof CalendarController
|
|
20280
20522
|
*/
|
|
20281
20523
|
async onRowClick(data) {
|
|
20524
|
+
if (!data) {
|
|
20525
|
+
this.setSelection([]);
|
|
20526
|
+
return;
|
|
20527
|
+
}
|
|
20282
20528
|
const { selectedData } = this.state;
|
|
20283
20529
|
const filterArr = selectedData.filter(
|
|
20284
20530
|
(item) => item.deData.srfkey !== data.deData.srfkey
|
|
@@ -20308,12 +20554,12 @@ var CalendarController = class extends MDControlController {
|
|
|
20308
20554
|
};
|
|
20309
20555
|
|
|
20310
20556
|
// src/controller/control/chart/chart.controller.ts
|
|
20311
|
-
import { RuntimeError as
|
|
20557
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
20312
20558
|
|
|
20313
20559
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
20314
|
-
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
20560
|
+
import { clone as clone24, mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
20315
20561
|
import { isObject as isObject2, isString as isString2 } from "qx-util";
|
|
20316
|
-
import { RuntimeError as
|
|
20562
|
+
import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
|
|
20317
20563
|
|
|
20318
20564
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
20319
20565
|
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
@@ -20326,7 +20572,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
20326
20572
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
20327
20573
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
20328
20574
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
20329
|
-
import { clone as
|
|
20575
|
+
import { clone as clone22, isNil as isNil25, mergeDeepRight } from "ramda";
|
|
20330
20576
|
dayjs4.extend(minMax2);
|
|
20331
20577
|
dayjs4.extend(isSameOrBefore);
|
|
20332
20578
|
dayjs4.extend(quarterOfYear);
|
|
@@ -20560,7 +20806,7 @@ var BaseSeriesGenerator = class {
|
|
|
20560
20806
|
const { codelistId } = catalog2;
|
|
20561
20807
|
if (codelistId && this.autoCompleteCategory) {
|
|
20562
20808
|
const codeListItems = this.chartGenerator.codeListMap.get(codelistId);
|
|
20563
|
-
tempCodeLists.push(
|
|
20809
|
+
tempCodeLists.push(clone22(codeListItems));
|
|
20564
20810
|
}
|
|
20565
20811
|
});
|
|
20566
20812
|
for (let i = 0; i < tempCodeLists.length; i++) {
|
|
@@ -20637,10 +20883,9 @@ var BaseSeriesGenerator = class {
|
|
|
20637
20883
|
} else {
|
|
20638
20884
|
this.prepareChartData(
|
|
20639
20885
|
groupData,
|
|
20640
|
-
{
|
|
20641
|
-
...item,
|
|
20886
|
+
Object.assign(item, {
|
|
20642
20887
|
[this.valueField]: groupData[group].get(catalog).value
|
|
20643
|
-
},
|
|
20888
|
+
}),
|
|
20644
20889
|
catalog,
|
|
20645
20890
|
group
|
|
20646
20891
|
);
|
|
@@ -20727,7 +20972,7 @@ var BaseSeriesGenerator = class {
|
|
|
20727
20972
|
dataPreprocess(data) {
|
|
20728
20973
|
const tempData = [];
|
|
20729
20974
|
data.forEach((singleData) => {
|
|
20730
|
-
tempData.push(
|
|
20975
|
+
tempData.push(clone22(singleData));
|
|
20731
20976
|
});
|
|
20732
20977
|
const { groupMode } = this.model;
|
|
20733
20978
|
if (groupMode) {
|
|
@@ -21035,7 +21280,7 @@ var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
21035
21280
|
};
|
|
21036
21281
|
|
|
21037
21282
|
// src/controller/control/chart/generator/radar-series-generator.ts
|
|
21038
|
-
import { mergeDeepRight as mergeDeepRight2 } from "ramda";
|
|
21283
|
+
import { clone as clone23, mergeDeepRight as mergeDeepRight2 } from "ramda";
|
|
21039
21284
|
|
|
21040
21285
|
// src/controller/control/chart/generator/radar-coord-system.ts
|
|
21041
21286
|
var RadarCoordSystem = class {
|
|
@@ -21110,7 +21355,10 @@ var RadarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
21110
21355
|
* @param {IData[]} data
|
|
21111
21356
|
*/
|
|
21112
21357
|
calcRadarCoordSystem(data) {
|
|
21113
|
-
const
|
|
21358
|
+
const tempItems = data.map((item) => {
|
|
21359
|
+
return clone23(item);
|
|
21360
|
+
});
|
|
21361
|
+
const groupData = this.calcGroupData(tempItems);
|
|
21114
21362
|
if (!this.chartGenerator.radarMap.has(this.catalogField)) {
|
|
21115
21363
|
this.chartGenerator.radarMap.set(
|
|
21116
21364
|
this.catalogField,
|
|
@@ -21370,6 +21618,112 @@ var ChartOptionsGenerator2 = class {
|
|
|
21370
21618
|
});
|
|
21371
21619
|
return AxisOption;
|
|
21372
21620
|
}
|
|
21621
|
+
/**
|
|
21622
|
+
* 处理轴布局位置
|
|
21623
|
+
*
|
|
21624
|
+
* @param {CodeListItem[]} items
|
|
21625
|
+
* @param {number} padding
|
|
21626
|
+
* @param {number} total
|
|
21627
|
+
* @param {number} index
|
|
21628
|
+
* @param {boolean} isRow 是否横向
|
|
21629
|
+
* @return {*}
|
|
21630
|
+
* @memberof ChartOptionsGenerator
|
|
21631
|
+
*/
|
|
21632
|
+
handleAxisLayout(items, padding, total, index, isRow = true) {
|
|
21633
|
+
const axisData = items.map((code) => {
|
|
21634
|
+
if (isRow) {
|
|
21635
|
+
return {
|
|
21636
|
+
value: code.text,
|
|
21637
|
+
textStyle: {
|
|
21638
|
+
padding: [0, padding * (total - 1 - index), 0, 0]
|
|
21639
|
+
}
|
|
21640
|
+
};
|
|
21641
|
+
}
|
|
21642
|
+
return {
|
|
21643
|
+
value: code.text,
|
|
21644
|
+
textStyle: {
|
|
21645
|
+
padding: [padding * (total - 1 - index), 0, 0, 0]
|
|
21646
|
+
}
|
|
21647
|
+
};
|
|
21648
|
+
});
|
|
21649
|
+
return axisData;
|
|
21650
|
+
}
|
|
21651
|
+
/**
|
|
21652
|
+
* 处理轴层级
|
|
21653
|
+
*
|
|
21654
|
+
* @param {IData[]} tempaxis
|
|
21655
|
+
* @param {number} index
|
|
21656
|
+
* @param {IData[]} axisData
|
|
21657
|
+
* @return {*}
|
|
21658
|
+
* @memberof ChartOptionsGenerator
|
|
21659
|
+
*/
|
|
21660
|
+
handleAxisLevel(tempaxis, index, axisData) {
|
|
21661
|
+
const tempAxisData = [];
|
|
21662
|
+
if (index === 0) {
|
|
21663
|
+
return axisData;
|
|
21664
|
+
}
|
|
21665
|
+
let length = 1;
|
|
21666
|
+
for (let i = 0; i < tempaxis.length; i++) {
|
|
21667
|
+
length *= tempaxis[i].data.length;
|
|
21668
|
+
}
|
|
21669
|
+
for (let i = 0; i < length; i++) {
|
|
21670
|
+
tempAxisData.push(...axisData);
|
|
21671
|
+
}
|
|
21672
|
+
return tempAxisData;
|
|
21673
|
+
}
|
|
21674
|
+
/**
|
|
21675
|
+
* 合并轴参数
|
|
21676
|
+
*
|
|
21677
|
+
* @param {(IData[] | IData)} axisData
|
|
21678
|
+
* @param {IData[]} tempAxis
|
|
21679
|
+
* @return {*}
|
|
21680
|
+
* @memberof ChartOptionsGenerator
|
|
21681
|
+
*/
|
|
21682
|
+
mergeAxisData(axisData, tempAxis) {
|
|
21683
|
+
if (axisData && Array.isArray(axisData)) {
|
|
21684
|
+
return [...axisData, ...tempAxis];
|
|
21685
|
+
}
|
|
21686
|
+
return [axisData, ...tempAxis];
|
|
21687
|
+
}
|
|
21688
|
+
/**
|
|
21689
|
+
* 处理分区模式下序列模型的坐标轴位置
|
|
21690
|
+
*
|
|
21691
|
+
* @param {IData[]} seriesModel
|
|
21692
|
+
* @param {IData} opts
|
|
21693
|
+
* @memberof ChartOptionsGenerator
|
|
21694
|
+
*/
|
|
21695
|
+
handleSeriesModelCoordinateAxis(seriesModel, opts) {
|
|
21696
|
+
const { xAxisParam, yAxisParam } = opts;
|
|
21697
|
+
const xaxis = [];
|
|
21698
|
+
const yaxis = [];
|
|
21699
|
+
for (let i = 0; i < seriesModel.length; i++) {
|
|
21700
|
+
const tempXAxis = clone24(xAxisParam);
|
|
21701
|
+
const tempYAxis = clone24(yAxisParam);
|
|
21702
|
+
Object.assign(tempXAxis, { gridIndex: i });
|
|
21703
|
+
Object.assign(tempYAxis, { gridIndex: i });
|
|
21704
|
+
tempYAxis.axisLabel.formatter = function(_param) {
|
|
21705
|
+
if (_param === 0) {
|
|
21706
|
+
return "{top|".concat(_param, "}");
|
|
21707
|
+
}
|
|
21708
|
+
return "{bottom|".concat(_param, "}");
|
|
21709
|
+
};
|
|
21710
|
+
if (i !== seriesModel.length - 1) {
|
|
21711
|
+
tempXAxis.name = "";
|
|
21712
|
+
tempXAxis.axisLine.show = false;
|
|
21713
|
+
tempXAxis.axisLabel.show = false;
|
|
21714
|
+
tempXAxis.axisTick.show = false;
|
|
21715
|
+
}
|
|
21716
|
+
if (tempYAxis.showTitle) {
|
|
21717
|
+
Object.assign(tempYAxis, {
|
|
21718
|
+
name: seriesModel[i].serieText
|
|
21719
|
+
});
|
|
21720
|
+
}
|
|
21721
|
+
xaxis.push(tempXAxis);
|
|
21722
|
+
yaxis.push(tempYAxis);
|
|
21723
|
+
}
|
|
21724
|
+
this.chartUserParam.xAxis = xaxis;
|
|
21725
|
+
this.chartUserParam.yAxis = yaxis;
|
|
21726
|
+
}
|
|
21373
21727
|
/**
|
|
21374
21728
|
* 初始化多分类的X轴配置
|
|
21375
21729
|
*
|
|
@@ -21377,27 +21731,58 @@ var ChartOptionsGenerator2 = class {
|
|
|
21377
21731
|
* @memberof ChartOptionsGenerator
|
|
21378
21732
|
*/
|
|
21379
21733
|
async initMultiCatalogxAxis(context, params) {
|
|
21380
|
-
var _a, _b, _c, _d, _e;
|
|
21734
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
21381
21735
|
const { controlParam } = this.model;
|
|
21382
|
-
if (controlParam && ((_a = controlParam.ctrlParams) == null ? void 0 : _a.
|
|
21736
|
+
if (controlParam && ((_a = controlParam.ctrlParams) == null ? void 0 : _a.ZONE)) {
|
|
21737
|
+
const length = (_b = this.model.dechartSerieses) == null ? void 0 : _b.length;
|
|
21738
|
+
if (length) {
|
|
21739
|
+
const height = 90 / length;
|
|
21740
|
+
const items = [];
|
|
21741
|
+
for (let i = 0; i < length; i++) {
|
|
21742
|
+
const top = i * height + 5;
|
|
21743
|
+
const bottom = 100 - (height + top);
|
|
21744
|
+
items.push({
|
|
21745
|
+
top: "".concat(top, "%"),
|
|
21746
|
+
bottom: "".concat(bottom, "%"),
|
|
21747
|
+
containLabel: true
|
|
21748
|
+
});
|
|
21749
|
+
}
|
|
21750
|
+
if (this.chartUserParam) {
|
|
21751
|
+
this.chartUserParam.grid = items;
|
|
21752
|
+
this.handleSeriesModelCoordinateAxis(this.model.dechartSerieses, {
|
|
21753
|
+
xAxisParam: ((_c = this.chartUserParam) == null ? void 0 : _c.xAxis) || {},
|
|
21754
|
+
yAxisParam: ((_d = this.chartUserParam) == null ? void 0 : _d.yAxis) || {}
|
|
21755
|
+
});
|
|
21756
|
+
}
|
|
21757
|
+
}
|
|
21758
|
+
}
|
|
21759
|
+
if (controlParam && ((_e = controlParam.ctrlParams) == null ? void 0 : _e.CATALOGFIELDS)) {
|
|
21383
21760
|
try {
|
|
21384
21761
|
const tempCatalogFields = JSON.parse(
|
|
21385
21762
|
controlParam.ctrlParams.CATALOGFIELDS
|
|
21386
21763
|
);
|
|
21387
21764
|
const tempaxis = [];
|
|
21388
21765
|
let titleshow = true;
|
|
21389
|
-
let
|
|
21766
|
+
let labelshow = true;
|
|
21390
21767
|
let gridIndex = 0;
|
|
21391
21768
|
if (Array.isArray(tempCatalogFields)) {
|
|
21392
21769
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
21393
|
-
if (this.chartUserParam
|
|
21394
|
-
|
|
21395
|
-
|
|
21396
|
-
|
|
21397
|
-
|
|
21770
|
+
if (this.chartUserParam) {
|
|
21771
|
+
let tempconfig = {};
|
|
21772
|
+
if (((_f = controlParam.ctrlParams) == null ? void 0 : _f.MODE) === "ROW") {
|
|
21773
|
+
if (Array.isArray(this.chartUserParam.yAxis)) {
|
|
21774
|
+
tempconfig = this.chartUserParam.yAxis[this.chartUserParam.yAxis.length - 1];
|
|
21775
|
+
} else {
|
|
21776
|
+
tempconfig = this.chartUserParam.yAxis;
|
|
21777
|
+
}
|
|
21778
|
+
} else if (Array.isArray(this.chartUserParam.xAxis)) {
|
|
21779
|
+
tempconfig = this.chartUserParam.xAxis[this.chartUserParam.xAxis.length - 1];
|
|
21398
21780
|
} else {
|
|
21399
|
-
|
|
21400
|
-
|
|
21781
|
+
tempconfig = this.chartUserParam.xAxis;
|
|
21782
|
+
}
|
|
21783
|
+
if (tempconfig) {
|
|
21784
|
+
titleshow = tempconfig.name === void 0 ? true : !!tempconfig.name;
|
|
21785
|
+
labelshow = ((_g = tempconfig.axisLabel) == null ? void 0 : _g.show) === void 0 ? true : (_h = tempconfig.axisLabel) == null ? void 0 : _h.show;
|
|
21401
21786
|
}
|
|
21402
21787
|
}
|
|
21403
21788
|
if (this.chartUserParam && this.chartUserParam.grid && Array.isArray(this.chartUserParam.grid)) {
|
|
@@ -21405,6 +21790,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
21405
21790
|
}
|
|
21406
21791
|
await Promise.all(
|
|
21407
21792
|
tempCatalogFields.slice(0, -1).map(async (catalog, index) => {
|
|
21793
|
+
var _a2;
|
|
21408
21794
|
if (catalog.mode === "codelist" && catalog.codelistId) {
|
|
21409
21795
|
const codeListItems = await app.codeList.get(
|
|
21410
21796
|
catalog.codelistId,
|
|
@@ -21412,33 +21798,40 @@ var ChartOptionsGenerator2 = class {
|
|
|
21412
21798
|
params
|
|
21413
21799
|
);
|
|
21414
21800
|
if (codeListItems) {
|
|
21415
|
-
|
|
21416
|
-
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21421
|
-
|
|
21422
|
-
|
|
21423
|
-
|
|
21424
|
-
|
|
21801
|
+
if (((_a2 = controlParam.ctrlParams) == null ? void 0 : _a2.MODE) === "ROW") {
|
|
21802
|
+
const yAxisData = this.handleAxisLayout(
|
|
21803
|
+
codeListItems,
|
|
21804
|
+
40,
|
|
21805
|
+
tempCatalogFields.length,
|
|
21806
|
+
index
|
|
21807
|
+
);
|
|
21808
|
+
const tempxAxisData = this.handleAxisLevel(
|
|
21809
|
+
tempaxis,
|
|
21810
|
+
index,
|
|
21811
|
+
yAxisData
|
|
21812
|
+
);
|
|
21425
21813
|
tempaxis.push({
|
|
21426
|
-
show:
|
|
21814
|
+
show: labelshow,
|
|
21427
21815
|
gridIndex,
|
|
21428
21816
|
type: "category",
|
|
21429
|
-
data:
|
|
21430
|
-
position: "
|
|
21817
|
+
data: tempxAxisData,
|
|
21818
|
+
position: "left"
|
|
21431
21819
|
});
|
|
21432
21820
|
} else {
|
|
21433
|
-
|
|
21434
|
-
|
|
21435
|
-
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
-
|
|
21439
|
-
|
|
21821
|
+
const xAxisData = this.handleAxisLayout(
|
|
21822
|
+
codeListItems,
|
|
21823
|
+
24,
|
|
21824
|
+
tempCatalogFields.length,
|
|
21825
|
+
index,
|
|
21826
|
+
false
|
|
21827
|
+
);
|
|
21828
|
+
const tempxAxisData = this.handleAxisLevel(
|
|
21829
|
+
tempaxis,
|
|
21830
|
+
index,
|
|
21831
|
+
xAxisData
|
|
21832
|
+
);
|
|
21440
21833
|
tempaxis.push({
|
|
21441
|
-
show:
|
|
21834
|
+
show: labelshow,
|
|
21442
21835
|
gridIndex,
|
|
21443
21836
|
type: "category",
|
|
21444
21837
|
data: tempxAxisData,
|
|
@@ -21452,50 +21845,77 @@ var ChartOptionsGenerator2 = class {
|
|
|
21452
21845
|
const mergeName = tempCatalogFields.map((catalog) => {
|
|
21453
21846
|
return catalog.name;
|
|
21454
21847
|
}).join("/");
|
|
21455
|
-
|
|
21456
|
-
|
|
21457
|
-
|
|
21458
|
-
|
|
21459
|
-
|
|
21460
|
-
|
|
21461
|
-
|
|
21462
|
-
textStyle: {
|
|
21463
|
-
lineHeight: labelshoww ? 45 * tempCatalogFields.length : 45
|
|
21464
|
-
}
|
|
21465
|
-
}
|
|
21466
|
-
],
|
|
21467
|
-
position: "bottom"
|
|
21468
|
-
});
|
|
21848
|
+
let catalogLength = tempCatalogFields.length;
|
|
21849
|
+
if (!labelshow) {
|
|
21850
|
+
catalogLength = 1;
|
|
21851
|
+
}
|
|
21852
|
+
if (!titleshow) {
|
|
21853
|
+
catalogLength -= 1;
|
|
21854
|
+
}
|
|
21469
21855
|
if (this.chartUserParam) {
|
|
21470
|
-
if (this.chartUserParam.xAxis && Array.isArray(this.chartUserParam.xAxis)) {
|
|
21471
|
-
this.chartUserParam.xAxis = [
|
|
21472
|
-
...this.chartUserParam.xAxis,
|
|
21473
|
-
...tempaxis
|
|
21474
|
-
];
|
|
21475
|
-
} else if (this.chartUserParam.xAxis) {
|
|
21476
|
-
this.chartUserParam.xAxis = [
|
|
21477
|
-
this.chartUserParam.xAxis,
|
|
21478
|
-
...tempaxis
|
|
21479
|
-
];
|
|
21480
|
-
}
|
|
21481
21856
|
if (!this.chartUserParam.grid) {
|
|
21482
21857
|
this.chartUserParam.grid = {};
|
|
21483
21858
|
}
|
|
21484
|
-
|
|
21485
|
-
|
|
21486
|
-
|
|
21487
|
-
|
|
21488
|
-
|
|
21489
|
-
|
|
21490
|
-
|
|
21491
|
-
|
|
21492
|
-
|
|
21493
|
-
|
|
21859
|
+
if (((_i = controlParam.ctrlParams) == null ? void 0 : _i.MODE) === "ROW") {
|
|
21860
|
+
if (catalogLength === 0) {
|
|
21861
|
+
Object.assign(this.chartUserParam.grid, {
|
|
21862
|
+
bottom: 45
|
|
21863
|
+
});
|
|
21864
|
+
} else {
|
|
21865
|
+
Object.assign(this.chartUserParam.grid, {
|
|
21866
|
+
left: (catalogLength + 1) * 40
|
|
21867
|
+
});
|
|
21868
|
+
}
|
|
21869
|
+
tempaxis.push({
|
|
21870
|
+
type: "category",
|
|
21871
|
+
gridIndex,
|
|
21872
|
+
show: titleshow,
|
|
21873
|
+
data: [
|
|
21874
|
+
{
|
|
21875
|
+
value: mergeName.split("").join("\n"),
|
|
21876
|
+
textStyle: {
|
|
21877
|
+
padding: [0, catalogLength * 40, 0, 0]
|
|
21878
|
+
}
|
|
21879
|
+
}
|
|
21880
|
+
],
|
|
21881
|
+
position: "left"
|
|
21494
21882
|
});
|
|
21883
|
+
if (this.chartUserParam.yAxis) {
|
|
21884
|
+
this.chartUserParam.yAxis = this.mergeAxisData(
|
|
21885
|
+
this.chartUserParam.yAxis,
|
|
21886
|
+
tempaxis
|
|
21887
|
+
);
|
|
21888
|
+
}
|
|
21495
21889
|
} else {
|
|
21496
|
-
|
|
21497
|
-
|
|
21890
|
+
if (catalogLength === 0) {
|
|
21891
|
+
Object.assign(this.chartUserParam.grid, {
|
|
21892
|
+
bottom: 30
|
|
21893
|
+
});
|
|
21894
|
+
} else {
|
|
21895
|
+
Object.assign(this.chartUserParam.grid, {
|
|
21896
|
+
bottom: (catalogLength + 1) * 24
|
|
21897
|
+
});
|
|
21898
|
+
}
|
|
21899
|
+
tempaxis.push({
|
|
21900
|
+
type: "category",
|
|
21901
|
+
gridIndex,
|
|
21902
|
+
show: titleshow,
|
|
21903
|
+
data: [
|
|
21904
|
+
{
|
|
21905
|
+
value: mergeName,
|
|
21906
|
+
textStyle: {
|
|
21907
|
+
padding: [24 * catalogLength, 0, 0, 0]
|
|
21908
|
+
}
|
|
21909
|
+
}
|
|
21910
|
+
],
|
|
21911
|
+
position: "bottom"
|
|
21498
21912
|
});
|
|
21913
|
+
if (this.chartUserParam.xAxis) {
|
|
21914
|
+
this.chartUserParam.xAxis = this.mergeAxisData(
|
|
21915
|
+
this.chartUserParam.xAxis,
|
|
21916
|
+
tempaxis
|
|
21917
|
+
);
|
|
21918
|
+
}
|
|
21499
21919
|
}
|
|
21500
21920
|
}
|
|
21501
21921
|
}
|
|
@@ -21645,7 +22065,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
21645
22065
|
getChartDataByParams(params) {
|
|
21646
22066
|
const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
|
|
21647
22067
|
if (!generator) {
|
|
21648
|
-
throw new
|
|
22068
|
+
throw new RuntimeError42(
|
|
21649
22069
|
ibiz.i18n.t("runtime.controller.control.chart.noFindSequence", {
|
|
21650
22070
|
seriesIndex: params.seriesIndex
|
|
21651
22071
|
})
|
|
@@ -21929,12 +22349,12 @@ var ChartController = class extends MDControlController {
|
|
|
21929
22349
|
*/
|
|
21930
22350
|
updateChart() {
|
|
21931
22351
|
if (!this.chart) {
|
|
21932
|
-
throw new
|
|
22352
|
+
throw new RuntimeError43(
|
|
21933
22353
|
ibiz.i18n.t("runtime.controller.control.chart.noInitialised")
|
|
21934
22354
|
);
|
|
21935
22355
|
}
|
|
21936
22356
|
if (!this.options) {
|
|
21937
|
-
throw new
|
|
22357
|
+
throw new RuntimeError43(
|
|
21938
22358
|
ibiz.i18n.t("runtime.controller.control.chart.noCalculated")
|
|
21939
22359
|
);
|
|
21940
22360
|
}
|
|
@@ -21986,7 +22406,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
21986
22406
|
};
|
|
21987
22407
|
|
|
21988
22408
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
21989
|
-
import { recursiveIterate as recursiveIterate2, RuntimeError as
|
|
22409
|
+
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
21990
22410
|
|
|
21991
22411
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
21992
22412
|
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
@@ -21996,7 +22416,7 @@ import { isArray as isArray8 } from "qx-util";
|
|
|
21996
22416
|
import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
21997
22417
|
|
|
21998
22418
|
// src/ui-logic/index.ts
|
|
21999
|
-
import { RuntimeError as
|
|
22419
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
22000
22420
|
|
|
22001
22421
|
// src/ui-logic/ui-logic.ts
|
|
22002
22422
|
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
@@ -22169,7 +22589,7 @@ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError34 }
|
|
|
22169
22589
|
|
|
22170
22590
|
// src/ui-logic/utils/handle-src-val.ts
|
|
22171
22591
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
22172
|
-
import { clone as
|
|
22592
|
+
import { clone as clone25 } from "ramda";
|
|
22173
22593
|
function handleSrcVal2(ctx, srcValParams) {
|
|
22174
22594
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
22175
22595
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -22196,7 +22616,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
22196
22616
|
value = ctx.parameters.context;
|
|
22197
22617
|
break;
|
|
22198
22618
|
case "ENVPARAM":
|
|
22199
|
-
value =
|
|
22619
|
+
value = clone25(ibiz.env);
|
|
22200
22620
|
break;
|
|
22201
22621
|
default:
|
|
22202
22622
|
throw new ModelError18(
|
|
@@ -22652,8 +23072,8 @@ var EndNode2 = class extends UILogicNode {
|
|
|
22652
23072
|
};
|
|
22653
23073
|
|
|
22654
23074
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
22655
|
-
import { ModelError as ModelError22, RuntimeError as
|
|
22656
|
-
import { clone as
|
|
23075
|
+
import { ModelError as ModelError22, RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
23076
|
+
import { clone as clone26 } from "ramda";
|
|
22657
23077
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
22658
23078
|
async exec(ctx) {
|
|
22659
23079
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -22663,7 +23083,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
22663
23083
|
for (const nodeParam of nodeParams) {
|
|
22664
23084
|
let originValue;
|
|
22665
23085
|
if (nodeParam.dstDEUILogicParamId && ibiz.env.logLevel === "DEBUG") {
|
|
22666
|
-
originValue =
|
|
23086
|
+
originValue = clone26(ctx.params[nodeParam.dstDEUILogicParamId]);
|
|
22667
23087
|
}
|
|
22668
23088
|
switch (nodeParam.paramAction) {
|
|
22669
23089
|
case "SETPARAMVALUE":
|
|
@@ -22718,7 +23138,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
22718
23138
|
setParamValue(nodeParam, ctx) {
|
|
22719
23139
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
22720
23140
|
if (!dstDEUILogicParamId) {
|
|
22721
|
-
throw new
|
|
23141
|
+
throw new RuntimeError44(ibiz.i18n.t("runtime.uiLogic.noTargetParameter"));
|
|
22722
23142
|
}
|
|
22723
23143
|
let dstField = dstFieldName;
|
|
22724
23144
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
@@ -22758,7 +23178,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
22758
23178
|
copyParam(nodeParam, ctx) {
|
|
22759
23179
|
const { dstDEUILogicParamId } = nodeParam;
|
|
22760
23180
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
22761
|
-
ctx.params[dstDEUILogicParamId] =
|
|
23181
|
+
ctx.params[dstDEUILogicParamId] = clone26(srcVal);
|
|
22762
23182
|
}
|
|
22763
23183
|
/**
|
|
22764
23184
|
* 绑定参数
|
|
@@ -22835,7 +23255,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
22835
23255
|
};
|
|
22836
23256
|
|
|
22837
23257
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
22838
|
-
import { RuntimeError as
|
|
23258
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
22839
23259
|
import { isFunction } from "lodash-es";
|
|
22840
23260
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
22841
23261
|
async exec(ctx) {
|
|
@@ -22861,7 +23281,7 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
22861
23281
|
}
|
|
22862
23282
|
const invokeParam = ctx.params[invokeParamId];
|
|
22863
23283
|
if (!invokeParam) {
|
|
22864
|
-
throw new
|
|
23284
|
+
throw new RuntimeError45(
|
|
22865
23285
|
ibiz.i18n.t("runtime.uiLogic.noFoundOperationParameter", {
|
|
22866
23286
|
invokeParamId
|
|
22867
23287
|
})
|
|
@@ -22869,14 +23289,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
22869
23289
|
}
|
|
22870
23290
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
22871
23291
|
if (!invokeCtrl) {
|
|
22872
|
-
throw new
|
|
23292
|
+
throw new RuntimeError45(
|
|
22873
23293
|
ibiz.i18n.t("runtime.uiLogic.noFoundInterfaceObject", {
|
|
22874
23294
|
invokeCtrlId
|
|
22875
23295
|
})
|
|
22876
23296
|
);
|
|
22877
23297
|
}
|
|
22878
23298
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
22879
|
-
throw new
|
|
23299
|
+
throw new RuntimeError45(
|
|
22880
23300
|
ibiz.i18n.t("runtime.uiLogic.noFoundInvokeMethod", {
|
|
22881
23301
|
invokeMethod
|
|
22882
23302
|
})
|
|
@@ -23065,7 +23485,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
23065
23485
|
|
|
23066
23486
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
23067
23487
|
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
23068
|
-
import { clone as
|
|
23488
|
+
import { clone as clone27 } from "ramda";
|
|
23069
23489
|
var CopyParamNode2 = class extends UILogicNode {
|
|
23070
23490
|
async exec(ctx) {
|
|
23071
23491
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -23076,7 +23496,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
23076
23496
|
);
|
|
23077
23497
|
}
|
|
23078
23498
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
23079
|
-
ctx.params[dstDEUILogicParamId] =
|
|
23499
|
+
ctx.params[dstDEUILogicParamId] = clone27(srcVal);
|
|
23080
23500
|
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
23081
23501
|
ibiz.log.debug(
|
|
23082
23502
|
ibiz.i18n.t("runtime.uiLogic.copyParameter", {
|
|
@@ -23216,7 +23636,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
23216
23636
|
};
|
|
23217
23637
|
|
|
23218
23638
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
23219
|
-
import { RuntimeError as
|
|
23639
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
23220
23640
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
23221
23641
|
async exec(_ctx) {
|
|
23222
23642
|
const { errorInfo } = this.model;
|
|
@@ -23226,12 +23646,12 @@ var ThrowExceptionNode2 = class extends UILogicNode {
|
|
|
23226
23646
|
errorInfo
|
|
23227
23647
|
})
|
|
23228
23648
|
);
|
|
23229
|
-
throw new
|
|
23649
|
+
throw new RuntimeError46(errorInfo);
|
|
23230
23650
|
}
|
|
23231
23651
|
};
|
|
23232
23652
|
|
|
23233
23653
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
23234
|
-
import { RuntimeError as
|
|
23654
|
+
import { RuntimeError as RuntimeError47, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
23235
23655
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
23236
23656
|
async exec(ctx) {
|
|
23237
23657
|
ctx.isEndNode = true;
|
|
@@ -23256,13 +23676,13 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
23256
23676
|
}
|
|
23257
23677
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
23258
23678
|
if (!invokeCtrl) {
|
|
23259
|
-
throw new
|
|
23679
|
+
throw new RuntimeError47(
|
|
23260
23680
|
ibiz.i18n.t("runtime.uiLogic.noFoundTriggerObject", { fireCtrlId })
|
|
23261
23681
|
);
|
|
23262
23682
|
}
|
|
23263
23683
|
const eventParam = ctx.params[eventParamId];
|
|
23264
23684
|
if (!eventParam) {
|
|
23265
|
-
throw new
|
|
23685
|
+
throw new RuntimeError47(
|
|
23266
23686
|
ibiz.i18n.t("runtime.uiLogic.noFoundEventParameterObject", {
|
|
23267
23687
|
eventParamId
|
|
23268
23688
|
})
|
|
@@ -23284,7 +23704,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
23284
23704
|
};
|
|
23285
23705
|
|
|
23286
23706
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
23287
|
-
import { RuntimeError as
|
|
23707
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
23288
23708
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
23289
23709
|
async exec(ctx) {
|
|
23290
23710
|
const {
|
|
@@ -23313,7 +23733,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
23313
23733
|
}
|
|
23314
23734
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
23315
23735
|
if (!dstParam) {
|
|
23316
|
-
throw new
|
|
23736
|
+
throw new RuntimeError48(
|
|
23317
23737
|
ibiz.i18n.t("runtime.uiLogic.passedParameter", { dstDEUILogicParamId })
|
|
23318
23738
|
);
|
|
23319
23739
|
}
|
|
@@ -23349,15 +23769,14 @@ var RawJSCodeNode = class extends UILogicNode {
|
|
|
23349
23769
|
}),
|
|
23350
23770
|
this.model.code
|
|
23351
23771
|
);
|
|
23352
|
-
ScriptFactory.
|
|
23772
|
+
await ScriptFactory.asyncExecScriptFn(
|
|
23353
23773
|
{
|
|
23354
23774
|
view: ctx.view,
|
|
23355
23775
|
context: ctx.context,
|
|
23356
23776
|
params: ctx.viewParam,
|
|
23357
23777
|
uiLogic: ctx.params
|
|
23358
23778
|
},
|
|
23359
|
-
this.model.code || ""
|
|
23360
|
-
{ isAsync: false }
|
|
23779
|
+
this.model.code || ""
|
|
23361
23780
|
);
|
|
23362
23781
|
}
|
|
23363
23782
|
};
|
|
@@ -23713,7 +24132,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
23713
24132
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
23714
24133
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
23715
24134
|
if (!deUILogic) {
|
|
23716
|
-
throw new
|
|
24135
|
+
throw new RuntimeError49(
|
|
23717
24136
|
ibiz.i18n.t("runtime.uiLogic.interfaceLogic", {
|
|
23718
24137
|
appDataEntityId,
|
|
23719
24138
|
deUILogicId
|
|
@@ -23741,7 +24160,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
23741
24160
|
}
|
|
23742
24161
|
|
|
23743
24162
|
// src/ui-action/uiaction-util.ts
|
|
23744
|
-
import { RuntimeError as
|
|
24163
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
23745
24164
|
var UIActionUtil = class {
|
|
23746
24165
|
/**
|
|
23747
24166
|
* 执行界面行为
|
|
@@ -23756,7 +24175,7 @@ var UIActionUtil = class {
|
|
|
23756
24175
|
static async exec(actionId, params, appId2) {
|
|
23757
24176
|
const action = await getUIActionById(actionId, appId2);
|
|
23758
24177
|
if (!action) {
|
|
23759
|
-
throw new
|
|
24178
|
+
throw new RuntimeError50(
|
|
23760
24179
|
ibiz.i18n.t("runtime.uiAction.noFoundBehaviorModel", { actionId })
|
|
23761
24180
|
);
|
|
23762
24181
|
}
|
|
@@ -24264,7 +24683,7 @@ import {
|
|
|
24264
24683
|
StringUtil,
|
|
24265
24684
|
RuntimeModelError as RuntimeModelError53,
|
|
24266
24685
|
ModelError as ModelError26,
|
|
24267
|
-
RuntimeError as
|
|
24686
|
+
RuntimeError as RuntimeError51
|
|
24268
24687
|
} from "@ibiz-template/core";
|
|
24269
24688
|
import { mergeRight as mergeRight4 } from "ramda";
|
|
24270
24689
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
@@ -24352,7 +24771,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24352
24771
|
return result || {};
|
|
24353
24772
|
}
|
|
24354
24773
|
if (scriptCode) {
|
|
24355
|
-
const result = ScriptFactory.
|
|
24774
|
+
const result = await ScriptFactory.asyncExecScriptFn(
|
|
24356
24775
|
{ context, params, data, el: event == null ? void 0 : event.target, view },
|
|
24357
24776
|
scriptCode
|
|
24358
24777
|
);
|
|
@@ -24390,7 +24809,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24390
24809
|
if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
24391
24810
|
requestUrl += "/".concat(appDataEntity.deapicodeName2, "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
|
|
24392
24811
|
} else {
|
|
24393
|
-
throw new
|
|
24812
|
+
throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.dataPrimaryKey"));
|
|
24394
24813
|
}
|
|
24395
24814
|
const res = await ibiz.net.request(requestUrl, {
|
|
24396
24815
|
method: "get",
|
|
@@ -24416,10 +24835,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24416
24835
|
window.open(link, "_blank");
|
|
24417
24836
|
}
|
|
24418
24837
|
} else {
|
|
24419
|
-
throw new
|
|
24838
|
+
throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.printFailure"));
|
|
24420
24839
|
}
|
|
24421
24840
|
} else {
|
|
24422
|
-
throw new
|
|
24841
|
+
throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.physicalPrint"));
|
|
24423
24842
|
}
|
|
24424
24843
|
}
|
|
24425
24844
|
/**
|
|
@@ -24504,12 +24923,12 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24504
24923
|
URL.revokeObjectURL(elink.href);
|
|
24505
24924
|
document.body.removeChild(elink);
|
|
24506
24925
|
} else {
|
|
24507
|
-
throw new
|
|
24926
|
+
throw new RuntimeError51(
|
|
24508
24927
|
ibiz.i18n.t("runtime.uiAction.exportRequestFailed")
|
|
24509
24928
|
);
|
|
24510
24929
|
}
|
|
24511
24930
|
} else {
|
|
24512
|
-
throw new
|
|
24931
|
+
throw new RuntimeError51(
|
|
24513
24932
|
ibiz.i18n.t("runtime.uiAction.noEntityExportsFound")
|
|
24514
24933
|
);
|
|
24515
24934
|
}
|
|
@@ -24527,7 +24946,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
24527
24946
|
const actionResult = {};
|
|
24528
24947
|
const { context, params, data, event } = args;
|
|
24529
24948
|
if (!event) {
|
|
24530
|
-
throw new
|
|
24949
|
+
throw new RuntimeError51(ibiz.i18n.t("runtime.uiAction.lackNativeEvent"));
|
|
24531
24950
|
}
|
|
24532
24951
|
const { resultContext, resultParams } = await this.handleParams(
|
|
24533
24952
|
action,
|
|
@@ -24666,7 +25085,7 @@ var ToolbarController = class extends ControlController {
|
|
|
24666
25085
|
const actionId = item.uiactionId;
|
|
24667
25086
|
const uiAction = await getUIActionById(actionId, item.appId);
|
|
24668
25087
|
if (!uiAction) {
|
|
24669
|
-
throw new
|
|
25088
|
+
throw new RuntimeError52(
|
|
24670
25089
|
ibiz.i18n.t("runtime.controller.control.toolbar.noFound", {
|
|
24671
25090
|
actionId
|
|
24672
25091
|
})
|
|
@@ -24779,6 +25198,12 @@ var ToolbarController = class extends ControlController {
|
|
|
24779
25198
|
_data = data.getOrigin();
|
|
24780
25199
|
}
|
|
24781
25200
|
await this.state.buttonsState.update(this.context, _data, appDeId);
|
|
25201
|
+
this.allToolbarItems.forEach((item) => {
|
|
25202
|
+
const itemState = this.state.buttonsState[item.id];
|
|
25203
|
+
if (item.hiddenItem) {
|
|
25204
|
+
itemState.visible = false;
|
|
25205
|
+
}
|
|
25206
|
+
});
|
|
24782
25207
|
if (this.scheduler) {
|
|
24783
25208
|
const logicParams = {};
|
|
24784
25209
|
if (_data) {
|
|
@@ -24871,6 +25296,7 @@ var ContextMenuController = class extends ToolbarController {
|
|
|
24871
25296
|
};
|
|
24872
25297
|
|
|
24873
25298
|
// src/controller/control/dashboard/dashboard.controller.ts
|
|
25299
|
+
import { clone as clone28 } from "ramda";
|
|
24874
25300
|
var DashboardController = class extends ControlController {
|
|
24875
25301
|
constructor() {
|
|
24876
25302
|
super(...arguments);
|
|
@@ -24890,13 +25316,25 @@ var DashboardController = class extends ControlController {
|
|
|
24890
25316
|
* @type {{ [key: string]: IPortletController }}
|
|
24891
25317
|
*/
|
|
24892
25318
|
this.portlets = {};
|
|
25319
|
+
/**
|
|
25320
|
+
* 启用动态
|
|
25321
|
+
*
|
|
25322
|
+
* @author tony001
|
|
25323
|
+
* @date 2024-06-27 11:06:24
|
|
25324
|
+
* @type {boolean}
|
|
25325
|
+
*/
|
|
25326
|
+
this.enableDynamic = false;
|
|
24893
25327
|
}
|
|
24894
25328
|
initState() {
|
|
24895
25329
|
super.initState();
|
|
24896
25330
|
}
|
|
24897
25331
|
async onCreated() {
|
|
25332
|
+
this.model.enableCustomized = true;
|
|
24898
25333
|
await super.onCreated();
|
|
24899
25334
|
await this.initPortlets(this.model.controls);
|
|
25335
|
+
if (this.controlParams.enabledynamic === "true") {
|
|
25336
|
+
this.enableDynamic = true;
|
|
25337
|
+
}
|
|
24900
25338
|
const { appDataEntityId } = this.view.model;
|
|
24901
25339
|
if (appDataEntityId) {
|
|
24902
25340
|
this.view.evt.on("onDataChange", (event) => {
|
|
@@ -24982,6 +25420,57 @@ var DashboardController = class extends ControlController {
|
|
|
24982
25420
|
});
|
|
24983
25421
|
this.evt.emit("onResetPortlet", void 0);
|
|
24984
25422
|
}
|
|
25423
|
+
/**
|
|
25424
|
+
* 加载动态
|
|
25425
|
+
*
|
|
25426
|
+
* @author tony001
|
|
25427
|
+
* @date 2024-06-27 16:06:21
|
|
25428
|
+
* @return {*} {Promise<IData[]>}
|
|
25429
|
+
*/
|
|
25430
|
+
async loadAllDynaPortlet() {
|
|
25431
|
+
var _a;
|
|
25432
|
+
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
25433
|
+
const res = await app.deService.exec(
|
|
25434
|
+
"psappportlet",
|
|
25435
|
+
"fetchdefault",
|
|
25436
|
+
this.context,
|
|
25437
|
+
{
|
|
25438
|
+
size: 1e3,
|
|
25439
|
+
n_pssysappid_eq: app.model.codeName,
|
|
25440
|
+
n_dynamodelflag_noteq: 0
|
|
25441
|
+
}
|
|
25442
|
+
);
|
|
25443
|
+
if (res && ((_a = res.data) == null ? void 0 : _a.length) > 0) {
|
|
25444
|
+
return res.data;
|
|
25445
|
+
}
|
|
25446
|
+
return [];
|
|
25447
|
+
}
|
|
25448
|
+
/**
|
|
25449
|
+
* 通过指定标识加载门户部件
|
|
25450
|
+
*
|
|
25451
|
+
* @author tony001
|
|
25452
|
+
* @date 2024-06-27 17:06:12
|
|
25453
|
+
* @param {string} id
|
|
25454
|
+
* @return {*} {(Promise<IDBPortletPart | undefined>)}
|
|
25455
|
+
*/
|
|
25456
|
+
async loadDynaPortletById(id) {
|
|
25457
|
+
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
25458
|
+
const tempContext = clone28(this.context);
|
|
25459
|
+
Object.assign(tempContext, { psappportlet: id });
|
|
25460
|
+
const res = await app.deService.exec(
|
|
25461
|
+
"psappportlet",
|
|
25462
|
+
"get",
|
|
25463
|
+
tempContext,
|
|
25464
|
+
this.params
|
|
25465
|
+
);
|
|
25466
|
+
if (res && res.data && res.data.controlmodel) {
|
|
25467
|
+
const controlModel = JSON.parse(res.data.controlmodel);
|
|
25468
|
+
return await ibiz.hub.translationModelToDsl(
|
|
25469
|
+
controlModel,
|
|
25470
|
+
"CTRL"
|
|
25471
|
+
);
|
|
25472
|
+
}
|
|
25473
|
+
}
|
|
24985
25474
|
/**
|
|
24986
25475
|
* 通知所有表单成员表单操作过程中的数据变更
|
|
24987
25476
|
*
|
|
@@ -25038,7 +25527,7 @@ var CustomDashboardController = class {
|
|
|
25038
25527
|
*/
|
|
25039
25528
|
this.portletConfig = {};
|
|
25040
25529
|
/**
|
|
25041
|
-
* 自定义定制范围类型(public:公开,personal:个人,data
|
|
25530
|
+
* 自定义定制范围类型(public:公开,personal:个人,data:数据,dynamic: 自定义动态,默认是按照个人区分,配置了应用功能组件才生效)
|
|
25042
25531
|
*
|
|
25043
25532
|
* @author tony001
|
|
25044
25533
|
* @date 2024-04-24 19:04:47
|
|
@@ -25061,13 +25550,6 @@ var CustomDashboardController = class {
|
|
|
25061
25550
|
* @type {string}
|
|
25062
25551
|
*/
|
|
25063
25552
|
this.ownerId = "";
|
|
25064
|
-
/**
|
|
25065
|
-
* 是否多模式
|
|
25066
|
-
*
|
|
25067
|
-
* @type {boolean}
|
|
25068
|
-
* @memberof CustomDashboardController
|
|
25069
|
-
*/
|
|
25070
|
-
this.multiMode = false;
|
|
25071
25553
|
this.context = dashboard.context;
|
|
25072
25554
|
this.params = dashboard.params;
|
|
25073
25555
|
this.init(dashboard.controlParams);
|
|
@@ -25093,7 +25575,6 @@ var CustomDashboardController = class {
|
|
|
25093
25575
|
this.ownerId = this.context[controlParams.owner_id];
|
|
25094
25576
|
}
|
|
25095
25577
|
if (controlParams.multimode === "true") {
|
|
25096
|
-
this.multiMode = true;
|
|
25097
25578
|
this.type = "dynamic";
|
|
25098
25579
|
}
|
|
25099
25580
|
if (this.model.appDynaDashboardUtilId) {
|
|
@@ -26107,7 +26588,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26107
26588
|
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
26108
26589
|
|
|
26109
26590
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
26110
|
-
import { RuntimeError as
|
|
26591
|
+
import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
26111
26592
|
var ExpBarControlController = class extends ControlController {
|
|
26112
26593
|
constructor() {
|
|
26113
26594
|
super(...arguments);
|
|
@@ -26440,7 +26921,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
26440
26921
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
26441
26922
|
return this.XDataModel.navAppViewId;
|
|
26442
26923
|
}
|
|
26443
|
-
throw new
|
|
26924
|
+
throw new RuntimeError53(
|
|
26444
26925
|
ibiz.i18n.t("runtime.controller.control.expBar.multiNode")
|
|
26445
26926
|
);
|
|
26446
26927
|
}
|
|
@@ -26587,7 +27068,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
26587
27068
|
};
|
|
26588
27069
|
|
|
26589
27070
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
26590
|
-
import { RuntimeError as
|
|
27071
|
+
import { RuntimeError as RuntimeError54, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
26591
27072
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
26592
27073
|
constructor() {
|
|
26593
27074
|
super(...arguments);
|
|
@@ -26678,7 +27159,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
26678
27159
|
const deData = node._deData || node;
|
|
26679
27160
|
const nodeModel = this.getNodeModel(node._nodeId);
|
|
26680
27161
|
if (!nodeModel) {
|
|
26681
|
-
throw new
|
|
27162
|
+
throw new RuntimeError54(
|
|
26682
27163
|
ibiz.i18n.t("runtime.controller.control.expBar.noFindNodeModel", {
|
|
26683
27164
|
nodeId: node._nodeId
|
|
26684
27165
|
})
|
|
@@ -26873,7 +27354,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
26873
27354
|
};
|
|
26874
27355
|
|
|
26875
27356
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
26876
|
-
import { RuntimeError as
|
|
27357
|
+
import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
26877
27358
|
|
|
26878
27359
|
// src/controller/control/form/form/form.controller.ts
|
|
26879
27360
|
import {
|
|
@@ -27519,7 +28000,7 @@ var SearchFormController = class extends FormController {
|
|
|
27519
28000
|
applyStoredFilter(index) {
|
|
27520
28001
|
const filter = this.state.storedFilters[index];
|
|
27521
28002
|
if (!filter) {
|
|
27522
|
-
throw new
|
|
28003
|
+
throw new RuntimeError55(
|
|
27523
28004
|
ibiz.i18n.t("runtime.controller.control.form.searchTerms")
|
|
27524
28005
|
);
|
|
27525
28006
|
}
|
|
@@ -27537,7 +28018,7 @@ var SearchFormController = class extends FormController {
|
|
|
27537
28018
|
async removeStoredFilter(index) {
|
|
27538
28019
|
const filter = this.state.storedFilters[index];
|
|
27539
28020
|
if (!filter) {
|
|
27540
|
-
throw new
|
|
28021
|
+
throw new RuntimeError55(
|
|
27541
28022
|
ibiz.i18n.t("runtime.controller.control.form.saveSearch")
|
|
27542
28023
|
);
|
|
27543
28024
|
}
|
|
@@ -29027,7 +29508,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
29027
29508
|
};
|
|
29028
29509
|
|
|
29029
29510
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
29030
|
-
import { RuntimeError as
|
|
29511
|
+
import { RuntimeError as RuntimeError56, RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
29031
29512
|
import { createUUID as createUUID11 } from "qx-util";
|
|
29032
29513
|
|
|
29033
29514
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -29050,6 +29531,13 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
29050
29531
|
* @date 2023-11-11 08:03:56
|
|
29051
29532
|
*/
|
|
29052
29533
|
this.formMap = /* @__PURE__ */ new Map();
|
|
29534
|
+
/**
|
|
29535
|
+
* 数据集合
|
|
29536
|
+
*
|
|
29537
|
+
* @type {IData[]}
|
|
29538
|
+
* @memberof FormMDCtrlFormController
|
|
29539
|
+
*/
|
|
29540
|
+
this.items = [];
|
|
29053
29541
|
}
|
|
29054
29542
|
createState() {
|
|
29055
29543
|
var _a;
|
|
@@ -29092,7 +29580,8 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
29092
29580
|
const fetchAction = "fetchdefault";
|
|
29093
29581
|
const res = await ibiz.hub.getApp(this.model.appId).deService.exec(appDataEntityId, fetchAction, this.context, this.params);
|
|
29094
29582
|
if (res.ok) {
|
|
29095
|
-
this.
|
|
29583
|
+
this.items = res.data;
|
|
29584
|
+
this.state.items = this.items.map((item) => {
|
|
29096
29585
|
const context = this.context.clone();
|
|
29097
29586
|
context[this.deName] = item.srfkey;
|
|
29098
29587
|
const params = { ...this.params };
|
|
@@ -29104,6 +29593,30 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
29104
29593
|
});
|
|
29105
29594
|
}
|
|
29106
29595
|
}
|
|
29596
|
+
/**
|
|
29597
|
+
* 更新数据
|
|
29598
|
+
* - 仅支持更新临时数据
|
|
29599
|
+
* @return {*} {Promise<void>}
|
|
29600
|
+
* @memberof FormMDCtrlFormController
|
|
29601
|
+
*/
|
|
29602
|
+
async updateData() {
|
|
29603
|
+
var _a;
|
|
29604
|
+
const { appDataEntityId } = this.model.contentControl;
|
|
29605
|
+
const fetchAction = "update";
|
|
29606
|
+
const deService = await ibiz.hub.getAppDEService(
|
|
29607
|
+
this.model.appId,
|
|
29608
|
+
appDataEntityId,
|
|
29609
|
+
this.context
|
|
29610
|
+
);
|
|
29611
|
+
const data = (_a = this.state.items) == null ? void 0 : _a.map((item, index) => {
|
|
29612
|
+
const _item = this.items.find((v) => v.srfkey === item.id);
|
|
29613
|
+
_item.srfordervalue = index + 1;
|
|
29614
|
+
return _item;
|
|
29615
|
+
});
|
|
29616
|
+
if (deService.isLocalMode && data) {
|
|
29617
|
+
await deService.exec(fetchAction, this.context, data);
|
|
29618
|
+
}
|
|
29619
|
+
}
|
|
29107
29620
|
/**
|
|
29108
29621
|
* 表单状态变更通知
|
|
29109
29622
|
*
|
|
@@ -29168,7 +29681,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
29168
29681
|
async remove(id) {
|
|
29169
29682
|
const controller = this.formMap.get(id);
|
|
29170
29683
|
if (!controller) {
|
|
29171
|
-
throw new
|
|
29684
|
+
throw new RuntimeError56(
|
|
29172
29685
|
ibiz.i18n.t("runtime.controller.control.form.noFoundFormController", {
|
|
29173
29686
|
id
|
|
29174
29687
|
})
|
|
@@ -29231,7 +29744,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
29231
29744
|
|
|
29232
29745
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
29233
29746
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
29234
|
-
import { clone as
|
|
29747
|
+
import { clone as clone29 } from "ramda";
|
|
29235
29748
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
29236
29749
|
constructor() {
|
|
29237
29750
|
super(...arguments);
|
|
@@ -29323,7 +29836,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
29323
29836
|
copyFields.forEach((key) => {
|
|
29324
29837
|
tempForm[key] = this.form.model[key];
|
|
29325
29838
|
});
|
|
29326
|
-
this.repeatedForm =
|
|
29839
|
+
this.repeatedForm = clone29(tempForm);
|
|
29327
29840
|
}
|
|
29328
29841
|
/**
|
|
29329
29842
|
* 设置重复器控制器
|
|
@@ -29520,11 +30033,11 @@ import {
|
|
|
29520
30033
|
IBizContext as IBizContext6,
|
|
29521
30034
|
isElementSame as isElementSame2,
|
|
29522
30035
|
mergeInLeft as mergeInLeft2,
|
|
29523
|
-
RuntimeError as
|
|
30036
|
+
RuntimeError as RuntimeError57
|
|
29524
30037
|
} from "@ibiz-template/core";
|
|
29525
30038
|
import { debounce } from "lodash-es";
|
|
29526
30039
|
import { createUUID as createUUID12 } from "qx-util";
|
|
29527
|
-
import { clone as
|
|
30040
|
+
import { clone as clone30, isNil as isNil27 } from "ramda";
|
|
29528
30041
|
|
|
29529
30042
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
29530
30043
|
import {
|
|
@@ -29893,8 +30406,8 @@ var EditFormController = class extends FormController {
|
|
|
29893
30406
|
* @return {*} {Promise<IData>}
|
|
29894
30407
|
*/
|
|
29895
30408
|
async copy() {
|
|
29896
|
-
const context =
|
|
29897
|
-
const queryParams =
|
|
30409
|
+
const context = clone30(this.context);
|
|
30410
|
+
const queryParams = clone30(this.params);
|
|
29898
30411
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
29899
30412
|
this.model.appDataEntityId,
|
|
29900
30413
|
this.model.appId
|
|
@@ -29951,7 +30464,7 @@ var EditFormController = class extends FormController {
|
|
|
29951
30464
|
return this.loadDraft();
|
|
29952
30465
|
}
|
|
29953
30466
|
const { context, params } = this.handlerAbilityParams(args);
|
|
29954
|
-
const queryParams =
|
|
30467
|
+
const queryParams = clone30(params);
|
|
29955
30468
|
let res;
|
|
29956
30469
|
try {
|
|
29957
30470
|
await this.startLoading();
|
|
@@ -29989,7 +30502,7 @@ var EditFormController = class extends FormController {
|
|
|
29989
30502
|
}
|
|
29990
30503
|
const isValid = await this.validate();
|
|
29991
30504
|
if (!isValid) {
|
|
29992
|
-
throw new
|
|
30505
|
+
throw new RuntimeError57(
|
|
29993
30506
|
ibiz.i18n.t("runtime.controller.control.form.formCompletion")
|
|
29994
30507
|
);
|
|
29995
30508
|
}
|
|
@@ -30125,7 +30638,7 @@ var EditFormController = class extends FormController {
|
|
|
30125
30638
|
(item) => item.id === formItemUpdateId
|
|
30126
30639
|
);
|
|
30127
30640
|
if (!formItemUpdate) {
|
|
30128
|
-
throw new
|
|
30641
|
+
throw new RuntimeError57(
|
|
30129
30642
|
ibiz.i18n.t("runtime.controller.control.form.itemUpdate", {
|
|
30130
30643
|
formItemUpdateId
|
|
30131
30644
|
})
|
|
@@ -30188,7 +30701,7 @@ var EditFormController = class extends FormController {
|
|
|
30188
30701
|
async wfStart(args) {
|
|
30189
30702
|
const isValid = await this.validate();
|
|
30190
30703
|
if (!isValid) {
|
|
30191
|
-
throw new
|
|
30704
|
+
throw new RuntimeError57(
|
|
30192
30705
|
ibiz.i18n.t("runtime.controller.control.form.formCompletion")
|
|
30193
30706
|
);
|
|
30194
30707
|
}
|
|
@@ -30221,7 +30734,7 @@ var EditFormController = class extends FormController {
|
|
|
30221
30734
|
async wfSubmit(args) {
|
|
30222
30735
|
const isValid = await this.validate();
|
|
30223
30736
|
if (!isValid) {
|
|
30224
|
-
throw new
|
|
30737
|
+
throw new RuntimeError57(
|
|
30225
30738
|
ibiz.i18n.t("runtime.controller.control.form.formCompletion")
|
|
30226
30739
|
);
|
|
30227
30740
|
}
|
|
@@ -30633,11 +31146,12 @@ import {
|
|
|
30633
31146
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
30634
31147
|
EntityError as EntityError2,
|
|
30635
31148
|
mergeDefaultInLeft,
|
|
31149
|
+
plus as plus2,
|
|
30636
31150
|
recursiveIterate as recursiveIterate7,
|
|
30637
|
-
RuntimeError as
|
|
31151
|
+
RuntimeError as RuntimeError58,
|
|
30638
31152
|
RuntimeModelError as RuntimeModelError63
|
|
30639
31153
|
} from "@ibiz-template/core";
|
|
30640
|
-
import { clone as
|
|
31154
|
+
import { clone as clone31, isNil as isNil28 } from "ramda";
|
|
30641
31155
|
import dayjs5 from "dayjs";
|
|
30642
31156
|
|
|
30643
31157
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -30774,6 +31288,7 @@ async function calcColumnModelBySchema(json, c) {
|
|
|
30774
31288
|
widthUnit: "PX",
|
|
30775
31289
|
valueType: "SIMPLE",
|
|
30776
31290
|
caption: item.description,
|
|
31291
|
+
hideDefault: true,
|
|
30777
31292
|
dataItemName: item.key
|
|
30778
31293
|
});
|
|
30779
31294
|
addDataItems.push({
|
|
@@ -30812,6 +31327,13 @@ var GridController = class extends MDControlController {
|
|
|
30812
31327
|
* @type {boolean}
|
|
30813
31328
|
*/
|
|
30814
31329
|
this.addSchemaColumn = false;
|
|
31330
|
+
/**
|
|
31331
|
+
* 是否显示百分比
|
|
31332
|
+
*
|
|
31333
|
+
* @type {boolean}
|
|
31334
|
+
* @memberof GridController
|
|
31335
|
+
*/
|
|
31336
|
+
this.showPercent = false;
|
|
30815
31337
|
/**
|
|
30816
31338
|
* 所有表格列控制器集合
|
|
30817
31339
|
*
|
|
@@ -30974,6 +31496,7 @@ var GridController = class extends MDControlController {
|
|
|
30974
31496
|
*/
|
|
30975
31497
|
async onCreated() {
|
|
30976
31498
|
this.addSchemaColumn = this.controlParams.enablejsonschema === "true";
|
|
31499
|
+
this.showPercent = this.controlParams.showpercent === "true";
|
|
30977
31500
|
await this.initByEntitySchema();
|
|
30978
31501
|
await super.onCreated();
|
|
30979
31502
|
this.service = new GridService(this.model);
|
|
@@ -31037,7 +31560,7 @@ var GridController = class extends MDControlController {
|
|
|
31037
31560
|
const result = await calcColumnModelBySchema(json, this);
|
|
31038
31561
|
if (result && result.degridColumns.length > 0) {
|
|
31039
31562
|
const { degridColumns, degridDataItems } = result;
|
|
31040
|
-
this.model =
|
|
31563
|
+
this.model = clone31(this.model);
|
|
31041
31564
|
this.model.degridColumns = [
|
|
31042
31565
|
...this.model.degridColumns || [],
|
|
31043
31566
|
...degridColumns
|
|
@@ -31205,7 +31728,7 @@ var GridController = class extends MDControlController {
|
|
|
31205
31728
|
} else {
|
|
31206
31729
|
const toNum = Number(sortValue);
|
|
31207
31730
|
if (Number.isNaN(toNum)) {
|
|
31208
|
-
throw new
|
|
31731
|
+
throw new RuntimeError58(
|
|
31209
31732
|
ibiz.i18n.t("runtime.controller.control.grid.convertedValue", {
|
|
31210
31733
|
srfmajortext: item.srfmajortext
|
|
31211
31734
|
})
|
|
@@ -31239,6 +31762,7 @@ var GridController = class extends MDControlController {
|
|
|
31239
31762
|
await this.loadRemoteAgg();
|
|
31240
31763
|
this.calcAggResult(this.state.items);
|
|
31241
31764
|
this.calcShowMode(this.state.items);
|
|
31765
|
+
this.calcTotalData();
|
|
31242
31766
|
return items;
|
|
31243
31767
|
}
|
|
31244
31768
|
/**
|
|
@@ -31347,7 +31871,6 @@ var GridController = class extends MDControlController {
|
|
|
31347
31871
|
* 计算当前页的聚合数据
|
|
31348
31872
|
* @author lxm
|
|
31349
31873
|
* @date 2023-08-07 04:22:09
|
|
31350
|
-
* @protected
|
|
31351
31874
|
* @param {IData[]} items
|
|
31352
31875
|
*/
|
|
31353
31876
|
calcAggResult(items) {
|
|
@@ -31396,7 +31919,7 @@ var GridController = class extends MDControlController {
|
|
|
31396
31919
|
if (editShowMode === "row") {
|
|
31397
31920
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
31398
31921
|
if (editingRow) {
|
|
31399
|
-
throw new
|
|
31922
|
+
throw new RuntimeError58(
|
|
31400
31923
|
ibiz.i18n.t("runtime.controller.common.md.firstComplete")
|
|
31401
31924
|
);
|
|
31402
31925
|
}
|
|
@@ -31439,7 +31962,7 @@ var GridController = class extends MDControlController {
|
|
|
31439
31962
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
31440
31963
|
const rowState = this.findRowState(data);
|
|
31441
31964
|
if (!rowState) {
|
|
31442
|
-
throw new
|
|
31965
|
+
throw new RuntimeError58(
|
|
31443
31966
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
31444
31967
|
);
|
|
31445
31968
|
}
|
|
@@ -31453,7 +31976,7 @@ var GridController = class extends MDControlController {
|
|
|
31453
31976
|
}
|
|
31454
31977
|
const isValid = await this.validate(rowState);
|
|
31455
31978
|
if (!isValid) {
|
|
31456
|
-
throw new
|
|
31979
|
+
throw new RuntimeError58(
|
|
31457
31980
|
ibiz.i18n.t("runtime.controller.control.grid.saveCancel")
|
|
31458
31981
|
);
|
|
31459
31982
|
}
|
|
@@ -31709,7 +32232,7 @@ var GridController = class extends MDControlController {
|
|
|
31709
32232
|
}
|
|
31710
32233
|
async toggleRowEdit() {
|
|
31711
32234
|
if (!this.model.enableRowNew) {
|
|
31712
|
-
throw new
|
|
32235
|
+
throw new RuntimeError58(
|
|
31713
32236
|
ibiz.i18n.t("runtime.controller.control.grid.noSupportRowEditing")
|
|
31714
32237
|
);
|
|
31715
32238
|
}
|
|
@@ -31744,12 +32267,12 @@ var GridController = class extends MDControlController {
|
|
|
31744
32267
|
} else {
|
|
31745
32268
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
31746
32269
|
if (editingRow) {
|
|
31747
|
-
throw new
|
|
32270
|
+
throw new RuntimeError58(
|
|
31748
32271
|
ibiz.i18n.t("runtime.controller.control.grid.lineEditing")
|
|
31749
32272
|
);
|
|
31750
32273
|
}
|
|
31751
32274
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
31752
|
-
row.cacheData =
|
|
32275
|
+
row.cacheData = clone31(row.data);
|
|
31753
32276
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
31754
32277
|
Object.assign(row.data, defaultVal);
|
|
31755
32278
|
}
|
|
@@ -31801,7 +32324,7 @@ var GridController = class extends MDControlController {
|
|
|
31801
32324
|
(item) => item.id === updateId
|
|
31802
32325
|
);
|
|
31803
32326
|
if (!findUpdate) {
|
|
31804
|
-
throw new
|
|
32327
|
+
throw new RuntimeError58(
|
|
31805
32328
|
ibiz.i18n.t("runtime.controller.control.grid.updateColumns", {
|
|
31806
32329
|
updateId
|
|
31807
32330
|
})
|
|
@@ -31892,7 +32415,7 @@ var GridController = class extends MDControlController {
|
|
|
31892
32415
|
*/
|
|
31893
32416
|
formatExcelData(data) {
|
|
31894
32417
|
const { fields = [] } = this.dataExportParam;
|
|
31895
|
-
const cloneData =
|
|
32418
|
+
const cloneData = clone31(
|
|
31896
32419
|
data.map((item) => {
|
|
31897
32420
|
return fields.reduce((obj, key) => {
|
|
31898
32421
|
obj[key] = item[key];
|
|
@@ -31945,7 +32468,7 @@ var GridController = class extends MDControlController {
|
|
|
31945
32468
|
data = this.getData();
|
|
31946
32469
|
}
|
|
31947
32470
|
if (data.length === 0) {
|
|
31948
|
-
throw new
|
|
32471
|
+
throw new RuntimeError58(
|
|
31949
32472
|
ibiz.i18n.t("runtime.controller.control.grid.exported")
|
|
31950
32473
|
);
|
|
31951
32474
|
}
|
|
@@ -31961,7 +32484,7 @@ var GridController = class extends MDControlController {
|
|
|
31961
32484
|
async exportData(args) {
|
|
31962
32485
|
const { header } = this.dataExportParam;
|
|
31963
32486
|
if (!header) {
|
|
31964
|
-
throw new
|
|
32487
|
+
throw new RuntimeError58(
|
|
31965
32488
|
ibiz.i18n.t("runtime.controller.control.grid.tabularColumns")
|
|
31966
32489
|
);
|
|
31967
32490
|
}
|
|
@@ -32218,13 +32741,34 @@ var GridController = class extends MDControlController {
|
|
|
32218
32741
|
await this.afterLoad({}, this.state.items);
|
|
32219
32742
|
}
|
|
32220
32743
|
}
|
|
32744
|
+
/**
|
|
32745
|
+
* 计算统计数据
|
|
32746
|
+
* @author: zzq
|
|
32747
|
+
* @date 2024-06-28 17:12:58
|
|
32748
|
+
* @return {*} {Promise<void>}
|
|
32749
|
+
*/
|
|
32750
|
+
calcTotalData() {
|
|
32751
|
+
if (!this.showPercent) {
|
|
32752
|
+
return;
|
|
32753
|
+
}
|
|
32754
|
+
const totalResult = {};
|
|
32755
|
+
Object.values(this.fieldColumns).forEach((column) => {
|
|
32756
|
+
const fieldName = column.model.id;
|
|
32757
|
+
const result = this.state.items.map((item) => item[fieldName]).reduce((a, b) => plus2(a, b), 0);
|
|
32758
|
+
if (result) {
|
|
32759
|
+
totalResult[fieldName] = result;
|
|
32760
|
+
}
|
|
32761
|
+
});
|
|
32762
|
+
this.state.totalResult = totalResult;
|
|
32763
|
+
}
|
|
32221
32764
|
};
|
|
32222
32765
|
|
|
32223
32766
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
32224
|
-
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as
|
|
32767
|
+
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus3 } from "@ibiz-template/core";
|
|
32225
32768
|
import dayjs6 from "dayjs";
|
|
32226
32769
|
import { debounce as debounce2 } from "lodash-es";
|
|
32227
|
-
import { clone as
|
|
32770
|
+
import { clone as clone32, isNil as isNil29 } from "ramda";
|
|
32771
|
+
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
32228
32772
|
var GridFieldColumnController = class extends GridColumnController {
|
|
32229
32773
|
constructor() {
|
|
32230
32774
|
super(...arguments);
|
|
@@ -32367,7 +32911,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
32367
32911
|
srfkey: value,
|
|
32368
32912
|
...wfContext
|
|
32369
32913
|
});
|
|
32370
|
-
const tempParams =
|
|
32914
|
+
const tempParams = clone32(this.params);
|
|
32371
32915
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
32372
32916
|
row.data,
|
|
32373
32917
|
tempContext,
|
|
@@ -32456,10 +33000,10 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
32456
33000
|
if (this.grid.model.aggMode === "PAGE") {
|
|
32457
33001
|
switch (aggMode) {
|
|
32458
33002
|
case "SUM":
|
|
32459
|
-
aggValue = items.map((item) => item[fieldName]).reduce((a, b) =>
|
|
33003
|
+
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus3(a, b), 0);
|
|
32460
33004
|
break;
|
|
32461
33005
|
case "AVG":
|
|
32462
|
-
aggValue = items.map((item) => item[fieldName]).reduce((a, b) =>
|
|
33006
|
+
aggValue = items.map((item) => item[fieldName]).reduce((a, b) => plus3(a, b), 0) / items.length;
|
|
32463
33007
|
break;
|
|
32464
33008
|
case "MAX":
|
|
32465
33009
|
aggValue = Math.max(
|
|
@@ -32516,7 +33060,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
32516
33060
|
if (this.model.valueType !== "SIMPLE") {
|
|
32517
33061
|
return ValueExUtil.toText(this.model, value);
|
|
32518
33062
|
}
|
|
32519
|
-
const strVal = "".concat(value
|
|
33063
|
+
const strVal = "".concat(isNilOrEmpty8(value) ? "" : value);
|
|
32520
33064
|
if (!this.valueFormat) {
|
|
32521
33065
|
return strVal;
|
|
32522
33066
|
}
|
|
@@ -32621,9 +33165,9 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
32621
33165
|
};
|
|
32622
33166
|
|
|
32623
33167
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
32624
|
-
import { RuntimeError as
|
|
33168
|
+
import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
|
|
32625
33169
|
import Schema2 from "async-validator";
|
|
32626
|
-
import { isNilOrEmpty as
|
|
33170
|
+
import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
|
|
32627
33171
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
32628
33172
|
constructor() {
|
|
32629
33173
|
super(...arguments);
|
|
@@ -32761,7 +33305,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
32761
33305
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
32762
33306
|
const result = await this.validate(row);
|
|
32763
33307
|
if (!result) {
|
|
32764
|
-
throw new
|
|
33308
|
+
throw new RuntimeError59(
|
|
32765
33309
|
ibiz.i18n.t("runtime.controller.control.grid.checksumErrors", {
|
|
32766
33310
|
codeName: this.editItem.codeName,
|
|
32767
33311
|
fieldName: row.errors[this.fieldName]
|
|
@@ -32867,7 +33411,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
32867
33411
|
*/
|
|
32868
33412
|
async validate(row) {
|
|
32869
33413
|
const editName = this.fieldName;
|
|
32870
|
-
if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required === true && (typeof row.data[editName] === "string" ?
|
|
33414
|
+
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]))) {
|
|
32871
33415
|
row.errors[editName] = ibiz.i18n.t(
|
|
32872
33416
|
"runtime.controller.control.form.fillIn",
|
|
32873
33417
|
{
|
|
@@ -33085,7 +33629,7 @@ var ListController = class extends MDControlController {
|
|
|
33085
33629
|
};
|
|
33086
33630
|
|
|
33087
33631
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
33088
|
-
import { recursiveIterate as recursiveIterate8, RuntimeError as
|
|
33632
|
+
import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError60 } from "@ibiz-template/core";
|
|
33089
33633
|
import { AsyncSeriesHook as AsyncSeriesHook2 } from "qx-util";
|
|
33090
33634
|
var PanelController = class extends ControlController {
|
|
33091
33635
|
constructor(model, context, params, ctx, container) {
|
|
@@ -33242,7 +33786,7 @@ var PanelController = class extends ControlController {
|
|
|
33242
33786
|
var _a, _b;
|
|
33243
33787
|
const data = await this.prepareData();
|
|
33244
33788
|
if (!data) {
|
|
33245
|
-
throw new
|
|
33789
|
+
throw new RuntimeError60(
|
|
33246
33790
|
ibiz.i18n.t("runtime.controller.control.panel.panelData")
|
|
33247
33791
|
);
|
|
33248
33792
|
}
|
|
@@ -33888,7 +34432,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
33888
34432
|
|
|
33889
34433
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
33890
34434
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
33891
|
-
import { clone as
|
|
34435
|
+
import { clone as clone34 } from "ramda";
|
|
33892
34436
|
import { isString as isString3 } from "lodash-es";
|
|
33893
34437
|
|
|
33894
34438
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -34376,8 +34920,8 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
34376
34920
|
}
|
|
34377
34921
|
|
|
34378
34922
|
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
34379
|
-
import { RuntimeError as
|
|
34380
|
-
import { clone as
|
|
34923
|
+
import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
34924
|
+
import { clone as clone33 } from "ramda";
|
|
34381
34925
|
var SubFieldRegex2 = /^N_(.\w+)_(.\w+)$/;
|
|
34382
34926
|
var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
34383
34927
|
constructor(filterModels, appDataEntity, context, params) {
|
|
@@ -34435,7 +34979,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
34435
34979
|
return false;
|
|
34436
34980
|
});
|
|
34437
34981
|
if (!minorDEId) {
|
|
34438
|
-
throw new
|
|
34982
|
+
throw new RuntimeError61(
|
|
34439
34983
|
ibiz.i18n.t("runtime.controller.control.searchBar.noFoundEntity", {
|
|
34440
34984
|
targetField
|
|
34441
34985
|
})
|
|
@@ -34462,7 +35006,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
34462
35006
|
const matches = subStr.match(SubFieldRegex2);
|
|
34463
35007
|
const subField = matches[1];
|
|
34464
35008
|
const subOP = matches[2];
|
|
34465
|
-
const cloneItem =
|
|
35009
|
+
const cloneItem = clone33(item);
|
|
34466
35010
|
cloneItem.defsearchMode.valueOP = subOP;
|
|
34467
35011
|
cloneItem.id = subField;
|
|
34468
35012
|
const filterC = new SearchBarFilterController(
|
|
@@ -34914,7 +35458,7 @@ var SearchBarController = class extends ControlController {
|
|
|
34914
35458
|
}
|
|
34915
35459
|
});
|
|
34916
35460
|
if (addSearchBarFilters.length > 0) {
|
|
34917
|
-
this.model =
|
|
35461
|
+
this.model = clone34(this.model);
|
|
34918
35462
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
34919
35463
|
this.model.enableFilter = true;
|
|
34920
35464
|
}
|
|
@@ -35634,7 +36178,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
35634
36178
|
|
|
35635
36179
|
// src/controller/control/tree/tree.controller.ts
|
|
35636
36180
|
import {
|
|
35637
|
-
RuntimeError as
|
|
36181
|
+
RuntimeError as RuntimeError62,
|
|
35638
36182
|
RuntimeModelError as RuntimeModelError66,
|
|
35639
36183
|
recursiveIterate as recursiveIterate11
|
|
35640
36184
|
} from "@ibiz-template/core";
|
|
@@ -36720,7 +37264,7 @@ var TreeController = class extends MDControlController {
|
|
|
36720
37264
|
);
|
|
36721
37265
|
}
|
|
36722
37266
|
if (nodeData._nodeType !== "DE") {
|
|
36723
|
-
throw new
|
|
37267
|
+
throw new RuntimeError62(
|
|
36724
37268
|
ibiz.i18n.t("runtime.controller.control.tree.nodeData")
|
|
36725
37269
|
);
|
|
36726
37270
|
}
|
|
@@ -36738,7 +37282,7 @@ var TreeController = class extends MDControlController {
|
|
|
36738
37282
|
let needRefresh = false;
|
|
36739
37283
|
const treeNode = this.getNodeModel(item._nodeId);
|
|
36740
37284
|
if (!treeNode) {
|
|
36741
|
-
throw new
|
|
37285
|
+
throw new RuntimeError62(
|
|
36742
37286
|
ibiz.i18n.t("runtime.controller.control.tree.noFoundTreeNode")
|
|
36743
37287
|
);
|
|
36744
37288
|
}
|
|
@@ -36784,7 +37328,7 @@ var TreeController = class extends MDControlController {
|
|
|
36784
37328
|
};
|
|
36785
37329
|
|
|
36786
37330
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
36787
|
-
import { RuntimeError as
|
|
37331
|
+
import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
|
|
36788
37332
|
|
|
36789
37333
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
36790
37334
|
var WizardPanelService = class extends ControlService {
|
|
@@ -36972,7 +37516,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
36972
37516
|
const { activeFormTag } = this.state;
|
|
36973
37517
|
const controller = this.formControllers.get(activeFormTag);
|
|
36974
37518
|
if (!controller) {
|
|
36975
|
-
throw new
|
|
37519
|
+
throw new RuntimeError63(
|
|
36976
37520
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.formController", {
|
|
36977
37521
|
activeFormTag
|
|
36978
37522
|
})
|
|
@@ -37022,7 +37566,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37022
37566
|
getWizardFormByTag(tag) {
|
|
37023
37567
|
var _a;
|
|
37024
37568
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
37025
|
-
throw new
|
|
37569
|
+
throw new RuntimeError63(
|
|
37026
37570
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.noConfiguration")
|
|
37027
37571
|
);
|
|
37028
37572
|
return;
|
|
@@ -37033,7 +37577,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37033
37577
|
}
|
|
37034
37578
|
);
|
|
37035
37579
|
if (!wizardForm) {
|
|
37036
|
-
throw new
|
|
37580
|
+
throw new RuntimeError63(
|
|
37037
37581
|
ibiz.i18n.t(
|
|
37038
37582
|
"runtime.controller.control.wizardPanel.wizardFormIdentifier",
|
|
37039
37583
|
{ tag }
|
|
@@ -37125,7 +37669,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37125
37669
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
37126
37670
|
}
|
|
37127
37671
|
if (!prevTag) {
|
|
37128
|
-
throw new
|
|
37672
|
+
throw new RuntimeError63(
|
|
37129
37673
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.noPreviousForm")
|
|
37130
37674
|
);
|
|
37131
37675
|
}
|
|
@@ -37163,7 +37707,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37163
37707
|
});
|
|
37164
37708
|
const nextWizardStep = wizardSteps[index + 1];
|
|
37165
37709
|
if (!nextWizardStep) {
|
|
37166
|
-
throw new
|
|
37710
|
+
throw new RuntimeError63(
|
|
37167
37711
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.nextStep")
|
|
37168
37712
|
);
|
|
37169
37713
|
}
|
|
@@ -37174,7 +37718,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
37174
37718
|
}
|
|
37175
37719
|
}
|
|
37176
37720
|
if (!nextTag) {
|
|
37177
|
-
throw new
|
|
37721
|
+
throw new RuntimeError63(
|
|
37178
37722
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.nextForm")
|
|
37179
37723
|
);
|
|
37180
37724
|
}
|
|
@@ -37560,11 +38104,11 @@ var MDCtrlController = class extends MDControlController {
|
|
|
37560
38104
|
};
|
|
37561
38105
|
|
|
37562
38106
|
// src/controller/control/kanban/kanban.controller.ts
|
|
37563
|
-
import { RuntimeError as
|
|
37564
|
-
import { clone as
|
|
38107
|
+
import { RuntimeError as RuntimeError64, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
38108
|
+
import { clone as clone36, isNil as isNil33 } from "ramda";
|
|
37565
38109
|
|
|
37566
38110
|
// src/controller/control/kanban/kanban.service.ts
|
|
37567
|
-
import { clone as
|
|
38111
|
+
import { clone as clone35 } from "ramda";
|
|
37568
38112
|
var KanbanService = class extends DataViewControlService {
|
|
37569
38113
|
/**
|
|
37570
38114
|
* 更新分组数据
|
|
@@ -37593,7 +38137,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
37593
38137
|
*/
|
|
37594
38138
|
async moveOrderItem(context, data, args) {
|
|
37595
38139
|
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
37596
|
-
const params =
|
|
38140
|
+
const params = clone35(data.getOrigin());
|
|
37597
38141
|
Object.assign(params, args);
|
|
37598
38142
|
let res = await this.exec(moveAction, context, params, {
|
|
37599
38143
|
srfupdateitem: true
|
|
@@ -37679,7 +38223,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37679
38223
|
} else {
|
|
37680
38224
|
const toNum = Number(sortValue);
|
|
37681
38225
|
if (Number.isNaN(toNum)) {
|
|
37682
|
-
throw new
|
|
38226
|
+
throw new RuntimeError64(
|
|
37683
38227
|
ibiz.i18n.t("runtime.controller.control.grid.convertedValue", {
|
|
37684
38228
|
srfmajortext: item.srfmajortext
|
|
37685
38229
|
})
|
|
@@ -37803,7 +38347,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37803
38347
|
}
|
|
37804
38348
|
handleDataGroup() {
|
|
37805
38349
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
37806
|
-
throw new
|
|
38350
|
+
throw new RuntimeError64(
|
|
37807
38351
|
ibiz.i18n.t("runtime.controller.control.kanban.groupedOn")
|
|
37808
38352
|
);
|
|
37809
38353
|
}
|
|
@@ -37925,7 +38469,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
37925
38469
|
}
|
|
37926
38470
|
return moveData;
|
|
37927
38471
|
};
|
|
37928
|
-
const draggedItem =
|
|
38472
|
+
const draggedItem = clone36(fromGroup.children[fromIndex]);
|
|
37929
38473
|
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
37930
38474
|
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
37931
38475
|
if (info.from !== info.to) {
|
|
@@ -38193,12 +38737,12 @@ var KanbanController = class extends DataViewControlController {
|
|
|
38193
38737
|
|
|
38194
38738
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
38195
38739
|
import {
|
|
38196
|
-
RuntimeError as
|
|
38740
|
+
RuntimeError as RuntimeError65,
|
|
38197
38741
|
RuntimeModelError as RuntimeModelError69,
|
|
38198
38742
|
awaitTimeout as awaitTimeout3,
|
|
38199
38743
|
recursiveIterate as recursiveIterate12
|
|
38200
38744
|
} from "@ibiz-template/core";
|
|
38201
|
-
import { clone as
|
|
38745
|
+
import { clone as clone37 } from "ramda";
|
|
38202
38746
|
|
|
38203
38747
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
38204
38748
|
var TreeGridExService = class extends TreeService {
|
|
@@ -38478,13 +39022,13 @@ var TreeGridExController = class extends TreeController {
|
|
|
38478
39022
|
return;
|
|
38479
39023
|
}
|
|
38480
39024
|
if (nodeData._nodeType !== "DE") {
|
|
38481
|
-
throw new
|
|
39025
|
+
throw new RuntimeError65(
|
|
38482
39026
|
ibiz.i18n.t("runtime.controller.control.gantt.nonentity")
|
|
38483
39027
|
);
|
|
38484
39028
|
}
|
|
38485
39029
|
const rowState = this.state.rows[nodeData._uuid];
|
|
38486
39030
|
if (!rowState) {
|
|
38487
|
-
throw new
|
|
39031
|
+
throw new RuntimeError65(
|
|
38488
39032
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
38489
39033
|
);
|
|
38490
39034
|
}
|
|
@@ -38500,7 +39044,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
38500
39044
|
const { appDataEntityId, updateAppDEActionId } = nodeModel;
|
|
38501
39045
|
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
38502
39046
|
if (isCreate) {
|
|
38503
|
-
throw new
|
|
39047
|
+
throw new RuntimeError65(
|
|
38504
39048
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.noSupportCreation")
|
|
38505
39049
|
);
|
|
38506
39050
|
}
|
|
@@ -38665,12 +39209,12 @@ var TreeGridExController = class extends TreeController {
|
|
|
38665
39209
|
(item) => item.showRowEdit
|
|
38666
39210
|
);
|
|
38667
39211
|
if (editingRow) {
|
|
38668
|
-
throw new
|
|
39212
|
+
throw new RuntimeError65(
|
|
38669
39213
|
ibiz.i18n.t("runtime.controller.control.grid.lineEditing")
|
|
38670
39214
|
);
|
|
38671
39215
|
}
|
|
38672
39216
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
38673
|
-
row.cacheData =
|
|
39217
|
+
row.cacheData = clone37(row.data);
|
|
38674
39218
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
38675
39219
|
Object.assign(row.data, defaultVal);
|
|
38676
39220
|
}
|
|
@@ -38780,10 +39324,10 @@ var TreeGridExColumnController = class {
|
|
|
38780
39324
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
|
|
38781
39325
|
import {
|
|
38782
39326
|
DataTypes as DataTypes5,
|
|
38783
|
-
RuntimeError as
|
|
39327
|
+
RuntimeError as RuntimeError66,
|
|
38784
39328
|
RuntimeModelError as RuntimeModelError70
|
|
38785
39329
|
} from "@ibiz-template/core";
|
|
38786
|
-
import { clone as
|
|
39330
|
+
import { clone as clone38 } from "ramda";
|
|
38787
39331
|
import dayjs7 from "dayjs";
|
|
38788
39332
|
var TreeGridExNodeColumnController = class {
|
|
38789
39333
|
/**
|
|
@@ -38985,7 +39529,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
38985
39529
|
const valueItem = this.nodeColumn.linkValueItem || "srfkey";
|
|
38986
39530
|
const value = row.data[valueItem];
|
|
38987
39531
|
if (value == null) {
|
|
38988
|
-
throw new
|
|
39532
|
+
throw new RuntimeError66(
|
|
38989
39533
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.noPickedUp", {
|
|
38990
39534
|
valueItem
|
|
38991
39535
|
})
|
|
@@ -39000,7 +39544,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
39000
39544
|
srfkey: value,
|
|
39001
39545
|
...wfContext
|
|
39002
39546
|
});
|
|
39003
|
-
const tempParams =
|
|
39547
|
+
const tempParams = clone38(this.params);
|
|
39004
39548
|
const { userParam } = this.nodeColumn;
|
|
39005
39549
|
if (userParam) {
|
|
39006
39550
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -39414,7 +39958,7 @@ var TreeGridService = class extends GridService {
|
|
|
39414
39958
|
};
|
|
39415
39959
|
|
|
39416
39960
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
39417
|
-
import { RuntimeError as
|
|
39961
|
+
import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
|
|
39418
39962
|
import { createUUID as createUUID14 } from "qx-util";
|
|
39419
39963
|
|
|
39420
39964
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -39634,7 +40178,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
39634
40178
|
(item) => item.id === id
|
|
39635
40179
|
);
|
|
39636
40180
|
if (panelUiItemIndex < 0) {
|
|
39637
|
-
throw new
|
|
40181
|
+
throw new RuntimeError67(
|
|
39638
40182
|
ibiz.i18n.t("runtime.controller.control.meditViewPanel.dataExist")
|
|
39639
40183
|
);
|
|
39640
40184
|
}
|
|
@@ -39877,15 +40421,14 @@ var ReportPanelBaseGenerator = class {
|
|
|
39877
40421
|
this.config = {};
|
|
39878
40422
|
this.model = model;
|
|
39879
40423
|
this.reportPanel = reportPanel;
|
|
39880
|
-
this.setConfig();
|
|
39881
40424
|
}
|
|
39882
40425
|
/**
|
|
39883
|
-
*
|
|
40426
|
+
* 初始化配置
|
|
39884
40427
|
*
|
|
39885
|
-
* @
|
|
39886
|
-
* @
|
|
40428
|
+
* @author tony001
|
|
40429
|
+
* @date 2024-06-26 16:06:01
|
|
39887
40430
|
*/
|
|
39888
|
-
|
|
40431
|
+
async initConfig() {
|
|
39889
40432
|
}
|
|
39890
40433
|
/**
|
|
39891
40434
|
* 初始化
|
|
@@ -39911,12 +40454,12 @@ var ReportPanelBaseGenerator = class {
|
|
|
39911
40454
|
// src/controller/control/report-panel/generator/user-generator.ts
|
|
39912
40455
|
var UserReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
39913
40456
|
/**
|
|
39914
|
-
*
|
|
40457
|
+
* 初始化配置
|
|
39915
40458
|
*
|
|
39916
40459
|
* @protected
|
|
39917
40460
|
* @memberof UserReportPanelGenerator
|
|
39918
40461
|
*/
|
|
39919
|
-
|
|
40462
|
+
async initConfig() {
|
|
39920
40463
|
this.config = {
|
|
39921
40464
|
CONFIG: {
|
|
39922
40465
|
fitView: true,
|
|
@@ -39974,32 +40517,16 @@ var User2ReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
39974
40517
|
};
|
|
39975
40518
|
|
|
39976
40519
|
// src/controller/control/report-panel/generator/bi-generator.ts
|
|
39977
|
-
import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
|
|
39978
40520
|
var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
39979
40521
|
/**
|
|
39980
|
-
*
|
|
40522
|
+
* 初始化配置
|
|
39981
40523
|
*
|
|
39982
40524
|
* @author tony001
|
|
39983
|
-
* @date 2024-06-
|
|
39984
|
-
* @
|
|
40525
|
+
* @date 2024-06-26 16:06:54
|
|
40526
|
+
* @return {*} {Promise<void>}
|
|
39985
40527
|
*/
|
|
39986
|
-
|
|
39987
|
-
|
|
39988
|
-
if (!((_a = this.model.appDEReport) == null ? void 0 : _a.reportUIModel)) {
|
|
39989
|
-
throw new RuntimeError66(
|
|
39990
|
-
ibiz.i18n.t("runtime.controller.control.reportPanel.noReportUIModel")
|
|
39991
|
-
);
|
|
39992
|
-
}
|
|
39993
|
-
const sourceModel = ScriptFactory.execScriptFn(
|
|
39994
|
-
{},
|
|
39995
|
-
this.model.appDEReport.reportUIModel,
|
|
39996
|
-
{
|
|
39997
|
-
isAsync: false,
|
|
39998
|
-
singleRowReturn: true
|
|
39999
|
-
}
|
|
40000
|
-
);
|
|
40001
|
-
sourceModel.reportTag = this.model.appDEReport.id;
|
|
40002
|
-
this.config = sourceModel;
|
|
40528
|
+
async initConfig() {
|
|
40529
|
+
this.config = this.translateReportToConfig(this.model);
|
|
40003
40530
|
}
|
|
40004
40531
|
/**
|
|
40005
40532
|
* 加载数据
|
|
@@ -40015,6 +40542,71 @@ var BIReportPanelGenerator = class extends ReportPanelBaseGenerator {
|
|
|
40015
40542
|
}
|
|
40016
40543
|
return Promise.resolve(data);
|
|
40017
40544
|
}
|
|
40545
|
+
/**
|
|
40546
|
+
* 转化报表数据到配置数据
|
|
40547
|
+
*
|
|
40548
|
+
* @author tony001
|
|
40549
|
+
* @date 2024-06-28 14:06:43
|
|
40550
|
+
* @private
|
|
40551
|
+
* @param {IModel} model
|
|
40552
|
+
* @return {*} {IData}
|
|
40553
|
+
*/
|
|
40554
|
+
translateReportToConfig(model) {
|
|
40555
|
+
const config = {};
|
|
40556
|
+
const biReportDatas = {};
|
|
40557
|
+
const propertyData = {
|
|
40558
|
+
caption: model.logicName,
|
|
40559
|
+
data: biReportDatas
|
|
40560
|
+
};
|
|
40561
|
+
const { appDEReport } = model;
|
|
40562
|
+
console.log(appDEReport);
|
|
40563
|
+
config.reportTag = appDEReport.id;
|
|
40564
|
+
const tempAppBISchemeId = appDEReport.appBISchemeId.split(".").pop();
|
|
40565
|
+
config.selectedSchemeId = tempAppBISchemeId;
|
|
40566
|
+
const {
|
|
40567
|
+
appBICubeId,
|
|
40568
|
+
appBIReportDimensions,
|
|
40569
|
+
appBIReportMeasures,
|
|
40570
|
+
reportUIModel
|
|
40571
|
+
} = appDEReport.appBIReport;
|
|
40572
|
+
config.selectCubeId = "".concat(tempAppBISchemeId, ".").concat(appBICubeId);
|
|
40573
|
+
if (reportUIModel) {
|
|
40574
|
+
const reportUIModelObj = JSON.parse(reportUIModel);
|
|
40575
|
+
config.selectChartType = reportUIModelObj.selectChartType;
|
|
40576
|
+
propertyData.style = reportUIModelObj.style;
|
|
40577
|
+
} else {
|
|
40578
|
+
config.selectChartType = "NUMBER";
|
|
40579
|
+
}
|
|
40580
|
+
if (appBIReportMeasures && appBIReportMeasures.length > 0) {
|
|
40581
|
+
appBIReportMeasures.forEach((measure) => {
|
|
40582
|
+
if (!biReportDatas.measure) {
|
|
40583
|
+
biReportDatas.measure = [];
|
|
40584
|
+
}
|
|
40585
|
+
biReportDatas.measure.push({
|
|
40586
|
+
pssysbischemeid: tempAppBISchemeId,
|
|
40587
|
+
pssysbicubemeasureid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(measure.measureTag),
|
|
40588
|
+
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
40589
|
+
codename: measure.measureTag
|
|
40590
|
+
});
|
|
40591
|
+
});
|
|
40592
|
+
}
|
|
40593
|
+
if (appBIReportDimensions && appBIReportDimensions.length > 0) {
|
|
40594
|
+
appBIReportDimensions.forEach((dimension) => {
|
|
40595
|
+
if (!biReportDatas.dimension) {
|
|
40596
|
+
biReportDatas.dimension = [];
|
|
40597
|
+
}
|
|
40598
|
+
biReportDatas.dimension.push({
|
|
40599
|
+
pssysbischemeid: tempAppBISchemeId,
|
|
40600
|
+
pssysbicubedimensionid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(dimension.dimensionTag),
|
|
40601
|
+
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
40602
|
+
codename: dimension.dimensionTag,
|
|
40603
|
+
pscodelistid: dimension.appCodeListId
|
|
40604
|
+
});
|
|
40605
|
+
});
|
|
40606
|
+
}
|
|
40607
|
+
config.propertyData = propertyData;
|
|
40608
|
+
return config;
|
|
40609
|
+
}
|
|
40018
40610
|
};
|
|
40019
40611
|
|
|
40020
40612
|
// src/controller/control/report-panel/generator/generator-factory.ts
|
|
@@ -40105,6 +40697,9 @@ var ReportPanelController = class extends ControlController {
|
|
|
40105
40697
|
async onCreated() {
|
|
40106
40698
|
await super.onCreated();
|
|
40107
40699
|
this.generator = ReportPanelGeneratorFactory.getInstance(this.model, this);
|
|
40700
|
+
if (this.generator) {
|
|
40701
|
+
await this.generator.initConfig();
|
|
40702
|
+
}
|
|
40108
40703
|
this.dataEntity = await ibiz.hub.getAppDataEntity(
|
|
40109
40704
|
this.model.appDataEntityId,
|
|
40110
40705
|
this.model.appId
|
|
@@ -40258,7 +40853,7 @@ var ReportPanelController = class extends ControlController {
|
|
|
40258
40853
|
// src/controller/control/gantt/gantt.controller.ts
|
|
40259
40854
|
import {
|
|
40260
40855
|
awaitTimeout as awaitTimeout4,
|
|
40261
|
-
RuntimeError as
|
|
40856
|
+
RuntimeError as RuntimeError68,
|
|
40262
40857
|
RuntimeModelError as RuntimeModelError72
|
|
40263
40858
|
} from "@ibiz-template/core";
|
|
40264
40859
|
|
|
@@ -40804,13 +41399,13 @@ var GanttController = class extends TreeGridExController {
|
|
|
40804
41399
|
*/
|
|
40805
41400
|
async modifyNodeTime(nodeData, { begin, end }) {
|
|
40806
41401
|
if (nodeData._nodeType !== "DE") {
|
|
40807
|
-
throw new
|
|
41402
|
+
throw new RuntimeError68(
|
|
40808
41403
|
ibiz.i18n.t("runtime.controller.control.gantt.noNode")
|
|
40809
41404
|
);
|
|
40810
41405
|
}
|
|
40811
41406
|
const rowState = this.getRowState(nodeData._id);
|
|
40812
41407
|
if (!rowState) {
|
|
40813
|
-
throw new
|
|
41408
|
+
throw new RuntimeError68(
|
|
40814
41409
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
40815
41410
|
);
|
|
40816
41411
|
}
|
|
@@ -40832,13 +41427,13 @@ var GanttController = class extends TreeGridExController {
|
|
|
40832
41427
|
return;
|
|
40833
41428
|
}
|
|
40834
41429
|
if (nodeData._nodeType !== "DE") {
|
|
40835
|
-
throw new
|
|
41430
|
+
throw new RuntimeError68(
|
|
40836
41431
|
ibiz.i18n.t("runtime.controller.control.gantt.nonentity")
|
|
40837
41432
|
);
|
|
40838
41433
|
}
|
|
40839
41434
|
const rowState = this.state.rows[nodeData._uuid];
|
|
40840
41435
|
if (!rowState) {
|
|
40841
|
-
throw new
|
|
41436
|
+
throw new RuntimeError68(
|
|
40842
41437
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
40843
41438
|
);
|
|
40844
41439
|
}
|
|
@@ -40888,7 +41483,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
40888
41483
|
async remove(args) {
|
|
40889
41484
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
40890
41485
|
if (!(data == null ? void 0 : data.length)) {
|
|
40891
|
-
throw new
|
|
41486
|
+
throw new RuntimeError68(
|
|
40892
41487
|
ibiz.i18n.t("runtime.controller.common.control.uncheckedData")
|
|
40893
41488
|
);
|
|
40894
41489
|
}
|
|
@@ -41011,7 +41606,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
41011
41606
|
(item) => item.showRowEdit
|
|
41012
41607
|
);
|
|
41013
41608
|
if (editingRow) {
|
|
41014
|
-
throw new
|
|
41609
|
+
throw new RuntimeError68(
|
|
41015
41610
|
ibiz.i18n.t("runtime.controller.common.md.firstComplete")
|
|
41016
41611
|
);
|
|
41017
41612
|
}
|
|
@@ -41269,7 +41864,7 @@ import { QXEvent as QXEvent11 } from "qx-util";
|
|
|
41269
41864
|
|
|
41270
41865
|
// src/controller/notification/async-action.controller.ts
|
|
41271
41866
|
import { QXEvent as QXEvent9 } from "qx-util";
|
|
41272
|
-
import { clone as
|
|
41867
|
+
import { clone as clone39 } from "ramda";
|
|
41273
41868
|
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
41274
41869
|
import dayjs8 from "dayjs";
|
|
41275
41870
|
var AsyncActionController = class {
|
|
@@ -41380,7 +41975,7 @@ var AsyncActionController = class {
|
|
|
41380
41975
|
} else {
|
|
41381
41976
|
this.noticeResult(action);
|
|
41382
41977
|
}
|
|
41383
|
-
this.evt.emit("add",
|
|
41978
|
+
this.evt.emit("add", clone39(action));
|
|
41384
41979
|
this.evt.emit("dataChange");
|
|
41385
41980
|
}
|
|
41386
41981
|
/**
|
|
@@ -41402,7 +41997,7 @@ var AsyncActionController = class {
|
|
|
41402
41997
|
}
|
|
41403
41998
|
this.noticeResult(action);
|
|
41404
41999
|
}
|
|
41405
|
-
this.evt.emit("change",
|
|
42000
|
+
this.evt.emit("change", clone39(action));
|
|
41406
42001
|
this.evt.emit("dataChange");
|
|
41407
42002
|
}
|
|
41408
42003
|
noticeResult(action) {
|
|
@@ -41550,7 +42145,11 @@ var InternalMessageController = class {
|
|
|
41550
42145
|
find.status = "READ";
|
|
41551
42146
|
this.unreadCount -= 1;
|
|
41552
42147
|
this.evt.emit("unreadCountChange", this.unreadCount);
|
|
41553
|
-
this.
|
|
42148
|
+
if (this.unreadOnly) {
|
|
42149
|
+
this.load();
|
|
42150
|
+
} else {
|
|
42151
|
+
this.evt.emit("dataChange");
|
|
42152
|
+
}
|
|
41554
42153
|
}
|
|
41555
42154
|
/**
|
|
41556
42155
|
* 把所有未读消息标记为已读
|
|
@@ -41870,7 +42469,7 @@ var AppHub = class {
|
|
|
41870
42469
|
this.registerAppView(appView);
|
|
41871
42470
|
return appView;
|
|
41872
42471
|
}
|
|
41873
|
-
throw new
|
|
42472
|
+
throw new RuntimeError69(ibiz.i18n.t("runtime.hub.noExist", { id }));
|
|
41874
42473
|
}
|
|
41875
42474
|
/**
|
|
41876
42475
|
* 根据DrControl的名称和子应用标识获取模型
|
|
@@ -41909,7 +42508,7 @@ var AppHub = class {
|
|
|
41909
42508
|
);
|
|
41910
42509
|
return model;
|
|
41911
42510
|
}
|
|
41912
|
-
throw new
|
|
42511
|
+
throw new RuntimeError69(
|
|
41913
42512
|
ibiz.i18n.t("runtime.hub.noExist", { id: modelPath })
|
|
41914
42513
|
);
|
|
41915
42514
|
}
|
|
@@ -41949,7 +42548,7 @@ var AppHub = class {
|
|
|
41949
42548
|
this.registerAppDataEntity(entity, appId2);
|
|
41950
42549
|
return entity;
|
|
41951
42550
|
}
|
|
41952
|
-
throw new
|
|
42551
|
+
throw new RuntimeError69(ibiz.i18n.t("runtime.service.noFound", { id }));
|
|
41953
42552
|
}
|
|
41954
42553
|
/**
|
|
41955
42554
|
* 新建 hub 应用
|
|
@@ -41964,7 +42563,7 @@ var AppHub = class {
|
|
|
41964
42563
|
return this.appMap.get(id);
|
|
41965
42564
|
}
|
|
41966
42565
|
if (!this.modelLoaderProvider) {
|
|
41967
|
-
throw new
|
|
42566
|
+
throw new RuntimeError69(ibiz.i18n.t("runtime.utils.firstregister"));
|
|
41968
42567
|
}
|
|
41969
42568
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
41970
42569
|
const subAppRef = await this.modelLoaderProvider.getSubAppRef(id);
|
|
@@ -42040,6 +42639,11 @@ var AppHub = class {
|
|
|
42040
42639
|
const app = await this.getAppAsync(appId2);
|
|
42041
42640
|
return app.deService.getService(context, entityId);
|
|
42042
42641
|
}
|
|
42642
|
+
async translationModelToDsl(data, type) {
|
|
42643
|
+
if (this.modelLoaderProvider) {
|
|
42644
|
+
return this.modelLoaderProvider.translationModelToDsl(data, type);
|
|
42645
|
+
}
|
|
42646
|
+
}
|
|
42043
42647
|
reset() {
|
|
42044
42648
|
this.appMap.clear();
|
|
42045
42649
|
this.configCache = void 0;
|
|
@@ -42111,7 +42715,7 @@ var EngineFactory = class {
|
|
|
42111
42715
|
|
|
42112
42716
|
// src/engine/view-base.engine.ts
|
|
42113
42717
|
import {
|
|
42114
|
-
RuntimeError as
|
|
42718
|
+
RuntimeError as RuntimeError70,
|
|
42115
42719
|
findRecursiveChild as findRecursiveChild3,
|
|
42116
42720
|
IBizContext as IBizContext7
|
|
42117
42721
|
} from "@ibiz-template/core";
|
|
@@ -42496,7 +43100,7 @@ var ViewEngineBase = class {
|
|
|
42496
43100
|
const { appDataEntityId } = this.view.model;
|
|
42497
43101
|
const { evt, context, params } = this.view;
|
|
42498
43102
|
if (!appDataEntityId) {
|
|
42499
|
-
throw new
|
|
43103
|
+
throw new RuntimeError70(ibiz.i18n.t("runtime.engine.loadEntityData"));
|
|
42500
43104
|
}
|
|
42501
43105
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
42502
43106
|
const res = await app.deService.exec(
|
|
@@ -42558,7 +43162,7 @@ var ViewEngineBase = class {
|
|
|
42558
43162
|
|
|
42559
43163
|
// src/engine/md-view.engine.ts
|
|
42560
43164
|
import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
42561
|
-
import { clone as
|
|
43165
|
+
import { clone as clone40 } from "ramda";
|
|
42562
43166
|
var MDViewEngine = class extends ViewEngineBase {
|
|
42563
43167
|
/**
|
|
42564
43168
|
* 多数据部件名称
|
|
@@ -42813,7 +43417,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42813
43417
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
42814
43418
|
);
|
|
42815
43419
|
}
|
|
42816
|
-
const params =
|
|
43420
|
+
const params = clone40(this.view.params);
|
|
42817
43421
|
if (copyMode) {
|
|
42818
43422
|
params.srfcopymode = copyMode;
|
|
42819
43423
|
}
|
|
@@ -42978,7 +43582,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
42978
43582
|
};
|
|
42979
43583
|
|
|
42980
43584
|
// src/global/global-util/global-util.ts
|
|
42981
|
-
import { RuntimeError as
|
|
43585
|
+
import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
|
|
42982
43586
|
var sourceTitle = document.title;
|
|
42983
43587
|
var GlobalUtil = class {
|
|
42984
43588
|
constructor() {
|
|
@@ -43061,6 +43665,13 @@ var GlobalUtil = class {
|
|
|
43061
43665
|
* @memberof GlobalUtil
|
|
43062
43666
|
*/
|
|
43063
43667
|
this.file = new FileUtil();
|
|
43668
|
+
/**
|
|
43669
|
+
* bi报表工具类
|
|
43670
|
+
*
|
|
43671
|
+
* @author tony001
|
|
43672
|
+
* @date 2024-06-30 11:06:13
|
|
43673
|
+
*/
|
|
43674
|
+
this.biReport = new BIReportUtil();
|
|
43064
43675
|
this.error.register(new DefaultErrorHandler());
|
|
43065
43676
|
}
|
|
43066
43677
|
/**
|
|
@@ -43119,7 +43730,7 @@ var GlobalUtil = class {
|
|
|
43119
43730
|
* @return {*} {IParams}
|
|
43120
43731
|
*/
|
|
43121
43732
|
getGlobalParam() {
|
|
43122
|
-
throw new
|
|
43733
|
+
throw new RuntimeError71(ibiz.i18n.t("runtime.global.noImplemented"));
|
|
43123
43734
|
}
|
|
43124
43735
|
/**
|
|
43125
43736
|
* 获取视图路由参数变量,数组类型,基于路由解析出来的,每一个对象里面都有context和params
|
|
@@ -43128,12 +43739,12 @@ var GlobalUtil = class {
|
|
|
43128
43739
|
* @return {*} {IParams}
|
|
43129
43740
|
*/
|
|
43130
43741
|
getRouterParams() {
|
|
43131
|
-
throw new
|
|
43742
|
+
throw new RuntimeError71(ibiz.i18n.t("runtime.global.noImplementedRouting"));
|
|
43132
43743
|
}
|
|
43133
43744
|
};
|
|
43134
43745
|
|
|
43135
43746
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
43136
|
-
import { RuntimeError as
|
|
43747
|
+
import { RuntimeError as RuntimeError72 } from "@ibiz-template/core";
|
|
43137
43748
|
var LogicExecutor = class {
|
|
43138
43749
|
/**
|
|
43139
43750
|
* @author lxm
|
|
@@ -43154,7 +43765,7 @@ var LogicExecutor = class {
|
|
|
43154
43765
|
*/
|
|
43155
43766
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43156
43767
|
execute(_executeParams) {
|
|
43157
|
-
throw new
|
|
43768
|
+
throw new RuntimeError72(
|
|
43158
43769
|
ibiz.i18n.t("runtime.logicScheduler.executor.noImplementedMethod")
|
|
43159
43770
|
);
|
|
43160
43771
|
}
|
|
@@ -43606,7 +44217,7 @@ var LogicSchedulerCenter = class {
|
|
|
43606
44217
|
};
|
|
43607
44218
|
|
|
43608
44219
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
43609
|
-
import { RuntimeError as
|
|
44220
|
+
import { RuntimeError as RuntimeError73 } from "@ibiz-template/core";
|
|
43610
44221
|
var LogicTrigger = class {
|
|
43611
44222
|
/**
|
|
43612
44223
|
* @author lxm
|
|
@@ -43666,7 +44277,7 @@ var LogicTrigger = class {
|
|
|
43666
44277
|
if (this.executor) {
|
|
43667
44278
|
return this.executor.execute(executeParams);
|
|
43668
44279
|
}
|
|
43669
|
-
throw new
|
|
44280
|
+
throw new RuntimeError73(
|
|
43670
44281
|
ibiz.i18n.t("runtime.logicScheduler.trigger.noExecutorBound", {
|
|
43671
44282
|
id: this.logic.id
|
|
43672
44283
|
})
|
|
@@ -43687,12 +44298,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
43687
44298
|
};
|
|
43688
44299
|
|
|
43689
44300
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
43690
|
-
import { RuntimeError as
|
|
44301
|
+
import { RuntimeError as RuntimeError74 } from "@ibiz-template/core";
|
|
43691
44302
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
43692
44303
|
bindExecutor(executor) {
|
|
43693
44304
|
super.bindExecutor(executor);
|
|
43694
44305
|
if (this.executor.type !== "SCRIPT") {
|
|
43695
|
-
throw new
|
|
44306
|
+
throw new RuntimeError74(
|
|
43696
44307
|
ibiz.i18n.t("runtime.logicScheduler.trigger.triggerType")
|
|
43697
44308
|
);
|
|
43698
44309
|
}
|
|
@@ -43729,7 +44340,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
43729
44340
|
};
|
|
43730
44341
|
|
|
43731
44342
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
43732
|
-
import { RuntimeError as
|
|
44343
|
+
import { RuntimeError as RuntimeError75, RuntimeModelError as RuntimeModelError75 } from "@ibiz-template/core";
|
|
43733
44344
|
var TimerTrigger = class extends LogicTrigger {
|
|
43734
44345
|
constructor() {
|
|
43735
44346
|
super(...arguments);
|
|
@@ -43744,7 +44355,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
43744
44355
|
}
|
|
43745
44356
|
this.timer = setInterval(() => {
|
|
43746
44357
|
if (!this.scheduler.defaultParamsCb) {
|
|
43747
|
-
throw new
|
|
44358
|
+
throw new RuntimeError75(
|
|
43748
44359
|
ibiz.i18n.t("runtime.logicScheduler.trigger.parameterCallback")
|
|
43749
44360
|
);
|
|
43750
44361
|
}
|
|
@@ -43763,7 +44374,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
43763
44374
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
43764
44375
|
import {
|
|
43765
44376
|
ModelError as ModelError34,
|
|
43766
|
-
RuntimeError as
|
|
44377
|
+
RuntimeError as RuntimeError76,
|
|
43767
44378
|
RuntimeModelError as RuntimeModelError76
|
|
43768
44379
|
} from "@ibiz-template/core";
|
|
43769
44380
|
import { notNilEmpty as notNilEmpty11 } from "qx-util";
|
|
@@ -43801,7 +44412,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43801
44412
|
const { context, params, ...rest } = parameters;
|
|
43802
44413
|
const { data } = parameters;
|
|
43803
44414
|
if (!(data == null ? void 0 : data[0])) {
|
|
43804
|
-
throw new
|
|
44415
|
+
throw new RuntimeError76(
|
|
43805
44416
|
ibiz.i18n.t("runtime.logicScheduler.executor.noActionableData")
|
|
43806
44417
|
);
|
|
43807
44418
|
}
|
|
@@ -43870,7 +44481,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
43870
44481
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
43871
44482
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
43872
44483
|
if (!findView) {
|
|
43873
|
-
throw new
|
|
44484
|
+
throw new RuntimeError76(
|
|
43874
44485
|
ibiz.i18n.t("runtime.logicScheduler.executor.editViews", {
|
|
43875
44486
|
formTypeValue
|
|
43876
44487
|
})
|
|
@@ -44003,7 +44614,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44003
44614
|
}
|
|
44004
44615
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
44005
44616
|
if (!selectData) {
|
|
44006
|
-
throw new
|
|
44617
|
+
throw new RuntimeError76(
|
|
44007
44618
|
ibiz.i18n.t("runtime.logicScheduler.executor.checkOne")
|
|
44008
44619
|
);
|
|
44009
44620
|
}
|
|
@@ -44015,7 +44626,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44015
44626
|
}
|
|
44016
44627
|
);
|
|
44017
44628
|
if (!findView) {
|
|
44018
|
-
throw new
|
|
44629
|
+
throw new RuntimeError76(
|
|
44019
44630
|
ibiz.i18n.t("runtime.logicScheduler.executor.entitiesAssociated", {
|
|
44020
44631
|
indexType
|
|
44021
44632
|
})
|
|
@@ -44057,7 +44668,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44057
44668
|
}
|
|
44058
44669
|
});
|
|
44059
44670
|
if (pickParentFieldName === void 0) {
|
|
44060
|
-
throw new
|
|
44671
|
+
throw new RuntimeError76(
|
|
44061
44672
|
ibiz.i18n.t("runtime.logicScheduler.executor.foreignKey", {
|
|
44062
44673
|
pickParentDeName
|
|
44063
44674
|
})
|
|
@@ -45526,6 +46137,7 @@ export {
|
|
|
45526
46137
|
Application,
|
|
45527
46138
|
AsyncActionService,
|
|
45528
46139
|
AuthorityService,
|
|
46140
|
+
BIReportUtil,
|
|
45529
46141
|
BackendUIActionProvider,
|
|
45530
46142
|
BaseController,
|
|
45531
46143
|
BrowserPlatformProvider,
|