@ibiz-template/runtime 0.5.0 → 0.5.1-dev.0
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 +165 -144
- package/dist/index.system.min.js +1 -1
- package/out/constant/view-type.d.ts +5 -1
- package/out/constant/view-type.d.ts.map +1 -1
- package/out/constant/view-type.js +4 -0
- package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts +1 -2
- package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/tree-exp-bar.controller.js +6 -7
- package/out/controller/control/gantt/gantt.controller.js +2 -2
- package/out/controller/control/gantt/gantt.service.js +2 -2
- package/out/controller/control/tree/tree.controller.d.ts +8 -3
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +63 -63
- package/out/controller/control/tree/tree.service.js +8 -8
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +2 -2
- package/out/interface/controller/event/view/i-sub-app-ref-view.event.d.ts +12 -0
- package/out/interface/controller/event/view/i-sub-app-ref-view.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-sub-app-ref-view.event.js +1 -0
- package/out/interface/controller/event/view/index.d.ts +1 -0
- package/out/interface/controller/event/view/index.d.ts.map +1 -1
- package/out/interface/controller/event/view/index.js +1 -0
- package/out/interface/controller/state/control/i-gantt.state.d.ts +2 -2
- package/out/interface/controller/state/control/i-gantt.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +26 -25
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/interface/controller/state/view/i-sub-app-ref-view.state.d.ts +11 -0
- package/out/interface/controller/state/view/i-sub-app-ref-view.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-sub-app-ref-view.state.js +1 -0
- package/out/interface/controller/state/view/index.d.ts +1 -0
- package/out/interface/controller/state/view/index.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.js +1 -0
- package/out/service/dto/method.dto.d.ts +12 -1
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +15 -3
- package/out/service/vo/gantt-node-data/gantt-code-list-node-data.d.ts +2 -2
- package/out/service/vo/gantt-node-data/gantt-code-list-node-data.d.ts.map +1 -1
- package/out/service/vo/gantt-node-data/gantt-data-set-node-data.d.ts +2 -2
- package/out/service/vo/gantt-node-data/gantt-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/gantt-node-data/gantt-static-node-data.d.ts +2 -2
- package/out/service/vo/gantt-node-data/gantt-static-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-code-list-node-data.d.ts +3 -3
- package/out/service/vo/tree-node-data/tree-code-list-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-code-list-node-data.js +10 -10
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +4 -4
- 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 +27 -27
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +12 -13
- 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 +8 -8
- package/out/service/vo/tree-node-data/tree-static-node-data.d.ts +4 -4
- package/out/service/vo/tree-node-data/tree-static-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-static-node-data.js +11 -11
- package/package.json +5 -5
- package/src/constant/view-type.ts +5 -0
- package/src/controller/control/exp-bar/tree-exp-bar.controller.ts +6 -7
- package/src/controller/control/gantt/gantt.controller.ts +2 -2
- package/src/controller/control/gantt/gantt.service.ts +2 -2
- package/src/controller/control/tree/tree.controller.ts +70 -65
- package/src/controller/control/tree/tree.service.ts +8 -8
- package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +7 -3
- package/src/interface/controller/event/view/i-sub-app-ref-view.event.ts +12 -0
- package/src/interface/controller/event/view/index.ts +1 -0
- package/src/interface/controller/state/control/i-gantt.state.ts +2 -2
- package/src/interface/controller/state/control/i-tree.state.ts +27 -25
- package/src/interface/controller/state/view/i-sub-app-ref-view.state.ts +10 -0
- package/src/interface/controller/state/view/index.ts +1 -0
- package/src/service/dto/method.dto.ts +14 -2
- package/src/service/vo/gantt-node-data/gantt-code-list-node-data.ts +2 -2
- package/src/service/vo/gantt-node-data/gantt-data-set-node-data.ts +2 -2
- package/src/service/vo/gantt-node-data/gantt-static-node-data.ts +2 -2
- package/src/service/vo/tree-node-data/tree-code-list-node-data.ts +13 -13
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +35 -35
- package/src/service/vo/tree-node-data/tree-node-data.ts +19 -22
- package/src/service/vo/tree-node-data/tree-static-node-data.ts +16 -15
package/dist/index.esm.js
CHANGED
|
@@ -2419,6 +2419,7 @@ var ViewType = /* @__PURE__ */ ((ViewType2) => {
|
|
|
2419
2419
|
ViewType2["DE_WF_PROXY_START_VIEW"] = "DEWFPROXYSTARTVIEW";
|
|
2420
2420
|
ViewType2["DE_WF_START_VIEW"] = "DEWFSTARTVIEW";
|
|
2421
2421
|
ViewType2["DE_WIZARD_VIEW"] = "DEWIZARDVIEW";
|
|
2422
|
+
ViewType2["DE_SUB_APP_REF_VIEW"] = "DESUBAPPREFVIEW";
|
|
2422
2423
|
return ViewType2;
|
|
2423
2424
|
})(ViewType || {});
|
|
2424
2425
|
|
|
@@ -7048,11 +7049,22 @@ import { RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
|
|
|
7048
7049
|
// src/service/dto/method.dto.ts
|
|
7049
7050
|
import { ModelError as ModelError7 } from "@ibiz-template/core";
|
|
7050
7051
|
var MethodDto = class _MethodDto {
|
|
7051
|
-
|
|
7052
|
+
/**
|
|
7053
|
+
* Creates an instance of MethodDto.
|
|
7054
|
+
* @author lxm
|
|
7055
|
+
* @date 2024-01-04 05:39:07
|
|
7056
|
+
* @param {IAppDEService} service
|
|
7057
|
+
* @param {IAppDataEntity} entity
|
|
7058
|
+
* @param {boolean} [isLocalMode]
|
|
7059
|
+
* @param {IAppDEMethodDTO} [dto]
|
|
7060
|
+
* @param {boolean} [inSelfLoop] 是否在自关系循环中
|
|
7061
|
+
*/
|
|
7062
|
+
constructor(service, entity, isLocalMode, dto, inSelfLoop) {
|
|
7052
7063
|
this.service = service;
|
|
7053
7064
|
this.entity = entity;
|
|
7054
7065
|
this.isLocalMode = isLocalMode;
|
|
7055
7066
|
this.dto = dto;
|
|
7067
|
+
this.inSelfLoop = inSelfLoop;
|
|
7056
7068
|
this.dtoMap = /* @__PURE__ */ new Map();
|
|
7057
7069
|
/**
|
|
7058
7070
|
* 当前 DTO 是否已经计算过关系相关逻辑
|
|
@@ -7185,7 +7197,7 @@ var MethodDto = class _MethodDto {
|
|
|
7185
7197
|
* @return {*} {Promise<IDataEntity[]>}
|
|
7186
7198
|
*/
|
|
7187
7199
|
async sets(context, data) {
|
|
7188
|
-
if (this.isLocalMode) {
|
|
7200
|
+
if (this.isLocalMode && !this.inSelfLoop) {
|
|
7189
7201
|
this.service.local.clear();
|
|
7190
7202
|
}
|
|
7191
7203
|
await this.calcRs(context);
|
|
@@ -7287,9 +7299,10 @@ var MethodDto = class _MethodDto {
|
|
|
7287
7299
|
entity.appDEMethodDTOs || [],
|
|
7288
7300
|
field.refAppDEMethodDTOId
|
|
7289
7301
|
);
|
|
7302
|
+
const inSelfLoop = this.entity.codeName === entity.codeName;
|
|
7290
7303
|
const service = await this.app.deService.getService(context, entity.id);
|
|
7291
7304
|
service.isLocalMode = true;
|
|
7292
|
-
const dto = new _MethodDto(service, entity, true, methodDto);
|
|
7305
|
+
const dto = new _MethodDto(service, entity, true, methodDto, inSelfLoop);
|
|
7293
7306
|
this.dtoMap.set(field.codeName, dto);
|
|
7294
7307
|
return dto;
|
|
7295
7308
|
}
|
|
@@ -9135,20 +9148,20 @@ import { createUUID as createUUID5 } from "qx-util";
|
|
|
9135
9148
|
var TreeNodeData = class {
|
|
9136
9149
|
constructor(model, parentNodeData, opts) {
|
|
9137
9150
|
this._uuid = createUUID5();
|
|
9138
|
-
this.
|
|
9139
|
-
this.
|
|
9140
|
-
this.
|
|
9151
|
+
this._leaf = false;
|
|
9152
|
+
this._leaf = opts.leaf === true;
|
|
9153
|
+
this._parent = parentNodeData;
|
|
9141
9154
|
this._nodeType = model.treeNodeType;
|
|
9142
|
-
if (this.
|
|
9143
|
-
this.
|
|
9155
|
+
if (this._parent) {
|
|
9156
|
+
this._context = { ...this._parent._context };
|
|
9144
9157
|
}
|
|
9145
9158
|
if (opts.navContext) {
|
|
9146
|
-
this.
|
|
9159
|
+
this._context = Object.assign(this._context || {}, opts.navContext);
|
|
9147
9160
|
}
|
|
9148
9161
|
if (opts.navParams) {
|
|
9149
|
-
this.
|
|
9162
|
+
this._params = { ...opts.navParams };
|
|
9150
9163
|
}
|
|
9151
|
-
this.
|
|
9164
|
+
this._nodeId = model.id;
|
|
9152
9165
|
}
|
|
9153
9166
|
/**
|
|
9154
9167
|
* 计算节点图标
|
|
@@ -9178,25 +9191,25 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
9178
9191
|
constructor(model, parentNodeData, opts) {
|
|
9179
9192
|
super(model, parentNodeData, opts);
|
|
9180
9193
|
const { data } = opts;
|
|
9181
|
-
this.
|
|
9182
|
-
this.
|
|
9183
|
-
const selfId = "".concat(model.id, "@").concat(this.
|
|
9184
|
-
Object.defineProperty(this, "
|
|
9194
|
+
this._text = data.text;
|
|
9195
|
+
this._value = data.value;
|
|
9196
|
+
const selfId = "".concat(model.id, "@").concat(this._value).toLowerCase();
|
|
9197
|
+
Object.defineProperty(this, "_id", {
|
|
9185
9198
|
get() {
|
|
9186
|
-
return this.
|
|
9199
|
+
return this._parent ? "".concat(this._parent._id, ":").concat(selfId) : selfId;
|
|
9187
9200
|
},
|
|
9188
9201
|
enumerable: true,
|
|
9189
9202
|
configurable: true
|
|
9190
9203
|
});
|
|
9191
9204
|
if (model.appDataEntityId) {
|
|
9192
9205
|
const deName = calcDeCodeNameById(model.appDataEntityId);
|
|
9193
|
-
this.
|
|
9194
|
-
[deName]: this.
|
|
9206
|
+
this._context = Object.assign(this._context || {}, {
|
|
9207
|
+
[deName]: this._value
|
|
9195
9208
|
});
|
|
9196
9209
|
}
|
|
9197
|
-
this.srfkey = this.
|
|
9198
|
-
this.srfmajortext = this.
|
|
9199
|
-
this.
|
|
9210
|
+
this.srfkey = this._value;
|
|
9211
|
+
this.srfmajortext = this._text;
|
|
9212
|
+
this._icon = this.calcIcon(model);
|
|
9200
9213
|
}
|
|
9201
9214
|
};
|
|
9202
9215
|
|
|
@@ -9207,46 +9220,46 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
9207
9220
|
var _a;
|
|
9208
9221
|
super(model, parentNodeData, opts);
|
|
9209
9222
|
const { data } = opts;
|
|
9210
|
-
this.
|
|
9211
|
-
this.
|
|
9212
|
-
this.
|
|
9223
|
+
this._deData = data;
|
|
9224
|
+
this._text = model.textAppDEFieldId ? data[model.textAppDEFieldId] : data.srfmajortext;
|
|
9225
|
+
this._value = model.idAppDEFieldId ? data[model.idAppDEFieldId] : data.srfkey;
|
|
9213
9226
|
const selfId = "".concat(model.id, "@").concat(data.srfkey).toLowerCase();
|
|
9214
|
-
Object.defineProperty(this, "
|
|
9227
|
+
Object.defineProperty(this, "_id", {
|
|
9215
9228
|
get() {
|
|
9216
|
-
return this.
|
|
9229
|
+
return this._parent ? "".concat(this._parent._id, ":").concat(selfId) : selfId;
|
|
9217
9230
|
},
|
|
9218
9231
|
enumerable: true,
|
|
9219
9232
|
configurable: true
|
|
9220
9233
|
});
|
|
9221
9234
|
if (model.appDataEntityId) {
|
|
9222
9235
|
const deName = calcDeCodeNameById(model.appDataEntityId);
|
|
9223
|
-
this.
|
|
9236
|
+
this._context = Object.assign(this._context || {}, {
|
|
9224
9237
|
[deName]: data.srfkey
|
|
9225
9238
|
});
|
|
9226
9239
|
}
|
|
9227
|
-
this.
|
|
9228
|
-
this.
|
|
9229
|
-
this.icon = this.calcIcon(model);
|
|
9230
|
-
this.textHtml = this.calcTextHtml(model);
|
|
9240
|
+
this._icon = this.calcIcon(model);
|
|
9241
|
+
this._textHtml = this.calcTextHtml(model);
|
|
9231
9242
|
if (model.leafFlagAppDEFieldId) {
|
|
9232
|
-
this.
|
|
9243
|
+
this._leaf = fieldValueToBoolean(data[model.leafFlagAppDEFieldId]);
|
|
9233
9244
|
}
|
|
9234
|
-
const
|
|
9245
|
+
const dataItemKeyMap = /* @__PURE__ */ new Map();
|
|
9246
|
+
dataItemKeyMap.set("srfkey", "srfkey");
|
|
9247
|
+
dataItemKeyMap.set("srfmajortext", "srfmajortext");
|
|
9235
9248
|
const dataItemDefaults = {};
|
|
9236
9249
|
(_a = model.detreeNodeDataItems) == null ? void 0 : _a.forEach((dataItem) => {
|
|
9237
9250
|
const uiKey = dataItem.id.toLowerCase();
|
|
9238
9251
|
const deFieldKey = dataItem.appDEFieldId.toLowerCase();
|
|
9239
|
-
|
|
9252
|
+
dataItemKeyMap.set(uiKey, deFieldKey);
|
|
9240
9253
|
if (dataItem.defaultValue) {
|
|
9241
9254
|
dataItemDefaults[uiKey] = dataItem.defaultValue;
|
|
9242
9255
|
}
|
|
9243
9256
|
});
|
|
9244
9257
|
return new Proxy(this, {
|
|
9245
9258
|
set(target, p, value) {
|
|
9246
|
-
if (Object.prototype.hasOwnProperty.call(target.
|
|
9247
|
-
target.
|
|
9248
|
-
} else if (
|
|
9249
|
-
target.
|
|
9259
|
+
if (Object.prototype.hasOwnProperty.call(target._deData, p)) {
|
|
9260
|
+
target._deData[p] = value;
|
|
9261
|
+
} else if (dataItemKeyMap.has(p)) {
|
|
9262
|
+
target._deData[dataItemKeyMap.get(p)] = value;
|
|
9250
9263
|
} else {
|
|
9251
9264
|
target[p] = value;
|
|
9252
9265
|
}
|
|
@@ -9256,19 +9269,19 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
9256
9269
|
if (target[p] !== void 0) {
|
|
9257
9270
|
return target[p];
|
|
9258
9271
|
}
|
|
9259
|
-
if (
|
|
9260
|
-
return target.
|
|
9272
|
+
if (dataItemKeyMap.has(p)) {
|
|
9273
|
+
return target._deData[dataItemKeyMap.get(p)] || dataItemDefaults[p];
|
|
9261
9274
|
}
|
|
9262
|
-
if (target.
|
|
9263
|
-
return target.
|
|
9275
|
+
if (target._deData[p] !== void 0) {
|
|
9276
|
+
return target._deData[p];
|
|
9264
9277
|
}
|
|
9265
9278
|
},
|
|
9266
9279
|
ownKeys(target) {
|
|
9267
9280
|
const allKeys = [
|
|
9268
9281
|
.../* @__PURE__ */ new Set([
|
|
9269
9282
|
...Object.keys(target),
|
|
9270
|
-
...
|
|
9271
|
-
...Object.keys(target.
|
|
9283
|
+
...dataItemKeyMap.keys(),
|
|
9284
|
+
...Object.keys(target._deData)
|
|
9272
9285
|
])
|
|
9273
9286
|
];
|
|
9274
9287
|
updateKeyDefine(target, allKeys);
|
|
@@ -9279,11 +9292,11 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
9279
9292
|
calcIcon(model) {
|
|
9280
9293
|
const icon = super.calcIcon(model) || {};
|
|
9281
9294
|
const { iconAppDEFieldId, detreeNodeDataItems } = model;
|
|
9282
|
-
if (iconAppDEFieldId && this.
|
|
9283
|
-
icon.imagePath = this.
|
|
9295
|
+
if (iconAppDEFieldId && this._deData[iconAppDEFieldId]) {
|
|
9296
|
+
icon.imagePath = this._deData[iconAppDEFieldId];
|
|
9284
9297
|
}
|
|
9285
9298
|
if (icon) {
|
|
9286
|
-
this.
|
|
9299
|
+
this._icon = icon;
|
|
9287
9300
|
}
|
|
9288
9301
|
const iconDataItem = detreeNodeDataItems == null ? void 0 : detreeNodeDataItems.find((item) => item.id === "icon");
|
|
9289
9302
|
if (iconDataItem) {
|
|
@@ -9302,7 +9315,7 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
9302
9315
|
calcDataItemScript(dataItem) {
|
|
9303
9316
|
if (dataItem.customCode && dataItem.scriptCode) {
|
|
9304
9317
|
return ScriptFactory.execScriptFn(
|
|
9305
|
-
{ data: this.
|
|
9318
|
+
{ data: this._deData },
|
|
9306
9319
|
dataItem.scriptCode,
|
|
9307
9320
|
{
|
|
9308
9321
|
isAsync: false
|
|
@@ -9336,28 +9349,28 @@ var TreeStaticNodeData = class extends TreeNodeData {
|
|
|
9336
9349
|
super(model, parentNodeData, opts);
|
|
9337
9350
|
const nodeValue = model.nodeValue === "root" ? void 0 : model.nodeValue;
|
|
9338
9351
|
const selfId = "".concat(model.id).toLowerCase();
|
|
9339
|
-
Object.defineProperty(this, "
|
|
9352
|
+
Object.defineProperty(this, "_id", {
|
|
9340
9353
|
get() {
|
|
9341
|
-
return this.
|
|
9354
|
+
return this._parent ? "".concat(this._parent._id, ":").concat(selfId) : selfId;
|
|
9342
9355
|
},
|
|
9343
9356
|
enumerable: true,
|
|
9344
9357
|
configurable: true
|
|
9345
9358
|
});
|
|
9346
|
-
this.
|
|
9347
|
-
this.
|
|
9359
|
+
this._text = model.text;
|
|
9360
|
+
this._value = nodeValue;
|
|
9348
9361
|
if (parentNodeData && opts.parentValueLevel) {
|
|
9349
9362
|
let parent = parentNodeData;
|
|
9350
9363
|
for (let index = 1; index < opts.parentValueLevel; index++) {
|
|
9351
|
-
parent = parent == null ? void 0 : parent.
|
|
9364
|
+
parent = parent == null ? void 0 : parent._parent;
|
|
9352
9365
|
}
|
|
9353
|
-
if (parent == null ? void 0 : parent.
|
|
9354
|
-
this.
|
|
9366
|
+
if (parent == null ? void 0 : parent._deData) {
|
|
9367
|
+
this._deData = parent._deData;
|
|
9355
9368
|
}
|
|
9356
|
-
this.
|
|
9369
|
+
this._value = nodeValue || (parent == null ? void 0 : parent._value);
|
|
9357
9370
|
}
|
|
9358
|
-
this.srfkey = ((_a = this.
|
|
9359
|
-
this.srfmajortext = ((_b = this.
|
|
9360
|
-
this.
|
|
9371
|
+
this.srfkey = ((_a = this._deData) == null ? void 0 : _a.srfkey) || this._value;
|
|
9372
|
+
this.srfmajortext = ((_b = this._deData) == null ? void 0 : _b.srfmajortext) || this._text;
|
|
9373
|
+
this._icon = this.calcIcon(model);
|
|
9361
9374
|
}
|
|
9362
9375
|
};
|
|
9363
9376
|
|
|
@@ -18691,7 +18704,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
18691
18704
|
* @date 2023-07-10 03:07:11
|
|
18692
18705
|
* @memberof TreeExpBarController
|
|
18693
18706
|
*/
|
|
18694
|
-
this.navKeyName = "
|
|
18707
|
+
this.navKeyName = "_id";
|
|
18695
18708
|
/**
|
|
18696
18709
|
* 有导航视图的节点模型标识集合
|
|
18697
18710
|
* @author lxm
|
|
@@ -18734,7 +18747,6 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
18734
18747
|
*
|
|
18735
18748
|
* @author zk
|
|
18736
18749
|
* @date 2023-05-29 03:05:36
|
|
18737
|
-
* @param {IData} data
|
|
18738
18750
|
* @memberof ExpBarControlController
|
|
18739
18751
|
*/
|
|
18740
18752
|
xDataActive(event) {
|
|
@@ -18751,11 +18763,11 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
18751
18763
|
* @memberof TabExpPanelController
|
|
18752
18764
|
*/
|
|
18753
18765
|
getNavViewMsg(node, context, params) {
|
|
18754
|
-
const nodeId = node.
|
|
18755
|
-
const deData = node.
|
|
18756
|
-
const nodeModel = this.getNodeModel(node.
|
|
18766
|
+
const nodeId = node._id;
|
|
18767
|
+
const deData = node._deData || node;
|
|
18768
|
+
const nodeModel = this.getNodeModel(node._nodeId);
|
|
18757
18769
|
if (!nodeModel) {
|
|
18758
|
-
throw new RuntimeError49("\u627E\u4E0D\u5230".concat(node.
|
|
18770
|
+
throw new RuntimeError49("\u627E\u4E0D\u5230".concat(node._nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
18759
18771
|
}
|
|
18760
18772
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
18761
18773
|
result.context.currentSrfNav = nodeId;
|
|
@@ -18775,7 +18787,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
18775
18787
|
if (this.state.noNeedNavView) {
|
|
18776
18788
|
return true;
|
|
18777
18789
|
}
|
|
18778
|
-
return this.navNodeModelIds.includes(node.
|
|
18790
|
+
return this.navNodeModelIds.includes(node._nodeId);
|
|
18779
18791
|
});
|
|
18780
18792
|
if (!data) {
|
|
18781
18793
|
return;
|
|
@@ -26000,7 +26012,7 @@ var TreeService = class extends MDControlService {
|
|
|
26000
26012
|
);
|
|
26001
26013
|
} else {
|
|
26002
26014
|
const childNodeRSs = getChildNodeRSs(this.model, {
|
|
26003
|
-
parentId: parentNodeData == null ? void 0 : parentNodeData.
|
|
26015
|
+
parentId: parentNodeData == null ? void 0 : parentNodeData._nodeId,
|
|
26004
26016
|
hasQuery
|
|
26005
26017
|
});
|
|
26006
26018
|
if (childNodeRSs.length === 0) {
|
|
@@ -26086,13 +26098,13 @@ var TreeService = class extends MDControlService {
|
|
|
26086
26098
|
result.map(async (childNode, index) => {
|
|
26087
26099
|
var _a;
|
|
26088
26100
|
if (expanded && // 全展开合只展开首节点expanded都为true
|
|
26089
|
-
(!expandFirstOnly || expandFirstOnly && index === 0) || ((_a = opts.defaultExpandedKeys) == null ? void 0 : _a.length) && opts.defaultExpandedKeys.includes(childNode.
|
|
26101
|
+
(!expandFirstOnly || expandFirstOnly && index === 0) || ((_a = opts.defaultExpandedKeys) == null ? void 0 : _a.length) && opts.defaultExpandedKeys.includes(childNode._id) || // 外部回显给的默认展开节点集合有的展开
|
|
26090
26102
|
isExpandedRoot) {
|
|
26091
26103
|
const subChildrenNodes = await this.fetchChildNodes(
|
|
26092
26104
|
childNode,
|
|
26093
26105
|
opts
|
|
26094
26106
|
);
|
|
26095
|
-
childNode.
|
|
26107
|
+
childNode._children = subChildrenNodes;
|
|
26096
26108
|
}
|
|
26097
26109
|
})
|
|
26098
26110
|
);
|
|
@@ -26136,25 +26148,25 @@ var TreeService = class extends MDControlService {
|
|
|
26136
26148
|
const params = { ...opts.params };
|
|
26137
26149
|
const context = {
|
|
26138
26150
|
...opts.context,
|
|
26139
|
-
...(parentNodeData == null ? void 0 : parentNodeData.
|
|
26151
|
+
...(parentNodeData == null ? void 0 : parentNodeData._context) || {}
|
|
26140
26152
|
};
|
|
26141
26153
|
let data = {};
|
|
26142
26154
|
let parentData;
|
|
26143
26155
|
if (parentNodeData) {
|
|
26144
26156
|
parentData = parentNodeData;
|
|
26145
26157
|
for (let index = 1; index < parentValueLevel; index++) {
|
|
26146
|
-
parentData = parentData == null ? void 0 : parentData.
|
|
26158
|
+
parentData = parentData == null ? void 0 : parentData._parent;
|
|
26147
26159
|
}
|
|
26148
26160
|
}
|
|
26149
26161
|
let derValue;
|
|
26150
26162
|
let deName;
|
|
26151
26163
|
if (parentData) {
|
|
26152
|
-
data = parentData.
|
|
26153
|
-
const parentNodeModel = getTreeNode(this.model, parentData.
|
|
26164
|
+
data = parentData._deData || {};
|
|
26165
|
+
const parentNodeModel = getTreeNode(this.model, parentData._nodeId);
|
|
26154
26166
|
if (parentNodeModel.appDataEntityId) {
|
|
26155
26167
|
deName = calcDeCodeNameById(parentNodeModel.appDataEntityId);
|
|
26156
26168
|
}
|
|
26157
|
-
derValue = parentData.
|
|
26169
|
+
derValue = parentData._value;
|
|
26158
26170
|
}
|
|
26159
26171
|
const { resultContext, resultParams } = calcNavParams(
|
|
26160
26172
|
{
|
|
@@ -26476,7 +26488,7 @@ var TreeController = class extends MDControlController {
|
|
|
26476
26488
|
this.state.isLoading = false;
|
|
26477
26489
|
}
|
|
26478
26490
|
if (parentNode) {
|
|
26479
|
-
parentNode.
|
|
26491
|
+
parentNode._children = nodes;
|
|
26480
26492
|
} else {
|
|
26481
26493
|
this.state.rootNodes = nodes;
|
|
26482
26494
|
}
|
|
@@ -26493,10 +26505,11 @@ var TreeController = class extends MDControlController {
|
|
|
26493
26505
|
async afterLoadNodes(nodes) {
|
|
26494
26506
|
this.state.items = [];
|
|
26495
26507
|
recursiveIterate10(
|
|
26496
|
-
{
|
|
26508
|
+
{ _children: this.state.rootNodes },
|
|
26497
26509
|
(node) => {
|
|
26498
26510
|
this.state.items.push(node);
|
|
26499
|
-
}
|
|
26511
|
+
},
|
|
26512
|
+
{ childrenFields: ["_children"] }
|
|
26500
26513
|
);
|
|
26501
26514
|
this.state.expandedKeys = this.calcExpandedKeys(nodes);
|
|
26502
26515
|
}
|
|
@@ -26509,7 +26522,7 @@ var TreeController = class extends MDControlController {
|
|
|
26509
26522
|
*/
|
|
26510
26523
|
async onTreeNodeClick(nodeData, event) {
|
|
26511
26524
|
var _a;
|
|
26512
|
-
const clickActionItem = (_a = this.contextMenuInfos[nodeData.
|
|
26525
|
+
const clickActionItem = (_a = this.contextMenuInfos[nodeData._nodeId]) == null ? void 0 : _a.clickTBUIActionItem;
|
|
26513
26526
|
if (clickActionItem) {
|
|
26514
26527
|
return this.doUIAction(
|
|
26515
26528
|
clickActionItem.uiactionId,
|
|
@@ -26519,14 +26532,14 @@ var TreeController = class extends MDControlController {
|
|
|
26519
26532
|
);
|
|
26520
26533
|
}
|
|
26521
26534
|
if (this.state.navigational) {
|
|
26522
|
-
const nodeModel = this.getNodeModel(nodeData.
|
|
26535
|
+
const nodeModel = this.getNodeModel(nodeData._nodeId);
|
|
26523
26536
|
if (!(nodeModel == null ? void 0 : nodeModel.navAppViewId)) {
|
|
26524
26537
|
return;
|
|
26525
26538
|
}
|
|
26526
26539
|
}
|
|
26527
26540
|
if (this.state.singleSelect) {
|
|
26528
26541
|
const { selectedData } = this.state;
|
|
26529
|
-
const filterArr = selectedData.filter((item) => item.
|
|
26542
|
+
const filterArr = selectedData.filter((item) => item._id !== nodeData._id);
|
|
26530
26543
|
if (filterArr.length === selectedData.length) {
|
|
26531
26544
|
this.setSelection(
|
|
26532
26545
|
this.state.singleSelect ? [nodeData] : selectedData.concat([nodeData])
|
|
@@ -26547,11 +26560,11 @@ var TreeController = class extends MDControlController {
|
|
|
26547
26560
|
* @param {boolean} isExpand true为展开,false为折叠
|
|
26548
26561
|
*/
|
|
26549
26562
|
onExpandChange(nodeData, isExpand) {
|
|
26550
|
-
const hasKey = this.state.expandedKeys.includes(nodeData.
|
|
26563
|
+
const hasKey = this.state.expandedKeys.includes(nodeData._id);
|
|
26551
26564
|
if (isExpand && !hasKey) {
|
|
26552
|
-
this.state.expandedKeys.push(nodeData.
|
|
26565
|
+
this.state.expandedKeys.push(nodeData._id);
|
|
26553
26566
|
} else if (!isExpand && hasKey) {
|
|
26554
|
-
const index = this.state.expandedKeys.indexOf(nodeData.
|
|
26567
|
+
const index = this.state.expandedKeys.indexOf(nodeData._id);
|
|
26555
26568
|
if (index !== -1) {
|
|
26556
26569
|
this.state.expandedKeys.splice(index, 1);
|
|
26557
26570
|
}
|
|
@@ -26574,9 +26587,9 @@ var TreeController = class extends MDControlController {
|
|
|
26574
26587
|
return this._evt.emit("onActive", { ...nodeParams, nodeData: item });
|
|
26575
26588
|
}
|
|
26576
26589
|
setSelection(selection) {
|
|
26577
|
-
const selectionIds = selection.map((item) => item.
|
|
26590
|
+
const selectionIds = selection.map((item) => item._id);
|
|
26578
26591
|
const filterArr = this.state.items.filter(
|
|
26579
|
-
(item) => selectionIds.includes(item.
|
|
26592
|
+
(item) => selectionIds.includes(item._id)
|
|
26580
26593
|
);
|
|
26581
26594
|
super.setSelection(filterArr);
|
|
26582
26595
|
}
|
|
@@ -26595,11 +26608,11 @@ var TreeController = class extends MDControlController {
|
|
|
26595
26608
|
* 通过标识获取节点数据
|
|
26596
26609
|
* @author lxm
|
|
26597
26610
|
* @date 2023-12-22 02:21:38
|
|
26598
|
-
* @param {string}
|
|
26611
|
+
* @param {string} key 可以是节点_id也可以是_uuid
|
|
26599
26612
|
* @return {*} {(ITreeNodeData | undefined)}
|
|
26600
26613
|
*/
|
|
26601
26614
|
getNodeData(key) {
|
|
26602
|
-
const find = this.state.items.find((item) => item.
|
|
26615
|
+
const find = this.state.items.find((item) => item._id === key);
|
|
26603
26616
|
if (find) {
|
|
26604
26617
|
return find;
|
|
26605
26618
|
}
|
|
@@ -26654,9 +26667,9 @@ var TreeController = class extends MDControlController {
|
|
|
26654
26667
|
*/
|
|
26655
26668
|
parseTreeNodeData(nodeData) {
|
|
26656
26669
|
return {
|
|
26657
|
-
data: [{ ...nodeData, ...nodeData.
|
|
26658
|
-
context: Object.assign(this.context.clone(), nodeData.
|
|
26659
|
-
params: { ...this.params, ...nodeData.
|
|
26670
|
+
data: [{ ...nodeData, ...nodeData._deData || {} }],
|
|
26671
|
+
context: Object.assign(this.context.clone(), nodeData._context || {}),
|
|
26672
|
+
params: { ...this.params, ...nodeData._params || {} }
|
|
26660
26673
|
};
|
|
26661
26674
|
}
|
|
26662
26675
|
/**
|
|
@@ -26669,12 +26682,16 @@ var TreeController = class extends MDControlController {
|
|
|
26669
26682
|
*/
|
|
26670
26683
|
calcExpandedKeys(nodes) {
|
|
26671
26684
|
let expandedKeys = [...this.state.expandedKeys];
|
|
26672
|
-
recursiveIterate10(
|
|
26673
|
-
|
|
26674
|
-
|
|
26675
|
-
|
|
26676
|
-
|
|
26677
|
-
|
|
26685
|
+
recursiveIterate10(
|
|
26686
|
+
{ _children: nodes },
|
|
26687
|
+
(node) => {
|
|
26688
|
+
var _a;
|
|
26689
|
+
if ((_a = node._children) == null ? void 0 : _a.length) {
|
|
26690
|
+
expandedKeys.push(node._id);
|
|
26691
|
+
}
|
|
26692
|
+
},
|
|
26693
|
+
{ childrenFields: ["_children"] }
|
|
26694
|
+
);
|
|
26678
26695
|
expandedKeys = Array.from(new Set(expandedKeys));
|
|
26679
26696
|
return expandedKeys;
|
|
26680
26697
|
}
|
|
@@ -26687,7 +26704,7 @@ var TreeController = class extends MDControlController {
|
|
|
26687
26704
|
* @return {*} {Promise<void>}
|
|
26688
26705
|
*/
|
|
26689
26706
|
async refreshNodeChildren(nodeData, refreshParent = false) {
|
|
26690
|
-
const key = nodeData.srfkey ? "srfkey" : "
|
|
26707
|
+
const key = nodeData.srfkey ? "srfkey" : "_id";
|
|
26691
26708
|
const currentNode = this.state.items.find(
|
|
26692
26709
|
(item) => item[key] === nodeData[key]
|
|
26693
26710
|
);
|
|
@@ -26696,13 +26713,13 @@ var TreeController = class extends MDControlController {
|
|
|
26696
26713
|
return;
|
|
26697
26714
|
}
|
|
26698
26715
|
if (refreshParent) {
|
|
26699
|
-
const {
|
|
26700
|
-
if (!
|
|
26716
|
+
const { _parent } = currentNode;
|
|
26717
|
+
if (!_parent || !this.model.rootVisible && this.state.rootNodes.includes(_parent)) {
|
|
26701
26718
|
await this.refresh();
|
|
26702
26719
|
return;
|
|
26703
26720
|
}
|
|
26704
26721
|
}
|
|
26705
|
-
const targetNode = refreshParent ? currentNode.
|
|
26722
|
+
const targetNode = refreshParent ? currentNode._parent : currentNode;
|
|
26706
26723
|
const nodes = await this.loadNodes(targetNode);
|
|
26707
26724
|
this._evt.emit("onAfterRefreshParent", {
|
|
26708
26725
|
parentNode: targetNode,
|
|
@@ -26717,7 +26734,7 @@ var TreeController = class extends MDControlController {
|
|
|
26717
26734
|
return;
|
|
26718
26735
|
}
|
|
26719
26736
|
const existNodes = this.state.items.filter(
|
|
26720
|
-
(item) => noExpandKeys.includes(item.
|
|
26737
|
+
(item) => noExpandKeys.includes(item._id)
|
|
26721
26738
|
);
|
|
26722
26739
|
this.state.expandedKeys.push(...noExpandKeys);
|
|
26723
26740
|
if (existNodes.length === 0) {
|
|
@@ -26737,7 +26754,7 @@ var TreeController = class extends MDControlController {
|
|
|
26737
26754
|
* @return {*} {boolean}
|
|
26738
26755
|
*/
|
|
26739
26756
|
calcAllowDrag(draggingNode) {
|
|
26740
|
-
const nodeModel = this.getNodeModel(draggingNode.
|
|
26757
|
+
const nodeModel = this.getNodeModel(draggingNode._nodeId);
|
|
26741
26758
|
return (nodeModel == null ? void 0 : nodeModel.allowDrag) === true;
|
|
26742
26759
|
}
|
|
26743
26760
|
/**
|
|
@@ -26751,22 +26768,22 @@ var TreeController = class extends MDControlController {
|
|
|
26751
26768
|
*/
|
|
26752
26769
|
calcAllowDrop(draggingNode, dropNode, type) {
|
|
26753
26770
|
var _a, _b;
|
|
26754
|
-
const draggingNodeModel = this.getNodeModel(draggingNode.
|
|
26771
|
+
const draggingNodeModel = this.getNodeModel(draggingNode._nodeId);
|
|
26755
26772
|
if (type === "inner") {
|
|
26756
26773
|
return !!this.findDropNodeRS(
|
|
26757
|
-
dropNode.
|
|
26774
|
+
dropNode._nodeId,
|
|
26758
26775
|
draggingNodeModel.appDataEntityId
|
|
26759
26776
|
);
|
|
26760
26777
|
}
|
|
26761
|
-
if (((_a = draggingNode.
|
|
26762
|
-
const currentNodeModel = this.getNodeModel(dropNode.
|
|
26778
|
+
if (((_a = draggingNode._parent) == null ? void 0 : _a._id) === ((_b = dropNode._parent) == null ? void 0 : _b._id)) {
|
|
26779
|
+
const currentNodeModel = this.getNodeModel(dropNode._nodeId);
|
|
26763
26780
|
return (currentNodeModel == null ? void 0 : currentNodeModel.allowOrder) === true;
|
|
26764
26781
|
}
|
|
26765
|
-
if (!dropNode.
|
|
26782
|
+
if (!dropNode._parent) {
|
|
26766
26783
|
return false;
|
|
26767
26784
|
}
|
|
26768
26785
|
return !!this.findDropNodeRS(
|
|
26769
|
-
dropNode.
|
|
26786
|
+
dropNode._parent._nodeId,
|
|
26770
26787
|
draggingNodeModel.appDataEntityId
|
|
26771
26788
|
);
|
|
26772
26789
|
}
|
|
@@ -26795,44 +26812,44 @@ var TreeController = class extends MDControlController {
|
|
|
26795
26812
|
*/
|
|
26796
26813
|
async onNodeDrop(draggingNode, dropNode, dropType) {
|
|
26797
26814
|
var _a, _b, _c;
|
|
26798
|
-
if (dropType === "inner" && !dropNode.
|
|
26799
|
-
await this.expandNodeByKey([dropNode.
|
|
26815
|
+
if (dropType === "inner" && !dropNode._leaf && dropNode._children === void 0) {
|
|
26816
|
+
await this.expandNodeByKey([dropNode._id]);
|
|
26800
26817
|
}
|
|
26801
26818
|
const modifiedNodeDatas = [];
|
|
26802
|
-
const draggingNodeModel = this.getNodeModel(draggingNode.
|
|
26803
|
-
const dropInNode = dropType === "inner" ? dropNode : dropNode.
|
|
26804
|
-
const isChangedParent = (dropNode == null ? void 0 : dropNode.
|
|
26805
|
-
let orderNodeModel = this.getNodeModel(dropNode.
|
|
26806
|
-
if (dropType === "inner" || ((_b = dropNode.
|
|
26819
|
+
const draggingNodeModel = this.getNodeModel(draggingNode._nodeId);
|
|
26820
|
+
const dropInNode = dropType === "inner" ? dropNode : dropNode._parent;
|
|
26821
|
+
const isChangedParent = (dropNode == null ? void 0 : dropNode._id) !== ((_a = draggingNode._parent) == null ? void 0 : _a._id);
|
|
26822
|
+
let orderNodeModel = this.getNodeModel(dropNode._nodeId);
|
|
26823
|
+
if (dropType === "inner" || ((_b = dropNode._parent) == null ? void 0 : _b._id) !== ((_c = draggingNode._parent) == null ? void 0 : _c._id)) {
|
|
26807
26824
|
const dropNodeRs = this.findDropNodeRS(
|
|
26808
|
-
dropInNode.
|
|
26825
|
+
dropInNode._nodeId,
|
|
26809
26826
|
draggingNodeModel.appDataEntityId
|
|
26810
26827
|
);
|
|
26811
26828
|
if (dropNodeRs) {
|
|
26812
|
-
draggingNode.
|
|
26829
|
+
draggingNode._deData[dropNodeRs.pickupDEFName] = dropInNode._value;
|
|
26813
26830
|
modifiedNodeDatas.push(draggingNode);
|
|
26814
26831
|
orderNodeModel = this.getNodeModel(dropNodeRs.childDETreeNodeId);
|
|
26815
26832
|
}
|
|
26816
26833
|
}
|
|
26817
|
-
const originArr = draggingNode.
|
|
26834
|
+
const originArr = draggingNode._parent._children;
|
|
26818
26835
|
originArr.splice(originArr.indexOf(draggingNode), 1);
|
|
26819
26836
|
if (dropType === "inner") {
|
|
26820
|
-
if (!dropNode.
|
|
26821
|
-
dropNode.
|
|
26822
|
-
dropNode.
|
|
26823
|
-
this.state.expandedKeys.push(dropNode.
|
|
26837
|
+
if (!dropNode._children) {
|
|
26838
|
+
dropNode._children = [];
|
|
26839
|
+
dropNode._leaf = true;
|
|
26840
|
+
this.state.expandedKeys.push(dropNode._id);
|
|
26824
26841
|
}
|
|
26825
|
-
dropNode.
|
|
26842
|
+
dropNode._children.push(draggingNode);
|
|
26826
26843
|
} else {
|
|
26827
|
-
let insertIndex = dropInNode.
|
|
26844
|
+
let insertIndex = dropInNode._children.indexOf(dropNode);
|
|
26828
26845
|
if (dropType === "next") {
|
|
26829
26846
|
insertIndex += 1;
|
|
26830
26847
|
}
|
|
26831
|
-
dropInNode.
|
|
26848
|
+
dropInNode._children.splice(insertIndex, 0, draggingNode);
|
|
26832
26849
|
}
|
|
26833
26850
|
if (dropType === "inner" || isChangedParent) {
|
|
26834
|
-
draggingNode.
|
|
26835
|
-
draggingNode.
|
|
26851
|
+
draggingNode._parent = dropInNode;
|
|
26852
|
+
draggingNode._nodeId = orderNodeModel.id;
|
|
26836
26853
|
this.state.expandedKeys = this.calcExpandedKeys([dropInNode]);
|
|
26837
26854
|
}
|
|
26838
26855
|
const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
|
|
@@ -26842,7 +26859,7 @@ var TreeController = class extends MDControlController {
|
|
|
26842
26859
|
}
|
|
26843
26860
|
const sortField = sortAppDEFieldId.toLowerCase();
|
|
26844
26861
|
const isAsc = sortDir === "ASC";
|
|
26845
|
-
const changedArr = [...dropInNode.
|
|
26862
|
+
const changedArr = [...dropInNode._children];
|
|
26846
26863
|
if (!isAsc) {
|
|
26847
26864
|
changedArr.reverse();
|
|
26848
26865
|
}
|
|
@@ -26854,13 +26871,13 @@ var TreeController = class extends MDControlController {
|
|
|
26854
26871
|
};
|
|
26855
26872
|
let lastSort;
|
|
26856
26873
|
changedArr.forEach((item, index) => {
|
|
26857
|
-
const deData = item.
|
|
26874
|
+
const deData = item._deData;
|
|
26858
26875
|
if (lastSort === void 0) {
|
|
26859
26876
|
if (item === draggingNode) {
|
|
26860
26877
|
if (index === 0) {
|
|
26861
26878
|
lastSort = 100;
|
|
26862
26879
|
} else {
|
|
26863
|
-
lastSort = getNextSort(getSort(changedArr[index - 1].
|
|
26880
|
+
lastSort = getNextSort(getSort(changedArr[index - 1]._deData));
|
|
26864
26881
|
}
|
|
26865
26882
|
deData[sortField] = lastSort;
|
|
26866
26883
|
if (modifiedNodeDatas.indexOf(item) === -1) {
|
|
@@ -26891,8 +26908,8 @@ var TreeController = class extends MDControlController {
|
|
|
26891
26908
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
26892
26909
|
await Promise.all(
|
|
26893
26910
|
nodeDatas.map(async (node) => {
|
|
26894
|
-
const model = this.getNodeModel(node.
|
|
26895
|
-
const deData = node.
|
|
26911
|
+
const model = this.getNodeModel(node._nodeId);
|
|
26912
|
+
const deData = node._deData;
|
|
26896
26913
|
const deName = calcDeCodeNameById(model.appDataEntityId);
|
|
26897
26914
|
const tempContext = this.context.clone();
|
|
26898
26915
|
tempContext[deName] = deData.srfkey;
|
|
@@ -26903,7 +26920,7 @@ var TreeController = class extends MDControlController {
|
|
|
26903
26920
|
deData
|
|
26904
26921
|
);
|
|
26905
26922
|
if (res.data) {
|
|
26906
|
-
node.
|
|
26923
|
+
node._deData = res.data;
|
|
26907
26924
|
}
|
|
26908
26925
|
})
|
|
26909
26926
|
);
|
|
@@ -26917,15 +26934,15 @@ var TreeController = class extends MDControlController {
|
|
|
26917
26934
|
* @return {*} {Promise<void>}
|
|
26918
26935
|
*/
|
|
26919
26936
|
async modifyNodeText(nodeData, text) {
|
|
26920
|
-
const model = this.getNodeModel(nodeData.
|
|
26937
|
+
const model = this.getNodeModel(nodeData._nodeId);
|
|
26921
26938
|
if (!model.allowEditText) {
|
|
26922
26939
|
throw new RuntimeModelError61(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
26923
26940
|
}
|
|
26924
|
-
if (!nodeData.
|
|
26941
|
+
if (!nodeData._deData) {
|
|
26925
26942
|
throw new RuntimeError57("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
26926
26943
|
}
|
|
26927
|
-
nodeData.
|
|
26928
|
-
nodeData.
|
|
26944
|
+
nodeData._text = text;
|
|
26945
|
+
nodeData._deData[model.textAppDEFieldId] = text;
|
|
26929
26946
|
await this.updateDeNodeData([nodeData]);
|
|
26930
26947
|
}
|
|
26931
26948
|
};
|
|
@@ -28301,9 +28318,13 @@ var TreeGridExController = class extends TreeController {
|
|
|
28301
28318
|
}
|
|
28302
28319
|
async afterLoadNodes(nodes) {
|
|
28303
28320
|
await super.afterLoadNodes(nodes);
|
|
28304
|
-
recursiveIterate11(
|
|
28305
|
-
|
|
28306
|
-
|
|
28321
|
+
recursiveIterate11(
|
|
28322
|
+
{ _children: nodes },
|
|
28323
|
+
(node) => {
|
|
28324
|
+
this.state.rows[node._uuid] = new TreeGridExRowState(node, this);
|
|
28325
|
+
},
|
|
28326
|
+
{ childrenFields: ["_children"] }
|
|
28327
|
+
);
|
|
28307
28328
|
}
|
|
28308
28329
|
/**
|
|
28309
28330
|
* 转换各类多语言
|
|
@@ -29309,7 +29330,7 @@ var GanttService = class extends TreeService {
|
|
|
29309
29330
|
);
|
|
29310
29331
|
} else {
|
|
29311
29332
|
const childNodeRSs = getChildNodeRSs(this.model, {
|
|
29312
|
-
parentId: parentNodeData.
|
|
29333
|
+
parentId: parentNodeData._nodeId,
|
|
29313
29334
|
hasQuery
|
|
29314
29335
|
});
|
|
29315
29336
|
if (childNodeRSs.length === 0) {
|
|
@@ -29400,7 +29421,7 @@ var GanttService = class extends TreeService {
|
|
|
29400
29421
|
childNode,
|
|
29401
29422
|
opts
|
|
29402
29423
|
);
|
|
29403
|
-
childNode.
|
|
29424
|
+
childNode._children = subChildrenNodes;
|
|
29404
29425
|
}
|
|
29405
29426
|
})
|
|
29406
29427
|
);
|
|
@@ -29588,7 +29609,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
29588
29609
|
* @memberof GanttController
|
|
29589
29610
|
*/
|
|
29590
29611
|
async updateNodeData(nodeData, data, isTransformData = false) {
|
|
29591
|
-
const key = nodeData.srfkey ? "srfkey" : "
|
|
29612
|
+
const key = nodeData.srfkey ? "srfkey" : "_id";
|
|
29592
29613
|
const currentNode = this.state.items.find(
|
|
29593
29614
|
(item) => item[key] === nodeData[key]
|
|
29594
29615
|
);
|
|
@@ -29596,7 +29617,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
29596
29617
|
ibiz.log.error("\u627E\u4E0D\u5230\u5BF9\u5E94\u7684\u52A8\u6001\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E", nodeData);
|
|
29597
29618
|
return;
|
|
29598
29619
|
}
|
|
29599
|
-
const nodeModel = this.getNodeModel(currentNode.
|
|
29620
|
+
const nodeModel = this.getNodeModel(currentNode._nodeId);
|
|
29600
29621
|
if (nodeModel) {
|
|
29601
29622
|
const newData = isTransformData ? this.transformNodeDataItem(nodeModel, data) : data;
|
|
29602
29623
|
if (Object.keys(newData).length > 0) {
|