@ibiz-template/runtime 0.6.8 → 0.6.10
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 +524 -121
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +6 -2
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +3 -3
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +5 -5
- package/out/controller/control/form/form/form.controller.d.ts +2 -0
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +28 -23
- package/out/controller/control/form/form-detail/form-button/form-button.controller.js +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.js +1 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +2 -2
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +1 -1
- package/out/controller/control/search-bar/index.d.ts +1 -0
- package/out/controller/control/search-bar/index.d.ts.map +1 -1
- package/out/controller/control/search-bar/index.js +1 -0
- package/out/controller/control/search-bar/search-bar-filter-items.controller.d.ts +81 -0
- package/out/controller/control/search-bar/search-bar-filter-items.controller.d.ts.map +1 -0
- package/out/controller/control/search-bar/search-bar-filter-items.controller.js +134 -0
- package/out/controller/control/search-bar/search-bar-filter.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar-filter.controller.js +2 -0
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +26 -2
- package/out/controller/control/search-bar/use-searchcond.d.ts.map +1 -1
- package/out/controller/control/search-bar/use-searchcond.js +17 -0
- package/out/controller/control/toolbar/toolbar.controllerr.js +2 -2
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.js +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +1 -1
- package/out/controller/utils/button-state/button-container.state.d.ts +1 -1
- package/out/controller/utils/button-state/button-container.state.d.ts.map +1 -1
- package/out/controller/utils/button-state/button-container.state.js +2 -2
- package/out/controller/utils/button-state/ui-action-button.state.d.ts +2 -2
- package/out/controller/utils/button-state/ui-action-button.state.d.ts.map +1 -1
- package/out/controller/utils/button-state/ui-action-button.state.js +4 -4
- package/out/de-logic/de-logic.js +1 -1
- package/out/interface/controller/common/button-state/i-button-container.state.d.ts +4 -4
- package/out/interface/controller/common/button-state/i-button-container.state.d.ts.map +1 -1
- package/out/interface/controller/common/button-state/i-button.state.d.ts +4 -4
- package/out/interface/controller/common/button-state/i-button.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-search-bar.state.d.ts +8 -1
- package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
- package/out/interface/service/code-list-item/code-list-item.d.ts +10 -0
- package/out/interface/service/code-list-item/code-list-item.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de-authority.service.d.ts +20 -3
- package/out/interface/service/service/i-app-de-authority.service.d.ts.map +1 -1
- package/out/interface/service/service/i-auth.service.d.ts +7 -0
- package/out/interface/service/service/i-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.d.ts +1 -0
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +29 -6
- package/out/service/service/authority/authority.service.d.ts +2 -1
- package/out/service/service/authority/authority.service.d.ts.map +1 -1
- package/out/service/service/authority/authority.service.js +5 -4
- package/out/service/service/authority/de-authority.service.d.ts +46 -4
- package/out/service/service/authority/de-authority.service.d.ts.map +1 -1
- package/out/service/service/authority/de-authority.service.js +111 -10
- package/out/service/service/control/control.service.d.ts +9 -0
- package/out/service/service/control/control.service.d.ts.map +1 -1
- package/out/service/service/control/control.service.js +19 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +1 -0
- 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 +23 -1
- package/out/service/utils/util/util.d.ts +1 -1
- package/out/service/utils/util/util.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3327,8 +3327,8 @@ var baseStyle = {
|
|
|
3327
3327
|
position: "fixed",
|
|
3328
3328
|
zIndex: "10000"
|
|
3329
3329
|
};
|
|
3330
|
-
function cloneElement(
|
|
3331
|
-
const element = getAnimationElement(
|
|
3330
|
+
function cloneElement(clone35, teleport = document.body, isRemoveChild = true) {
|
|
3331
|
+
const element = getAnimationElement(clone35);
|
|
3332
3332
|
if (element == null) {
|
|
3333
3333
|
throw new Error("Cannot clone a null or undefined element.");
|
|
3334
3334
|
}
|
|
@@ -3747,11 +3747,11 @@ function arrayContains(arr, val) {
|
|
|
3747
3747
|
});
|
|
3748
3748
|
}
|
|
3749
3749
|
function cloneObject(o) {
|
|
3750
|
-
var
|
|
3750
|
+
var clone35 = {};
|
|
3751
3751
|
for (var p in o) {
|
|
3752
|
-
|
|
3752
|
+
clone35[p] = o[p];
|
|
3753
3753
|
}
|
|
3754
|
-
return
|
|
3754
|
+
return clone35;
|
|
3755
3755
|
}
|
|
3756
3756
|
function replaceObjectProps(o1, o2) {
|
|
3757
3757
|
var o = cloneObject(o1);
|
|
@@ -6568,6 +6568,19 @@ var DynamicCodeListCache = class {
|
|
|
6568
6568
|
}
|
|
6569
6569
|
return result;
|
|
6570
6570
|
}
|
|
6571
|
+
presetconvertData(data) {
|
|
6572
|
+
const result = {};
|
|
6573
|
+
const { color, bkcolor, disabled, id, text, label, value, cls } = data;
|
|
6574
|
+
result.value = value;
|
|
6575
|
+
result.color = color;
|
|
6576
|
+
result.bkcolor = bkcolor;
|
|
6577
|
+
result.text = text;
|
|
6578
|
+
result.id = id;
|
|
6579
|
+
result.id = label;
|
|
6580
|
+
result.disableSelect = disabled;
|
|
6581
|
+
result.cls = cls;
|
|
6582
|
+
return result;
|
|
6583
|
+
}
|
|
6571
6584
|
/**
|
|
6572
6585
|
* 加载服务获取数据,返回代码项
|
|
6573
6586
|
*
|
|
@@ -6612,7 +6625,18 @@ var DynamicCodeListCache = class {
|
|
|
6612
6625
|
"/dictionaries/codelist/".concat(tag),
|
|
6613
6626
|
tempParams
|
|
6614
6627
|
);
|
|
6615
|
-
|
|
6628
|
+
const presetresultItems = [];
|
|
6629
|
+
if (res2.data.items.every((item) => "showorder" in item)) {
|
|
6630
|
+
return res2.data.items.sort(
|
|
6631
|
+
(a, b) => (b.showorder || 0) - (a.showorder || 0)
|
|
6632
|
+
);
|
|
6633
|
+
}
|
|
6634
|
+
if (res2.data.items.length) {
|
|
6635
|
+
res2.data.items.forEach((item) => {
|
|
6636
|
+
presetresultItems.push(this.presetconvertData(item));
|
|
6637
|
+
});
|
|
6638
|
+
}
|
|
6639
|
+
return Object.freeze(presetresultItems);
|
|
6616
6640
|
}
|
|
6617
6641
|
if (!appDataEntityId) {
|
|
6618
6642
|
throw new RuntimeModelError7(this.codeList, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
@@ -8994,8 +9018,30 @@ var ControlService = class {
|
|
|
8994
9018
|
params,
|
|
8995
9019
|
header
|
|
8996
9020
|
);
|
|
9021
|
+
await this.handleItemPrivilege(res.data, context);
|
|
8997
9022
|
return res;
|
|
8998
9023
|
}
|
|
9024
|
+
/**
|
|
9025
|
+
* 处理启用项权限标识
|
|
9026
|
+
*
|
|
9027
|
+
* @protected
|
|
9028
|
+
* @param {IData} data 实体数据
|
|
9029
|
+
* @param {IContext} context 上下文
|
|
9030
|
+
* @memberof ControlService
|
|
9031
|
+
*/
|
|
9032
|
+
async handleItemPrivilege(data, context) {
|
|
9033
|
+
const { enableItemPrivilege, appDataEntityId } = this.model;
|
|
9034
|
+
if (enableItemPrivilege && appDataEntityId) {
|
|
9035
|
+
const deAuthority = await this.app.authority.getService(appDataEntityId);
|
|
9036
|
+
const items = Array.isArray(data) ? data : [data];
|
|
9037
|
+
items.forEach((item) => {
|
|
9038
|
+
deAuthority.setDataAccAction(
|
|
9039
|
+
{ srfkey: item.srfkey, srfsessionid: context.srfsessionid },
|
|
9040
|
+
item.srfdataaccaction
|
|
9041
|
+
);
|
|
9042
|
+
});
|
|
9043
|
+
}
|
|
9044
|
+
}
|
|
8999
9045
|
/**
|
|
9000
9046
|
* 处理自定义请求头
|
|
9001
9047
|
*
|
|
@@ -9206,20 +9252,59 @@ import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
|
9206
9252
|
var DeAuthorityService = class {
|
|
9207
9253
|
constructor(entityModel) {
|
|
9208
9254
|
this.entityModel = entityModel;
|
|
9255
|
+
/**
|
|
9256
|
+
* 数据权限MAP
|
|
9257
|
+
*
|
|
9258
|
+
* @protected
|
|
9259
|
+
* @type {Map<string, string>}
|
|
9260
|
+
* @memberof DeAuthorityService
|
|
9261
|
+
*/
|
|
9262
|
+
this.dataAccActionMap = /* @__PURE__ */ new Map();
|
|
9263
|
+
}
|
|
9264
|
+
/**
|
|
9265
|
+
* 设置实体数据权限标识
|
|
9266
|
+
*
|
|
9267
|
+
* @param {IParams} params
|
|
9268
|
+
* @param {string} dataAccAction
|
|
9269
|
+
* @memberof DeAuthorityService
|
|
9270
|
+
*/
|
|
9271
|
+
setDataAccAction(params, dataAccAction) {
|
|
9272
|
+
if (params.srfsessionid) {
|
|
9273
|
+
this.dataAccActionMap.set(
|
|
9274
|
+
"".concat(params.srfsessionid, "-").concat(params.srfkey),
|
|
9275
|
+
dataAccAction
|
|
9276
|
+
);
|
|
9277
|
+
}
|
|
9278
|
+
this.dataAccActionMap.set(params.srfkey, dataAccAction);
|
|
9279
|
+
}
|
|
9280
|
+
/**
|
|
9281
|
+
* 获取实体数据权限标识
|
|
9282
|
+
*
|
|
9283
|
+
* @param {string} key
|
|
9284
|
+
* @return {*} {(string | undefined)}
|
|
9285
|
+
* @memberof DeAuthorityService
|
|
9286
|
+
*/
|
|
9287
|
+
getDataAccAction(key) {
|
|
9288
|
+
return this.dataAccActionMap.get(key);
|
|
9209
9289
|
}
|
|
9210
9290
|
/**
|
|
9211
9291
|
* 通过操作标识计算权限
|
|
9212
9292
|
* @author lxm
|
|
9213
9293
|
* @date 2023-05-10 12:33:10
|
|
9214
9294
|
* @param {string} dataAccessAction 操作标识
|
|
9215
|
-
* @param {IData}
|
|
9216
|
-
* @param {
|
|
9295
|
+
* @param {IData} data 实体数据
|
|
9296
|
+
* @param {IContext} context 上下文
|
|
9297
|
+
* @param {boolean} enablePermission 是否启用权限
|
|
9217
9298
|
* @return {*} {Promise<boolean>}
|
|
9218
9299
|
*/
|
|
9219
|
-
async calcByDataAccessAction(dataAccessAction, data) {
|
|
9220
|
-
if (
|
|
9221
|
-
const
|
|
9222
|
-
|
|
9300
|
+
async calcByDataAccessAction(dataAccessAction, data, context, enablePermission) {
|
|
9301
|
+
if (enablePermission) {
|
|
9302
|
+
const deDataAccActionResult = await this.calcDeDataAccAction(
|
|
9303
|
+
dataAccessAction,
|
|
9304
|
+
data,
|
|
9305
|
+
context
|
|
9306
|
+
);
|
|
9307
|
+
if (!deDataAccActionResult) {
|
|
9223
9308
|
return false;
|
|
9224
9309
|
}
|
|
9225
9310
|
}
|
|
@@ -9232,6 +9317,75 @@ var DeAuthorityService = class {
|
|
|
9232
9317
|
}
|
|
9233
9318
|
return true;
|
|
9234
9319
|
}
|
|
9320
|
+
/**
|
|
9321
|
+
* 计算实体附属主实体控制操作标识
|
|
9322
|
+
*/
|
|
9323
|
+
async calcMajorDataAccAction(context) {
|
|
9324
|
+
const { minorAppDERSs } = this.entityModel;
|
|
9325
|
+
if (!minorAppDERSs)
|
|
9326
|
+
return;
|
|
9327
|
+
const appDeRSs = minorAppDERSs == null ? void 0 : minorAppDERSs.find((rs) => {
|
|
9328
|
+
const majorDeName = calcDeCodeNameById(rs.majorAppDataEntityId);
|
|
9329
|
+
return Object.prototype.hasOwnProperty.call(context, majorDeName) && context[majorDeName];
|
|
9330
|
+
});
|
|
9331
|
+
if (!appDeRSs)
|
|
9332
|
+
return;
|
|
9333
|
+
const app = await ibiz.hub.getApp(context.srfappid);
|
|
9334
|
+
const majorAuthorityService = await app.authority.getService(
|
|
9335
|
+
appDeRSs.majorAppDataEntityId
|
|
9336
|
+
);
|
|
9337
|
+
if (!majorAuthorityService)
|
|
9338
|
+
return;
|
|
9339
|
+
const majorAppDeName = calcDeCodeNameById(appDeRSs.majorAppDataEntityId);
|
|
9340
|
+
const majorDataAccAction = majorAuthorityService.getDataAccAction(
|
|
9341
|
+
"".concat(context.srfsessionid, "-").concat(context[majorAppDeName])
|
|
9342
|
+
) || majorAuthorityService.getDataAccAction("".concat(context[majorAppDeName]));
|
|
9343
|
+
return majorDataAccAction;
|
|
9344
|
+
}
|
|
9345
|
+
/**
|
|
9346
|
+
* 计算实体数据权限,根据实体数据访问控制方式计算权限
|
|
9347
|
+
*
|
|
9348
|
+
* 0:无控制 不计算实体数据权限
|
|
9349
|
+
* 1:自控制 根据实体数据中的权限标识计算
|
|
9350
|
+
* 2:附属主实体控制 根据主实体的数据权限标识计算
|
|
9351
|
+
* 3:附属主实体控制(未映射自控)根据主实体的数据权限标识计算,主实体没有权限标识时使用实体数据中的权限标识计算
|
|
9352
|
+
* @param {string} dataAccessAction 操作标识
|
|
9353
|
+
* @param {IData} data 实体数据
|
|
9354
|
+
* @param {IContext} context 上下文
|
|
9355
|
+
* @memberof DeAuthorityService
|
|
9356
|
+
*/
|
|
9357
|
+
async calcDeDataAccAction(dataAccessAction, data, context) {
|
|
9358
|
+
let result = true;
|
|
9359
|
+
let tempDataAccObject;
|
|
9360
|
+
const { dataAccCtrlMode } = this.entityModel;
|
|
9361
|
+
switch (dataAccCtrlMode) {
|
|
9362
|
+
case 1:
|
|
9363
|
+
tempDataAccObject = (data == null ? void 0 : data.srfdataaccaction) ? convertToObject(data.srfdataaccaction) : void 0;
|
|
9364
|
+
break;
|
|
9365
|
+
case 2:
|
|
9366
|
+
tempDataAccObject = convertToObject(
|
|
9367
|
+
await this.calcMajorDataAccAction(context)
|
|
9368
|
+
);
|
|
9369
|
+
break;
|
|
9370
|
+
case 3:
|
|
9371
|
+
tempDataAccObject = convertToObject(
|
|
9372
|
+
await this.calcMajorDataAccAction(context)
|
|
9373
|
+
);
|
|
9374
|
+
if (!Object.prototype.hasOwnProperty.call(
|
|
9375
|
+
tempDataAccObject,
|
|
9376
|
+
dataAccessAction
|
|
9377
|
+
) && data && data.srfdataaccaction) {
|
|
9378
|
+
tempDataAccObject = convertToObject(data.srfdataaccaction);
|
|
9379
|
+
}
|
|
9380
|
+
break;
|
|
9381
|
+
default:
|
|
9382
|
+
break;
|
|
9383
|
+
}
|
|
9384
|
+
if (tempDataAccObject && dataAccessAction && !tempDataAccObject[dataAccessAction]) {
|
|
9385
|
+
result = false;
|
|
9386
|
+
}
|
|
9387
|
+
return result;
|
|
9388
|
+
}
|
|
9235
9389
|
/**
|
|
9236
9390
|
* 通过实体主状态计算权限
|
|
9237
9391
|
* @author lxm
|
|
@@ -9241,8 +9395,11 @@ var DeAuthorityService = class {
|
|
|
9241
9395
|
* @param {string} appDeId 应用实体id
|
|
9242
9396
|
* @return {*} {Promise<boolean>}
|
|
9243
9397
|
*/
|
|
9244
|
-
async calcByDeMainState(dataAccessAction, data) {
|
|
9398
|
+
async calcByDeMainState(dataAccessAction, data = {}) {
|
|
9245
9399
|
let result = true;
|
|
9400
|
+
if (Object.keys(data).length === 0) {
|
|
9401
|
+
return result;
|
|
9402
|
+
}
|
|
9246
9403
|
const appDataEntity = this.entityModel;
|
|
9247
9404
|
if (!appDataEntity.enableDEMainState) {
|
|
9248
9405
|
ibiz.log.debug(
|
|
@@ -9385,11 +9542,12 @@ var AuthorityService = class {
|
|
|
9385
9542
|
* @author lxm
|
|
9386
9543
|
* @date 2023-05-10 12:33:10
|
|
9387
9544
|
* @param {string} dataAccessAction 操作标识
|
|
9545
|
+
* @param {IContext} context 上下文
|
|
9388
9546
|
* @param {IData} [data] 实体数据
|
|
9389
9547
|
* @param {string} [appDeId] 应用实体id
|
|
9390
9548
|
* @return {*} {Promise<boolean>}
|
|
9391
9549
|
*/
|
|
9392
|
-
async calcByDataAccessAction(dataAccessAction, data, appDeId) {
|
|
9550
|
+
async calcByDataAccessAction(dataAccessAction, context, data, appDeId) {
|
|
9393
9551
|
const result = true;
|
|
9394
9552
|
if (this.enablePermission) {
|
|
9395
9553
|
const app = await ibiz.hub.getApp(this.appModel.appId);
|
|
@@ -9398,9 +9556,14 @@ var AuthorityService = class {
|
|
|
9398
9556
|
return false;
|
|
9399
9557
|
}
|
|
9400
9558
|
}
|
|
9401
|
-
if (
|
|
9559
|
+
if (appDeId) {
|
|
9402
9560
|
const service = await this.getService(appDeId);
|
|
9403
|
-
return service.calcByDataAccessAction(
|
|
9561
|
+
return service.calcByDataAccessAction(
|
|
9562
|
+
dataAccessAction,
|
|
9563
|
+
data,
|
|
9564
|
+
context,
|
|
9565
|
+
this.enablePermission
|
|
9566
|
+
);
|
|
9404
9567
|
}
|
|
9405
9568
|
return result;
|
|
9406
9569
|
}
|
|
@@ -9444,18 +9607,18 @@ var V7AuthService = class {
|
|
|
9444
9607
|
});
|
|
9445
9608
|
const { data } = res;
|
|
9446
9609
|
if (data && data.token) {
|
|
9447
|
-
const
|
|
9610
|
+
const cacheDay = remember ? 30 : 0;
|
|
9448
9611
|
if (remember) {
|
|
9449
|
-
setCookie(CoreConst.TOKEN_REMEMBER, "1",
|
|
9612
|
+
setCookie(CoreConst.TOKEN_REMEMBER, "1", cacheDay, true);
|
|
9450
9613
|
}
|
|
9451
|
-
setCookie(CoreConst.TOKEN, data.token,
|
|
9614
|
+
setCookie(CoreConst.TOKEN, data.token, cacheDay, true);
|
|
9452
9615
|
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
|
|
9453
|
-
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate),
|
|
9616
|
+
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDay, true);
|
|
9454
9617
|
if (data.refresh_token) {
|
|
9455
9618
|
setCookie(
|
|
9456
9619
|
CoreConst.REFRESH_TOKEN,
|
|
9457
9620
|
data.refresh_token,
|
|
9458
|
-
|
|
9621
|
+
cacheDay,
|
|
9459
9622
|
true
|
|
9460
9623
|
);
|
|
9461
9624
|
}
|
|
@@ -9502,7 +9665,7 @@ var V7AuthService = class {
|
|
|
9502
9665
|
setTimeout(async () => {
|
|
9503
9666
|
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
9504
9667
|
const refreshToken = getCookie(CoreConst.REFRESH_TOKEN);
|
|
9505
|
-
const cacheDay = remember ?
|
|
9668
|
+
const cacheDay = remember ? 30 : 0;
|
|
9506
9669
|
let res;
|
|
9507
9670
|
if (refreshToken != null && refreshToken !== "") {
|
|
9508
9671
|
res = await ibiz.net.get("/uaa/refresh_token/".concat(refreshToken));
|
|
@@ -9510,6 +9673,9 @@ var V7AuthService = class {
|
|
|
9510
9673
|
res = await ibiz.net.get("/uaa/refreshtoken2");
|
|
9511
9674
|
}
|
|
9512
9675
|
if (res.ok) {
|
|
9676
|
+
if (remember) {
|
|
9677
|
+
setCookie(CoreConst.TOKEN_REMEMBER, "1", cacheDay, true);
|
|
9678
|
+
}
|
|
9513
9679
|
setCookie(CoreConst.TOKEN, res.data.token, cacheDay, true);
|
|
9514
9680
|
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (res.data.expirein || 7199) * 1e3;
|
|
9515
9681
|
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDay, true);
|
|
@@ -9530,6 +9696,31 @@ var V7AuthService = class {
|
|
|
9530
9696
|
}, wait);
|
|
9531
9697
|
}
|
|
9532
9698
|
}
|
|
9699
|
+
async refreshToken() {
|
|
9700
|
+
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
9701
|
+
const refreshToken = getCookie(CoreConst.REFRESH_TOKEN);
|
|
9702
|
+
if (refreshToken != null && refreshToken !== "") {
|
|
9703
|
+
const res = await ibiz.net.get("/uaa/refresh_token/".concat(refreshToken));
|
|
9704
|
+
if (res.ok) {
|
|
9705
|
+
const cacheDay = remember ? 30 : 0;
|
|
9706
|
+
if (remember) {
|
|
9707
|
+
setCookie(CoreConst.TOKEN_REMEMBER, "1", cacheDay, true);
|
|
9708
|
+
}
|
|
9709
|
+
setCookie(CoreConst.TOKEN, res.data.token, cacheDay, true);
|
|
9710
|
+
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (res.data.expirein || 7199) * 1e3;
|
|
9711
|
+
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDay, true);
|
|
9712
|
+
if (res.data.refresh_token) {
|
|
9713
|
+
setCookie(
|
|
9714
|
+
CoreConst.REFRESH_TOKEN,
|
|
9715
|
+
res.data.refresh_token,
|
|
9716
|
+
cacheDay,
|
|
9717
|
+
true
|
|
9718
|
+
);
|
|
9719
|
+
}
|
|
9720
|
+
clearCookie(CoreConst.IS_ANONYMOUS);
|
|
9721
|
+
}
|
|
9722
|
+
}
|
|
9723
|
+
}
|
|
9533
9724
|
getAuthInfo() {
|
|
9534
9725
|
const token = getCookie(CoreConst.TOKEN);
|
|
9535
9726
|
const isAnonymous = !!getCookie(CoreConst.IS_ANONYMOUS);
|
|
@@ -10951,7 +11142,7 @@ var DELogic = class {
|
|
|
10951
11142
|
const bol = await link.exec(ctx);
|
|
10952
11143
|
if (bol && link.dstNode) {
|
|
10953
11144
|
await this.deepExec(link.dstNode, ctx);
|
|
10954
|
-
if (node.model.parallelOutput
|
|
11145
|
+
if (node.model.parallelOutput !== true) {
|
|
10955
11146
|
break;
|
|
10956
11147
|
}
|
|
10957
11148
|
}
|
|
@@ -13200,7 +13391,7 @@ function installCommand() {
|
|
|
13200
13391
|
}
|
|
13201
13392
|
|
|
13202
13393
|
// src/app-hub.ts
|
|
13203
|
-
import { RuntimeError as
|
|
13394
|
+
import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
|
|
13204
13395
|
|
|
13205
13396
|
// src/application.ts
|
|
13206
13397
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -13956,7 +14147,7 @@ var UIActionButtonState = class {
|
|
|
13956
14147
|
* @param {string} [appDeId] 数据对应的实体id
|
|
13957
14148
|
* @return {*}
|
|
13958
14149
|
*/
|
|
13959
|
-
async calcPermission(data, appDeId) {
|
|
14150
|
+
async calcPermission(context, data, appDeId) {
|
|
13960
14151
|
if (!this.dataAccessAction) {
|
|
13961
14152
|
return;
|
|
13962
14153
|
}
|
|
@@ -13968,15 +14159,16 @@ var UIActionButtonState = class {
|
|
|
13968
14159
|
}
|
|
13969
14160
|
this.permitted = await app.authority.calcByDataAccessAction(
|
|
13970
14161
|
this.dataAccessAction,
|
|
14162
|
+
context,
|
|
13971
14163
|
data,
|
|
13972
14164
|
appDeId
|
|
13973
14165
|
);
|
|
13974
14166
|
}
|
|
13975
|
-
async update(data, appDeId) {
|
|
14167
|
+
async update(context, data, appDeId) {
|
|
13976
14168
|
if (!this.isInit) {
|
|
13977
14169
|
await this.init();
|
|
13978
14170
|
}
|
|
13979
|
-
await this.calcPermission(data, appDeId);
|
|
14171
|
+
await this.calcPermission(context, data, appDeId);
|
|
13980
14172
|
if (!this.permitted) {
|
|
13981
14173
|
this.disabled = true;
|
|
13982
14174
|
this.visible = !this.noPermissionHidden;
|
|
@@ -14025,10 +14217,10 @@ var ButtonContainerState = class {
|
|
|
14025
14217
|
}
|
|
14026
14218
|
});
|
|
14027
14219
|
}
|
|
14028
|
-
async update(data, appDeId) {
|
|
14220
|
+
async update(context, data, appDeId) {
|
|
14029
14221
|
await Promise.all(
|
|
14030
14222
|
this.children.map((child) => {
|
|
14031
|
-
return child.update(data, appDeId);
|
|
14223
|
+
return child.update(context, data, appDeId);
|
|
14032
14224
|
})
|
|
14033
14225
|
);
|
|
14034
14226
|
}
|
|
@@ -15585,7 +15777,12 @@ var CodeListEditorController = class extends EditorController {
|
|
|
15585
15777
|
};
|
|
15586
15778
|
|
|
15587
15779
|
// src/controller/common/control/control.controller.ts
|
|
15588
|
-
import {
|
|
15780
|
+
import {
|
|
15781
|
+
HttpError as HttpError6,
|
|
15782
|
+
IBizContext as IBizContext3,
|
|
15783
|
+
IBizParams,
|
|
15784
|
+
NoticeError as NoticeError2
|
|
15785
|
+
} from "@ibiz-template/core";
|
|
15589
15786
|
import { clone as clone18, isNil as isNil23 } from "ramda";
|
|
15590
15787
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
15591
15788
|
var ControlController = class extends BaseController {
|
|
@@ -15912,6 +16109,9 @@ var ControlController = class extends BaseController {
|
|
|
15912
16109
|
return;
|
|
15913
16110
|
}
|
|
15914
16111
|
if (opts == null ? void 0 : opts.error) {
|
|
16112
|
+
if (opts.error instanceof HttpError6 && opts.error.status !== 500) {
|
|
16113
|
+
throw opts.error;
|
|
16114
|
+
}
|
|
15915
16115
|
ibiz.log.error(opts.error);
|
|
15916
16116
|
throw new NoticeError2(message, duration);
|
|
15917
16117
|
} else {
|
|
@@ -19623,7 +19823,7 @@ var UILogic = class {
|
|
|
19623
19823
|
const bol = await link.exec(ctx);
|
|
19624
19824
|
if (bol && link.dstNode) {
|
|
19625
19825
|
await this.deepExec(link.dstNode, ctx);
|
|
19626
|
-
if (node.model.parallelOutput
|
|
19826
|
+
if (node.model.parallelOutput !== true) {
|
|
19627
19827
|
break;
|
|
19628
19828
|
}
|
|
19629
19829
|
}
|
|
@@ -20552,7 +20752,7 @@ var ToolbarController = class extends ControlController {
|
|
|
20552
20752
|
{ childrenFields: ["detoolbarItems"] }
|
|
20553
20753
|
);
|
|
20554
20754
|
if (!this.state.manualCalcButtonState) {
|
|
20555
|
-
await this.calcButtonState();
|
|
20755
|
+
await this.calcButtonState(void 0, this.model.appDataEntityId);
|
|
20556
20756
|
} else {
|
|
20557
20757
|
await this.state.buttonsState.init();
|
|
20558
20758
|
}
|
|
@@ -20584,7 +20784,7 @@ var ToolbarController = class extends ControlController {
|
|
|
20584
20784
|
if (data && data instanceof ControlVO) {
|
|
20585
20785
|
_data = data.getOrigin();
|
|
20586
20786
|
}
|
|
20587
|
-
await this.state.buttonsState.update(_data, appDeId);
|
|
20787
|
+
await this.state.buttonsState.update(this.context, _data, appDeId);
|
|
20588
20788
|
if (this.scheduler) {
|
|
20589
20789
|
const logicParams = {};
|
|
20590
20790
|
if (_data) {
|
|
@@ -20977,6 +21177,7 @@ var PortletPartController = class {
|
|
|
20977
21177
|
}
|
|
20978
21178
|
if (data) {
|
|
20979
21179
|
this.state.actionGroupState.update(
|
|
21180
|
+
this.context,
|
|
20980
21181
|
data,
|
|
20981
21182
|
this.dashboard.view.model.appDataEntityId
|
|
20982
21183
|
);
|
|
@@ -21007,7 +21208,7 @@ var PortletPartController = class {
|
|
|
21007
21208
|
containerState.addState(detail.id, buttonState);
|
|
21008
21209
|
}
|
|
21009
21210
|
});
|
|
21010
|
-
await containerState.update();
|
|
21211
|
+
await containerState.update(this.dashboard.context);
|
|
21011
21212
|
this.state.actionGroupState = containerState;
|
|
21012
21213
|
const { appDataEntityId } = this.dashboard.view.model;
|
|
21013
21214
|
if (appDataEntityId) {
|
|
@@ -21046,7 +21247,7 @@ var PortletPartController = class {
|
|
|
21046
21247
|
async dataChangeNotify(data) {
|
|
21047
21248
|
if (this.state.actionGroupState) {
|
|
21048
21249
|
const { appDataEntityId } = this.dashboard.view.model;
|
|
21049
|
-
this.state.actionGroupState.update(data, appDataEntityId);
|
|
21250
|
+
this.state.actionGroupState.update(this.context, data, appDataEntityId);
|
|
21050
21251
|
}
|
|
21051
21252
|
this.calcDynaClass(data);
|
|
21052
21253
|
}
|
|
@@ -21213,7 +21414,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21213
21414
|
containerState.addState(detail.id, buttonState);
|
|
21214
21415
|
}
|
|
21215
21416
|
});
|
|
21216
|
-
await containerState.update();
|
|
21417
|
+
await containerState.update(this.context);
|
|
21217
21418
|
group.groupActionGroupState = containerState;
|
|
21218
21419
|
});
|
|
21219
21420
|
}
|
|
@@ -21251,12 +21452,14 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21251
21452
|
}
|
|
21252
21453
|
if (tempData) {
|
|
21253
21454
|
(_a2 = group.groupActionGroupState) == null ? void 0 : _a2.update(
|
|
21455
|
+
this.context,
|
|
21254
21456
|
tempData,
|
|
21255
21457
|
this.model.appDataEntityId
|
|
21256
21458
|
);
|
|
21257
21459
|
}
|
|
21258
21460
|
} else {
|
|
21259
21461
|
(_b = group.groupActionGroupState) == null ? void 0 : _b.update(
|
|
21462
|
+
this.context,
|
|
21260
21463
|
void 0,
|
|
21261
21464
|
this.model.appDataEntityId
|
|
21262
21465
|
);
|
|
@@ -21268,6 +21471,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21268
21471
|
});
|
|
21269
21472
|
if (actionGroup) {
|
|
21270
21473
|
(_a = actionGroup.groupActionGroupState) == null ? void 0 : _a.update(
|
|
21474
|
+
this.context,
|
|
21271
21475
|
actionGroup.selectedData[0],
|
|
21272
21476
|
this.model.appDataEntityId
|
|
21273
21477
|
);
|
|
@@ -21340,7 +21544,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21340
21544
|
containerState.addState(detail.id, buttonState);
|
|
21341
21545
|
}
|
|
21342
21546
|
});
|
|
21343
|
-
containerState.update(item.getOrigin());
|
|
21547
|
+
containerState.update(this.context, item.getOrigin());
|
|
21344
21548
|
}
|
|
21345
21549
|
return containerState;
|
|
21346
21550
|
}
|
|
@@ -22332,9 +22536,13 @@ import {
|
|
|
22332
22536
|
debounceAndAsyncMerge,
|
|
22333
22537
|
recursiveIterate as recursiveIterate3
|
|
22334
22538
|
} from "@ibiz-template/core";
|
|
22539
|
+
import { clone as clone24 } from "ramda";
|
|
22335
22540
|
var FormController = class extends ControlController {
|
|
22336
|
-
constructor() {
|
|
22337
|
-
|
|
22541
|
+
constructor(model, context, params, ctx) {
|
|
22542
|
+
if (context && (context.srfreadonly === true || context.srfreadonly === "true")) {
|
|
22543
|
+
model = clone24(model);
|
|
22544
|
+
}
|
|
22545
|
+
super(model, context, params, ctx);
|
|
22338
22546
|
/**
|
|
22339
22547
|
* 所有表单项成员的控制器
|
|
22340
22548
|
*
|
|
@@ -23465,7 +23673,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
23465
23673
|
async formStateNotify(_state) {
|
|
23466
23674
|
if (this.actionState) {
|
|
23467
23675
|
const deCodeName = calcDeCodeNameById(this.form.model.appDataEntityId);
|
|
23468
|
-
await this.actionState.update(this.data, deCodeName);
|
|
23676
|
+
await this.actionState.update(this.context, this.data, deCodeName);
|
|
23469
23677
|
}
|
|
23470
23678
|
await super.formStateNotify(_state);
|
|
23471
23679
|
}
|
|
@@ -23792,7 +24000,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
23792
24000
|
containerState.addState(detail.id, buttonState);
|
|
23793
24001
|
}
|
|
23794
24002
|
});
|
|
23795
|
-
await containerState.update();
|
|
24003
|
+
await containerState.update(this.form.context);
|
|
23796
24004
|
this.state.actionGroupState = containerState;
|
|
23797
24005
|
}
|
|
23798
24006
|
/**
|
|
@@ -24542,7 +24750,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
24542
24750
|
|
|
24543
24751
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
24544
24752
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
24545
|
-
import { clone as
|
|
24753
|
+
import { clone as clone25 } from "ramda";
|
|
24546
24754
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
24547
24755
|
constructor() {
|
|
24548
24756
|
super(...arguments);
|
|
@@ -24626,7 +24834,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
24626
24834
|
copyFields.forEach((key) => {
|
|
24627
24835
|
tempForm[key] = this.form.model[key];
|
|
24628
24836
|
});
|
|
24629
|
-
this.repeatedForm =
|
|
24837
|
+
this.repeatedForm = clone25(tempForm);
|
|
24630
24838
|
}
|
|
24631
24839
|
/**
|
|
24632
24840
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -24803,7 +25011,7 @@ import {
|
|
|
24803
25011
|
} from "@ibiz-template/core";
|
|
24804
25012
|
import { debounce as debounce2 } from "lodash-es";
|
|
24805
25013
|
import { createUUID as createUUID12 } from "qx-util";
|
|
24806
|
-
import { clone as
|
|
25014
|
+
import { clone as clone26 } from "ramda";
|
|
24807
25015
|
|
|
24808
25016
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
24809
25017
|
import {
|
|
@@ -25168,8 +25376,8 @@ var EditFormController = class extends FormController {
|
|
|
25168
25376
|
* @return {*} {Promise<IData>}
|
|
25169
25377
|
*/
|
|
25170
25378
|
async copy() {
|
|
25171
|
-
const context =
|
|
25172
|
-
const queryParams =
|
|
25379
|
+
const context = clone26(this.context);
|
|
25380
|
+
const queryParams = clone26(this.params);
|
|
25173
25381
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
25174
25382
|
this.model.appDataEntityId,
|
|
25175
25383
|
this.model.appId
|
|
@@ -25226,7 +25434,7 @@ var EditFormController = class extends FormController {
|
|
|
25226
25434
|
return this.loadDraft();
|
|
25227
25435
|
}
|
|
25228
25436
|
const { context, params } = this.handlerAbilityParams(args);
|
|
25229
|
-
const queryParams =
|
|
25437
|
+
const queryParams = clone26(params);
|
|
25230
25438
|
let res;
|
|
25231
25439
|
try {
|
|
25232
25440
|
await this.startLoading();
|
|
@@ -25799,7 +26007,7 @@ import {
|
|
|
25799
26007
|
RuntimeError as RuntimeError55,
|
|
25800
26008
|
RuntimeModelError as RuntimeModelError62
|
|
25801
26009
|
} from "@ibiz-template/core";
|
|
25802
|
-
import { clone as
|
|
26010
|
+
import { clone as clone27 } from "ramda";
|
|
25803
26011
|
|
|
25804
26012
|
// src/controller/control/grid/grid/grid.service.ts
|
|
25805
26013
|
import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
@@ -26109,7 +26317,7 @@ var GridController = class extends MDControlController {
|
|
|
26109
26317
|
const result = await calcColumnModelBySchema(json, this);
|
|
26110
26318
|
if (result && result.degridColumns.length > 0) {
|
|
26111
26319
|
const { degridColumns, degridDataItems } = result;
|
|
26112
|
-
this.model =
|
|
26320
|
+
this.model = clone27(this.model);
|
|
26113
26321
|
this.model.degridColumns = [
|
|
26114
26322
|
...(this.model.degridColumns || []).filter((item) => {
|
|
26115
26323
|
return degridColumns.findIndex((x) => x.id === item.id) === -1;
|
|
@@ -26190,12 +26398,20 @@ var GridController = class extends MDControlController {
|
|
|
26190
26398
|
});
|
|
26191
26399
|
this.state.rows.forEach((row) => {
|
|
26192
26400
|
Object.values(row.uaColStates).forEach((uaState) => {
|
|
26193
|
-
uaState.update(
|
|
26401
|
+
uaState.update(
|
|
26402
|
+
this.context,
|
|
26403
|
+
row.data.getOrigin(),
|
|
26404
|
+
this.model.appDataEntityId
|
|
26405
|
+
);
|
|
26194
26406
|
});
|
|
26195
26407
|
});
|
|
26196
26408
|
this.state.rows.forEach((row) => {
|
|
26197
26409
|
Object.values(row.uiActionGroupStates).forEach((uaState) => {
|
|
26198
|
-
uaState.update(
|
|
26410
|
+
uaState.update(
|
|
26411
|
+
this.context,
|
|
26412
|
+
row.data.getOrigin(),
|
|
26413
|
+
this.model.appDataEntityId
|
|
26414
|
+
);
|
|
26199
26415
|
});
|
|
26200
26416
|
});
|
|
26201
26417
|
this.calcGroupData(items);
|
|
@@ -26636,7 +26852,7 @@ var GridController = class extends MDControlController {
|
|
|
26636
26852
|
throw new RuntimeError55("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
26637
26853
|
}
|
|
26638
26854
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
26639
|
-
row.cacheData =
|
|
26855
|
+
row.cacheData = clone27(row.data);
|
|
26640
26856
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
26641
26857
|
Object.assign(row.data, defaultVal);
|
|
26642
26858
|
}
|
|
@@ -26805,7 +27021,7 @@ var GridController = class extends MDControlController {
|
|
|
26805
27021
|
}
|
|
26806
27022
|
});
|
|
26807
27023
|
}
|
|
26808
|
-
const cloneData =
|
|
27024
|
+
const cloneData = clone27(
|
|
26809
27025
|
data2.map((item) => {
|
|
26810
27026
|
return item.getOrigin();
|
|
26811
27027
|
})
|
|
@@ -27045,7 +27261,7 @@ var GridController = class extends MDControlController {
|
|
|
27045
27261
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
27046
27262
|
import dayjs5 from "dayjs";
|
|
27047
27263
|
import { debounce as debounce3 } from "lodash-es";
|
|
27048
|
-
import { clone as
|
|
27264
|
+
import { clone as clone28, isNil as isNil26 } from "ramda";
|
|
27049
27265
|
var GridFieldColumnController = class extends GridColumnController {
|
|
27050
27266
|
constructor() {
|
|
27051
27267
|
super(...arguments);
|
|
@@ -27183,7 +27399,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
27183
27399
|
srfkey: value,
|
|
27184
27400
|
...wfContext
|
|
27185
27401
|
});
|
|
27186
|
-
const tempParams =
|
|
27402
|
+
const tempParams = clone28(this.params);
|
|
27187
27403
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
27188
27404
|
row.data,
|
|
27189
27405
|
tempContext,
|
|
@@ -28577,14 +28793,16 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
28577
28793
|
|
|
28578
28794
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
28579
28795
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
28580
|
-
import { clone as
|
|
28796
|
+
import { clone as clone30, isNil as isNil28 } from "ramda";
|
|
28581
28797
|
import { isString as isString2 } from "lodash-es";
|
|
28582
28798
|
|
|
28583
28799
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
28584
28800
|
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
28585
28801
|
var ExcludeOPs = [
|
|
28586
28802
|
"ISNULL" /* IS_NULL */,
|
|
28587
|
-
"ISNOTNULL" /* IS_NOT_NULL
|
|
28803
|
+
"ISNOTNULL" /* IS_NOT_NULL */,
|
|
28804
|
+
"EXISTS" /* EXISTS */,
|
|
28805
|
+
"NOTEXISTS" /* NOT_EXISTS */
|
|
28588
28806
|
];
|
|
28589
28807
|
var ScriptValueRegex = /\$\{[^}]*\}/;
|
|
28590
28808
|
var SearchBarFilterController = class {
|
|
@@ -29031,6 +29249,14 @@ function getOriginFilterNodes() {
|
|
|
29031
29249
|
}
|
|
29032
29250
|
function formatFilters(node) {
|
|
29033
29251
|
if (!node.leaf) {
|
|
29252
|
+
if (node.logicType === "ITEMS") {
|
|
29253
|
+
return {
|
|
29254
|
+
condtype: "ITEMS",
|
|
29255
|
+
fieldname: node.field,
|
|
29256
|
+
condop: node.valueOP,
|
|
29257
|
+
searchconds: node.children.map((item) => formatFilters(item))
|
|
29258
|
+
};
|
|
29259
|
+
}
|
|
29034
29260
|
return {
|
|
29035
29261
|
condtype: "GROUP",
|
|
29036
29262
|
condop: node.logicType,
|
|
@@ -29060,6 +29286,17 @@ function parseFilters(data) {
|
|
|
29060
29286
|
)
|
|
29061
29287
|
};
|
|
29062
29288
|
}
|
|
29289
|
+
if (data.condtype === "ITEMS") {
|
|
29290
|
+
return {
|
|
29291
|
+
leaf: false,
|
|
29292
|
+
logicType: "ITEMS",
|
|
29293
|
+
field: data.fieldname || null,
|
|
29294
|
+
valueOP: data.condop || null,
|
|
29295
|
+
children: (data.searchconds || []).map(
|
|
29296
|
+
(item) => parseFilters(item)
|
|
29297
|
+
)
|
|
29298
|
+
};
|
|
29299
|
+
}
|
|
29063
29300
|
if (data.condtype === "DEFIELD") {
|
|
29064
29301
|
return {
|
|
29065
29302
|
leaf: true,
|
|
@@ -29089,6 +29326,140 @@ function calcSearchConds(filterNodes) {
|
|
|
29089
29326
|
}
|
|
29090
29327
|
}
|
|
29091
29328
|
|
|
29329
|
+
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
29330
|
+
import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
|
|
29331
|
+
import { clone as clone29 } from "ramda";
|
|
29332
|
+
var ExcludeOPs2 = [
|
|
29333
|
+
"ISNULL" /* IS_NULL */,
|
|
29334
|
+
"ISNOTNULL" /* IS_NOT_NULL */
|
|
29335
|
+
];
|
|
29336
|
+
var SubFieldRegex = /^N_(.\w+)_(.\w+)$/;
|
|
29337
|
+
var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
29338
|
+
constructor(filterModels, appDataEntity, context, params) {
|
|
29339
|
+
super(filterModels[0], appDataEntity, context, params);
|
|
29340
|
+
this.filterModels = filterModels;
|
|
29341
|
+
/**
|
|
29342
|
+
* 所有可以配置的子属性集合
|
|
29343
|
+
* @author lxm
|
|
29344
|
+
* @date 2024-03-14 04:20:10
|
|
29345
|
+
* @type {Array<FieldInfo>}
|
|
29346
|
+
*/
|
|
29347
|
+
this.allFields = [];
|
|
29348
|
+
/**
|
|
29349
|
+
* 子编辑项控制器
|
|
29350
|
+
* @author lxm
|
|
29351
|
+
* @date 2024-03-14 04:53:26
|
|
29352
|
+
* @protected
|
|
29353
|
+
* @type {Map<string, SearchBarFilterController>}
|
|
29354
|
+
*/
|
|
29355
|
+
this.subFilterCMap = /* @__PURE__ */ new Map();
|
|
29356
|
+
}
|
|
29357
|
+
/**
|
|
29358
|
+
* 计算标识
|
|
29359
|
+
* @author lxm
|
|
29360
|
+
* @date 2024-03-14 05:06:14
|
|
29361
|
+
* @protected
|
|
29362
|
+
* @param {string} field
|
|
29363
|
+
* @param {string} op
|
|
29364
|
+
* @return {*} {string}
|
|
29365
|
+
*/
|
|
29366
|
+
calcKey(field, op) {
|
|
29367
|
+
return "".concat(field.toUpperCase(), "_").concat(op.toUpperCase());
|
|
29368
|
+
}
|
|
29369
|
+
/**
|
|
29370
|
+
* 初始化子实体
|
|
29371
|
+
* @author lxm
|
|
29372
|
+
* @date 2024-03-14 04:43:04
|
|
29373
|
+
* @protected
|
|
29374
|
+
* @return {*} {Promise<void>}
|
|
29375
|
+
*/
|
|
29376
|
+
async initMinorAppDE() {
|
|
29377
|
+
var _a;
|
|
29378
|
+
const targetField = this.filterModels[0].appDEFieldId;
|
|
29379
|
+
let minorDEId = "";
|
|
29380
|
+
(_a = this.appDataEntity.appDEMethodDTOs) == null ? void 0 : _a.find((item) => {
|
|
29381
|
+
var _a2;
|
|
29382
|
+
const field = (_a2 = item.appDEMethodDTOFields) == null ? void 0 : _a2.find((x) => {
|
|
29383
|
+
return x.appDEFieldId === targetField;
|
|
29384
|
+
});
|
|
29385
|
+
if (field) {
|
|
29386
|
+
minorDEId = field.refAppDataEntityId;
|
|
29387
|
+
return true;
|
|
29388
|
+
}
|
|
29389
|
+
return false;
|
|
29390
|
+
});
|
|
29391
|
+
if (!minorDEId) {
|
|
29392
|
+
throw new RuntimeError59("\u627E\u4E0D\u5230\u5C5E\u6027".concat(targetField, "\u5BF9\u5E94\u7684\u5173\u8054\u5B9E\u4F53"));
|
|
29393
|
+
}
|
|
29394
|
+
this.minorAppDE = await ibiz.hub.getAppDataEntity(
|
|
29395
|
+
minorDEId,
|
|
29396
|
+
this.context.srfappid
|
|
29397
|
+
);
|
|
29398
|
+
}
|
|
29399
|
+
/**
|
|
29400
|
+
* 初始化子实体目标属性相关信息
|
|
29401
|
+
* @author lxm
|
|
29402
|
+
* @date 2024-03-14 04:42:32
|
|
29403
|
+
* @protected
|
|
29404
|
+
* @return {*} {Promise<void>}
|
|
29405
|
+
*/
|
|
29406
|
+
async initAllFields() {
|
|
29407
|
+
var _a;
|
|
29408
|
+
const fieldMap = /* @__PURE__ */ new Map();
|
|
29409
|
+
this.filterModels.forEach((item) => {
|
|
29410
|
+
var _a2;
|
|
29411
|
+
const subStr = (_a2 = item.defsearchMode.codeName) == null ? void 0 : _a2.split("__")[1];
|
|
29412
|
+
const matches = subStr.match(SubFieldRegex);
|
|
29413
|
+
const subField = matches[1];
|
|
29414
|
+
const subOP = matches[2];
|
|
29415
|
+
if (!fieldMap.has(subField)) {
|
|
29416
|
+
fieldMap.set(subField, {
|
|
29417
|
+
name: subField,
|
|
29418
|
+
label: "",
|
|
29419
|
+
valueOPs: []
|
|
29420
|
+
});
|
|
29421
|
+
}
|
|
29422
|
+
fieldMap.get(subField).valueOPs.push(subOP);
|
|
29423
|
+
const cloneItem = clone29(item);
|
|
29424
|
+
cloneItem.defsearchMode.valueOP = subOP;
|
|
29425
|
+
this.subFilterCMap.set(
|
|
29426
|
+
this.calcKey(subField, subOP),
|
|
29427
|
+
new SearchBarFilterController(
|
|
29428
|
+
cloneItem,
|
|
29429
|
+
this.appDataEntity,
|
|
29430
|
+
this.context,
|
|
29431
|
+
this.params
|
|
29432
|
+
)
|
|
29433
|
+
);
|
|
29434
|
+
});
|
|
29435
|
+
(_a = this.minorAppDE.appDEFields) == null ? void 0 : _a.forEach((item) => {
|
|
29436
|
+
const codeName = item.codeName.toUpperCase();
|
|
29437
|
+
if (fieldMap.has(codeName)) {
|
|
29438
|
+
fieldMap.get(codeName).label = item.logicName;
|
|
29439
|
+
}
|
|
29440
|
+
});
|
|
29441
|
+
this.allFields = Array.from(fieldMap.values());
|
|
29442
|
+
await Promise.all(
|
|
29443
|
+
Array.from(this.subFilterCMap.values()).map((item) => item.init())
|
|
29444
|
+
);
|
|
29445
|
+
}
|
|
29446
|
+
async init() {
|
|
29447
|
+
await this.initMinorAppDE();
|
|
29448
|
+
await this.initAllFields();
|
|
29449
|
+
}
|
|
29450
|
+
/**
|
|
29451
|
+
* 获取子搜索栏控制器
|
|
29452
|
+
* @author lxm
|
|
29453
|
+
* @date 2024-03-15 02:51:02
|
|
29454
|
+
* @param {string} field
|
|
29455
|
+
* @param {string} op
|
|
29456
|
+
* @return {*} {SearchBarFilterController}
|
|
29457
|
+
*/
|
|
29458
|
+
getSubFilterController(field, op) {
|
|
29459
|
+
return this.subFilterCMap.get(this.calcKey(field, op));
|
|
29460
|
+
}
|
|
29461
|
+
};
|
|
29462
|
+
|
|
29092
29463
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
29093
29464
|
var ScriptValueRegex2 = /\$\{[^}]*\}/;
|
|
29094
29465
|
var SearchBarController = class extends ControlController {
|
|
@@ -29229,7 +29600,7 @@ var SearchBarController = class extends ControlController {
|
|
|
29229
29600
|
}
|
|
29230
29601
|
});
|
|
29231
29602
|
if (addSearchBarFilters.length > 0) {
|
|
29232
|
-
this.model =
|
|
29603
|
+
this.model = clone30(this.model);
|
|
29233
29604
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
29234
29605
|
this.model.enableFilter = true;
|
|
29235
29606
|
}
|
|
@@ -29346,7 +29717,17 @@ var SearchBarController = class extends ControlController {
|
|
|
29346
29717
|
async initSearchBarFilters() {
|
|
29347
29718
|
var _a;
|
|
29348
29719
|
if ((_a = this.searchBarFilters) == null ? void 0 : _a.length) {
|
|
29720
|
+
const itemsMap = /* @__PURE__ */ new Map();
|
|
29349
29721
|
this.searchBarFilters.forEach((item) => {
|
|
29722
|
+
var _a2;
|
|
29723
|
+
if (((_a2 = item.defsearchMode) == null ? void 0 : _a2.valueOP) && ["EXISTS", "NOTEXISTS"].includes(item.defsearchMode.valueOP)) {
|
|
29724
|
+
const key = "".concat(item.appDEFieldId, "_").concat(item.defsearchMode.valueOP);
|
|
29725
|
+
if (!itemsMap.has(key)) {
|
|
29726
|
+
itemsMap.set(key, []);
|
|
29727
|
+
}
|
|
29728
|
+
itemsMap.get(key).push(item);
|
|
29729
|
+
return;
|
|
29730
|
+
}
|
|
29350
29731
|
const filterController = new SearchBarFilterController(
|
|
29351
29732
|
item,
|
|
29352
29733
|
this.appDataEntity,
|
|
@@ -29355,6 +29736,17 @@ var SearchBarController = class extends ControlController {
|
|
|
29355
29736
|
);
|
|
29356
29737
|
this.filterControllers.push(filterController);
|
|
29357
29738
|
});
|
|
29739
|
+
if (itemsMap.size > 0) {
|
|
29740
|
+
itemsMap.forEach((items) => {
|
|
29741
|
+
const filterController = new SearchBarFilterItemsController(
|
|
29742
|
+
items,
|
|
29743
|
+
this.appDataEntity,
|
|
29744
|
+
this.context,
|
|
29745
|
+
this.params
|
|
29746
|
+
);
|
|
29747
|
+
this.filterControllers.push(filterController);
|
|
29748
|
+
});
|
|
29749
|
+
}
|
|
29358
29750
|
await Promise.all(
|
|
29359
29751
|
this.filterControllers.map((controller) => controller.init())
|
|
29360
29752
|
);
|
|
@@ -29374,12 +29766,22 @@ var SearchBarController = class extends ControlController {
|
|
|
29374
29766
|
if (valueFormat && searchconds) {
|
|
29375
29767
|
recursiveIterate10(
|
|
29376
29768
|
searchconds[0],
|
|
29377
|
-
(node) => {
|
|
29769
|
+
(node, parent) => {
|
|
29378
29770
|
if (node.condtype === "DEFIELD" && !isNil28(node.value)) {
|
|
29379
|
-
|
|
29771
|
+
let controller = this.findFilterController(
|
|
29380
29772
|
node.fieldname,
|
|
29381
29773
|
node.condop
|
|
29382
29774
|
);
|
|
29775
|
+
if (!controller && parent.condtype === "ITEMS") {
|
|
29776
|
+
const itemC = this.findFilterController(
|
|
29777
|
+
parent.fieldname,
|
|
29778
|
+
parent.condop
|
|
29779
|
+
);
|
|
29780
|
+
controller = itemC.getSubFilterController(
|
|
29781
|
+
node.fieldname,
|
|
29782
|
+
node.condop
|
|
29783
|
+
);
|
|
29784
|
+
}
|
|
29383
29785
|
if (controller) {
|
|
29384
29786
|
if (controller.valueItem && node.valueItem) {
|
|
29385
29787
|
node.value = node.valueItem;
|
|
@@ -29817,7 +30219,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
29817
30219
|
|
|
29818
30220
|
// src/controller/control/tree/tree.controller.ts
|
|
29819
30221
|
import {
|
|
29820
|
-
RuntimeError as
|
|
30222
|
+
RuntimeError as RuntimeError60,
|
|
29821
30223
|
RuntimeModelError as RuntimeModelError65,
|
|
29822
30224
|
recursiveIterate as recursiveIterate11
|
|
29823
30225
|
} from "@ibiz-template/core";
|
|
@@ -30854,7 +31256,7 @@ var TreeController = class extends MDControlController {
|
|
|
30854
31256
|
throw new RuntimeModelError65(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
30855
31257
|
}
|
|
30856
31258
|
if (nodeData._nodeType !== "DE") {
|
|
30857
|
-
throw new
|
|
31259
|
+
throw new RuntimeError60("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
30858
31260
|
}
|
|
30859
31261
|
nodeData._text = text;
|
|
30860
31262
|
await this.updateDeNodeData([nodeData]);
|
|
@@ -30869,7 +31271,7 @@ var TreeController = class extends MDControlController {
|
|
|
30869
31271
|
let needRefresh = false;
|
|
30870
31272
|
const treeNode = this.getNodeModel(item._nodeId);
|
|
30871
31273
|
if (!treeNode) {
|
|
30872
|
-
throw new
|
|
31274
|
+
throw new RuntimeError60("\u672A\u627E\u5230\u6811\u8282\u70B9");
|
|
30873
31275
|
}
|
|
30874
31276
|
const nodeAppDataEntityId = treeNode.appDataEntityId;
|
|
30875
31277
|
if (nodeAppDataEntityId) {
|
|
@@ -30888,7 +31290,7 @@ var TreeController = class extends MDControlController {
|
|
|
30888
31290
|
};
|
|
30889
31291
|
|
|
30890
31292
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
30891
|
-
import { RuntimeError as
|
|
31293
|
+
import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
30892
31294
|
|
|
30893
31295
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
30894
31296
|
var WizardPanelService = class extends ControlService {
|
|
@@ -31054,7 +31456,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31054
31456
|
const { activeFormTag } = this.state;
|
|
31055
31457
|
const controller = this.formControllers.get(activeFormTag);
|
|
31056
31458
|
if (!controller) {
|
|
31057
|
-
throw new
|
|
31459
|
+
throw new RuntimeError61("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
31058
31460
|
}
|
|
31059
31461
|
return controller;
|
|
31060
31462
|
}
|
|
@@ -31096,7 +31498,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31096
31498
|
getWizardFormByTag(tag) {
|
|
31097
31499
|
var _a;
|
|
31098
31500
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
31099
|
-
throw new
|
|
31501
|
+
throw new RuntimeError61("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
|
|
31100
31502
|
return;
|
|
31101
31503
|
}
|
|
31102
31504
|
const wizardForm = this.model.dewizard.dewizardForms.find(
|
|
@@ -31105,7 +31507,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31105
31507
|
}
|
|
31106
31508
|
);
|
|
31107
31509
|
if (!wizardForm) {
|
|
31108
|
-
throw new
|
|
31510
|
+
throw new RuntimeError61("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
31109
31511
|
}
|
|
31110
31512
|
return wizardForm;
|
|
31111
31513
|
}
|
|
@@ -31176,7 +31578,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31176
31578
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
31177
31579
|
}
|
|
31178
31580
|
if (!prevTag) {
|
|
31179
|
-
throw new
|
|
31581
|
+
throw new RuntimeError61("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
31180
31582
|
}
|
|
31181
31583
|
this.state.activeFormTag = prevTag;
|
|
31182
31584
|
}
|
|
@@ -31212,7 +31614,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31212
31614
|
});
|
|
31213
31615
|
const nextWizardStep = wizardSteps[index + 1];
|
|
31214
31616
|
if (!nextWizardStep) {
|
|
31215
|
-
throw new
|
|
31617
|
+
throw new RuntimeError61("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
31216
31618
|
}
|
|
31217
31619
|
const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
|
|
31218
31620
|
if (nextWizardForm && nextWizardForm.formTag) {
|
|
@@ -31221,7 +31623,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31221
31623
|
}
|
|
31222
31624
|
}
|
|
31223
31625
|
if (!nextTag) {
|
|
31224
|
-
throw new
|
|
31626
|
+
throw new RuntimeError61("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
31225
31627
|
}
|
|
31226
31628
|
this.state.activeFormTag = nextTag;
|
|
31227
31629
|
this.tagHistory.push(nextTag);
|
|
@@ -31435,7 +31837,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
31435
31837
|
containerState.addState(detail.id, buttonState);
|
|
31436
31838
|
}
|
|
31437
31839
|
});
|
|
31438
|
-
containerState.update(row.data.getOrigin());
|
|
31840
|
+
containerState.update(this.context, row.data.getOrigin());
|
|
31439
31841
|
row.uaColStates[group.id] = containerState;
|
|
31440
31842
|
}
|
|
31441
31843
|
/**
|
|
@@ -31544,7 +31946,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
31544
31946
|
};
|
|
31545
31947
|
|
|
31546
31948
|
// src/controller/control/kanban/kanban.controller.ts
|
|
31547
|
-
import { RuntimeError as
|
|
31949
|
+
import { RuntimeError as RuntimeError62, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
31548
31950
|
import { isNil as isNil30 } from "ramda";
|
|
31549
31951
|
|
|
31550
31952
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -31635,7 +32037,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
31635
32037
|
} else {
|
|
31636
32038
|
const toNum = Number(sortValue);
|
|
31637
32039
|
if (Number.isNaN(toNum)) {
|
|
31638
|
-
throw new
|
|
32040
|
+
throw new RuntimeError62(
|
|
31639
32041
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
31640
32042
|
);
|
|
31641
32043
|
}
|
|
@@ -31721,7 +32123,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
31721
32123
|
}
|
|
31722
32124
|
handleDataGroup() {
|
|
31723
32125
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
31724
|
-
throw new
|
|
32126
|
+
throw new RuntimeError62("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
31725
32127
|
}
|
|
31726
32128
|
return super.handleDataGroup();
|
|
31727
32129
|
}
|
|
@@ -32064,12 +32466,12 @@ var KanbanController = class extends DataViewControlController {
|
|
|
32064
32466
|
|
|
32065
32467
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
32066
32468
|
import {
|
|
32067
|
-
RuntimeError as
|
|
32469
|
+
RuntimeError as RuntimeError63,
|
|
32068
32470
|
RuntimeModelError as RuntimeModelError68,
|
|
32069
32471
|
awaitTimeout as awaitTimeout3,
|
|
32070
32472
|
recursiveIterate as recursiveIterate12
|
|
32071
32473
|
} from "@ibiz-template/core";
|
|
32072
|
-
import { clone as
|
|
32474
|
+
import { clone as clone31 } from "ramda";
|
|
32073
32475
|
|
|
32074
32476
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
32075
32477
|
var TreeGridExService = class extends TreeService {
|
|
@@ -32324,11 +32726,11 @@ var TreeGridExController = class extends TreeController {
|
|
|
32324
32726
|
return;
|
|
32325
32727
|
}
|
|
32326
32728
|
if (nodeData._nodeType !== "DE") {
|
|
32327
|
-
throw new
|
|
32729
|
+
throw new RuntimeError63("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
|
|
32328
32730
|
}
|
|
32329
32731
|
const rowState = this.state.rows[nodeData._uuid];
|
|
32330
32732
|
if (!rowState) {
|
|
32331
|
-
throw new
|
|
32733
|
+
throw new RuntimeError63("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
32332
32734
|
}
|
|
32333
32735
|
if (!rowState.modified) {
|
|
32334
32736
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -32342,7 +32744,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
32342
32744
|
const { appDataEntityId, updateAppDEActionId } = nodeModel;
|
|
32343
32745
|
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
32344
32746
|
if (isCreate) {
|
|
32345
|
-
throw new
|
|
32747
|
+
throw new RuntimeError63("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
|
|
32346
32748
|
}
|
|
32347
32749
|
if (!updateAppDEActionId) {
|
|
32348
32750
|
throw new RuntimeModelError68(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
|
|
@@ -32502,10 +32904,10 @@ var TreeGridExController = class extends TreeController {
|
|
|
32502
32904
|
(item) => item.showRowEdit
|
|
32503
32905
|
);
|
|
32504
32906
|
if (editingRow) {
|
|
32505
|
-
throw new
|
|
32907
|
+
throw new RuntimeError63("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
32506
32908
|
}
|
|
32507
32909
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
32508
|
-
row.cacheData =
|
|
32910
|
+
row.cacheData = clone31(row.data);
|
|
32509
32911
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
32510
32912
|
Object.assign(row.data, defaultVal);
|
|
32511
32913
|
}
|
|
@@ -32615,10 +33017,10 @@ var TreeGridExColumnController = class {
|
|
|
32615
33017
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
|
|
32616
33018
|
import {
|
|
32617
33019
|
DataTypes as DataTypes5,
|
|
32618
|
-
RuntimeError as
|
|
33020
|
+
RuntimeError as RuntimeError64,
|
|
32619
33021
|
RuntimeModelError as RuntimeModelError69
|
|
32620
33022
|
} from "@ibiz-template/core";
|
|
32621
|
-
import { clone as
|
|
33023
|
+
import { clone as clone32 } from "ramda";
|
|
32622
33024
|
import dayjs6 from "dayjs";
|
|
32623
33025
|
var TreeGridExNodeColumnController = class {
|
|
32624
33026
|
/**
|
|
@@ -32816,7 +33218,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
32816
33218
|
const valueItem = this.nodeColumn.linkValueItem || "srfkey";
|
|
32817
33219
|
const value = row.data[valueItem];
|
|
32818
33220
|
if (value == null) {
|
|
32819
|
-
throw new
|
|
33221
|
+
throw new RuntimeError64("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
|
|
32820
33222
|
}
|
|
32821
33223
|
const { linkAppViewId } = this.nodeColumn;
|
|
32822
33224
|
if (!linkAppViewId) {
|
|
@@ -32827,7 +33229,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
32827
33229
|
srfkey: value,
|
|
32828
33230
|
...wfContext
|
|
32829
33231
|
});
|
|
32830
|
-
const tempParams =
|
|
33232
|
+
const tempParams = clone32(this.params);
|
|
32831
33233
|
const { userParam } = this.nodeColumn;
|
|
32832
33234
|
if (userParam) {
|
|
32833
33235
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -32953,7 +33355,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
32953
33355
|
if (state === "LOAD" /* LOAD */ || state === "SAVE" /* SAVE */) {
|
|
32954
33356
|
const uaColState = row.columnActionsStates[this.name];
|
|
32955
33357
|
if (uaColState && row.data._nodeType === "DE") {
|
|
32956
|
-
uaColState.update(row.data._deData);
|
|
33358
|
+
uaColState.update(this.context, row.data._deData);
|
|
32957
33359
|
}
|
|
32958
33360
|
}
|
|
32959
33361
|
}
|
|
@@ -33154,7 +33556,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
33154
33556
|
if (state === "LOAD" /* LOAD */ || state === "SAVE" /* SAVE */) {
|
|
33155
33557
|
const uaColState = row.columnActionsStates[this.model.id];
|
|
33156
33558
|
if (uaColState && row.data._nodeType === "DE") {
|
|
33157
|
-
uaColState.update(row.data._deData);
|
|
33559
|
+
uaColState.update(this.context, row.data._deData);
|
|
33158
33560
|
}
|
|
33159
33561
|
}
|
|
33160
33562
|
}
|
|
@@ -33229,7 +33631,7 @@ var TreeGridService = class extends GridService {
|
|
|
33229
33631
|
};
|
|
33230
33632
|
|
|
33231
33633
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
33232
|
-
import { RuntimeError as
|
|
33634
|
+
import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
|
|
33233
33635
|
import { createUUID as createUUID13 } from "qx-util";
|
|
33234
33636
|
|
|
33235
33637
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -33445,7 +33847,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
33445
33847
|
(item) => item.id === id
|
|
33446
33848
|
);
|
|
33447
33849
|
if (panelUiItemIndex < 0) {
|
|
33448
|
-
throw new
|
|
33850
|
+
throw new RuntimeError65("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
33449
33851
|
}
|
|
33450
33852
|
const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
|
|
33451
33853
|
if (tempUiItem.id.startsWith("mockId:")) {
|
|
@@ -33953,7 +34355,7 @@ var ReportPanelController = class extends ControlController {
|
|
|
33953
34355
|
// src/controller/control/gantt/gantt.controller.ts
|
|
33954
34356
|
import {
|
|
33955
34357
|
awaitTimeout as awaitTimeout4,
|
|
33956
|
-
RuntimeError as
|
|
34358
|
+
RuntimeError as RuntimeError66,
|
|
33957
34359
|
RuntimeModelError as RuntimeModelError71
|
|
33958
34360
|
} from "@ibiz-template/core";
|
|
33959
34361
|
|
|
@@ -34397,11 +34799,11 @@ var GanttController = class extends TreeGridExController {
|
|
|
34397
34799
|
*/
|
|
34398
34800
|
async modifyNodeTime(nodeData, { begin, end }) {
|
|
34399
34801
|
if (nodeData._nodeType !== "DE") {
|
|
34400
|
-
throw new
|
|
34802
|
+
throw new RuntimeError66("\u4E0D\u662F\u5B9E\u4F53\u7518\u7279\u8282\u70B9\u6570\u636E");
|
|
34401
34803
|
}
|
|
34402
34804
|
const rowState = this.getRowState(nodeData._id);
|
|
34403
34805
|
if (!rowState) {
|
|
34404
|
-
throw new
|
|
34806
|
+
throw new RuntimeError66("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
34405
34807
|
}
|
|
34406
34808
|
const { beginDataItemName, endDataItemName } = this.model;
|
|
34407
34809
|
this.setRowValue(rowState, beginDataItemName, begin);
|
|
@@ -34421,11 +34823,11 @@ var GanttController = class extends TreeGridExController {
|
|
|
34421
34823
|
return;
|
|
34422
34824
|
}
|
|
34423
34825
|
if (nodeData._nodeType !== "DE") {
|
|
34424
|
-
throw new
|
|
34826
|
+
throw new RuntimeError66("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
|
|
34425
34827
|
}
|
|
34426
34828
|
const rowState = this.state.rows[nodeData._uuid];
|
|
34427
34829
|
if (!rowState) {
|
|
34428
|
-
throw new
|
|
34830
|
+
throw new RuntimeError66("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
34429
34831
|
}
|
|
34430
34832
|
if (!rowState.modified) {
|
|
34431
34833
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -34473,7 +34875,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
34473
34875
|
async remove(args) {
|
|
34474
34876
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
34475
34877
|
if (!(data == null ? void 0 : data.length)) {
|
|
34476
|
-
throw new
|
|
34878
|
+
throw new RuntimeError66("\u672A\u9009\u4E2D\u6570\u636E");
|
|
34477
34879
|
}
|
|
34478
34880
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
34479
34881
|
const del = await ibiz.confirm.error({
|
|
@@ -34582,7 +34984,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
34582
34984
|
(item) => item.showRowEdit
|
|
34583
34985
|
);
|
|
34584
34986
|
if (editingRow) {
|
|
34585
|
-
throw new
|
|
34987
|
+
throw new RuntimeError66("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
34586
34988
|
}
|
|
34587
34989
|
}
|
|
34588
34990
|
let parentModel;
|
|
@@ -34676,7 +35078,7 @@ import { QXEvent as QXEvent9 } from "qx-util";
|
|
|
34676
35078
|
|
|
34677
35079
|
// src/controller/notification/async-action.controller.ts
|
|
34678
35080
|
import { QXEvent as QXEvent7 } from "qx-util";
|
|
34679
|
-
import { clone as
|
|
35081
|
+
import { clone as clone33 } from "ramda";
|
|
34680
35082
|
import { isNil as isNil31, isNumber as isNumber2 } from "lodash-es";
|
|
34681
35083
|
import dayjs7 from "dayjs";
|
|
34682
35084
|
var AsyncActionController = class {
|
|
@@ -34784,7 +35186,7 @@ var AsyncActionController = class {
|
|
|
34784
35186
|
} else {
|
|
34785
35187
|
this.noticeResult(action);
|
|
34786
35188
|
}
|
|
34787
|
-
this.evt.emit("add",
|
|
35189
|
+
this.evt.emit("add", clone33(action));
|
|
34788
35190
|
this.evt.emit("dataChange");
|
|
34789
35191
|
}
|
|
34790
35192
|
/**
|
|
@@ -34806,7 +35208,7 @@ var AsyncActionController = class {
|
|
|
34806
35208
|
}
|
|
34807
35209
|
this.noticeResult(action);
|
|
34808
35210
|
}
|
|
34809
|
-
this.evt.emit("change",
|
|
35211
|
+
this.evt.emit("change", clone33(action));
|
|
34810
35212
|
this.evt.emit("dataChange");
|
|
34811
35213
|
}
|
|
34812
35214
|
noticeResult(action) {
|
|
@@ -35202,7 +35604,7 @@ var AppHub = class {
|
|
|
35202
35604
|
this.registerAppView(appView);
|
|
35203
35605
|
return appView;
|
|
35204
35606
|
}
|
|
35205
|
-
throw new
|
|
35607
|
+
throw new RuntimeError67("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
35206
35608
|
}
|
|
35207
35609
|
/**
|
|
35208
35610
|
* 根据视图模型路径,加参数重新计算视图模型
|
|
@@ -35223,7 +35625,7 @@ var AppHub = class {
|
|
|
35223
35625
|
);
|
|
35224
35626
|
return model;
|
|
35225
35627
|
}
|
|
35226
|
-
throw new
|
|
35628
|
+
throw new RuntimeError67("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
|
|
35227
35629
|
}
|
|
35228
35630
|
/**
|
|
35229
35631
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -35254,7 +35656,7 @@ var AppHub = class {
|
|
|
35254
35656
|
this.registerAppDataEntity(entity, appId2);
|
|
35255
35657
|
return entity;
|
|
35256
35658
|
}
|
|
35257
|
-
throw new
|
|
35659
|
+
throw new RuntimeError67("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
35258
35660
|
}
|
|
35259
35661
|
/**
|
|
35260
35662
|
* 新建 hub 应用
|
|
@@ -35269,7 +35671,7 @@ var AppHub = class {
|
|
|
35269
35671
|
return this.appMap.get(id);
|
|
35270
35672
|
}
|
|
35271
35673
|
if (!this.modelLoaderProvider) {
|
|
35272
|
-
throw new
|
|
35674
|
+
throw new RuntimeError67("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
|
|
35273
35675
|
}
|
|
35274
35676
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
35275
35677
|
const app = new Application(appModel);
|
|
@@ -35400,7 +35802,7 @@ var EngineFactory = class {
|
|
|
35400
35802
|
};
|
|
35401
35803
|
|
|
35402
35804
|
// src/engine/view-base.engine.ts
|
|
35403
|
-
import { RuntimeError as
|
|
35805
|
+
import { RuntimeError as RuntimeError68, findRecursiveChild as findRecursiveChild3 } from "@ibiz-template/core";
|
|
35404
35806
|
var ViewEngineBase = class {
|
|
35405
35807
|
/**
|
|
35406
35808
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -35668,7 +36070,7 @@ var ViewEngineBase = class {
|
|
|
35668
36070
|
const { appDataEntityId } = this.view.model;
|
|
35669
36071
|
const { evt, context, params } = this.view;
|
|
35670
36072
|
if (!appDataEntityId) {
|
|
35671
|
-
throw new
|
|
36073
|
+
throw new RuntimeError68("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
35672
36074
|
}
|
|
35673
36075
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
35674
36076
|
const res = await app.deService.exec(
|
|
@@ -35690,7 +36092,7 @@ var ViewEngineBase = class {
|
|
|
35690
36092
|
|
|
35691
36093
|
// src/engine/md-view.engine.ts
|
|
35692
36094
|
import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
35693
|
-
import { clone as
|
|
36095
|
+
import { clone as clone34 } from "ramda";
|
|
35694
36096
|
var MDViewEngine = class extends ViewEngineBase {
|
|
35695
36097
|
/**
|
|
35696
36098
|
* 多数据部件名称
|
|
@@ -35914,7 +36316,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
35914
36316
|
if (!openAppViewLogic) {
|
|
35915
36317
|
throw new RuntimeModelError72(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
35916
36318
|
}
|
|
35917
|
-
const params =
|
|
36319
|
+
const params = clone34(this.view.params);
|
|
35918
36320
|
if (copyMode) {
|
|
35919
36321
|
params.srfcopymode = copyMode;
|
|
35920
36322
|
}
|
|
@@ -36212,7 +36614,7 @@ var GlobalUtil = class {
|
|
|
36212
36614
|
};
|
|
36213
36615
|
|
|
36214
36616
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
36215
|
-
import { RuntimeError as
|
|
36617
|
+
import { RuntimeError as RuntimeError69 } from "@ibiz-template/core";
|
|
36216
36618
|
var LogicExecutor = class {
|
|
36217
36619
|
/**
|
|
36218
36620
|
* @author lxm
|
|
@@ -36233,7 +36635,7 @@ var LogicExecutor = class {
|
|
|
36233
36635
|
*/
|
|
36234
36636
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36235
36637
|
execute(_executeParams) {
|
|
36236
|
-
throw new
|
|
36638
|
+
throw new RuntimeError69("Method not implemented.");
|
|
36237
36639
|
}
|
|
36238
36640
|
/**
|
|
36239
36641
|
* 销毁方法
|
|
@@ -36670,7 +37072,7 @@ var LogicSchedulerCenter = class {
|
|
|
36670
37072
|
};
|
|
36671
37073
|
|
|
36672
37074
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
36673
|
-
import { RuntimeError as
|
|
37075
|
+
import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
|
|
36674
37076
|
var LogicTrigger = class {
|
|
36675
37077
|
/**
|
|
36676
37078
|
* @author lxm
|
|
@@ -36730,7 +37132,7 @@ var LogicTrigger = class {
|
|
|
36730
37132
|
if (this.executor) {
|
|
36731
37133
|
return this.executor.execute(executeParams);
|
|
36732
37134
|
}
|
|
36733
|
-
throw new
|
|
37135
|
+
throw new RuntimeError70("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
36734
37136
|
}
|
|
36735
37137
|
/**
|
|
36736
37138
|
* 销毁方法
|
|
@@ -36747,12 +37149,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
36747
37149
|
};
|
|
36748
37150
|
|
|
36749
37151
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
36750
|
-
import { RuntimeError as
|
|
37152
|
+
import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
|
|
36751
37153
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
36752
37154
|
bindExecutor(executor) {
|
|
36753
37155
|
super.bindExecutor(executor);
|
|
36754
37156
|
if (this.executor.type !== "SCRIPT") {
|
|
36755
|
-
throw new
|
|
37157
|
+
throw new RuntimeError71(
|
|
36756
37158
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
36757
37159
|
);
|
|
36758
37160
|
}
|
|
@@ -36789,7 +37191,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
36789
37191
|
};
|
|
36790
37192
|
|
|
36791
37193
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
36792
|
-
import { RuntimeError as
|
|
37194
|
+
import { RuntimeError as RuntimeError72, RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
36793
37195
|
var TimerTrigger = class extends LogicTrigger {
|
|
36794
37196
|
constructor() {
|
|
36795
37197
|
super(...arguments);
|
|
@@ -36801,7 +37203,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
36801
37203
|
}
|
|
36802
37204
|
this.timer = setInterval(() => {
|
|
36803
37205
|
if (!this.scheduler.defaultParamsCb) {
|
|
36804
|
-
throw new
|
|
37206
|
+
throw new RuntimeError72("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
36805
37207
|
}
|
|
36806
37208
|
const params = this.scheduler.defaultParamsCb();
|
|
36807
37209
|
this.executor.execute(params);
|
|
@@ -36818,7 +37220,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
36818
37220
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
36819
37221
|
import {
|
|
36820
37222
|
ModelError as ModelError34,
|
|
36821
|
-
RuntimeError as
|
|
37223
|
+
RuntimeError as RuntimeError73,
|
|
36822
37224
|
RuntimeModelError as RuntimeModelError75
|
|
36823
37225
|
} from "@ibiz-template/core";
|
|
36824
37226
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -36856,7 +37258,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
36856
37258
|
const { context, params, ...rest } = parameters;
|
|
36857
37259
|
const { data } = parameters;
|
|
36858
37260
|
if (!(data == null ? void 0 : data[0])) {
|
|
36859
|
-
throw new
|
|
37261
|
+
throw new RuntimeError73("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
36860
37262
|
}
|
|
36861
37263
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
36862
37264
|
let openViewRef;
|
|
@@ -36916,7 +37318,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
36916
37318
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
36917
37319
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
36918
37320
|
if (!findView) {
|
|
36919
|
-
throw new
|
|
37321
|
+
throw new RuntimeError73(
|
|
36920
37322
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
36921
37323
|
);
|
|
36922
37324
|
}
|
|
@@ -37041,7 +37443,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37041
37443
|
}
|
|
37042
37444
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
37043
37445
|
if (!selectData) {
|
|
37044
|
-
throw new
|
|
37446
|
+
throw new RuntimeError73("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
37045
37447
|
}
|
|
37046
37448
|
const indexType = selectData.srfkey;
|
|
37047
37449
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
|
|
@@ -37051,7 +37453,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37051
37453
|
}
|
|
37052
37454
|
);
|
|
37053
37455
|
if (!findView) {
|
|
37054
|
-
throw new
|
|
37456
|
+
throw new RuntimeError73(
|
|
37055
37457
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
37056
37458
|
);
|
|
37057
37459
|
}
|
|
@@ -37088,7 +37490,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37088
37490
|
}
|
|
37089
37491
|
});
|
|
37090
37492
|
if (pickParentFieldName === void 0) {
|
|
37091
|
-
throw new
|
|
37493
|
+
throw new RuntimeError73(
|
|
37092
37494
|
"\u6CA1\u6709\u627E\u5230".concat(pickParentDeName, "\u5728\u5F53\u524D\u5B9E\u4F53\u7684\u5916\u952E\u5C5E\u6027")
|
|
37093
37495
|
);
|
|
37094
37496
|
}
|
|
@@ -37535,6 +37937,7 @@ export {
|
|
|
37535
37937
|
ScriptFunction,
|
|
37536
37938
|
SearchBarController,
|
|
37537
37939
|
SearchBarFilterController,
|
|
37940
|
+
SearchBarFilterItemsController,
|
|
37538
37941
|
SearchFilter,
|
|
37539
37942
|
SearchFormController,
|
|
37540
37943
|
SearchFormService,
|