@ibiz-template/runtime 0.2.0 → 0.2.1
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 +154 -119
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/application.js +1 -1
- package/out/controller/control/data-view/data-view.controller.d.ts +7 -0
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +41 -0
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +4 -1
- package/out/de-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/de-logic/utils/handle-src-val.js +9 -4
- package/out/interface/common/i-sort-item/i-sort-item.d.ts +24 -0
- package/out/interface/common/i-sort-item/i-sort-item.d.ts.map +1 -0
- package/out/interface/common/i-sort-item/i-sort-item.js +1 -0
- package/out/interface/common/index.d.ts +1 -0
- package/out/interface/common/index.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-data-view-control.state.d.ts +8 -0
- package/out/interface/controller/state/control/i-data-view-control.state.d.ts.map +1 -1
- package/out/service/service/control/control.service.d.ts.map +1 -1
- package/out/service/service/control/control.service.js +2 -1
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +2 -1
- package/out/service/vo/control.vo.d.ts +7 -7
- package/out/service/vo/control.vo.d.ts.map +1 -1
- package/out/service/vo/control.vo.js +52 -73
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +4 -2
- package/out/ui-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/ui-logic/utils/handle-src-val.js +9 -4
- package/package.json +2 -2
- package/src/application.ts +2 -2
- package/src/controller/control/data-view/data-view.controller.ts +46 -0
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +4 -4
- package/src/de-logic/utils/handle-src-val.ts +12 -8
- package/src/interface/common/i-sort-item/i-sort-item.ts +25 -0
- package/src/interface/common/index.ts +1 -0
- package/src/interface/controller/state/control/i-data-view-control.state.ts +9 -0
- package/src/service/service/control/control.service.ts +2 -1
- package/src/service/service/entity/method/de-action.ts +2 -1
- package/src/service/vo/control.vo.ts +66 -24
- package/src/ui-action/provider/ui-action-provider-base.ts +7 -2
- package/src/ui-logic/utils/handle-src-val.ts +12 -8
package/dist/index.esm.js
CHANGED
|
@@ -20490,7 +20490,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
20490
20490
|
|
|
20491
20491
|
// src/command/app/open-app-view/open-app-view.ts
|
|
20492
20492
|
import { ModelError as ModelError14, RuntimeError as RuntimeError17 } from "@ibiz-template/core";
|
|
20493
|
-
import { clone as
|
|
20493
|
+
import { clone as clone13 } from "ramda";
|
|
20494
20494
|
|
|
20495
20495
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
20496
20496
|
import { isEmpty as isEmpty3 } from "ramda";
|
|
@@ -23955,14 +23955,18 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
23955
23955
|
}
|
|
23956
23956
|
if (value && srcField) {
|
|
23957
23957
|
try {
|
|
23958
|
-
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
|
|
23962
|
-
|
|
23963
|
-
|
|
23964
|
-
|
|
23965
|
-
|
|
23958
|
+
if (Array.isArray(value)) {
|
|
23959
|
+
value = value[Number(srcField)];
|
|
23960
|
+
} else {
|
|
23961
|
+
value = ScriptFactory.execScriptFn(
|
|
23962
|
+
{ srcValue: value },
|
|
23963
|
+
"srcValue.".concat(srcField),
|
|
23964
|
+
{
|
|
23965
|
+
singleRowReturn: true,
|
|
23966
|
+
isAsync: false
|
|
23967
|
+
}
|
|
23968
|
+
);
|
|
23969
|
+
}
|
|
23966
23970
|
} catch (error) {
|
|
23967
23971
|
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
23968
23972
|
throw error;
|
|
@@ -24602,7 +24606,7 @@ var DEActionMethod = class extends Method {
|
|
|
24602
24606
|
*/
|
|
24603
24607
|
async inputHandle(context, data) {
|
|
24604
24608
|
if (isArray6(data)) {
|
|
24605
|
-
return
|
|
24609
|
+
return data;
|
|
24606
24610
|
}
|
|
24607
24611
|
return this.input.handle(context, data);
|
|
24608
24612
|
}
|
|
@@ -25272,82 +25276,12 @@ var DEService = class {
|
|
|
25272
25276
|
}
|
|
25273
25277
|
};
|
|
25274
25278
|
|
|
25279
|
+
// src/service/service/control/control.service.ts
|
|
25280
|
+
import { clone as clone12 } from "ramda";
|
|
25281
|
+
|
|
25275
25282
|
// src/service/vo/control.vo.ts
|
|
25276
25283
|
import { clone as clone11, isNil as isNil10 } from "ramda";
|
|
25277
25284
|
var ControlVO = class _ControlVO {
|
|
25278
|
-
/**
|
|
25279
|
-
* 是否是新建数据,0为新建
|
|
25280
|
-
*
|
|
25281
|
-
* @author lxm
|
|
25282
|
-
* @date 2022-09-06 22:09:24
|
|
25283
|
-
* @type {Srfuf}
|
|
25284
|
-
*/
|
|
25285
|
-
get srfuf() {
|
|
25286
|
-
if (isNil10(this.$origin.srfuf)) {
|
|
25287
|
-
return this.srfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
25288
|
-
}
|
|
25289
|
-
return this.$origin.srfuf;
|
|
25290
|
-
}
|
|
25291
|
-
/**
|
|
25292
|
-
* 主键
|
|
25293
|
-
*
|
|
25294
|
-
* @author lxm
|
|
25295
|
-
* @date 2022-09-07 19:09:42
|
|
25296
|
-
* @type {string}
|
|
25297
|
-
*/
|
|
25298
|
-
get srfkey() {
|
|
25299
|
-
return this.$origin.srfkey;
|
|
25300
|
-
}
|
|
25301
|
-
/**
|
|
25302
|
-
* 主信息
|
|
25303
|
-
*
|
|
25304
|
-
* @author lxm
|
|
25305
|
-
* @date 2022-09-07 19:09:42
|
|
25306
|
-
* @type {string}
|
|
25307
|
-
*/
|
|
25308
|
-
get srfmajortext() {
|
|
25309
|
-
return this.$origin.srfmajortext;
|
|
25310
|
-
}
|
|
25311
|
-
/**
|
|
25312
|
-
* 实体模型标识
|
|
25313
|
-
*
|
|
25314
|
-
* @author lxm
|
|
25315
|
-
* @date 2022-09-07 19:09:42
|
|
25316
|
-
* @type {string}
|
|
25317
|
-
*/
|
|
25318
|
-
get srfdeid() {
|
|
25319
|
-
return this.$origin.srfdeid;
|
|
25320
|
-
}
|
|
25321
|
-
/**
|
|
25322
|
-
* 实体模型代码名称
|
|
25323
|
-
*
|
|
25324
|
-
* @author lxm
|
|
25325
|
-
* @date 2022-09-07 19:09:42
|
|
25326
|
-
* @type {string}
|
|
25327
|
-
*/
|
|
25328
|
-
get srfdecodename() {
|
|
25329
|
-
return this.$origin.srfdecodename;
|
|
25330
|
-
}
|
|
25331
|
-
/**
|
|
25332
|
-
* 实体主键属性
|
|
25333
|
-
*
|
|
25334
|
-
* @author lxm
|
|
25335
|
-
* @date 2022-09-07 19:09:42
|
|
25336
|
-
* @type {string}
|
|
25337
|
-
*/
|
|
25338
|
-
get srfkeyfile() {
|
|
25339
|
-
return this.$origin.srfkeyfile;
|
|
25340
|
-
}
|
|
25341
|
-
/**
|
|
25342
|
-
* 实体主信息属性
|
|
25343
|
-
*
|
|
25344
|
-
* @author lxm
|
|
25345
|
-
* @date 2022-09-07 19:09:42
|
|
25346
|
-
* @type {string}
|
|
25347
|
-
*/
|
|
25348
|
-
get srfmajorfile() {
|
|
25349
|
-
return this.$origin.srfmajorfile;
|
|
25350
|
-
}
|
|
25351
25285
|
/**
|
|
25352
25286
|
* Creates an instance of ControlVO.
|
|
25353
25287
|
* @author lxm
|
|
@@ -25366,6 +25300,58 @@ var ControlVO = class _ControlVO {
|
|
|
25366
25300
|
configurable: true,
|
|
25367
25301
|
value: $dataUIMap || /* @__PURE__ */ new Map()
|
|
25368
25302
|
});
|
|
25303
|
+
Object.defineProperty(this, "srfuf", {
|
|
25304
|
+
get() {
|
|
25305
|
+
if (isNil10(this.$origin.srfuf)) {
|
|
25306
|
+
return this.srfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
25307
|
+
}
|
|
25308
|
+
return this.$origin.srfuf;
|
|
25309
|
+
},
|
|
25310
|
+
enumerable: false,
|
|
25311
|
+
configurable: true
|
|
25312
|
+
});
|
|
25313
|
+
Object.defineProperty(this, "srfkey", {
|
|
25314
|
+
get() {
|
|
25315
|
+
return this.$origin.srfkey;
|
|
25316
|
+
},
|
|
25317
|
+
enumerable: false,
|
|
25318
|
+
configurable: true
|
|
25319
|
+
});
|
|
25320
|
+
Object.defineProperty(this, "srfmajortext", {
|
|
25321
|
+
get() {
|
|
25322
|
+
return this.$origin.srfmajortext;
|
|
25323
|
+
},
|
|
25324
|
+
enumerable: false,
|
|
25325
|
+
configurable: true
|
|
25326
|
+
});
|
|
25327
|
+
Object.defineProperty(this, "srfdeid", {
|
|
25328
|
+
get() {
|
|
25329
|
+
return this.$origin.srfdeid;
|
|
25330
|
+
},
|
|
25331
|
+
enumerable: false,
|
|
25332
|
+
configurable: true
|
|
25333
|
+
});
|
|
25334
|
+
Object.defineProperty(this, "srfdecodename", {
|
|
25335
|
+
get() {
|
|
25336
|
+
return this.$origin.srfdecodename;
|
|
25337
|
+
},
|
|
25338
|
+
enumerable: false,
|
|
25339
|
+
configurable: true
|
|
25340
|
+
});
|
|
25341
|
+
Object.defineProperty(this, "srfkeyfile", {
|
|
25342
|
+
get() {
|
|
25343
|
+
return this.$origin.srfkeyfile;
|
|
25344
|
+
},
|
|
25345
|
+
enumerable: false,
|
|
25346
|
+
configurable: true
|
|
25347
|
+
});
|
|
25348
|
+
Object.defineProperty(this, "srfmajorfile", {
|
|
25349
|
+
get() {
|
|
25350
|
+
return this.$origin.srfmajorfile;
|
|
25351
|
+
},
|
|
25352
|
+
enumerable: false,
|
|
25353
|
+
configurable: true
|
|
25354
|
+
});
|
|
25369
25355
|
this.$dataUIMap.forEach((mapField, key) => {
|
|
25370
25356
|
const value = mapField.dataKey;
|
|
25371
25357
|
this.linkProperty(key, value, mapField);
|
|
@@ -25518,7 +25504,7 @@ var ControlService = class {
|
|
|
25518
25504
|
* @returns {*} {IHttpResponse}
|
|
25519
25505
|
*/
|
|
25520
25506
|
handleResponse(res) {
|
|
25521
|
-
return res;
|
|
25507
|
+
return clone12(res);
|
|
25522
25508
|
}
|
|
25523
25509
|
/**
|
|
25524
25510
|
* 实体数据转ui数据
|
|
@@ -26404,7 +26390,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
26404
26390
|
* @return {*} {(Promise<IModalData | void>)}
|
|
26405
26391
|
*/
|
|
26406
26392
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
26407
|
-
const context =
|
|
26393
|
+
const context = clone13(_context);
|
|
26408
26394
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
26409
26395
|
if (!appView) {
|
|
26410
26396
|
throw new RuntimeError17("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -26723,7 +26709,7 @@ var Application = class {
|
|
|
26723
26709
|
async init() {
|
|
26724
26710
|
await this.authority.init();
|
|
26725
26711
|
await this.loadAppModelStyle();
|
|
26726
|
-
if (ibiz.env.enableMqtt) {
|
|
26712
|
+
if (ibiz.env.enableMqtt && ibiz.appData) {
|
|
26727
26713
|
this.mqtt = new MqttService(
|
|
26728
26714
|
ibiz.appData.mqtttopic,
|
|
26729
26715
|
getToken(),
|
|
@@ -29730,7 +29716,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
29730
29716
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
29731
29717
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
29732
29718
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
29733
|
-
import { clone as
|
|
29719
|
+
import { clone as clone14, isNil as isNil19, mergeDeepRight } from "ramda";
|
|
29734
29720
|
dayjs3.extend(minMax);
|
|
29735
29721
|
dayjs3.extend(isSameOrBefore);
|
|
29736
29722
|
dayjs3.extend(quarterOfYear);
|
|
@@ -29953,7 +29939,7 @@ var BaseSeriesGenerator = class {
|
|
|
29953
29939
|
dataPreprocess(data) {
|
|
29954
29940
|
const tempData = [];
|
|
29955
29941
|
data.forEach((singleData) => {
|
|
29956
|
-
tempData.push(
|
|
29942
|
+
tempData.push(clone14(singleData));
|
|
29957
29943
|
});
|
|
29958
29944
|
const { groupMode } = this.model;
|
|
29959
29945
|
if (groupMode) {
|
|
@@ -30973,7 +30959,7 @@ import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError28 }
|
|
|
30973
30959
|
|
|
30974
30960
|
// src/ui-logic/utils/handle-src-val.ts
|
|
30975
30961
|
import { ModelError as ModelError17 } from "@ibiz-template/core";
|
|
30976
|
-
import { clone as
|
|
30962
|
+
import { clone as clone15 } from "ramda";
|
|
30977
30963
|
function handleSrcVal2(ctx, srcValParams) {
|
|
30978
30964
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
30979
30965
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -31000,21 +30986,25 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
31000
30986
|
value = ctx.parameters.context;
|
|
31001
30987
|
break;
|
|
31002
30988
|
case "ENVPARAM":
|
|
31003
|
-
value =
|
|
30989
|
+
value = clone15(ibiz.env);
|
|
31004
30990
|
break;
|
|
31005
30991
|
default:
|
|
31006
30992
|
throw new ModelError17(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
31007
30993
|
}
|
|
31008
30994
|
if (value && srcField) {
|
|
31009
30995
|
try {
|
|
31010
|
-
|
|
31011
|
-
|
|
31012
|
-
|
|
31013
|
-
|
|
31014
|
-
|
|
31015
|
-
|
|
31016
|
-
|
|
31017
|
-
|
|
30996
|
+
if (Array.isArray(value)) {
|
|
30997
|
+
value = value[Number(srcField)];
|
|
30998
|
+
} else {
|
|
30999
|
+
value = ScriptFactory.execScriptFn(
|
|
31000
|
+
{ srcValue: value },
|
|
31001
|
+
"srcValue.".concat(srcField),
|
|
31002
|
+
{
|
|
31003
|
+
singleRowReturn: true,
|
|
31004
|
+
isAsync: false
|
|
31005
|
+
}
|
|
31006
|
+
);
|
|
31007
|
+
}
|
|
31018
31008
|
} catch (error) {
|
|
31019
31009
|
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
31020
31010
|
throw error;
|
|
@@ -31351,7 +31341,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
31351
31341
|
|
|
31352
31342
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
31353
31343
|
import { ModelError as ModelError21, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
31354
|
-
import { clone as
|
|
31344
|
+
import { clone as clone16 } from "ramda";
|
|
31355
31345
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
31356
31346
|
async exec(ctx) {
|
|
31357
31347
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -31440,7 +31430,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
31440
31430
|
copyParam(nodeParam, ctx) {
|
|
31441
31431
|
const { dstDEUILogicParamId } = nodeParam;
|
|
31442
31432
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
31443
|
-
ctx.params[dstDEUILogicParamId] =
|
|
31433
|
+
ctx.params[dstDEUILogicParamId] = clone16(srcVal);
|
|
31444
31434
|
}
|
|
31445
31435
|
/**
|
|
31446
31436
|
* 绑定参数
|
|
@@ -31657,7 +31647,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
31657
31647
|
|
|
31658
31648
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
31659
31649
|
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
31660
|
-
import { clone as
|
|
31650
|
+
import { clone as clone17 } from "ramda";
|
|
31661
31651
|
var CopyParamNode2 = class extends UILogicNode {
|
|
31662
31652
|
async exec(ctx) {
|
|
31663
31653
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -31668,7 +31658,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
31668
31658
|
);
|
|
31669
31659
|
}
|
|
31670
31660
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
31671
|
-
ctx.params[dstDEUILogicParamId] =
|
|
31661
|
+
ctx.params[dstDEUILogicParamId] = clone17(srcVal);
|
|
31672
31662
|
}
|
|
31673
31663
|
};
|
|
31674
31664
|
|
|
@@ -32306,6 +32296,11 @@ var UIActionProviderBase = class {
|
|
|
32306
32296
|
async handleParams(action, context, data, params) {
|
|
32307
32297
|
let resultData = [];
|
|
32308
32298
|
const deName = calcDeCodeNameById(action.appDataEntityId);
|
|
32299
|
+
const entity = await ibiz.hub.getAppDataEntity(
|
|
32300
|
+
action.appDataEntityId,
|
|
32301
|
+
context.srfappid
|
|
32302
|
+
);
|
|
32303
|
+
const keyField = entity.keyAppDEFieldId;
|
|
32309
32304
|
switch (action.actionTarget) {
|
|
32310
32305
|
case "NONE":
|
|
32311
32306
|
resultData = [];
|
|
@@ -32317,12 +32312,12 @@ var UIActionProviderBase = class {
|
|
|
32317
32312
|
resultData = data;
|
|
32318
32313
|
break;
|
|
32319
32314
|
case "MULTIKEY":
|
|
32320
|
-
resultData = deName && data.length > 0 ? data.map((item) => ({ [
|
|
32315
|
+
resultData = deName && data.length > 0 ? data.map((item) => ({ [keyField]: item.srfkey || item[keyField] })) : [{}];
|
|
32321
32316
|
break;
|
|
32322
32317
|
case "SINGLEKEY":
|
|
32323
32318
|
{
|
|
32324
32319
|
const originData = data[0] || {};
|
|
32325
|
-
resultData = deName ? [{ [
|
|
32320
|
+
resultData = deName ? [{ [keyField]: originData.srfkey || originData[keyField] }] : [{}];
|
|
32326
32321
|
}
|
|
32327
32322
|
break;
|
|
32328
32323
|
default:
|
|
@@ -33256,6 +33251,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
33256
33251
|
this.state.noSort = this.model.noSort === true;
|
|
33257
33252
|
this.state.size = this.model.pagingSize || 20;
|
|
33258
33253
|
this.state.singleSelect = this.model.singleSelect === true;
|
|
33254
|
+
this.state.sortItems = [];
|
|
33259
33255
|
}
|
|
33260
33256
|
/**
|
|
33261
33257
|
* 初始化
|
|
@@ -33267,6 +33263,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
33267
33263
|
async onCreated() {
|
|
33268
33264
|
await super.onCreated();
|
|
33269
33265
|
await this.initControlService();
|
|
33266
|
+
this.initSortItems();
|
|
33270
33267
|
}
|
|
33271
33268
|
/**
|
|
33272
33269
|
* 初始化部件服务
|
|
@@ -33615,6 +33612,44 @@ var DataViewControlController = class extends MDControlController {
|
|
|
33615
33612
|
event
|
|
33616
33613
|
});
|
|
33617
33614
|
}
|
|
33615
|
+
/**
|
|
33616
|
+
* 初始化排序项集合
|
|
33617
|
+
* @author lxm
|
|
33618
|
+
* @date 2023-10-24 06:11:02
|
|
33619
|
+
* @return {*} {void}
|
|
33620
|
+
*/
|
|
33621
|
+
initSortItems() {
|
|
33622
|
+
var _a;
|
|
33623
|
+
if (!((_a = this.model.dedataViewItems) == null ? void 0 : _a.length)) {
|
|
33624
|
+
return;
|
|
33625
|
+
}
|
|
33626
|
+
const sortItems = [];
|
|
33627
|
+
const { minorSortAppDEFieldId, minorSortDir } = this.model;
|
|
33628
|
+
const hasDefaultSort = minorSortAppDEFieldId && minorSortDir;
|
|
33629
|
+
this.model.dedataViewItems.forEach((item) => {
|
|
33630
|
+
if (!item.enableSort) {
|
|
33631
|
+
return;
|
|
33632
|
+
}
|
|
33633
|
+
let { caption } = item;
|
|
33634
|
+
if (item.capLanguageRes) {
|
|
33635
|
+
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
33636
|
+
}
|
|
33637
|
+
if (!item.appDEFieldId) {
|
|
33638
|
+
throw new RuntimeModelError48(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
|
|
33639
|
+
}
|
|
33640
|
+
const tempItem = {
|
|
33641
|
+
caption,
|
|
33642
|
+
key: item.appDEFieldId
|
|
33643
|
+
};
|
|
33644
|
+
if (hasDefaultSort && minorSortAppDEFieldId === item.appDEFieldId) {
|
|
33645
|
+
tempItem.order = minorSortDir.toLowerCase();
|
|
33646
|
+
}
|
|
33647
|
+
sortItems.push(tempItem);
|
|
33648
|
+
});
|
|
33649
|
+
if (sortItems.length > 0) {
|
|
33650
|
+
this.state.sortItems = sortItems;
|
|
33651
|
+
}
|
|
33652
|
+
}
|
|
33618
33653
|
};
|
|
33619
33654
|
|
|
33620
33655
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
@@ -35743,7 +35778,7 @@ import {
|
|
|
35743
35778
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
35744
35779
|
} from "@ibiz-template/core";
|
|
35745
35780
|
import { debounce } from "lodash-es";
|
|
35746
|
-
import { clone as
|
|
35781
|
+
import { clone as clone18 } from "ramda";
|
|
35747
35782
|
|
|
35748
35783
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
35749
35784
|
import {
|
|
@@ -36090,8 +36125,8 @@ var EditFormController = class extends FormController {
|
|
|
36090
36125
|
* @return {*} {Promise<IData>}
|
|
36091
36126
|
*/
|
|
36092
36127
|
async copy() {
|
|
36093
|
-
const context =
|
|
36094
|
-
const queryParams =
|
|
36128
|
+
const context = clone18(this.context);
|
|
36129
|
+
const queryParams = clone18(this.params);
|
|
36095
36130
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
36096
36131
|
this.model.appDataEntityId
|
|
36097
36132
|
);
|
|
@@ -36146,7 +36181,7 @@ var EditFormController = class extends FormController {
|
|
|
36146
36181
|
return this.loadDraft();
|
|
36147
36182
|
}
|
|
36148
36183
|
const { context, params } = this.handlerAbilityParams(args);
|
|
36149
|
-
const queryParams =
|
|
36184
|
+
const queryParams = clone18(params);
|
|
36150
36185
|
let res;
|
|
36151
36186
|
try {
|
|
36152
36187
|
await this.startLoading();
|
|
@@ -37410,7 +37445,7 @@ import {
|
|
|
37410
37445
|
RuntimeError as RuntimeError45,
|
|
37411
37446
|
RuntimeModelError as RuntimeModelError53
|
|
37412
37447
|
} from "@ibiz-template/core";
|
|
37413
|
-
import { clone as
|
|
37448
|
+
import { clone as clone19 } from "ramda";
|
|
37414
37449
|
|
|
37415
37450
|
// src/controller/control/grid/grid/grid.service.ts
|
|
37416
37451
|
var GridService = class extends MDControlService {
|
|
@@ -38075,7 +38110,7 @@ var GridController = class extends MDControlController {
|
|
|
38075
38110
|
throw new RuntimeError45("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
38076
38111
|
}
|
|
38077
38112
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
38078
|
-
row.cacheData =
|
|
38113
|
+
row.cacheData = clone19(row.data);
|
|
38079
38114
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
38080
38115
|
Object.assign(row.data, defaultVal);
|
|
38081
38116
|
}
|
|
@@ -38192,7 +38227,7 @@ var GridController = class extends MDControlController {
|
|
|
38192
38227
|
codeListMap.set(key, items[key].codeListItems);
|
|
38193
38228
|
}
|
|
38194
38229
|
});
|
|
38195
|
-
const cloneData =
|
|
38230
|
+
const cloneData = clone19(
|
|
38196
38231
|
data2.map((item) => {
|
|
38197
38232
|
return item.getOrigin();
|
|
38198
38233
|
})
|
|
@@ -38303,7 +38338,7 @@ var GridController = class extends MDControlController {
|
|
|
38303
38338
|
import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
38304
38339
|
import dayjs4 from "dayjs";
|
|
38305
38340
|
import { debounce as debounce2 } from "lodash-es";
|
|
38306
|
-
import { clone as
|
|
38341
|
+
import { clone as clone20, isNil as isNil21 } from "ramda";
|
|
38307
38342
|
var GridFieldColumnController = class extends GridColumnController {
|
|
38308
38343
|
constructor() {
|
|
38309
38344
|
super(...arguments);
|
|
@@ -38338,10 +38373,10 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
38338
38373
|
}
|
|
38339
38374
|
async onInit() {
|
|
38340
38375
|
await super.onInit();
|
|
38341
|
-
this.loadCodeList = debounce2(
|
|
38342
|
-
|
|
38343
|
-
|
|
38344
|
-
);
|
|
38376
|
+
this.loadCodeList = debounce2(this.loadCodeList, 300, {
|
|
38377
|
+
leading: true,
|
|
38378
|
+
trailing: false
|
|
38379
|
+
});
|
|
38345
38380
|
this.loadCodeList();
|
|
38346
38381
|
}
|
|
38347
38382
|
/**
|
|
@@ -38407,7 +38442,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
38407
38442
|
srfkey: value,
|
|
38408
38443
|
...wfContext
|
|
38409
38444
|
});
|
|
38410
|
-
const tempParams =
|
|
38445
|
+
const tempParams = clone20(this.params);
|
|
38411
38446
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
38412
38447
|
row.data,
|
|
38413
38448
|
tempContext,
|
|
@@ -42841,7 +42876,7 @@ var ViewEngineBase = class {
|
|
|
42841
42876
|
|
|
42842
42877
|
// src/engine/md-view.engine.ts
|
|
42843
42878
|
import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
42844
|
-
import { clone as
|
|
42879
|
+
import { clone as clone21 } from "ramda";
|
|
42845
42880
|
var MDViewEngine = class extends ViewEngineBase {
|
|
42846
42881
|
/**
|
|
42847
42882
|
* 多数据部件名称
|
|
@@ -43038,7 +43073,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
43038
43073
|
if (!openAppViewLogic) {
|
|
43039
43074
|
throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
43040
43075
|
}
|
|
43041
|
-
const params =
|
|
43076
|
+
const params = clone21(this.view.params);
|
|
43042
43077
|
if (copyMode) {
|
|
43043
43078
|
params.srfcopymode = copyMode;
|
|
43044
43079
|
}
|