@ibiz-template/runtime 0.6.12 → 0.6.14
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 +122 -109
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +1 -1
- package/out/controller/control/form/form/form.controller.d.ts +1 -20
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +17 -91
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +4 -0
- package/out/controller/control/form/form-detail/form-detail/form-detail.state.d.ts +8 -0
- package/out/controller/control/form/form-detail/form-detail/form-detail.state.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.state.js +20 -0
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +9 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.js +6 -3
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +3 -1
- package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.controller.js +4 -0
- package/out/controller/control/panel/panel/panel-item.state.d.ts +8 -0
- package/out/controller/control/panel/panel/panel-item.state.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.state.js +20 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +5 -1
- package/out/engine/view-base.engine.d.ts +1 -1
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +7 -2
- package/out/interface/controller/state/control/i-tree.state.d.ts +21 -0
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/panel-item/i-panel-item.state.d.ts +8 -0
- package/out/interface/controller/state/control/panel-item/i-panel-item.state.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +1 -0
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +1 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +10 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +23 -0
- package/package.json +2 -2
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);
|
|
@@ -12057,6 +12057,7 @@ var TreeNodeData = class {
|
|
|
12057
12057
|
this._parent = parentNodeData;
|
|
12058
12058
|
this._nodeType = model.treeNodeType;
|
|
12059
12059
|
this._disableSelect = model.disableSelect === true;
|
|
12060
|
+
this._changedOnly = model.enableRowEditChangedOnly === true;
|
|
12060
12061
|
if (this._parent) {
|
|
12061
12062
|
this._context = { ...this._parent._context };
|
|
12062
12063
|
}
|
|
@@ -12099,6 +12100,26 @@ var TreeNodeData = class {
|
|
|
12099
12100
|
}
|
|
12100
12101
|
return Object.values(icon).length > 0 ? icon : void 0;
|
|
12101
12102
|
}
|
|
12103
|
+
/**
|
|
12104
|
+
* 获取改变数据
|
|
12105
|
+
* @author zzq
|
|
12106
|
+
* @date 2024-03-25 14:24:55
|
|
12107
|
+
* @return {*} {(IData | undefined)}
|
|
12108
|
+
* @memberof TreeNodeData
|
|
12109
|
+
*/
|
|
12110
|
+
getDiffData() {
|
|
12111
|
+
if (this._deData && this._oldDeData) {
|
|
12112
|
+
const diffData = {};
|
|
12113
|
+
Object.keys(this._deData).forEach((key) => {
|
|
12114
|
+
if (this._deData[key] !== this._oldDeData[key] || key === this._deData.srfkeyfield) {
|
|
12115
|
+
diffData[key] = this._deData[key];
|
|
12116
|
+
}
|
|
12117
|
+
});
|
|
12118
|
+
diffData.srfkey = this._deData.srfkey;
|
|
12119
|
+
return diffData;
|
|
12120
|
+
}
|
|
12121
|
+
return this._deData;
|
|
12122
|
+
}
|
|
12102
12123
|
};
|
|
12103
12124
|
|
|
12104
12125
|
// src/service/vo/tree-node-data/tree-code-list-node-data.ts
|
|
@@ -12145,6 +12166,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
12145
12166
|
super(model, parentNodeData, opts);
|
|
12146
12167
|
const { data } = opts;
|
|
12147
12168
|
this._deData = data;
|
|
12169
|
+
this._oldDeData = data.clone();
|
|
12148
12170
|
const selfId = "".concat(model.id, "@").concat(data.srfkey).toLowerCase();
|
|
12149
12171
|
Object.defineProperty(this, "_id", {
|
|
12150
12172
|
get() {
|
|
@@ -22588,13 +22610,9 @@ import {
|
|
|
22588
22610
|
debounceAndAsyncMerge,
|
|
22589
22611
|
recursiveIterate as recursiveIterate3
|
|
22590
22612
|
} from "@ibiz-template/core";
|
|
22591
|
-
import { clone as clone24 } from "ramda";
|
|
22592
22613
|
var FormController = class extends ControlController {
|
|
22593
|
-
constructor(
|
|
22594
|
-
|
|
22595
|
-
model = clone24(model);
|
|
22596
|
-
}
|
|
22597
|
-
super(model, context, params, ctx);
|
|
22614
|
+
constructor() {
|
|
22615
|
+
super(...arguments);
|
|
22598
22616
|
/**
|
|
22599
22617
|
* 所有表单项成员的控制器
|
|
22600
22618
|
*
|
|
@@ -22656,70 +22674,6 @@ var FormController = class extends ControlController {
|
|
|
22656
22674
|
this.state.processing = false;
|
|
22657
22675
|
this.state.modified = false;
|
|
22658
22676
|
}
|
|
22659
|
-
/**
|
|
22660
|
-
* 进行模型预处理
|
|
22661
|
-
*
|
|
22662
|
-
* @author chitanda
|
|
22663
|
-
* @date 2024-02-27 09:02:52
|
|
22664
|
-
* @protected
|
|
22665
|
-
*/
|
|
22666
|
-
preprocessModel(model) {
|
|
22667
|
-
if (this.context && (this.context.srfreadonly === true || this.context.srfreadonly === "true")) {
|
|
22668
|
-
const pages = model.deformPages;
|
|
22669
|
-
if (pages) {
|
|
22670
|
-
pages.forEach((page) => {
|
|
22671
|
-
page.infoGroupMode = true;
|
|
22672
|
-
if (page.deformDetails) {
|
|
22673
|
-
page.deformDetails.forEach((detail) => {
|
|
22674
|
-
this.deepPreprocessModel(detail);
|
|
22675
|
-
});
|
|
22676
|
-
}
|
|
22677
|
-
});
|
|
22678
|
-
}
|
|
22679
|
-
}
|
|
22680
|
-
}
|
|
22681
|
-
/**
|
|
22682
|
-
* 递归将表单模型修改为信息态
|
|
22683
|
-
*
|
|
22684
|
-
* @author chitanda
|
|
22685
|
-
* @date 2024-02-27 11:02:43
|
|
22686
|
-
* @protected
|
|
22687
|
-
* @param {IDEFormGroupBase} model
|
|
22688
|
-
*/
|
|
22689
|
-
deepPreprocessModel(model) {
|
|
22690
|
-
if (model.detailType === "GROUPPANEL") {
|
|
22691
|
-
model.infoGroupMode = true;
|
|
22692
|
-
} else if (model.detailType === "FORMITEM") {
|
|
22693
|
-
const { editor } = model;
|
|
22694
|
-
if (editor) {
|
|
22695
|
-
editor.readOnly = true;
|
|
22696
|
-
}
|
|
22697
|
-
}
|
|
22698
|
-
switch (model.detailType) {
|
|
22699
|
-
case "FORMITEM": {
|
|
22700
|
-
const { editor } = model;
|
|
22701
|
-
if (editor) {
|
|
22702
|
-
editor.readOnly = true;
|
|
22703
|
-
}
|
|
22704
|
-
break;
|
|
22705
|
-
}
|
|
22706
|
-
case "MDCTRL": {
|
|
22707
|
-
const detail = model;
|
|
22708
|
-
detail.buildInActions = 0;
|
|
22709
|
-
break;
|
|
22710
|
-
}
|
|
22711
|
-
case "GROUPPANEL":
|
|
22712
|
-
model.infoGroupMode = true;
|
|
22713
|
-
break;
|
|
22714
|
-
default:
|
|
22715
|
-
break;
|
|
22716
|
-
}
|
|
22717
|
-
if (model.deformDetails) {
|
|
22718
|
-
model.deformDetails.forEach((detail) => {
|
|
22719
|
-
this.deepPreprocessModel(detail);
|
|
22720
|
-
});
|
|
22721
|
-
}
|
|
22722
|
-
}
|
|
22723
22677
|
/**
|
|
22724
22678
|
* 通知所有表单成员表单操作过程中的数据变更
|
|
22725
22679
|
*
|
|
@@ -23313,6 +23267,14 @@ var FormDetailState = class {
|
|
|
23313
23267
|
* @type {(0 | 1 | 2)}
|
|
23314
23268
|
*/
|
|
23315
23269
|
this.showMoreMode = 0;
|
|
23270
|
+
/**
|
|
23271
|
+
* 是否只读
|
|
23272
|
+
*
|
|
23273
|
+
* @author zhanghengfeng
|
|
23274
|
+
* @date 2024-03-25 17:03:48
|
|
23275
|
+
* @type {boolean}
|
|
23276
|
+
*/
|
|
23277
|
+
this.readonly = false;
|
|
23316
23278
|
let $visible = true;
|
|
23317
23279
|
Object.defineProperty(this, "visible", {
|
|
23318
23280
|
enumerable: true,
|
|
@@ -23351,6 +23313,18 @@ var FormDetailState = class {
|
|
|
23351
23313
|
return true;
|
|
23352
23314
|
}
|
|
23353
23315
|
});
|
|
23316
|
+
let $readonly = false;
|
|
23317
|
+
Object.defineProperty(this, "readonly", {
|
|
23318
|
+
enumerable: true,
|
|
23319
|
+
configurable: true,
|
|
23320
|
+
get() {
|
|
23321
|
+
return $readonly;
|
|
23322
|
+
},
|
|
23323
|
+
set(val) {
|
|
23324
|
+
$readonly = val;
|
|
23325
|
+
return true;
|
|
23326
|
+
}
|
|
23327
|
+
});
|
|
23354
23328
|
}
|
|
23355
23329
|
};
|
|
23356
23330
|
|
|
@@ -23483,6 +23457,9 @@ var FormDetailController = class {
|
|
|
23483
23457
|
this.model.caption
|
|
23484
23458
|
);
|
|
23485
23459
|
}
|
|
23460
|
+
if (this.context.srfreadonly === true || this.context.srfreadonly === "true") {
|
|
23461
|
+
this.state.readonly = true;
|
|
23462
|
+
}
|
|
23486
23463
|
}
|
|
23487
23464
|
/**
|
|
23488
23465
|
* 创建表单状态对象
|
|
@@ -24235,12 +24212,16 @@ var FormItemController = class extends FormDetailController {
|
|
|
24235
24212
|
* @returns {*} {Promise<void>}
|
|
24236
24213
|
*/
|
|
24237
24214
|
async onInit() {
|
|
24215
|
+
var _a;
|
|
24238
24216
|
await super.onInit();
|
|
24239
24217
|
this.state.required = !this.model.allowEmpty;
|
|
24240
24218
|
const { enableCond } = this.model;
|
|
24241
24219
|
if (!enableCond) {
|
|
24242
24220
|
this.state.enableCondDisabled = true;
|
|
24243
24221
|
}
|
|
24222
|
+
if (this.context.srfreadonly !== true && this.context.srfreadonly !== "true") {
|
|
24223
|
+
this.state.readonly = ((_a = this.model.editor) == null ? void 0 : _a.readOnly) || false;
|
|
24224
|
+
}
|
|
24244
24225
|
if (this.model.editor && this.model.editor.editorType !== "HIDDEN") {
|
|
24245
24226
|
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
24246
24227
|
if (this.editorProvider) {
|
|
@@ -24337,7 +24318,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
24337
24318
|
this.state.error = null;
|
|
24338
24319
|
return true;
|
|
24339
24320
|
}
|
|
24340
|
-
if (this.state.required && isNilOrEmpty7(this.data[this.name])) {
|
|
24321
|
+
if (this.state.required && (typeof this.data[this.name] === "string" ? isNilOrEmpty7(this.data[this.name].trimEnd()) : isNilOrEmpty7(this.data[this.name]))) {
|
|
24341
24322
|
this.state.error = "\u8BF7\u586B\u5199".concat(this.model.caption || "");
|
|
24342
24323
|
return false;
|
|
24343
24324
|
}
|
|
@@ -24448,7 +24429,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
24448
24429
|
* @type {boolean}
|
|
24449
24430
|
*/
|
|
24450
24431
|
get enableCreate() {
|
|
24451
|
-
return BitMask.checkPermission(this.model.buildInActions, 1);
|
|
24432
|
+
return !this.state.readonly && BitMask.checkPermission(this.model.buildInActions, 1);
|
|
24452
24433
|
}
|
|
24453
24434
|
/**
|
|
24454
24435
|
* 是否允许更新
|
|
@@ -24459,7 +24440,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
24459
24440
|
* @type {boolean}
|
|
24460
24441
|
*/
|
|
24461
24442
|
get enableUpdate() {
|
|
24462
|
-
return BitMask.checkPermission(this.model.buildInActions, 2);
|
|
24443
|
+
return !this.state.readonly && BitMask.checkPermission(this.model.buildInActions, 2);
|
|
24463
24444
|
}
|
|
24464
24445
|
/**
|
|
24465
24446
|
* 是否允许删除
|
|
@@ -24469,7 +24450,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
24469
24450
|
* @type {boolean}
|
|
24470
24451
|
*/
|
|
24471
24452
|
get enableDelete() {
|
|
24472
|
-
return BitMask.checkPermission(this.model.buildInActions, 4);
|
|
24453
|
+
return !this.state.readonly && BitMask.checkPermission(this.model.buildInActions, 4);
|
|
24473
24454
|
}
|
|
24474
24455
|
/**
|
|
24475
24456
|
* 如果配置了表单项更新,则执行表单项更新
|
|
@@ -24802,7 +24783,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
24802
24783
|
|
|
24803
24784
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
24804
24785
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
24805
|
-
import { clone as
|
|
24786
|
+
import { clone as clone24 } from "ramda";
|
|
24806
24787
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
24807
24788
|
constructor() {
|
|
24808
24789
|
super(...arguments);
|
|
@@ -24886,7 +24867,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
24886
24867
|
copyFields.forEach((key) => {
|
|
24887
24868
|
tempForm[key] = this.form.model[key];
|
|
24888
24869
|
});
|
|
24889
|
-
this.repeatedForm =
|
|
24870
|
+
this.repeatedForm = clone24(tempForm);
|
|
24890
24871
|
}
|
|
24891
24872
|
/**
|
|
24892
24873
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -25065,7 +25046,7 @@ import {
|
|
|
25065
25046
|
} from "@ibiz-template/core";
|
|
25066
25047
|
import { debounce as debounce2 } from "lodash-es";
|
|
25067
25048
|
import { createUUID as createUUID12 } from "qx-util";
|
|
25068
|
-
import { clone as
|
|
25049
|
+
import { clone as clone25 } from "ramda";
|
|
25069
25050
|
|
|
25070
25051
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
25071
25052
|
import {
|
|
@@ -25430,8 +25411,8 @@ var EditFormController = class extends FormController {
|
|
|
25430
25411
|
* @return {*} {Promise<IData>}
|
|
25431
25412
|
*/
|
|
25432
25413
|
async copy() {
|
|
25433
|
-
const context =
|
|
25434
|
-
const queryParams =
|
|
25414
|
+
const context = clone25(this.context);
|
|
25415
|
+
const queryParams = clone25(this.params);
|
|
25435
25416
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
25436
25417
|
this.model.appDataEntityId,
|
|
25437
25418
|
this.model.appId
|
|
@@ -25482,13 +25463,13 @@ var EditFormController = class extends FormController {
|
|
|
25482
25463
|
}
|
|
25483
25464
|
const isLoadDraft = !hasDeCodeName(
|
|
25484
25465
|
this.context,
|
|
25485
|
-
this.model.appDataEntityId
|
|
25466
|
+
calcDeCodeNameById(this.model.appDataEntityId)
|
|
25486
25467
|
);
|
|
25487
25468
|
if (isLoadDraft) {
|
|
25488
25469
|
return this.loadDraft();
|
|
25489
25470
|
}
|
|
25490
25471
|
const { context, params } = this.handlerAbilityParams(args);
|
|
25491
|
-
const queryParams =
|
|
25472
|
+
const queryParams = clone25(params);
|
|
25492
25473
|
let res;
|
|
25493
25474
|
try {
|
|
25494
25475
|
await this.startLoading();
|
|
@@ -26078,7 +26059,7 @@ import {
|
|
|
26078
26059
|
RuntimeError as RuntimeError55,
|
|
26079
26060
|
RuntimeModelError as RuntimeModelError62
|
|
26080
26061
|
} from "@ibiz-template/core";
|
|
26081
|
-
import { clone as
|
|
26062
|
+
import { clone as clone26 } from "ramda";
|
|
26082
26063
|
import dayjs5 from "dayjs";
|
|
26083
26064
|
|
|
26084
26065
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -26428,7 +26409,7 @@ var GridController = class extends MDControlController {
|
|
|
26428
26409
|
const result = await calcColumnModelBySchema(json, this);
|
|
26429
26410
|
if (result && result.degridColumns.length > 0) {
|
|
26430
26411
|
const { degridColumns, degridDataItems } = result;
|
|
26431
|
-
this.model =
|
|
26412
|
+
this.model = clone26(this.model);
|
|
26432
26413
|
this.model.degridColumns = [
|
|
26433
26414
|
...(this.model.degridColumns || []).filter((item) => {
|
|
26434
26415
|
return degridColumns.findIndex((x) => x.id === item.id) === -1;
|
|
@@ -27013,7 +26994,7 @@ var GridController = class extends MDControlController {
|
|
|
27013
26994
|
throw new RuntimeError55("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
27014
26995
|
}
|
|
27015
26996
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
27016
|
-
row.cacheData =
|
|
26997
|
+
row.cacheData = clone26(row.data);
|
|
27017
26998
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
27018
26999
|
Object.assign(row.data, defaultVal);
|
|
27019
27000
|
}
|
|
@@ -27152,7 +27133,7 @@ var GridController = class extends MDControlController {
|
|
|
27152
27133
|
*/
|
|
27153
27134
|
formatExcelData(data) {
|
|
27154
27135
|
const { fields = [] } = this.dataExportParam;
|
|
27155
|
-
const cloneData =
|
|
27136
|
+
const cloneData = clone26(
|
|
27156
27137
|
data.map((item) => {
|
|
27157
27138
|
return fields.reduce((obj, key) => {
|
|
27158
27139
|
obj[key] = item[key];
|
|
@@ -27398,7 +27379,7 @@ var GridController = class extends MDControlController {
|
|
|
27398
27379
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
27399
27380
|
import dayjs6 from "dayjs";
|
|
27400
27381
|
import { debounce as debounce3 } from "lodash-es";
|
|
27401
|
-
import { clone as
|
|
27382
|
+
import { clone as clone27, isNil as isNil26 } from "ramda";
|
|
27402
27383
|
var GridFieldColumnController = class extends GridColumnController {
|
|
27403
27384
|
constructor() {
|
|
27404
27385
|
super(...arguments);
|
|
@@ -27536,7 +27517,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
27536
27517
|
srfkey: value,
|
|
27537
27518
|
...wfContext
|
|
27538
27519
|
});
|
|
27539
|
-
const tempParams =
|
|
27520
|
+
const tempParams = clone27(this.params);
|
|
27540
27521
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
27541
27522
|
row.data,
|
|
27542
27523
|
tempContext,
|
|
@@ -28006,7 +27987,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
28006
27987
|
*/
|
|
28007
27988
|
async validate(row) {
|
|
28008
27989
|
const editName = this.fieldName;
|
|
28009
|
-
if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required && isNilOrEmpty8(row.data[editName])) {
|
|
27990
|
+
if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required && typeof row.data[editName] === "string" ? isNilOrEmpty8(row.data[editName].trimEnd()) : isNilOrEmpty8(row.data[editName])) {
|
|
28010
27991
|
row.errors[editName] = "\u8BF7\u586B\u5199".concat(this.model.caption || "");
|
|
28011
27992
|
return false;
|
|
28012
27993
|
}
|
|
@@ -28506,6 +28487,14 @@ var PanelItemState = class {
|
|
|
28506
28487
|
* @type {boolean}
|
|
28507
28488
|
*/
|
|
28508
28489
|
this.required = false;
|
|
28490
|
+
/**
|
|
28491
|
+
* 是否只读
|
|
28492
|
+
*
|
|
28493
|
+
* @author zhanghengfeng
|
|
28494
|
+
* @date 2024-03-25 17:03:36
|
|
28495
|
+
* @type {boolean}
|
|
28496
|
+
*/
|
|
28497
|
+
this.readonly = false;
|
|
28509
28498
|
let $visible = true;
|
|
28510
28499
|
Object.defineProperty(this, "visible", {
|
|
28511
28500
|
enumerable: true,
|
|
@@ -28537,6 +28526,18 @@ var PanelItemState = class {
|
|
|
28537
28526
|
return true;
|
|
28538
28527
|
}
|
|
28539
28528
|
});
|
|
28529
|
+
let $readonly = false;
|
|
28530
|
+
Object.defineProperty(this, "readonly", {
|
|
28531
|
+
enumerable: true,
|
|
28532
|
+
configurable: true,
|
|
28533
|
+
get() {
|
|
28534
|
+
return $readonly;
|
|
28535
|
+
},
|
|
28536
|
+
set(val) {
|
|
28537
|
+
$readonly = val;
|
|
28538
|
+
return true;
|
|
28539
|
+
}
|
|
28540
|
+
});
|
|
28540
28541
|
}
|
|
28541
28542
|
};
|
|
28542
28543
|
|
|
@@ -28637,6 +28638,9 @@ var PanelItemController = class {
|
|
|
28637
28638
|
if (labelSysCss == null ? void 0 : labelSysCss.cssName) {
|
|
28638
28639
|
this.state.class.label.push(labelSysCss.cssName);
|
|
28639
28640
|
}
|
|
28641
|
+
if (this.panel.context.srfreadonly === true || this.panel.context.srfreadonly === "true") {
|
|
28642
|
+
this.state.readonly = true;
|
|
28643
|
+
}
|
|
28640
28644
|
}
|
|
28641
28645
|
destroy() {
|
|
28642
28646
|
}
|
|
@@ -28930,7 +28934,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
28930
28934
|
|
|
28931
28935
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
28932
28936
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
28933
|
-
import { clone as
|
|
28937
|
+
import { clone as clone29, isNil as isNil28 } from "ramda";
|
|
28934
28938
|
import { isString as isString2 } from "lodash-es";
|
|
28935
28939
|
|
|
28936
28940
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -29466,7 +29470,7 @@ function calcSearchConds(filterNodes) {
|
|
|
29466
29470
|
|
|
29467
29471
|
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
29468
29472
|
import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
|
|
29469
|
-
import { clone as
|
|
29473
|
+
import { clone as clone28 } from "ramda";
|
|
29470
29474
|
var ExcludeOPs3 = [
|
|
29471
29475
|
"ISNULL" /* IS_NULL */,
|
|
29472
29476
|
"ISNOTNULL" /* IS_NOT_NULL */
|
|
@@ -29558,7 +29562,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
29558
29562
|
});
|
|
29559
29563
|
}
|
|
29560
29564
|
fieldMap.get(subField).valueOPs.push(subOP);
|
|
29561
|
-
const cloneItem =
|
|
29565
|
+
const cloneItem = clone28(item);
|
|
29562
29566
|
cloneItem.defsearchMode.valueOP = subOP;
|
|
29563
29567
|
this.subFilterCMap.set(
|
|
29564
29568
|
this.calcKey(subField, subOP),
|
|
@@ -29738,7 +29742,7 @@ var SearchBarController = class extends ControlController {
|
|
|
29738
29742
|
}
|
|
29739
29743
|
});
|
|
29740
29744
|
if (addSearchBarFilters.length > 0) {
|
|
29741
|
-
this.model =
|
|
29745
|
+
this.model = clone29(this.model);
|
|
29742
29746
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
29743
29747
|
this.model.enableFilter = true;
|
|
29744
29748
|
}
|
|
@@ -31371,7 +31375,10 @@ var TreeController = class extends MDControlController {
|
|
|
31371
31375
|
await Promise.all(
|
|
31372
31376
|
nodeDatas.map(async (node) => {
|
|
31373
31377
|
const model = this.getNodeModel(node._nodeId);
|
|
31374
|
-
|
|
31378
|
+
let deData = node._deData;
|
|
31379
|
+
if (node._changedOnly) {
|
|
31380
|
+
deData = node.getDiffData();
|
|
31381
|
+
}
|
|
31375
31382
|
const deName = calcDeCodeNameById(model.appDataEntityId);
|
|
31376
31383
|
const tempContext = this.context.clone();
|
|
31377
31384
|
tempContext[deName] = deData.srfkey;
|
|
@@ -31383,6 +31390,7 @@ var TreeController = class extends MDControlController {
|
|
|
31383
31390
|
);
|
|
31384
31391
|
if (res.data) {
|
|
31385
31392
|
node._deData = res.data;
|
|
31393
|
+
node._oldDeData = res.data.clone();
|
|
31386
31394
|
}
|
|
31387
31395
|
})
|
|
31388
31396
|
);
|
|
@@ -32653,7 +32661,7 @@ import {
|
|
|
32653
32661
|
awaitTimeout as awaitTimeout3,
|
|
32654
32662
|
recursiveIterate as recursiveIterate12
|
|
32655
32663
|
} from "@ibiz-template/core";
|
|
32656
|
-
import { clone as
|
|
32664
|
+
import { clone as clone30 } from "ramda";
|
|
32657
32665
|
|
|
32658
32666
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
32659
32667
|
var TreeGridExService = class extends TreeService {
|
|
@@ -33089,7 +33097,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
33089
33097
|
throw new RuntimeError63("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
33090
33098
|
}
|
|
33091
33099
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
33092
|
-
row.cacheData =
|
|
33100
|
+
row.cacheData = clone30(row.data);
|
|
33093
33101
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
33094
33102
|
Object.assign(row.data, defaultVal);
|
|
33095
33103
|
}
|
|
@@ -33202,7 +33210,7 @@ import {
|
|
|
33202
33210
|
RuntimeError as RuntimeError64,
|
|
33203
33211
|
RuntimeModelError as RuntimeModelError69
|
|
33204
33212
|
} from "@ibiz-template/core";
|
|
33205
|
-
import { clone as
|
|
33213
|
+
import { clone as clone31 } from "ramda";
|
|
33206
33214
|
import dayjs7 from "dayjs";
|
|
33207
33215
|
var TreeGridExNodeColumnController = class {
|
|
33208
33216
|
/**
|
|
@@ -33411,7 +33419,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
33411
33419
|
srfkey: value,
|
|
33412
33420
|
...wfContext
|
|
33413
33421
|
});
|
|
33414
|
-
const tempParams =
|
|
33422
|
+
const tempParams = clone31(this.params);
|
|
33415
33423
|
const { userParam } = this.nodeColumn;
|
|
33416
33424
|
if (userParam) {
|
|
33417
33425
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -35260,7 +35268,7 @@ import { QXEvent as QXEvent9 } from "qx-util";
|
|
|
35260
35268
|
|
|
35261
35269
|
// src/controller/notification/async-action.controller.ts
|
|
35262
35270
|
import { QXEvent as QXEvent7 } from "qx-util";
|
|
35263
|
-
import { clone as
|
|
35271
|
+
import { clone as clone32 } from "ramda";
|
|
35264
35272
|
import { isNil as isNil31, isNumber as isNumber2 } from "lodash-es";
|
|
35265
35273
|
import dayjs8 from "dayjs";
|
|
35266
35274
|
var AsyncActionController = class {
|
|
@@ -35368,7 +35376,7 @@ var AsyncActionController = class {
|
|
|
35368
35376
|
} else {
|
|
35369
35377
|
this.noticeResult(action);
|
|
35370
35378
|
}
|
|
35371
|
-
this.evt.emit("add",
|
|
35379
|
+
this.evt.emit("add", clone32(action));
|
|
35372
35380
|
this.evt.emit("dataChange");
|
|
35373
35381
|
}
|
|
35374
35382
|
/**
|
|
@@ -35390,7 +35398,7 @@ var AsyncActionController = class {
|
|
|
35390
35398
|
}
|
|
35391
35399
|
this.noticeResult(action);
|
|
35392
35400
|
}
|
|
35393
|
-
this.evt.emit("change",
|
|
35401
|
+
this.evt.emit("change", clone32(action));
|
|
35394
35402
|
this.evt.emit("dataChange");
|
|
35395
35403
|
}
|
|
35396
35404
|
noticeResult(action) {
|
|
@@ -36208,7 +36216,7 @@ var ViewEngineBase = class {
|
|
|
36208
36216
|
}
|
|
36209
36217
|
/**
|
|
36210
36218
|
* 是否存在模型 并且 布局中有占位
|
|
36211
|
-
*
|
|
36219
|
+
* - 工具栏模型还需判断是否有工具栏项
|
|
36212
36220
|
* @author zk
|
|
36213
36221
|
* @date 2024-01-30 11:01:33
|
|
36214
36222
|
* @param {string} name
|
|
@@ -36226,7 +36234,12 @@ var ViewEngineBase = class {
|
|
|
36226
36234
|
});
|
|
36227
36235
|
const { model } = this.view;
|
|
36228
36236
|
const has = getControl(model, name);
|
|
36229
|
-
|
|
36237
|
+
let visible = !!(ins && has);
|
|
36238
|
+
if ((has == null ? void 0 : has.controlType) === "TOOLBAR") {
|
|
36239
|
+
const items = has.detoolbarItems;
|
|
36240
|
+
visible = !!(visible && items && items.length > 0);
|
|
36241
|
+
}
|
|
36242
|
+
return visible;
|
|
36230
36243
|
}
|
|
36231
36244
|
/**
|
|
36232
36245
|
* 计算底部的显示与否
|
|
@@ -36274,7 +36287,7 @@ var ViewEngineBase = class {
|
|
|
36274
36287
|
|
|
36275
36288
|
// src/engine/md-view.engine.ts
|
|
36276
36289
|
import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
36277
|
-
import { clone as
|
|
36290
|
+
import { clone as clone33 } from "ramda";
|
|
36278
36291
|
var MDViewEngine = class extends ViewEngineBase {
|
|
36279
36292
|
/**
|
|
36280
36293
|
* 多数据部件名称
|
|
@@ -36498,7 +36511,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
36498
36511
|
if (!openAppViewLogic) {
|
|
36499
36512
|
throw new RuntimeModelError72(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
36500
36513
|
}
|
|
36501
|
-
const params =
|
|
36514
|
+
const params = clone33(this.view.params);
|
|
36502
36515
|
if (copyMode) {
|
|
36503
36516
|
params.srfcopymode = copyMode;
|
|
36504
36517
|
}
|