@ibiz-template/runtime 0.7.29 → 0.7.30
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 +799 -243
- package/dist/index.system.min.js +1 -1
- package/out/constant/control-type.d.ts +6 -0
- package/out/constant/control-type.d.ts.map +1 -1
- package/out/constant/control-type.js +20 -0
- package/out/constant/index.d.ts +1 -1
- package/out/constant/index.d.ts.map +1 -1
- package/out/constant/index.js +1 -1
- package/out/controller/common/control/control.controller.d.ts +1 -0
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +4 -0
- package/out/controller/common/control/md-control.controller.d.ts +32 -0
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +85 -0
- package/out/controller/control/chart/chart.controller.d.ts +28 -0
- package/out/controller/control/chart/chart.controller.d.ts.map +1 -1
- package/out/controller/control/chart/chart.controller.js +102 -0
- package/out/controller/control/chart/generator/base-series-generator.d.ts +8 -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 +30 -7
- package/out/controller/control/chart/generator/chart-options-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/chart-options-generator.js +22 -6
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.js +1 -0
- package/out/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.d.ts +2 -2
- package/out/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.d.ts +1 -1
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +11 -4
- package/out/controller/control/grid/grid/grid-column.controller.d.ts +1 -1
- package/out/controller/control/grid/grid/grid-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid-column.controller.js +15 -3
- package/out/controller/control/grid/grid/grid.controller.d.ts +3 -3
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +6 -7
- package/out/controller/control/list/list.controller.d.ts +1 -1
- package/out/controller/control/list/list.controller.d.ts.map +1 -1
- package/out/controller/control/list/list.controller.js +11 -4
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +11 -4
- package/out/controller/control/search-bar/interface-util.d.ts.map +1 -1
- package/out/controller/control/search-bar/interface-util.js +29 -0
- package/out/engine/md-view.engine.js +2 -2
- 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/controller/controller/control/i-control.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-md-control.controller.d.ts +32 -0
- package/out/interface/controller/controller/control/i-md-control.controller.d.ts.map +1 -1
- package/out/interface/controller/state/control/search-bar/i-filter-node.d.ts +43 -1
- package/out/interface/controller/state/control/search-bar/i-filter-node.d.ts.map +1 -1
- package/out/interface/controller/state/control/search-bar/i-search-cond-ex.d.ts +21 -2
- package/out/interface/controller/state/control/search-bar/i-search-cond-ex.d.ts.map +1 -1
- package/out/interface/controller/state/control/search-bar/i-search-cond.d.ts +14 -1
- package/out/interface/controller/state/control/search-bar/i-search-cond.d.ts.map +1 -1
- package/out/interface/controller/state/control/search-bar/index.d.ts +3 -3
- package/out/interface/controller/state/control/search-bar/index.d.ts.map +1 -1
- package/out/interface/util/i-fullscreen-util/i-fullscreen-util.d.ts +8 -2
- package/out/interface/util/i-fullscreen-util/i-fullscreen-util.d.ts.map +1 -1
- package/out/interface/util/i-record-nav-util/i-record-nav-util.d.ts +78 -0
- package/out/interface/util/i-record-nav-util/i-record-nav-util.d.ts.map +1 -0
- package/out/interface/util/i-record-nav-util/i-record-nav-util.js +1 -0
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +5 -0
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +5 -0
- package/out/locale/zh-CN/index.d.ts +5 -0
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +5 -0
- package/out/utils/bi-report-util/bi-report-util.d.ts +1 -0
- package/out/utils/bi-report-util/bi-report-util.d.ts.map +1 -1
- package/out/utils/bi-report-util/bi-report-util.js +33 -5
- 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/record-nav-util/record-nav-util.d.ts +89 -0
- package/out/utils/record-nav-util/record-nav-util.d.ts.map +1 -0
- package/out/utils/record-nav-util/record-nav-util.js +192 -0
- package/out/utils/verify/form-dynamic-logic.js +1 -1
- package/package.json +6 -7
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 RuntimeError28 } from "@ibiz-template/core";
|
|
84
84
|
|
|
85
85
|
// src/utils/error-handler/default-error-handler.ts
|
|
86
86
|
import {
|
|
@@ -2218,7 +2218,7 @@ function verifyFormGroupLogic(data, logic) {
|
|
|
2218
2218
|
}
|
|
2219
2219
|
return logic.notMode ? !result : result;
|
|
2220
2220
|
}
|
|
2221
|
-
if (isSingleLogic(logic)) {
|
|
2221
|
+
if (isSingleLogic(logic) && logic.defdname) {
|
|
2222
2222
|
return testCond(
|
|
2223
2223
|
data[logic.defdname.toLowerCase()],
|
|
2224
2224
|
logic.condOP,
|
|
@@ -2476,6 +2476,21 @@ var ControlType = /* @__PURE__ */ ((ControlType2) => {
|
|
|
2476
2476
|
ControlType2["CONTEXT_MENU"] = "CONTEXTMENU";
|
|
2477
2477
|
return ControlType2;
|
|
2478
2478
|
})(ControlType || {});
|
|
2479
|
+
var MDControlTypes = [
|
|
2480
|
+
"CALENDAR" /* CALENDAR */,
|
|
2481
|
+
"CHART" /* CHART */,
|
|
2482
|
+
"DATAVIEW" /* DATAVIEW */,
|
|
2483
|
+
"GANTT" /* GANTT */,
|
|
2484
|
+
"GRID" /* GRID */,
|
|
2485
|
+
"KANBAN" /* KANBAN */,
|
|
2486
|
+
"LIST" /* LIST */,
|
|
2487
|
+
"MAP" /* MAP */,
|
|
2488
|
+
"MOBMDCTRL" /* MOB_MDCTRL */,
|
|
2489
|
+
"MULTIEDITVIEWPANEL" /* MULTI_EDIT_VIEWPANEL */,
|
|
2490
|
+
"TREEGRID" /* TREEGRID */,
|
|
2491
|
+
"TREEVIEW" /* TREEVIEW */,
|
|
2492
|
+
"TREEGRIDEX" /* TREE_GRIDEX */
|
|
2493
|
+
];
|
|
2479
2494
|
|
|
2480
2495
|
// src/constant/platform-type.ts
|
|
2481
2496
|
var PlatformType = /* @__PURE__ */ ((PlatformType2) => {
|
|
@@ -13098,8 +13113,8 @@ var baseStyle = {
|
|
|
13098
13113
|
position: "fixed",
|
|
13099
13114
|
zIndex: "10000"
|
|
13100
13115
|
};
|
|
13101
|
-
function cloneElement(
|
|
13102
|
-
const element = getAnimationElement(
|
|
13116
|
+
function cloneElement(clone42, teleport = document.body, isRemoveChild = true) {
|
|
13117
|
+
const element = getAnimationElement(clone42);
|
|
13103
13118
|
if (element == null) {
|
|
13104
13119
|
throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
|
|
13105
13120
|
}
|
|
@@ -13518,11 +13533,11 @@ function arrayContains(arr, val) {
|
|
|
13518
13533
|
});
|
|
13519
13534
|
}
|
|
13520
13535
|
function cloneObject(o) {
|
|
13521
|
-
var
|
|
13536
|
+
var clone42 = {};
|
|
13522
13537
|
for (var p in o) {
|
|
13523
|
-
|
|
13538
|
+
clone42[p] = o[p];
|
|
13524
13539
|
}
|
|
13525
|
-
return
|
|
13540
|
+
return clone42;
|
|
13526
13541
|
}
|
|
13527
13542
|
function replaceObjectProps(o1, o2) {
|
|
13528
13543
|
var o = cloneObject(o1);
|
|
@@ -15172,14 +15187,22 @@ var BIReportUtil = class {
|
|
|
15172
15187
|
if (!biReportItems.measure) {
|
|
15173
15188
|
biReportItems.measure = [];
|
|
15174
15189
|
}
|
|
15175
|
-
|
|
15190
|
+
const tempMeasure = {
|
|
15176
15191
|
pssysbischemeid: item.pssysbischemeid,
|
|
15177
15192
|
pssysbicubemeasureid: item.pssysbicubemeasureid,
|
|
15178
15193
|
pssysbicubeid: item.pssysbicubeid,
|
|
15179
15194
|
codename: (_a = item.pssysbicubemeasureid) == null ? void 0 : _a.split(".").pop(),
|
|
15180
15195
|
pssysbicubemeasurename: item.pssysbicubemeasurename,
|
|
15181
15196
|
birepitemparams: item.birepitemparams
|
|
15182
|
-
}
|
|
15197
|
+
};
|
|
15198
|
+
if (biReportUIModel.extend) {
|
|
15199
|
+
const { extend } = biReportUIModel;
|
|
15200
|
+
if (extend["aggmode@".concat(tempMeasure.codename)]) {
|
|
15201
|
+
tempMeasure.aggtype = extend["aggmode@".concat(tempMeasure.codename)];
|
|
15202
|
+
tempMeasure.bimeasuretype = "COMMON";
|
|
15203
|
+
}
|
|
15204
|
+
}
|
|
15205
|
+
biReportItems.measure.push(tempMeasure);
|
|
15183
15206
|
}
|
|
15184
15207
|
if (item.birepitemtype === "DIMENSION") {
|
|
15185
15208
|
const tempDimension = {
|
|
@@ -15225,6 +15248,9 @@ var BIReportUtil = class {
|
|
|
15225
15248
|
if (biReportUIModel.period) {
|
|
15226
15249
|
propertyData.data.period = biReportUIModel.period;
|
|
15227
15250
|
}
|
|
15251
|
+
if (biReportUIModel.extend) {
|
|
15252
|
+
propertyData.extend = biReportUIModel.extend;
|
|
15253
|
+
}
|
|
15228
15254
|
config.propertyData = propertyData;
|
|
15229
15255
|
return config;
|
|
15230
15256
|
}
|
|
@@ -15265,6 +15291,9 @@ var BIReportUtil = class {
|
|
|
15265
15291
|
if (reportUIModelObj.period) {
|
|
15266
15292
|
propertyData.data.period = reportUIModelObj.period;
|
|
15267
15293
|
}
|
|
15294
|
+
if (reportUIModelObj.extend) {
|
|
15295
|
+
propertyData.extend = reportUIModelObj.extend;
|
|
15296
|
+
}
|
|
15268
15297
|
} else {
|
|
15269
15298
|
config.selectChartType = "NUMBER";
|
|
15270
15299
|
}
|
|
@@ -15273,14 +15302,22 @@ var BIReportUtil = class {
|
|
|
15273
15302
|
if (!biReportDatas.measure) {
|
|
15274
15303
|
biReportDatas.measure = [];
|
|
15275
15304
|
}
|
|
15276
|
-
|
|
15305
|
+
const tempMeasure = {
|
|
15277
15306
|
pssysbischemeid: tempAppBISchemeId,
|
|
15278
15307
|
pssysbicubemeasureid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId, ".").concat(measure.measureTag),
|
|
15279
15308
|
pssysbicubemeasurename: measure.measureName,
|
|
15280
15309
|
pssysbicubeid: "".concat(tempAppBISchemeId, ".").concat(appBICubeId),
|
|
15281
15310
|
codename: measure.measureTag,
|
|
15282
15311
|
birepitemparams: measure.birepitemparams
|
|
15283
|
-
}
|
|
15312
|
+
};
|
|
15313
|
+
if (reportUIModelObj.extend) {
|
|
15314
|
+
const { extend } = reportUIModelObj;
|
|
15315
|
+
if (extend["aggmode@".concat(tempMeasure.codename)]) {
|
|
15316
|
+
tempMeasure.aggtype = extend["aggmode@".concat(tempMeasure.codename)];
|
|
15317
|
+
tempMeasure.bimeasuretype = "COMMON";
|
|
15318
|
+
}
|
|
15319
|
+
}
|
|
15320
|
+
biReportDatas.measure.push(tempMeasure);
|
|
15284
15321
|
});
|
|
15285
15322
|
}
|
|
15286
15323
|
if (appBIReportDimensions && appBIReportDimensions.length > 0) {
|
|
@@ -15337,7 +15374,15 @@ var BIReportUtil = class {
|
|
|
15337
15374
|
* @memberof BIReportUtil
|
|
15338
15375
|
*/
|
|
15339
15376
|
async translateDataToAppBIReport(arg) {
|
|
15340
|
-
const {
|
|
15377
|
+
const {
|
|
15378
|
+
reportTag,
|
|
15379
|
+
selectChartType,
|
|
15380
|
+
selectCubeId,
|
|
15381
|
+
caption,
|
|
15382
|
+
data,
|
|
15383
|
+
style,
|
|
15384
|
+
extend
|
|
15385
|
+
} = arg;
|
|
15341
15386
|
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
15342
15387
|
const tempUIReportModel = {
|
|
15343
15388
|
selectChartType,
|
|
@@ -15349,6 +15394,9 @@ var BIReportUtil = class {
|
|
|
15349
15394
|
if (data.period) {
|
|
15350
15395
|
Object.assign(tempUIReportModel, { period: data.period });
|
|
15351
15396
|
}
|
|
15397
|
+
if (extend && Object.keys(extend).length > 0) {
|
|
15398
|
+
Object.assign(tempUIReportModel, { extend });
|
|
15399
|
+
}
|
|
15352
15400
|
const targetData = {
|
|
15353
15401
|
pssysbireportitems: [],
|
|
15354
15402
|
pssysbischemeid: selectCubeId.split(".")[0],
|
|
@@ -15483,6 +15531,200 @@ var BIReportUtil = class {
|
|
|
15483
15531
|
}
|
|
15484
15532
|
};
|
|
15485
15533
|
|
|
15534
|
+
// src/utils/record-nav-util/record-nav-util.ts
|
|
15535
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
15536
|
+
var RecordNavUtil = class {
|
|
15537
|
+
constructor() {
|
|
15538
|
+
/**
|
|
15539
|
+
* 部件Map
|
|
15540
|
+
*
|
|
15541
|
+
* @author tony001
|
|
15542
|
+
* @date 2024-07-15 13:07:58
|
|
15543
|
+
* @private
|
|
15544
|
+
* @type {Map<string, IMDControlController>}
|
|
15545
|
+
*/
|
|
15546
|
+
this.controlMap = /* @__PURE__ */ new Map();
|
|
15547
|
+
}
|
|
15548
|
+
/**
|
|
15549
|
+
* 添加部件数据
|
|
15550
|
+
*
|
|
15551
|
+
* @author tony001
|
|
15552
|
+
* @date 2024-07-15 13:07:10
|
|
15553
|
+
* @param {string} id
|
|
15554
|
+
* @param {IMDControlController} ctrl
|
|
15555
|
+
*/
|
|
15556
|
+
add(id, ctrl) {
|
|
15557
|
+
this.controlMap.set(id, ctrl);
|
|
15558
|
+
}
|
|
15559
|
+
/**
|
|
15560
|
+
* 删除部件数据
|
|
15561
|
+
*
|
|
15562
|
+
* @author tony001
|
|
15563
|
+
* @date 2024-07-15 13:07:23
|
|
15564
|
+
* @param {string} id
|
|
15565
|
+
*/
|
|
15566
|
+
remove(id) {
|
|
15567
|
+
this.controlMap.delete(id);
|
|
15568
|
+
}
|
|
15569
|
+
/**
|
|
15570
|
+
* 获取部件数据
|
|
15571
|
+
*
|
|
15572
|
+
* @author tony001
|
|
15573
|
+
* @date 2024-07-15 14:07:32
|
|
15574
|
+
* @param {string} id
|
|
15575
|
+
* @return {*} {(IMDControlController | undefined)}
|
|
15576
|
+
*/
|
|
15577
|
+
getCtrl(id) {
|
|
15578
|
+
return this.controlMap.get(id);
|
|
15579
|
+
}
|
|
15580
|
+
/**
|
|
15581
|
+
* 获取第一条记录
|
|
15582
|
+
*
|
|
15583
|
+
* @author tony001
|
|
15584
|
+
* @date 2024-07-15 15:07:26
|
|
15585
|
+
* @param {string} ctrlId
|
|
15586
|
+
* @param {string} dataId
|
|
15587
|
+
* @return {*} {Promise<IData | undefined>}
|
|
15588
|
+
*/
|
|
15589
|
+
async getFirstRecord(ctrlId, dataId) {
|
|
15590
|
+
const targrtCtrl = this.getCtrl(ctrlId);
|
|
15591
|
+
if (!targrtCtrl) {
|
|
15592
|
+
throw new RuntimeError26(
|
|
15593
|
+
ibiz.i18n.t("runtime.utils.recordNav.noFoundCtrl", {
|
|
15594
|
+
ctrlId
|
|
15595
|
+
})
|
|
15596
|
+
);
|
|
15597
|
+
}
|
|
15598
|
+
const items = await targrtCtrl.goToFirstPage();
|
|
15599
|
+
if (items && items.length > 0) {
|
|
15600
|
+
const firstItem = items[0];
|
|
15601
|
+
if (firstItem.srfkey === dataId) {
|
|
15602
|
+
throw new RuntimeError26(
|
|
15603
|
+
ibiz.i18n.t("runtime.utils.recordNav.firstRecord")
|
|
15604
|
+
);
|
|
15605
|
+
}
|
|
15606
|
+
return firstItem;
|
|
15607
|
+
}
|
|
15608
|
+
}
|
|
15609
|
+
/**
|
|
15610
|
+
* 获取上一条记录
|
|
15611
|
+
*
|
|
15612
|
+
* @author tony001
|
|
15613
|
+
* @date 2024-07-15 15:07:01
|
|
15614
|
+
* @param {string} ctrlId
|
|
15615
|
+
* @param {string} dataId
|
|
15616
|
+
* @return {*} {Promise<IData | undefined>}
|
|
15617
|
+
*/
|
|
15618
|
+
async getPreviousRecord(ctrlId, dataId) {
|
|
15619
|
+
const targrtCtrl = this.getCtrl(ctrlId);
|
|
15620
|
+
if (!targrtCtrl) {
|
|
15621
|
+
throw new RuntimeError26(
|
|
15622
|
+
ibiz.i18n.t("runtime.utils.recordNav.noFoundCtrl", {
|
|
15623
|
+
ctrlId
|
|
15624
|
+
})
|
|
15625
|
+
);
|
|
15626
|
+
}
|
|
15627
|
+
let targetData;
|
|
15628
|
+
const { items } = targrtCtrl.state;
|
|
15629
|
+
const findIndex2 = items.findIndex((item) => {
|
|
15630
|
+
return item.srfkey === dataId;
|
|
15631
|
+
});
|
|
15632
|
+
if (findIndex2 === 0) {
|
|
15633
|
+
const preItems = await targrtCtrl.goToPreviousPage();
|
|
15634
|
+
if (preItems && preItems.length > 0) {
|
|
15635
|
+
targetData = preItems[preItems.length - 1];
|
|
15636
|
+
} else {
|
|
15637
|
+
throw new RuntimeError26(
|
|
15638
|
+
ibiz.i18n.t("runtime.utils.recordNav.firstRecord")
|
|
15639
|
+
);
|
|
15640
|
+
}
|
|
15641
|
+
} else {
|
|
15642
|
+
targetData = items[findIndex2 - 1];
|
|
15643
|
+
}
|
|
15644
|
+
return targetData;
|
|
15645
|
+
}
|
|
15646
|
+
/**
|
|
15647
|
+
* 获取下一条记录
|
|
15648
|
+
*
|
|
15649
|
+
* @author tony001
|
|
15650
|
+
* @date 2024-07-15 15:07:17
|
|
15651
|
+
* @param {string} ctrlId
|
|
15652
|
+
* @param {string} dataId
|
|
15653
|
+
* @return {*} {Promise<IData | undefined>}
|
|
15654
|
+
*/
|
|
15655
|
+
async getNextRecord(ctrlId, dataId) {
|
|
15656
|
+
const targrtCtrl = this.getCtrl(ctrlId);
|
|
15657
|
+
if (!targrtCtrl) {
|
|
15658
|
+
throw new RuntimeError26(
|
|
15659
|
+
ibiz.i18n.t("runtime.utils.recordNav.noFoundCtrl", {
|
|
15660
|
+
ctrlId
|
|
15661
|
+
})
|
|
15662
|
+
);
|
|
15663
|
+
}
|
|
15664
|
+
let targetData;
|
|
15665
|
+
const { items } = targrtCtrl.state;
|
|
15666
|
+
const { pagingMode } = targrtCtrl.model;
|
|
15667
|
+
const findIndex2 = items.findIndex((item) => {
|
|
15668
|
+
return item.srfkey === dataId;
|
|
15669
|
+
});
|
|
15670
|
+
if (findIndex2 === items.length - 1) {
|
|
15671
|
+
const nextItems = await targrtCtrl.goToNextPage();
|
|
15672
|
+
if (nextItems && nextItems.length > 0) {
|
|
15673
|
+
if (pagingMode === 1) {
|
|
15674
|
+
targetData = nextItems[0];
|
|
15675
|
+
} else {
|
|
15676
|
+
const targetIndex = nextItems.findIndex((item) => {
|
|
15677
|
+
return item.srfkey === dataId;
|
|
15678
|
+
});
|
|
15679
|
+
if (nextItems[targetIndex + 1]) {
|
|
15680
|
+
targetData = nextItems[targetIndex + 1];
|
|
15681
|
+
} else {
|
|
15682
|
+
throw new RuntimeError26(
|
|
15683
|
+
ibiz.i18n.t("runtime.utils.recordNav.lastRecord")
|
|
15684
|
+
);
|
|
15685
|
+
}
|
|
15686
|
+
}
|
|
15687
|
+
} else {
|
|
15688
|
+
throw new RuntimeError26(
|
|
15689
|
+
ibiz.i18n.t("runtime.utils.recordNav.lastRecord")
|
|
15690
|
+
);
|
|
15691
|
+
}
|
|
15692
|
+
} else {
|
|
15693
|
+
targetData = items[findIndex2 + 1];
|
|
15694
|
+
}
|
|
15695
|
+
return targetData;
|
|
15696
|
+
}
|
|
15697
|
+
/**
|
|
15698
|
+
* 获取最后一条记录
|
|
15699
|
+
*
|
|
15700
|
+
* @author tony001
|
|
15701
|
+
* @date 2024-07-15 15:07:31
|
|
15702
|
+
* @param {string} ctrlId
|
|
15703
|
+
* @param {string} dataId
|
|
15704
|
+
* @return {*} {Promise<IData | undefined>}
|
|
15705
|
+
*/
|
|
15706
|
+
async getLastRecord(ctrlId, dataId) {
|
|
15707
|
+
const targrtCtrl = this.getCtrl(ctrlId);
|
|
15708
|
+
if (!targrtCtrl) {
|
|
15709
|
+
throw new RuntimeError26(
|
|
15710
|
+
ibiz.i18n.t("runtime.utils.recordNav.noFoundCtrl", {
|
|
15711
|
+
ctrlId
|
|
15712
|
+
})
|
|
15713
|
+
);
|
|
15714
|
+
}
|
|
15715
|
+
const items = await targrtCtrl.goToLastPage();
|
|
15716
|
+
if (items && items.length > 0) {
|
|
15717
|
+
const lastItem = items[items.length - 1];
|
|
15718
|
+
if (lastItem.srfkey === dataId) {
|
|
15719
|
+
throw new RuntimeError26(
|
|
15720
|
+
ibiz.i18n.t("runtime.utils.recordNav.lastRecord")
|
|
15721
|
+
);
|
|
15722
|
+
}
|
|
15723
|
+
return lastItem;
|
|
15724
|
+
}
|
|
15725
|
+
}
|
|
15726
|
+
};
|
|
15727
|
+
|
|
15486
15728
|
// src/utils/dr-ctrl-util/index.ts
|
|
15487
15729
|
function calcItemVisibleByCounter(item, counter) {
|
|
15488
15730
|
const { enableMode, counterId } = item;
|
|
@@ -15540,7 +15782,7 @@ async function calcItemVisible(item, context, params, appDeId, appId2, data) {
|
|
|
15540
15782
|
}
|
|
15541
15783
|
|
|
15542
15784
|
// src/command/app/open-app-view/open-app-view.ts
|
|
15543
|
-
import { ModelError as ModelError15, RuntimeError as
|
|
15785
|
+
import { ModelError as ModelError15, RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
15544
15786
|
import { clone as clone19 } from "ramda";
|
|
15545
15787
|
var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
15546
15788
|
constructor() {
|
|
@@ -15564,7 +15806,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
15564
15806
|
}
|
|
15565
15807
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
15566
15808
|
if (!appView) {
|
|
15567
|
-
throw new
|
|
15809
|
+
throw new RuntimeError27(
|
|
15568
15810
|
ibiz.i18n.t("runtime.command.app.noFindApplicationView", {
|
|
15569
15811
|
appViewId
|
|
15570
15812
|
})
|
|
@@ -15687,7 +15929,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
15687
15929
|
async openPopover(appView, context, params = {}, opts = {}) {
|
|
15688
15930
|
const { event, modalOption } = opts;
|
|
15689
15931
|
if (!event) {
|
|
15690
|
-
throw new
|
|
15932
|
+
throw new RuntimeError27(ibiz.i18n.t("runtime.command.app.missingEvent"));
|
|
15691
15933
|
}
|
|
15692
15934
|
return ibiz.openView.popover(appView.id, event, context, params, {
|
|
15693
15935
|
...modalOption
|
|
@@ -15745,7 +15987,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15745
15987
|
const app = await ibiz.hub.getAppAsync(context.srfappid);
|
|
15746
15988
|
const appFunc = app.getAppFunc(appFuncId);
|
|
15747
15989
|
if (!appFunc) {
|
|
15748
|
-
throw new
|
|
15990
|
+
throw new RuntimeError28(
|
|
15749
15991
|
ibiz.i18n.t("runtime.command.app.noFindApplicationFunction", {
|
|
15750
15992
|
appFuncId
|
|
15751
15993
|
})
|
|
@@ -15789,7 +16031,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15789
16031
|
*/
|
|
15790
16032
|
async openAppView(appFunc, context, params, opts) {
|
|
15791
16033
|
if (!appFunc.appViewId) {
|
|
15792
|
-
throw new
|
|
16034
|
+
throw new RuntimeError28(
|
|
15793
16035
|
ibiz.i18n.t("runtime.command.app.noFindApplicationView", {
|
|
15794
16036
|
appViewId: appFunc.appViewId
|
|
15795
16037
|
})
|
|
@@ -15827,7 +16069,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15827
16069
|
*/
|
|
15828
16070
|
openPdAppFunc(appFunc, context, params) {
|
|
15829
16071
|
ibiz.log.warn("openPdAppFunc", appFunc, context, params);
|
|
15830
|
-
throw new
|
|
16072
|
+
throw new RuntimeError28(ibiz.i18n.t("runtime.common.unrealized"));
|
|
15831
16073
|
}
|
|
15832
16074
|
/**
|
|
15833
16075
|
* 执行 JavaScript 脚本
|
|
@@ -15857,7 +16099,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15857
16099
|
*/
|
|
15858
16100
|
custom(appFunc, context, params) {
|
|
15859
16101
|
ibiz.log.warn("custom", appFunc, context, params);
|
|
15860
|
-
throw new
|
|
16102
|
+
throw new RuntimeError28(ibiz.i18n.t("runtime.common.unrealized"));
|
|
15861
16103
|
}
|
|
15862
16104
|
};
|
|
15863
16105
|
/**
|
|
@@ -15878,7 +16120,7 @@ function installCommand() {
|
|
|
15878
16120
|
}
|
|
15879
16121
|
|
|
15880
16122
|
// src/app-hub.ts
|
|
15881
|
-
import { RuntimeError as
|
|
16123
|
+
import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
|
|
15882
16124
|
|
|
15883
16125
|
// src/application.ts
|
|
15884
16126
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -16134,7 +16376,7 @@ var Convert = class {
|
|
|
16134
16376
|
};
|
|
16135
16377
|
|
|
16136
16378
|
// src/hub/config/app-view-config-service.ts
|
|
16137
|
-
import { RuntimeError as
|
|
16379
|
+
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
16138
16380
|
var AppViewConfigService = class {
|
|
16139
16381
|
constructor() {
|
|
16140
16382
|
/**
|
|
@@ -16205,7 +16447,7 @@ var AppViewConfigService = class {
|
|
|
16205
16447
|
if (!this.viewConfigs.has(id)) {
|
|
16206
16448
|
const model = await ibiz.hub.getAppView(id);
|
|
16207
16449
|
if (!model) {
|
|
16208
|
-
throw new
|
|
16450
|
+
throw new RuntimeError29(ibiz.i18n.t("runtime.hub.noExist", { id }));
|
|
16209
16451
|
}
|
|
16210
16452
|
this.set(model.id, {
|
|
16211
16453
|
id: model.id,
|
|
@@ -16275,7 +16517,7 @@ import {
|
|
|
16275
16517
|
HttpError as HttpError7,
|
|
16276
16518
|
IBizContext as IBizContext3,
|
|
16277
16519
|
Namespace,
|
|
16278
|
-
RuntimeError as
|
|
16520
|
+
RuntimeError as RuntimeError36
|
|
16279
16521
|
} from "@ibiz-template/core";
|
|
16280
16522
|
import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ramda";
|
|
16281
16523
|
|
|
@@ -16283,7 +16525,7 @@ import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ra
|
|
|
16283
16525
|
import { NOOP } from "@ibiz-template/core";
|
|
16284
16526
|
|
|
16285
16527
|
// src/controller/utils/counter/counter.ts
|
|
16286
|
-
import { RuntimeError as
|
|
16528
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
16287
16529
|
var Counter = class {
|
|
16288
16530
|
/**
|
|
16289
16531
|
* Creates an instance of Counter.
|
|
@@ -16345,7 +16587,7 @@ var Counter = class {
|
|
|
16345
16587
|
return;
|
|
16346
16588
|
}
|
|
16347
16589
|
if (this.count === 0) {
|
|
16348
|
-
throw new
|
|
16590
|
+
throw new RuntimeError30(
|
|
16349
16591
|
ibiz.i18n.t("runtime.controller.utils.counter.decrement")
|
|
16350
16592
|
);
|
|
16351
16593
|
}
|
|
@@ -16954,7 +17196,7 @@ function getOriginData(data) {
|
|
|
16954
17196
|
}
|
|
16955
17197
|
|
|
16956
17198
|
// src/controller/utils/value-rule/value-rule.ts
|
|
16957
|
-
import { RuntimeError as
|
|
17199
|
+
import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
16958
17200
|
import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
|
|
16959
17201
|
import { isNil as isNil18 } from "ramda";
|
|
16960
17202
|
function generateRules(itemVRs, name, valueItemName) {
|
|
@@ -17004,7 +17246,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
17004
17246
|
deRule.groupCond
|
|
17005
17247
|
);
|
|
17006
17248
|
if (!isPast) {
|
|
17007
|
-
callback(new
|
|
17249
|
+
callback(new RuntimeError31(infoMessage || deRule.ruleInfo));
|
|
17008
17250
|
}
|
|
17009
17251
|
return true;
|
|
17010
17252
|
},
|
|
@@ -17077,7 +17319,7 @@ function generateEditorRules(editor) {
|
|
|
17077
17319
|
}
|
|
17078
17320
|
|
|
17079
17321
|
// src/controller/utils/value-ex/value-ex.ts
|
|
17080
|
-
import { RuntimeError as
|
|
17322
|
+
import { RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
17081
17323
|
import { isNil as isNil19, mergeLeft } from "ramda";
|
|
17082
17324
|
var ValueExUtil = class {
|
|
17083
17325
|
/**
|
|
@@ -17109,7 +17351,7 @@ var ValueExUtil = class {
|
|
|
17109
17351
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
17110
17352
|
if (["OBJECTS", "OBJECT"].includes(valueType)) {
|
|
17111
17353
|
if (!objectNameField) {
|
|
17112
|
-
throw new
|
|
17354
|
+
throw new RuntimeError32(
|
|
17113
17355
|
ibiz.i18n.t("runtime.controller.utils.valueEx.objectNameField")
|
|
17114
17356
|
);
|
|
17115
17357
|
}
|
|
@@ -17127,7 +17369,7 @@ var ValueExUtil = class {
|
|
|
17127
17369
|
};
|
|
17128
17370
|
|
|
17129
17371
|
// src/controller/utils/value-default/value-default.ts
|
|
17130
|
-
import { RuntimeError as
|
|
17372
|
+
import { RuntimeError as RuntimeError33, ModelError as ModelError17 } from "@ibiz-template/core";
|
|
17131
17373
|
import dayjs from "dayjs";
|
|
17132
17374
|
import { createUUID as createUUID8 } from "qx-util";
|
|
17133
17375
|
import { isNil as isNil20, isNotNil } from "ramda";
|
|
@@ -17168,7 +17410,7 @@ function getDefaultValue(opts, origins) {
|
|
|
17168
17410
|
case "SESSION":
|
|
17169
17411
|
case "APPLICATION":
|
|
17170
17412
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
17171
|
-
throw new
|
|
17413
|
+
throw new RuntimeError33(
|
|
17172
17414
|
ibiz.i18n.t("runtime.controller.utils.valueDefault.noExist")
|
|
17173
17415
|
);
|
|
17174
17416
|
}
|
|
@@ -17189,7 +17431,7 @@ function getDefaultValue(opts, origins) {
|
|
|
17189
17431
|
|
|
17190
17432
|
// src/controller/utils/data-file-util/data-file-util.ts
|
|
17191
17433
|
import {
|
|
17192
|
-
RuntimeError as
|
|
17434
|
+
RuntimeError as RuntimeError34,
|
|
17193
17435
|
selectFile
|
|
17194
17436
|
} from "@ibiz-template/core";
|
|
17195
17437
|
import { mergeRight as mergeRight2 } from "ramda";
|
|
@@ -17294,13 +17536,13 @@ async function importData2(opts) {
|
|
|
17294
17536
|
}
|
|
17295
17537
|
async function exportData(header, data, fileName) {
|
|
17296
17538
|
if (!ibiz.util.getExcelUtil) {
|
|
17297
|
-
throw new
|
|
17539
|
+
throw new RuntimeError34(
|
|
17298
17540
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.noExist")
|
|
17299
17541
|
);
|
|
17300
17542
|
}
|
|
17301
17543
|
const exportExcel = await ibiz.util.getExcelUtil();
|
|
17302
17544
|
if (!exportExcel) {
|
|
17303
|
-
throw new
|
|
17545
|
+
throw new RuntimeError34(
|
|
17304
17546
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.loadError")
|
|
17305
17547
|
);
|
|
17306
17548
|
}
|
|
@@ -17330,7 +17572,7 @@ async function getDataImportModels(opts) {
|
|
|
17330
17572
|
(item) => item.id === opts.deDataImportId
|
|
17331
17573
|
);
|
|
17332
17574
|
if (!deDataImport) {
|
|
17333
|
-
throw new
|
|
17575
|
+
throw new RuntimeError34(
|
|
17334
17576
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.importData")
|
|
17335
17577
|
);
|
|
17336
17578
|
}
|
|
@@ -17531,7 +17773,7 @@ async function getEntitySchema(entityId, context, params = {}) {
|
|
|
17531
17773
|
}
|
|
17532
17774
|
|
|
17533
17775
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
17534
|
-
import { RuntimeError as
|
|
17776
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
17535
17777
|
import { isNil as isNil21, mergeRight as mergeRight3 } from "ramda";
|
|
17536
17778
|
var VIEW_MSG_PREFIX = "VIEW_MSG";
|
|
17537
17779
|
var ViewMsgController = class _ViewMsgController {
|
|
@@ -17566,7 +17808,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
17566
17808
|
(item) => item.id === this.msgGroupId
|
|
17567
17809
|
);
|
|
17568
17810
|
if (!msgGroup) {
|
|
17569
|
-
throw new
|
|
17811
|
+
throw new RuntimeError35(
|
|
17570
17812
|
ibiz.i18n.t("runtime.controller.utils.viewMsg.message", {
|
|
17571
17813
|
msgGroupId: this.msgGroupId
|
|
17572
17814
|
})
|
|
@@ -17584,7 +17826,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
17584
17826
|
}
|
|
17585
17827
|
});
|
|
17586
17828
|
if (msgDetailsViewMsgIds.length) {
|
|
17587
|
-
throw new
|
|
17829
|
+
throw new RuntimeError35(
|
|
17588
17830
|
ibiz.i18n.t("runtime.controller.utils.viewMsg.noFound", {
|
|
17589
17831
|
message: msgDetailsViewMsgIds.join(",")
|
|
17590
17832
|
})
|
|
@@ -18474,7 +18716,7 @@ var ViewController = class extends BaseController {
|
|
|
18474
18716
|
async callUIAction(key, args) {
|
|
18475
18717
|
const result = this.call(key, args);
|
|
18476
18718
|
if (result === void 0) {
|
|
18477
|
-
throw new
|
|
18719
|
+
throw new RuntimeError36(
|
|
18478
18720
|
ibiz.i18n.t("runtime.controller.common.view.noSupportBehavior", {
|
|
18479
18721
|
key
|
|
18480
18722
|
})
|
|
@@ -18981,7 +19223,7 @@ import {
|
|
|
18981
19223
|
IBizContext as IBizContext4,
|
|
18982
19224
|
IBizParams,
|
|
18983
19225
|
NoticeError as NoticeError2,
|
|
18984
|
-
RuntimeError as
|
|
19226
|
+
RuntimeError as RuntimeError37
|
|
18985
19227
|
} from "@ibiz-template/core";
|
|
18986
19228
|
import { clone as clone20, isNil as isNil23 } from "ramda";
|
|
18987
19229
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -19059,6 +19301,10 @@ var ControlController = class extends BaseController {
|
|
|
19059
19301
|
get view() {
|
|
19060
19302
|
return this.ctx.view;
|
|
19061
19303
|
}
|
|
19304
|
+
// 部件标识
|
|
19305
|
+
get ctrlId() {
|
|
19306
|
+
return "".concat(this.view.model.id, "@").concat(this.model.id);
|
|
19307
|
+
}
|
|
19062
19308
|
/**
|
|
19063
19309
|
* 往ctx里注册控制器
|
|
19064
19310
|
* @author lxm
|
|
@@ -19410,7 +19656,7 @@ var ControlController = class extends BaseController {
|
|
|
19410
19656
|
ibiz.mc.command.remove.send(msg, meta);
|
|
19411
19657
|
break;
|
|
19412
19658
|
default:
|
|
19413
|
-
throw new
|
|
19659
|
+
throw new RuntimeError37(
|
|
19414
19660
|
ibiz.i18n.t("runtime.controller.common.control.unsupportedType", {
|
|
19415
19661
|
type
|
|
19416
19662
|
})
|
|
@@ -19451,7 +19697,7 @@ var ControlController = class extends BaseController {
|
|
|
19451
19697
|
// src/controller/common/control/md-control.controller.ts
|
|
19452
19698
|
import {
|
|
19453
19699
|
isElementSame,
|
|
19454
|
-
RuntimeError as
|
|
19700
|
+
RuntimeError as RuntimeError38,
|
|
19455
19701
|
RuntimeModelError as RuntimeModelError26
|
|
19456
19702
|
} from "@ibiz-template/core";
|
|
19457
19703
|
import { isNil as isNil24 } from "ramda";
|
|
@@ -19724,7 +19970,7 @@ var MDControlController = class extends ControlController {
|
|
|
19724
19970
|
async remove(args) {
|
|
19725
19971
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
19726
19972
|
if (!(data == null ? void 0 : data.length)) {
|
|
19727
|
-
throw new
|
|
19973
|
+
throw new RuntimeError38(
|
|
19728
19974
|
ibiz.i18n.t("runtime.controller.common.control.uncheckedData")
|
|
19729
19975
|
);
|
|
19730
19976
|
}
|
|
@@ -19956,12 +20202,89 @@ var MDControlController = class extends ControlController {
|
|
|
19956
20202
|
});
|
|
19957
20203
|
}
|
|
19958
20204
|
}
|
|
20205
|
+
/**
|
|
20206
|
+
* 跳转第一页
|
|
20207
|
+
*
|
|
20208
|
+
* @author tony001
|
|
20209
|
+
* @date 2024-07-15 14:07:03
|
|
20210
|
+
* @return {*} {Promise<IData[]>}
|
|
20211
|
+
*/
|
|
20212
|
+
async goToFirstPage() {
|
|
20213
|
+
const { curPage, items } = this.state;
|
|
20214
|
+
const { pagingMode } = this.model;
|
|
20215
|
+
let result = items;
|
|
20216
|
+
if (curPage !== 1 && pagingMode === 1) {
|
|
20217
|
+
this.state.curPage = 1;
|
|
20218
|
+
result = await this.load();
|
|
20219
|
+
}
|
|
20220
|
+
return result;
|
|
20221
|
+
}
|
|
20222
|
+
/**
|
|
20223
|
+
* 跳转上一页
|
|
20224
|
+
*
|
|
20225
|
+
* @author tony001
|
|
20226
|
+
* @date 2024-07-15 14:07:28
|
|
20227
|
+
* @return {*} {Promise<IData[]>}
|
|
20228
|
+
*/
|
|
20229
|
+
async goToPreviousPage() {
|
|
20230
|
+
const { curPage } = this.state;
|
|
20231
|
+
const { pagingMode } = this.model;
|
|
20232
|
+
let result = [];
|
|
20233
|
+
if (pagingMode === 1 && curPage > 1) {
|
|
20234
|
+
this.state.curPage -= 1;
|
|
20235
|
+
result = await this.load();
|
|
20236
|
+
}
|
|
20237
|
+
return result;
|
|
20238
|
+
}
|
|
20239
|
+
/**
|
|
20240
|
+
* 跳转下一页
|
|
20241
|
+
*
|
|
20242
|
+
* @author tony001
|
|
20243
|
+
* @date 2024-07-15 14:07:34
|
|
20244
|
+
* @return {*} {Promise<IData[]>}
|
|
20245
|
+
*/
|
|
20246
|
+
async goToNextPage() {
|
|
20247
|
+
const { curPage, totalPages } = this.state;
|
|
20248
|
+
const { pagingMode } = this.model;
|
|
20249
|
+
let result = [];
|
|
20250
|
+
if (pagingMode && curPage < totalPages) {
|
|
20251
|
+
if (pagingMode === 1) {
|
|
20252
|
+
this.state.curPage += 1;
|
|
20253
|
+
result = await this.load();
|
|
20254
|
+
} else {
|
|
20255
|
+
result = await this.load({ isLoadMore: true });
|
|
20256
|
+
}
|
|
20257
|
+
}
|
|
20258
|
+
return result;
|
|
20259
|
+
}
|
|
20260
|
+
/**
|
|
20261
|
+
* 跳转最后一页
|
|
20262
|
+
*
|
|
20263
|
+
* @author tony001
|
|
20264
|
+
* @date 2024-07-15 14:07:44
|
|
20265
|
+
* @return {*} {Promise<IData[]>}
|
|
20266
|
+
*/
|
|
20267
|
+
async goToLastPage() {
|
|
20268
|
+
const { curPage, items, totalPages, total } = this.state;
|
|
20269
|
+
const { pagingMode } = this.model;
|
|
20270
|
+
let result = items;
|
|
20271
|
+
if (pagingMode && curPage < totalPages) {
|
|
20272
|
+
if (pagingMode === 1) {
|
|
20273
|
+
this.state.curPage = totalPages;
|
|
20274
|
+
result = await this.load();
|
|
20275
|
+
} else {
|
|
20276
|
+
this.state.size = total;
|
|
20277
|
+
result = await this.load({ isInitialLoad: true });
|
|
20278
|
+
}
|
|
20279
|
+
}
|
|
20280
|
+
return result;
|
|
20281
|
+
}
|
|
19959
20282
|
};
|
|
19960
20283
|
|
|
19961
20284
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
19962
20285
|
import {
|
|
19963
20286
|
findRecursiveChild,
|
|
19964
|
-
RuntimeError as
|
|
20287
|
+
RuntimeError as RuntimeError39,
|
|
19965
20288
|
RuntimeModelError as RuntimeModelError27
|
|
19966
20289
|
} from "@ibiz-template/core";
|
|
19967
20290
|
|
|
@@ -20217,7 +20540,7 @@ var AppMenuController = class extends ControlController {
|
|
|
20217
20540
|
childrenFields: ["appMenuItems"]
|
|
20218
20541
|
});
|
|
20219
20542
|
if (!menuItem) {
|
|
20220
|
-
throw new
|
|
20543
|
+
throw new RuntimeError39(
|
|
20221
20544
|
ibiz.i18n.t("runtime.controller.control.menu.noFindMenu", { id })
|
|
20222
20545
|
);
|
|
20223
20546
|
}
|
|
@@ -20352,7 +20675,7 @@ var AppMenuController = class extends ControlController {
|
|
|
20352
20675
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
20353
20676
|
import {
|
|
20354
20677
|
findRecursiveChild as findRecursiveChild2,
|
|
20355
|
-
RuntimeError as
|
|
20678
|
+
RuntimeError as RuntimeError40,
|
|
20356
20679
|
RuntimeModelError as RuntimeModelError28
|
|
20357
20680
|
} from "@ibiz-template/core";
|
|
20358
20681
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -20362,7 +20685,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
20362
20685
|
childrenFields: ["appMenuItems"]
|
|
20363
20686
|
});
|
|
20364
20687
|
if (!menuItem) {
|
|
20365
|
-
throw new
|
|
20688
|
+
throw new RuntimeError40(
|
|
20366
20689
|
ibiz.i18n.t("runtime.controller.control.menu.noFindMenu", { id })
|
|
20367
20690
|
);
|
|
20368
20691
|
}
|
|
@@ -20393,10 +20716,10 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
20393
20716
|
|
|
20394
20717
|
// src/controller/control/calendar/calendar.controller.ts
|
|
20395
20718
|
import dayjs3 from "dayjs";
|
|
20396
|
-
import { RuntimeError as
|
|
20719
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
20397
20720
|
|
|
20398
20721
|
// src/controller/control/calendar/calendar.service.ts
|
|
20399
|
-
import { RuntimeError as
|
|
20722
|
+
import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
20400
20723
|
import { clone as clone21 } from "ramda";
|
|
20401
20724
|
var CalendarService = class extends MDControlService {
|
|
20402
20725
|
/**
|
|
@@ -20452,13 +20775,13 @@ var CalendarService = class extends MDControlService {
|
|
|
20452
20775
|
setCalendarConfigData(items, index) {
|
|
20453
20776
|
const { sysCalendarItems } = this.model;
|
|
20454
20777
|
if (!sysCalendarItems) {
|
|
20455
|
-
throw new
|
|
20778
|
+
throw new RuntimeError41(
|
|
20456
20779
|
ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
|
|
20457
20780
|
);
|
|
20458
20781
|
}
|
|
20459
20782
|
const calendarItem = sysCalendarItems[index];
|
|
20460
20783
|
if (!calendarItem) {
|
|
20461
|
-
throw new
|
|
20784
|
+
throw new RuntimeError41(
|
|
20462
20785
|
ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
|
|
20463
20786
|
);
|
|
20464
20787
|
}
|
|
@@ -20555,7 +20878,7 @@ var CalendarController = class extends MDControlController {
|
|
|
20555
20878
|
initCalendarLegends() {
|
|
20556
20879
|
const { sysCalendarItems } = this.model;
|
|
20557
20880
|
if (!sysCalendarItems) {
|
|
20558
|
-
throw new
|
|
20881
|
+
throw new RuntimeError42(
|
|
20559
20882
|
ibiz.i18n.t("runtime.controller.control.calendar.noFoundModel")
|
|
20560
20883
|
);
|
|
20561
20884
|
}
|
|
@@ -20872,12 +21195,13 @@ var CalendarController = class extends MDControlController {
|
|
|
20872
21195
|
};
|
|
20873
21196
|
|
|
20874
21197
|
// src/controller/control/chart/chart.controller.ts
|
|
20875
|
-
import { RuntimeError as
|
|
21198
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
21199
|
+
import { clone as clone25 } from "ramda";
|
|
20876
21200
|
|
|
20877
21201
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
20878
21202
|
import { clone as clone24, mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
20879
21203
|
import { isObject as isObject2, isString as isString2 } from "qx-util";
|
|
20880
|
-
import { RuntimeError as
|
|
21204
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
20881
21205
|
|
|
20882
21206
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
20883
21207
|
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
@@ -20943,6 +21267,13 @@ var BaseSeriesGenerator = class {
|
|
|
20943
21267
|
* @type {boolean}
|
|
20944
21268
|
*/
|
|
20945
21269
|
this.autoCompleteCategory = true;
|
|
21270
|
+
/**
|
|
21271
|
+
* 多维度分层时的维度映射,记录序列值与分层的关系
|
|
21272
|
+
*
|
|
21273
|
+
* @type {Map<string, Array<IData>>}
|
|
21274
|
+
* @memberof BaseSeriesGenerator
|
|
21275
|
+
*/
|
|
21276
|
+
this.catalogMap = /* @__PURE__ */ new Map();
|
|
20946
21277
|
var _a;
|
|
20947
21278
|
this.model = model;
|
|
20948
21279
|
this.chartGenerator = chartGenerator;
|
|
@@ -21083,23 +21414,41 @@ var BaseSeriesGenerator = class {
|
|
|
21083
21414
|
handleMultiCatalogGroup(prevItems, nextItems) {
|
|
21084
21415
|
let tempItems = [];
|
|
21085
21416
|
if (prevItems.length === 0) {
|
|
21086
|
-
tempItems = nextItems.map((item) => {
|
|
21417
|
+
tempItems = nextItems.codelist.map((item) => {
|
|
21418
|
+
this.catalogMap.set(item.text, { [nextItems.codename]: item.value });
|
|
21087
21419
|
return {
|
|
21420
|
+
codename: {
|
|
21421
|
+
[nextItems.codename]: item.value
|
|
21422
|
+
},
|
|
21088
21423
|
text: item.text,
|
|
21089
21424
|
value: item.value
|
|
21090
21425
|
};
|
|
21091
21426
|
});
|
|
21092
21427
|
} else {
|
|
21093
21428
|
for (let prev = 0; prev < prevItems.length; prev++) {
|
|
21094
|
-
if (nextItems.length > 0) {
|
|
21095
|
-
for (let next = 0; next < nextItems.length; next++) {
|
|
21429
|
+
if (nextItems.codelist.length > 0) {
|
|
21430
|
+
for (let next = 0; next < nextItems.codelist.length; next++) {
|
|
21431
|
+
this.catalogMap.set(
|
|
21432
|
+
"".concat(prevItems[prev].text, "_").concat(nextItems.codelist[next].text),
|
|
21433
|
+
{
|
|
21434
|
+
...prevItems[prev].codename,
|
|
21435
|
+
[nextItems.codename]: nextItems.codelist[next].value
|
|
21436
|
+
}
|
|
21437
|
+
);
|
|
21096
21438
|
tempItems.push({
|
|
21097
|
-
|
|
21098
|
-
|
|
21439
|
+
codename: {
|
|
21440
|
+
...prevItems[prev].codename,
|
|
21441
|
+
[nextItems.codename]: nextItems.codelist[next].value
|
|
21442
|
+
},
|
|
21443
|
+
text: "".concat(prevItems[prev].text, "_").concat(nextItems.codelist[next].text),
|
|
21444
|
+
value: nextItems.codelist[next].value
|
|
21099
21445
|
});
|
|
21100
21446
|
}
|
|
21101
21447
|
} else {
|
|
21102
21448
|
tempItems.push({
|
|
21449
|
+
codename: {
|
|
21450
|
+
...prevItems[prev].codename
|
|
21451
|
+
},
|
|
21103
21452
|
text: prevItems[prev].text,
|
|
21104
21453
|
value: prevItems[prev].value
|
|
21105
21454
|
});
|
|
@@ -21138,10 +21487,18 @@ var BaseSeriesGenerator = class {
|
|
|
21138
21487
|
let tempCodes = [];
|
|
21139
21488
|
const tempCodeLists = [];
|
|
21140
21489
|
this.catalogFields.forEach((catalog2) => {
|
|
21141
|
-
const { codelistId } = catalog2;
|
|
21490
|
+
const { codelistId, codename, mode } = catalog2;
|
|
21142
21491
|
if (codelistId && this.autoCompleteCategory) {
|
|
21143
21492
|
const codeListItems = this.chartGenerator.codeListMap.get(codelistId);
|
|
21144
|
-
tempCodeLists.push(clone22(codeListItems));
|
|
21493
|
+
tempCodeLists.push({ codename, codelist: clone22(codeListItems) });
|
|
21494
|
+
} else if (mode === "field") {
|
|
21495
|
+
const tempdata = data.map((_data) => {
|
|
21496
|
+
return {
|
|
21497
|
+
text: _data[codename],
|
|
21498
|
+
value: _data[codename]
|
|
21499
|
+
};
|
|
21500
|
+
});
|
|
21501
|
+
tempCodeLists.push({ codename, codelist: tempdata });
|
|
21145
21502
|
}
|
|
21146
21503
|
});
|
|
21147
21504
|
for (let i = 0; i < tempCodeLists.length; i++) {
|
|
@@ -22209,6 +22566,15 @@ var ChartOptionsGenerator2 = class {
|
|
|
22209
22566
|
left: (catalogLength + 1) * 40
|
|
22210
22567
|
});
|
|
22211
22568
|
}
|
|
22569
|
+
const tempyAxis = this.chartUserParam.yAxis;
|
|
22570
|
+
let nameTextStyle = {};
|
|
22571
|
+
if (tempyAxis) {
|
|
22572
|
+
if (Array.isArray(tempyAxis)) {
|
|
22573
|
+
nameTextStyle = tempyAxis[0].nameTextStyle || {};
|
|
22574
|
+
} else {
|
|
22575
|
+
nameTextStyle = tempyAxis.nameTextStyle || {};
|
|
22576
|
+
}
|
|
22577
|
+
}
|
|
22212
22578
|
tempaxis.push({
|
|
22213
22579
|
type: "category",
|
|
22214
22580
|
gridIndex,
|
|
@@ -22218,7 +22584,8 @@ var ChartOptionsGenerator2 = class {
|
|
|
22218
22584
|
{
|
|
22219
22585
|
value: mergeName.split("").join("\n"),
|
|
22220
22586
|
textStyle: {
|
|
22221
|
-
padding: [0, catalogLength * 40, 0, 0]
|
|
22587
|
+
padding: [0, catalogLength * 40, 0, 0],
|
|
22588
|
+
...nameTextStyle
|
|
22222
22589
|
}
|
|
22223
22590
|
}
|
|
22224
22591
|
],
|
|
@@ -22240,6 +22607,15 @@ var ChartOptionsGenerator2 = class {
|
|
|
22240
22607
|
bottom: (catalogLength + 2) * 24
|
|
22241
22608
|
});
|
|
22242
22609
|
}
|
|
22610
|
+
const tempxAxis = this.chartUserParam.xAxis;
|
|
22611
|
+
let nameTextStyle = {};
|
|
22612
|
+
if (tempxAxis) {
|
|
22613
|
+
if (Array.isArray(tempxAxis)) {
|
|
22614
|
+
nameTextStyle = tempxAxis[0].nameTextStyle || {};
|
|
22615
|
+
} else {
|
|
22616
|
+
nameTextStyle = tempxAxis.nameTextStyle || {};
|
|
22617
|
+
}
|
|
22618
|
+
}
|
|
22243
22619
|
tempaxis.push({
|
|
22244
22620
|
type: "category",
|
|
22245
22621
|
gridIndex,
|
|
@@ -22249,7 +22625,8 @@ var ChartOptionsGenerator2 = class {
|
|
|
22249
22625
|
{
|
|
22250
22626
|
value: mergeName,
|
|
22251
22627
|
textStyle: {
|
|
22252
|
-
padding: [24 * catalogLength + 1, 0, 0, 0]
|
|
22628
|
+
padding: [24 * catalogLength + 1, 0, 0, 0],
|
|
22629
|
+
...nameTextStyle
|
|
22253
22630
|
}
|
|
22254
22631
|
}
|
|
22255
22632
|
],
|
|
@@ -22410,7 +22787,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
22410
22787
|
getChartDataByParams(params) {
|
|
22411
22788
|
const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
|
|
22412
22789
|
if (!generator) {
|
|
22413
|
-
throw new
|
|
22790
|
+
throw new RuntimeError43(
|
|
22414
22791
|
ibiz.i18n.t("runtime.controller.control.chart.noFindSequence", {
|
|
22415
22792
|
seriesIndex: params.seriesIndex
|
|
22416
22793
|
})
|
|
@@ -22474,6 +22851,15 @@ var ChartService = class extends MDControlService {
|
|
|
22474
22851
|
|
|
22475
22852
|
// src/controller/control/chart/chart.controller.ts
|
|
22476
22853
|
var ChartController = class extends MDControlController {
|
|
22854
|
+
constructor() {
|
|
22855
|
+
super(...arguments);
|
|
22856
|
+
/**
|
|
22857
|
+
* 图表tooltip的默认状态
|
|
22858
|
+
*
|
|
22859
|
+
* @memberof ChartController
|
|
22860
|
+
*/
|
|
22861
|
+
this.tooltipState = true;
|
|
22862
|
+
}
|
|
22477
22863
|
get _evt() {
|
|
22478
22864
|
return this.evt;
|
|
22479
22865
|
}
|
|
@@ -22503,6 +22889,93 @@ var ChartController = class extends MDControlController {
|
|
|
22503
22889
|
this.calcOptions();
|
|
22504
22890
|
return result;
|
|
22505
22891
|
}
|
|
22892
|
+
/**
|
|
22893
|
+
* 改变tooltip的显示状态
|
|
22894
|
+
*
|
|
22895
|
+
* @param {boolean} [tag=true]
|
|
22896
|
+
* @memberof ChartController
|
|
22897
|
+
*/
|
|
22898
|
+
changeTooltipState(tag = true) {
|
|
22899
|
+
if (this.options && this.options.tooltip) {
|
|
22900
|
+
if (tag) {
|
|
22901
|
+
Object.assign(this.options.tooltip, { show: this.tooltipState });
|
|
22902
|
+
} else {
|
|
22903
|
+
Object.assign(this.options.tooltip, { show: false });
|
|
22904
|
+
}
|
|
22905
|
+
this.updateChart();
|
|
22906
|
+
}
|
|
22907
|
+
}
|
|
22908
|
+
/**
|
|
22909
|
+
* 计算当前点击序列的模型
|
|
22910
|
+
*
|
|
22911
|
+
* @param {IData} arg
|
|
22912
|
+
* @memberof ChartController
|
|
22913
|
+
*/
|
|
22914
|
+
computedClickSerieModel(arg) {
|
|
22915
|
+
var _a;
|
|
22916
|
+
const { data, seriesType } = arg;
|
|
22917
|
+
let tempConfig = {};
|
|
22918
|
+
if (seriesType === "pie") {
|
|
22919
|
+
if (data && data.value && Array.isArray(data.value)) {
|
|
22920
|
+
tempConfig = data.value.at(1);
|
|
22921
|
+
}
|
|
22922
|
+
} else if (data && Array.isArray(data)) {
|
|
22923
|
+
tempConfig = data.at(2);
|
|
22924
|
+
}
|
|
22925
|
+
const serieid = tempConfig._seriesModelId;
|
|
22926
|
+
const targetSerie = (_a = this.model.dechartSerieses) == null ? void 0 : _a.find((item) => {
|
|
22927
|
+
return item.id === serieid;
|
|
22928
|
+
});
|
|
22929
|
+
return targetSerie;
|
|
22930
|
+
}
|
|
22931
|
+
/**
|
|
22932
|
+
* 处理查看明细参数
|
|
22933
|
+
*
|
|
22934
|
+
* @param {IData} arg
|
|
22935
|
+
* @return {*}
|
|
22936
|
+
* @memberof ChartController
|
|
22937
|
+
*/
|
|
22938
|
+
computedDrillDetailParam(arg) {
|
|
22939
|
+
var _a;
|
|
22940
|
+
const { seriesType, data } = arg;
|
|
22941
|
+
const targetSerie = this.computedClickSerieModel(arg);
|
|
22942
|
+
let measureId = "";
|
|
22943
|
+
const dimension = [];
|
|
22944
|
+
if (targetSerie) {
|
|
22945
|
+
measureId = targetSerie.valueField;
|
|
22946
|
+
if (seriesType === "pie") {
|
|
22947
|
+
if (data && data.value && Array.isArray(data.value)) {
|
|
22948
|
+
const value = data.value.at(1);
|
|
22949
|
+
const tempData = clone25(value.$origin);
|
|
22950
|
+
Object.keys(tempData).forEach((key) => {
|
|
22951
|
+
if (key !== targetSerie.valueField && key !== "$origin") {
|
|
22952
|
+
dimension.push({
|
|
22953
|
+
name: key,
|
|
22954
|
+
value: tempData[key]
|
|
22955
|
+
});
|
|
22956
|
+
}
|
|
22957
|
+
});
|
|
22958
|
+
}
|
|
22959
|
+
} else {
|
|
22960
|
+
const value = arg.name;
|
|
22961
|
+
const tempDimension = (_a = this.generator.seriesGenerators) == null ? void 0 : _a[0].catalogMap.get(value);
|
|
22962
|
+
if (tempDimension) {
|
|
22963
|
+
Object.keys(tempDimension).forEach((key) => {
|
|
22964
|
+
dimension.push({
|
|
22965
|
+
name: key,
|
|
22966
|
+
value: tempDimension[key]
|
|
22967
|
+
});
|
|
22968
|
+
});
|
|
22969
|
+
}
|
|
22970
|
+
}
|
|
22971
|
+
}
|
|
22972
|
+
return {
|
|
22973
|
+
measure: {
|
|
22974
|
+
name: measureId
|
|
22975
|
+
},
|
|
22976
|
+
dimension
|
|
22977
|
+
};
|
|
22978
|
+
}
|
|
22506
22979
|
/**
|
|
22507
22980
|
* 解析表格相关参数
|
|
22508
22981
|
*
|
|
@@ -22697,12 +23170,12 @@ var ChartController = class extends MDControlController {
|
|
|
22697
23170
|
*/
|
|
22698
23171
|
async updateChart() {
|
|
22699
23172
|
if (!this.chart) {
|
|
22700
|
-
throw new
|
|
23173
|
+
throw new RuntimeError44(
|
|
22701
23174
|
ibiz.i18n.t("runtime.controller.control.chart.noInitialised")
|
|
22702
23175
|
);
|
|
22703
23176
|
}
|
|
22704
23177
|
if (!this.options) {
|
|
22705
|
-
throw new
|
|
23178
|
+
throw new RuntimeError44(
|
|
22706
23179
|
ibiz.i18n.t("runtime.controller.control.chart.noCalculated")
|
|
22707
23180
|
);
|
|
22708
23181
|
}
|
|
@@ -22755,7 +23228,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
22755
23228
|
};
|
|
22756
23229
|
|
|
22757
23230
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
22758
|
-
import { recursiveIterate as recursiveIterate2, RuntimeError as
|
|
23231
|
+
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
22759
23232
|
|
|
22760
23233
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
22761
23234
|
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
@@ -22765,7 +23238,7 @@ import { isArray as isArray8 } from "qx-util";
|
|
|
22765
23238
|
import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
22766
23239
|
|
|
22767
23240
|
// src/ui-logic/index.ts
|
|
22768
|
-
import { RuntimeError as
|
|
23241
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
22769
23242
|
|
|
22770
23243
|
// src/ui-logic/ui-logic.ts
|
|
22771
23244
|
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
@@ -22938,7 +23411,7 @@ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError34 }
|
|
|
22938
23411
|
|
|
22939
23412
|
// src/ui-logic/utils/handle-src-val.ts
|
|
22940
23413
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
22941
|
-
import { clone as
|
|
23414
|
+
import { clone as clone26 } from "ramda";
|
|
22942
23415
|
function handleSrcVal2(ctx, srcValParams) {
|
|
22943
23416
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
22944
23417
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -22965,7 +23438,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
22965
23438
|
value = ctx.parameters.context;
|
|
22966
23439
|
break;
|
|
22967
23440
|
case "ENVPARAM":
|
|
22968
|
-
value =
|
|
23441
|
+
value = clone26(ibiz.env);
|
|
22969
23442
|
break;
|
|
22970
23443
|
default:
|
|
22971
23444
|
throw new ModelError18(
|
|
@@ -23421,8 +23894,8 @@ var EndNode2 = class extends UILogicNode {
|
|
|
23421
23894
|
};
|
|
23422
23895
|
|
|
23423
23896
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
23424
|
-
import { ModelError as ModelError22, RuntimeError as
|
|
23425
|
-
import { clone as
|
|
23897
|
+
import { ModelError as ModelError22, RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
23898
|
+
import { clone as clone27 } from "ramda";
|
|
23426
23899
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
23427
23900
|
async exec(ctx) {
|
|
23428
23901
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -23432,7 +23905,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23432
23905
|
for (const nodeParam of nodeParams) {
|
|
23433
23906
|
let originValue;
|
|
23434
23907
|
if (nodeParam.dstDEUILogicParamId && ibiz.env.logLevel === "DEBUG") {
|
|
23435
|
-
originValue =
|
|
23908
|
+
originValue = clone27(ctx.params[nodeParam.dstDEUILogicParamId]);
|
|
23436
23909
|
}
|
|
23437
23910
|
switch (nodeParam.paramAction) {
|
|
23438
23911
|
case "SETPARAMVALUE":
|
|
@@ -23487,7 +23960,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23487
23960
|
setParamValue(nodeParam, ctx) {
|
|
23488
23961
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
23489
23962
|
if (!dstDEUILogicParamId) {
|
|
23490
|
-
throw new
|
|
23963
|
+
throw new RuntimeError45(ibiz.i18n.t("runtime.uiLogic.noTargetParameter"));
|
|
23491
23964
|
}
|
|
23492
23965
|
let dstField = dstFieldName;
|
|
23493
23966
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
@@ -23527,7 +24000,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23527
24000
|
copyParam(nodeParam, ctx) {
|
|
23528
24001
|
const { dstDEUILogicParamId } = nodeParam;
|
|
23529
24002
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
23530
|
-
ctx.params[dstDEUILogicParamId] =
|
|
24003
|
+
ctx.params[dstDEUILogicParamId] = clone27(srcVal);
|
|
23531
24004
|
}
|
|
23532
24005
|
/**
|
|
23533
24006
|
* 绑定参数
|
|
@@ -23604,7 +24077,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23604
24077
|
};
|
|
23605
24078
|
|
|
23606
24079
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
23607
|
-
import { RuntimeError as
|
|
24080
|
+
import { RuntimeError as RuntimeError46, RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
23608
24081
|
import { isFunction } from "lodash-es";
|
|
23609
24082
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
23610
24083
|
async exec(ctx) {
|
|
@@ -23630,7 +24103,7 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
23630
24103
|
}
|
|
23631
24104
|
const invokeParam = ctx.params[invokeParamId];
|
|
23632
24105
|
if (!invokeParam) {
|
|
23633
|
-
throw new
|
|
24106
|
+
throw new RuntimeError46(
|
|
23634
24107
|
ibiz.i18n.t("runtime.uiLogic.noFoundOperationParameter", {
|
|
23635
24108
|
invokeParamId
|
|
23636
24109
|
})
|
|
@@ -23638,14 +24111,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
23638
24111
|
}
|
|
23639
24112
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
23640
24113
|
if (!invokeCtrl) {
|
|
23641
|
-
throw new
|
|
24114
|
+
throw new RuntimeError46(
|
|
23642
24115
|
ibiz.i18n.t("runtime.uiLogic.noFoundInterfaceObject", {
|
|
23643
24116
|
invokeCtrlId
|
|
23644
24117
|
})
|
|
23645
24118
|
);
|
|
23646
24119
|
}
|
|
23647
24120
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
23648
|
-
throw new
|
|
24121
|
+
throw new RuntimeError46(
|
|
23649
24122
|
ibiz.i18n.t("runtime.uiLogic.noFoundInvokeMethod", {
|
|
23650
24123
|
invokeMethod
|
|
23651
24124
|
})
|
|
@@ -23834,7 +24307,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
23834
24307
|
|
|
23835
24308
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
23836
24309
|
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
23837
|
-
import { clone as
|
|
24310
|
+
import { clone as clone28 } from "ramda";
|
|
23838
24311
|
var CopyParamNode2 = class extends UILogicNode {
|
|
23839
24312
|
async exec(ctx) {
|
|
23840
24313
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -23845,7 +24318,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
23845
24318
|
);
|
|
23846
24319
|
}
|
|
23847
24320
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
23848
|
-
ctx.params[dstDEUILogicParamId] =
|
|
24321
|
+
ctx.params[dstDEUILogicParamId] = clone28(srcVal);
|
|
23849
24322
|
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
23850
24323
|
ibiz.log.debug(
|
|
23851
24324
|
ibiz.i18n.t("runtime.uiLogic.copyParameter", {
|
|
@@ -23985,7 +24458,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
23985
24458
|
};
|
|
23986
24459
|
|
|
23987
24460
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
23988
|
-
import { RuntimeError as
|
|
24461
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
23989
24462
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
23990
24463
|
async exec(_ctx) {
|
|
23991
24464
|
const { errorInfo } = this.model;
|
|
@@ -23995,12 +24468,12 @@ var ThrowExceptionNode2 = class extends UILogicNode {
|
|
|
23995
24468
|
errorInfo
|
|
23996
24469
|
})
|
|
23997
24470
|
);
|
|
23998
|
-
throw new
|
|
24471
|
+
throw new RuntimeError47(errorInfo);
|
|
23999
24472
|
}
|
|
24000
24473
|
};
|
|
24001
24474
|
|
|
24002
24475
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
24003
|
-
import { RuntimeError as
|
|
24476
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
24004
24477
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
24005
24478
|
async exec(ctx) {
|
|
24006
24479
|
ctx.isEndNode = true;
|
|
@@ -24025,13 +24498,13 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
24025
24498
|
}
|
|
24026
24499
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
24027
24500
|
if (!invokeCtrl) {
|
|
24028
|
-
throw new
|
|
24501
|
+
throw new RuntimeError48(
|
|
24029
24502
|
ibiz.i18n.t("runtime.uiLogic.noFoundTriggerObject", { fireCtrlId })
|
|
24030
24503
|
);
|
|
24031
24504
|
}
|
|
24032
24505
|
const eventParam = ctx.params[eventParamId];
|
|
24033
24506
|
if (!eventParam) {
|
|
24034
|
-
throw new
|
|
24507
|
+
throw new RuntimeError48(
|
|
24035
24508
|
ibiz.i18n.t("runtime.uiLogic.noFoundEventParameterObject", {
|
|
24036
24509
|
eventParamId
|
|
24037
24510
|
})
|
|
@@ -24053,7 +24526,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
24053
24526
|
};
|
|
24054
24527
|
|
|
24055
24528
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
24056
|
-
import { RuntimeError as
|
|
24529
|
+
import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
24057
24530
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
24058
24531
|
async exec(ctx) {
|
|
24059
24532
|
const {
|
|
@@ -24082,7 +24555,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
24082
24555
|
}
|
|
24083
24556
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
24084
24557
|
if (!dstParam) {
|
|
24085
|
-
throw new
|
|
24558
|
+
throw new RuntimeError49(
|
|
24086
24559
|
ibiz.i18n.t("runtime.uiLogic.passedParameter", { dstDEUILogicParamId })
|
|
24087
24560
|
);
|
|
24088
24561
|
}
|
|
@@ -24481,7 +24954,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
24481
24954
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
24482
24955
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
24483
24956
|
if (!deUILogic) {
|
|
24484
|
-
throw new
|
|
24957
|
+
throw new RuntimeError50(
|
|
24485
24958
|
ibiz.i18n.t("runtime.uiLogic.interfaceLogic", {
|
|
24486
24959
|
appDataEntityId,
|
|
24487
24960
|
deUILogicId
|
|
@@ -24509,7 +24982,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
24509
24982
|
}
|
|
24510
24983
|
|
|
24511
24984
|
// src/ui-action/uiaction-util.ts
|
|
24512
|
-
import { RuntimeError as
|
|
24985
|
+
import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
|
|
24513
24986
|
var UIActionUtil = class {
|
|
24514
24987
|
/**
|
|
24515
24988
|
* 执行界面行为
|
|
@@ -24524,7 +24997,7 @@ var UIActionUtil = class {
|
|
|
24524
24997
|
static async exec(actionId, params, appId2) {
|
|
24525
24998
|
const action = await getUIActionById(actionId, appId2);
|
|
24526
24999
|
if (!action) {
|
|
24527
|
-
throw new
|
|
25000
|
+
throw new RuntimeError51(
|
|
24528
25001
|
ibiz.i18n.t("runtime.uiAction.noFoundBehaviorModel", { actionId })
|
|
24529
25002
|
);
|
|
24530
25003
|
}
|
|
@@ -25034,7 +25507,7 @@ import {
|
|
|
25034
25507
|
StringUtil,
|
|
25035
25508
|
RuntimeModelError as RuntimeModelError53,
|
|
25036
25509
|
ModelError as ModelError26,
|
|
25037
|
-
RuntimeError as
|
|
25510
|
+
RuntimeError as RuntimeError52
|
|
25038
25511
|
} from "@ibiz-template/core";
|
|
25039
25512
|
import { mergeRight as mergeRight4 } from "ramda";
|
|
25040
25513
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
@@ -25163,7 +25636,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
25163
25636
|
if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
25164
25637
|
requestUrl += "/".concat(appDataEntity.deapicodeName2, "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
|
|
25165
25638
|
} else {
|
|
25166
|
-
throw new
|
|
25639
|
+
throw new RuntimeError52(ibiz.i18n.t("runtime.uiAction.dataPrimaryKey"));
|
|
25167
25640
|
}
|
|
25168
25641
|
const res = await ibiz.net.request(requestUrl, {
|
|
25169
25642
|
method: "get",
|
|
@@ -25189,10 +25662,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
25189
25662
|
window.open(link, "_blank");
|
|
25190
25663
|
}
|
|
25191
25664
|
} else {
|
|
25192
|
-
throw new
|
|
25665
|
+
throw new RuntimeError52(ibiz.i18n.t("runtime.uiAction.printFailure"));
|
|
25193
25666
|
}
|
|
25194
25667
|
} else {
|
|
25195
|
-
throw new
|
|
25668
|
+
throw new RuntimeError52(ibiz.i18n.t("runtime.uiAction.physicalPrint"));
|
|
25196
25669
|
}
|
|
25197
25670
|
}
|
|
25198
25671
|
/**
|
|
@@ -25277,12 +25750,12 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
25277
25750
|
URL.revokeObjectURL(elink.href);
|
|
25278
25751
|
document.body.removeChild(elink);
|
|
25279
25752
|
} else {
|
|
25280
|
-
throw new
|
|
25753
|
+
throw new RuntimeError52(
|
|
25281
25754
|
ibiz.i18n.t("runtime.uiAction.exportRequestFailed")
|
|
25282
25755
|
);
|
|
25283
25756
|
}
|
|
25284
25757
|
} else {
|
|
25285
|
-
throw new
|
|
25758
|
+
throw new RuntimeError52(
|
|
25286
25759
|
ibiz.i18n.t("runtime.uiAction.noEntityExportsFound")
|
|
25287
25760
|
);
|
|
25288
25761
|
}
|
|
@@ -25300,7 +25773,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
25300
25773
|
const actionResult = {};
|
|
25301
25774
|
const { context, params, data, event } = args;
|
|
25302
25775
|
if (!event) {
|
|
25303
|
-
throw new
|
|
25776
|
+
throw new RuntimeError52(ibiz.i18n.t("runtime.uiAction.lackNativeEvent"));
|
|
25304
25777
|
}
|
|
25305
25778
|
const { resultContext, resultParams } = await this.handleParams(
|
|
25306
25779
|
action,
|
|
@@ -25354,7 +25827,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
25354
25827
|
};
|
|
25355
25828
|
const { context, params, data, event } = args;
|
|
25356
25829
|
if (!event) {
|
|
25357
|
-
throw new
|
|
25830
|
+
throw new RuntimeError52(ibiz.i18n.t("runtime.uiAction.lackNativeEvent"));
|
|
25358
25831
|
}
|
|
25359
25832
|
const { resultContext, resultParams } = await this.handleParams(
|
|
25360
25833
|
action,
|
|
@@ -25491,7 +25964,7 @@ var ToolbarController = class extends ControlController {
|
|
|
25491
25964
|
const actionId = item.uiactionId;
|
|
25492
25965
|
const uiAction = await getUIActionById(actionId, item.appId);
|
|
25493
25966
|
if (!uiAction) {
|
|
25494
|
-
throw new
|
|
25967
|
+
throw new RuntimeError53(
|
|
25495
25968
|
ibiz.i18n.t("runtime.controller.control.toolbar.noFound", {
|
|
25496
25969
|
actionId
|
|
25497
25970
|
})
|
|
@@ -25718,7 +26191,7 @@ var ContextMenuController = class extends ToolbarController {
|
|
|
25718
26191
|
};
|
|
25719
26192
|
|
|
25720
26193
|
// src/controller/control/dashboard/dashboard.controller.ts
|
|
25721
|
-
import { clone as
|
|
26194
|
+
import { clone as clone29 } from "ramda";
|
|
25722
26195
|
var DashboardController = class extends ControlController {
|
|
25723
26196
|
constructor() {
|
|
25724
26197
|
super(...arguments);
|
|
@@ -25901,7 +26374,7 @@ var DashboardController = class extends ControlController {
|
|
|
25901
26374
|
*/
|
|
25902
26375
|
async loadDynaPortletById(id) {
|
|
25903
26376
|
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
25904
|
-
const tempContext =
|
|
26377
|
+
const tempContext = clone29(this.context);
|
|
25905
26378
|
Object.assign(tempContext, { psappportlet: id });
|
|
25906
26379
|
const res = await app.deService.exec(
|
|
25907
26380
|
"psappportlet",
|
|
@@ -26107,6 +26580,7 @@ var CustomDashboardController = class {
|
|
|
26107
26580
|
item.portletModel,
|
|
26108
26581
|
"CTRL"
|
|
26109
26582
|
);
|
|
26583
|
+
delete item.orignModel;
|
|
26110
26584
|
}
|
|
26111
26585
|
}
|
|
26112
26586
|
this.customModelData = res.model;
|
|
@@ -26870,7 +27344,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26870
27344
|
);
|
|
26871
27345
|
}
|
|
26872
27346
|
if (groupMode === "AUTO") {
|
|
26873
|
-
this.handleAutoGroup();
|
|
27347
|
+
await this.handleAutoGroup();
|
|
26874
27348
|
} else if (groupMode === "CODELIST") {
|
|
26875
27349
|
await this.handleCodeListGroup();
|
|
26876
27350
|
}
|
|
@@ -26881,8 +27355,17 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26881
27355
|
*
|
|
26882
27356
|
* @memberof DataViewControlController
|
|
26883
27357
|
*/
|
|
26884
|
-
handleAutoGroup() {
|
|
26885
|
-
const { groupAppDEFieldId } = this.model;
|
|
27358
|
+
async handleAutoGroup() {
|
|
27359
|
+
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
27360
|
+
let codeList = [];
|
|
27361
|
+
if (groupCodeListId) {
|
|
27362
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
27363
|
+
codeList = await app.codeList.get(
|
|
27364
|
+
groupCodeListId,
|
|
27365
|
+
this.context,
|
|
27366
|
+
this.params
|
|
27367
|
+
);
|
|
27368
|
+
}
|
|
26886
27369
|
if (groupAppDEFieldId) {
|
|
26887
27370
|
const { items } = this.state;
|
|
26888
27371
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -26898,8 +27381,9 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26898
27381
|
});
|
|
26899
27382
|
const groups = [];
|
|
26900
27383
|
groupMap.forEach((value, key) => {
|
|
27384
|
+
const codeListItem = codeList.find((x) => x.value === key);
|
|
26901
27385
|
groups.push({
|
|
26902
|
-
caption: key,
|
|
27386
|
+
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
26903
27387
|
key,
|
|
26904
27388
|
children: [...value]
|
|
26905
27389
|
});
|
|
@@ -27067,7 +27551,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
27067
27551
|
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
27068
27552
|
|
|
27069
27553
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
27070
|
-
import { RuntimeError as
|
|
27554
|
+
import { RuntimeError as RuntimeError54, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
27071
27555
|
var ExpBarControlController = class extends ControlController {
|
|
27072
27556
|
constructor() {
|
|
27073
27557
|
super(...arguments);
|
|
@@ -27400,7 +27884,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
27400
27884
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
27401
27885
|
return this.XDataModel.navAppViewId;
|
|
27402
27886
|
}
|
|
27403
|
-
throw new
|
|
27887
|
+
throw new RuntimeError54(
|
|
27404
27888
|
ibiz.i18n.t("runtime.controller.control.expBar.multiNode")
|
|
27405
27889
|
);
|
|
27406
27890
|
}
|
|
@@ -27547,7 +28031,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
27547
28031
|
};
|
|
27548
28032
|
|
|
27549
28033
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
27550
|
-
import { RuntimeError as
|
|
28034
|
+
import { RuntimeError as RuntimeError55, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
27551
28035
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
27552
28036
|
constructor() {
|
|
27553
28037
|
super(...arguments);
|
|
@@ -27638,7 +28122,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
27638
28122
|
const deData = node._deData || node;
|
|
27639
28123
|
const nodeModel = this.getNodeModel(node._nodeId);
|
|
27640
28124
|
if (!nodeModel) {
|
|
27641
|
-
throw new
|
|
28125
|
+
throw new RuntimeError55(
|
|
27642
28126
|
ibiz.i18n.t("runtime.controller.control.expBar.noFindNodeModel", {
|
|
27643
28127
|
nodeId: node._nodeId
|
|
27644
28128
|
})
|
|
@@ -27833,7 +28317,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
27833
28317
|
};
|
|
27834
28318
|
|
|
27835
28319
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
27836
|
-
import { RuntimeError as
|
|
28320
|
+
import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
|
|
27837
28321
|
|
|
27838
28322
|
// src/controller/control/form/form/form.controller.ts
|
|
27839
28323
|
import {
|
|
@@ -28479,7 +28963,7 @@ var SearchFormController = class extends FormController {
|
|
|
28479
28963
|
applyStoredFilter(index) {
|
|
28480
28964
|
const filter = this.state.storedFilters[index];
|
|
28481
28965
|
if (!filter) {
|
|
28482
|
-
throw new
|
|
28966
|
+
throw new RuntimeError56(
|
|
28483
28967
|
ibiz.i18n.t("runtime.controller.control.form.searchTerms")
|
|
28484
28968
|
);
|
|
28485
28969
|
}
|
|
@@ -28497,7 +28981,7 @@ var SearchFormController = class extends FormController {
|
|
|
28497
28981
|
async removeStoredFilter(index) {
|
|
28498
28982
|
const filter = this.state.storedFilters[index];
|
|
28499
28983
|
if (!filter) {
|
|
28500
|
-
throw new
|
|
28984
|
+
throw new RuntimeError56(
|
|
28501
28985
|
ibiz.i18n.t("runtime.controller.control.form.saveSearch")
|
|
28502
28986
|
);
|
|
28503
28987
|
}
|
|
@@ -29987,7 +30471,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
29987
30471
|
};
|
|
29988
30472
|
|
|
29989
30473
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
29990
|
-
import { RuntimeError as
|
|
30474
|
+
import { RuntimeError as RuntimeError57, RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
29991
30475
|
import { createUUID as createUUID11 } from "qx-util";
|
|
29992
30476
|
|
|
29993
30477
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -30160,7 +30644,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
30160
30644
|
async remove(id) {
|
|
30161
30645
|
const controller = this.formMap.get(id);
|
|
30162
30646
|
if (!controller) {
|
|
30163
|
-
throw new
|
|
30647
|
+
throw new RuntimeError57(
|
|
30164
30648
|
ibiz.i18n.t("runtime.controller.control.form.noFoundFormController", {
|
|
30165
30649
|
id
|
|
30166
30650
|
})
|
|
@@ -30223,7 +30707,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
30223
30707
|
|
|
30224
30708
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
30225
30709
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
30226
|
-
import { clone as
|
|
30710
|
+
import { clone as clone30 } from "ramda";
|
|
30227
30711
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
30228
30712
|
constructor() {
|
|
30229
30713
|
super(...arguments);
|
|
@@ -30315,7 +30799,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
30315
30799
|
copyFields.forEach((key) => {
|
|
30316
30800
|
tempForm[key] = this.form.model[key];
|
|
30317
30801
|
});
|
|
30318
|
-
this.repeatedForm =
|
|
30802
|
+
this.repeatedForm = clone30(tempForm);
|
|
30319
30803
|
}
|
|
30320
30804
|
/**
|
|
30321
30805
|
* 设置重复器控制器
|
|
@@ -30519,11 +31003,11 @@ import {
|
|
|
30519
31003
|
IBizContext as IBizContext6,
|
|
30520
31004
|
isElementSame as isElementSame2,
|
|
30521
31005
|
mergeInLeft as mergeInLeft2,
|
|
30522
|
-
RuntimeError as
|
|
31006
|
+
RuntimeError as RuntimeError58
|
|
30523
31007
|
} from "@ibiz-template/core";
|
|
30524
31008
|
import { debounce } from "lodash-es";
|
|
30525
31009
|
import { createUUID as createUUID12 } from "qx-util";
|
|
30526
|
-
import { clone as
|
|
31010
|
+
import { clone as clone31, isNil as isNil27 } from "ramda";
|
|
30527
31011
|
|
|
30528
31012
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
30529
31013
|
import {
|
|
@@ -30892,8 +31376,8 @@ var EditFormController = class extends FormController {
|
|
|
30892
31376
|
* @return {*} {Promise<IData>}
|
|
30893
31377
|
*/
|
|
30894
31378
|
async copy() {
|
|
30895
|
-
const context =
|
|
30896
|
-
const queryParams =
|
|
31379
|
+
const context = clone31(this.context);
|
|
31380
|
+
const queryParams = clone31(this.params);
|
|
30897
31381
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
30898
31382
|
this.model.appDataEntityId,
|
|
30899
31383
|
this.model.appId
|
|
@@ -30950,7 +31434,7 @@ var EditFormController = class extends FormController {
|
|
|
30950
31434
|
return this.loadDraft();
|
|
30951
31435
|
}
|
|
30952
31436
|
const { context, params } = this.handlerAbilityParams(args);
|
|
30953
|
-
const queryParams =
|
|
31437
|
+
const queryParams = clone31(params);
|
|
30954
31438
|
let res;
|
|
30955
31439
|
try {
|
|
30956
31440
|
await this.startLoading();
|
|
@@ -30988,7 +31472,7 @@ var EditFormController = class extends FormController {
|
|
|
30988
31472
|
}
|
|
30989
31473
|
const isValid = await this.validate();
|
|
30990
31474
|
if (!isValid) {
|
|
30991
|
-
throw new
|
|
31475
|
+
throw new RuntimeError58(
|
|
30992
31476
|
ibiz.i18n.t("runtime.controller.control.form.formCompletion")
|
|
30993
31477
|
);
|
|
30994
31478
|
}
|
|
@@ -31124,7 +31608,7 @@ var EditFormController = class extends FormController {
|
|
|
31124
31608
|
(item) => item.id === formItemUpdateId
|
|
31125
31609
|
);
|
|
31126
31610
|
if (!formItemUpdate) {
|
|
31127
|
-
throw new
|
|
31611
|
+
throw new RuntimeError58(
|
|
31128
31612
|
ibiz.i18n.t("runtime.controller.control.form.itemUpdate", {
|
|
31129
31613
|
formItemUpdateId
|
|
31130
31614
|
})
|
|
@@ -31187,7 +31671,7 @@ var EditFormController = class extends FormController {
|
|
|
31187
31671
|
async wfStart(args) {
|
|
31188
31672
|
const isValid = await this.validate();
|
|
31189
31673
|
if (!isValid) {
|
|
31190
|
-
throw new
|
|
31674
|
+
throw new RuntimeError58(
|
|
31191
31675
|
ibiz.i18n.t("runtime.controller.control.form.formCompletion")
|
|
31192
31676
|
);
|
|
31193
31677
|
}
|
|
@@ -31220,7 +31704,7 @@ var EditFormController = class extends FormController {
|
|
|
31220
31704
|
async wfSubmit(args) {
|
|
31221
31705
|
const isValid = await this.validate();
|
|
31222
31706
|
if (!isValid) {
|
|
31223
|
-
throw new
|
|
31707
|
+
throw new RuntimeError58(
|
|
31224
31708
|
ibiz.i18n.t("runtime.controller.control.form.formCompletion")
|
|
31225
31709
|
);
|
|
31226
31710
|
}
|
|
@@ -31497,13 +31981,23 @@ var GridColumnController = class {
|
|
|
31497
31981
|
* @author: zhujiamin
|
|
31498
31982
|
* @Date: 2023-08-15 11:29:58
|
|
31499
31983
|
*/
|
|
31500
|
-
getCustomHtml(row) {
|
|
31501
|
-
var _a;
|
|
31984
|
+
async getCustomHtml(row) {
|
|
31985
|
+
var _a, _b;
|
|
31502
31986
|
if ((_a = this.deGridDataItem) == null ? void 0 : _a.scriptCode) {
|
|
31503
|
-
|
|
31504
|
-
|
|
31505
|
-
|
|
31506
|
-
|
|
31987
|
+
let scriptCode = (_b = this.deGridDataItem) == null ? void 0 : _b.scriptCode;
|
|
31988
|
+
if (!scriptCode.includes("return")) {
|
|
31989
|
+
scriptCode = "return (".concat(scriptCode, ")");
|
|
31990
|
+
}
|
|
31991
|
+
return await ScriptFactory.asyncExecScriptFn(
|
|
31992
|
+
{
|
|
31993
|
+
data: row.data,
|
|
31994
|
+
context: this.context,
|
|
31995
|
+
params: this.params,
|
|
31996
|
+
controller: this,
|
|
31997
|
+
ctrl: this.grid,
|
|
31998
|
+
view: this.grid.view
|
|
31999
|
+
},
|
|
32000
|
+
scriptCode
|
|
31507
32001
|
);
|
|
31508
32002
|
}
|
|
31509
32003
|
}
|
|
@@ -31634,10 +32128,10 @@ import {
|
|
|
31634
32128
|
mergeDefaultInLeft,
|
|
31635
32129
|
plus as plus2,
|
|
31636
32130
|
recursiveIterate as recursiveIterate7,
|
|
31637
|
-
RuntimeError as
|
|
32131
|
+
RuntimeError as RuntimeError59,
|
|
31638
32132
|
RuntimeModelError as RuntimeModelError63
|
|
31639
32133
|
} from "@ibiz-template/core";
|
|
31640
|
-
import { clone as
|
|
32134
|
+
import { clone as clone32, isNil as isNil28 } from "ramda";
|
|
31641
32135
|
import dayjs5 from "dayjs";
|
|
31642
32136
|
|
|
31643
32137
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -31840,12 +32334,12 @@ var GridController = class extends MDControlController {
|
|
|
31840
32334
|
*/
|
|
31841
32335
|
this.jsonSchemaParams = {};
|
|
31842
32336
|
/**
|
|
31843
|
-
*
|
|
32337
|
+
* 显示百分比列
|
|
31844
32338
|
*
|
|
31845
|
-
* @type {
|
|
32339
|
+
* @type {string[]}
|
|
31846
32340
|
* @memberof GridController
|
|
31847
32341
|
*/
|
|
31848
|
-
this.
|
|
32342
|
+
this.percentkeys = [];
|
|
31849
32343
|
/**
|
|
31850
32344
|
* 所有表格列控制器集合
|
|
31851
32345
|
*
|
|
@@ -32016,7 +32510,7 @@ var GridController = class extends MDControlController {
|
|
|
32016
32510
|
this.params,
|
|
32017
32511
|
this.context
|
|
32018
32512
|
);
|
|
32019
|
-
this.
|
|
32513
|
+
this.percentkeys = this.controlParams.percentkeys || [];
|
|
32020
32514
|
await this.initByEntitySchema();
|
|
32021
32515
|
await super.onCreated();
|
|
32022
32516
|
this.service = new GridService(this.model);
|
|
@@ -32070,7 +32564,7 @@ var GridController = class extends MDControlController {
|
|
|
32070
32564
|
if (!this.addSchemaColumn) {
|
|
32071
32565
|
return;
|
|
32072
32566
|
}
|
|
32073
|
-
const tempParams =
|
|
32567
|
+
const tempParams = clone32(this.jsonSchemaParams);
|
|
32074
32568
|
Object.assign(tempParams, this.params);
|
|
32075
32569
|
const json = await getEntitySchema(
|
|
32076
32570
|
this.model.appDataEntityId,
|
|
@@ -32083,7 +32577,7 @@ var GridController = class extends MDControlController {
|
|
|
32083
32577
|
const result = await calcColumnModelBySchema(json, this);
|
|
32084
32578
|
if (result && result.degridColumns.length > 0) {
|
|
32085
32579
|
const { degridColumns, degridDataItems } = result;
|
|
32086
|
-
this.model =
|
|
32580
|
+
this.model = clone32(this.model);
|
|
32087
32581
|
this.model.degridColumns = [
|
|
32088
32582
|
...this.model.degridColumns || [],
|
|
32089
32583
|
...degridColumns
|
|
@@ -32251,7 +32745,7 @@ var GridController = class extends MDControlController {
|
|
|
32251
32745
|
} else {
|
|
32252
32746
|
const toNum = Number(sortValue);
|
|
32253
32747
|
if (Number.isNaN(toNum)) {
|
|
32254
|
-
throw new
|
|
32748
|
+
throw new RuntimeError59(
|
|
32255
32749
|
ibiz.i18n.t("runtime.controller.control.grid.convertedValue", {
|
|
32256
32750
|
srfmajortext: item.srfmajortext
|
|
32257
32751
|
})
|
|
@@ -32442,7 +32936,7 @@ var GridController = class extends MDControlController {
|
|
|
32442
32936
|
if (editShowMode === "row") {
|
|
32443
32937
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
32444
32938
|
if (editingRow) {
|
|
32445
|
-
throw new
|
|
32939
|
+
throw new RuntimeError59(
|
|
32446
32940
|
ibiz.i18n.t("runtime.controller.common.md.firstComplete")
|
|
32447
32941
|
);
|
|
32448
32942
|
}
|
|
@@ -32485,7 +32979,7 @@ var GridController = class extends MDControlController {
|
|
|
32485
32979
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
32486
32980
|
const rowState = this.findRowState(data);
|
|
32487
32981
|
if (!rowState) {
|
|
32488
|
-
throw new
|
|
32982
|
+
throw new RuntimeError59(
|
|
32489
32983
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
32490
32984
|
);
|
|
32491
32985
|
}
|
|
@@ -32499,7 +32993,7 @@ var GridController = class extends MDControlController {
|
|
|
32499
32993
|
}
|
|
32500
32994
|
const isValid = await this.validate(rowState);
|
|
32501
32995
|
if (!isValid) {
|
|
32502
|
-
throw new
|
|
32996
|
+
throw new RuntimeError59(
|
|
32503
32997
|
ibiz.i18n.t("runtime.controller.control.grid.saveCancel")
|
|
32504
32998
|
);
|
|
32505
32999
|
}
|
|
@@ -32755,7 +33249,7 @@ var GridController = class extends MDControlController {
|
|
|
32755
33249
|
}
|
|
32756
33250
|
async toggleRowEdit() {
|
|
32757
33251
|
if (!this.model.enableRowNew) {
|
|
32758
|
-
throw new
|
|
33252
|
+
throw new RuntimeError59(
|
|
32759
33253
|
ibiz.i18n.t("runtime.controller.control.grid.noSupportRowEditing")
|
|
32760
33254
|
);
|
|
32761
33255
|
}
|
|
@@ -32790,12 +33284,12 @@ var GridController = class extends MDControlController {
|
|
|
32790
33284
|
} else {
|
|
32791
33285
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
32792
33286
|
if (editingRow) {
|
|
32793
|
-
throw new
|
|
33287
|
+
throw new RuntimeError59(
|
|
32794
33288
|
ibiz.i18n.t("runtime.controller.control.grid.lineEditing")
|
|
32795
33289
|
);
|
|
32796
33290
|
}
|
|
32797
33291
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
32798
|
-
row.cacheData =
|
|
33292
|
+
row.cacheData = clone32(row.data);
|
|
32799
33293
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
32800
33294
|
Object.assign(row.data, defaultVal);
|
|
32801
33295
|
}
|
|
@@ -32847,7 +33341,7 @@ var GridController = class extends MDControlController {
|
|
|
32847
33341
|
(item) => item.id === updateId
|
|
32848
33342
|
);
|
|
32849
33343
|
if (!findUpdate) {
|
|
32850
|
-
throw new
|
|
33344
|
+
throw new RuntimeError59(
|
|
32851
33345
|
ibiz.i18n.t("runtime.controller.control.grid.updateColumns", {
|
|
32852
33346
|
updateId
|
|
32853
33347
|
})
|
|
@@ -32938,7 +33432,7 @@ var GridController = class extends MDControlController {
|
|
|
32938
33432
|
*/
|
|
32939
33433
|
formatExcelData(data) {
|
|
32940
33434
|
const { fields = [] } = this.dataExportParam;
|
|
32941
|
-
const cloneData =
|
|
33435
|
+
const cloneData = clone32(
|
|
32942
33436
|
data.map((item) => {
|
|
32943
33437
|
return fields.reduce((obj, key) => {
|
|
32944
33438
|
obj[key] = item[key];
|
|
@@ -32991,7 +33485,7 @@ var GridController = class extends MDControlController {
|
|
|
32991
33485
|
data = this.getData();
|
|
32992
33486
|
}
|
|
32993
33487
|
if (data.length === 0) {
|
|
32994
|
-
throw new
|
|
33488
|
+
throw new RuntimeError59(
|
|
32995
33489
|
ibiz.i18n.t("runtime.controller.control.grid.exported")
|
|
32996
33490
|
);
|
|
32997
33491
|
}
|
|
@@ -33007,7 +33501,7 @@ var GridController = class extends MDControlController {
|
|
|
33007
33501
|
async exportData(args) {
|
|
33008
33502
|
const { header } = this.dataExportParam;
|
|
33009
33503
|
if (!header) {
|
|
33010
|
-
throw new
|
|
33504
|
+
throw new RuntimeError59(
|
|
33011
33505
|
ibiz.i18n.t("runtime.controller.control.grid.tabularColumns")
|
|
33012
33506
|
);
|
|
33013
33507
|
}
|
|
@@ -33268,12 +33762,11 @@ var GridController = class extends MDControlController {
|
|
|
33268
33762
|
* @return {*} {Promise<void>}
|
|
33269
33763
|
*/
|
|
33270
33764
|
calcTotalData() {
|
|
33271
|
-
if (
|
|
33765
|
+
if (this.percentkeys.length === 0) {
|
|
33272
33766
|
return;
|
|
33273
33767
|
}
|
|
33274
33768
|
const totalResult = {};
|
|
33275
|
-
|
|
33276
|
-
const fieldName = column.model.id;
|
|
33769
|
+
this.percentkeys.forEach((fieldName) => {
|
|
33277
33770
|
const result = this.state.items.map((item) => item[fieldName]).reduce((a, b) => {
|
|
33278
33771
|
const aValue = Number(a) || 0;
|
|
33279
33772
|
const bValue = Number(b) || 0;
|
|
@@ -33297,7 +33790,7 @@ import {
|
|
|
33297
33790
|
} from "@ibiz-template/core";
|
|
33298
33791
|
import dayjs6 from "dayjs";
|
|
33299
33792
|
import { debounce as debounce2 } from "lodash-es";
|
|
33300
|
-
import { clone as
|
|
33793
|
+
import { clone as clone33, isNil as isNil29 } from "ramda";
|
|
33301
33794
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
33302
33795
|
var GridFieldColumnController = class extends GridColumnController {
|
|
33303
33796
|
constructor() {
|
|
@@ -33441,7 +33934,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
33441
33934
|
srfkey: value,
|
|
33442
33935
|
...wfContext
|
|
33443
33936
|
});
|
|
33444
|
-
const tempParams =
|
|
33937
|
+
const tempParams = clone33(this.params);
|
|
33445
33938
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
33446
33939
|
row.data,
|
|
33447
33940
|
tempContext,
|
|
@@ -33709,7 +34202,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
33709
34202
|
};
|
|
33710
34203
|
|
|
33711
34204
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
33712
|
-
import { RuntimeError as
|
|
34205
|
+
import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
|
|
33713
34206
|
import Schema2 from "async-validator";
|
|
33714
34207
|
import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
|
|
33715
34208
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -33849,7 +34342,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
33849
34342
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
33850
34343
|
const result = await this.validate(row);
|
|
33851
34344
|
if (!result) {
|
|
33852
|
-
throw new
|
|
34345
|
+
throw new RuntimeError60(
|
|
33853
34346
|
ibiz.i18n.t("runtime.controller.control.grid.checksumErrors", {
|
|
33854
34347
|
codeName: this.editItem.codeName,
|
|
33855
34348
|
fieldName: row.errors[this.fieldName]
|
|
@@ -34097,7 +34590,7 @@ var ListController = class extends MDControlController {
|
|
|
34097
34590
|
const { enableGroup, groupMode } = this.model;
|
|
34098
34591
|
if (enableGroup && groupMode) {
|
|
34099
34592
|
if (groupMode === "AUTO") {
|
|
34100
|
-
this.handleAutoGroup();
|
|
34593
|
+
await this.handleAutoGroup();
|
|
34101
34594
|
} else if (groupMode === "CODELIST") {
|
|
34102
34595
|
await this.handleCodeListGroup();
|
|
34103
34596
|
}
|
|
@@ -34108,8 +34601,17 @@ var ListController = class extends MDControlController {
|
|
|
34108
34601
|
*
|
|
34109
34602
|
* @memberof DataViewControlController
|
|
34110
34603
|
*/
|
|
34111
|
-
handleAutoGroup() {
|
|
34112
|
-
const { groupAppDEFieldId } = this.model;
|
|
34604
|
+
async handleAutoGroup() {
|
|
34605
|
+
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
34606
|
+
let codeList = [];
|
|
34607
|
+
if (groupCodeListId) {
|
|
34608
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
34609
|
+
codeList = await app.codeList.get(
|
|
34610
|
+
groupCodeListId,
|
|
34611
|
+
this.context,
|
|
34612
|
+
this.params
|
|
34613
|
+
);
|
|
34614
|
+
}
|
|
34113
34615
|
if (groupAppDEFieldId) {
|
|
34114
34616
|
const { items } = this.state;
|
|
34115
34617
|
const childrenMap = /* @__PURE__ */ new Map();
|
|
@@ -34120,8 +34622,9 @@ var ListController = class extends MDControlController {
|
|
|
34120
34622
|
});
|
|
34121
34623
|
const groups = [];
|
|
34122
34624
|
childrenMap.forEach((value, key) => {
|
|
34625
|
+
const codeListItem = codeList.find((x) => x.value === key);
|
|
34123
34626
|
groups.push({
|
|
34124
|
-
caption: key,
|
|
34627
|
+
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
34125
34628
|
key,
|
|
34126
34629
|
children: [...value]
|
|
34127
34630
|
});
|
|
@@ -34173,7 +34676,7 @@ var ListController = class extends MDControlController {
|
|
|
34173
34676
|
};
|
|
34174
34677
|
|
|
34175
34678
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
34176
|
-
import { recursiveIterate as recursiveIterate8, RuntimeError as
|
|
34679
|
+
import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
34177
34680
|
import { AsyncSeriesHook as AsyncSeriesHook2 } from "qx-util";
|
|
34178
34681
|
var PanelController = class extends ControlController {
|
|
34179
34682
|
constructor(model, context, params, ctx, container) {
|
|
@@ -34330,7 +34833,7 @@ var PanelController = class extends ControlController {
|
|
|
34330
34833
|
var _a, _b;
|
|
34331
34834
|
const data = await this.prepareData();
|
|
34332
34835
|
if (!data) {
|
|
34333
|
-
throw new
|
|
34836
|
+
throw new RuntimeError61(
|
|
34334
34837
|
ibiz.i18n.t("runtime.controller.control.panel.panelData")
|
|
34335
34838
|
);
|
|
34336
34839
|
}
|
|
@@ -34976,7 +35479,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
34976
35479
|
|
|
34977
35480
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
34978
35481
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
34979
|
-
import { clone as
|
|
35482
|
+
import { clone as clone35 } from "ramda";
|
|
34980
35483
|
import { isString as isString3 } from "lodash-es";
|
|
34981
35484
|
|
|
34982
35485
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -35464,8 +35967,8 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
35464
35967
|
}
|
|
35465
35968
|
|
|
35466
35969
|
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
35467
|
-
import { RuntimeError as
|
|
35468
|
-
import { clone as
|
|
35970
|
+
import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
|
|
35971
|
+
import { clone as clone34 } from "ramda";
|
|
35469
35972
|
var SubFieldRegex2 = /^N_(.\w+)_(.\w+)$/;
|
|
35470
35973
|
var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
35471
35974
|
constructor(filterModels, appDataEntity, context, params) {
|
|
@@ -35523,7 +36026,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
35523
36026
|
return false;
|
|
35524
36027
|
});
|
|
35525
36028
|
if (!minorDEId) {
|
|
35526
|
-
throw new
|
|
36029
|
+
throw new RuntimeError62(
|
|
35527
36030
|
ibiz.i18n.t("runtime.controller.control.searchBar.noFoundEntity", {
|
|
35528
36031
|
targetField
|
|
35529
36032
|
})
|
|
@@ -35550,7 +36053,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
35550
36053
|
const matches = subStr.match(SubFieldRegex2);
|
|
35551
36054
|
const subField = matches[1];
|
|
35552
36055
|
const subOP = matches[2];
|
|
35553
|
-
const cloneItem =
|
|
36056
|
+
const cloneItem = clone34(item);
|
|
35554
36057
|
cloneItem.defsearchMode.valueOP = subOP;
|
|
35555
36058
|
cloneItem.id = subField;
|
|
35556
36059
|
const filterC = new SearchBarFilterController(
|
|
@@ -35631,6 +36134,9 @@ function validateFilterNodes(filterNodes) {
|
|
|
35631
36134
|
hasError = !node.field || !node.valueOP || !ExcludeOPs.includes(node.valueOP) && isNil30(node.value);
|
|
35632
36135
|
} else if (node.nodeType === "ITEMS") {
|
|
35633
36136
|
hasError = !node.field || !node.valueOP;
|
|
36137
|
+
} else if (node.nodeType === "CUSTOM") {
|
|
36138
|
+
hasFilter = true;
|
|
36139
|
+
hasError = !node.customType || !node.customCond;
|
|
35634
36140
|
} else {
|
|
35635
36141
|
hasError = !node.logicType;
|
|
35636
36142
|
}
|
|
@@ -35667,6 +36173,13 @@ function filterNode2SearchCond(filterNode, opts) {
|
|
|
35667
36173
|
temp.value = filterNode.valueItem;
|
|
35668
36174
|
}
|
|
35669
36175
|
result = temp;
|
|
36176
|
+
} else if (filterNode.nodeType === "CUSTOM") {
|
|
36177
|
+
const temp = {
|
|
36178
|
+
condtype: "CUSTOM",
|
|
36179
|
+
customtype: filterNode.customType,
|
|
36180
|
+
customcond: filterNode.customCond
|
|
36181
|
+
};
|
|
36182
|
+
result = temp;
|
|
35670
36183
|
} else {
|
|
35671
36184
|
const temp = {
|
|
35672
36185
|
condop: filterNode.valueOP,
|
|
@@ -35722,6 +36235,13 @@ function SearchCondEx2filterNode(cond) {
|
|
|
35722
36235
|
temp.valueItem = cond.valueItem;
|
|
35723
36236
|
}
|
|
35724
36237
|
result = temp;
|
|
36238
|
+
} else if (cond.condtype === "CUSTOM") {
|
|
36239
|
+
const temp = {
|
|
36240
|
+
nodeType: "CUSTOM",
|
|
36241
|
+
customType: cond.customtype,
|
|
36242
|
+
customCond: cond.customcond
|
|
36243
|
+
};
|
|
36244
|
+
result = temp;
|
|
35725
36245
|
} else {
|
|
35726
36246
|
const temp = {
|
|
35727
36247
|
nodeType: "ITEMS",
|
|
@@ -35771,6 +36291,13 @@ function filterNode2SearchCondEx(filterNode) {
|
|
|
35771
36291
|
temp.valueItem = filterNode.valueItem;
|
|
35772
36292
|
}
|
|
35773
36293
|
result = temp;
|
|
36294
|
+
} else if (filterNode.nodeType === "CUSTOM") {
|
|
36295
|
+
const temp = {
|
|
36296
|
+
condtype: "CUSTOM",
|
|
36297
|
+
customtype: filterNode.customType,
|
|
36298
|
+
customcond: filterNode.customCond
|
|
36299
|
+
};
|
|
36300
|
+
result = temp;
|
|
35774
36301
|
} else {
|
|
35775
36302
|
const temp = {
|
|
35776
36303
|
condop: filterNode.valueOP,
|
|
@@ -35993,7 +36520,7 @@ var SearchBarController = class extends ControlController {
|
|
|
35993
36520
|
if (!this.addSchemaFilters) {
|
|
35994
36521
|
return;
|
|
35995
36522
|
}
|
|
35996
|
-
const tempParams =
|
|
36523
|
+
const tempParams = clone35(this.jsonSchemaParams);
|
|
35997
36524
|
Object.assign(tempParams, this.params);
|
|
35998
36525
|
const json = await getEntitySchema(
|
|
35999
36526
|
this.model.appDataEntityId,
|
|
@@ -36021,7 +36548,7 @@ var SearchBarController = class extends ControlController {
|
|
|
36021
36548
|
}
|
|
36022
36549
|
});
|
|
36023
36550
|
if (addSearchBarFilters.length > 0) {
|
|
36024
|
-
this.model =
|
|
36551
|
+
this.model = clone35(this.model);
|
|
36025
36552
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
36026
36553
|
this.model.enableFilter = true;
|
|
36027
36554
|
}
|
|
@@ -36741,7 +37268,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
36741
37268
|
|
|
36742
37269
|
// src/controller/control/tree/tree.controller.ts
|
|
36743
37270
|
import {
|
|
36744
|
-
RuntimeError as
|
|
37271
|
+
RuntimeError as RuntimeError63,
|
|
36745
37272
|
RuntimeModelError as RuntimeModelError66,
|
|
36746
37273
|
recursiveIterate as recursiveIterate11
|
|
36747
37274
|
} from "@ibiz-template/core";
|
|
@@ -37794,7 +38321,7 @@ var TreeController = class extends MDControlController {
|
|
|
37794
38321
|
);
|
|
37795
38322
|
}
|
|
37796
38323
|
if (nodeData._nodeType !== "DE") {
|
|
37797
|
-
throw new
|
|
38324
|
+
throw new RuntimeError63(
|
|
37798
38325
|
ibiz.i18n.t("runtime.controller.control.tree.nodeData")
|
|
37799
38326
|
);
|
|
37800
38327
|
}
|
|
@@ -37812,7 +38339,7 @@ var TreeController = class extends MDControlController {
|
|
|
37812
38339
|
let needRefresh = false;
|
|
37813
38340
|
const treeNode = this.getNodeModel(item._nodeId);
|
|
37814
38341
|
if (!treeNode) {
|
|
37815
|
-
throw new
|
|
38342
|
+
throw new RuntimeError63(
|
|
37816
38343
|
ibiz.i18n.t("runtime.controller.control.tree.noFoundTreeNode")
|
|
37817
38344
|
);
|
|
37818
38345
|
}
|
|
@@ -37858,7 +38385,7 @@ var TreeController = class extends MDControlController {
|
|
|
37858
38385
|
};
|
|
37859
38386
|
|
|
37860
38387
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
37861
|
-
import { RuntimeError as
|
|
38388
|
+
import { RuntimeError as RuntimeError64 } from "@ibiz-template/core";
|
|
37862
38389
|
|
|
37863
38390
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
37864
38391
|
var WizardPanelService = class extends ControlService {
|
|
@@ -38046,7 +38573,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
38046
38573
|
const { activeFormTag } = this.state;
|
|
38047
38574
|
const controller = this.formControllers.get(activeFormTag);
|
|
38048
38575
|
if (!controller) {
|
|
38049
|
-
throw new
|
|
38576
|
+
throw new RuntimeError64(
|
|
38050
38577
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.formController", {
|
|
38051
38578
|
activeFormTag
|
|
38052
38579
|
})
|
|
@@ -38096,7 +38623,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
38096
38623
|
getWizardFormByTag(tag) {
|
|
38097
38624
|
var _a;
|
|
38098
38625
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
38099
|
-
throw new
|
|
38626
|
+
throw new RuntimeError64(
|
|
38100
38627
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.noConfiguration")
|
|
38101
38628
|
);
|
|
38102
38629
|
return;
|
|
@@ -38107,7 +38634,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
38107
38634
|
}
|
|
38108
38635
|
);
|
|
38109
38636
|
if (!wizardForm) {
|
|
38110
|
-
throw new
|
|
38637
|
+
throw new RuntimeError64(
|
|
38111
38638
|
ibiz.i18n.t(
|
|
38112
38639
|
"runtime.controller.control.wizardPanel.wizardFormIdentifier",
|
|
38113
38640
|
{ tag }
|
|
@@ -38199,7 +38726,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
38199
38726
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
38200
38727
|
}
|
|
38201
38728
|
if (!prevTag) {
|
|
38202
|
-
throw new
|
|
38729
|
+
throw new RuntimeError64(
|
|
38203
38730
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.noPreviousForm")
|
|
38204
38731
|
);
|
|
38205
38732
|
}
|
|
@@ -38237,7 +38764,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
38237
38764
|
});
|
|
38238
38765
|
const nextWizardStep = wizardSteps[index + 1];
|
|
38239
38766
|
if (!nextWizardStep) {
|
|
38240
|
-
throw new
|
|
38767
|
+
throw new RuntimeError64(
|
|
38241
38768
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.nextStep")
|
|
38242
38769
|
);
|
|
38243
38770
|
}
|
|
@@ -38248,7 +38775,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
38248
38775
|
}
|
|
38249
38776
|
}
|
|
38250
38777
|
if (!nextTag) {
|
|
38251
|
-
throw new
|
|
38778
|
+
throw new RuntimeError64(
|
|
38252
38779
|
ibiz.i18n.t("runtime.controller.control.wizardPanel.nextForm")
|
|
38253
38780
|
);
|
|
38254
38781
|
}
|
|
@@ -38537,7 +39064,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38537
39064
|
);
|
|
38538
39065
|
}
|
|
38539
39066
|
if (groupMode === "AUTO") {
|
|
38540
|
-
this.handleAutoGroup();
|
|
39067
|
+
await this.handleAutoGroup();
|
|
38541
39068
|
} else if (groupMode === "CODELIST") {
|
|
38542
39069
|
await this.handleCodeListGroup();
|
|
38543
39070
|
}
|
|
@@ -38548,8 +39075,17 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38548
39075
|
*
|
|
38549
39076
|
* @memberof MDCtrlController
|
|
38550
39077
|
*/
|
|
38551
|
-
handleAutoGroup() {
|
|
38552
|
-
const { groupAppDEFieldId } = this.model;
|
|
39078
|
+
async handleAutoGroup() {
|
|
39079
|
+
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
39080
|
+
let codeList = [];
|
|
39081
|
+
if (groupCodeListId) {
|
|
39082
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
39083
|
+
codeList = await app.codeList.get(
|
|
39084
|
+
groupCodeListId,
|
|
39085
|
+
this.context,
|
|
39086
|
+
this.params
|
|
39087
|
+
);
|
|
39088
|
+
}
|
|
38553
39089
|
if (groupAppDEFieldId) {
|
|
38554
39090
|
const { items } = this.state;
|
|
38555
39091
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -38565,8 +39101,9 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38565
39101
|
});
|
|
38566
39102
|
const groups = [];
|
|
38567
39103
|
groupMap.forEach((value, key) => {
|
|
39104
|
+
const codeListItem = codeList.find((x) => x.value === key);
|
|
38568
39105
|
groups.push({
|
|
38569
|
-
caption: key,
|
|
39106
|
+
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
38570
39107
|
key,
|
|
38571
39108
|
children: [...value]
|
|
38572
39109
|
});
|
|
@@ -38634,11 +39171,11 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38634
39171
|
};
|
|
38635
39172
|
|
|
38636
39173
|
// src/controller/control/kanban/kanban.controller.ts
|
|
38637
|
-
import { RuntimeError as
|
|
38638
|
-
import { clone as
|
|
39174
|
+
import { RuntimeError as RuntimeError65, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
39175
|
+
import { clone as clone37, isNil as isNil33 } from "ramda";
|
|
38639
39176
|
|
|
38640
39177
|
// src/controller/control/kanban/kanban.service.ts
|
|
38641
|
-
import { clone as
|
|
39178
|
+
import { clone as clone36 } from "ramda";
|
|
38642
39179
|
var KanbanService = class extends DataViewControlService {
|
|
38643
39180
|
/**
|
|
38644
39181
|
* 更新分组数据
|
|
@@ -38667,7 +39204,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
38667
39204
|
*/
|
|
38668
39205
|
async moveOrderItem(context, data, args) {
|
|
38669
39206
|
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
38670
|
-
const params =
|
|
39207
|
+
const params = clone36(data.getOrigin());
|
|
38671
39208
|
Object.assign(params, args);
|
|
38672
39209
|
let res = await this.exec(moveAction, context, params, {
|
|
38673
39210
|
srfupdateitem: true
|
|
@@ -38753,7 +39290,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
38753
39290
|
} else {
|
|
38754
39291
|
const toNum = Number(sortValue);
|
|
38755
39292
|
if (Number.isNaN(toNum)) {
|
|
38756
|
-
throw new
|
|
39293
|
+
throw new RuntimeError65(
|
|
38757
39294
|
ibiz.i18n.t("runtime.controller.control.grid.convertedValue", {
|
|
38758
39295
|
srfmajortext: item.srfmajortext
|
|
38759
39296
|
})
|
|
@@ -38877,7 +39414,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
38877
39414
|
}
|
|
38878
39415
|
handleDataGroup() {
|
|
38879
39416
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
38880
|
-
throw new
|
|
39417
|
+
throw new RuntimeError65(
|
|
38881
39418
|
ibiz.i18n.t("runtime.controller.control.kanban.groupedOn")
|
|
38882
39419
|
);
|
|
38883
39420
|
}
|
|
@@ -38999,7 +39536,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
38999
39536
|
}
|
|
39000
39537
|
return moveData;
|
|
39001
39538
|
};
|
|
39002
|
-
const draggedItem =
|
|
39539
|
+
const draggedItem = clone37(fromGroup.children[fromIndex]);
|
|
39003
39540
|
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
39004
39541
|
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
39005
39542
|
if (info.from !== info.to) {
|
|
@@ -39267,12 +39804,12 @@ var KanbanController = class extends DataViewControlController {
|
|
|
39267
39804
|
|
|
39268
39805
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
39269
39806
|
import {
|
|
39270
|
-
RuntimeError as
|
|
39807
|
+
RuntimeError as RuntimeError66,
|
|
39271
39808
|
RuntimeModelError as RuntimeModelError69,
|
|
39272
39809
|
awaitTimeout as awaitTimeout3,
|
|
39273
39810
|
recursiveIterate as recursiveIterate12
|
|
39274
39811
|
} from "@ibiz-template/core";
|
|
39275
|
-
import { clone as
|
|
39812
|
+
import { clone as clone38 } from "ramda";
|
|
39276
39813
|
|
|
39277
39814
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
39278
39815
|
var TreeGridExService = class extends TreeService {
|
|
@@ -39552,13 +40089,13 @@ var TreeGridExController = class extends TreeController {
|
|
|
39552
40089
|
return;
|
|
39553
40090
|
}
|
|
39554
40091
|
if (nodeData._nodeType !== "DE") {
|
|
39555
|
-
throw new
|
|
40092
|
+
throw new RuntimeError66(
|
|
39556
40093
|
ibiz.i18n.t("runtime.controller.control.gantt.nonentity")
|
|
39557
40094
|
);
|
|
39558
40095
|
}
|
|
39559
40096
|
const rowState = this.state.rows[nodeData._uuid];
|
|
39560
40097
|
if (!rowState) {
|
|
39561
|
-
throw new
|
|
40098
|
+
throw new RuntimeError66(
|
|
39562
40099
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
39563
40100
|
);
|
|
39564
40101
|
}
|
|
@@ -39574,7 +40111,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
39574
40111
|
const { appDataEntityId, updateAppDEActionId } = nodeModel;
|
|
39575
40112
|
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
39576
40113
|
if (isCreate) {
|
|
39577
|
-
throw new
|
|
40114
|
+
throw new RuntimeError66(
|
|
39578
40115
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.noSupportCreation")
|
|
39579
40116
|
);
|
|
39580
40117
|
}
|
|
@@ -39739,12 +40276,12 @@ var TreeGridExController = class extends TreeController {
|
|
|
39739
40276
|
(item) => item.showRowEdit
|
|
39740
40277
|
);
|
|
39741
40278
|
if (editingRow) {
|
|
39742
|
-
throw new
|
|
40279
|
+
throw new RuntimeError66(
|
|
39743
40280
|
ibiz.i18n.t("runtime.controller.control.grid.lineEditing")
|
|
39744
40281
|
);
|
|
39745
40282
|
}
|
|
39746
40283
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
39747
|
-
row.cacheData =
|
|
40284
|
+
row.cacheData = clone38(row.data);
|
|
39748
40285
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
39749
40286
|
Object.assign(row.data, defaultVal);
|
|
39750
40287
|
}
|
|
@@ -39854,10 +40391,10 @@ var TreeGridExColumnController = class {
|
|
|
39854
40391
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
|
|
39855
40392
|
import {
|
|
39856
40393
|
DataTypes as DataTypes5,
|
|
39857
|
-
RuntimeError as
|
|
40394
|
+
RuntimeError as RuntimeError67,
|
|
39858
40395
|
RuntimeModelError as RuntimeModelError70
|
|
39859
40396
|
} from "@ibiz-template/core";
|
|
39860
|
-
import { clone as
|
|
40397
|
+
import { clone as clone39 } from "ramda";
|
|
39861
40398
|
import dayjs7 from "dayjs";
|
|
39862
40399
|
var TreeGridExNodeColumnController = class {
|
|
39863
40400
|
/**
|
|
@@ -40059,7 +40596,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
40059
40596
|
const valueItem = this.nodeColumn.linkValueItem || "srfkey";
|
|
40060
40597
|
const value = row.data[valueItem];
|
|
40061
40598
|
if (value == null) {
|
|
40062
|
-
throw new
|
|
40599
|
+
throw new RuntimeError67(
|
|
40063
40600
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.noPickedUp", {
|
|
40064
40601
|
valueItem
|
|
40065
40602
|
})
|
|
@@ -40074,7 +40611,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
40074
40611
|
srfkey: value,
|
|
40075
40612
|
...wfContext
|
|
40076
40613
|
});
|
|
40077
|
-
const tempParams =
|
|
40614
|
+
const tempParams = clone39(this.params);
|
|
40078
40615
|
const { userParam } = this.nodeColumn;
|
|
40079
40616
|
if (userParam) {
|
|
40080
40617
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -40488,7 +41025,7 @@ var TreeGridService = class extends GridService {
|
|
|
40488
41025
|
};
|
|
40489
41026
|
|
|
40490
41027
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
40491
|
-
import { RuntimeError as
|
|
41028
|
+
import { RuntimeError as RuntimeError68 } from "@ibiz-template/core";
|
|
40492
41029
|
import { createUUID as createUUID14 } from "qx-util";
|
|
40493
41030
|
|
|
40494
41031
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -40708,7 +41245,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
40708
41245
|
(item) => item.id === id
|
|
40709
41246
|
);
|
|
40710
41247
|
if (panelUiItemIndex < 0) {
|
|
40711
|
-
throw new
|
|
41248
|
+
throw new RuntimeError68(
|
|
40712
41249
|
ibiz.i18n.t("runtime.controller.control.meditViewPanel.dataExist")
|
|
40713
41250
|
);
|
|
40714
41251
|
}
|
|
@@ -41293,7 +41830,7 @@ var ReportPanelController = class extends ControlController {
|
|
|
41293
41830
|
// src/controller/control/gantt/gantt.controller.ts
|
|
41294
41831
|
import {
|
|
41295
41832
|
awaitTimeout as awaitTimeout4,
|
|
41296
|
-
RuntimeError as
|
|
41833
|
+
RuntimeError as RuntimeError69,
|
|
41297
41834
|
RuntimeModelError as RuntimeModelError72
|
|
41298
41835
|
} from "@ibiz-template/core";
|
|
41299
41836
|
|
|
@@ -41839,13 +42376,13 @@ var GanttController = class extends TreeGridExController {
|
|
|
41839
42376
|
*/
|
|
41840
42377
|
async modifyNodeTime(nodeData, { begin, end }) {
|
|
41841
42378
|
if (nodeData._nodeType !== "DE") {
|
|
41842
|
-
throw new
|
|
42379
|
+
throw new RuntimeError69(
|
|
41843
42380
|
ibiz.i18n.t("runtime.controller.control.gantt.noNode")
|
|
41844
42381
|
);
|
|
41845
42382
|
}
|
|
41846
42383
|
const rowState = this.getRowState(nodeData._id);
|
|
41847
42384
|
if (!rowState) {
|
|
41848
|
-
throw new
|
|
42385
|
+
throw new RuntimeError69(
|
|
41849
42386
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
41850
42387
|
);
|
|
41851
42388
|
}
|
|
@@ -41867,13 +42404,13 @@ var GanttController = class extends TreeGridExController {
|
|
|
41867
42404
|
return;
|
|
41868
42405
|
}
|
|
41869
42406
|
if (nodeData._nodeType !== "DE") {
|
|
41870
|
-
throw new
|
|
42407
|
+
throw new RuntimeError69(
|
|
41871
42408
|
ibiz.i18n.t("runtime.controller.control.gantt.nonentity")
|
|
41872
42409
|
);
|
|
41873
42410
|
}
|
|
41874
42411
|
const rowState = this.state.rows[nodeData._uuid];
|
|
41875
42412
|
if (!rowState) {
|
|
41876
|
-
throw new
|
|
42413
|
+
throw new RuntimeError69(
|
|
41877
42414
|
ibiz.i18n.t("runtime.controller.common.md.rowData")
|
|
41878
42415
|
);
|
|
41879
42416
|
}
|
|
@@ -41923,7 +42460,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
41923
42460
|
async remove(args) {
|
|
41924
42461
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
41925
42462
|
if (!(data == null ? void 0 : data.length)) {
|
|
41926
|
-
throw new
|
|
42463
|
+
throw new RuntimeError69(
|
|
41927
42464
|
ibiz.i18n.t("runtime.controller.common.control.uncheckedData")
|
|
41928
42465
|
);
|
|
41929
42466
|
}
|
|
@@ -42046,7 +42583,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
42046
42583
|
(item) => item.showRowEdit
|
|
42047
42584
|
);
|
|
42048
42585
|
if (editingRow) {
|
|
42049
|
-
throw new
|
|
42586
|
+
throw new RuntimeError69(
|
|
42050
42587
|
ibiz.i18n.t("runtime.controller.common.md.firstComplete")
|
|
42051
42588
|
);
|
|
42052
42589
|
}
|
|
@@ -42227,7 +42764,7 @@ import { QXEvent as QXEvent11 } from "qx-util";
|
|
|
42227
42764
|
|
|
42228
42765
|
// src/controller/notification/async-action.controller.ts
|
|
42229
42766
|
import { QXEvent as QXEvent9 } from "qx-util";
|
|
42230
|
-
import { clone as
|
|
42767
|
+
import { clone as clone40 } from "ramda";
|
|
42231
42768
|
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
42232
42769
|
import dayjs8 from "dayjs";
|
|
42233
42770
|
var AsyncActionController = class {
|
|
@@ -42338,7 +42875,7 @@ var AsyncActionController = class {
|
|
|
42338
42875
|
} else {
|
|
42339
42876
|
this.noticeResult(action);
|
|
42340
42877
|
}
|
|
42341
|
-
this.evt.emit("add",
|
|
42878
|
+
this.evt.emit("add", clone40(action));
|
|
42342
42879
|
this.evt.emit("dataChange");
|
|
42343
42880
|
}
|
|
42344
42881
|
/**
|
|
@@ -42360,7 +42897,7 @@ var AsyncActionController = class {
|
|
|
42360
42897
|
}
|
|
42361
42898
|
this.noticeResult(action);
|
|
42362
42899
|
}
|
|
42363
|
-
this.evt.emit("change",
|
|
42900
|
+
this.evt.emit("change", clone40(action));
|
|
42364
42901
|
this.evt.emit("dataChange");
|
|
42365
42902
|
}
|
|
42366
42903
|
noticeResult(action) {
|
|
@@ -42832,7 +43369,7 @@ var AppHub = class {
|
|
|
42832
43369
|
this.registerAppView(appView);
|
|
42833
43370
|
return appView;
|
|
42834
43371
|
}
|
|
42835
|
-
throw new
|
|
43372
|
+
throw new RuntimeError70(ibiz.i18n.t("runtime.hub.noExist", { id }));
|
|
42836
43373
|
}
|
|
42837
43374
|
/**
|
|
42838
43375
|
* 根据DrControl的名称和子应用标识获取模型
|
|
@@ -42871,7 +43408,7 @@ var AppHub = class {
|
|
|
42871
43408
|
);
|
|
42872
43409
|
return model;
|
|
42873
43410
|
}
|
|
42874
|
-
throw new
|
|
43411
|
+
throw new RuntimeError70(
|
|
42875
43412
|
ibiz.i18n.t("runtime.hub.noExist", { id: modelPath })
|
|
42876
43413
|
);
|
|
42877
43414
|
}
|
|
@@ -42911,7 +43448,7 @@ var AppHub = class {
|
|
|
42911
43448
|
this.registerAppDataEntity(entity, appId2);
|
|
42912
43449
|
return entity;
|
|
42913
43450
|
}
|
|
42914
|
-
throw new
|
|
43451
|
+
throw new RuntimeError70(ibiz.i18n.t("runtime.service.noFound", { id }));
|
|
42915
43452
|
}
|
|
42916
43453
|
/**
|
|
42917
43454
|
* 新建 hub 应用
|
|
@@ -42926,7 +43463,7 @@ var AppHub = class {
|
|
|
42926
43463
|
return this.appMap.get(id);
|
|
42927
43464
|
}
|
|
42928
43465
|
if (!this.modelLoaderProvider) {
|
|
42929
|
-
throw new
|
|
43466
|
+
throw new RuntimeError70(ibiz.i18n.t("runtime.utils.firstregister"));
|
|
42930
43467
|
}
|
|
42931
43468
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
42932
43469
|
const subAppRef = await this.modelLoaderProvider.getSubAppRef(id);
|
|
@@ -43078,7 +43615,7 @@ var EngineFactory = class {
|
|
|
43078
43615
|
|
|
43079
43616
|
// src/engine/view-base.engine.ts
|
|
43080
43617
|
import {
|
|
43081
|
-
RuntimeError as
|
|
43618
|
+
RuntimeError as RuntimeError71,
|
|
43082
43619
|
findRecursiveChild as findRecursiveChild3,
|
|
43083
43620
|
IBizContext as IBizContext7
|
|
43084
43621
|
} from "@ibiz-template/core";
|
|
@@ -43463,7 +44000,7 @@ var ViewEngineBase = class {
|
|
|
43463
44000
|
const { appDataEntityId } = this.view.model;
|
|
43464
44001
|
const { evt, context, params } = this.view;
|
|
43465
44002
|
if (!appDataEntityId) {
|
|
43466
|
-
throw new
|
|
44003
|
+
throw new RuntimeError71(ibiz.i18n.t("runtime.engine.loadEntityData"));
|
|
43467
44004
|
}
|
|
43468
44005
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
43469
44006
|
const res = await app.deService.exec(
|
|
@@ -43525,7 +44062,7 @@ var ViewEngineBase = class {
|
|
|
43525
44062
|
|
|
43526
44063
|
// src/engine/md-view.engine.ts
|
|
43527
44064
|
import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
43528
|
-
import { clone as
|
|
44065
|
+
import { clone as clone41 } from "ramda";
|
|
43529
44066
|
var MDViewEngine = class extends ViewEngineBase {
|
|
43530
44067
|
/**
|
|
43531
44068
|
* 多数据部件名称
|
|
@@ -43737,7 +44274,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
43737
44274
|
var _a, _b;
|
|
43738
44275
|
const { data, event } = args;
|
|
43739
44276
|
const context = (args.context || this.view.context).clone();
|
|
43740
|
-
context.
|
|
44277
|
+
context.srfnavctrlid = this.xdataControl.ctrlId;
|
|
43741
44278
|
const params = args.params || this.view.params;
|
|
43742
44279
|
const deName = ((_a = data[0].srfdecodename) == null ? void 0 : _a.toLowerCase()) || calcDeCodeNameById(this.xdataControl.model.appDataEntityId);
|
|
43743
44280
|
context[deName.toLowerCase()] = data[0].srfkey;
|
|
@@ -43780,7 +44317,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
43780
44317
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
43781
44318
|
);
|
|
43782
44319
|
}
|
|
43783
|
-
const params =
|
|
44320
|
+
const params = clone41(this.view.params);
|
|
43784
44321
|
if (copyMode) {
|
|
43785
44322
|
params.srfcopymode = copyMode;
|
|
43786
44323
|
}
|
|
@@ -43945,7 +44482,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
43945
44482
|
};
|
|
43946
44483
|
|
|
43947
44484
|
// src/global/global-util/global-util.ts
|
|
43948
|
-
import { RuntimeError as
|
|
44485
|
+
import { RuntimeError as RuntimeError72 } from "@ibiz-template/core";
|
|
43949
44486
|
var sourceTitle = document.title;
|
|
43950
44487
|
var GlobalUtil = class {
|
|
43951
44488
|
constructor() {
|
|
@@ -44035,6 +44572,13 @@ var GlobalUtil = class {
|
|
|
44035
44572
|
* @date 2024-06-30 11:06:13
|
|
44036
44573
|
*/
|
|
44037
44574
|
this.biReport = new BIReportUtil();
|
|
44575
|
+
/**
|
|
44576
|
+
* 记录导航工具类
|
|
44577
|
+
*
|
|
44578
|
+
* @author tony001
|
|
44579
|
+
* @date 2024-07-15 13:07:51
|
|
44580
|
+
*/
|
|
44581
|
+
this.record = new RecordNavUtil();
|
|
44038
44582
|
this.error.register(new DefaultErrorHandler());
|
|
44039
44583
|
}
|
|
44040
44584
|
/**
|
|
@@ -44093,7 +44637,7 @@ var GlobalUtil = class {
|
|
|
44093
44637
|
* @return {*} {IParams}
|
|
44094
44638
|
*/
|
|
44095
44639
|
getGlobalParam() {
|
|
44096
|
-
throw new
|
|
44640
|
+
throw new RuntimeError72(ibiz.i18n.t("runtime.global.noImplemented"));
|
|
44097
44641
|
}
|
|
44098
44642
|
/**
|
|
44099
44643
|
* 获取视图路由参数变量,数组类型,基于路由解析出来的,每一个对象里面都有context和params
|
|
@@ -44102,12 +44646,12 @@ var GlobalUtil = class {
|
|
|
44102
44646
|
* @return {*} {IParams}
|
|
44103
44647
|
*/
|
|
44104
44648
|
getRouterParams() {
|
|
44105
|
-
throw new
|
|
44649
|
+
throw new RuntimeError72(ibiz.i18n.t("runtime.global.noImplementedRouting"));
|
|
44106
44650
|
}
|
|
44107
44651
|
};
|
|
44108
44652
|
|
|
44109
44653
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
44110
|
-
import { RuntimeError as
|
|
44654
|
+
import { RuntimeError as RuntimeError73 } from "@ibiz-template/core";
|
|
44111
44655
|
var LogicExecutor = class {
|
|
44112
44656
|
/**
|
|
44113
44657
|
* @author lxm
|
|
@@ -44128,7 +44672,7 @@ var LogicExecutor = class {
|
|
|
44128
44672
|
*/
|
|
44129
44673
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44130
44674
|
execute(_executeParams) {
|
|
44131
|
-
throw new
|
|
44675
|
+
throw new RuntimeError73(
|
|
44132
44676
|
ibiz.i18n.t("runtime.logicScheduler.executor.noImplementedMethod")
|
|
44133
44677
|
);
|
|
44134
44678
|
}
|
|
@@ -44580,7 +45124,7 @@ var LogicSchedulerCenter = class {
|
|
|
44580
45124
|
};
|
|
44581
45125
|
|
|
44582
45126
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
44583
|
-
import { RuntimeError as
|
|
45127
|
+
import { RuntimeError as RuntimeError74 } from "@ibiz-template/core";
|
|
44584
45128
|
var LogicTrigger = class {
|
|
44585
45129
|
/**
|
|
44586
45130
|
* @author lxm
|
|
@@ -44640,7 +45184,7 @@ var LogicTrigger = class {
|
|
|
44640
45184
|
if (this.executor) {
|
|
44641
45185
|
return this.executor.execute(executeParams);
|
|
44642
45186
|
}
|
|
44643
|
-
throw new
|
|
45187
|
+
throw new RuntimeError74(
|
|
44644
45188
|
ibiz.i18n.t("runtime.logicScheduler.trigger.noExecutorBound", {
|
|
44645
45189
|
id: this.logic.id
|
|
44646
45190
|
})
|
|
@@ -44661,12 +45205,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
44661
45205
|
};
|
|
44662
45206
|
|
|
44663
45207
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
44664
|
-
import { RuntimeError as
|
|
45208
|
+
import { RuntimeError as RuntimeError75 } from "@ibiz-template/core";
|
|
44665
45209
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
44666
45210
|
bindExecutor(executor) {
|
|
44667
45211
|
super.bindExecutor(executor);
|
|
44668
45212
|
if (this.executor.type !== "SCRIPT") {
|
|
44669
|
-
throw new
|
|
45213
|
+
throw new RuntimeError75(
|
|
44670
45214
|
ibiz.i18n.t("runtime.logicScheduler.trigger.triggerType")
|
|
44671
45215
|
);
|
|
44672
45216
|
}
|
|
@@ -44703,7 +45247,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
44703
45247
|
};
|
|
44704
45248
|
|
|
44705
45249
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
44706
|
-
import { RuntimeError as
|
|
45250
|
+
import { RuntimeError as RuntimeError76, RuntimeModelError as RuntimeModelError75 } from "@ibiz-template/core";
|
|
44707
45251
|
var TimerTrigger = class extends LogicTrigger {
|
|
44708
45252
|
constructor() {
|
|
44709
45253
|
super(...arguments);
|
|
@@ -44718,7 +45262,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
44718
45262
|
}
|
|
44719
45263
|
this.timer = setInterval(() => {
|
|
44720
45264
|
if (!this.scheduler.defaultParamsCb) {
|
|
44721
|
-
throw new
|
|
45265
|
+
throw new RuntimeError76(
|
|
44722
45266
|
ibiz.i18n.t("runtime.logicScheduler.trigger.parameterCallback")
|
|
44723
45267
|
);
|
|
44724
45268
|
}
|
|
@@ -44737,7 +45281,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
44737
45281
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
44738
45282
|
import {
|
|
44739
45283
|
ModelError as ModelError34,
|
|
44740
|
-
RuntimeError as
|
|
45284
|
+
RuntimeError as RuntimeError77,
|
|
44741
45285
|
RuntimeModelError as RuntimeModelError76
|
|
44742
45286
|
} from "@ibiz-template/core";
|
|
44743
45287
|
import { notNilEmpty as notNilEmpty11 } from "qx-util";
|
|
@@ -44775,7 +45319,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44775
45319
|
const { context, params, ...rest } = parameters;
|
|
44776
45320
|
const { data } = parameters;
|
|
44777
45321
|
if (!(data == null ? void 0 : data[0])) {
|
|
44778
|
-
throw new
|
|
45322
|
+
throw new RuntimeError77(
|
|
44779
45323
|
ibiz.i18n.t("runtime.logicScheduler.executor.noActionableData")
|
|
44780
45324
|
);
|
|
44781
45325
|
}
|
|
@@ -44844,7 +45388,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44844
45388
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
44845
45389
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
44846
45390
|
if (!findView) {
|
|
44847
|
-
throw new
|
|
45391
|
+
throw new RuntimeError77(
|
|
44848
45392
|
ibiz.i18n.t("runtime.logicScheduler.executor.editViews", {
|
|
44849
45393
|
formTypeValue
|
|
44850
45394
|
})
|
|
@@ -44977,7 +45521,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44977
45521
|
}
|
|
44978
45522
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
44979
45523
|
if (!selectData) {
|
|
44980
|
-
throw new
|
|
45524
|
+
throw new RuntimeError77(
|
|
44981
45525
|
ibiz.i18n.t("runtime.logicScheduler.executor.checkOne")
|
|
44982
45526
|
);
|
|
44983
45527
|
}
|
|
@@ -44989,7 +45533,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44989
45533
|
}
|
|
44990
45534
|
);
|
|
44991
45535
|
if (!findView) {
|
|
44992
|
-
throw new
|
|
45536
|
+
throw new RuntimeError77(
|
|
44993
45537
|
ibiz.i18n.t("runtime.logicScheduler.executor.entitiesAssociated", {
|
|
44994
45538
|
indexType
|
|
44995
45539
|
})
|
|
@@ -45031,7 +45575,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
45031
45575
|
}
|
|
45032
45576
|
});
|
|
45033
45577
|
if (pickParentFieldName === void 0) {
|
|
45034
|
-
throw new
|
|
45578
|
+
throw new RuntimeError77(
|
|
45035
45579
|
ibiz.i18n.t("runtime.logicScheduler.executor.foreignKey", {
|
|
45036
45580
|
pickParentDeName
|
|
45037
45581
|
})
|
|
@@ -45890,7 +46434,12 @@ var en = {
|
|
|
45890
46434
|
noCompared: "{value} and {value2} cannot be compared.",
|
|
45891
46435
|
conditionalValues: "Conditional values for range comparisons do not exist or are not strings"
|
|
45892
46436
|
},
|
|
45893
|
-
firstregister: "Please register the model loading adapter first"
|
|
46437
|
+
firstregister: "Please register the model loading adapter first",
|
|
46438
|
+
recordNav: {
|
|
46439
|
+
noFoundCtrl: "The specified identifier [{ctrlId}] component was not found",
|
|
46440
|
+
firstRecord: "The current data is already the first record of data",
|
|
46441
|
+
lastRecord: "The current data is already the last record of data"
|
|
46442
|
+
}
|
|
45894
46443
|
},
|
|
45895
46444
|
deAction: {
|
|
45896
46445
|
responseDataError: "Response data exception [data]: {error}"
|
|
@@ -46473,7 +47022,12 @@ var zhCn = {
|
|
|
46473
47022
|
noCompared: "{value} \u548C {value2} \u65E0\u6CD5\u6BD4\u8F83\u5927\u5C0F",
|
|
46474
47023
|
conditionalValues: "\u8303\u56F4\u6BD4\u8F83\u7684\u6761\u4EF6\u503C\u4E0D\u5B58\u6216\u8005\u4E0D\u662F\u5B57\u7B26\u4E32"
|
|
46475
47024
|
},
|
|
46476
|
-
firstregister: "\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668"
|
|
47025
|
+
firstregister: "\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668",
|
|
47026
|
+
recordNav: {
|
|
47027
|
+
noFoundCtrl: "\u672A\u627E\u5230\u6307\u5B9A\u6807\u8BC6[{ctrlId}]\u90E8\u4EF6",
|
|
47028
|
+
firstRecord: "\u5F53\u524D\u6570\u636E\u5DF2\u7ECF\u662F\u7B2C\u4E00\u6761\u6570\u636E\u4E86",
|
|
47029
|
+
lastRecord: "\u5F53\u524D\u6570\u636E\u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u6761\u6570\u636E\u4E86"
|
|
47030
|
+
}
|
|
46477
47031
|
},
|
|
46478
47032
|
deAction: {
|
|
46479
47033
|
responseDataError: "\u54CD\u5E94\u6570\u636E\u5F02\u5E38 [data]: {error}"
|
|
@@ -46611,6 +47165,7 @@ export {
|
|
|
46611
47165
|
LoadingState,
|
|
46612
47166
|
MDControlController,
|
|
46613
47167
|
MDControlService,
|
|
47168
|
+
MDControlTypes,
|
|
46614
47169
|
MDCtrlController,
|
|
46615
47170
|
MDCtrlService,
|
|
46616
47171
|
MDViewEngine,
|
|
@@ -46650,6 +47205,7 @@ export {
|
|
|
46650
47205
|
QXEventEx,
|
|
46651
47206
|
RawItemPortletController,
|
|
46652
47207
|
RawValueUtil,
|
|
47208
|
+
RecordNavUtil,
|
|
46653
47209
|
RegisterCenter,
|
|
46654
47210
|
RemotePluginItem,
|
|
46655
47211
|
ReportPanelController,
|