@ibiz-template/runtime 0.5.3-beta.9 → 0.5.3
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 +214 -63
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +2 -0
- package/out/controller/control/form/edit-form/edit-form.controller.js +1 -1
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.js +2 -1
- package/out/controller/control/tree/tree.controller.d.ts +17 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +22 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +6 -4
- package/out/controller/utils/jsonschema/entity.d.ts.map +1 -1
- package/out/controller/utils/jsonschema/entity.js +4 -1
- package/out/global/global-util/global-util.d.ts +8 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +8 -1
- package/out/interface/controller/common/i-icon/i-icon.d.ts +1 -0
- package/out/interface/controller/common/i-icon/i-icon.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-drbar.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-drbar.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-drtab.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-drtab.state.d.ts.map +1 -1
- package/out/interface/util/i-view-stack/i-view-stack.d.ts +53 -0
- package/out/interface/util/i-view-stack/i-view-stack.d.ts.map +1 -0
- package/out/interface/util/i-view-stack/i-view-stack.js +1 -0
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/register/helper/async-action-register.d.ts.map +1 -1
- package/out/register/helper/async-action-register.js +1 -1
- package/out/service/de-service-util.d.ts +11 -0
- package/out/service/de-service-util.d.ts.map +1 -1
- package/out/service/de-service-util.js +34 -0
- package/out/service/dto/method.dto.d.ts +1 -2
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +0 -7
- package/out/service/service/auth/v7-auth.service.d.ts +1 -2
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +27 -7
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +9 -3
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +9 -1
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +3 -0
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/view-stack/view-stack.d.ts +29 -0
- package/out/utils/view-stack/view-stack.d.ts.map +1 -0
- package/out/utils/view-stack/view-stack.js +47 -0
- package/package.json +5 -5
- package/src/controller/common/view/view.controller.ts +4 -0
- package/src/controller/control/form/edit-form/edit-form.controller.ts +1 -1
- package/src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.ts +1 -1
- package/src/controller/control/tree/tree.controller.ts +35 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +12 -4
- package/src/controller/utils/jsonschema/entity.ts +4 -1
- package/src/global/global-util/global-util.ts +9 -0
- package/src/interface/controller/common/i-icon/i-icon.ts +1 -0
- package/src/interface/controller/state/control/i-drbar.state.ts +8 -0
- package/src/interface/controller/state/control/i-drtab.state.ts +8 -0
- package/src/interface/util/i-view-stack/i-view-stack.ts +53 -0
- package/src/interface/util/index.ts +1 -0
- package/src/register/helper/async-action-register.ts +3 -1
- package/src/service/de-service-util.ts +43 -0
- package/src/service/dto/method.dto.ts +1 -8
- package/src/service/service/auth/v7-auth.service.ts +37 -19
- package/src/service/service/entity/method/method-renturn.ts +14 -5
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +11 -0
- package/src/service/vo/tree-node-data/tree-node-data.ts +3 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/view-stack/view-stack.ts +64 -0
package/dist/index.esm.js
CHANGED
|
@@ -3150,6 +3150,47 @@ var RawValueUtil = class {
|
|
|
3150
3150
|
}
|
|
3151
3151
|
};
|
|
3152
3152
|
|
|
3153
|
+
// src/utils/view-stack/view-stack.ts
|
|
3154
|
+
var ViewStack = class {
|
|
3155
|
+
constructor() {
|
|
3156
|
+
this.stackMap = /* @__PURE__ */ new Map();
|
|
3157
|
+
this.stack = [];
|
|
3158
|
+
this.activeStack = [];
|
|
3159
|
+
}
|
|
3160
|
+
add(id, view) {
|
|
3161
|
+
this.stack.push(view);
|
|
3162
|
+
this.stackMap.set(id, view);
|
|
3163
|
+
this.recalculateActiveStack();
|
|
3164
|
+
}
|
|
3165
|
+
remove(id) {
|
|
3166
|
+
const view = this.stackMap.get(id);
|
|
3167
|
+
if (view) {
|
|
3168
|
+
this.stack.splice(this.stack.indexOf(view), 1);
|
|
3169
|
+
this.stackMap.delete(id);
|
|
3170
|
+
this.recalculateActiveStack();
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3173
|
+
getActives() {
|
|
3174
|
+
return this.activeStack;
|
|
3175
|
+
}
|
|
3176
|
+
active(_id) {
|
|
3177
|
+
this.recalculateActiveStack();
|
|
3178
|
+
}
|
|
3179
|
+
deactivate(_id) {
|
|
3180
|
+
this.recalculateActiveStack();
|
|
3181
|
+
}
|
|
3182
|
+
/**
|
|
3183
|
+
* 重新计算激活视图堆栈
|
|
3184
|
+
*
|
|
3185
|
+
* @author chitanda
|
|
3186
|
+
* @date 2024-01-18 14:01:23
|
|
3187
|
+
* @protected
|
|
3188
|
+
*/
|
|
3189
|
+
recalculateActiveStack() {
|
|
3190
|
+
this.activeStack = this.stack.filter((item) => item.isActive === true);
|
|
3191
|
+
}
|
|
3192
|
+
};
|
|
3193
|
+
|
|
3153
3194
|
// src/utils/promise/promise.ts
|
|
3154
3195
|
async function handleAllSettled(values, isThrow = true) {
|
|
3155
3196
|
const allResults = await Promise.allSettled(values);
|
|
@@ -4007,7 +4048,9 @@ function getProvider10(key) {
|
|
|
4007
4048
|
);
|
|
4008
4049
|
}
|
|
4009
4050
|
function getAsyncActionProvider(actiontype) {
|
|
4010
|
-
const provider = getProvider10(
|
|
4051
|
+
const provider = getProvider10(
|
|
4052
|
+
actiontype || "DEFAULT"
|
|
4053
|
+
);
|
|
4011
4054
|
if (!provider) {
|
|
4012
4055
|
throw new RuntimeError9("\u627E\u4E0D\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B".concat(actiontype, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
4013
4056
|
} else {
|
|
@@ -4589,7 +4632,9 @@ var DynamicCodeListCache = class {
|
|
|
4589
4632
|
iconPathAppDEFieldId,
|
|
4590
4633
|
iconPathXAppDEFieldId,
|
|
4591
4634
|
disableAppDEFieldId,
|
|
4592
|
-
dataAppDEFieldId
|
|
4635
|
+
dataAppDEFieldId,
|
|
4636
|
+
clsAppDEFieldId,
|
|
4637
|
+
colorAppDEFieldId
|
|
4593
4638
|
} = this.codeList;
|
|
4594
4639
|
const value = valueAppDEFieldId ? data[valueAppDEFieldId] : data.srfkey;
|
|
4595
4640
|
result.id = value;
|
|
@@ -4613,6 +4658,12 @@ var DynamicCodeListCache = class {
|
|
|
4613
4658
|
if (disableAppDEFieldId) {
|
|
4614
4659
|
result.disableSelect = fieldValueToBoolean(data[disableAppDEFieldId]);
|
|
4615
4660
|
}
|
|
4661
|
+
if (clsAppDEFieldId) {
|
|
4662
|
+
result.textCls = data[clsAppDEFieldId];
|
|
4663
|
+
}
|
|
4664
|
+
if (colorAppDEFieldId) {
|
|
4665
|
+
result.color = data[colorAppDEFieldId];
|
|
4666
|
+
}
|
|
4616
4667
|
if (dataAppDEFieldId && data[dataAppDEFieldId]) {
|
|
4617
4668
|
try {
|
|
4618
4669
|
result.data = ScriptFactory.execSingleLine(
|
|
@@ -6357,12 +6408,6 @@ var MethodDto = class {
|
|
|
6357
6408
|
* @return {*} {Promise<IDataEntity[]>}
|
|
6358
6409
|
*/
|
|
6359
6410
|
async sets(context, data) {
|
|
6360
|
-
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
6361
|
-
if (uiDomain && uiDomain.state.rsInit !== true) {
|
|
6362
|
-
await this.calcRs(context);
|
|
6363
|
-
uiDomain.calcParentRs();
|
|
6364
|
-
uiDomain.state.rsInit = true;
|
|
6365
|
-
}
|
|
6366
6411
|
return Promise.all(
|
|
6367
6412
|
data.map(async (datum) => {
|
|
6368
6413
|
const all = this.fields.filter((field) => field.type === "DTOS").map(async (field) => {
|
|
@@ -6404,7 +6449,6 @@ var MethodDto = class {
|
|
|
6404
6449
|
*
|
|
6405
6450
|
* @author chitanda
|
|
6406
6451
|
* @date 2023-12-26 16:12:13
|
|
6407
|
-
* @protected
|
|
6408
6452
|
* @param {IContext} context
|
|
6409
6453
|
* @param {number} [depth=0] 递归层级,避免进入死循环。最大递归层级为 10
|
|
6410
6454
|
* @return {*} {Promise<void>}
|
|
@@ -7384,9 +7428,13 @@ var V7AuthService = class {
|
|
|
7384
7428
|
const token = getCookie(CoreConst.TOKEN);
|
|
7385
7429
|
const expirein = getCookie(CoreConst.TOKEN_EXPIRES);
|
|
7386
7430
|
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
7431
|
+
const refreshToken = getCookie(CoreConst.REFRESH_TOKEN);
|
|
7387
7432
|
setCookie(CoreConst.TOKEN, token, 0, true);
|
|
7388
7433
|
setCookie(CoreConst.TOKEN_EXPIRES, expirein, 0, true);
|
|
7389
7434
|
setCookie(CoreConst.TOKEN_REMEMBER, remember, 0, true);
|
|
7435
|
+
if (refreshToken) {
|
|
7436
|
+
setCookie(CoreConst.REFRESH_TOKEN, refreshToken, 0, true);
|
|
7437
|
+
}
|
|
7390
7438
|
}
|
|
7391
7439
|
return result;
|
|
7392
7440
|
}
|
|
@@ -7399,17 +7447,21 @@ var V7AuthService = class {
|
|
|
7399
7447
|
});
|
|
7400
7448
|
const { data } = res;
|
|
7401
7449
|
if (data && data.token) {
|
|
7450
|
+
const cacheDays = remember ? 7 : 0;
|
|
7402
7451
|
if (remember) {
|
|
7403
|
-
setCookie(CoreConst.TOKEN_REMEMBER, "1",
|
|
7452
|
+
setCookie(CoreConst.TOKEN_REMEMBER, "1", cacheDays, true);
|
|
7404
7453
|
}
|
|
7405
|
-
setCookie(CoreConst.TOKEN, data.token,
|
|
7454
|
+
setCookie(CoreConst.TOKEN, data.token, cacheDays, true);
|
|
7406
7455
|
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
|
|
7407
|
-
setCookie(
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7456
|
+
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDays, true);
|
|
7457
|
+
if (data.refresh_token) {
|
|
7458
|
+
setCookie(
|
|
7459
|
+
CoreConst.REFRESH_TOKEN,
|
|
7460
|
+
data.refresh_token,
|
|
7461
|
+
cacheDays,
|
|
7462
|
+
true
|
|
7463
|
+
);
|
|
7464
|
+
}
|
|
7413
7465
|
clearCookie(CoreConst.IS_ANONYMOUS);
|
|
7414
7466
|
}
|
|
7415
7467
|
return true;
|
|
@@ -7427,6 +7479,7 @@ var V7AuthService = class {
|
|
|
7427
7479
|
clearCookie(CoreConst.TOKEN);
|
|
7428
7480
|
clearCookie(CoreConst.TOKEN_EXPIRES);
|
|
7429
7481
|
clearCookie(CoreConst.TOKEN_REMEMBER);
|
|
7482
|
+
clearCookie(CoreConst.REFRESH_TOKEN);
|
|
7430
7483
|
clearCookie(CoreConst.IS_ANONYMOUS);
|
|
7431
7484
|
ibiz.appData = void 0;
|
|
7432
7485
|
ibiz.orgData = void 0;
|
|
@@ -7445,22 +7498,32 @@ var V7AuthService = class {
|
|
|
7445
7498
|
}
|
|
7446
7499
|
const token = getCookie(CoreConst.TOKEN);
|
|
7447
7500
|
const expirein = getCookie(CoreConst.TOKEN_EXPIRES);
|
|
7448
|
-
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
7449
7501
|
if (token && expirein) {
|
|
7450
7502
|
let wait = Number(expirein) - (/* @__PURE__ */ new Date()).getTime();
|
|
7451
7503
|
const early = 5 * 60 * 1e3;
|
|
7452
7504
|
wait = wait > early ? wait - early : 0;
|
|
7453
7505
|
setTimeout(async () => {
|
|
7454
|
-
const
|
|
7506
|
+
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
7507
|
+
const refreshToken = getCookie(CoreConst.REFRESH_TOKEN);
|
|
7508
|
+
const cacheDay = remember ? 7 : 0;
|
|
7509
|
+
let res;
|
|
7510
|
+
if (refreshToken != null && refreshToken !== "") {
|
|
7511
|
+
res = await ibiz.net.get("/uaa/refresh_token/".concat(refreshToken));
|
|
7512
|
+
} else {
|
|
7513
|
+
res = await ibiz.net.get("/uaa/refreshtoken2");
|
|
7514
|
+
}
|
|
7455
7515
|
if (res.ok) {
|
|
7456
|
-
setCookie(CoreConst.TOKEN, res.data.token,
|
|
7516
|
+
setCookie(CoreConst.TOKEN, res.data.token, cacheDay, true);
|
|
7457
7517
|
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (res.data.expirein || 7199) * 1e3;
|
|
7458
|
-
setCookie(
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7518
|
+
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDay, true);
|
|
7519
|
+
if (res.data.refresh_token) {
|
|
7520
|
+
setCookie(
|
|
7521
|
+
CoreConst.REFRESH_TOKEN,
|
|
7522
|
+
res.data.refresh_token,
|
|
7523
|
+
cacheDay,
|
|
7524
|
+
true
|
|
7525
|
+
);
|
|
7526
|
+
}
|
|
7464
7527
|
}
|
|
7465
7528
|
this.extendLogin();
|
|
7466
7529
|
}, wait);
|
|
@@ -7610,10 +7673,19 @@ var MethodReturn = class {
|
|
|
7610
7673
|
async handle(context, data) {
|
|
7611
7674
|
if (this.dto) {
|
|
7612
7675
|
const app = ibiz.hub.getApp(this.entity.appId);
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7676
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
7677
|
+
if (uiDomain && uiDomain.state.rsInit !== true) {
|
|
7678
|
+
await this.dto.calcRs(context);
|
|
7679
|
+
uiDomain.calcParentRs();
|
|
7680
|
+
uiDomain.state.rsInit = true;
|
|
7681
|
+
}
|
|
7682
|
+
app.deService.clearTempCacheByRs(
|
|
7683
|
+
{
|
|
7684
|
+
srfappid: app.appId,
|
|
7685
|
+
srfsessionid: context.srfsessionid
|
|
7686
|
+
},
|
|
7687
|
+
this.entity.id
|
|
7688
|
+
);
|
|
7617
7689
|
const items = await this.dto.sets(context, [data]);
|
|
7618
7690
|
return items[0];
|
|
7619
7691
|
}
|
|
@@ -9509,6 +9581,9 @@ var TreeNodeData = class {
|
|
|
9509
9581
|
if (sysImage.imagePath) {
|
|
9510
9582
|
icon.imagePath = sysImage.imagePath;
|
|
9511
9583
|
}
|
|
9584
|
+
if (sysImage.rawContent) {
|
|
9585
|
+
icon.htmlStr = sysImage.rawContent;
|
|
9586
|
+
}
|
|
9512
9587
|
}
|
|
9513
9588
|
return Object.values(icon).length > 0 ? icon : void 0;
|
|
9514
9589
|
}
|
|
@@ -10399,6 +10474,42 @@ var _DEServiceUtil = class _DEServiceUtil {
|
|
|
10399
10474
|
service.local.clear();
|
|
10400
10475
|
});
|
|
10401
10476
|
}
|
|
10477
|
+
/**
|
|
10478
|
+
* 清理指定实体的临时数据缓存,并根据关系清理掉子实体的临时数据缓存
|
|
10479
|
+
*
|
|
10480
|
+
* @author chitanda
|
|
10481
|
+
* @date 2024-01-19 14:01:32
|
|
10482
|
+
* @param {IContext} context
|
|
10483
|
+
* @param {string} entityID
|
|
10484
|
+
* @param {string[]} [clearEntities=[]] 已经清理过的实体忽略,避免关系循环引用导致死循环
|
|
10485
|
+
* @return {*} {void}
|
|
10486
|
+
*/
|
|
10487
|
+
clearTempCacheByRs(context, entityID, clearEntities = []) {
|
|
10488
|
+
if (clearEntities.includes(entityID) === true) {
|
|
10489
|
+
return;
|
|
10490
|
+
}
|
|
10491
|
+
clearEntities.push(entityID);
|
|
10492
|
+
const sandboxId = context.srfsessionid;
|
|
10493
|
+
if (!this.cache.has(sandboxId)) {
|
|
10494
|
+
return;
|
|
10495
|
+
}
|
|
10496
|
+
const map = this.cache.get(sandboxId);
|
|
10497
|
+
const service = map.get(entityID);
|
|
10498
|
+
if (service) {
|
|
10499
|
+
service.local.clear();
|
|
10500
|
+
}
|
|
10501
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
10502
|
+
if (uiDomain) {
|
|
10503
|
+
const configs = uiDomain.getDERConfigByMajor(entityID);
|
|
10504
|
+
configs.forEach((config) => {
|
|
10505
|
+
this.clearTempCacheByRs(
|
|
10506
|
+
context,
|
|
10507
|
+
config.minorAppDataEntityId,
|
|
10508
|
+
clearEntities
|
|
10509
|
+
);
|
|
10510
|
+
});
|
|
10511
|
+
}
|
|
10512
|
+
}
|
|
10402
10513
|
/**
|
|
10403
10514
|
* 执行服务方法
|
|
10404
10515
|
* @author lxm
|
|
@@ -11964,7 +12075,10 @@ async function exportData(header, data, fileName) {
|
|
|
11964
12075
|
async function getEntitySchema(entityId, context) {
|
|
11965
12076
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
11966
12077
|
const entity = await ibiz.hub.getAppDataEntity(entityId, context.srfappid);
|
|
11967
|
-
|
|
12078
|
+
let url = "/jsonschema/".concat(entity.name);
|
|
12079
|
+
if (entity.dynaSysMode === 0 && ibiz.appData) {
|
|
12080
|
+
url += "?dynamodeltag=".concat(ibiz.appData.dynamodeltag);
|
|
12081
|
+
}
|
|
11968
12082
|
const res = await app.net.get(url);
|
|
11969
12083
|
return res.data;
|
|
11970
12084
|
}
|
|
@@ -12602,6 +12716,7 @@ var ViewController = class extends BaseController {
|
|
|
12602
12716
|
if (this.engines.length) {
|
|
12603
12717
|
await Promise.all(this.engines.map((engine) => engine.onDestroyed()));
|
|
12604
12718
|
}
|
|
12719
|
+
Object.values(this.counters).forEach((counter) => counter.destroy());
|
|
12605
12720
|
this.ctx.destroy();
|
|
12606
12721
|
this.engines = [];
|
|
12607
12722
|
if (this.scheduler) {
|
|
@@ -21709,8 +21824,9 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
21709
21824
|
return new FormTabPanelState((_a = this.parent) == null ? void 0 : _a.state);
|
|
21710
21825
|
}
|
|
21711
21826
|
async onInit() {
|
|
21827
|
+
var _a;
|
|
21712
21828
|
await super.onInit();
|
|
21713
|
-
this.state.activeTab = this.model.deformTabPages[0].id;
|
|
21829
|
+
this.state.activeTab = ((_a = this.model.deformTabPages) == null ? void 0 : _a[0].id) || "";
|
|
21714
21830
|
}
|
|
21715
21831
|
/**
|
|
21716
21832
|
* 分页点击切换处理
|
|
@@ -22235,7 +22351,7 @@ var EditFormController = class extends FormController {
|
|
|
22235
22351
|
});
|
|
22236
22352
|
}
|
|
22237
22353
|
ibiz.mc.command.send(
|
|
22238
|
-
|
|
22354
|
+
res.data,
|
|
22239
22355
|
isCreate ? "OBJECTCREATED" : "OBJECTUPDATED"
|
|
22240
22356
|
);
|
|
22241
22357
|
return this.data;
|
|
@@ -26924,6 +27040,7 @@ var TreeController = class extends MDControlController {
|
|
|
26924
27040
|
this.initDropNodeRss();
|
|
26925
27041
|
this.initNodeClickTBUIActionItem();
|
|
26926
27042
|
await this.initService();
|
|
27043
|
+
await this.initCounter();
|
|
26927
27044
|
this.model.detreeNodes.forEach((node) => {
|
|
26928
27045
|
var _a2, _b2;
|
|
26929
27046
|
if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
|
|
@@ -26939,6 +27056,12 @@ var TreeController = class extends MDControlController {
|
|
|
26939
27056
|
Object.values(this.contextMenus).map((menu) => menu.created())
|
|
26940
27057
|
);
|
|
26941
27058
|
}
|
|
27059
|
+
async onDestroyed() {
|
|
27060
|
+
await super.onDestroyed();
|
|
27061
|
+
if (this.counter) {
|
|
27062
|
+
this.counter.destroy();
|
|
27063
|
+
}
|
|
27064
|
+
}
|
|
26942
27065
|
/**
|
|
26943
27066
|
* 初始化对应类型的部件服务
|
|
26944
27067
|
* @author lxm
|
|
@@ -26950,6 +27073,23 @@ var TreeController = class extends MDControlController {
|
|
|
26950
27073
|
this.service = new TreeService(this.model);
|
|
26951
27074
|
await this.service.init(this.context);
|
|
26952
27075
|
}
|
|
27076
|
+
/**
|
|
27077
|
+
* 初始化计数器
|
|
27078
|
+
* @author lxm
|
|
27079
|
+
* @date 2024-01-18 05:12:02
|
|
27080
|
+
* @protected
|
|
27081
|
+
* @return {*} {Promise<void>}
|
|
27082
|
+
*/
|
|
27083
|
+
async initCounter() {
|
|
27084
|
+
const { appCounterRefs } = this.model;
|
|
27085
|
+
const appCounterRef = appCounterRefs == null ? void 0 : appCounterRefs[0];
|
|
27086
|
+
if (appCounterRef) {
|
|
27087
|
+
this.counter = await CounterService.getCounterByRef(
|
|
27088
|
+
appCounterRef,
|
|
27089
|
+
this.context
|
|
27090
|
+
);
|
|
27091
|
+
}
|
|
27092
|
+
}
|
|
26953
27093
|
/**
|
|
26954
27094
|
* 初始化节点拖入关系处理
|
|
26955
27095
|
* @author lxm
|
|
@@ -28712,6 +28852,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28712
28852
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
28713
28853
|
import {
|
|
28714
28854
|
RuntimeError as RuntimeError60,
|
|
28855
|
+
RuntimeModelError as RuntimeModelError67,
|
|
28715
28856
|
awaitTimeout as awaitTimeout3,
|
|
28716
28857
|
recursiveIterate as recursiveIterate11
|
|
28717
28858
|
} from "@ibiz-template/core";
|
|
@@ -28985,12 +29126,14 @@ var TreeGridExController = class extends TreeController {
|
|
|
28985
29126
|
return;
|
|
28986
29127
|
}
|
|
28987
29128
|
const nodeModel = this.getNodeModel(nodeData._nodeId);
|
|
28988
|
-
const { appDataEntityId } = nodeModel;
|
|
29129
|
+
const { appDataEntityId, updateAppDEActionId } = nodeModel;
|
|
28989
29130
|
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
28990
29131
|
if (isCreate) {
|
|
28991
29132
|
throw new RuntimeError60("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
|
|
28992
29133
|
}
|
|
28993
|
-
|
|
29134
|
+
if (!updateAppDEActionId) {
|
|
29135
|
+
throw new RuntimeModelError67(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
|
|
29136
|
+
}
|
|
28994
29137
|
const deName = calcDeCodeNameById(appDataEntityId);
|
|
28995
29138
|
const tempContext = this.context.clone();
|
|
28996
29139
|
tempContext[deName] = nodeData._deData.srfkey;
|
|
@@ -28999,7 +29142,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
28999
29142
|
try {
|
|
29000
29143
|
res = await app.deService.exec(
|
|
29001
29144
|
appDataEntityId,
|
|
29002
|
-
|
|
29145
|
+
updateAppDEActionId,
|
|
29003
29146
|
tempContext,
|
|
29004
29147
|
nodeData._deData
|
|
29005
29148
|
);
|
|
@@ -29260,7 +29403,7 @@ var TreeGridExColumnController = class {
|
|
|
29260
29403
|
import {
|
|
29261
29404
|
DataTypes as DataTypes5,
|
|
29262
29405
|
RuntimeError as RuntimeError61,
|
|
29263
|
-
RuntimeModelError as
|
|
29406
|
+
RuntimeModelError as RuntimeModelError68
|
|
29264
29407
|
} from "@ibiz-template/core";
|
|
29265
29408
|
import { clone as clone29 } from "ramda";
|
|
29266
29409
|
import dayjs6 from "dayjs";
|
|
@@ -29291,7 +29434,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
29291
29434
|
}
|
|
29292
29435
|
);
|
|
29293
29436
|
if (!nodeColumn || !nodeDataItem) {
|
|
29294
|
-
throw new
|
|
29437
|
+
throw new RuntimeModelError68(
|
|
29295
29438
|
nodeModel,
|
|
29296
29439
|
"\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u6570\u636E\u9879")
|
|
29297
29440
|
);
|
|
@@ -29305,7 +29448,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
29305
29448
|
}
|
|
29306
29449
|
);
|
|
29307
29450
|
if (!nodeEditItem) {
|
|
29308
|
-
throw new
|
|
29451
|
+
throw new RuntimeModelError68(
|
|
29309
29452
|
nodeModel,
|
|
29310
29453
|
"\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u7F16\u8F91\u9879\u6A21\u578B")
|
|
29311
29454
|
);
|
|
@@ -29705,7 +29848,7 @@ var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
|
|
|
29705
29848
|
};
|
|
29706
29849
|
|
|
29707
29850
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
|
|
29708
|
-
import { RuntimeModelError as
|
|
29851
|
+
import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
|
|
29709
29852
|
var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
29710
29853
|
/**
|
|
29711
29854
|
* 给rowController初始化操作列的状态
|
|
@@ -29719,7 +29862,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
29719
29862
|
const { deuiactionGroup } = this.model;
|
|
29720
29863
|
if (!deuiactionGroup) {
|
|
29721
29864
|
return;
|
|
29722
|
-
throw new
|
|
29865
|
+
throw new RuntimeModelError69(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
29723
29866
|
}
|
|
29724
29867
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
29725
29868
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -29773,7 +29916,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
29773
29916
|
};
|
|
29774
29917
|
|
|
29775
29918
|
// src/controller/control/tree-grid/tree-grid.controller.ts
|
|
29776
|
-
import { RuntimeModelError as
|
|
29919
|
+
import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
|
|
29777
29920
|
var TreeGridController = class extends GridController {
|
|
29778
29921
|
constructor() {
|
|
29779
29922
|
super(...arguments);
|
|
@@ -29818,10 +29961,10 @@ var TreeGridController = class extends GridController {
|
|
|
29818
29961
|
return item.treeColumnMode === 2 || item.treeColumnMode === 3;
|
|
29819
29962
|
});
|
|
29820
29963
|
if (!treeGridParent) {
|
|
29821
|
-
throw new
|
|
29964
|
+
throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
|
|
29822
29965
|
}
|
|
29823
29966
|
if (!treeGridValue) {
|
|
29824
|
-
throw new
|
|
29967
|
+
throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
|
|
29825
29968
|
}
|
|
29826
29969
|
this.treeGridValueField = treeGridValue.appDEFieldId.toLowerCase();
|
|
29827
29970
|
this.treeGridParentField = treeGridParent.appDEFieldId.toLowerCase();
|
|
@@ -31546,7 +31689,7 @@ var ViewEngineBase = class {
|
|
|
31546
31689
|
};
|
|
31547
31690
|
|
|
31548
31691
|
// src/engine/md-view.engine.ts
|
|
31549
|
-
import { RuntimeModelError as
|
|
31692
|
+
import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
|
|
31550
31693
|
import { clone as clone30 } from "ramda";
|
|
31551
31694
|
var MDViewEngine = class extends ViewEngineBase {
|
|
31552
31695
|
/**
|
|
@@ -31730,7 +31873,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
31730
31873
|
view: this.view
|
|
31731
31874
|
}));
|
|
31732
31875
|
if (result === -1) {
|
|
31733
|
-
throw new
|
|
31876
|
+
throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
31734
31877
|
} else {
|
|
31735
31878
|
return {
|
|
31736
31879
|
cancel: !result.ok
|
|
@@ -31753,7 +31896,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
31753
31896
|
(item) => item.id === "newdata"
|
|
31754
31897
|
);
|
|
31755
31898
|
if (!openAppViewLogic) {
|
|
31756
|
-
throw new
|
|
31899
|
+
throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
31757
31900
|
}
|
|
31758
31901
|
const params = clone30(this.view.params);
|
|
31759
31902
|
if (copyMode) {
|
|
@@ -31767,7 +31910,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
31767
31910
|
view: this.view
|
|
31768
31911
|
}));
|
|
31769
31912
|
if (result === -1) {
|
|
31770
|
-
throw new
|
|
31913
|
+
throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
31771
31914
|
} else {
|
|
31772
31915
|
return {
|
|
31773
31916
|
cancel: !result.ok
|
|
@@ -31935,6 +32078,13 @@ var GlobalUtil = class {
|
|
|
31935
32078
|
* @date 2023-09-26 05:04:26
|
|
31936
32079
|
*/
|
|
31937
32080
|
this.error = new ErrorHandlerCenter();
|
|
32081
|
+
/**
|
|
32082
|
+
* 视图堆栈
|
|
32083
|
+
*
|
|
32084
|
+
* @author chitanda
|
|
32085
|
+
* @date 2024-01-18 14:01:23
|
|
32086
|
+
*/
|
|
32087
|
+
this.viewStack = new ViewStack();
|
|
31938
32088
|
this.error.register(new DefaultErrorHandler());
|
|
31939
32089
|
}
|
|
31940
32090
|
/**
|
|
@@ -32078,13 +32228,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
32078
32228
|
};
|
|
32079
32229
|
|
|
32080
32230
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
32081
|
-
import { RuntimeModelError as
|
|
32231
|
+
import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
32082
32232
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
32083
32233
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32084
32234
|
execute(executeParams) {
|
|
32085
32235
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
32086
32236
|
if (!appDEUILogicId) {
|
|
32087
|
-
throw new
|
|
32237
|
+
throw new RuntimeModelError72(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
32088
32238
|
}
|
|
32089
32239
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
32090
32240
|
}
|
|
@@ -32542,7 +32692,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
32542
32692
|
};
|
|
32543
32693
|
|
|
32544
32694
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
32545
|
-
import { RuntimeError as RuntimeError68, RuntimeModelError as
|
|
32695
|
+
import { RuntimeError as RuntimeError68, RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
32546
32696
|
var TimerTrigger = class extends LogicTrigger {
|
|
32547
32697
|
constructor() {
|
|
32548
32698
|
super(...arguments);
|
|
@@ -32550,7 +32700,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
32550
32700
|
}
|
|
32551
32701
|
start() {
|
|
32552
32702
|
if (!this.logic.timer) {
|
|
32553
|
-
throw new
|
|
32703
|
+
throw new RuntimeModelError73(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
32554
32704
|
}
|
|
32555
32705
|
this.timer = setInterval(() => {
|
|
32556
32706
|
if (!this.scheduler.defaultParamsCb) {
|
|
@@ -32572,7 +32722,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
32572
32722
|
import {
|
|
32573
32723
|
ModelError as ModelError34,
|
|
32574
32724
|
RuntimeError as RuntimeError69,
|
|
32575
|
-
RuntimeModelError as
|
|
32725
|
+
RuntimeModelError as RuntimeModelError74
|
|
32576
32726
|
} from "@ibiz-template/core";
|
|
32577
32727
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
32578
32728
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -32618,7 +32768,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32618
32768
|
} else {
|
|
32619
32769
|
openViewRef = appUILogic.openDataAppView;
|
|
32620
32770
|
if (!openViewRef) {
|
|
32621
|
-
throw new
|
|
32771
|
+
throw new RuntimeModelError74(
|
|
32622
32772
|
appUILogic,
|
|
32623
32773
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
32624
32774
|
);
|
|
@@ -32626,7 +32776,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32626
32776
|
}
|
|
32627
32777
|
const openView = openViewRef.refAppViewId;
|
|
32628
32778
|
if (!openView) {
|
|
32629
|
-
throw new
|
|
32779
|
+
throw new RuntimeModelError74(
|
|
32630
32780
|
appUILogic,
|
|
32631
32781
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
32632
32782
|
);
|
|
@@ -32656,7 +32806,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32656
32806
|
);
|
|
32657
32807
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
32658
32808
|
if (!typeFileName) {
|
|
32659
|
-
throw new
|
|
32809
|
+
throw new RuntimeModelError74(
|
|
32660
32810
|
appUILogic,
|
|
32661
32811
|
"".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
|
|
32662
32812
|
);
|
|
@@ -32664,7 +32814,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32664
32814
|
const { data } = parameters;
|
|
32665
32815
|
const formTypeValue = data[0][typeFileName];
|
|
32666
32816
|
if (!formTypeValue) {
|
|
32667
|
-
throw new
|
|
32817
|
+
throw new RuntimeModelError74(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
32668
32818
|
}
|
|
32669
32819
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
32670
32820
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -32706,7 +32856,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32706
32856
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
32707
32857
|
});
|
|
32708
32858
|
if (!newViewRef) {
|
|
32709
|
-
throw new
|
|
32859
|
+
throw new RuntimeModelError74(
|
|
32710
32860
|
appUILogic,
|
|
32711
32861
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
32712
32862
|
);
|
|
@@ -32716,7 +32866,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32716
32866
|
} else {
|
|
32717
32867
|
newViewRef = newDataAppView;
|
|
32718
32868
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
32719
|
-
throw new
|
|
32869
|
+
throw new RuntimeModelError74(
|
|
32720
32870
|
appUILogic,
|
|
32721
32871
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
32722
32872
|
);
|
|
@@ -32780,7 +32930,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32780
32930
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
32781
32931
|
const { context, params, ...rest } = parameters;
|
|
32782
32932
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
32783
|
-
throw new
|
|
32933
|
+
throw new RuntimeModelError74(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
32784
32934
|
}
|
|
32785
32935
|
const result = await ibiz.commands.execute(
|
|
32786
32936
|
OpenAppViewCommand.TAG,
|
|
@@ -32831,7 +32981,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32831
32981
|
const minorDERs = selfDe.minorAppDERSs;
|
|
32832
32982
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
32833
32983
|
if (!minorDERs) {
|
|
32834
|
-
throw new
|
|
32984
|
+
throw new RuntimeModelError74(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
32835
32985
|
}
|
|
32836
32986
|
let pickParentFieldName = "";
|
|
32837
32987
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -32928,12 +33078,12 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
32928
33078
|
};
|
|
32929
33079
|
|
|
32930
33080
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
32931
|
-
import { RuntimeModelError as
|
|
33081
|
+
import { RuntimeModelError as RuntimeModelError75 } from "@ibiz-template/core";
|
|
32932
33082
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
32933
33083
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32934
33084
|
execute(executeParams) {
|
|
32935
33085
|
if (!this.logic.appDEUIActionId) {
|
|
32936
|
-
throw new
|
|
33086
|
+
throw new RuntimeModelError75(
|
|
32937
33087
|
this.logic,
|
|
32938
33088
|
"\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
|
|
32939
33089
|
);
|
|
@@ -33318,6 +33468,7 @@ export {
|
|
|
33318
33468
|
ViewLayoutPanelController,
|
|
33319
33469
|
ViewMode,
|
|
33320
33470
|
ViewPortletController,
|
|
33471
|
+
ViewStack,
|
|
33321
33472
|
ViewType,
|
|
33322
33473
|
WFStepTraceViewController,
|
|
33323
33474
|
WFWithdrawUIActionProvider,
|