@ibiz-template/runtime 0.7.29-alpha.0 → 0.7.30-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +213 -73
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/chart/chart.controller.d.ts +21 -0
- package/out/controller/control/chart/chart.controller.d.ts.map +1 -1
- package/out/controller/control/chart/chart.controller.js +78 -0
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.js +7 -0
- package/out/controller/control/dashboard/dashboard.controller.d.ts +8 -0
- package/out/controller/control/dashboard/dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/dashboard.controller.js +9 -0
- 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 +9 -8
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +1 -1
- 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/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +3 -1
- package/out/interface/util/i-fullscreen-util/i-fullscreen-util.d.ts +15 -0
- package/out/interface/util/i-fullscreen-util/i-fullscreen-util.d.ts.map +1 -0
- package/out/interface/util/i-fullscreen-util/i-fullscreen-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/types.d.ts +8 -1
- package/out/types.d.ts.map +1 -1
- package/out/utils/bi-report-util/bi-report-util.js +1 -1
- package/out/utils/nav-params/nav-params.d.ts.map +1 -1
- package/out/utils/nav-params/nav-params.js +7 -0
- package/out/utils/verify/form-dynamic-logic.js +1 -1
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -635,6 +635,12 @@ function convertNavData(navParams, ...origins) {
|
|
|
635
635
|
return convertNavDataByArray(navParamsArr, ...origins);
|
|
636
636
|
}
|
|
637
637
|
function getVal(origins, key) {
|
|
638
|
+
if (key === "srfcurtime") {
|
|
639
|
+
return {
|
|
640
|
+
find: true,
|
|
641
|
+
value: (/* @__PURE__ */ new Date()).getTime()
|
|
642
|
+
};
|
|
643
|
+
}
|
|
638
644
|
const keys = key.split(".");
|
|
639
645
|
let currentVal;
|
|
640
646
|
const findOrigin = origins.find((item) => {
|
|
@@ -2212,7 +2218,7 @@ function verifyFormGroupLogic(data, logic) {
|
|
|
2212
2218
|
}
|
|
2213
2219
|
return logic.notMode ? !result : result;
|
|
2214
2220
|
}
|
|
2215
|
-
if (isSingleLogic(logic)) {
|
|
2221
|
+
if (isSingleLogic(logic) && logic.defdname) {
|
|
2216
2222
|
return testCond(
|
|
2217
2223
|
data[logic.defdname.toLowerCase()],
|
|
2218
2224
|
logic.condOP,
|
|
@@ -13092,8 +13098,8 @@ var baseStyle = {
|
|
|
13092
13098
|
position: "fixed",
|
|
13093
13099
|
zIndex: "10000"
|
|
13094
13100
|
};
|
|
13095
|
-
function cloneElement(
|
|
13096
|
-
const element = getAnimationElement(
|
|
13101
|
+
function cloneElement(clone42, teleport = document.body, isRemoveChild = true) {
|
|
13102
|
+
const element = getAnimationElement(clone42);
|
|
13097
13103
|
if (element == null) {
|
|
13098
13104
|
throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
|
|
13099
13105
|
}
|
|
@@ -13512,11 +13518,11 @@ function arrayContains(arr, val) {
|
|
|
13512
13518
|
});
|
|
13513
13519
|
}
|
|
13514
13520
|
function cloneObject(o) {
|
|
13515
|
-
var
|
|
13521
|
+
var clone42 = {};
|
|
13516
13522
|
for (var p in o) {
|
|
13517
|
-
|
|
13523
|
+
clone42[p] = o[p];
|
|
13518
13524
|
}
|
|
13519
|
-
return
|
|
13525
|
+
return clone42;
|
|
13520
13526
|
}
|
|
13521
13527
|
function replaceObjectProps(o1, o2) {
|
|
13522
13528
|
var o = cloneObject(o1);
|
|
@@ -15190,7 +15196,7 @@ var BIReportUtil = class {
|
|
|
15190
15196
|
biReportItems.dimension_col = [];
|
|
15191
15197
|
}
|
|
15192
15198
|
biReportItems.dimension_col.push(tempDimension);
|
|
15193
|
-
} else if (biReportUIModel && biReportUIModel.group && biReportUIModel.group.
|
|
15199
|
+
} else if (biReportUIModel && biReportUIModel.group && biReportUIModel.group.indexOf(item.pssysbicubedimensionid) !== -1) {
|
|
15194
15200
|
if (!biReportItems.group) {
|
|
15195
15201
|
biReportItems.group = [];
|
|
15196
15202
|
}
|
|
@@ -20867,6 +20873,7 @@ var CalendarController = class extends MDControlController {
|
|
|
20867
20873
|
|
|
20868
20874
|
// src/controller/control/chart/chart.controller.ts
|
|
20869
20875
|
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
20876
|
+
import { clone as clone25 } from "ramda";
|
|
20870
20877
|
|
|
20871
20878
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
20872
20879
|
import { clone as clone24, mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
@@ -22468,6 +22475,15 @@ var ChartService = class extends MDControlService {
|
|
|
22468
22475
|
|
|
22469
22476
|
// src/controller/control/chart/chart.controller.ts
|
|
22470
22477
|
var ChartController = class extends MDControlController {
|
|
22478
|
+
constructor() {
|
|
22479
|
+
super(...arguments);
|
|
22480
|
+
/**
|
|
22481
|
+
* 图表tooltip的默认状态
|
|
22482
|
+
*
|
|
22483
|
+
* @memberof ChartController
|
|
22484
|
+
*/
|
|
22485
|
+
this.tooltipState = true;
|
|
22486
|
+
}
|
|
22471
22487
|
get _evt() {
|
|
22472
22488
|
return this.evt;
|
|
22473
22489
|
}
|
|
@@ -22497,6 +22513,68 @@ var ChartController = class extends MDControlController {
|
|
|
22497
22513
|
this.calcOptions();
|
|
22498
22514
|
return result;
|
|
22499
22515
|
}
|
|
22516
|
+
/**
|
|
22517
|
+
* 改变tooltip的显示状态
|
|
22518
|
+
*
|
|
22519
|
+
* @param {boolean} [tag=true]
|
|
22520
|
+
* @memberof ChartController
|
|
22521
|
+
*/
|
|
22522
|
+
changeTooltipState(tag = true) {
|
|
22523
|
+
if (this.options && this.options.tooltip) {
|
|
22524
|
+
if (tag) {
|
|
22525
|
+
Object.assign(this.options.tooltip, { show: this.tooltipState });
|
|
22526
|
+
} else {
|
|
22527
|
+
Object.assign(this.options.tooltip, { show: false });
|
|
22528
|
+
}
|
|
22529
|
+
this.updateChart();
|
|
22530
|
+
}
|
|
22531
|
+
}
|
|
22532
|
+
/**
|
|
22533
|
+
* 处理查看明细参数
|
|
22534
|
+
*
|
|
22535
|
+
* @param {IData} arg
|
|
22536
|
+
* @return {*}
|
|
22537
|
+
* @memberof ChartController
|
|
22538
|
+
*/
|
|
22539
|
+
computedDrillDownParam(arg) {
|
|
22540
|
+
var _a;
|
|
22541
|
+
const { data, seriesType } = arg;
|
|
22542
|
+
let tempConfig = {};
|
|
22543
|
+
if (seriesType === "pie") {
|
|
22544
|
+
if (data && data.value && Array.isArray(data.value)) {
|
|
22545
|
+
tempConfig = data.value.at(1);
|
|
22546
|
+
}
|
|
22547
|
+
} else if (data && Array.isArray(data)) {
|
|
22548
|
+
tempConfig = data.at(2);
|
|
22549
|
+
}
|
|
22550
|
+
const serieid = tempConfig._seriesModelId;
|
|
22551
|
+
const orgindata = clone25(tempConfig.$origin);
|
|
22552
|
+
const valueFields = [];
|
|
22553
|
+
let measureId = "";
|
|
22554
|
+
const dimension = [];
|
|
22555
|
+
(_a = this.model.dechartSerieses) == null ? void 0 : _a.forEach((item) => {
|
|
22556
|
+
if (serieid !== item.id && item.valueField) {
|
|
22557
|
+
valueFields.push(item.valueField);
|
|
22558
|
+
}
|
|
22559
|
+
if (serieid === item.id && item.valueField) {
|
|
22560
|
+
measureId = item.valueField;
|
|
22561
|
+
}
|
|
22562
|
+
});
|
|
22563
|
+
Object.keys(orgindata).forEach((key) => {
|
|
22564
|
+
if (!valueFields.includes(key) && key !== measureId && key !== "$origin") {
|
|
22565
|
+
dimension.push({
|
|
22566
|
+
name: key,
|
|
22567
|
+
value: orgindata[key]
|
|
22568
|
+
});
|
|
22569
|
+
}
|
|
22570
|
+
});
|
|
22571
|
+
return {
|
|
22572
|
+
measure: {
|
|
22573
|
+
name: measureId
|
|
22574
|
+
},
|
|
22575
|
+
dimension
|
|
22576
|
+
};
|
|
22577
|
+
}
|
|
22500
22578
|
/**
|
|
22501
22579
|
* 解析表格相关参数
|
|
22502
22580
|
*
|
|
@@ -22932,7 +23010,7 @@ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError34 }
|
|
|
22932
23010
|
|
|
22933
23011
|
// src/ui-logic/utils/handle-src-val.ts
|
|
22934
23012
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
22935
|
-
import { clone as
|
|
23013
|
+
import { clone as clone26 } from "ramda";
|
|
22936
23014
|
function handleSrcVal2(ctx, srcValParams) {
|
|
22937
23015
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
22938
23016
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -22959,7 +23037,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
22959
23037
|
value = ctx.parameters.context;
|
|
22960
23038
|
break;
|
|
22961
23039
|
case "ENVPARAM":
|
|
22962
|
-
value =
|
|
23040
|
+
value = clone26(ibiz.env);
|
|
22963
23041
|
break;
|
|
22964
23042
|
default:
|
|
22965
23043
|
throw new ModelError18(
|
|
@@ -23416,7 +23494,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
23416
23494
|
|
|
23417
23495
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
23418
23496
|
import { ModelError as ModelError22, RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
23419
|
-
import { clone as
|
|
23497
|
+
import { clone as clone27 } from "ramda";
|
|
23420
23498
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
23421
23499
|
async exec(ctx) {
|
|
23422
23500
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -23426,7 +23504,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23426
23504
|
for (const nodeParam of nodeParams) {
|
|
23427
23505
|
let originValue;
|
|
23428
23506
|
if (nodeParam.dstDEUILogicParamId && ibiz.env.logLevel === "DEBUG") {
|
|
23429
|
-
originValue =
|
|
23507
|
+
originValue = clone27(ctx.params[nodeParam.dstDEUILogicParamId]);
|
|
23430
23508
|
}
|
|
23431
23509
|
switch (nodeParam.paramAction) {
|
|
23432
23510
|
case "SETPARAMVALUE":
|
|
@@ -23521,7 +23599,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23521
23599
|
copyParam(nodeParam, ctx) {
|
|
23522
23600
|
const { dstDEUILogicParamId } = nodeParam;
|
|
23523
23601
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
23524
|
-
ctx.params[dstDEUILogicParamId] =
|
|
23602
|
+
ctx.params[dstDEUILogicParamId] = clone27(srcVal);
|
|
23525
23603
|
}
|
|
23526
23604
|
/**
|
|
23527
23605
|
* 绑定参数
|
|
@@ -23828,7 +23906,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
23828
23906
|
|
|
23829
23907
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
23830
23908
|
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
23831
|
-
import { clone as
|
|
23909
|
+
import { clone as clone28 } from "ramda";
|
|
23832
23910
|
var CopyParamNode2 = class extends UILogicNode {
|
|
23833
23911
|
async exec(ctx) {
|
|
23834
23912
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -23839,7 +23917,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
23839
23917
|
);
|
|
23840
23918
|
}
|
|
23841
23919
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
23842
|
-
ctx.params[dstDEUILogicParamId] =
|
|
23920
|
+
ctx.params[dstDEUILogicParamId] = clone28(srcVal);
|
|
23843
23921
|
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
23844
23922
|
ibiz.log.debug(
|
|
23845
23923
|
ibiz.i18n.t("runtime.uiLogic.copyParameter", {
|
|
@@ -25712,7 +25790,7 @@ var ContextMenuController = class extends ToolbarController {
|
|
|
25712
25790
|
};
|
|
25713
25791
|
|
|
25714
25792
|
// src/controller/control/dashboard/dashboard.controller.ts
|
|
25715
|
-
import { clone as
|
|
25793
|
+
import { clone as clone29 } from "ramda";
|
|
25716
25794
|
var DashboardController = class extends ControlController {
|
|
25717
25795
|
constructor() {
|
|
25718
25796
|
super(...arguments);
|
|
@@ -25732,6 +25810,14 @@ var DashboardController = class extends ControlController {
|
|
|
25732
25810
|
* @type {{ [key: string]: IPortletController }}
|
|
25733
25811
|
*/
|
|
25734
25812
|
this.portlets = {};
|
|
25813
|
+
/**
|
|
25814
|
+
* 动态门户部件Map
|
|
25815
|
+
*
|
|
25816
|
+
* @author tony001
|
|
25817
|
+
* @date 2024-07-09 17:07:57
|
|
25818
|
+
* @type {Map<string, IData>}
|
|
25819
|
+
*/
|
|
25820
|
+
this.dynaPortletMap = /* @__PURE__ */ new Map();
|
|
25735
25821
|
}
|
|
25736
25822
|
initState() {
|
|
25737
25823
|
super.initState();
|
|
@@ -25887,7 +25973,7 @@ var DashboardController = class extends ControlController {
|
|
|
25887
25973
|
*/
|
|
25888
25974
|
async loadDynaPortletById(id) {
|
|
25889
25975
|
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
25890
|
-
const tempContext =
|
|
25976
|
+
const tempContext = clone29(this.context);
|
|
25891
25977
|
Object.assign(tempContext, { psappportlet: id });
|
|
25892
25978
|
const res = await app.deService.exec(
|
|
25893
25979
|
"psappportlet",
|
|
@@ -25895,6 +25981,7 @@ var DashboardController = class extends ControlController {
|
|
|
25895
25981
|
tempContext,
|
|
25896
25982
|
this.params
|
|
25897
25983
|
);
|
|
25984
|
+
this.dynaPortletMap.set(id, res.data);
|
|
25898
25985
|
if (res && res.data && res.data.controlmodel) {
|
|
25899
25986
|
const controlModel = JSON.parse(res.data.controlmodel);
|
|
25900
25987
|
return await ibiz.hub.translationModelToDsl(
|
|
@@ -26085,6 +26172,16 @@ var CustomDashboardController = class {
|
|
|
26085
26172
|
res = await this.config.load();
|
|
26086
26173
|
}
|
|
26087
26174
|
if (res.model) {
|
|
26175
|
+
for (let i = 0; i < res.model.length; i++) {
|
|
26176
|
+
const item = res.model[i];
|
|
26177
|
+
if (item.orignModel) {
|
|
26178
|
+
item.portletModel = await ibiz.hub.translationModelToDsl(
|
|
26179
|
+
item.portletModel,
|
|
26180
|
+
"CTRL"
|
|
26181
|
+
);
|
|
26182
|
+
delete item.orignModel;
|
|
26183
|
+
}
|
|
26184
|
+
}
|
|
26088
26185
|
this.customModelData = res.model;
|
|
26089
26186
|
}
|
|
26090
26187
|
if (res.colNum) {
|
|
@@ -26846,7 +26943,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26846
26943
|
);
|
|
26847
26944
|
}
|
|
26848
26945
|
if (groupMode === "AUTO") {
|
|
26849
|
-
this.handleAutoGroup();
|
|
26946
|
+
await this.handleAutoGroup();
|
|
26850
26947
|
} else if (groupMode === "CODELIST") {
|
|
26851
26948
|
await this.handleCodeListGroup();
|
|
26852
26949
|
}
|
|
@@ -26857,8 +26954,17 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26857
26954
|
*
|
|
26858
26955
|
* @memberof DataViewControlController
|
|
26859
26956
|
*/
|
|
26860
|
-
handleAutoGroup() {
|
|
26861
|
-
const { groupAppDEFieldId } = this.model;
|
|
26957
|
+
async handleAutoGroup() {
|
|
26958
|
+
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
26959
|
+
let codeList = [];
|
|
26960
|
+
if (groupCodeListId) {
|
|
26961
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
26962
|
+
codeList = await app.codeList.get(
|
|
26963
|
+
groupCodeListId,
|
|
26964
|
+
this.context,
|
|
26965
|
+
this.params
|
|
26966
|
+
);
|
|
26967
|
+
}
|
|
26862
26968
|
if (groupAppDEFieldId) {
|
|
26863
26969
|
const { items } = this.state;
|
|
26864
26970
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -26874,8 +26980,9 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26874
26980
|
});
|
|
26875
26981
|
const groups = [];
|
|
26876
26982
|
groupMap.forEach((value, key) => {
|
|
26983
|
+
const codeListItem = codeList.find((x) => x.value === key);
|
|
26877
26984
|
groups.push({
|
|
26878
|
-
caption: key,
|
|
26985
|
+
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
26879
26986
|
key,
|
|
26880
26987
|
children: [...value]
|
|
26881
26988
|
});
|
|
@@ -30199,7 +30306,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
30199
30306
|
|
|
30200
30307
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
30201
30308
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
30202
|
-
import { clone as
|
|
30309
|
+
import { clone as clone30 } from "ramda";
|
|
30203
30310
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
30204
30311
|
constructor() {
|
|
30205
30312
|
super(...arguments);
|
|
@@ -30291,7 +30398,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
30291
30398
|
copyFields.forEach((key) => {
|
|
30292
30399
|
tempForm[key] = this.form.model[key];
|
|
30293
30400
|
});
|
|
30294
|
-
this.repeatedForm =
|
|
30401
|
+
this.repeatedForm = clone30(tempForm);
|
|
30295
30402
|
}
|
|
30296
30403
|
/**
|
|
30297
30404
|
* 设置重复器控制器
|
|
@@ -30499,7 +30606,7 @@ import {
|
|
|
30499
30606
|
} from "@ibiz-template/core";
|
|
30500
30607
|
import { debounce } from "lodash-es";
|
|
30501
30608
|
import { createUUID as createUUID12 } from "qx-util";
|
|
30502
|
-
import { clone as
|
|
30609
|
+
import { clone as clone31, isNil as isNil27 } from "ramda";
|
|
30503
30610
|
|
|
30504
30611
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
30505
30612
|
import {
|
|
@@ -30868,8 +30975,8 @@ var EditFormController = class extends FormController {
|
|
|
30868
30975
|
* @return {*} {Promise<IData>}
|
|
30869
30976
|
*/
|
|
30870
30977
|
async copy() {
|
|
30871
|
-
const context =
|
|
30872
|
-
const queryParams =
|
|
30978
|
+
const context = clone31(this.context);
|
|
30979
|
+
const queryParams = clone31(this.params);
|
|
30873
30980
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
30874
30981
|
this.model.appDataEntityId,
|
|
30875
30982
|
this.model.appId
|
|
@@ -30926,7 +31033,7 @@ var EditFormController = class extends FormController {
|
|
|
30926
31033
|
return this.loadDraft();
|
|
30927
31034
|
}
|
|
30928
31035
|
const { context, params } = this.handlerAbilityParams(args);
|
|
30929
|
-
const queryParams =
|
|
31036
|
+
const queryParams = clone31(params);
|
|
30930
31037
|
let res;
|
|
30931
31038
|
try {
|
|
30932
31039
|
await this.startLoading();
|
|
@@ -31473,13 +31580,23 @@ var GridColumnController = class {
|
|
|
31473
31580
|
* @author: zhujiamin
|
|
31474
31581
|
* @Date: 2023-08-15 11:29:58
|
|
31475
31582
|
*/
|
|
31476
|
-
getCustomHtml(row) {
|
|
31477
|
-
var _a;
|
|
31583
|
+
async getCustomHtml(row) {
|
|
31584
|
+
var _a, _b;
|
|
31478
31585
|
if ((_a = this.deGridDataItem) == null ? void 0 : _a.scriptCode) {
|
|
31479
|
-
|
|
31480
|
-
|
|
31481
|
-
|
|
31482
|
-
|
|
31586
|
+
let scriptCode = (_b = this.deGridDataItem) == null ? void 0 : _b.scriptCode;
|
|
31587
|
+
if (!scriptCode.includes("return")) {
|
|
31588
|
+
scriptCode = "return (".concat(scriptCode, ")");
|
|
31589
|
+
}
|
|
31590
|
+
return await ScriptFactory.asyncExecScriptFn(
|
|
31591
|
+
{
|
|
31592
|
+
data: row.data,
|
|
31593
|
+
context: this.context,
|
|
31594
|
+
params: this.params,
|
|
31595
|
+
controller: this,
|
|
31596
|
+
ctrl: this.grid,
|
|
31597
|
+
view: this.grid.view
|
|
31598
|
+
},
|
|
31599
|
+
scriptCode
|
|
31483
31600
|
);
|
|
31484
31601
|
}
|
|
31485
31602
|
}
|
|
@@ -31613,7 +31730,7 @@ import {
|
|
|
31613
31730
|
RuntimeError as RuntimeError58,
|
|
31614
31731
|
RuntimeModelError as RuntimeModelError63
|
|
31615
31732
|
} from "@ibiz-template/core";
|
|
31616
|
-
import { clone as
|
|
31733
|
+
import { clone as clone32, isNil as isNil28 } from "ramda";
|
|
31617
31734
|
import dayjs5 from "dayjs";
|
|
31618
31735
|
|
|
31619
31736
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -31816,12 +31933,12 @@ var GridController = class extends MDControlController {
|
|
|
31816
31933
|
*/
|
|
31817
31934
|
this.jsonSchemaParams = {};
|
|
31818
31935
|
/**
|
|
31819
|
-
*
|
|
31936
|
+
* 显示百分比列
|
|
31820
31937
|
*
|
|
31821
|
-
* @type {
|
|
31938
|
+
* @type {string[]}
|
|
31822
31939
|
* @memberof GridController
|
|
31823
31940
|
*/
|
|
31824
|
-
this.
|
|
31941
|
+
this.percentkeys = [];
|
|
31825
31942
|
/**
|
|
31826
31943
|
* 所有表格列控制器集合
|
|
31827
31944
|
*
|
|
@@ -31992,7 +32109,7 @@ var GridController = class extends MDControlController {
|
|
|
31992
32109
|
this.params,
|
|
31993
32110
|
this.context
|
|
31994
32111
|
);
|
|
31995
|
-
this.
|
|
32112
|
+
this.percentkeys = this.controlParams.percentkeys || [];
|
|
31996
32113
|
await this.initByEntitySchema();
|
|
31997
32114
|
await super.onCreated();
|
|
31998
32115
|
this.service = new GridService(this.model);
|
|
@@ -32046,10 +32163,12 @@ var GridController = class extends MDControlController {
|
|
|
32046
32163
|
if (!this.addSchemaColumn) {
|
|
32047
32164
|
return;
|
|
32048
32165
|
}
|
|
32166
|
+
const tempParams = clone32(this.jsonSchemaParams);
|
|
32167
|
+
Object.assign(tempParams, this.params);
|
|
32049
32168
|
const json = await getEntitySchema(
|
|
32050
32169
|
this.model.appDataEntityId,
|
|
32051
32170
|
this.context,
|
|
32052
|
-
|
|
32171
|
+
tempParams
|
|
32053
32172
|
);
|
|
32054
32173
|
if (!json) {
|
|
32055
32174
|
return;
|
|
@@ -32057,7 +32176,7 @@ var GridController = class extends MDControlController {
|
|
|
32057
32176
|
const result = await calcColumnModelBySchema(json, this);
|
|
32058
32177
|
if (result && result.degridColumns.length > 0) {
|
|
32059
32178
|
const { degridColumns, degridDataItems } = result;
|
|
32060
|
-
this.model =
|
|
32179
|
+
this.model = clone32(this.model);
|
|
32061
32180
|
this.model.degridColumns = [
|
|
32062
32181
|
...this.model.degridColumns || [],
|
|
32063
32182
|
...degridColumns
|
|
@@ -32769,7 +32888,7 @@ var GridController = class extends MDControlController {
|
|
|
32769
32888
|
);
|
|
32770
32889
|
}
|
|
32771
32890
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
32772
|
-
row.cacheData =
|
|
32891
|
+
row.cacheData = clone32(row.data);
|
|
32773
32892
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
32774
32893
|
Object.assign(row.data, defaultVal);
|
|
32775
32894
|
}
|
|
@@ -32912,7 +33031,7 @@ var GridController = class extends MDControlController {
|
|
|
32912
33031
|
*/
|
|
32913
33032
|
formatExcelData(data) {
|
|
32914
33033
|
const { fields = [] } = this.dataExportParam;
|
|
32915
|
-
const cloneData =
|
|
33034
|
+
const cloneData = clone32(
|
|
32916
33035
|
data.map((item) => {
|
|
32917
33036
|
return fields.reduce((obj, key) => {
|
|
32918
33037
|
obj[key] = item[key];
|
|
@@ -33242,12 +33361,11 @@ var GridController = class extends MDControlController {
|
|
|
33242
33361
|
* @return {*} {Promise<void>}
|
|
33243
33362
|
*/
|
|
33244
33363
|
calcTotalData() {
|
|
33245
|
-
if (
|
|
33364
|
+
if (this.percentkeys.length === 0) {
|
|
33246
33365
|
return;
|
|
33247
33366
|
}
|
|
33248
33367
|
const totalResult = {};
|
|
33249
|
-
|
|
33250
|
-
const fieldName = column.model.id;
|
|
33368
|
+
this.percentkeys.forEach((fieldName) => {
|
|
33251
33369
|
const result = this.state.items.map((item) => item[fieldName]).reduce((a, b) => {
|
|
33252
33370
|
const aValue = Number(a) || 0;
|
|
33253
33371
|
const bValue = Number(b) || 0;
|
|
@@ -33271,7 +33389,7 @@ import {
|
|
|
33271
33389
|
} from "@ibiz-template/core";
|
|
33272
33390
|
import dayjs6 from "dayjs";
|
|
33273
33391
|
import { debounce as debounce2 } from "lodash-es";
|
|
33274
|
-
import { clone as
|
|
33392
|
+
import { clone as clone33, isNil as isNil29 } from "ramda";
|
|
33275
33393
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
33276
33394
|
var GridFieldColumnController = class extends GridColumnController {
|
|
33277
33395
|
constructor() {
|
|
@@ -33320,7 +33438,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
33320
33438
|
leading: true,
|
|
33321
33439
|
trailing: false
|
|
33322
33440
|
});
|
|
33323
|
-
this.loadCodeList();
|
|
33441
|
+
await this.loadCodeList();
|
|
33324
33442
|
}
|
|
33325
33443
|
/**
|
|
33326
33444
|
* 初始化属性列界面行为组按钮状态
|
|
@@ -33415,7 +33533,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
33415
33533
|
srfkey: value,
|
|
33416
33534
|
...wfContext
|
|
33417
33535
|
});
|
|
33418
|
-
const tempParams =
|
|
33536
|
+
const tempParams = clone33(this.params);
|
|
33419
33537
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
33420
33538
|
row.data,
|
|
33421
33539
|
tempContext,
|
|
@@ -34071,7 +34189,7 @@ var ListController = class extends MDControlController {
|
|
|
34071
34189
|
const { enableGroup, groupMode } = this.model;
|
|
34072
34190
|
if (enableGroup && groupMode) {
|
|
34073
34191
|
if (groupMode === "AUTO") {
|
|
34074
|
-
this.handleAutoGroup();
|
|
34192
|
+
await this.handleAutoGroup();
|
|
34075
34193
|
} else if (groupMode === "CODELIST") {
|
|
34076
34194
|
await this.handleCodeListGroup();
|
|
34077
34195
|
}
|
|
@@ -34082,8 +34200,17 @@ var ListController = class extends MDControlController {
|
|
|
34082
34200
|
*
|
|
34083
34201
|
* @memberof DataViewControlController
|
|
34084
34202
|
*/
|
|
34085
|
-
handleAutoGroup() {
|
|
34086
|
-
const { groupAppDEFieldId } = this.model;
|
|
34203
|
+
async handleAutoGroup() {
|
|
34204
|
+
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
34205
|
+
let codeList = [];
|
|
34206
|
+
if (groupCodeListId) {
|
|
34207
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
34208
|
+
codeList = await app.codeList.get(
|
|
34209
|
+
groupCodeListId,
|
|
34210
|
+
this.context,
|
|
34211
|
+
this.params
|
|
34212
|
+
);
|
|
34213
|
+
}
|
|
34087
34214
|
if (groupAppDEFieldId) {
|
|
34088
34215
|
const { items } = this.state;
|
|
34089
34216
|
const childrenMap = /* @__PURE__ */ new Map();
|
|
@@ -34094,8 +34221,9 @@ var ListController = class extends MDControlController {
|
|
|
34094
34221
|
});
|
|
34095
34222
|
const groups = [];
|
|
34096
34223
|
childrenMap.forEach((value, key) => {
|
|
34224
|
+
const codeListItem = codeList.find((x) => x.value === key);
|
|
34097
34225
|
groups.push({
|
|
34098
|
-
caption: key,
|
|
34226
|
+
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
34099
34227
|
key,
|
|
34100
34228
|
children: [...value]
|
|
34101
34229
|
});
|
|
@@ -34950,7 +35078,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
34950
35078
|
|
|
34951
35079
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
34952
35080
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
34953
|
-
import { clone as
|
|
35081
|
+
import { clone as clone35 } from "ramda";
|
|
34954
35082
|
import { isString as isString3 } from "lodash-es";
|
|
34955
35083
|
|
|
34956
35084
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -35439,7 +35567,7 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
35439
35567
|
|
|
35440
35568
|
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
35441
35569
|
import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
35442
|
-
import { clone as
|
|
35570
|
+
import { clone as clone34 } from "ramda";
|
|
35443
35571
|
var SubFieldRegex2 = /^N_(.\w+)_(.\w+)$/;
|
|
35444
35572
|
var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
35445
35573
|
constructor(filterModels, appDataEntity, context, params) {
|
|
@@ -35524,7 +35652,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
35524
35652
|
const matches = subStr.match(SubFieldRegex2);
|
|
35525
35653
|
const subField = matches[1];
|
|
35526
35654
|
const subOP = matches[2];
|
|
35527
|
-
const cloneItem =
|
|
35655
|
+
const cloneItem = clone34(item);
|
|
35528
35656
|
cloneItem.defsearchMode.valueOP = subOP;
|
|
35529
35657
|
cloneItem.id = subField;
|
|
35530
35658
|
const filterC = new SearchBarFilterController(
|
|
@@ -35967,10 +36095,12 @@ var SearchBarController = class extends ControlController {
|
|
|
35967
36095
|
if (!this.addSchemaFilters) {
|
|
35968
36096
|
return;
|
|
35969
36097
|
}
|
|
36098
|
+
const tempParams = clone35(this.jsonSchemaParams);
|
|
36099
|
+
Object.assign(tempParams, this.params);
|
|
35970
36100
|
const json = await getEntitySchema(
|
|
35971
36101
|
this.model.appDataEntityId,
|
|
35972
36102
|
this.context,
|
|
35973
|
-
|
|
36103
|
+
tempParams
|
|
35974
36104
|
);
|
|
35975
36105
|
if (!json) {
|
|
35976
36106
|
return;
|
|
@@ -35993,7 +36123,7 @@ var SearchBarController = class extends ControlController {
|
|
|
35993
36123
|
}
|
|
35994
36124
|
});
|
|
35995
36125
|
if (addSearchBarFilters.length > 0) {
|
|
35996
|
-
this.model =
|
|
36126
|
+
this.model = clone35(this.model);
|
|
35997
36127
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
35998
36128
|
this.model.enableFilter = true;
|
|
35999
36129
|
}
|
|
@@ -38509,7 +38639,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38509
38639
|
);
|
|
38510
38640
|
}
|
|
38511
38641
|
if (groupMode === "AUTO") {
|
|
38512
|
-
this.handleAutoGroup();
|
|
38642
|
+
await this.handleAutoGroup();
|
|
38513
38643
|
} else if (groupMode === "CODELIST") {
|
|
38514
38644
|
await this.handleCodeListGroup();
|
|
38515
38645
|
}
|
|
@@ -38520,8 +38650,17 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38520
38650
|
*
|
|
38521
38651
|
* @memberof MDCtrlController
|
|
38522
38652
|
*/
|
|
38523
|
-
handleAutoGroup() {
|
|
38524
|
-
const { groupAppDEFieldId } = this.model;
|
|
38653
|
+
async handleAutoGroup() {
|
|
38654
|
+
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
38655
|
+
let codeList = [];
|
|
38656
|
+
if (groupCodeListId) {
|
|
38657
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
38658
|
+
codeList = await app.codeList.get(
|
|
38659
|
+
groupCodeListId,
|
|
38660
|
+
this.context,
|
|
38661
|
+
this.params
|
|
38662
|
+
);
|
|
38663
|
+
}
|
|
38525
38664
|
if (groupAppDEFieldId) {
|
|
38526
38665
|
const { items } = this.state;
|
|
38527
38666
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -38537,8 +38676,9 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38537
38676
|
});
|
|
38538
38677
|
const groups = [];
|
|
38539
38678
|
groupMap.forEach((value, key) => {
|
|
38679
|
+
const codeListItem = codeList.find((x) => x.value === key);
|
|
38540
38680
|
groups.push({
|
|
38541
|
-
caption: key,
|
|
38681
|
+
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
38542
38682
|
key,
|
|
38543
38683
|
children: [...value]
|
|
38544
38684
|
});
|
|
@@ -38607,10 +38747,10 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38607
38747
|
|
|
38608
38748
|
// src/controller/control/kanban/kanban.controller.ts
|
|
38609
38749
|
import { RuntimeError as RuntimeError64, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
38610
|
-
import { clone as
|
|
38750
|
+
import { clone as clone37, isNil as isNil33 } from "ramda";
|
|
38611
38751
|
|
|
38612
38752
|
// src/controller/control/kanban/kanban.service.ts
|
|
38613
|
-
import { clone as
|
|
38753
|
+
import { clone as clone36 } from "ramda";
|
|
38614
38754
|
var KanbanService = class extends DataViewControlService {
|
|
38615
38755
|
/**
|
|
38616
38756
|
* 更新分组数据
|
|
@@ -38639,7 +38779,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
38639
38779
|
*/
|
|
38640
38780
|
async moveOrderItem(context, data, args) {
|
|
38641
38781
|
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
38642
|
-
const params =
|
|
38782
|
+
const params = clone36(data.getOrigin());
|
|
38643
38783
|
Object.assign(params, args);
|
|
38644
38784
|
let res = await this.exec(moveAction, context, params, {
|
|
38645
38785
|
srfupdateitem: true
|
|
@@ -38971,7 +39111,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
38971
39111
|
}
|
|
38972
39112
|
return moveData;
|
|
38973
39113
|
};
|
|
38974
|
-
const draggedItem =
|
|
39114
|
+
const draggedItem = clone37(fromGroup.children[fromIndex]);
|
|
38975
39115
|
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
38976
39116
|
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
38977
39117
|
if (info.from !== info.to) {
|
|
@@ -39244,7 +39384,7 @@ import {
|
|
|
39244
39384
|
awaitTimeout as awaitTimeout3,
|
|
39245
39385
|
recursiveIterate as recursiveIterate12
|
|
39246
39386
|
} from "@ibiz-template/core";
|
|
39247
|
-
import { clone as
|
|
39387
|
+
import { clone as clone38 } from "ramda";
|
|
39248
39388
|
|
|
39249
39389
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
39250
39390
|
var TreeGridExService = class extends TreeService {
|
|
@@ -39716,7 +39856,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
39716
39856
|
);
|
|
39717
39857
|
}
|
|
39718
39858
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
39719
|
-
row.cacheData =
|
|
39859
|
+
row.cacheData = clone38(row.data);
|
|
39720
39860
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
39721
39861
|
Object.assign(row.data, defaultVal);
|
|
39722
39862
|
}
|
|
@@ -39829,7 +39969,7 @@ import {
|
|
|
39829
39969
|
RuntimeError as RuntimeError66,
|
|
39830
39970
|
RuntimeModelError as RuntimeModelError70
|
|
39831
39971
|
} from "@ibiz-template/core";
|
|
39832
|
-
import { clone as
|
|
39972
|
+
import { clone as clone39 } from "ramda";
|
|
39833
39973
|
import dayjs7 from "dayjs";
|
|
39834
39974
|
var TreeGridExNodeColumnController = class {
|
|
39835
39975
|
/**
|
|
@@ -40046,7 +40186,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
40046
40186
|
srfkey: value,
|
|
40047
40187
|
...wfContext
|
|
40048
40188
|
});
|
|
40049
|
-
const tempParams =
|
|
40189
|
+
const tempParams = clone39(this.params);
|
|
40050
40190
|
const { userParam } = this.nodeColumn;
|
|
40051
40191
|
if (userParam) {
|
|
40052
40192
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -42199,7 +42339,7 @@ import { QXEvent as QXEvent11 } from "qx-util";
|
|
|
42199
42339
|
|
|
42200
42340
|
// src/controller/notification/async-action.controller.ts
|
|
42201
42341
|
import { QXEvent as QXEvent9 } from "qx-util";
|
|
42202
|
-
import { clone as
|
|
42342
|
+
import { clone as clone40 } from "ramda";
|
|
42203
42343
|
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
42204
42344
|
import dayjs8 from "dayjs";
|
|
42205
42345
|
var AsyncActionController = class {
|
|
@@ -42310,7 +42450,7 @@ var AsyncActionController = class {
|
|
|
42310
42450
|
} else {
|
|
42311
42451
|
this.noticeResult(action);
|
|
42312
42452
|
}
|
|
42313
|
-
this.evt.emit("add",
|
|
42453
|
+
this.evt.emit("add", clone40(action));
|
|
42314
42454
|
this.evt.emit("dataChange");
|
|
42315
42455
|
}
|
|
42316
42456
|
/**
|
|
@@ -42332,7 +42472,7 @@ var AsyncActionController = class {
|
|
|
42332
42472
|
}
|
|
42333
42473
|
this.noticeResult(action);
|
|
42334
42474
|
}
|
|
42335
|
-
this.evt.emit("change",
|
|
42475
|
+
this.evt.emit("change", clone40(action));
|
|
42336
42476
|
this.evt.emit("dataChange");
|
|
42337
42477
|
}
|
|
42338
42478
|
noticeResult(action) {
|
|
@@ -43497,7 +43637,7 @@ var ViewEngineBase = class {
|
|
|
43497
43637
|
|
|
43498
43638
|
// src/engine/md-view.engine.ts
|
|
43499
43639
|
import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
43500
|
-
import { clone as
|
|
43640
|
+
import { clone as clone41 } from "ramda";
|
|
43501
43641
|
var MDViewEngine = class extends ViewEngineBase {
|
|
43502
43642
|
/**
|
|
43503
43643
|
* 多数据部件名称
|
|
@@ -43752,7 +43892,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
43752
43892
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
43753
43893
|
);
|
|
43754
43894
|
}
|
|
43755
|
-
const params =
|
|
43895
|
+
const params = clone41(this.view.params);
|
|
43756
43896
|
if (copyMode) {
|
|
43757
43897
|
params.srfcopymode = copyMode;
|
|
43758
43898
|
}
|