@ibiz-template/runtime 0.6.7 → 0.6.9
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 +350 -64
- package/dist/index.system.min.js +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +3 -0
- 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/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +3 -0
- 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.d.ts +36 -0
- package/out/controller/control/form/form-detail/form-button/form-button.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-button/form-button.controller.js +66 -0
- 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/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/control/wizard-panel/wizard-panel.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/engine/md-view.engine.d.ts +7 -0
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +9 -0
- package/out/engine/view-base.engine.d.ts +7 -0
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +7 -0
- 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/engine/i-view.engine.d.ts +7 -0
- package/out/interface/engine/i-view.engine.d.ts.map +1 -1
- package/out/interface/provider/i-error-view.provider.d.ts +19 -0
- package/out/interface/provider/i-error-view.provider.d.ts.map +1 -0
- package/out/interface/provider/i-error-view.provider.js +1 -0
- package/out/interface/provider/index.d.ts +1 -0
- package/out/interface/provider/index.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 +19 -3
- package/out/interface/service/service/i-app-de-authority.service.d.ts.map +1 -1
- package/out/register/helper/error-view-register.d.ts +22 -0
- package/out/register/helper/error-view-register.d.ts.map +1 -0
- package/out/register/helper/error-view-register.js +32 -0
- package/out/register/helper/index.d.ts +1 -0
- package/out/register/helper/index.d.ts.map +1 -1
- package/out/register/helper/index.js +1 -0
- 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 +45 -4
- package/out/service/service/authority/de-authority.service.d.ts.map +1 -1
- package/out/service/service/authority/de-authority.service.js +106 -12
- 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(clone34, teleport = document.body, isRemoveChild = true) {
|
|
3331
|
+
const element = getAnimationElement(clone34);
|
|
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 clone34 = {};
|
|
3751
3751
|
for (var p in o) {
|
|
3752
|
-
|
|
3752
|
+
clone34[p] = o[p];
|
|
3753
3753
|
}
|
|
3754
|
-
return
|
|
3754
|
+
return clone34;
|
|
3755
3755
|
}
|
|
3756
3756
|
function replaceObjectProps(o1, o2) {
|
|
3757
3757
|
var o = cloneObject(o1);
|
|
@@ -6101,6 +6101,24 @@ function getInternalMessageProvider(msg) {
|
|
|
6101
6101
|
}
|
|
6102
6102
|
}
|
|
6103
6103
|
|
|
6104
|
+
// src/register/helper/error-view-register.ts
|
|
6105
|
+
var ERROR_VIEW_PROVIDER_PREFIX = "ERROR_VIEW";
|
|
6106
|
+
function registerErrorViewProvider(key, callback) {
|
|
6107
|
+
ibiz.register.register("".concat(ERROR_VIEW_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
6108
|
+
}
|
|
6109
|
+
function getProvider16(key) {
|
|
6110
|
+
return ibiz.register.get(
|
|
6111
|
+
"".concat(ERROR_VIEW_PROVIDER_PREFIX, "_").concat(key)
|
|
6112
|
+
);
|
|
6113
|
+
}
|
|
6114
|
+
function getErrorViewProvider(code) {
|
|
6115
|
+
let provider;
|
|
6116
|
+
if (!provider) {
|
|
6117
|
+
provider = getProvider16(code);
|
|
6118
|
+
}
|
|
6119
|
+
return provider;
|
|
6120
|
+
}
|
|
6121
|
+
|
|
6104
6122
|
// src/service/utils/app-counter/app-counter.ts
|
|
6105
6123
|
import { IBizContext, RuntimeError as RuntimeError14 } from "@ibiz-template/core";
|
|
6106
6124
|
import { notNilEmpty as notNilEmpty5, QXEvent as QXEvent2 } from "qx-util";
|
|
@@ -6550,6 +6568,19 @@ var DynamicCodeListCache = class {
|
|
|
6550
6568
|
}
|
|
6551
6569
|
return result;
|
|
6552
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
|
+
}
|
|
6553
6584
|
/**
|
|
6554
6585
|
* 加载服务获取数据,返回代码项
|
|
6555
6586
|
*
|
|
@@ -6594,7 +6625,18 @@ var DynamicCodeListCache = class {
|
|
|
6594
6625
|
"/dictionaries/codelist/".concat(tag),
|
|
6595
6626
|
tempParams
|
|
6596
6627
|
);
|
|
6597
|
-
|
|
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);
|
|
6598
6640
|
}
|
|
6599
6641
|
if (!appDataEntityId) {
|
|
6600
6642
|
throw new RuntimeModelError7(this.codeList, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
@@ -8976,8 +9018,30 @@ var ControlService = class {
|
|
|
8976
9018
|
params,
|
|
8977
9019
|
header
|
|
8978
9020
|
);
|
|
9021
|
+
await this.handleItemPrivilege(res.data, context);
|
|
8979
9022
|
return res;
|
|
8980
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
|
+
}
|
|
8981
9045
|
/**
|
|
8982
9046
|
* 处理自定义请求头
|
|
8983
9047
|
*
|
|
@@ -9188,22 +9252,58 @@ import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
|
9188
9252
|
var DeAuthorityService = class {
|
|
9189
9253
|
constructor(entityModel) {
|
|
9190
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);
|
|
9191
9289
|
}
|
|
9192
9290
|
/**
|
|
9193
9291
|
* 通过操作标识计算权限
|
|
9194
9292
|
* @author lxm
|
|
9195
9293
|
* @date 2023-05-10 12:33:10
|
|
9196
9294
|
* @param {string} dataAccessAction 操作标识
|
|
9197
|
-
* @param {IData}
|
|
9198
|
-
* @param {
|
|
9295
|
+
* @param {IData} data 实体数据
|
|
9296
|
+
* @param {IContext} context 上下文
|
|
9199
9297
|
* @return {*} {Promise<boolean>}
|
|
9200
9298
|
*/
|
|
9201
|
-
async calcByDataAccessAction(dataAccessAction, data) {
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9299
|
+
async calcByDataAccessAction(dataAccessAction, data, context) {
|
|
9300
|
+
const deDataAccActionResult = await this.calcDeDataAccAction(
|
|
9301
|
+
dataAccessAction,
|
|
9302
|
+
data,
|
|
9303
|
+
context
|
|
9304
|
+
);
|
|
9305
|
+
if (!deDataAccActionResult) {
|
|
9306
|
+
return false;
|
|
9207
9307
|
}
|
|
9208
9308
|
const mainStateResult = await this.calcByDeMainState(
|
|
9209
9309
|
dataAccessAction,
|
|
@@ -9214,6 +9314,75 @@ var DeAuthorityService = class {
|
|
|
9214
9314
|
}
|
|
9215
9315
|
return true;
|
|
9216
9316
|
}
|
|
9317
|
+
/**
|
|
9318
|
+
* 计算实体附属主实体控制操作标识
|
|
9319
|
+
*/
|
|
9320
|
+
async calcMajorDataAccAction(context) {
|
|
9321
|
+
const { minorAppDERSs } = this.entityModel;
|
|
9322
|
+
if (!minorAppDERSs)
|
|
9323
|
+
return;
|
|
9324
|
+
const appDeRSs = minorAppDERSs == null ? void 0 : minorAppDERSs.find((rs) => {
|
|
9325
|
+
const majorDeName = calcDeCodeNameById(rs.majorAppDataEntityId);
|
|
9326
|
+
return Object.prototype.hasOwnProperty.call(context, majorDeName) && context[majorDeName];
|
|
9327
|
+
});
|
|
9328
|
+
if (!appDeRSs)
|
|
9329
|
+
return;
|
|
9330
|
+
const app = await ibiz.hub.getApp(context.srfappid);
|
|
9331
|
+
const majorAuthorityService = await app.authority.getService(
|
|
9332
|
+
appDeRSs.majorAppDataEntityId
|
|
9333
|
+
);
|
|
9334
|
+
if (!majorAuthorityService)
|
|
9335
|
+
return;
|
|
9336
|
+
const majorAppDeName = calcDeCodeNameById(appDeRSs.majorAppDataEntityId);
|
|
9337
|
+
const majorDataAccAction = majorAuthorityService.getDataAccAction(
|
|
9338
|
+
"".concat(context.srfsessionid, "-").concat(context[majorAppDeName])
|
|
9339
|
+
) || majorAuthorityService.getDataAccAction("".concat(context[majorAppDeName]));
|
|
9340
|
+
return majorDataAccAction;
|
|
9341
|
+
}
|
|
9342
|
+
/**
|
|
9343
|
+
* 计算实体数据权限,根据实体数据访问控制方式计算权限
|
|
9344
|
+
*
|
|
9345
|
+
* 0:无控制 不计算实体数据权限
|
|
9346
|
+
* 1:自控制 根据实体数据中的权限标识计算
|
|
9347
|
+
* 2:附属主实体控制 根据主实体的数据权限标识计算
|
|
9348
|
+
* 3:附属主实体控制(未映射自控)根据主实体的数据权限标识计算,主实体没有权限标识时使用实体数据中的权限标识计算
|
|
9349
|
+
* @param {string} dataAccessAction 操作标识
|
|
9350
|
+
* @param {IData} data 实体数据
|
|
9351
|
+
* @param {IContext} context 上下文
|
|
9352
|
+
* @memberof DeAuthorityService
|
|
9353
|
+
*/
|
|
9354
|
+
async calcDeDataAccAction(dataAccessAction, data, context) {
|
|
9355
|
+
let result = true;
|
|
9356
|
+
let tempDataAccObject;
|
|
9357
|
+
const { dataAccCtrlMode } = this.entityModel;
|
|
9358
|
+
switch (dataAccCtrlMode) {
|
|
9359
|
+
case 1:
|
|
9360
|
+
tempDataAccObject = (data == null ? void 0 : data.srfdataaccaction) ? convertToObject(data.srfdataaccaction) : void 0;
|
|
9361
|
+
break;
|
|
9362
|
+
case 2:
|
|
9363
|
+
tempDataAccObject = convertToObject(
|
|
9364
|
+
await this.calcMajorDataAccAction(context)
|
|
9365
|
+
);
|
|
9366
|
+
break;
|
|
9367
|
+
case 3:
|
|
9368
|
+
tempDataAccObject = convertToObject(
|
|
9369
|
+
await this.calcMajorDataAccAction(context)
|
|
9370
|
+
);
|
|
9371
|
+
if (!Object.prototype.hasOwnProperty.call(
|
|
9372
|
+
tempDataAccObject,
|
|
9373
|
+
dataAccessAction
|
|
9374
|
+
) && data && data.srfdataaccaction) {
|
|
9375
|
+
tempDataAccObject = convertToObject(data.srfdataaccaction);
|
|
9376
|
+
}
|
|
9377
|
+
break;
|
|
9378
|
+
default:
|
|
9379
|
+
break;
|
|
9380
|
+
}
|
|
9381
|
+
if (tempDataAccObject && dataAccessAction && !tempDataAccObject[dataAccessAction]) {
|
|
9382
|
+
result = false;
|
|
9383
|
+
}
|
|
9384
|
+
return result;
|
|
9385
|
+
}
|
|
9217
9386
|
/**
|
|
9218
9387
|
* 通过实体主状态计算权限
|
|
9219
9388
|
* @author lxm
|
|
@@ -9223,7 +9392,7 @@ var DeAuthorityService = class {
|
|
|
9223
9392
|
* @param {string} appDeId 应用实体id
|
|
9224
9393
|
* @return {*} {Promise<boolean>}
|
|
9225
9394
|
*/
|
|
9226
|
-
async calcByDeMainState(dataAccessAction, data) {
|
|
9395
|
+
async calcByDeMainState(dataAccessAction, data = {}) {
|
|
9227
9396
|
let result = true;
|
|
9228
9397
|
const appDataEntity = this.entityModel;
|
|
9229
9398
|
if (!appDataEntity.enableDEMainState) {
|
|
@@ -9367,11 +9536,12 @@ var AuthorityService = class {
|
|
|
9367
9536
|
* @author lxm
|
|
9368
9537
|
* @date 2023-05-10 12:33:10
|
|
9369
9538
|
* @param {string} dataAccessAction 操作标识
|
|
9539
|
+
* @param {IContext} context 上下文
|
|
9370
9540
|
* @param {IData} [data] 实体数据
|
|
9371
9541
|
* @param {string} [appDeId] 应用实体id
|
|
9372
9542
|
* @return {*} {Promise<boolean>}
|
|
9373
9543
|
*/
|
|
9374
|
-
async calcByDataAccessAction(dataAccessAction, data, appDeId) {
|
|
9544
|
+
async calcByDataAccessAction(dataAccessAction, context, data, appDeId) {
|
|
9375
9545
|
const result = true;
|
|
9376
9546
|
if (this.enablePermission) {
|
|
9377
9547
|
const app = await ibiz.hub.getApp(this.appModel.appId);
|
|
@@ -9380,9 +9550,9 @@ var AuthorityService = class {
|
|
|
9380
9550
|
return false;
|
|
9381
9551
|
}
|
|
9382
9552
|
}
|
|
9383
|
-
if (
|
|
9553
|
+
if (appDeId) {
|
|
9384
9554
|
const service = await this.getService(appDeId);
|
|
9385
|
-
return service.calcByDataAccessAction(dataAccessAction, data);
|
|
9555
|
+
return service.calcByDataAccessAction(dataAccessAction, data, context);
|
|
9386
9556
|
}
|
|
9387
9557
|
return result;
|
|
9388
9558
|
}
|
|
@@ -10933,7 +11103,7 @@ var DELogic = class {
|
|
|
10933
11103
|
const bol = await link.exec(ctx);
|
|
10934
11104
|
if (bol && link.dstNode) {
|
|
10935
11105
|
await this.deepExec(link.dstNode, ctx);
|
|
10936
|
-
if (node.model.parallelOutput
|
|
11106
|
+
if (node.model.parallelOutput !== true) {
|
|
10937
11107
|
break;
|
|
10938
11108
|
}
|
|
10939
11109
|
}
|
|
@@ -12889,6 +13059,9 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
12889
13059
|
*/
|
|
12890
13060
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
12891
13061
|
const context = clone17(_context);
|
|
13062
|
+
if (context.srfsimple !== null) {
|
|
13063
|
+
context.srfsimple = void 0;
|
|
13064
|
+
}
|
|
12892
13065
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
12893
13066
|
if (!appView) {
|
|
12894
13067
|
throw new RuntimeError25("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -13935,7 +14108,7 @@ var UIActionButtonState = class {
|
|
|
13935
14108
|
* @param {string} [appDeId] 数据对应的实体id
|
|
13936
14109
|
* @return {*}
|
|
13937
14110
|
*/
|
|
13938
|
-
async calcPermission(data, appDeId) {
|
|
14111
|
+
async calcPermission(context, data, appDeId) {
|
|
13939
14112
|
if (!this.dataAccessAction) {
|
|
13940
14113
|
return;
|
|
13941
14114
|
}
|
|
@@ -13947,15 +14120,16 @@ var UIActionButtonState = class {
|
|
|
13947
14120
|
}
|
|
13948
14121
|
this.permitted = await app.authority.calcByDataAccessAction(
|
|
13949
14122
|
this.dataAccessAction,
|
|
14123
|
+
context,
|
|
13950
14124
|
data,
|
|
13951
14125
|
appDeId
|
|
13952
14126
|
);
|
|
13953
14127
|
}
|
|
13954
|
-
async update(data, appDeId) {
|
|
14128
|
+
async update(context, data, appDeId) {
|
|
13955
14129
|
if (!this.isInit) {
|
|
13956
14130
|
await this.init();
|
|
13957
14131
|
}
|
|
13958
|
-
await this.calcPermission(data, appDeId);
|
|
14132
|
+
await this.calcPermission(context, data, appDeId);
|
|
13959
14133
|
if (!this.permitted) {
|
|
13960
14134
|
this.disabled = true;
|
|
13961
14135
|
this.visible = !this.noPermissionHidden;
|
|
@@ -14004,10 +14178,10 @@ var ButtonContainerState = class {
|
|
|
14004
14178
|
}
|
|
14005
14179
|
});
|
|
14006
14180
|
}
|
|
14007
|
-
async update(data, appDeId) {
|
|
14181
|
+
async update(context, data, appDeId) {
|
|
14008
14182
|
await Promise.all(
|
|
14009
14183
|
this.children.map((child) => {
|
|
14010
|
-
return child.update(data, appDeId);
|
|
14184
|
+
return child.update(context, data, appDeId);
|
|
14011
14185
|
})
|
|
14012
14186
|
);
|
|
14013
14187
|
}
|
|
@@ -15178,6 +15352,9 @@ var ViewController = class extends BaseController {
|
|
|
15178
15352
|
params = convertNavData(navParams, this.params, this.context);
|
|
15179
15353
|
}
|
|
15180
15354
|
Object.assign(this.params, params);
|
|
15355
|
+
this.engines.forEach((engine2) => {
|
|
15356
|
+
engine2.handleContextParams();
|
|
15357
|
+
});
|
|
15181
15358
|
if (this.state.isMounted) {
|
|
15182
15359
|
this.callUIAction("Refresh" /* REFRESH */);
|
|
15183
15360
|
}
|
|
@@ -15561,7 +15738,12 @@ var CodeListEditorController = class extends EditorController {
|
|
|
15561
15738
|
};
|
|
15562
15739
|
|
|
15563
15740
|
// src/controller/common/control/control.controller.ts
|
|
15564
|
-
import {
|
|
15741
|
+
import {
|
|
15742
|
+
HttpError as HttpError6,
|
|
15743
|
+
IBizContext as IBizContext3,
|
|
15744
|
+
IBizParams,
|
|
15745
|
+
NoticeError as NoticeError2
|
|
15746
|
+
} from "@ibiz-template/core";
|
|
15565
15747
|
import { clone as clone18, isNil as isNil23 } from "ramda";
|
|
15566
15748
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
15567
15749
|
var ControlController = class extends BaseController {
|
|
@@ -15888,6 +16070,9 @@ var ControlController = class extends BaseController {
|
|
|
15888
16070
|
return;
|
|
15889
16071
|
}
|
|
15890
16072
|
if (opts == null ? void 0 : opts.error) {
|
|
16073
|
+
if (opts.error instanceof HttpError6 && opts.error.status !== 500) {
|
|
16074
|
+
throw opts.error;
|
|
16075
|
+
}
|
|
15891
16076
|
ibiz.log.error(opts.error);
|
|
15892
16077
|
throw new NoticeError2(message, duration);
|
|
15893
16078
|
} else {
|
|
@@ -19599,7 +19784,7 @@ var UILogic = class {
|
|
|
19599
19784
|
const bol = await link.exec(ctx);
|
|
19600
19785
|
if (bol && link.dstNode) {
|
|
19601
19786
|
await this.deepExec(link.dstNode, ctx);
|
|
19602
|
-
if (node.model.parallelOutput
|
|
19787
|
+
if (node.model.parallelOutput !== true) {
|
|
19603
19788
|
break;
|
|
19604
19789
|
}
|
|
19605
19790
|
}
|
|
@@ -20528,7 +20713,7 @@ var ToolbarController = class extends ControlController {
|
|
|
20528
20713
|
{ childrenFields: ["detoolbarItems"] }
|
|
20529
20714
|
);
|
|
20530
20715
|
if (!this.state.manualCalcButtonState) {
|
|
20531
|
-
await this.calcButtonState();
|
|
20716
|
+
await this.calcButtonState(void 0, this.model.appDataEntityId);
|
|
20532
20717
|
} else {
|
|
20533
20718
|
await this.state.buttonsState.init();
|
|
20534
20719
|
}
|
|
@@ -20560,7 +20745,7 @@ var ToolbarController = class extends ControlController {
|
|
|
20560
20745
|
if (data && data instanceof ControlVO) {
|
|
20561
20746
|
_data = data.getOrigin();
|
|
20562
20747
|
}
|
|
20563
|
-
await this.state.buttonsState.update(_data, appDeId);
|
|
20748
|
+
await this.state.buttonsState.update(this.context, _data, appDeId);
|
|
20564
20749
|
if (this.scheduler) {
|
|
20565
20750
|
const logicParams = {};
|
|
20566
20751
|
if (_data) {
|
|
@@ -20953,6 +21138,7 @@ var PortletPartController = class {
|
|
|
20953
21138
|
}
|
|
20954
21139
|
if (data) {
|
|
20955
21140
|
this.state.actionGroupState.update(
|
|
21141
|
+
this.context,
|
|
20956
21142
|
data,
|
|
20957
21143
|
this.dashboard.view.model.appDataEntityId
|
|
20958
21144
|
);
|
|
@@ -20983,7 +21169,7 @@ var PortletPartController = class {
|
|
|
20983
21169
|
containerState.addState(detail.id, buttonState);
|
|
20984
21170
|
}
|
|
20985
21171
|
});
|
|
20986
|
-
await containerState.update();
|
|
21172
|
+
await containerState.update(this.dashboard.context);
|
|
20987
21173
|
this.state.actionGroupState = containerState;
|
|
20988
21174
|
const { appDataEntityId } = this.dashboard.view.model;
|
|
20989
21175
|
if (appDataEntityId) {
|
|
@@ -21022,7 +21208,7 @@ var PortletPartController = class {
|
|
|
21022
21208
|
async dataChangeNotify(data) {
|
|
21023
21209
|
if (this.state.actionGroupState) {
|
|
21024
21210
|
const { appDataEntityId } = this.dashboard.view.model;
|
|
21025
|
-
this.state.actionGroupState.update(data, appDataEntityId);
|
|
21211
|
+
this.state.actionGroupState.update(this.context, data, appDataEntityId);
|
|
21026
21212
|
}
|
|
21027
21213
|
this.calcDynaClass(data);
|
|
21028
21214
|
}
|
|
@@ -21189,7 +21375,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21189
21375
|
containerState.addState(detail.id, buttonState);
|
|
21190
21376
|
}
|
|
21191
21377
|
});
|
|
21192
|
-
await containerState.update();
|
|
21378
|
+
await containerState.update(this.context);
|
|
21193
21379
|
group.groupActionGroupState = containerState;
|
|
21194
21380
|
});
|
|
21195
21381
|
}
|
|
@@ -21227,12 +21413,14 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21227
21413
|
}
|
|
21228
21414
|
if (tempData) {
|
|
21229
21415
|
(_a2 = group.groupActionGroupState) == null ? void 0 : _a2.update(
|
|
21416
|
+
this.context,
|
|
21230
21417
|
tempData,
|
|
21231
21418
|
this.model.appDataEntityId
|
|
21232
21419
|
);
|
|
21233
21420
|
}
|
|
21234
21421
|
} else {
|
|
21235
21422
|
(_b = group.groupActionGroupState) == null ? void 0 : _b.update(
|
|
21423
|
+
this.context,
|
|
21236
21424
|
void 0,
|
|
21237
21425
|
this.model.appDataEntityId
|
|
21238
21426
|
);
|
|
@@ -21244,6 +21432,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21244
21432
|
});
|
|
21245
21433
|
if (actionGroup) {
|
|
21246
21434
|
(_a = actionGroup.groupActionGroupState) == null ? void 0 : _a.update(
|
|
21435
|
+
this.context,
|
|
21247
21436
|
actionGroup.selectedData[0],
|
|
21248
21437
|
this.model.appDataEntityId
|
|
21249
21438
|
);
|
|
@@ -21316,7 +21505,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21316
21505
|
containerState.addState(detail.id, buttonState);
|
|
21317
21506
|
}
|
|
21318
21507
|
});
|
|
21319
|
-
containerState.update(item.getOrigin());
|
|
21508
|
+
containerState.update(this.context, item.getOrigin());
|
|
21320
21509
|
}
|
|
21321
21510
|
return containerState;
|
|
21322
21511
|
}
|
|
@@ -22308,9 +22497,13 @@ import {
|
|
|
22308
22497
|
debounceAndAsyncMerge,
|
|
22309
22498
|
recursiveIterate as recursiveIterate3
|
|
22310
22499
|
} from "@ibiz-template/core";
|
|
22500
|
+
import { clone as clone24 } from "ramda";
|
|
22311
22501
|
var FormController = class extends ControlController {
|
|
22312
|
-
constructor() {
|
|
22313
|
-
|
|
22502
|
+
constructor(model, context, params, ctx) {
|
|
22503
|
+
if (context && (context.srfreadonly === true || context.srfreadonly === "true")) {
|
|
22504
|
+
model = clone24(model);
|
|
22505
|
+
}
|
|
22506
|
+
super(model, context, params, ctx);
|
|
22314
22507
|
/**
|
|
22315
22508
|
* 所有表单项成员的控制器
|
|
22316
22509
|
*
|
|
@@ -23398,10 +23591,75 @@ var FormButtonState = class extends FormDetailState {
|
|
|
23398
23591
|
|
|
23399
23592
|
// src/controller/control/form/form-detail/form-button/form-button.controller.ts
|
|
23400
23593
|
var FormButtonController = class extends FormDetailController {
|
|
23594
|
+
constructor() {
|
|
23595
|
+
super(...arguments);
|
|
23596
|
+
/**
|
|
23597
|
+
*界面行为状态
|
|
23598
|
+
*
|
|
23599
|
+
* @author zzq
|
|
23600
|
+
* @date 2024-03-11 15:09:43
|
|
23601
|
+
*/
|
|
23602
|
+
this.actionState = null;
|
|
23603
|
+
}
|
|
23401
23604
|
createState() {
|
|
23402
23605
|
var _a;
|
|
23403
23606
|
return new FormButtonState((_a = this.parent) == null ? void 0 : _a.state);
|
|
23404
23607
|
}
|
|
23608
|
+
async onInit() {
|
|
23609
|
+
super.onInit();
|
|
23610
|
+
await this.initActionStates();
|
|
23611
|
+
}
|
|
23612
|
+
/**
|
|
23613
|
+
* 初始化界面行为按钮的状态
|
|
23614
|
+
*
|
|
23615
|
+
* @author zzq
|
|
23616
|
+
* @date 2024-03-11 15:09:43
|
|
23617
|
+
*/
|
|
23618
|
+
async initActionStates() {
|
|
23619
|
+
const actionid = this.model.uiactionId;
|
|
23620
|
+
if (actionid) {
|
|
23621
|
+
this.actionState = new UIActionButtonState(
|
|
23622
|
+
this.model.id,
|
|
23623
|
+
this.form.context.srfappid,
|
|
23624
|
+
actionid
|
|
23625
|
+
);
|
|
23626
|
+
}
|
|
23627
|
+
}
|
|
23628
|
+
/**
|
|
23629
|
+
* 表单状态变更通知
|
|
23630
|
+
*
|
|
23631
|
+
* @author zzq
|
|
23632
|
+
* @date 2024-03-11 15:09:43
|
|
23633
|
+
*/
|
|
23634
|
+
async formStateNotify(_state) {
|
|
23635
|
+
if (this.actionState) {
|
|
23636
|
+
const deCodeName = calcDeCodeNameById(this.form.model.appDataEntityId);
|
|
23637
|
+
await this.actionState.update(this.context, this.data, deCodeName);
|
|
23638
|
+
}
|
|
23639
|
+
await super.formStateNotify(_state);
|
|
23640
|
+
}
|
|
23641
|
+
/**
|
|
23642
|
+
* 计算项的禁用状态
|
|
23643
|
+
*
|
|
23644
|
+
* @param {IData} data
|
|
23645
|
+
*/
|
|
23646
|
+
calcDetailDisabled(data) {
|
|
23647
|
+
super.calcDetailDisabled(data);
|
|
23648
|
+
if (this.actionState) {
|
|
23649
|
+
this.state.disabled = !!(this.state.disabled || this.actionState.disabled);
|
|
23650
|
+
}
|
|
23651
|
+
}
|
|
23652
|
+
/**
|
|
23653
|
+
* 计算项的显示状态
|
|
23654
|
+
*
|
|
23655
|
+
* @param {IData} data
|
|
23656
|
+
*/
|
|
23657
|
+
calcDetailVisible(data) {
|
|
23658
|
+
super.calcDetailVisible(data);
|
|
23659
|
+
if (this.actionState) {
|
|
23660
|
+
this.state.visible = !!(this.state.visible && this.actionState.visible);
|
|
23661
|
+
}
|
|
23662
|
+
}
|
|
23405
23663
|
/**
|
|
23406
23664
|
* 按钮点击处理回调
|
|
23407
23665
|
*
|
|
@@ -23703,7 +23961,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
23703
23961
|
containerState.addState(detail.id, buttonState);
|
|
23704
23962
|
}
|
|
23705
23963
|
});
|
|
23706
|
-
await containerState.update();
|
|
23964
|
+
await containerState.update(this.form.context);
|
|
23707
23965
|
this.state.actionGroupState = containerState;
|
|
23708
23966
|
}
|
|
23709
23967
|
/**
|
|
@@ -24453,7 +24711,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
24453
24711
|
|
|
24454
24712
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
24455
24713
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
24456
|
-
import { clone as
|
|
24714
|
+
import { clone as clone25 } from "ramda";
|
|
24457
24715
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
24458
24716
|
constructor() {
|
|
24459
24717
|
super(...arguments);
|
|
@@ -24537,7 +24795,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
24537
24795
|
copyFields.forEach((key) => {
|
|
24538
24796
|
tempForm[key] = this.form.model[key];
|
|
24539
24797
|
});
|
|
24540
|
-
this.repeatedForm =
|
|
24798
|
+
this.repeatedForm = clone25(tempForm);
|
|
24541
24799
|
}
|
|
24542
24800
|
/**
|
|
24543
24801
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -24714,7 +24972,7 @@ import {
|
|
|
24714
24972
|
} from "@ibiz-template/core";
|
|
24715
24973
|
import { debounce as debounce2 } from "lodash-es";
|
|
24716
24974
|
import { createUUID as createUUID12 } from "qx-util";
|
|
24717
|
-
import { clone as
|
|
24975
|
+
import { clone as clone26 } from "ramda";
|
|
24718
24976
|
|
|
24719
24977
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
24720
24978
|
import {
|
|
@@ -25079,8 +25337,8 @@ var EditFormController = class extends FormController {
|
|
|
25079
25337
|
* @return {*} {Promise<IData>}
|
|
25080
25338
|
*/
|
|
25081
25339
|
async copy() {
|
|
25082
|
-
const context =
|
|
25083
|
-
const queryParams =
|
|
25340
|
+
const context = clone26(this.context);
|
|
25341
|
+
const queryParams = clone26(this.params);
|
|
25084
25342
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
25085
25343
|
this.model.appDataEntityId,
|
|
25086
25344
|
this.model.appId
|
|
@@ -25137,7 +25395,7 @@ var EditFormController = class extends FormController {
|
|
|
25137
25395
|
return this.loadDraft();
|
|
25138
25396
|
}
|
|
25139
25397
|
const { context, params } = this.handlerAbilityParams(args);
|
|
25140
|
-
const queryParams =
|
|
25398
|
+
const queryParams = clone26(params);
|
|
25141
25399
|
let res;
|
|
25142
25400
|
try {
|
|
25143
25401
|
await this.startLoading();
|
|
@@ -25710,7 +25968,7 @@ import {
|
|
|
25710
25968
|
RuntimeError as RuntimeError55,
|
|
25711
25969
|
RuntimeModelError as RuntimeModelError62
|
|
25712
25970
|
} from "@ibiz-template/core";
|
|
25713
|
-
import { clone as
|
|
25971
|
+
import { clone as clone27 } from "ramda";
|
|
25714
25972
|
|
|
25715
25973
|
// src/controller/control/grid/grid/grid.service.ts
|
|
25716
25974
|
import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
@@ -26020,7 +26278,7 @@ var GridController = class extends MDControlController {
|
|
|
26020
26278
|
const result = await calcColumnModelBySchema(json, this);
|
|
26021
26279
|
if (result && result.degridColumns.length > 0) {
|
|
26022
26280
|
const { degridColumns, degridDataItems } = result;
|
|
26023
|
-
this.model =
|
|
26281
|
+
this.model = clone27(this.model);
|
|
26024
26282
|
this.model.degridColumns = [
|
|
26025
26283
|
...(this.model.degridColumns || []).filter((item) => {
|
|
26026
26284
|
return degridColumns.findIndex((x) => x.id === item.id) === -1;
|
|
@@ -26101,12 +26359,20 @@ var GridController = class extends MDControlController {
|
|
|
26101
26359
|
});
|
|
26102
26360
|
this.state.rows.forEach((row) => {
|
|
26103
26361
|
Object.values(row.uaColStates).forEach((uaState) => {
|
|
26104
|
-
uaState.update(
|
|
26362
|
+
uaState.update(
|
|
26363
|
+
this.context,
|
|
26364
|
+
row.data.getOrigin(),
|
|
26365
|
+
this.model.appDataEntityId
|
|
26366
|
+
);
|
|
26105
26367
|
});
|
|
26106
26368
|
});
|
|
26107
26369
|
this.state.rows.forEach((row) => {
|
|
26108
26370
|
Object.values(row.uiActionGroupStates).forEach((uaState) => {
|
|
26109
|
-
uaState.update(
|
|
26371
|
+
uaState.update(
|
|
26372
|
+
this.context,
|
|
26373
|
+
row.data.getOrigin(),
|
|
26374
|
+
this.model.appDataEntityId
|
|
26375
|
+
);
|
|
26110
26376
|
});
|
|
26111
26377
|
});
|
|
26112
26378
|
this.calcGroupData(items);
|
|
@@ -26547,7 +26813,7 @@ var GridController = class extends MDControlController {
|
|
|
26547
26813
|
throw new RuntimeError55("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
26548
26814
|
}
|
|
26549
26815
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
26550
|
-
row.cacheData =
|
|
26816
|
+
row.cacheData = clone27(row.data);
|
|
26551
26817
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
26552
26818
|
Object.assign(row.data, defaultVal);
|
|
26553
26819
|
}
|
|
@@ -26716,7 +26982,7 @@ var GridController = class extends MDControlController {
|
|
|
26716
26982
|
}
|
|
26717
26983
|
});
|
|
26718
26984
|
}
|
|
26719
|
-
const cloneData =
|
|
26985
|
+
const cloneData = clone27(
|
|
26720
26986
|
data2.map((item) => {
|
|
26721
26987
|
return item.getOrigin();
|
|
26722
26988
|
})
|
|
@@ -26956,7 +27222,7 @@ var GridController = class extends MDControlController {
|
|
|
26956
27222
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
26957
27223
|
import dayjs5 from "dayjs";
|
|
26958
27224
|
import { debounce as debounce3 } from "lodash-es";
|
|
26959
|
-
import { clone as
|
|
27225
|
+
import { clone as clone28, isNil as isNil26 } from "ramda";
|
|
26960
27226
|
var GridFieldColumnController = class extends GridColumnController {
|
|
26961
27227
|
constructor() {
|
|
26962
27228
|
super(...arguments);
|
|
@@ -27094,7 +27360,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
27094
27360
|
srfkey: value,
|
|
27095
27361
|
...wfContext
|
|
27096
27362
|
});
|
|
27097
|
-
const tempParams =
|
|
27363
|
+
const tempParams = clone28(this.params);
|
|
27098
27364
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
27099
27365
|
row.data,
|
|
27100
27366
|
tempContext,
|
|
@@ -28488,7 +28754,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
28488
28754
|
|
|
28489
28755
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
28490
28756
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
28491
|
-
import { clone as
|
|
28757
|
+
import { clone as clone29, isNil as isNil28 } from "ramda";
|
|
28492
28758
|
import { isString as isString2 } from "lodash-es";
|
|
28493
28759
|
|
|
28494
28760
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -29140,7 +29406,7 @@ var SearchBarController = class extends ControlController {
|
|
|
29140
29406
|
}
|
|
29141
29407
|
});
|
|
29142
29408
|
if (addSearchBarFilters.length > 0) {
|
|
29143
|
-
this.model =
|
|
29409
|
+
this.model = clone29(this.model);
|
|
29144
29410
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
29145
29411
|
this.model.enableFilter = true;
|
|
29146
29412
|
}
|
|
@@ -31099,7 +31365,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31099
31365
|
* @memberof WizardPanelController
|
|
31100
31366
|
*/
|
|
31101
31367
|
async onNextClick() {
|
|
31102
|
-
const data = await this.activeFormController.save();
|
|
31368
|
+
const data = await this.activeFormController.save({ silent: true });
|
|
31103
31369
|
let nextTag;
|
|
31104
31370
|
if (data.srfnextform) {
|
|
31105
31371
|
const wizardForm = this.getWizardFormByTag(data.srfnextform);
|
|
@@ -31346,7 +31612,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
31346
31612
|
containerState.addState(detail.id, buttonState);
|
|
31347
31613
|
}
|
|
31348
31614
|
});
|
|
31349
|
-
containerState.update(row.data.getOrigin());
|
|
31615
|
+
containerState.update(this.context, row.data.getOrigin());
|
|
31350
31616
|
row.uaColStates[group.id] = containerState;
|
|
31351
31617
|
}
|
|
31352
31618
|
/**
|
|
@@ -31980,7 +32246,7 @@ import {
|
|
|
31980
32246
|
awaitTimeout as awaitTimeout3,
|
|
31981
32247
|
recursiveIterate as recursiveIterate12
|
|
31982
32248
|
} from "@ibiz-template/core";
|
|
31983
|
-
import { clone as
|
|
32249
|
+
import { clone as clone30 } from "ramda";
|
|
31984
32250
|
|
|
31985
32251
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
31986
32252
|
var TreeGridExService = class extends TreeService {
|
|
@@ -32416,7 +32682,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
32416
32682
|
throw new RuntimeError62("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
32417
32683
|
}
|
|
32418
32684
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
32419
|
-
row.cacheData =
|
|
32685
|
+
row.cacheData = clone30(row.data);
|
|
32420
32686
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
32421
32687
|
Object.assign(row.data, defaultVal);
|
|
32422
32688
|
}
|
|
@@ -32529,7 +32795,7 @@ import {
|
|
|
32529
32795
|
RuntimeError as RuntimeError63,
|
|
32530
32796
|
RuntimeModelError as RuntimeModelError69
|
|
32531
32797
|
} from "@ibiz-template/core";
|
|
32532
|
-
import { clone as
|
|
32798
|
+
import { clone as clone31 } from "ramda";
|
|
32533
32799
|
import dayjs6 from "dayjs";
|
|
32534
32800
|
var TreeGridExNodeColumnController = class {
|
|
32535
32801
|
/**
|
|
@@ -32738,7 +33004,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
32738
33004
|
srfkey: value,
|
|
32739
33005
|
...wfContext
|
|
32740
33006
|
});
|
|
32741
|
-
const tempParams =
|
|
33007
|
+
const tempParams = clone31(this.params);
|
|
32742
33008
|
const { userParam } = this.nodeColumn;
|
|
32743
33009
|
if (userParam) {
|
|
32744
33010
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -32864,7 +33130,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
32864
33130
|
if (state === "LOAD" /* LOAD */ || state === "SAVE" /* SAVE */) {
|
|
32865
33131
|
const uaColState = row.columnActionsStates[this.name];
|
|
32866
33132
|
if (uaColState && row.data._nodeType === "DE") {
|
|
32867
|
-
uaColState.update(row.data._deData);
|
|
33133
|
+
uaColState.update(this.context, row.data._deData);
|
|
32868
33134
|
}
|
|
32869
33135
|
}
|
|
32870
33136
|
}
|
|
@@ -33065,7 +33331,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
33065
33331
|
if (state === "LOAD" /* LOAD */ || state === "SAVE" /* SAVE */) {
|
|
33066
33332
|
const uaColState = row.columnActionsStates[this.model.id];
|
|
33067
33333
|
if (uaColState && row.data._nodeType === "DE") {
|
|
33068
|
-
uaColState.update(row.data._deData);
|
|
33334
|
+
uaColState.update(this.context, row.data._deData);
|
|
33069
33335
|
}
|
|
33070
33336
|
}
|
|
33071
33337
|
}
|
|
@@ -34587,7 +34853,7 @@ import { QXEvent as QXEvent9 } from "qx-util";
|
|
|
34587
34853
|
|
|
34588
34854
|
// src/controller/notification/async-action.controller.ts
|
|
34589
34855
|
import { QXEvent as QXEvent7 } from "qx-util";
|
|
34590
|
-
import { clone as
|
|
34856
|
+
import { clone as clone32 } from "ramda";
|
|
34591
34857
|
import { isNil as isNil31, isNumber as isNumber2 } from "lodash-es";
|
|
34592
34858
|
import dayjs7 from "dayjs";
|
|
34593
34859
|
var AsyncActionController = class {
|
|
@@ -34695,7 +34961,7 @@ var AsyncActionController = class {
|
|
|
34695
34961
|
} else {
|
|
34696
34962
|
this.noticeResult(action);
|
|
34697
34963
|
}
|
|
34698
|
-
this.evt.emit("add",
|
|
34964
|
+
this.evt.emit("add", clone32(action));
|
|
34699
34965
|
this.evt.emit("dataChange");
|
|
34700
34966
|
}
|
|
34701
34967
|
/**
|
|
@@ -34717,7 +34983,7 @@ var AsyncActionController = class {
|
|
|
34717
34983
|
}
|
|
34718
34984
|
this.noticeResult(action);
|
|
34719
34985
|
}
|
|
34720
|
-
this.evt.emit("change",
|
|
34986
|
+
this.evt.emit("change", clone32(action));
|
|
34721
34987
|
this.evt.emit("dataChange");
|
|
34722
34988
|
}
|
|
34723
34989
|
noticeResult(action) {
|
|
@@ -35388,6 +35654,14 @@ var ViewEngineBase = class {
|
|
|
35388
35654
|
*/
|
|
35389
35655
|
init() {
|
|
35390
35656
|
}
|
|
35657
|
+
/**
|
|
35658
|
+
* 重新计算上下文,主要用于视图控制器再算上下文后,每个视图控制器可自身根据变动重新计算
|
|
35659
|
+
* @author zpc
|
|
35660
|
+
* @date 2024-03-12 13:50:07
|
|
35661
|
+
* @return {*} {Promise<void>}
|
|
35662
|
+
*/
|
|
35663
|
+
handleContextParams() {
|
|
35664
|
+
}
|
|
35391
35665
|
async onCreated() {
|
|
35392
35666
|
const { childNames, modal } = this.view;
|
|
35393
35667
|
modal.hooks.shouldDismiss.tapPromise(async (context) => {
|
|
@@ -35593,7 +35867,7 @@ var ViewEngineBase = class {
|
|
|
35593
35867
|
|
|
35594
35868
|
// src/engine/md-view.engine.ts
|
|
35595
35869
|
import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
35596
|
-
import { clone as
|
|
35870
|
+
import { clone as clone33 } from "ramda";
|
|
35597
35871
|
var MDViewEngine = class extends ViewEngineBase {
|
|
35598
35872
|
/**
|
|
35599
35873
|
* 多数据部件名称
|
|
@@ -35692,6 +35966,15 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
35692
35966
|
this.load();
|
|
35693
35967
|
}
|
|
35694
35968
|
}
|
|
35969
|
+
}
|
|
35970
|
+
/**
|
|
35971
|
+
* 重新计算上下文,主要用于视图控制器再算上下文后,每个视图控制器可自身根据变动重新计算
|
|
35972
|
+
* @author zpc
|
|
35973
|
+
* @date 2024-03-12 13:52:06
|
|
35974
|
+
* @return {*} {Promise<void>}
|
|
35975
|
+
*/
|
|
35976
|
+
handleContextParams() {
|
|
35977
|
+
super.handleContextParams();
|
|
35695
35978
|
if (this.view.context.srfsimple == null) {
|
|
35696
35979
|
this.view.context.srfsimple = true;
|
|
35697
35980
|
}
|
|
@@ -35808,7 +36091,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
35808
36091
|
if (!openAppViewLogic) {
|
|
35809
36092
|
throw new RuntimeModelError72(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
35810
36093
|
}
|
|
35811
|
-
const params =
|
|
36094
|
+
const params = clone33(this.view.params);
|
|
35812
36095
|
if (copyMode) {
|
|
35813
36096
|
params.srfcopymode = copyMode;
|
|
35814
36097
|
}
|
|
@@ -37316,6 +37599,7 @@ export {
|
|
|
37316
37599
|
DefaultErrorHandler,
|
|
37317
37600
|
DynamicCodeListCache,
|
|
37318
37601
|
EDITOR_PROVIDER_PREFIX,
|
|
37602
|
+
ERROR_VIEW_PROVIDER_PREFIX,
|
|
37319
37603
|
EditFormController,
|
|
37320
37604
|
EditFormService,
|
|
37321
37605
|
EditorController,
|
|
@@ -37537,6 +37821,7 @@ export {
|
|
|
37537
37821
|
getDefaultValue,
|
|
37538
37822
|
getEditorProvider,
|
|
37539
37823
|
getEntitySchema,
|
|
37824
|
+
getErrorViewProvider,
|
|
37540
37825
|
getFormDetailProvider,
|
|
37541
37826
|
getGridColumnProvider,
|
|
37542
37827
|
getInternalMessageProvider,
|
|
@@ -37583,6 +37868,7 @@ export {
|
|
|
37583
37868
|
registerControlProvider,
|
|
37584
37869
|
registerDEMethodProvider,
|
|
37585
37870
|
registerEditorProvider,
|
|
37871
|
+
registerErrorViewProvider,
|
|
37586
37872
|
registerFormDetailProvider,
|
|
37587
37873
|
registerGridColumnProvider,
|
|
37588
37874
|
registerInternalMessageProvider,
|