@ibiz-template/runtime 0.5.3-beta.3 → 0.5.3-beta.5
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 +913 -174
- package/dist/index.system.min.js +1 -1
- package/out/command/app/open-app-view/open-app-view.js +2 -2
- package/out/controller/constant/control/index.d.ts +1 -0
- package/out/controller/constant/control/index.d.ts.map +1 -1
- package/out/controller/constant/control/index.js +1 -0
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.d.ts +5 -0
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.d.ts.map +1 -0
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.js +6 -0
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +4 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.js +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts +10 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.js +12 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts +34 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.js +68 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.d.ts +205 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.js +345 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts +3 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts.map +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 +14 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts +16 -8
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.js +26 -12
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts +59 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +238 -1
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts +23 -1
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts +17 -0
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts +60 -2
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts.map +1 -1
- package/out/interface/provider/i-async-action.provider.d.ts +3 -2
- package/out/interface/provider/i-async-action.provider.d.ts.map +1 -1
- package/out/plugin/index.d.ts +1 -1
- package/out/plugin/index.d.ts.map +1 -1
- package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts +41 -3
- package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts.map +1 -1
- package/out/register/helper/app-menu-item-register.d.ts.map +1 -1
- package/out/register/helper/app-menu-item-register.js +1 -6
- package/out/service/dto/method.dto.js +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +1 -1
- 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 +16 -17
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +6 -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 +93 -41
- package/package.json +4 -4
- package/src/command/app/open-app-view/open-app-view.ts +2 -2
- package/src/controller/constant/control/index.ts +1 -0
- package/src/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.ts +5 -0
- package/src/controller/control/form/form/form.controller.ts +11 -1
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/index.ts +1 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts +22 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts +88 -2
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts +522 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts +18 -1
- package/src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts +43 -12
- package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +296 -1
- package/src/interface/controller/controller/control/i-tree-grid-ex.controller.ts +27 -2
- package/src/interface/controller/event/control/i-tree-grid-ex.event.ts +15 -1
- package/src/interface/controller/state/control/i-tree-grid-ex.state.ts +64 -2
- package/src/interface/provider/i-async-action.provider.ts +3 -2
- package/src/plugin/index.ts +4 -1
- package/src/plugin/remote-plugin-item/remote-plugin-item.ts +38 -3
- package/src/register/helper/app-menu-item-register.ts +1 -5
- package/src/service/dto/method.dto.ts +1 -1
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +15 -23
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +111 -46
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { recursiveIterate } from '@ibiz-template/core';
|
|
1
|
+
import { RuntimeError, awaitTimeout, recursiveIterate, } from '@ibiz-template/core';
|
|
2
|
+
import { clone } from 'ramda';
|
|
2
3
|
import { getTreeGridExColumnProvider } from '../../../register';
|
|
3
4
|
import { TreeGridExService } from './tree-grid-ex.service';
|
|
4
5
|
import { TreeController } from '../tree/tree.controller';
|
|
5
6
|
import { TreeGridExRowState } from './tree-grid-ex-row.state';
|
|
7
|
+
import { Srfuf } from '../../../service';
|
|
8
|
+
import { calcDeCodeNameById } from '../../../model';
|
|
9
|
+
import { TreeGridExNotifyState } from '../../constant';
|
|
10
|
+
import { handleAllSettled } from '../../../utils';
|
|
11
|
+
import { getDefaultValue, isValueChange } from '../../utils';
|
|
6
12
|
/**
|
|
7
13
|
* 树表格(增强)部件控制器
|
|
8
14
|
*
|
|
@@ -53,6 +59,9 @@ export class TreeGridExController extends TreeController {
|
|
|
53
59
|
*/
|
|
54
60
|
this.uaColumns = {};
|
|
55
61
|
}
|
|
62
|
+
get _evt() {
|
|
63
|
+
return this.evt;
|
|
64
|
+
}
|
|
56
65
|
/**
|
|
57
66
|
* 是否有配置宽度自适应列
|
|
58
67
|
*
|
|
@@ -72,11 +81,23 @@ export class TreeGridExController extends TreeController {
|
|
|
72
81
|
get overflowMode() {
|
|
73
82
|
return ibiz.config.grid.overflowMode;
|
|
74
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* 允许使用行编辑
|
|
86
|
+
* @author lxm
|
|
87
|
+
* @date 2023-08-17 02:52:07
|
|
88
|
+
* @readonly
|
|
89
|
+
* @type {boolean}
|
|
90
|
+
*/
|
|
91
|
+
get allowRowEdit() {
|
|
92
|
+
return this.state.rowEditOpen;
|
|
93
|
+
}
|
|
75
94
|
initState() {
|
|
76
95
|
super.initState();
|
|
77
96
|
this.state.columnStates = [];
|
|
78
97
|
this.state.rootNodes = [];
|
|
79
98
|
this.state.rows = {};
|
|
99
|
+
// this.state.rowEditOpen = false;
|
|
100
|
+
this.state.rowEditOpen = true;
|
|
80
101
|
}
|
|
81
102
|
async onCreated() {
|
|
82
103
|
await super.onCreated();
|
|
@@ -209,4 +230,220 @@ export class TreeGridExController extends TreeController {
|
|
|
209
230
|
convertColumnCaption(this.model.detreeColumns);
|
|
210
231
|
}
|
|
211
232
|
}
|
|
233
|
+
async save(nodeData) {
|
|
234
|
+
if (this.state.isSimple) {
|
|
235
|
+
ibiz.log.debug('简单模式,不保存');
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
if (nodeData._nodeType !== 'DE') {
|
|
239
|
+
throw new RuntimeError('非实体节点数据不能保存');
|
|
240
|
+
}
|
|
241
|
+
const rowState = this.state.rows[nodeData._uuid];
|
|
242
|
+
if (!rowState) {
|
|
243
|
+
throw new RuntimeError('行数据不存在');
|
|
244
|
+
}
|
|
245
|
+
if (!rowState.modified) {
|
|
246
|
+
ibiz.log.debug('值没有发生改变');
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
// const isValid = await this.validate(rowState);
|
|
250
|
+
// if (!isValid) {
|
|
251
|
+
// throw new RuntimeError('行数据校验不通过,保存取消');
|
|
252
|
+
// }
|
|
253
|
+
// 如果数据正在处理中,则延迟保存
|
|
254
|
+
if (rowState.processing) {
|
|
255
|
+
await awaitTimeout(500, this.save.bind(this), [nodeData]);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
const nodeModel = this.getNodeModel(nodeData._nodeId);
|
|
259
|
+
const { appDataEntityId } = nodeModel;
|
|
260
|
+
const isCreate = nodeData._deData.srfuf === Srfuf.CREATE;
|
|
261
|
+
if (isCreate) {
|
|
262
|
+
throw new RuntimeError('暂不支持新建');
|
|
263
|
+
}
|
|
264
|
+
const methodAction = 'update'; // todo补了模型从模型取
|
|
265
|
+
// 处理接口
|
|
266
|
+
const deName = calcDeCodeNameById(appDataEntityId);
|
|
267
|
+
const tempContext = this.context.clone();
|
|
268
|
+
tempContext[deName] = nodeData._deData.srfkey;
|
|
269
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
270
|
+
let res;
|
|
271
|
+
try {
|
|
272
|
+
res = await app.deService.exec(appDataEntityId, methodAction, tempContext, nodeData._deData);
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
await this._evt.emit('onSaveError', undefined);
|
|
276
|
+
this.actionNotification(`${isCreate ? 'CREATE' : 'UPDATE'}ERROR`, {
|
|
277
|
+
error: error,
|
|
278
|
+
data: rowState.data,
|
|
279
|
+
});
|
|
280
|
+
throw error;
|
|
281
|
+
}
|
|
282
|
+
// 后续处理
|
|
283
|
+
rowState.data._deData = res.data;
|
|
284
|
+
rowState.modified = false;
|
|
285
|
+
this.gridStateNotify(rowState, TreeGridExNotifyState.SAVE);
|
|
286
|
+
await this._evt.emit('onSaveSuccess', undefined);
|
|
287
|
+
}
|
|
288
|
+
async saveAll() {
|
|
289
|
+
const needSaveData = Object.values(this.state.rows)
|
|
290
|
+
.filter(row => row.modified)
|
|
291
|
+
.map(row => row.data);
|
|
292
|
+
if (!needSaveData.length) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
await handleAllSettled(needSaveData.map(data => {
|
|
296
|
+
return this.save(data);
|
|
297
|
+
}));
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* 树表格状态变更通知
|
|
301
|
+
*
|
|
302
|
+
* @author lxm
|
|
303
|
+
* @date 2022-09-20 18:09:07
|
|
304
|
+
*/
|
|
305
|
+
gridStateNotify(row, state) {
|
|
306
|
+
// 通知表格编辑列
|
|
307
|
+
Object.values(this.columns).forEach(column => {
|
|
308
|
+
column.gridStateNotify(row, state);
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* 设置行属性的值
|
|
313
|
+
*
|
|
314
|
+
* @author lxm
|
|
315
|
+
* @date 2022-08-24 10:08:40
|
|
316
|
+
* @param {GridRowState} row 行状态控制器
|
|
317
|
+
* @param {unknown} value 要设置的值
|
|
318
|
+
* @param {string} name 要设置的表单数据的属性名称
|
|
319
|
+
*/
|
|
320
|
+
async setRowValue(row, name, value) {
|
|
321
|
+
if (Object.prototype.hasOwnProperty.call(row.data, name) &&
|
|
322
|
+
!isValueChange(row.data[name], value)) {
|
|
323
|
+
// `表格行数据里没有属性${name}或者${name}的值未发生改变`
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
// 改变值
|
|
327
|
+
row.data[name] = value;
|
|
328
|
+
row.modified = true;
|
|
329
|
+
row.processing = true;
|
|
330
|
+
try {
|
|
331
|
+
await this.dataChangeNotify(row, [name]);
|
|
332
|
+
// await this._evt.emit('onGridDataChange', {
|
|
333
|
+
// data: this.state.rows.map(_row => {
|
|
334
|
+
// return _row.data;
|
|
335
|
+
// }),
|
|
336
|
+
// });
|
|
337
|
+
}
|
|
338
|
+
finally {
|
|
339
|
+
row.processing = false;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* 通知所有表格编辑项成员表格编辑项数据变更
|
|
344
|
+
*
|
|
345
|
+
* @author lxm
|
|
346
|
+
* @date 2022-09-20 22:09:49
|
|
347
|
+
* @param {GridRowState} row 行数据
|
|
348
|
+
* @param {string[]} names 更新的属性
|
|
349
|
+
*/
|
|
350
|
+
async dataChangeNotify(row, names) {
|
|
351
|
+
// 通知所有编辑项去处理编辑项相关逻辑
|
|
352
|
+
await handleAllSettled(Object.values(this.columns).map(async (column) => {
|
|
353
|
+
return column.dataChangeNotify(row, names);
|
|
354
|
+
}));
|
|
355
|
+
}
|
|
356
|
+
async toggleRowEdit() {
|
|
357
|
+
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* 计算默认值并返回一个对象,对象里的属性就是要填充的默认值
|
|
361
|
+
* 没有的属性就是不需要填充默认值的属性
|
|
362
|
+
* @author lxm
|
|
363
|
+
* @date 2023-09-18 04:01:06
|
|
364
|
+
* @param {IData} data
|
|
365
|
+
* @param {boolean} isCreate
|
|
366
|
+
* @return {*} {IData}
|
|
367
|
+
*/
|
|
368
|
+
calcDefaultValue(data, isCreate) {
|
|
369
|
+
const result = {};
|
|
370
|
+
Object.values(this.fieldColumns).forEach(c => {
|
|
371
|
+
const nodeColumn = c.nodeColumnControllerMap.get(data._nodeId);
|
|
372
|
+
if (!nodeColumn || !nodeColumn.nodeEditItem) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
const { createDV, createDVT, updateDV, updateDVT } = nodeColumn.nodeEditItem;
|
|
376
|
+
const valueType = isCreate ? createDVT : updateDVT;
|
|
377
|
+
const defaultValue = isCreate ? createDV : updateDV;
|
|
378
|
+
const defaultVal = getDefaultValue({
|
|
379
|
+
name: c.name,
|
|
380
|
+
valueType,
|
|
381
|
+
defaultValue,
|
|
382
|
+
valueFormat: nodeColumn.valueFormat,
|
|
383
|
+
}, { data, context: this.context, params: this.params });
|
|
384
|
+
if (defaultVal !== undefined) {
|
|
385
|
+
result[c.name] = defaultVal;
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
return result;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* 切换单行的编辑状态
|
|
392
|
+
* @author lxm
|
|
393
|
+
* @date 2023-08-08 06:45:54
|
|
394
|
+
* @param {GridRowState} row
|
|
395
|
+
* @param {boolean} [editable]
|
|
396
|
+
*/
|
|
397
|
+
async switchRowEdit(row, editable, isSave = true) {
|
|
398
|
+
if (!this.allowRowEdit) {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (row.data._nodeType !== 'DE') {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
const toState = editable === undefined ? !row.showRowEdit : editable;
|
|
405
|
+
// 一样的状态不处理
|
|
406
|
+
if (row.showRowEdit === toState) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
if (toState === false) {
|
|
410
|
+
// * 处理关闭行编辑
|
|
411
|
+
if (isSave) {
|
|
412
|
+
// 校验并保存
|
|
413
|
+
await this.save(row.data);
|
|
414
|
+
}
|
|
415
|
+
else if (row.data._deData.srfuf === Srfuf.CREATE) {
|
|
416
|
+
// 新建的行取消时删除这一行的数据
|
|
417
|
+
row.showRowEdit = false;
|
|
418
|
+
this._evt.emit('onRowEditChange', { row });
|
|
419
|
+
return this.remove({ data: [row.data], silent: true });
|
|
420
|
+
}
|
|
421
|
+
else if (row.cacheData) {
|
|
422
|
+
// 取消的时候,还原编辑前的数据
|
|
423
|
+
row.data = row.cacheData;
|
|
424
|
+
delete row.cacheData;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
// * 处理显示行编辑
|
|
429
|
+
// 如果已经有一行处于行编辑了,不开起另一行。
|
|
430
|
+
const editingRow = Object.values(this.state.rows).find(item => item.showRowEdit);
|
|
431
|
+
if (editingRow) {
|
|
432
|
+
throw new RuntimeError('同时只能有一行开启行编辑');
|
|
433
|
+
}
|
|
434
|
+
if (row.data._deData.srfuf === Srfuf.UPDATE) {
|
|
435
|
+
// 打开时先缓存一下
|
|
436
|
+
row.cacheData = clone(row.data);
|
|
437
|
+
// 填充更新默认值
|
|
438
|
+
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
439
|
+
Object.assign(row.data, defaultVal);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
// 修改行的编辑状态和编辑列的编辑状态。
|
|
443
|
+
row.showRowEdit = toState;
|
|
444
|
+
Object.values(this.fieldColumns).forEach(column => {
|
|
445
|
+
row.editColStates[column.name].editable = toState;
|
|
446
|
+
});
|
|
447
|
+
this._evt.emit('onRowEditChange', { row });
|
|
448
|
+
}
|
|
212
449
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IDETreeGridEx } from '@ibiz/model-core';
|
|
2
2
|
import { ITreeGridExEvent } from '../../event';
|
|
3
|
-
import { ITreeGridExState } from '../../state';
|
|
3
|
+
import { ITreeGridExState, ITreeNodeData } from '../../state';
|
|
4
4
|
import { ITreeController } from './i-tree.controller';
|
|
5
5
|
/**
|
|
6
6
|
* 树表格(增强)部件控制器
|
|
@@ -12,5 +12,27 @@ import { ITreeController } from './i-tree.controller';
|
|
|
12
12
|
* @extends {ITreeController<T, S, E>}
|
|
13
13
|
*/
|
|
14
14
|
export interface ITreeGridExController<T extends IDETreeGridEx = IDETreeGridEx, S extends ITreeGridExState = ITreeGridExState, E extends ITreeGridExEvent = ITreeGridExEvent> extends ITreeController<T, S, E> {
|
|
15
|
+
/**
|
|
16
|
+
* 保存单条数据
|
|
17
|
+
*
|
|
18
|
+
* @author zk
|
|
19
|
+
* @date 2023-07-31 02:07:52
|
|
20
|
+
* @memberof IGridController
|
|
21
|
+
*/
|
|
22
|
+
save(data: ITreeNodeData): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* 保存表格所有数据
|
|
25
|
+
*
|
|
26
|
+
* @author zk
|
|
27
|
+
* @date 2023-07-31 02:07:52
|
|
28
|
+
* @memberof IGridController
|
|
29
|
+
*/
|
|
30
|
+
saveAll(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* 切换表格的行编辑开启关闭状态
|
|
33
|
+
* @author lxm
|
|
34
|
+
* @date 2023-08-16 10:18:14
|
|
35
|
+
*/
|
|
36
|
+
toggleRowEdit(): void;
|
|
15
37
|
}
|
|
16
38
|
//# sourceMappingURL=i-tree-grid-ex.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-tree-grid-ex.controller.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/controller/control/i-tree-grid-ex.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"i-tree-grid-ex.controller.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/controller/control/i-tree-grid-ex.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB,CACpC,CAAC,SAAS,aAAa,GAAG,aAAa,EACvC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EAC7C,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,CAC7C,SAAQ,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,IAAI,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC;;;;;;OAMG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB;;;;OAIG;IACH,aAAa,IAAI,IAAI,CAAC;CACvB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ITreeGridExRowState } from '../../state';
|
|
2
|
+
import { EventBase } from '../argument';
|
|
1
3
|
import { ITreeEvent } from './i-tree.event';
|
|
2
4
|
/**
|
|
3
5
|
* 树表格(增强)部件事件
|
|
@@ -9,5 +11,20 @@ import { ITreeEvent } from './i-tree.event';
|
|
|
9
11
|
* @extends {IMDControlEvent}
|
|
10
12
|
*/
|
|
11
13
|
export interface ITreeGridExEvent extends ITreeEvent {
|
|
14
|
+
/**
|
|
15
|
+
* 表格行编辑切换事件
|
|
16
|
+
* @author lxm
|
|
17
|
+
* @date 2023-03-26 06:15:06
|
|
18
|
+
* @param {emitArgs} undefined
|
|
19
|
+
* @return {*} {Promise<void>}
|
|
20
|
+
*/
|
|
21
|
+
onRowEditChange: {
|
|
22
|
+
event: {
|
|
23
|
+
row: ITreeGridExRowState;
|
|
24
|
+
} & EventBase;
|
|
25
|
+
emitArgs: {
|
|
26
|
+
row: ITreeGridExRowState;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
12
29
|
}
|
|
13
30
|
//# sourceMappingURL=i-tree-grid-ex.event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-tree-grid-ex.event.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/event/control/i-tree-grid-ex.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"i-tree-grid-ex.event.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/event/control/i-tree-grid-ex.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD;;;;;;OAMG;IACH,eAAe,EAAE;QACf,KAAK,EAAE;YAAE,GAAG,EAAE,mBAAmB,CAAA;SAAE,GAAG,SAAS,CAAC;QAChD,QAAQ,EAAE;YAAE,GAAG,EAAE,mBAAmB,CAAA;SAAE,CAAC;KACxC,CAAC;CACH"}
|
|
@@ -30,6 +30,13 @@ export interface ITreeGridExState extends ITreeState {
|
|
|
30
30
|
rows: {
|
|
31
31
|
[p: string]: ITreeGridExRowState;
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* 开启表格行编辑
|
|
35
|
+
* @author lxm
|
|
36
|
+
* @date 2023-08-17 02:38:18
|
|
37
|
+
* @type {boolean}
|
|
38
|
+
*/
|
|
39
|
+
rowEditOpen: boolean;
|
|
33
40
|
}
|
|
34
41
|
/**
|
|
35
42
|
* 树表格(增强)行状态
|
|
@@ -47,14 +54,65 @@ export interface ITreeGridExRowState {
|
|
|
47
54
|
*/
|
|
48
55
|
data: ITreeNodeData;
|
|
49
56
|
/**
|
|
50
|
-
*
|
|
57
|
+
* 错误信息集合,p是对应属性名称
|
|
58
|
+
*
|
|
59
|
+
* @author lxm
|
|
60
|
+
* @date 2022-09-06 15:09:54
|
|
61
|
+
* @type {({ [p: string]: string | null })}
|
|
62
|
+
*/
|
|
63
|
+
errors: {
|
|
64
|
+
[p: string]: string | null;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* 可能是以下两种类型状态
|
|
68
|
+
* - 操作列按钮状态(p是操作列的标识)
|
|
69
|
+
* - 属性列的内置界面行为组状态(p是属性列的标识)
|
|
51
70
|
*
|
|
52
71
|
* @author lxm
|
|
53
72
|
* @date 2022-09-07 22:09:38
|
|
54
73
|
* @type {({ [p: string]: IButtonContainerState })}
|
|
55
74
|
*/
|
|
56
|
-
|
|
75
|
+
columnActionsStates: {
|
|
57
76
|
[p: string]: IButtonContainerState;
|
|
58
77
|
};
|
|
78
|
+
/**
|
|
79
|
+
* 编辑列的状态
|
|
80
|
+
*
|
|
81
|
+
* @author lxm
|
|
82
|
+
* @date 2022-09-20 15:09:58
|
|
83
|
+
* @type {({ [p: string]: { disabled: boolean } })}
|
|
84
|
+
*/
|
|
85
|
+
editColStates: {
|
|
86
|
+
[p: string]: {
|
|
87
|
+
disabled: boolean;
|
|
88
|
+
readonly: boolean;
|
|
89
|
+
editable: boolean;
|
|
90
|
+
required: boolean;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* 是否显示行编辑
|
|
95
|
+
*
|
|
96
|
+
* @author lxm
|
|
97
|
+
* @date 2022-09-05 22:09:23
|
|
98
|
+
* @type {boolean}
|
|
99
|
+
*/
|
|
100
|
+
showRowEdit: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* 是否被修改过
|
|
103
|
+
*
|
|
104
|
+
* @author lxm
|
|
105
|
+
* @date 2022-11-02 22:11:33
|
|
106
|
+
* @type {boolean}
|
|
107
|
+
*/
|
|
108
|
+
modified: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* 是否正在处理中(动态控制,值规则,表单项更新等逻辑中)
|
|
111
|
+
* @author lxm
|
|
112
|
+
* @date 2023-03-06 08:00:22
|
|
113
|
+
* @type {boolean}
|
|
114
|
+
* @memberof GridRowState
|
|
115
|
+
*/
|
|
116
|
+
processing: boolean;
|
|
59
117
|
}
|
|
60
118
|
//# sourceMappingURL=i-tree-grid-ex.state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-tree-grid-ex.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/control/i-tree-grid-ex.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD;;;;;;;OAOG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;;;;;OAMG;IACH,IAAI,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"i-tree-grid-ex.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/control/i-tree-grid-ex.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD;;;;;;;OAOG;IACH,YAAY,EAAE,YAAY,EAAE,CAAC;IAE7B;;;;;;OAMG;IACH,IAAI,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAA;KAAE,CAAC;IAE3C;;;;;OAKG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,IAAI,EAAE,aAAa,CAAC;IAEpB;;;;;;OAMG;IACH,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAEvC;;;;;;;;OAQG;IACH,mBAAmB,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAA;KAAE,CAAC;IAE5D;;;;;;OAMG;IACH,aAAa,EAAE;QACb,CAAC,CAAC,EAAE,MAAM,GAAG;YACX,QAAQ,EAAE,OAAO,CAAC;YAClB,QAAQ,EAAE,OAAO,CAAC;YAClB,QAAQ,EAAE,OAAO,CAAC;YAClB,QAAQ,EAAE,OAAO,CAAC;SACnB,CAAC;KACH,CAAC;IAEF;;;;;;OAMG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;;OAMG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -18,10 +18,11 @@ export interface IAsyncActionProvider {
|
|
|
18
18
|
/**
|
|
19
19
|
* 点击事件
|
|
20
20
|
* @author lxm
|
|
21
|
-
* @date
|
|
21
|
+
* @date 2024-01-15 12:47:22
|
|
22
22
|
* @param {IPortalAsyncAction} asyncAction
|
|
23
23
|
* @param {MouseEvent} event
|
|
24
|
+
* @return {*} {boolean} 返回是否隐藏消息popover
|
|
24
25
|
*/
|
|
25
|
-
onClick(asyncAction: IPortalAsyncAction, event: MouseEvent):
|
|
26
|
+
onClick(asyncAction: IPortalAsyncAction, event: MouseEvent): boolean;
|
|
26
27
|
}
|
|
27
28
|
//# sourceMappingURL=i-async-action.provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-async-action.provider.d.ts","sourceRoot":"","sources":["../../../src/interface/provider/i-async-action.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IAEH,SAAS,EAAE,GAAG,CAAC;IAEf
|
|
1
|
+
{"version":3,"file":"i-async-action.provider.d.ts","sourceRoot":"","sources":["../../../src/interface/provider/i-async-action.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IAEH,SAAS,EAAE,GAAG,CAAC;IAEf;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW,EAAE,kBAAkB,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC;CACtE"}
|
package/out/plugin/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { PluginStaticResource } from './plugin-static-resource/plugin-static-resource';
|
|
2
|
-
export type { RemotePluginConfig } from './remote-plugin-item/remote-plugin-item';
|
|
2
|
+
export type { ISystemImportMap, RemotePluginConfig, } from './remote-plugin-item/remote-plugin-item';
|
|
3
3
|
export { RemotePluginItem } from './remote-plugin-item/remote-plugin-item';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,YAAY,EACV,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC"}
|
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* systemjs importmap 配置定义
|
|
3
|
+
*
|
|
4
|
+
* @author chitanda
|
|
5
|
+
* @date 2024-01-11 20:01:45
|
|
6
|
+
* @export
|
|
7
|
+
* @interface ISystemImportMap
|
|
8
|
+
*/
|
|
9
|
+
export interface ISystemImportMap {
|
|
10
|
+
/**
|
|
11
|
+
* 基础路径
|
|
12
|
+
*
|
|
13
|
+
* @author chitanda
|
|
14
|
+
* @date 2024-01-11 20:01:53
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
baseUrl?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 脚本
|
|
20
|
+
*
|
|
21
|
+
* @author chitanda
|
|
22
|
+
* @date 2024-01-11 20:01:57
|
|
23
|
+
* @type {{ [key: string]: string }}
|
|
24
|
+
*/
|
|
25
|
+
imports: {
|
|
26
|
+
[key: string]: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 样式
|
|
30
|
+
*
|
|
31
|
+
* @author chitanda
|
|
32
|
+
* @date 2024-01-11 20:01:38
|
|
33
|
+
* @type {({ [key: string]: string | string[] })}
|
|
34
|
+
*/
|
|
35
|
+
styles: {
|
|
36
|
+
[key: string]: string | string[];
|
|
37
|
+
};
|
|
38
|
+
}
|
|
1
39
|
/**
|
|
2
40
|
* 远程插件配置
|
|
3
41
|
*
|
|
@@ -67,10 +105,10 @@ export interface RemotePluginConfig {
|
|
|
67
105
|
* 额外的 systemjs 模块声明
|
|
68
106
|
*
|
|
69
107
|
* @author chitanda
|
|
70
|
-
* @date 2024-01-11
|
|
71
|
-
* @type {
|
|
108
|
+
* @date 2024-01-11 20:01:37
|
|
109
|
+
* @type {ISystemImportMap}
|
|
72
110
|
*/
|
|
73
|
-
'systemjs-importmap'?:
|
|
111
|
+
'systemjs-importmap'?: ISystemImportMap;
|
|
74
112
|
}
|
|
75
113
|
/**
|
|
76
114
|
* 远程插件项
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-plugin-item.d.ts","sourceRoot":"","sources":["../../../src/plugin/remote-plugin-item/remote-plugin-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"remote-plugin-item.d.ts","sourceRoot":"","sources":["../../../src/plugin/remote-plugin-item/remote-plugin-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACnC;;;;;;OAMG;IACH,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;CAC9C;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,gBAAgB,CAAC;CACzC;AAED;;;;;;;GAOG;AACH,qBAAa,gBAAgB;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAEpC;;;;;;;;OAQG;gBACS,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB;CAKlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-menu-item-register.d.ts","sourceRoot":"","sources":["../../../src/register/helper/app-menu-item-register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,iBAAiB;AACjB,eAAO,MAAM,2BAA2B,gBAAgB,CAAC;AAEzD;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,oBAAoB,GACnC,IAAI,CAEN;AAQD;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"app-menu-item-register.d.ts","sourceRoot":"","sources":["../../../src/register/helper/app-menu-item-register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,iBAAiB;AACjB,eAAO,MAAM,2BAA2B,gBAAgB,CAAC;AAEzD;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,oBAAoB,GACnC,IAAI,CAEN;AAQD;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAoB3C"}
|
|
@@ -184,7 +184,7 @@ export class MethodDto {
|
|
|
184
184
|
}
|
|
185
185
|
const dto = await this.getFieldDto(context, field);
|
|
186
186
|
const items = datum[key];
|
|
187
|
-
if (items) {
|
|
187
|
+
if (items && items.length > 0) {
|
|
188
188
|
const pKey = datum[this.entity.keyAppDEFieldId];
|
|
189
189
|
if (field.refPickupAppDEFieldId) {
|
|
190
190
|
// 特殊处理,在子包内设置父对象标识
|
|
@@ -112,7 +112,7 @@ export declare class DynamicCodeListCache {
|
|
|
112
112
|
*
|
|
113
113
|
* @return {codeListItem[] | undefined}
|
|
114
114
|
*/
|
|
115
|
-
protected prepareTreeData(items: IData[]
|
|
115
|
+
protected prepareTreeData(items: IData[]): CodeListItem[] | undefined;
|
|
116
116
|
/**
|
|
117
117
|
* 获取动态的代码项
|
|
118
118
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-code-list.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/dynamic-code-list/dynamic-code-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;;;;GAMG;AACH,KAAK,SAAS,GAAG;IACf;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,GAAG,EAAG,WAAW,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,yBAAgC;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,EAAE,OAAO,CAAS;IAExC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE1B,QAAQ,EAAE,YAAY;IAIlC;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB3B;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,YAAY;IA6DhD;;;;;;;;;OASG;cACa,IAAI,CAClB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC;IAuE1B;;;;OAIG;IACH,SAAS,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"dynamic-code-list.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/dynamic-code-list/dynamic-code-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;;;;GAMG;AACH,KAAK,SAAS,GAAG;IACf;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,GAAG,EAAG,WAAW,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,yBAAgC;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,EAAE,OAAO,CAAS;IAExC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE1B,QAAQ,EAAE,YAAY;IAIlC;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB3B;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,YAAY;IA6DhD;;;;;;;;;OASG;cACa,IAAI,CAClB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC;IAuE1B;;;;OAIG;IACH,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,GAAG,SAAS;IAmBrE;;;;;;;;OAQG;IACG,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAE,OAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAyC5E"}
|
|
@@ -173,25 +173,24 @@ export class DynamicCodeListCache {
|
|
|
173
173
|
*
|
|
174
174
|
* @return {codeListItem[] | undefined}
|
|
175
175
|
*/
|
|
176
|
-
prepareTreeData(items
|
|
177
|
-
const { pvalueAppDEFieldId } = this.codeList;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
return item[pvalueAppDEFieldId] === pValue;
|
|
183
|
-
}
|
|
184
|
-
// 没有传父value,只需要找出来没有父值属性的
|
|
185
|
-
return !item[pvalueAppDEFieldId];
|
|
176
|
+
prepareTreeData(items) {
|
|
177
|
+
const { valueAppDEFieldId, pvalueAppDEFieldId } = this.codeList;
|
|
178
|
+
const map = {};
|
|
179
|
+
const nestedList = [];
|
|
180
|
+
items.forEach((data) => {
|
|
181
|
+
map[data[valueAppDEFieldId]] = this.convertData(data);
|
|
186
182
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
183
|
+
items.forEach((data) => {
|
|
184
|
+
const parent = map[data[pvalueAppDEFieldId]];
|
|
185
|
+
if (parent) {
|
|
186
|
+
parent.children = parent.children || [];
|
|
187
|
+
parent.children.push(map[data[valueAppDEFieldId]]);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
nestedList.push(map[data[valueAppDEFieldId]]);
|
|
191
|
+
}
|
|
194
192
|
});
|
|
193
|
+
return nestedList;
|
|
195
194
|
}
|
|
196
195
|
/**
|
|
197
196
|
* 获取动态的代码项
|
|
@@ -14,6 +14,12 @@ export declare class TreeDataSetNodeData extends TreeNodeData implements ITreeNo
|
|
|
14
14
|
_id: string;
|
|
15
15
|
_value: string;
|
|
16
16
|
_deData: IData;
|
|
17
|
+
/**
|
|
18
|
+
* 克隆方法
|
|
19
|
+
* @author lxm
|
|
20
|
+
* @date 2024-01-12 02:37:46
|
|
21
|
+
*/
|
|
22
|
+
clone: () => TreeDataSetNodeData;
|
|
17
23
|
constructor(model: IDETreeDataSetNode, parentNodeData: ITreeNodeData | undefined, opts: {
|
|
18
24
|
data: IData;
|
|
19
25
|
leaf: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-data-set-node-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/tree-node-data/tree-data-set-node-data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG3E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"tree-data-set-node-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/tree-node-data/tree-data-set-node-data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG3E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMhD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,YAAa,YAAW,aAAa;IACpE,KAAK,EAAE,MAAM,CAAC;IAEd,GAAG,EAAE,MAAM,CAAC;IAEZ,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,KAAK,CAAC;IAEvB;;;;OAIG;IACK,KAAK,EAAE,MAAM,mBAAmB,CAAC;gBAGvC,KAAK,EAAE,kBAAkB,EACzB,cAAc,EAAE,aAAa,GAAG,SAAS,EACzC,IAAI,EAAE;QACJ,IAAI,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,OAAO,CAAC;QACd,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;IA4KH,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,GAAG,KAAK,GAAG,SAAS;IAiBhE;;;;;;;OAOG;IACH,SAAS,CAAC,kBAAkB,CAC1B,QAAQ,EAAE,mBAAmB,GAC5B,MAAM,GAAG,SAAS;IAYrB;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS;CAStE"}
|