@ibiz-template/runtime 0.7.29 → 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 +183 -71
- 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 +1 -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 +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/utils/verify/form-dynamic-logic.js +1 -1
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -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,
|
|
@@ -13098,8 +13098,8 @@ var baseStyle = {
|
|
|
13098
13098
|
position: "fixed",
|
|
13099
13099
|
zIndex: "10000"
|
|
13100
13100
|
};
|
|
13101
|
-
function cloneElement(
|
|
13102
|
-
const element = getAnimationElement(
|
|
13101
|
+
function cloneElement(clone42, teleport = document.body, isRemoveChild = true) {
|
|
13102
|
+
const element = getAnimationElement(clone42);
|
|
13103
13103
|
if (element == null) {
|
|
13104
13104
|
throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
|
|
13105
13105
|
}
|
|
@@ -13518,11 +13518,11 @@ function arrayContains(arr, val) {
|
|
|
13518
13518
|
});
|
|
13519
13519
|
}
|
|
13520
13520
|
function cloneObject(o) {
|
|
13521
|
-
var
|
|
13521
|
+
var clone42 = {};
|
|
13522
13522
|
for (var p in o) {
|
|
13523
|
-
|
|
13523
|
+
clone42[p] = o[p];
|
|
13524
13524
|
}
|
|
13525
|
-
return
|
|
13525
|
+
return clone42;
|
|
13526
13526
|
}
|
|
13527
13527
|
function replaceObjectProps(o1, o2) {
|
|
13528
13528
|
var o = cloneObject(o1);
|
|
@@ -20873,6 +20873,7 @@ var CalendarController = class extends MDControlController {
|
|
|
20873
20873
|
|
|
20874
20874
|
// src/controller/control/chart/chart.controller.ts
|
|
20875
20875
|
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
20876
|
+
import { clone as clone25 } from "ramda";
|
|
20876
20877
|
|
|
20877
20878
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
20878
20879
|
import { clone as clone24, mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
@@ -22474,6 +22475,15 @@ var ChartService = class extends MDControlService {
|
|
|
22474
22475
|
|
|
22475
22476
|
// src/controller/control/chart/chart.controller.ts
|
|
22476
22477
|
var ChartController = class extends MDControlController {
|
|
22478
|
+
constructor() {
|
|
22479
|
+
super(...arguments);
|
|
22480
|
+
/**
|
|
22481
|
+
* 图表tooltip的默认状态
|
|
22482
|
+
*
|
|
22483
|
+
* @memberof ChartController
|
|
22484
|
+
*/
|
|
22485
|
+
this.tooltipState = true;
|
|
22486
|
+
}
|
|
22477
22487
|
get _evt() {
|
|
22478
22488
|
return this.evt;
|
|
22479
22489
|
}
|
|
@@ -22503,6 +22513,68 @@ var ChartController = class extends MDControlController {
|
|
|
22503
22513
|
this.calcOptions();
|
|
22504
22514
|
return result;
|
|
22505
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
|
+
}
|
|
22506
22578
|
/**
|
|
22507
22579
|
* 解析表格相关参数
|
|
22508
22580
|
*
|
|
@@ -22938,7 +23010,7 @@ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError34 }
|
|
|
22938
23010
|
|
|
22939
23011
|
// src/ui-logic/utils/handle-src-val.ts
|
|
22940
23012
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
22941
|
-
import { clone as
|
|
23013
|
+
import { clone as clone26 } from "ramda";
|
|
22942
23014
|
function handleSrcVal2(ctx, srcValParams) {
|
|
22943
23015
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
22944
23016
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -22965,7 +23037,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
22965
23037
|
value = ctx.parameters.context;
|
|
22966
23038
|
break;
|
|
22967
23039
|
case "ENVPARAM":
|
|
22968
|
-
value =
|
|
23040
|
+
value = clone26(ibiz.env);
|
|
22969
23041
|
break;
|
|
22970
23042
|
default:
|
|
22971
23043
|
throw new ModelError18(
|
|
@@ -23422,7 +23494,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
23422
23494
|
|
|
23423
23495
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
23424
23496
|
import { ModelError as ModelError22, RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
23425
|
-
import { clone as
|
|
23497
|
+
import { clone as clone27 } from "ramda";
|
|
23426
23498
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
23427
23499
|
async exec(ctx) {
|
|
23428
23500
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -23432,7 +23504,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23432
23504
|
for (const nodeParam of nodeParams) {
|
|
23433
23505
|
let originValue;
|
|
23434
23506
|
if (nodeParam.dstDEUILogicParamId && ibiz.env.logLevel === "DEBUG") {
|
|
23435
|
-
originValue =
|
|
23507
|
+
originValue = clone27(ctx.params[nodeParam.dstDEUILogicParamId]);
|
|
23436
23508
|
}
|
|
23437
23509
|
switch (nodeParam.paramAction) {
|
|
23438
23510
|
case "SETPARAMVALUE":
|
|
@@ -23527,7 +23599,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23527
23599
|
copyParam(nodeParam, ctx) {
|
|
23528
23600
|
const { dstDEUILogicParamId } = nodeParam;
|
|
23529
23601
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
23530
|
-
ctx.params[dstDEUILogicParamId] =
|
|
23602
|
+
ctx.params[dstDEUILogicParamId] = clone27(srcVal);
|
|
23531
23603
|
}
|
|
23532
23604
|
/**
|
|
23533
23605
|
* 绑定参数
|
|
@@ -23834,7 +23906,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
23834
23906
|
|
|
23835
23907
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
23836
23908
|
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
23837
|
-
import { clone as
|
|
23909
|
+
import { clone as clone28 } from "ramda";
|
|
23838
23910
|
var CopyParamNode2 = class extends UILogicNode {
|
|
23839
23911
|
async exec(ctx) {
|
|
23840
23912
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -23845,7 +23917,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
23845
23917
|
);
|
|
23846
23918
|
}
|
|
23847
23919
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
23848
|
-
ctx.params[dstDEUILogicParamId] =
|
|
23920
|
+
ctx.params[dstDEUILogicParamId] = clone28(srcVal);
|
|
23849
23921
|
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
23850
23922
|
ibiz.log.debug(
|
|
23851
23923
|
ibiz.i18n.t("runtime.uiLogic.copyParameter", {
|
|
@@ -25718,7 +25790,7 @@ var ContextMenuController = class extends ToolbarController {
|
|
|
25718
25790
|
};
|
|
25719
25791
|
|
|
25720
25792
|
// src/controller/control/dashboard/dashboard.controller.ts
|
|
25721
|
-
import { clone as
|
|
25793
|
+
import { clone as clone29 } from "ramda";
|
|
25722
25794
|
var DashboardController = class extends ControlController {
|
|
25723
25795
|
constructor() {
|
|
25724
25796
|
super(...arguments);
|
|
@@ -25901,7 +25973,7 @@ var DashboardController = class extends ControlController {
|
|
|
25901
25973
|
*/
|
|
25902
25974
|
async loadDynaPortletById(id) {
|
|
25903
25975
|
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
25904
|
-
const tempContext =
|
|
25976
|
+
const tempContext = clone29(this.context);
|
|
25905
25977
|
Object.assign(tempContext, { psappportlet: id });
|
|
25906
25978
|
const res = await app.deService.exec(
|
|
25907
25979
|
"psappportlet",
|
|
@@ -26107,6 +26179,7 @@ var CustomDashboardController = class {
|
|
|
26107
26179
|
item.portletModel,
|
|
26108
26180
|
"CTRL"
|
|
26109
26181
|
);
|
|
26182
|
+
delete item.orignModel;
|
|
26110
26183
|
}
|
|
26111
26184
|
}
|
|
26112
26185
|
this.customModelData = res.model;
|
|
@@ -26870,7 +26943,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26870
26943
|
);
|
|
26871
26944
|
}
|
|
26872
26945
|
if (groupMode === "AUTO") {
|
|
26873
|
-
this.handleAutoGroup();
|
|
26946
|
+
await this.handleAutoGroup();
|
|
26874
26947
|
} else if (groupMode === "CODELIST") {
|
|
26875
26948
|
await this.handleCodeListGroup();
|
|
26876
26949
|
}
|
|
@@ -26881,8 +26954,17 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26881
26954
|
*
|
|
26882
26955
|
* @memberof DataViewControlController
|
|
26883
26956
|
*/
|
|
26884
|
-
handleAutoGroup() {
|
|
26885
|
-
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
|
+
}
|
|
26886
26968
|
if (groupAppDEFieldId) {
|
|
26887
26969
|
const { items } = this.state;
|
|
26888
26970
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -26898,8 +26980,9 @@ var DataViewControlController = class extends MDControlController {
|
|
|
26898
26980
|
});
|
|
26899
26981
|
const groups = [];
|
|
26900
26982
|
groupMap.forEach((value, key) => {
|
|
26983
|
+
const codeListItem = codeList.find((x) => x.value === key);
|
|
26901
26984
|
groups.push({
|
|
26902
|
-
caption: key,
|
|
26985
|
+
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
26903
26986
|
key,
|
|
26904
26987
|
children: [...value]
|
|
26905
26988
|
});
|
|
@@ -30223,7 +30306,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
30223
30306
|
|
|
30224
30307
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
30225
30308
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
30226
|
-
import { clone as
|
|
30309
|
+
import { clone as clone30 } from "ramda";
|
|
30227
30310
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
30228
30311
|
constructor() {
|
|
30229
30312
|
super(...arguments);
|
|
@@ -30315,7 +30398,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
30315
30398
|
copyFields.forEach((key) => {
|
|
30316
30399
|
tempForm[key] = this.form.model[key];
|
|
30317
30400
|
});
|
|
30318
|
-
this.repeatedForm =
|
|
30401
|
+
this.repeatedForm = clone30(tempForm);
|
|
30319
30402
|
}
|
|
30320
30403
|
/**
|
|
30321
30404
|
* 设置重复器控制器
|
|
@@ -30523,7 +30606,7 @@ import {
|
|
|
30523
30606
|
} from "@ibiz-template/core";
|
|
30524
30607
|
import { debounce } from "lodash-es";
|
|
30525
30608
|
import { createUUID as createUUID12 } from "qx-util";
|
|
30526
|
-
import { clone as
|
|
30609
|
+
import { clone as clone31, isNil as isNil27 } from "ramda";
|
|
30527
30610
|
|
|
30528
30611
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
30529
30612
|
import {
|
|
@@ -30892,8 +30975,8 @@ var EditFormController = class extends FormController {
|
|
|
30892
30975
|
* @return {*} {Promise<IData>}
|
|
30893
30976
|
*/
|
|
30894
30977
|
async copy() {
|
|
30895
|
-
const context =
|
|
30896
|
-
const queryParams =
|
|
30978
|
+
const context = clone31(this.context);
|
|
30979
|
+
const queryParams = clone31(this.params);
|
|
30897
30980
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
30898
30981
|
this.model.appDataEntityId,
|
|
30899
30982
|
this.model.appId
|
|
@@ -30950,7 +31033,7 @@ var EditFormController = class extends FormController {
|
|
|
30950
31033
|
return this.loadDraft();
|
|
30951
31034
|
}
|
|
30952
31035
|
const { context, params } = this.handlerAbilityParams(args);
|
|
30953
|
-
const queryParams =
|
|
31036
|
+
const queryParams = clone31(params);
|
|
30954
31037
|
let res;
|
|
30955
31038
|
try {
|
|
30956
31039
|
await this.startLoading();
|
|
@@ -31497,13 +31580,23 @@ var GridColumnController = class {
|
|
|
31497
31580
|
* @author: zhujiamin
|
|
31498
31581
|
* @Date: 2023-08-15 11:29:58
|
|
31499
31582
|
*/
|
|
31500
|
-
getCustomHtml(row) {
|
|
31501
|
-
var _a;
|
|
31583
|
+
async getCustomHtml(row) {
|
|
31584
|
+
var _a, _b;
|
|
31502
31585
|
if ((_a = this.deGridDataItem) == null ? void 0 : _a.scriptCode) {
|
|
31503
|
-
|
|
31504
|
-
|
|
31505
|
-
|
|
31506
|
-
|
|
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
|
|
31507
31600
|
);
|
|
31508
31601
|
}
|
|
31509
31602
|
}
|
|
@@ -31637,7 +31730,7 @@ import {
|
|
|
31637
31730
|
RuntimeError as RuntimeError58,
|
|
31638
31731
|
RuntimeModelError as RuntimeModelError63
|
|
31639
31732
|
} from "@ibiz-template/core";
|
|
31640
|
-
import { clone as
|
|
31733
|
+
import { clone as clone32, isNil as isNil28 } from "ramda";
|
|
31641
31734
|
import dayjs5 from "dayjs";
|
|
31642
31735
|
|
|
31643
31736
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -31840,12 +31933,12 @@ var GridController = class extends MDControlController {
|
|
|
31840
31933
|
*/
|
|
31841
31934
|
this.jsonSchemaParams = {};
|
|
31842
31935
|
/**
|
|
31843
|
-
*
|
|
31936
|
+
* 显示百分比列
|
|
31844
31937
|
*
|
|
31845
|
-
* @type {
|
|
31938
|
+
* @type {string[]}
|
|
31846
31939
|
* @memberof GridController
|
|
31847
31940
|
*/
|
|
31848
|
-
this.
|
|
31941
|
+
this.percentkeys = [];
|
|
31849
31942
|
/**
|
|
31850
31943
|
* 所有表格列控制器集合
|
|
31851
31944
|
*
|
|
@@ -32016,7 +32109,7 @@ var GridController = class extends MDControlController {
|
|
|
32016
32109
|
this.params,
|
|
32017
32110
|
this.context
|
|
32018
32111
|
);
|
|
32019
|
-
this.
|
|
32112
|
+
this.percentkeys = this.controlParams.percentkeys || [];
|
|
32020
32113
|
await this.initByEntitySchema();
|
|
32021
32114
|
await super.onCreated();
|
|
32022
32115
|
this.service = new GridService(this.model);
|
|
@@ -32070,7 +32163,7 @@ var GridController = class extends MDControlController {
|
|
|
32070
32163
|
if (!this.addSchemaColumn) {
|
|
32071
32164
|
return;
|
|
32072
32165
|
}
|
|
32073
|
-
const tempParams =
|
|
32166
|
+
const tempParams = clone32(this.jsonSchemaParams);
|
|
32074
32167
|
Object.assign(tempParams, this.params);
|
|
32075
32168
|
const json = await getEntitySchema(
|
|
32076
32169
|
this.model.appDataEntityId,
|
|
@@ -32083,7 +32176,7 @@ var GridController = class extends MDControlController {
|
|
|
32083
32176
|
const result = await calcColumnModelBySchema(json, this);
|
|
32084
32177
|
if (result && result.degridColumns.length > 0) {
|
|
32085
32178
|
const { degridColumns, degridDataItems } = result;
|
|
32086
|
-
this.model =
|
|
32179
|
+
this.model = clone32(this.model);
|
|
32087
32180
|
this.model.degridColumns = [
|
|
32088
32181
|
...this.model.degridColumns || [],
|
|
32089
32182
|
...degridColumns
|
|
@@ -32795,7 +32888,7 @@ var GridController = class extends MDControlController {
|
|
|
32795
32888
|
);
|
|
32796
32889
|
}
|
|
32797
32890
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
32798
|
-
row.cacheData =
|
|
32891
|
+
row.cacheData = clone32(row.data);
|
|
32799
32892
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
32800
32893
|
Object.assign(row.data, defaultVal);
|
|
32801
32894
|
}
|
|
@@ -32938,7 +33031,7 @@ var GridController = class extends MDControlController {
|
|
|
32938
33031
|
*/
|
|
32939
33032
|
formatExcelData(data) {
|
|
32940
33033
|
const { fields = [] } = this.dataExportParam;
|
|
32941
|
-
const cloneData =
|
|
33034
|
+
const cloneData = clone32(
|
|
32942
33035
|
data.map((item) => {
|
|
32943
33036
|
return fields.reduce((obj, key) => {
|
|
32944
33037
|
obj[key] = item[key];
|
|
@@ -33268,12 +33361,11 @@ var GridController = class extends MDControlController {
|
|
|
33268
33361
|
* @return {*} {Promise<void>}
|
|
33269
33362
|
*/
|
|
33270
33363
|
calcTotalData() {
|
|
33271
|
-
if (
|
|
33364
|
+
if (this.percentkeys.length === 0) {
|
|
33272
33365
|
return;
|
|
33273
33366
|
}
|
|
33274
33367
|
const totalResult = {};
|
|
33275
|
-
|
|
33276
|
-
const fieldName = column.model.id;
|
|
33368
|
+
this.percentkeys.forEach((fieldName) => {
|
|
33277
33369
|
const result = this.state.items.map((item) => item[fieldName]).reduce((a, b) => {
|
|
33278
33370
|
const aValue = Number(a) || 0;
|
|
33279
33371
|
const bValue = Number(b) || 0;
|
|
@@ -33297,7 +33389,7 @@ import {
|
|
|
33297
33389
|
} from "@ibiz-template/core";
|
|
33298
33390
|
import dayjs6 from "dayjs";
|
|
33299
33391
|
import { debounce as debounce2 } from "lodash-es";
|
|
33300
|
-
import { clone as
|
|
33392
|
+
import { clone as clone33, isNil as isNil29 } from "ramda";
|
|
33301
33393
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
33302
33394
|
var GridFieldColumnController = class extends GridColumnController {
|
|
33303
33395
|
constructor() {
|
|
@@ -33441,7 +33533,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
33441
33533
|
srfkey: value,
|
|
33442
33534
|
...wfContext
|
|
33443
33535
|
});
|
|
33444
|
-
const tempParams =
|
|
33536
|
+
const tempParams = clone33(this.params);
|
|
33445
33537
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
33446
33538
|
row.data,
|
|
33447
33539
|
tempContext,
|
|
@@ -34097,7 +34189,7 @@ var ListController = class extends MDControlController {
|
|
|
34097
34189
|
const { enableGroup, groupMode } = this.model;
|
|
34098
34190
|
if (enableGroup && groupMode) {
|
|
34099
34191
|
if (groupMode === "AUTO") {
|
|
34100
|
-
this.handleAutoGroup();
|
|
34192
|
+
await this.handleAutoGroup();
|
|
34101
34193
|
} else if (groupMode === "CODELIST") {
|
|
34102
34194
|
await this.handleCodeListGroup();
|
|
34103
34195
|
}
|
|
@@ -34108,8 +34200,17 @@ var ListController = class extends MDControlController {
|
|
|
34108
34200
|
*
|
|
34109
34201
|
* @memberof DataViewControlController
|
|
34110
34202
|
*/
|
|
34111
|
-
handleAutoGroup() {
|
|
34112
|
-
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
|
+
}
|
|
34113
34214
|
if (groupAppDEFieldId) {
|
|
34114
34215
|
const { items } = this.state;
|
|
34115
34216
|
const childrenMap = /* @__PURE__ */ new Map();
|
|
@@ -34120,8 +34221,9 @@ var ListController = class extends MDControlController {
|
|
|
34120
34221
|
});
|
|
34121
34222
|
const groups = [];
|
|
34122
34223
|
childrenMap.forEach((value, key) => {
|
|
34224
|
+
const codeListItem = codeList.find((x) => x.value === key);
|
|
34123
34225
|
groups.push({
|
|
34124
|
-
caption: key,
|
|
34226
|
+
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
34125
34227
|
key,
|
|
34126
34228
|
children: [...value]
|
|
34127
34229
|
});
|
|
@@ -34976,7 +35078,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
34976
35078
|
|
|
34977
35079
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
34978
35080
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
34979
|
-
import { clone as
|
|
35081
|
+
import { clone as clone35 } from "ramda";
|
|
34980
35082
|
import { isString as isString3 } from "lodash-es";
|
|
34981
35083
|
|
|
34982
35084
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -35465,7 +35567,7 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
35465
35567
|
|
|
35466
35568
|
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
35467
35569
|
import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
35468
|
-
import { clone as
|
|
35570
|
+
import { clone as clone34 } from "ramda";
|
|
35469
35571
|
var SubFieldRegex2 = /^N_(.\w+)_(.\w+)$/;
|
|
35470
35572
|
var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
35471
35573
|
constructor(filterModels, appDataEntity, context, params) {
|
|
@@ -35550,7 +35652,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
35550
35652
|
const matches = subStr.match(SubFieldRegex2);
|
|
35551
35653
|
const subField = matches[1];
|
|
35552
35654
|
const subOP = matches[2];
|
|
35553
|
-
const cloneItem =
|
|
35655
|
+
const cloneItem = clone34(item);
|
|
35554
35656
|
cloneItem.defsearchMode.valueOP = subOP;
|
|
35555
35657
|
cloneItem.id = subField;
|
|
35556
35658
|
const filterC = new SearchBarFilterController(
|
|
@@ -35993,7 +36095,7 @@ var SearchBarController = class extends ControlController {
|
|
|
35993
36095
|
if (!this.addSchemaFilters) {
|
|
35994
36096
|
return;
|
|
35995
36097
|
}
|
|
35996
|
-
const tempParams =
|
|
36098
|
+
const tempParams = clone35(this.jsonSchemaParams);
|
|
35997
36099
|
Object.assign(tempParams, this.params);
|
|
35998
36100
|
const json = await getEntitySchema(
|
|
35999
36101
|
this.model.appDataEntityId,
|
|
@@ -36021,7 +36123,7 @@ var SearchBarController = class extends ControlController {
|
|
|
36021
36123
|
}
|
|
36022
36124
|
});
|
|
36023
36125
|
if (addSearchBarFilters.length > 0) {
|
|
36024
|
-
this.model =
|
|
36126
|
+
this.model = clone35(this.model);
|
|
36025
36127
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
36026
36128
|
this.model.enableFilter = true;
|
|
36027
36129
|
}
|
|
@@ -38537,7 +38639,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38537
38639
|
);
|
|
38538
38640
|
}
|
|
38539
38641
|
if (groupMode === "AUTO") {
|
|
38540
|
-
this.handleAutoGroup();
|
|
38642
|
+
await this.handleAutoGroup();
|
|
38541
38643
|
} else if (groupMode === "CODELIST") {
|
|
38542
38644
|
await this.handleCodeListGroup();
|
|
38543
38645
|
}
|
|
@@ -38548,8 +38650,17 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38548
38650
|
*
|
|
38549
38651
|
* @memberof MDCtrlController
|
|
38550
38652
|
*/
|
|
38551
|
-
handleAutoGroup() {
|
|
38552
|
-
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
|
+
}
|
|
38553
38664
|
if (groupAppDEFieldId) {
|
|
38554
38665
|
const { items } = this.state;
|
|
38555
38666
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -38565,8 +38676,9 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38565
38676
|
});
|
|
38566
38677
|
const groups = [];
|
|
38567
38678
|
groupMap.forEach((value, key) => {
|
|
38679
|
+
const codeListItem = codeList.find((x) => x.value === key);
|
|
38568
38680
|
groups.push({
|
|
38569
|
-
caption: key,
|
|
38681
|
+
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
38570
38682
|
key,
|
|
38571
38683
|
children: [...value]
|
|
38572
38684
|
});
|
|
@@ -38635,10 +38747,10 @@ var MDCtrlController = class extends MDControlController {
|
|
|
38635
38747
|
|
|
38636
38748
|
// src/controller/control/kanban/kanban.controller.ts
|
|
38637
38749
|
import { RuntimeError as RuntimeError64, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
38638
|
-
import { clone as
|
|
38750
|
+
import { clone as clone37, isNil as isNil33 } from "ramda";
|
|
38639
38751
|
|
|
38640
38752
|
// src/controller/control/kanban/kanban.service.ts
|
|
38641
|
-
import { clone as
|
|
38753
|
+
import { clone as clone36 } from "ramda";
|
|
38642
38754
|
var KanbanService = class extends DataViewControlService {
|
|
38643
38755
|
/**
|
|
38644
38756
|
* 更新分组数据
|
|
@@ -38667,7 +38779,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
38667
38779
|
*/
|
|
38668
38780
|
async moveOrderItem(context, data, args) {
|
|
38669
38781
|
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
38670
|
-
const params =
|
|
38782
|
+
const params = clone36(data.getOrigin());
|
|
38671
38783
|
Object.assign(params, args);
|
|
38672
38784
|
let res = await this.exec(moveAction, context, params, {
|
|
38673
38785
|
srfupdateitem: true
|
|
@@ -38999,7 +39111,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
38999
39111
|
}
|
|
39000
39112
|
return moveData;
|
|
39001
39113
|
};
|
|
39002
|
-
const draggedItem =
|
|
39114
|
+
const draggedItem = clone37(fromGroup.children[fromIndex]);
|
|
39003
39115
|
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
39004
39116
|
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
39005
39117
|
if (info.from !== info.to) {
|
|
@@ -39272,7 +39384,7 @@ import {
|
|
|
39272
39384
|
awaitTimeout as awaitTimeout3,
|
|
39273
39385
|
recursiveIterate as recursiveIterate12
|
|
39274
39386
|
} from "@ibiz-template/core";
|
|
39275
|
-
import { clone as
|
|
39387
|
+
import { clone as clone38 } from "ramda";
|
|
39276
39388
|
|
|
39277
39389
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
39278
39390
|
var TreeGridExService = class extends TreeService {
|
|
@@ -39744,7 +39856,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
39744
39856
|
);
|
|
39745
39857
|
}
|
|
39746
39858
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
39747
|
-
row.cacheData =
|
|
39859
|
+
row.cacheData = clone38(row.data);
|
|
39748
39860
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
39749
39861
|
Object.assign(row.data, defaultVal);
|
|
39750
39862
|
}
|
|
@@ -39857,7 +39969,7 @@ import {
|
|
|
39857
39969
|
RuntimeError as RuntimeError66,
|
|
39858
39970
|
RuntimeModelError as RuntimeModelError70
|
|
39859
39971
|
} from "@ibiz-template/core";
|
|
39860
|
-
import { clone as
|
|
39972
|
+
import { clone as clone39 } from "ramda";
|
|
39861
39973
|
import dayjs7 from "dayjs";
|
|
39862
39974
|
var TreeGridExNodeColumnController = class {
|
|
39863
39975
|
/**
|
|
@@ -40074,7 +40186,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
40074
40186
|
srfkey: value,
|
|
40075
40187
|
...wfContext
|
|
40076
40188
|
});
|
|
40077
|
-
const tempParams =
|
|
40189
|
+
const tempParams = clone39(this.params);
|
|
40078
40190
|
const { userParam } = this.nodeColumn;
|
|
40079
40191
|
if (userParam) {
|
|
40080
40192
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -42227,7 +42339,7 @@ import { QXEvent as QXEvent11 } from "qx-util";
|
|
|
42227
42339
|
|
|
42228
42340
|
// src/controller/notification/async-action.controller.ts
|
|
42229
42341
|
import { QXEvent as QXEvent9 } from "qx-util";
|
|
42230
|
-
import { clone as
|
|
42342
|
+
import { clone as clone40 } from "ramda";
|
|
42231
42343
|
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
42232
42344
|
import dayjs8 from "dayjs";
|
|
42233
42345
|
var AsyncActionController = class {
|
|
@@ -42338,7 +42450,7 @@ var AsyncActionController = class {
|
|
|
42338
42450
|
} else {
|
|
42339
42451
|
this.noticeResult(action);
|
|
42340
42452
|
}
|
|
42341
|
-
this.evt.emit("add",
|
|
42453
|
+
this.evt.emit("add", clone40(action));
|
|
42342
42454
|
this.evt.emit("dataChange");
|
|
42343
42455
|
}
|
|
42344
42456
|
/**
|
|
@@ -42360,7 +42472,7 @@ var AsyncActionController = class {
|
|
|
42360
42472
|
}
|
|
42361
42473
|
this.noticeResult(action);
|
|
42362
42474
|
}
|
|
42363
|
-
this.evt.emit("change",
|
|
42475
|
+
this.evt.emit("change", clone40(action));
|
|
42364
42476
|
this.evt.emit("dataChange");
|
|
42365
42477
|
}
|
|
42366
42478
|
noticeResult(action) {
|
|
@@ -43525,7 +43637,7 @@ var ViewEngineBase = class {
|
|
|
43525
43637
|
|
|
43526
43638
|
// src/engine/md-view.engine.ts
|
|
43527
43639
|
import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
43528
|
-
import { clone as
|
|
43640
|
+
import { clone as clone41 } from "ramda";
|
|
43529
43641
|
var MDViewEngine = class extends ViewEngineBase {
|
|
43530
43642
|
/**
|
|
43531
43643
|
* 多数据部件名称
|
|
@@ -43780,7 +43892,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
43780
43892
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
43781
43893
|
);
|
|
43782
43894
|
}
|
|
43783
|
-
const params =
|
|
43895
|
+
const params = clone41(this.view.params);
|
|
43784
43896
|
if (copyMode) {
|
|
43785
43897
|
params.srfcopymode = copyMode;
|
|
43786
43898
|
}
|