@ibiz-template/runtime 0.2.2 → 0.2.4
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 +290 -133
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/base.controller.js +4 -4
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +7 -0
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +6 -2
- package/out/controller/control/form/form/form.controller.d.ts +9 -1
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +20 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts +32 -3
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +84 -8
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.js +2 -2
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +2 -2
- package/out/interface/service/i-data-entity/i-data-entity.d.ts +19 -2
- package/out/interface/service/i-data-entity/i-data-entity.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +11 -0
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/control-logic-scheduler.js +2 -2
- package/out/logic-scheduler/trigger/timer-trigger.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/timer-trigger.js +4 -1
- package/out/service/app-data-entity/app-data-entity.d.ts +3 -3
- package/out/service/app-data-entity/app-data-entity.d.ts.map +1 -1
- package/out/service/app-data-entity/app-data-entity.js +13 -12
- package/out/service/service/entity/de.service.d.ts +15 -3
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +20 -4
- package/out/service/vo/control.vo.d.ts +12 -4
- package/out/service/vo/control.vo.d.ts.map +1 -1
- package/out/service/vo/control.vo.js +88 -52
- package/package.json +3 -3
- package/src/controller/common/base.controller.ts +4 -4
- package/src/controller/common/control/control.controller.ts +11 -0
- package/src/controller/control/form/edit-form/edit-form.controller.ts +7 -2
- package/src/controller/control/form/form/form.controller.ts +26 -2
- package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +102 -8
- package/src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts +2 -2
- package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +2 -2
- package/src/interface/service/i-data-entity/i-data-entity.ts +22 -2
- package/src/interface/service/service/i-app-de.service.ts +16 -0
- package/src/logic-scheduler/scheduler/control-logic-scheduler.ts +2 -2
- package/src/logic-scheduler/trigger/timer-trigger.ts +4 -1
- package/src/service/app-data-entity/app-data-entity.ts +21 -16
- package/src/service/service/entity/de.service.ts +29 -5
- package/src/service/vo/control.vo.ts +101 -60
package/dist/index.esm.js
CHANGED
|
@@ -22944,6 +22944,7 @@ import { isArray as isArray3 } from "lodash-es";
|
|
|
22944
22944
|
// src/service/app-data-entity/app-data-entity.ts
|
|
22945
22945
|
import { clone as clone4, isNil as isNil7 } from "ramda";
|
|
22946
22946
|
import { DataTypes } from "@ibiz-template/core";
|
|
22947
|
+
import { createUUID as createUUID2 } from "qx-util";
|
|
22947
22948
|
|
|
22948
22949
|
// src/service/constant/srfuf.ts
|
|
22949
22950
|
var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
|
|
@@ -22955,7 +22956,7 @@ var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
|
|
|
22955
22956
|
// src/service/app-data-entity/app-data-entity.ts
|
|
22956
22957
|
var AppDataEntity = class _AppDataEntity {
|
|
22957
22958
|
get srfuf() {
|
|
22958
|
-
return this.srfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
22959
|
+
return this.srfkey === this.tempsrfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
22959
22960
|
}
|
|
22960
22961
|
/**
|
|
22961
22962
|
* Creates an instance of AppDataEntity.
|
|
@@ -22966,7 +22967,6 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
22966
22967
|
* @param {(IData | AppDataEntity)} data
|
|
22967
22968
|
*/
|
|
22968
22969
|
constructor(entity, data) {
|
|
22969
|
-
let _srfkey;
|
|
22970
22970
|
Object.defineProperty(this, "_entity", {
|
|
22971
22971
|
enumerable: false,
|
|
22972
22972
|
configurable: true,
|
|
@@ -22993,20 +22993,12 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
22993
22993
|
);
|
|
22994
22994
|
if (keyAppField) {
|
|
22995
22995
|
const key = keyAppField.codeName.toLowerCase();
|
|
22996
|
-
Object.defineProperty(this, "
|
|
22996
|
+
Object.defineProperty(this, "srfkeyfield", {
|
|
22997
22997
|
get() {
|
|
22998
22998
|
return key;
|
|
22999
22999
|
}
|
|
23000
23000
|
});
|
|
23001
23001
|
Object.defineProperty(this, "srfkey", {
|
|
23002
|
-
set(val) {
|
|
23003
|
-
_srfkey = val;
|
|
23004
|
-
},
|
|
23005
|
-
get() {
|
|
23006
|
-
return this._data[key] || _srfkey;
|
|
23007
|
-
}
|
|
23008
|
-
});
|
|
23009
|
-
Object.defineProperty(this, "srfsourcekey", {
|
|
23010
23002
|
set(val) {
|
|
23011
23003
|
this._data[key] = val;
|
|
23012
23004
|
},
|
|
@@ -23023,7 +23015,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
23023
23015
|
);
|
|
23024
23016
|
if (majorAppField) {
|
|
23025
23017
|
const major = majorAppField.codeName.toLowerCase();
|
|
23026
|
-
Object.defineProperty(this, "
|
|
23018
|
+
Object.defineProperty(this, "srfmajorfield", {
|
|
23027
23019
|
get() {
|
|
23028
23020
|
return major;
|
|
23029
23021
|
}
|
|
@@ -23039,6 +23031,12 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
23039
23031
|
} else {
|
|
23040
23032
|
ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u6587\u672C\u5B57\u6BB5"));
|
|
23041
23033
|
}
|
|
23034
|
+
Object.defineProperty(this, "tempsrfkey", {
|
|
23035
|
+
enumerable: false,
|
|
23036
|
+
configurable: true,
|
|
23037
|
+
writable: true,
|
|
23038
|
+
value: isNil7(this.srfkey) ? createUUID2() : this.srfkey
|
|
23039
|
+
});
|
|
23042
23040
|
this.defineProperties();
|
|
23043
23041
|
}
|
|
23044
23042
|
/**
|
|
@@ -25268,17 +25266,33 @@ var DEService = class {
|
|
|
25268
25266
|
});
|
|
25269
25267
|
}
|
|
25270
25268
|
/**
|
|
25271
|
-
*
|
|
25269
|
+
* 获取 AI 聊天会话历史记录
|
|
25270
|
+
*
|
|
25271
|
+
* @author chitanda
|
|
25272
|
+
* @date 2023-10-26 14:10:58
|
|
25273
|
+
* @param {IParams} context
|
|
25274
|
+
* @param {IParams} [params={}]
|
|
25275
|
+
* @param {IData} [data={}]
|
|
25276
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
25277
|
+
*/
|
|
25278
|
+
aiChatHistory(context, params = {}, data = {}) {
|
|
25279
|
+
const app = ibiz.hub.getApp(this.model.appId);
|
|
25280
|
+
const path2 = this.calcSsePath(context, true);
|
|
25281
|
+
return app.net.post(path2, data, { srfactag: "AIChat", ...params });
|
|
25282
|
+
}
|
|
25283
|
+
/**
|
|
25284
|
+
* 计算 AI 请求路径
|
|
25272
25285
|
*
|
|
25273
25286
|
* @author chitanda
|
|
25274
|
-
* @date 2023-10-
|
|
25287
|
+
* @date 2023-10-26 14:10:25
|
|
25275
25288
|
* @protected
|
|
25276
25289
|
* @param {IParams} context
|
|
25290
|
+
* @param {boolean} [isHistories=false]
|
|
25277
25291
|
* @return {*} {string}
|
|
25278
25292
|
*/
|
|
25279
|
-
calcSsePath(context) {
|
|
25293
|
+
calcSsePath(context, isHistories = false) {
|
|
25280
25294
|
const srfkey = context[this.model.codeName.toLowerCase()];
|
|
25281
|
-
const curPath = "/".concat(this.model.codeName2.toLowerCase(), "/ssechatcompletion").concat(srfkey ? "/".concat(srfkey) : "");
|
|
25295
|
+
const curPath = "/".concat(this.model.codeName2.toLowerCase(), "/ssechatcompletion").concat(isHistories ? "/histories" : "").concat(srfkey ? "/".concat(srfkey) : "");
|
|
25282
25296
|
const resPath = calcResPath(context, this.model);
|
|
25283
25297
|
return resPath + curPath;
|
|
25284
25298
|
}
|
|
@@ -25288,8 +25302,18 @@ var DEService = class {
|
|
|
25288
25302
|
import { clone as clone12 } from "@ibiz-template/core";
|
|
25289
25303
|
|
|
25290
25304
|
// src/service/vo/control.vo.ts
|
|
25305
|
+
import { createUUID as createUUID3 } from "qx-util";
|
|
25291
25306
|
import { clone as clone11, isNil as isNil10 } from "ramda";
|
|
25292
|
-
var
|
|
25307
|
+
var BuildInKeys = [
|
|
25308
|
+
"srfkey",
|
|
25309
|
+
"srfmajortext",
|
|
25310
|
+
"srfmajorfield",
|
|
25311
|
+
"srfkeyfield",
|
|
25312
|
+
"tempsrfkey",
|
|
25313
|
+
"srfuf",
|
|
25314
|
+
"srfdeid",
|
|
25315
|
+
"srfdecodename"
|
|
25316
|
+
];
|
|
25293
25317
|
var ControlVO = class _ControlVO {
|
|
25294
25318
|
/**
|
|
25295
25319
|
* Creates an instance of ControlVO.
|
|
@@ -25309,58 +25333,79 @@ var ControlVO = class _ControlVO {
|
|
|
25309
25333
|
configurable: true,
|
|
25310
25334
|
value: $dataUIMap || /* @__PURE__ */ new Map()
|
|
25311
25335
|
});
|
|
25336
|
+
["srfkey", "srfmajortext"].forEach((key) => {
|
|
25337
|
+
if (Object.prototype.hasOwnProperty.call(this.$origin, key)) {
|
|
25338
|
+
Object.defineProperty(this, key, {
|
|
25339
|
+
get() {
|
|
25340
|
+
return this.$origin.srfkey;
|
|
25341
|
+
},
|
|
25342
|
+
set(val) {
|
|
25343
|
+
this.$origin.srfkey = val;
|
|
25344
|
+
},
|
|
25345
|
+
enumerable: false,
|
|
25346
|
+
configurable: true
|
|
25347
|
+
});
|
|
25348
|
+
} else if (this.$dataUIMap.has(key)) {
|
|
25349
|
+
const { dataKey } = this.$dataUIMap.get(key);
|
|
25350
|
+
Object.defineProperty(this, key, {
|
|
25351
|
+
get() {
|
|
25352
|
+
return this.$origin[dataKey];
|
|
25353
|
+
},
|
|
25354
|
+
set(val) {
|
|
25355
|
+
this.$origin[dataKey] = val;
|
|
25356
|
+
},
|
|
25357
|
+
enumerable: false,
|
|
25358
|
+
configurable: true
|
|
25359
|
+
});
|
|
25360
|
+
} else {
|
|
25361
|
+
Object.defineProperty(this, key, {
|
|
25362
|
+
enumerable: false,
|
|
25363
|
+
configurable: true,
|
|
25364
|
+
writable: true,
|
|
25365
|
+
value: null
|
|
25366
|
+
});
|
|
25367
|
+
}
|
|
25368
|
+
});
|
|
25369
|
+
if (Object.prototype.hasOwnProperty.call(this.$origin, "tempsrfkey")) {
|
|
25370
|
+
Object.defineProperty(this, "tempsrfkey", {
|
|
25371
|
+
get() {
|
|
25372
|
+
return this.$origin.tempsrfkey;
|
|
25373
|
+
},
|
|
25374
|
+
set(val) {
|
|
25375
|
+
this.$origin.tempsrfkey = val;
|
|
25376
|
+
},
|
|
25377
|
+
enumerable: false,
|
|
25378
|
+
configurable: true
|
|
25379
|
+
});
|
|
25380
|
+
} else {
|
|
25381
|
+
Object.defineProperty(this, "tempsrfkey", {
|
|
25382
|
+
enumerable: false,
|
|
25383
|
+
configurable: true,
|
|
25384
|
+
writable: true,
|
|
25385
|
+
value: isNil10(this.srfkey) ? createUUID3() : this.srfkey
|
|
25386
|
+
});
|
|
25387
|
+
}
|
|
25312
25388
|
Object.defineProperty(this, "srfuf", {
|
|
25313
25389
|
get() {
|
|
25314
|
-
if (
|
|
25315
|
-
return this.
|
|
25390
|
+
if (Object.prototype.hasOwnProperty.call(this.$origin, "srfuf")) {
|
|
25391
|
+
return this.$origin.srfuf;
|
|
25316
25392
|
}
|
|
25317
|
-
return this
|
|
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;
|
|
25393
|
+
return this.srfkey === this.tempsrfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
25360
25394
|
},
|
|
25361
25395
|
enumerable: false,
|
|
25362
25396
|
configurable: true
|
|
25363
25397
|
});
|
|
25398
|
+
["srfdeid", "srfdecodename", "srfkeyfield", "srfmajorfield"].forEach(
|
|
25399
|
+
(key) => {
|
|
25400
|
+
Object.defineProperty(this, key, {
|
|
25401
|
+
get() {
|
|
25402
|
+
return this.$origin[key];
|
|
25403
|
+
},
|
|
25404
|
+
enumerable: false,
|
|
25405
|
+
configurable: true
|
|
25406
|
+
});
|
|
25407
|
+
}
|
|
25408
|
+
);
|
|
25364
25409
|
this.$dataUIMap.forEach((mapField, key) => {
|
|
25365
25410
|
const value = mapField.dataKey;
|
|
25366
25411
|
this.linkProperty(key, value, mapField);
|
|
@@ -25385,15 +25430,15 @@ var ControlVO = class _ControlVO {
|
|
|
25385
25430
|
*/
|
|
25386
25431
|
linkProperty(uiKey, dataKey, mapField) {
|
|
25387
25432
|
const isOriginField = mapField ? mapField.isOriginField : true;
|
|
25388
|
-
if (uiKey
|
|
25433
|
+
if (BuildInKeys.includes(uiKey)) {
|
|
25389
25434
|
return;
|
|
25390
25435
|
}
|
|
25391
25436
|
if (isOriginField || Object.prototype.hasOwnProperty.call(this.$origin, uiKey)) {
|
|
25392
25437
|
Object.defineProperty(this, uiKey, {
|
|
25393
|
-
enumerable:
|
|
25438
|
+
enumerable: true,
|
|
25394
25439
|
configurable: true,
|
|
25395
25440
|
get() {
|
|
25396
|
-
return
|
|
25441
|
+
return this.$origin[dataKey];
|
|
25397
25442
|
},
|
|
25398
25443
|
set(val) {
|
|
25399
25444
|
this.$origin[dataKey] = val;
|
|
@@ -26194,7 +26239,7 @@ var CalendarItemData = class {
|
|
|
26194
26239
|
};
|
|
26195
26240
|
|
|
26196
26241
|
// src/service/mqtt/mqtt.service.ts
|
|
26197
|
-
import { QXEvent as QXEvent2, createUUID as
|
|
26242
|
+
import { QXEvent as QXEvent2, createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
26198
26243
|
var MqttService = class {
|
|
26199
26244
|
/**
|
|
26200
26245
|
* Creates an instance of MqttService.
|
|
@@ -26226,7 +26271,7 @@ var MqttService = class {
|
|
|
26226
26271
|
// 超时时间
|
|
26227
26272
|
connectTimeout: 6e3,
|
|
26228
26273
|
// 认证信息
|
|
26229
|
-
clientId:
|
|
26274
|
+
clientId: createUUID4(),
|
|
26230
26275
|
username: "",
|
|
26231
26276
|
password: "",
|
|
26232
26277
|
// 心跳时间
|
|
@@ -26930,7 +26975,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
26930
26975
|
})(PanelNotifyState || {});
|
|
26931
26976
|
|
|
26932
26977
|
// src/controller/common/view/view.controller.ts
|
|
26933
|
-
import { createUUID as
|
|
26978
|
+
import { createUUID as createUUID6, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
26934
26979
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
26935
26980
|
import { isEmpty as isEmpty8, isNil as isNil17, isNotNil as isNotNil2 } from "ramda";
|
|
26936
26981
|
|
|
@@ -27725,7 +27770,7 @@ var ValueExUtil = class {
|
|
|
27725
27770
|
// src/controller/utils/value-default/value-default.ts
|
|
27726
27771
|
import { RuntimeError as RuntimeError23, ModelError as ModelError16 } from "@ibiz-template/core";
|
|
27727
27772
|
import dayjs from "dayjs";
|
|
27728
|
-
import { createUUID as
|
|
27773
|
+
import { createUUID as createUUID5 } from "qx-util";
|
|
27729
27774
|
import { isNil as isNil15, isNotNil } from "ramda";
|
|
27730
27775
|
function getDefaultValue(opts, origins) {
|
|
27731
27776
|
var _a;
|
|
@@ -27770,7 +27815,7 @@ function getDefaultValue(opts, origins) {
|
|
|
27770
27815
|
case "CONTEXT":
|
|
27771
27816
|
return params[defaultValue];
|
|
27772
27817
|
case "UNIQUEID":
|
|
27773
|
-
return
|
|
27818
|
+
return createUUID5();
|
|
27774
27819
|
default:
|
|
27775
27820
|
throw new ModelError16({}, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
|
|
27776
27821
|
}
|
|
@@ -27870,12 +27915,12 @@ var BaseController = class {
|
|
|
27870
27915
|
async created() {
|
|
27871
27916
|
this.mountCounter.enroll(SELF_KEY);
|
|
27872
27917
|
await this.onCreated();
|
|
27873
|
-
this.state.isCreated = true;
|
|
27874
27918
|
this.force(() => {
|
|
27875
27919
|
this.mountSelf();
|
|
27876
27920
|
});
|
|
27921
|
+
await this._evt.emit("onCreated", void 0);
|
|
27922
|
+
this.state.isCreated = true;
|
|
27877
27923
|
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onCreated"));
|
|
27878
|
-
this._evt.emit("onCreated", void 0);
|
|
27879
27924
|
}
|
|
27880
27925
|
/**
|
|
27881
27926
|
* 生命周期-创建完成,实际执行逻辑,子类重写用这个
|
|
@@ -27917,9 +27962,9 @@ var BaseController = class {
|
|
|
27917
27962
|
*/
|
|
27918
27963
|
async mounted() {
|
|
27919
27964
|
await this.onMounted();
|
|
27965
|
+
await this._evt.emit("onMounted", void 0);
|
|
27920
27966
|
this.state.isMounted = true;
|
|
27921
27967
|
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onMounted"));
|
|
27922
|
-
this._evt.emit("onMounted", void 0);
|
|
27923
27968
|
}
|
|
27924
27969
|
/**
|
|
27925
27970
|
* 生命周期-加载完成,实际执行逻辑,子类重写用这个
|
|
@@ -27936,9 +27981,9 @@ var BaseController = class {
|
|
|
27936
27981
|
*/
|
|
27937
27982
|
async destroyed() {
|
|
27938
27983
|
await this.onDestroyed();
|
|
27984
|
+
await this._evt.emit("onDestroyed", void 0);
|
|
27939
27985
|
this.state.isDestroyed = true;
|
|
27940
27986
|
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onDestroyed"));
|
|
27941
|
-
await this._evt.emit("onDestroyed", void 0);
|
|
27942
27987
|
this.evt.destroy();
|
|
27943
27988
|
}
|
|
27944
27989
|
/**
|
|
@@ -28395,7 +28440,7 @@ var ViewController = class extends BaseController {
|
|
|
28395
28440
|
handleContextParams() {
|
|
28396
28441
|
this.context.srfappid = this.model.appId;
|
|
28397
28442
|
if (isNil17(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
|
|
28398
|
-
this.context.srfsessionid =
|
|
28443
|
+
this.context.srfsessionid = createUUID6();
|
|
28399
28444
|
}
|
|
28400
28445
|
const navContexts = this.model.appViewNavContexts;
|
|
28401
28446
|
let context = {};
|
|
@@ -28781,6 +28826,7 @@ var ControlController = class extends BaseController {
|
|
|
28781
28826
|
this.state.isLoading = false;
|
|
28782
28827
|
}
|
|
28783
28828
|
async onCreated() {
|
|
28829
|
+
var _a;
|
|
28784
28830
|
await super.onCreated();
|
|
28785
28831
|
if (this.controlPanel) {
|
|
28786
28832
|
this.childNames.push(this.controlPanel.name);
|
|
@@ -28789,6 +28835,15 @@ var ControlController = class extends BaseController {
|
|
|
28789
28835
|
}
|
|
28790
28836
|
this.handleControlParams();
|
|
28791
28837
|
this.initControlScheduler(this.model.controlLogics);
|
|
28838
|
+
if ((_a = this.scheduler) == null ? void 0 : _a.hasControlEventTrigger) {
|
|
28839
|
+
this._evt.onAll((eventName, event) => {
|
|
28840
|
+
this.scheduler.triggerControlEvent(
|
|
28841
|
+
event.targetName,
|
|
28842
|
+
event.eventName,
|
|
28843
|
+
event
|
|
28844
|
+
);
|
|
28845
|
+
});
|
|
28846
|
+
}
|
|
28792
28847
|
}
|
|
28793
28848
|
async onMounted() {
|
|
28794
28849
|
var _a;
|
|
@@ -34279,7 +34334,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
34279
34334
|
import { mergeDefaultInLeft } from "@ibiz-template/core";
|
|
34280
34335
|
|
|
34281
34336
|
// src/controller/control/form/form/form.controller.ts
|
|
34282
|
-
import { debounceAndAsyncMerge } from "@ibiz-template/core";
|
|
34337
|
+
import { debounceAndAsyncMerge, recursiveIterate as recursiveIterate2 } from "@ibiz-template/core";
|
|
34283
34338
|
var FormController = class extends ControlController {
|
|
34284
34339
|
constructor() {
|
|
34285
34340
|
super(...arguments);
|
|
@@ -34469,10 +34524,32 @@ var FormController = class extends ControlController {
|
|
|
34469
34524
|
actionNotification(tag, opts) {
|
|
34470
34525
|
super.actionNotification(tag, { data: this.data, ...opts || {} });
|
|
34471
34526
|
}
|
|
34527
|
+
/**
|
|
34528
|
+
* 初始化部件逻辑调度器
|
|
34529
|
+
* @author lxm
|
|
34530
|
+
* @date 2023-08-21 11:53:37
|
|
34531
|
+
* @param {IControlLogic[]} logics
|
|
34532
|
+
* @return {*} {void}
|
|
34533
|
+
*/
|
|
34534
|
+
initControlScheduler(logics = []) {
|
|
34535
|
+
const actualLogics = [...logics];
|
|
34536
|
+
recursiveIterate2(
|
|
34537
|
+
this.model,
|
|
34538
|
+
(item) => {
|
|
34539
|
+
if (item.controlLogics) {
|
|
34540
|
+
actualLogics.push(...item.controlLogics);
|
|
34541
|
+
}
|
|
34542
|
+
},
|
|
34543
|
+
{
|
|
34544
|
+
childrenFields: ["deformPages", "deformTabPages", "deformDetails"]
|
|
34545
|
+
}
|
|
34546
|
+
);
|
|
34547
|
+
super.initControlScheduler(actualLogics);
|
|
34548
|
+
}
|
|
34472
34549
|
};
|
|
34473
34550
|
|
|
34474
34551
|
// src/controller/control/form/search-form/search-form.service.ts
|
|
34475
|
-
import { recursiveIterate as
|
|
34552
|
+
import { recursiveIterate as recursiveIterate3 } from "@ibiz-template/core";
|
|
34476
34553
|
var SearchFormService = class extends ControlService {
|
|
34477
34554
|
/**
|
|
34478
34555
|
* 执行获取草稿方法
|
|
@@ -34496,7 +34573,7 @@ var SearchFormService = class extends ControlService {
|
|
|
34496
34573
|
* @date 2022-08-31 18:08:37
|
|
34497
34574
|
*/
|
|
34498
34575
|
initUIDataMap() {
|
|
34499
|
-
|
|
34576
|
+
recursiveIterate3(
|
|
34500
34577
|
this.model,
|
|
34501
34578
|
(item) => {
|
|
34502
34579
|
if (item.detailType === "FORMITEM") {
|
|
@@ -34734,6 +34811,29 @@ var FormDetailState = class {
|
|
|
34734
34811
|
// src/controller/control/form/form-detail/form-detail/form-detail.controller.ts
|
|
34735
34812
|
import { isOverlap } from "@ibiz-template/core";
|
|
34736
34813
|
var FormDetailController = class {
|
|
34814
|
+
/**
|
|
34815
|
+
* Creates an instance of FormDetailController.
|
|
34816
|
+
* @author lxm
|
|
34817
|
+
* @date 2022-08-24 20:08:22
|
|
34818
|
+
* @param {T} model
|
|
34819
|
+
*/
|
|
34820
|
+
constructor(model, form, parent) {
|
|
34821
|
+
/**
|
|
34822
|
+
* 动态逻辑结果
|
|
34823
|
+
* @author lxm
|
|
34824
|
+
* @date 2023-09-21 03:36:37
|
|
34825
|
+
* @protected
|
|
34826
|
+
*/
|
|
34827
|
+
this.dynaLogicResult = {
|
|
34828
|
+
visible: true,
|
|
34829
|
+
disabled: false,
|
|
34830
|
+
required: false
|
|
34831
|
+
};
|
|
34832
|
+
this.model = model;
|
|
34833
|
+
this.form = form;
|
|
34834
|
+
this.parent = parent;
|
|
34835
|
+
this.state = this.createState();
|
|
34836
|
+
}
|
|
34737
34837
|
/**
|
|
34738
34838
|
* 表单数据
|
|
34739
34839
|
*
|
|
@@ -34764,18 +34864,6 @@ var FormDetailController = class {
|
|
|
34764
34864
|
get labelClass() {
|
|
34765
34865
|
return [...this.state.class.label, ...this.state.class.labelDyna];
|
|
34766
34866
|
}
|
|
34767
|
-
/**
|
|
34768
|
-
* Creates an instance of FormDetailController.
|
|
34769
|
-
* @author lxm
|
|
34770
|
-
* @date 2022-08-24 20:08:22
|
|
34771
|
-
* @param {T} model
|
|
34772
|
-
*/
|
|
34773
|
-
constructor(model, form, parent) {
|
|
34774
|
-
this.model = model;
|
|
34775
|
-
this.form = form;
|
|
34776
|
-
this.parent = parent;
|
|
34777
|
-
this.state = this.createState();
|
|
34778
|
-
}
|
|
34779
34867
|
/**
|
|
34780
34868
|
* 子类不可覆盖或重写此方法,在 init 时需要重写的使用 onInit 方法。
|
|
34781
34869
|
*
|
|
@@ -34822,6 +34910,9 @@ var FormDetailController = class {
|
|
|
34822
34910
|
*/
|
|
34823
34911
|
async dataChangeNotify(names) {
|
|
34824
34912
|
this.calcDynamicLogic(names);
|
|
34913
|
+
this.calcDetailDisabled(this.data);
|
|
34914
|
+
this.calcDetailVisible(this.data);
|
|
34915
|
+
this.calcDetailRequired(this.data);
|
|
34825
34916
|
this.calcDynaClass(this.data);
|
|
34826
34917
|
}
|
|
34827
34918
|
/**
|
|
@@ -34830,8 +34921,11 @@ var FormDetailController = class {
|
|
|
34830
34921
|
* @author lxm
|
|
34831
34922
|
* @date 2022-09-20 18:09:07
|
|
34832
34923
|
*/
|
|
34833
|
-
async formStateNotify(
|
|
34834
|
-
this.calcDynamicLogic([],
|
|
34924
|
+
async formStateNotify(_state) {
|
|
34925
|
+
this.calcDynamicLogic([], true);
|
|
34926
|
+
this.calcDetailDisabled(this.data);
|
|
34927
|
+
this.calcDetailVisible(this.data);
|
|
34928
|
+
this.calcDetailRequired(this.data);
|
|
34835
34929
|
this.calcDynaClass(this.data);
|
|
34836
34930
|
}
|
|
34837
34931
|
/**
|
|
@@ -34841,28 +34935,28 @@ var FormDetailController = class {
|
|
|
34841
34935
|
* @date 2022-09-20 19:09:20
|
|
34842
34936
|
* @protected
|
|
34843
34937
|
* @param {string[]} names 变更的属性集合
|
|
34844
|
-
* @param {
|
|
34938
|
+
* @param {boolean} [mustCalc=false] 是否强制计算一遍动态逻辑
|
|
34845
34939
|
* @returns {*} {void}
|
|
34846
34940
|
*/
|
|
34847
|
-
calcDynamicLogic(names,
|
|
34941
|
+
calcDynamicLogic(names, mustCalc = false) {
|
|
34848
34942
|
var _a;
|
|
34849
34943
|
if (this.parent && !this.parent.state.visible) {
|
|
34850
34944
|
return;
|
|
34851
34945
|
}
|
|
34852
34946
|
(_a = this.model.defdgroupLogics) == null ? void 0 : _a.forEach((logic) => {
|
|
34853
34947
|
const relatedNames = logic.relatedDetailNames || [];
|
|
34854
|
-
if (
|
|
34948
|
+
if (mustCalc || isOverlap(relatedNames, names)) {
|
|
34855
34949
|
try {
|
|
34856
34950
|
const ok = verifyFormGroupLogic(this.form.data, logic);
|
|
34857
34951
|
switch (logic.logicCat) {
|
|
34858
34952
|
case "ITEMBLANK":
|
|
34859
|
-
this.
|
|
34953
|
+
this.dynaLogicResult.required = !ok;
|
|
34860
34954
|
break;
|
|
34861
34955
|
case "ITEMENABLE":
|
|
34862
|
-
this.
|
|
34956
|
+
this.dynaLogicResult.disabled = !ok;
|
|
34863
34957
|
break;
|
|
34864
34958
|
case "PANELVISIBLE":
|
|
34865
|
-
this.
|
|
34959
|
+
this.dynaLogicResult.visible = ok;
|
|
34866
34960
|
break;
|
|
34867
34961
|
default:
|
|
34868
34962
|
}
|
|
@@ -34901,6 +34995,63 @@ var FormDetailController = class {
|
|
|
34901
34995
|
}
|
|
34902
34996
|
}
|
|
34903
34997
|
}
|
|
34998
|
+
/**
|
|
34999
|
+
* 计算项的禁用状态
|
|
35000
|
+
*
|
|
35001
|
+
* @param {IData} data
|
|
35002
|
+
*/
|
|
35003
|
+
calcDetailDisabled(data) {
|
|
35004
|
+
let enable = !this.dynaLogicResult.disabled;
|
|
35005
|
+
if (enable && this.form.scheduler) {
|
|
35006
|
+
const itemEnable = this.form.scheduler.triggerItemEnable(this.model.id, {
|
|
35007
|
+
data: [data]
|
|
35008
|
+
});
|
|
35009
|
+
if (itemEnable !== void 0) {
|
|
35010
|
+
enable = itemEnable;
|
|
35011
|
+
}
|
|
35012
|
+
}
|
|
35013
|
+
this.state.disabled = !enable;
|
|
35014
|
+
}
|
|
35015
|
+
/**
|
|
35016
|
+
* 计算项的显示状态
|
|
35017
|
+
*
|
|
35018
|
+
* @param {IData} data
|
|
35019
|
+
*/
|
|
35020
|
+
calcDetailVisible(data) {
|
|
35021
|
+
let { visible } = this.dynaLogicResult;
|
|
35022
|
+
if (visible && this.form.scheduler) {
|
|
35023
|
+
const itemVIsible = this.form.scheduler.triggerItemVisible(
|
|
35024
|
+
this.model.id,
|
|
35025
|
+
{
|
|
35026
|
+
data: [data]
|
|
35027
|
+
}
|
|
35028
|
+
);
|
|
35029
|
+
if (itemVIsible !== void 0) {
|
|
35030
|
+
visible = itemVIsible;
|
|
35031
|
+
}
|
|
35032
|
+
}
|
|
35033
|
+
this.state.visible = visible;
|
|
35034
|
+
}
|
|
35035
|
+
/**
|
|
35036
|
+
* 计算项的必填状态
|
|
35037
|
+
*
|
|
35038
|
+
* @param {IData} data
|
|
35039
|
+
*/
|
|
35040
|
+
calcDetailRequired(data) {
|
|
35041
|
+
let allowEmpty = !this.dynaLogicResult.required;
|
|
35042
|
+
if (allowEmpty && this.form.scheduler) {
|
|
35043
|
+
const itemAllowEmpty = this.form.scheduler.triggerItemBlank(
|
|
35044
|
+
this.model.id,
|
|
35045
|
+
{
|
|
35046
|
+
data: [data]
|
|
35047
|
+
}
|
|
35048
|
+
);
|
|
35049
|
+
if (itemAllowEmpty !== void 0) {
|
|
35050
|
+
allowEmpty = itemAllowEmpty;
|
|
35051
|
+
}
|
|
35052
|
+
}
|
|
35053
|
+
this.state.required = !allowEmpty;
|
|
35054
|
+
}
|
|
34904
35055
|
};
|
|
34905
35056
|
|
|
34906
35057
|
// src/controller/control/form/form-detail/form-button/form-button.state.ts
|
|
@@ -34989,7 +35140,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
34989
35140
|
|
|
34990
35141
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
34991
35142
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
34992
|
-
import { createUUID as
|
|
35143
|
+
import { createUUID as createUUID7, notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
34993
35144
|
|
|
34994
35145
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
34995
35146
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -35102,7 +35253,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
35102
35253
|
this.form.context
|
|
35103
35254
|
);
|
|
35104
35255
|
if (!this.state.viewComponentKey) {
|
|
35105
|
-
this.state.viewComponentKey =
|
|
35256
|
+
this.state.viewComponentKey = createUUID7();
|
|
35106
35257
|
this.navContext = newContext;
|
|
35107
35258
|
this.navParams = newParams;
|
|
35108
35259
|
} else if (JSON.stringify(this.navContext) !== JSON.stringify(newContext) || JSON.stringify(this.navParams) !== JSON.stringify(newParams)) {
|
|
@@ -35198,8 +35349,8 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
35198
35349
|
super.onInit();
|
|
35199
35350
|
await this.initActionStates();
|
|
35200
35351
|
}
|
|
35201
|
-
async formStateNotify(
|
|
35202
|
-
super.calcDynamicLogic([],
|
|
35352
|
+
async formStateNotify(_state) {
|
|
35353
|
+
super.calcDynamicLogic([], true);
|
|
35203
35354
|
if (this.state.actionGroupState) {
|
|
35204
35355
|
this.state.actionGroupState.update(this.form.data.getOrigin());
|
|
35205
35356
|
}
|
|
@@ -35481,9 +35632,9 @@ var FormItemController = class extends FormDetailController {
|
|
|
35481
35632
|
this.setDefaultValue(false);
|
|
35482
35633
|
}
|
|
35483
35634
|
}
|
|
35484
|
-
calcDynamicLogic(names,
|
|
35635
|
+
calcDynamicLogic(names, mustCalc = false) {
|
|
35485
35636
|
if (!this.model.hidden) {
|
|
35486
|
-
super.calcDynamicLogic(names,
|
|
35637
|
+
super.calcDynamicLogic(names, mustCalc);
|
|
35487
35638
|
}
|
|
35488
35639
|
}
|
|
35489
35640
|
/**
|
|
@@ -35789,11 +35940,12 @@ import {
|
|
|
35789
35940
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
35790
35941
|
} from "@ibiz-template/core";
|
|
35791
35942
|
import { debounce } from "lodash-es";
|
|
35943
|
+
import { createUUID as createUUID8 } from "qx-util";
|
|
35792
35944
|
import { clone as clone18 } from "ramda";
|
|
35793
35945
|
|
|
35794
35946
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
35795
35947
|
import {
|
|
35796
|
-
recursiveIterate as
|
|
35948
|
+
recursiveIterate as recursiveIterate4,
|
|
35797
35949
|
RuntimeModelError as RuntimeModelError52
|
|
35798
35950
|
} from "@ibiz-template/core";
|
|
35799
35951
|
var EditFormService = class extends ControlService {
|
|
@@ -36009,7 +36161,7 @@ var EditFormService = class extends ControlService {
|
|
|
36009
36161
|
// 向导预置
|
|
36010
36162
|
"srfnextform"
|
|
36011
36163
|
];
|
|
36012
|
-
|
|
36164
|
+
recursiveIterate4(
|
|
36013
36165
|
this.model,
|
|
36014
36166
|
(item) => {
|
|
36015
36167
|
if (item.detailType === "FORMITEM" || item.detailType === "MDCTRL") {
|
|
@@ -36164,7 +36316,8 @@ var EditFormController = class extends FormController {
|
|
|
36164
36316
|
} finally {
|
|
36165
36317
|
await this.endLoading();
|
|
36166
36318
|
}
|
|
36167
|
-
res.data
|
|
36319
|
+
res.data.srfkey = void 0;
|
|
36320
|
+
res.data.tempsrfkey = createUUID8();
|
|
36168
36321
|
this.state.modified = false;
|
|
36169
36322
|
this.state.data = res.data;
|
|
36170
36323
|
this.formStateNotify("LOAD" /* LOAD */);
|
|
@@ -36249,6 +36402,7 @@ var EditFormController = class extends FormController {
|
|
|
36249
36402
|
}
|
|
36250
36403
|
if (res.data) {
|
|
36251
36404
|
mergeInLeft(this.data, res.data);
|
|
36405
|
+
this.data.tempsrfkey = this.data.srfkey;
|
|
36252
36406
|
}
|
|
36253
36407
|
this.state.modified = false;
|
|
36254
36408
|
await this.evt.emit("onSaveSuccess", void 0);
|
|
@@ -37452,7 +37606,7 @@ import {
|
|
|
37452
37606
|
awaitTimeout as awaitTimeout2,
|
|
37453
37607
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
37454
37608
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
37455
|
-
recursiveIterate as
|
|
37609
|
+
recursiveIterate as recursiveIterate5,
|
|
37456
37610
|
RuntimeError as RuntimeError45,
|
|
37457
37611
|
RuntimeModelError as RuntimeModelError53
|
|
37458
37612
|
} from "@ibiz-template/core";
|
|
@@ -37962,7 +38116,7 @@ var GridController = class extends MDControlController {
|
|
|
37962
38116
|
* @return {*} {Promise<void>}
|
|
37963
38117
|
*/
|
|
37964
38118
|
initColumnStates() {
|
|
37965
|
-
|
|
38119
|
+
recursiveIterate5(
|
|
37966
38120
|
this.model,
|
|
37967
38121
|
(column) => {
|
|
37968
38122
|
if (column.columnType !== "GROUPGRIDCOLUMN") {
|
|
@@ -39140,7 +39294,7 @@ var ListController = class extends MDControlController {
|
|
|
39140
39294
|
};
|
|
39141
39295
|
|
|
39142
39296
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
39143
|
-
import { recursiveIterate as
|
|
39297
|
+
import { recursiveIterate as recursiveIterate6, RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
39144
39298
|
var PanelController = class extends ControlController {
|
|
39145
39299
|
constructor() {
|
|
39146
39300
|
super(...arguments);
|
|
@@ -39331,7 +39485,7 @@ var PanelController = class extends ControlController {
|
|
|
39331
39485
|
}
|
|
39332
39486
|
initControlScheduler(logics = []) {
|
|
39333
39487
|
const actualLogics = [...logics];
|
|
39334
|
-
|
|
39488
|
+
recursiveIterate6(
|
|
39335
39489
|
this.model,
|
|
39336
39490
|
(item) => {
|
|
39337
39491
|
if (item.controlLogics) {
|
|
@@ -39830,7 +39984,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
39830
39984
|
};
|
|
39831
39985
|
|
|
39832
39986
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
39833
|
-
import { recursiveIterate as
|
|
39987
|
+
import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
|
|
39834
39988
|
import { isNil as isNil22 } from "ramda";
|
|
39835
39989
|
|
|
39836
39990
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -40036,7 +40190,7 @@ var SearchBarController = class extends ControlController {
|
|
|
40036
40190
|
}
|
|
40037
40191
|
let hasFilter = false;
|
|
40038
40192
|
let hasError = false;
|
|
40039
|
-
|
|
40193
|
+
recursiveIterate7(this.state.filterNodes[0], (node) => {
|
|
40040
40194
|
if (node.leaf) {
|
|
40041
40195
|
if (node.field && node.valueOP && !isNil22(node.value)) {
|
|
40042
40196
|
hasFilter = true;
|
|
@@ -40296,7 +40450,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
40296
40450
|
};
|
|
40297
40451
|
|
|
40298
40452
|
// src/controller/control/tree/tree.controller.ts
|
|
40299
|
-
import { recursiveIterate as
|
|
40453
|
+
import { recursiveIterate as recursiveIterate8 } from "@ibiz-template/core";
|
|
40300
40454
|
|
|
40301
40455
|
// src/controller/control/tree/tree.service.ts
|
|
40302
40456
|
import { ModelError as ModelError27 } from "@ibiz-template/core";
|
|
@@ -40666,7 +40820,7 @@ var TreeController = class extends MDControlController {
|
|
|
40666
40820
|
this.state.rootNodes = nodes;
|
|
40667
40821
|
}
|
|
40668
40822
|
this.state.items = [];
|
|
40669
|
-
|
|
40823
|
+
recursiveIterate8(
|
|
40670
40824
|
{ children: this.state.rootNodes },
|
|
40671
40825
|
(node) => {
|
|
40672
40826
|
this.state.items.push(node);
|
|
@@ -40808,7 +40962,7 @@ var TreeController = class extends MDControlController {
|
|
|
40808
40962
|
*/
|
|
40809
40963
|
calcExpandedKeys(nodes) {
|
|
40810
40964
|
let expandedKeys = [...this.state.expandedKeys];
|
|
40811
|
-
|
|
40965
|
+
recursiveIterate8({ children: nodes }, (node) => {
|
|
40812
40966
|
var _a;
|
|
40813
40967
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
40814
40968
|
expandedKeys.push(node.id);
|
|
@@ -41698,7 +41852,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
41698
41852
|
};
|
|
41699
41853
|
|
|
41700
41854
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
41701
|
-
import { recursiveIterate as
|
|
41855
|
+
import { recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
41702
41856
|
|
|
41703
41857
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
41704
41858
|
import { isArray as isArray11 } from "qx-util";
|
|
@@ -41938,7 +42092,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
41938
42092
|
* @memberof TreeGridExController
|
|
41939
42093
|
*/
|
|
41940
42094
|
initColumnStates() {
|
|
41941
|
-
|
|
42095
|
+
recursiveIterate9(
|
|
41942
42096
|
this.model,
|
|
41943
42097
|
(column) => {
|
|
41944
42098
|
if (column.columnType !== "GROUPGRIDCOLUMN") {
|
|
@@ -42026,7 +42180,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
42026
42180
|
this.state.rootNodes = nodes;
|
|
42027
42181
|
}
|
|
42028
42182
|
this.state.items = [];
|
|
42029
|
-
|
|
42183
|
+
recursiveIterate9(
|
|
42030
42184
|
{ children: this.state.rootNodes },
|
|
42031
42185
|
(node) => {
|
|
42032
42186
|
this.state.items.push(node);
|
|
@@ -42045,7 +42199,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
42045
42199
|
*/
|
|
42046
42200
|
calcExpandedKeys(nodes) {
|
|
42047
42201
|
let expandedKeys = [];
|
|
42048
|
-
|
|
42202
|
+
recursiveIterate9({ children: nodes }, (node) => {
|
|
42049
42203
|
var _a;
|
|
42050
42204
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
42051
42205
|
expandedKeys.push(node.id);
|
|
@@ -42069,7 +42223,7 @@ var TreeGridService = class extends GridService {
|
|
|
42069
42223
|
|
|
42070
42224
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
42071
42225
|
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
42072
|
-
import { createUUID as
|
|
42226
|
+
import { createUUID as createUUID9 } from "qx-util";
|
|
42073
42227
|
|
|
42074
42228
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
42075
42229
|
var MEditViewPanelService = class extends MDControlService {
|
|
@@ -42156,7 +42310,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
42156
42310
|
*/
|
|
42157
42311
|
handlePanelItemParams(arg) {
|
|
42158
42312
|
const [{ parameterName }] = this.parameters;
|
|
42159
|
-
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(
|
|
42313
|
+
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID9());
|
|
42160
42314
|
const item = {
|
|
42161
42315
|
id,
|
|
42162
42316
|
context: this.context.clone(),
|
|
@@ -43713,7 +43867,7 @@ var ControlLogicScheduler = class extends LogicScheduler {
|
|
|
43713
43867
|
);
|
|
43714
43868
|
filterLogics.forEach((logic) => {
|
|
43715
43869
|
if (logic.triggerType === "CTRLEVENT") {
|
|
43716
|
-
logic.ctrlName = logic.itemName;
|
|
43870
|
+
logic.ctrlName = logic.itemName || logic.logicTag;
|
|
43717
43871
|
}
|
|
43718
43872
|
});
|
|
43719
43873
|
super(filterLogics);
|
|
@@ -43941,13 +44095,16 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
43941
44095
|
};
|
|
43942
44096
|
|
|
43943
44097
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
43944
|
-
import { RuntimeError as RuntimeError57 } from "@ibiz-template/core";
|
|
44098
|
+
import { RuntimeError as RuntimeError57, RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
43945
44099
|
var TimerTrigger = class extends LogicTrigger {
|
|
43946
44100
|
constructor() {
|
|
43947
44101
|
super(...arguments);
|
|
43948
44102
|
this.timer = null;
|
|
43949
44103
|
}
|
|
43950
44104
|
start() {
|
|
44105
|
+
if (!this.logic.timer) {
|
|
44106
|
+
throw new RuntimeModelError61(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
44107
|
+
}
|
|
43951
44108
|
this.timer = setInterval(() => {
|
|
43952
44109
|
if (!this.scheduler.defaultParamsCb) {
|
|
43953
44110
|
throw new RuntimeError57("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
@@ -43968,7 +44125,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
43968
44125
|
import {
|
|
43969
44126
|
ModelError as ModelError31,
|
|
43970
44127
|
RuntimeError as RuntimeError58,
|
|
43971
|
-
RuntimeModelError as
|
|
44128
|
+
RuntimeModelError as RuntimeModelError62
|
|
43972
44129
|
} from "@ibiz-template/core";
|
|
43973
44130
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
43974
44131
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -44012,7 +44169,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44012
44169
|
} else {
|
|
44013
44170
|
openViewRef = appUILogic.openDataAppView;
|
|
44014
44171
|
if (!openViewRef) {
|
|
44015
|
-
throw new
|
|
44172
|
+
throw new RuntimeModelError62(
|
|
44016
44173
|
appUILogic,
|
|
44017
44174
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
44018
44175
|
);
|
|
@@ -44020,7 +44177,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44020
44177
|
}
|
|
44021
44178
|
const openView = openViewRef.refAppViewId;
|
|
44022
44179
|
if (!openView) {
|
|
44023
|
-
throw new
|
|
44180
|
+
throw new RuntimeModelError62(
|
|
44024
44181
|
appUILogic,
|
|
44025
44182
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
44026
44183
|
);
|
|
@@ -44047,7 +44204,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44047
44204
|
const appDataEntityId = parameters.view.model.appDataEntityId;
|
|
44048
44205
|
const formTypeName = await getFormTypeFieldName(appDataEntityId);
|
|
44049
44206
|
if (!formTypeName) {
|
|
44050
|
-
throw new
|
|
44207
|
+
throw new RuntimeModelError62(
|
|
44051
44208
|
appUILogic,
|
|
44052
44209
|
"".concat(appDataEntityId, "\u5B9E\u4F53\u7F3A\u5C11\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027")
|
|
44053
44210
|
);
|
|
@@ -44055,7 +44212,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44055
44212
|
const { data } = parameters;
|
|
44056
44213
|
const formTypeValue = data[0][formTypeName];
|
|
44057
44214
|
if (!formTypeValue) {
|
|
44058
|
-
throw new
|
|
44215
|
+
throw new RuntimeModelError62(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
44059
44216
|
}
|
|
44060
44217
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
44061
44218
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -44097,7 +44254,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44097
44254
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
44098
44255
|
});
|
|
44099
44256
|
if (!newViewRef) {
|
|
44100
|
-
throw new
|
|
44257
|
+
throw new RuntimeModelError62(
|
|
44101
44258
|
appUILogic,
|
|
44102
44259
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
44103
44260
|
);
|
|
@@ -44107,7 +44264,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44107
44264
|
} else {
|
|
44108
44265
|
newViewRef = newDataAppView;
|
|
44109
44266
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
44110
|
-
throw new
|
|
44267
|
+
throw new RuntimeModelError62(
|
|
44111
44268
|
appUILogic,
|
|
44112
44269
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
44113
44270
|
);
|
|
@@ -44164,7 +44321,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44164
44321
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
44165
44322
|
const { context, params, ...rest } = parameters;
|
|
44166
44323
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
44167
|
-
throw new
|
|
44324
|
+
throw new RuntimeModelError62(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
44168
44325
|
}
|
|
44169
44326
|
const result = await ibiz.commands.execute(
|
|
44170
44327
|
OpenAppViewCommand.TAG,
|
|
@@ -44210,7 +44367,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44210
44367
|
const minorDERs = selfDe.minorAppDERSs;
|
|
44211
44368
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
44212
44369
|
if (!minorDERs) {
|
|
44213
|
-
throw new
|
|
44370
|
+
throw new RuntimeModelError62(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
44214
44371
|
}
|
|
44215
44372
|
let pickParentFieldName;
|
|
44216
44373
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|