@ibiz-template/runtime 0.2.0 → 0.2.2
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 +167 -121
- 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/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +3 -0
- 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/model/view/view.d.ts.map +1 -1
- package/out/model/view/view.js +9 -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 +54 -74
- 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 +3 -3
- package/src/application.ts +2 -2
- package/src/controller/common/view/view.controller.ts +2 -0
- 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/model/view/view.ts +9 -1
- package/src/service/service/control/control.service.ts +2 -2
- package/src/service/service/entity/method/de-action.ts +2 -1
- package/src/service/vo/control.vo.ts +69 -25
- 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
|
@@ -18904,7 +18904,15 @@ function getViewEngines(view) {
|
|
|
18904
18904
|
if (viewLayoutPanel) {
|
|
18905
18905
|
appViewEngines.push(...viewLayoutPanel.appViewEngines || []);
|
|
18906
18906
|
}
|
|
18907
|
-
return appViewEngines
|
|
18907
|
+
return appViewEngines.filter((engine) => {
|
|
18908
|
+
switch (engine.engineCat) {
|
|
18909
|
+
case "CTRL":
|
|
18910
|
+
ibiz.log.warn("\u672A\u652F\u6301\u7684\u5F15\u64CE\u5206\u7C7B\uFF1A".concat(engine.engineType));
|
|
18911
|
+
return false;
|
|
18912
|
+
default:
|
|
18913
|
+
return true;
|
|
18914
|
+
}
|
|
18915
|
+
});
|
|
18908
18916
|
}
|
|
18909
18917
|
|
|
18910
18918
|
// src/model/panel/data-container.ts
|
|
@@ -20490,7 +20498,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
20490
20498
|
|
|
20491
20499
|
// src/command/app/open-app-view/open-app-view.ts
|
|
20492
20500
|
import { ModelError as ModelError14, RuntimeError as RuntimeError17 } from "@ibiz-template/core";
|
|
20493
|
-
import { clone as
|
|
20501
|
+
import { clone as clone13 } from "ramda";
|
|
20494
20502
|
|
|
20495
20503
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
20496
20504
|
import { isEmpty as isEmpty3 } from "ramda";
|
|
@@ -23955,14 +23963,18 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
23955
23963
|
}
|
|
23956
23964
|
if (value && srcField) {
|
|
23957
23965
|
try {
|
|
23958
|
-
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
|
|
23962
|
-
|
|
23963
|
-
|
|
23964
|
-
|
|
23965
|
-
|
|
23966
|
+
if (Array.isArray(value)) {
|
|
23967
|
+
value = value[Number(srcField)];
|
|
23968
|
+
} else {
|
|
23969
|
+
value = ScriptFactory.execScriptFn(
|
|
23970
|
+
{ srcValue: value },
|
|
23971
|
+
"srcValue.".concat(srcField),
|
|
23972
|
+
{
|
|
23973
|
+
singleRowReturn: true,
|
|
23974
|
+
isAsync: false
|
|
23975
|
+
}
|
|
23976
|
+
);
|
|
23977
|
+
}
|
|
23966
23978
|
} catch (error) {
|
|
23967
23979
|
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
23968
23980
|
throw error;
|
|
@@ -24602,7 +24614,7 @@ var DEActionMethod = class extends Method {
|
|
|
24602
24614
|
*/
|
|
24603
24615
|
async inputHandle(context, data) {
|
|
24604
24616
|
if (isArray6(data)) {
|
|
24605
|
-
return
|
|
24617
|
+
return data;
|
|
24606
24618
|
}
|
|
24607
24619
|
return this.input.handle(context, data);
|
|
24608
24620
|
}
|
|
@@ -25272,82 +25284,13 @@ var DEService = class {
|
|
|
25272
25284
|
}
|
|
25273
25285
|
};
|
|
25274
25286
|
|
|
25287
|
+
// src/service/service/control/control.service.ts
|
|
25288
|
+
import { clone as clone12 } from "@ibiz-template/core";
|
|
25289
|
+
|
|
25275
25290
|
// src/service/vo/control.vo.ts
|
|
25276
25291
|
import { clone as clone11, isNil as isNil10 } from "ramda";
|
|
25292
|
+
var unEnumerableKeys = ["srfkey", "srfmajortext"];
|
|
25277
25293
|
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
25294
|
/**
|
|
25352
25295
|
* Creates an instance of ControlVO.
|
|
25353
25296
|
* @author lxm
|
|
@@ -25366,6 +25309,58 @@ var ControlVO = class _ControlVO {
|
|
|
25366
25309
|
configurable: true,
|
|
25367
25310
|
value: $dataUIMap || /* @__PURE__ */ new Map()
|
|
25368
25311
|
});
|
|
25312
|
+
Object.defineProperty(this, "srfuf", {
|
|
25313
|
+
get() {
|
|
25314
|
+
if (isNil10(this.$origin.srfuf)) {
|
|
25315
|
+
return this.srfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
25316
|
+
}
|
|
25317
|
+
return this.$origin.srfuf;
|
|
25318
|
+
},
|
|
25319
|
+
enumerable: false,
|
|
25320
|
+
configurable: true
|
|
25321
|
+
});
|
|
25322
|
+
Object.defineProperty(this, "srfkey", {
|
|
25323
|
+
get() {
|
|
25324
|
+
return this.$origin.srfkey;
|
|
25325
|
+
},
|
|
25326
|
+
enumerable: false,
|
|
25327
|
+
configurable: true
|
|
25328
|
+
});
|
|
25329
|
+
Object.defineProperty(this, "srfmajortext", {
|
|
25330
|
+
get() {
|
|
25331
|
+
return this.$origin.srfmajortext;
|
|
25332
|
+
},
|
|
25333
|
+
enumerable: false,
|
|
25334
|
+
configurable: true
|
|
25335
|
+
});
|
|
25336
|
+
Object.defineProperty(this, "srfdeid", {
|
|
25337
|
+
get() {
|
|
25338
|
+
return this.$origin.srfdeid;
|
|
25339
|
+
},
|
|
25340
|
+
enumerable: false,
|
|
25341
|
+
configurable: true
|
|
25342
|
+
});
|
|
25343
|
+
Object.defineProperty(this, "srfdecodename", {
|
|
25344
|
+
get() {
|
|
25345
|
+
return this.$origin.srfdecodename;
|
|
25346
|
+
},
|
|
25347
|
+
enumerable: false,
|
|
25348
|
+
configurable: true
|
|
25349
|
+
});
|
|
25350
|
+
Object.defineProperty(this, "srfkeyfile", {
|
|
25351
|
+
get() {
|
|
25352
|
+
return this.$origin.srfkeyfile;
|
|
25353
|
+
},
|
|
25354
|
+
enumerable: false,
|
|
25355
|
+
configurable: true
|
|
25356
|
+
});
|
|
25357
|
+
Object.defineProperty(this, "srfmajorfile", {
|
|
25358
|
+
get() {
|
|
25359
|
+
return this.$origin.srfmajorfile;
|
|
25360
|
+
},
|
|
25361
|
+
enumerable: false,
|
|
25362
|
+
configurable: true
|
|
25363
|
+
});
|
|
25369
25364
|
this.$dataUIMap.forEach((mapField, key) => {
|
|
25370
25365
|
const value = mapField.dataKey;
|
|
25371
25366
|
this.linkProperty(key, value, mapField);
|
|
@@ -25395,7 +25390,7 @@ var ControlVO = class _ControlVO {
|
|
|
25395
25390
|
}
|
|
25396
25391
|
if (isOriginField || Object.prototype.hasOwnProperty.call(this.$origin, uiKey)) {
|
|
25397
25392
|
Object.defineProperty(this, uiKey, {
|
|
25398
|
-
enumerable:
|
|
25393
|
+
enumerable: !unEnumerableKeys.includes(uiKey),
|
|
25399
25394
|
configurable: true,
|
|
25400
25395
|
get() {
|
|
25401
25396
|
return uiKey === "srfkey" ? this.$origin[dataKey] || this.$origin[uiKey] : this.$origin[dataKey];
|
|
@@ -25518,7 +25513,7 @@ var ControlService = class {
|
|
|
25518
25513
|
* @returns {*} {IHttpResponse}
|
|
25519
25514
|
*/
|
|
25520
25515
|
handleResponse(res) {
|
|
25521
|
-
return res;
|
|
25516
|
+
return clone12(res);
|
|
25522
25517
|
}
|
|
25523
25518
|
/**
|
|
25524
25519
|
* 实体数据转ui数据
|
|
@@ -26404,7 +26399,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
26404
26399
|
* @return {*} {(Promise<IModalData | void>)}
|
|
26405
26400
|
*/
|
|
26406
26401
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
26407
|
-
const context =
|
|
26402
|
+
const context = clone13(_context);
|
|
26408
26403
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
26409
26404
|
if (!appView) {
|
|
26410
26405
|
throw new RuntimeError17("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -26723,7 +26718,7 @@ var Application = class {
|
|
|
26723
26718
|
async init() {
|
|
26724
26719
|
await this.authority.init();
|
|
26725
26720
|
await this.loadAppModelStyle();
|
|
26726
|
-
if (ibiz.env.enableMqtt) {
|
|
26721
|
+
if (ibiz.env.enableMqtt && ibiz.appData) {
|
|
26727
26722
|
this.mqtt = new MqttService(
|
|
26728
26723
|
ibiz.appData.mqtttopic,
|
|
26729
26724
|
getToken(),
|
|
@@ -28279,6 +28274,8 @@ var ViewController = class extends BaseController {
|
|
|
28279
28274
|
const ins = ibiz.engine.getEngine(engine, this);
|
|
28280
28275
|
if (ins) {
|
|
28281
28276
|
this.engines.push(ins);
|
|
28277
|
+
} else {
|
|
28278
|
+
ibiz.log.warn("\u672A\u627E\u5230\u89C6\u56FE\u5F15\u64CE\u5B9E\u73B0\uFF1A", engine);
|
|
28282
28279
|
}
|
|
28283
28280
|
});
|
|
28284
28281
|
} else {
|
|
@@ -29730,7 +29727,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
29730
29727
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
29731
29728
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
29732
29729
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
29733
|
-
import { clone as
|
|
29730
|
+
import { clone as clone14, isNil as isNil19, mergeDeepRight } from "ramda";
|
|
29734
29731
|
dayjs3.extend(minMax);
|
|
29735
29732
|
dayjs3.extend(isSameOrBefore);
|
|
29736
29733
|
dayjs3.extend(quarterOfYear);
|
|
@@ -29953,7 +29950,7 @@ var BaseSeriesGenerator = class {
|
|
|
29953
29950
|
dataPreprocess(data) {
|
|
29954
29951
|
const tempData = [];
|
|
29955
29952
|
data.forEach((singleData) => {
|
|
29956
|
-
tempData.push(
|
|
29953
|
+
tempData.push(clone14(singleData));
|
|
29957
29954
|
});
|
|
29958
29955
|
const { groupMode } = this.model;
|
|
29959
29956
|
if (groupMode) {
|
|
@@ -30973,7 +30970,7 @@ import { ModelError as ModelError18, RuntimeModelError as RuntimeModelError28 }
|
|
|
30973
30970
|
|
|
30974
30971
|
// src/ui-logic/utils/handle-src-val.ts
|
|
30975
30972
|
import { ModelError as ModelError17 } from "@ibiz-template/core";
|
|
30976
|
-
import { clone as
|
|
30973
|
+
import { clone as clone15 } from "ramda";
|
|
30977
30974
|
function handleSrcVal2(ctx, srcValParams) {
|
|
30978
30975
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
30979
30976
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -31000,21 +30997,25 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
31000
30997
|
value = ctx.parameters.context;
|
|
31001
30998
|
break;
|
|
31002
30999
|
case "ENVPARAM":
|
|
31003
|
-
value =
|
|
31000
|
+
value = clone15(ibiz.env);
|
|
31004
31001
|
break;
|
|
31005
31002
|
default:
|
|
31006
31003
|
throw new ModelError17(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
31007
31004
|
}
|
|
31008
31005
|
if (value && srcField) {
|
|
31009
31006
|
try {
|
|
31010
|
-
|
|
31011
|
-
|
|
31012
|
-
|
|
31013
|
-
|
|
31014
|
-
|
|
31015
|
-
|
|
31016
|
-
|
|
31017
|
-
|
|
31007
|
+
if (Array.isArray(value)) {
|
|
31008
|
+
value = value[Number(srcField)];
|
|
31009
|
+
} else {
|
|
31010
|
+
value = ScriptFactory.execScriptFn(
|
|
31011
|
+
{ srcValue: value },
|
|
31012
|
+
"srcValue.".concat(srcField),
|
|
31013
|
+
{
|
|
31014
|
+
singleRowReturn: true,
|
|
31015
|
+
isAsync: false
|
|
31016
|
+
}
|
|
31017
|
+
);
|
|
31018
|
+
}
|
|
31018
31019
|
} catch (error) {
|
|
31019
31020
|
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
31020
31021
|
throw error;
|
|
@@ -31351,7 +31352,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
31351
31352
|
|
|
31352
31353
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
31353
31354
|
import { ModelError as ModelError21, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
31354
|
-
import { clone as
|
|
31355
|
+
import { clone as clone16 } from "ramda";
|
|
31355
31356
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
31356
31357
|
async exec(ctx) {
|
|
31357
31358
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -31440,7 +31441,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
31440
31441
|
copyParam(nodeParam, ctx) {
|
|
31441
31442
|
const { dstDEUILogicParamId } = nodeParam;
|
|
31442
31443
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
31443
|
-
ctx.params[dstDEUILogicParamId] =
|
|
31444
|
+
ctx.params[dstDEUILogicParamId] = clone16(srcVal);
|
|
31444
31445
|
}
|
|
31445
31446
|
/**
|
|
31446
31447
|
* 绑定参数
|
|
@@ -31657,7 +31658,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
31657
31658
|
|
|
31658
31659
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
31659
31660
|
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
31660
|
-
import { clone as
|
|
31661
|
+
import { clone as clone17 } from "ramda";
|
|
31661
31662
|
var CopyParamNode2 = class extends UILogicNode {
|
|
31662
31663
|
async exec(ctx) {
|
|
31663
31664
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -31668,7 +31669,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
31668
31669
|
);
|
|
31669
31670
|
}
|
|
31670
31671
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
31671
|
-
ctx.params[dstDEUILogicParamId] =
|
|
31672
|
+
ctx.params[dstDEUILogicParamId] = clone17(srcVal);
|
|
31672
31673
|
}
|
|
31673
31674
|
};
|
|
31674
31675
|
|
|
@@ -32306,6 +32307,11 @@ var UIActionProviderBase = class {
|
|
|
32306
32307
|
async handleParams(action, context, data, params) {
|
|
32307
32308
|
let resultData = [];
|
|
32308
32309
|
const deName = calcDeCodeNameById(action.appDataEntityId);
|
|
32310
|
+
const entity = await ibiz.hub.getAppDataEntity(
|
|
32311
|
+
action.appDataEntityId,
|
|
32312
|
+
context.srfappid
|
|
32313
|
+
);
|
|
32314
|
+
const keyField = entity.keyAppDEFieldId;
|
|
32309
32315
|
switch (action.actionTarget) {
|
|
32310
32316
|
case "NONE":
|
|
32311
32317
|
resultData = [];
|
|
@@ -32317,12 +32323,12 @@ var UIActionProviderBase = class {
|
|
|
32317
32323
|
resultData = data;
|
|
32318
32324
|
break;
|
|
32319
32325
|
case "MULTIKEY":
|
|
32320
|
-
resultData = deName && data.length > 0 ? data.map((item) => ({ [
|
|
32326
|
+
resultData = deName && data.length > 0 ? data.map((item) => ({ [keyField]: item.srfkey || item[keyField] })) : [{}];
|
|
32321
32327
|
break;
|
|
32322
32328
|
case "SINGLEKEY":
|
|
32323
32329
|
{
|
|
32324
32330
|
const originData = data[0] || {};
|
|
32325
|
-
resultData = deName ? [{ [
|
|
32331
|
+
resultData = deName ? [{ [keyField]: originData.srfkey || originData[keyField] }] : [{}];
|
|
32326
32332
|
}
|
|
32327
32333
|
break;
|
|
32328
32334
|
default:
|
|
@@ -33256,6 +33262,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
33256
33262
|
this.state.noSort = this.model.noSort === true;
|
|
33257
33263
|
this.state.size = this.model.pagingSize || 20;
|
|
33258
33264
|
this.state.singleSelect = this.model.singleSelect === true;
|
|
33265
|
+
this.state.sortItems = [];
|
|
33259
33266
|
}
|
|
33260
33267
|
/**
|
|
33261
33268
|
* 初始化
|
|
@@ -33267,6 +33274,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
33267
33274
|
async onCreated() {
|
|
33268
33275
|
await super.onCreated();
|
|
33269
33276
|
await this.initControlService();
|
|
33277
|
+
this.initSortItems();
|
|
33270
33278
|
}
|
|
33271
33279
|
/**
|
|
33272
33280
|
* 初始化部件服务
|
|
@@ -33615,6 +33623,44 @@ var DataViewControlController = class extends MDControlController {
|
|
|
33615
33623
|
event
|
|
33616
33624
|
});
|
|
33617
33625
|
}
|
|
33626
|
+
/**
|
|
33627
|
+
* 初始化排序项集合
|
|
33628
|
+
* @author lxm
|
|
33629
|
+
* @date 2023-10-24 06:11:02
|
|
33630
|
+
* @return {*} {void}
|
|
33631
|
+
*/
|
|
33632
|
+
initSortItems() {
|
|
33633
|
+
var _a;
|
|
33634
|
+
if (!((_a = this.model.dedataViewItems) == null ? void 0 : _a.length)) {
|
|
33635
|
+
return;
|
|
33636
|
+
}
|
|
33637
|
+
const sortItems = [];
|
|
33638
|
+
const { minorSortAppDEFieldId, minorSortDir } = this.model;
|
|
33639
|
+
const hasDefaultSort = minorSortAppDEFieldId && minorSortDir;
|
|
33640
|
+
this.model.dedataViewItems.forEach((item) => {
|
|
33641
|
+
if (!item.enableSort) {
|
|
33642
|
+
return;
|
|
33643
|
+
}
|
|
33644
|
+
let { caption } = item;
|
|
33645
|
+
if (item.capLanguageRes) {
|
|
33646
|
+
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
33647
|
+
}
|
|
33648
|
+
if (!item.appDEFieldId) {
|
|
33649
|
+
throw new RuntimeModelError48(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
|
|
33650
|
+
}
|
|
33651
|
+
const tempItem = {
|
|
33652
|
+
caption,
|
|
33653
|
+
key: item.appDEFieldId
|
|
33654
|
+
};
|
|
33655
|
+
if (hasDefaultSort && minorSortAppDEFieldId === item.appDEFieldId) {
|
|
33656
|
+
tempItem.order = minorSortDir.toLowerCase();
|
|
33657
|
+
}
|
|
33658
|
+
sortItems.push(tempItem);
|
|
33659
|
+
});
|
|
33660
|
+
if (sortItems.length > 0) {
|
|
33661
|
+
this.state.sortItems = sortItems;
|
|
33662
|
+
}
|
|
33663
|
+
}
|
|
33618
33664
|
};
|
|
33619
33665
|
|
|
33620
33666
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
@@ -35743,7 +35789,7 @@ import {
|
|
|
35743
35789
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
35744
35790
|
} from "@ibiz-template/core";
|
|
35745
35791
|
import { debounce } from "lodash-es";
|
|
35746
|
-
import { clone as
|
|
35792
|
+
import { clone as clone18 } from "ramda";
|
|
35747
35793
|
|
|
35748
35794
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
35749
35795
|
import {
|
|
@@ -36090,8 +36136,8 @@ var EditFormController = class extends FormController {
|
|
|
36090
36136
|
* @return {*} {Promise<IData>}
|
|
36091
36137
|
*/
|
|
36092
36138
|
async copy() {
|
|
36093
|
-
const context =
|
|
36094
|
-
const queryParams =
|
|
36139
|
+
const context = clone18(this.context);
|
|
36140
|
+
const queryParams = clone18(this.params);
|
|
36095
36141
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
36096
36142
|
this.model.appDataEntityId
|
|
36097
36143
|
);
|
|
@@ -36146,7 +36192,7 @@ var EditFormController = class extends FormController {
|
|
|
36146
36192
|
return this.loadDraft();
|
|
36147
36193
|
}
|
|
36148
36194
|
const { context, params } = this.handlerAbilityParams(args);
|
|
36149
|
-
const queryParams =
|
|
36195
|
+
const queryParams = clone18(params);
|
|
36150
36196
|
let res;
|
|
36151
36197
|
try {
|
|
36152
36198
|
await this.startLoading();
|
|
@@ -37410,7 +37456,7 @@ import {
|
|
|
37410
37456
|
RuntimeError as RuntimeError45,
|
|
37411
37457
|
RuntimeModelError as RuntimeModelError53
|
|
37412
37458
|
} from "@ibiz-template/core";
|
|
37413
|
-
import { clone as
|
|
37459
|
+
import { clone as clone19 } from "ramda";
|
|
37414
37460
|
|
|
37415
37461
|
// src/controller/control/grid/grid/grid.service.ts
|
|
37416
37462
|
var GridService = class extends MDControlService {
|
|
@@ -38075,7 +38121,7 @@ var GridController = class extends MDControlController {
|
|
|
38075
38121
|
throw new RuntimeError45("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
38076
38122
|
}
|
|
38077
38123
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
38078
|
-
row.cacheData =
|
|
38124
|
+
row.cacheData = clone19(row.data);
|
|
38079
38125
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
38080
38126
|
Object.assign(row.data, defaultVal);
|
|
38081
38127
|
}
|
|
@@ -38192,7 +38238,7 @@ var GridController = class extends MDControlController {
|
|
|
38192
38238
|
codeListMap.set(key, items[key].codeListItems);
|
|
38193
38239
|
}
|
|
38194
38240
|
});
|
|
38195
|
-
const cloneData =
|
|
38241
|
+
const cloneData = clone19(
|
|
38196
38242
|
data2.map((item) => {
|
|
38197
38243
|
return item.getOrigin();
|
|
38198
38244
|
})
|
|
@@ -38303,7 +38349,7 @@ var GridController = class extends MDControlController {
|
|
|
38303
38349
|
import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
38304
38350
|
import dayjs4 from "dayjs";
|
|
38305
38351
|
import { debounce as debounce2 } from "lodash-es";
|
|
38306
|
-
import { clone as
|
|
38352
|
+
import { clone as clone20, isNil as isNil21 } from "ramda";
|
|
38307
38353
|
var GridFieldColumnController = class extends GridColumnController {
|
|
38308
38354
|
constructor() {
|
|
38309
38355
|
super(...arguments);
|
|
@@ -38338,10 +38384,10 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
38338
38384
|
}
|
|
38339
38385
|
async onInit() {
|
|
38340
38386
|
await super.onInit();
|
|
38341
|
-
this.loadCodeList = debounce2(
|
|
38342
|
-
|
|
38343
|
-
|
|
38344
|
-
);
|
|
38387
|
+
this.loadCodeList = debounce2(this.loadCodeList, 300, {
|
|
38388
|
+
leading: true,
|
|
38389
|
+
trailing: false
|
|
38390
|
+
});
|
|
38345
38391
|
this.loadCodeList();
|
|
38346
38392
|
}
|
|
38347
38393
|
/**
|
|
@@ -38407,7 +38453,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
38407
38453
|
srfkey: value,
|
|
38408
38454
|
...wfContext
|
|
38409
38455
|
});
|
|
38410
|
-
const tempParams =
|
|
38456
|
+
const tempParams = clone20(this.params);
|
|
38411
38457
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
38412
38458
|
row.data,
|
|
38413
38459
|
tempContext,
|
|
@@ -42841,7 +42887,7 @@ var ViewEngineBase = class {
|
|
|
42841
42887
|
|
|
42842
42888
|
// src/engine/md-view.engine.ts
|
|
42843
42889
|
import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
42844
|
-
import { clone as
|
|
42890
|
+
import { clone as clone21 } from "ramda";
|
|
42845
42891
|
var MDViewEngine = class extends ViewEngineBase {
|
|
42846
42892
|
/**
|
|
42847
42893
|
* 多数据部件名称
|
|
@@ -43038,7 +43084,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
43038
43084
|
if (!openAppViewLogic) {
|
|
43039
43085
|
throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
43040
43086
|
}
|
|
43041
|
-
const params =
|
|
43087
|
+
const params = clone21(this.view.params);
|
|
43042
43088
|
if (copyMode) {
|
|
43043
43089
|
params.srfcopymode = copyMode;
|
|
43044
43090
|
}
|