@riil-frontend/component-topology 10.0.58 → 10.0.59
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/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +4 -2
- package/build/index.js +52 -45
- package/es/components/IndexSettingDrawer/index.js +6 -5
- package/es/components/MultiResourceDrawer/index.js +22 -26
- package/es/components/ResourceList/ResourceSelect.js +55 -58
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +30 -34
- package/es/components/SingleResourceDrawer/SelectDrawer.js +24 -28
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +29 -33
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/useElementTagTipConfig.js +78 -100
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- package/es/core/components/titlebar/widgets/TitleWidget.js +5 -4
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -18
- package/es/core/editor/components/BackgroundView/index.js +149 -178
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +26 -30
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +20 -24
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +13 -17
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +17 -21
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +27 -31
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +16 -20
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +37 -55
- package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/es/core/editor/hooks/useNewElementTheme.js +2 -2
- package/es/core/editor/store/background.js +8 -10
- package/es/core/editor/store/topoEdit.js +4 -6
- package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/es/core/hooks/usePolling.js +110 -122
- package/es/core/hooks/useResourceConfig.js +76 -100
- package/es/core/hooks/useTopoEdit.js +539 -638
- package/es/core/models/Alarm.js +311 -394
- package/es/core/models/AttributeMetricDisplay.js +115 -143
- package/es/core/models/PluginManager.js +4 -3
- package/es/core/models/SelectionModel.js +4 -5
- package/es/core/models/TopoApp.js +287 -454
- package/es/core/models/TopoGraphView.js +28 -41
- package/es/core/models/cache/CiCache.js +34 -39
- package/es/core/models/cache/CiTypeCache.js +70 -84
- package/es/core/models/cache/DictCache.js +36 -42
- package/es/core/models/graph/Background.js +21 -26
- package/es/core/models/plugins/resourceWebControllUrl.js +84 -103
- package/es/core/models/tagstips/ElementTagTipConfig.js +34 -40
- package/es/core/models/topoData.js +73 -77
- package/es/core/models/utils/linkUtils.js +46 -51
- package/es/core/services/alarm.js +14 -16
- package/es/core/services/background.js +59 -67
- package/es/core/services/cmdb/metric.js +14 -18
- package/es/core/services/cmdb.js +23 -27
- package/es/core/services/index.js +48 -68
- package/es/core/services/overview.js +131 -151
- package/es/core/services/topo/basic.js +11 -13
- package/es/core/services/topo/tagtip.js +15 -19
- package/es/core/store/models/ciModel.js +58 -62
- package/es/core/store/models/customIcon.js +126 -145
- package/es/core/store/models/displayConfig.js +15 -19
- package/es/core/store/models/selection.js +4 -6
- package/es/core/store/models/topoAlarm.js +162 -145
- package/es/core/store/models/topoBaseInfoOverview.js +4 -6
- package/es/core/store/models/topoBizMod.js +28 -32
- package/es/core/store/models/topoConfig.js +217 -233
- package/es/core/store/models/topoGraphView.js +4 -6
- package/es/core/store/models/topoMod.js +379 -401
- package/es/core/utils/imageUtil.js +23 -27
- package/es/core/utils/saveSerialize.js +14 -18
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +20 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +363 -409
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +112 -131
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +40 -46
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +219 -275
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +45 -54
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +32 -44
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +23 -27
- package/es/networkTopo/components/Link/hook.js +85 -96
- package/es/networkTopo/components/Link/index copy.js +104 -126
- package/es/networkTopo/components/Link/index.js +104 -126
- package/es/networkTopo/components/Link/setting.js +48 -52
- package/es/networkTopo/getTopoData.js +73 -92
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +34 -39
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +28 -46
- package/es/networkTopo/services/alert.js +18 -22
- package/es/networkTopo/services/authorization.js +45 -55
- package/es/networkTopo/services/cmdb.js +548 -696
- package/es/networkTopo/services/funcAuth.js +22 -24
- package/es/networkTopo/services/link.js +107 -117
- package/es/networkTopo/services/mdc.js +33 -48
- package/es/networkTopo/services/metric.js +38 -47
- package/es/networkTopo/services/model.js +616 -809
- package/es/networkTopo/services/risk.js +9 -11
- package/es/networkTopo/services/topo/auth.js +27 -33
- package/es/networkTopo/services/topo/basic.js +274 -314
- package/es/networkTopo/services/topo/blacklist.js +20 -24
- package/es/networkTopo/services/topo/ciInfo.js +27 -31
- package/es/networkTopo/services/topo/icon.js +49 -59
- package/es/networkTopo/services/topo/networkLink.js +32 -36
- package/es/networkTopo/services/topo/relation.js +9 -11
- package/es/networkTopo/services/topo/resourceWebUrl.js +36 -42
- package/es/networkTopo/store/functionAuth.js +31 -37
- package/es/networkTopo/store/linkDynamicStyle.js +102 -108
- package/es/networkTopo/store/linkDynamicStyleConfig.js +42 -44
- package/es/networkTopo/store/linkManager.js +4 -6
- package/es/networkTopo/store/topoCenter.js +142 -152
- package/es/networkTopo/store/topoLinkMod.js +4 -6
- package/es/networkTopo/store/topoTreeMod.js +170 -182
- package/es/networkTopo/utils/exportData.js +57 -61
- package/lib/components/IndexSettingDrawer/index.js +6 -5
- package/lib/components/MultiResourceDrawer/index.js +22 -26
- package/lib/components/ResourceList/ResourceSelect.js +54 -58
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +33 -37
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +24 -28
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +36 -40
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/useElementTagTipConfig.js +82 -104
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -4
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +18 -18
- package/lib/core/editor/components/BackgroundView/index.js +148 -177
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +28 -32
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +23 -28
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +14 -18
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +18 -22
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +32 -36
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +18 -22
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +41 -59
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
- package/lib/core/editor/store/background.js +8 -10
- package/lib/core/editor/store/topoEdit.js +4 -6
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/lib/core/hooks/usePolling.js +108 -120
- package/lib/core/hooks/useResourceConfig.js +76 -100
- package/lib/core/hooks/useTopoEdit.js +530 -629
- package/lib/core/models/Alarm.js +308 -391
- package/lib/core/models/AttributeMetricDisplay.js +118 -146
- package/lib/core/models/PluginManager.js +4 -3
- package/lib/core/models/SelectionModel.js +4 -5
- package/lib/core/models/TopoApp.js +287 -454
- package/lib/core/models/TopoGraphView.js +28 -41
- package/lib/core/models/cache/CiCache.js +39 -44
- package/lib/core/models/cache/CiTypeCache.js +71 -85
- package/lib/core/models/cache/DictCache.js +39 -45
- package/lib/core/models/graph/Background.js +22 -27
- package/lib/core/models/plugins/resourceWebControllUrl.js +82 -101
- package/lib/core/models/tagstips/ElementTagTipConfig.js +34 -40
- package/lib/core/models/topoData.js +73 -78
- package/lib/core/models/utils/linkUtils.js +45 -51
- package/lib/core/services/alarm.js +18 -20
- package/lib/core/services/background.js +70 -78
- package/lib/core/services/cmdb/metric.js +14 -19
- package/lib/core/services/cmdb.js +24 -29
- package/lib/core/services/index.js +53 -72
- package/lib/core/services/overview.js +131 -151
- package/lib/core/services/topo/basic.js +13 -15
- package/lib/core/services/topo/tagtip.js +16 -21
- package/lib/core/store/models/ciModel.js +66 -70
- package/lib/core/store/models/customIcon.js +126 -145
- package/lib/core/store/models/displayConfig.js +15 -19
- package/lib/core/store/models/selection.js +4 -6
- package/lib/core/store/models/topoAlarm.js +163 -145
- package/lib/core/store/models/topoBaseInfoOverview.js +4 -6
- package/lib/core/store/models/topoBizMod.js +34 -38
- package/lib/core/store/models/topoConfig.js +224 -240
- package/lib/core/store/models/topoGraphView.js +4 -6
- package/lib/core/store/models/topoMod.js +381 -403
- package/lib/core/utils/imageUtil.js +26 -31
- package/lib/core/utils/saveSerialize.js +13 -18
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +21 -26
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +364 -410
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +114 -133
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +44 -50
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +220 -274
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +40 -50
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +35 -47
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +24 -28
- package/lib/networkTopo/components/Link/hook.js +86 -98
- package/lib/networkTopo/components/Link/index copy.js +105 -127
- package/lib/networkTopo/components/Link/index.js +105 -127
- package/lib/networkTopo/components/Link/setting.js +48 -52
- package/lib/networkTopo/getTopoData.js +73 -92
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +35 -40
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +28 -46
- package/lib/networkTopo/services/alert.js +18 -22
- package/lib/networkTopo/services/authorization.js +55 -65
- package/lib/networkTopo/services/cmdb.js +551 -700
- package/lib/networkTopo/services/funcAuth.js +24 -26
- package/lib/networkTopo/services/link.js +108 -118
- package/lib/networkTopo/services/mdc.js +35 -51
- package/lib/networkTopo/services/metric.js +37 -47
- package/lib/networkTopo/services/model.js +615 -809
- package/lib/networkTopo/services/risk.js +11 -13
- package/lib/networkTopo/services/topo/auth.js +27 -33
- package/lib/networkTopo/services/topo/basic.js +277 -317
- package/lib/networkTopo/services/topo/blacklist.js +20 -24
- package/lib/networkTopo/services/topo/ciInfo.js +34 -38
- package/lib/networkTopo/services/topo/icon.js +59 -69
- package/lib/networkTopo/services/topo/networkLink.js +32 -36
- package/lib/networkTopo/services/topo/relation.js +11 -13
- package/lib/networkTopo/services/topo/resourceWebUrl.js +44 -50
- package/lib/networkTopo/store/functionAuth.js +31 -37
- package/lib/networkTopo/store/linkDynamicStyle.js +103 -109
- package/lib/networkTopo/store/linkDynamicStyleConfig.js +42 -44
- package/lib/networkTopo/store/linkManager.js +4 -6
- package/lib/networkTopo/store/topoCenter.js +142 -152
- package/lib/networkTopo/store/topoLinkMod.js +4 -6
- package/lib/networkTopo/store/topoTreeMod.js +166 -178
- package/lib/networkTopo/utils/exportData.js +63 -68
- package/package.json +3 -3
@@ -29,6 +29,8 @@ function filterUnExistedFields(fields, ciTypeMeta) {
|
|
29
29
|
|
30
30
|
|
31
31
|
var AttributeMetricDisplay = /*#__PURE__*/function () {
|
32
|
+
var _loadData, _loadAttributeAndMetric, _translateRefAttribute;
|
33
|
+
|
32
34
|
function AttributeMetricDisplay(topo) {
|
33
35
|
var _this$topo$options$ta;
|
34
36
|
|
@@ -362,57 +364,47 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
362
364
|
*/
|
363
365
|
;
|
364
366
|
|
365
|
-
_proto.loadData =
|
366
|
-
|
367
|
-
function () {
|
368
|
-
var _loadData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(data) {
|
367
|
+
_proto.loadData = function loadData(_x) {
|
368
|
+
return (_loadData = _loadData || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(data) {
|
369
369
|
var topo, ciDatas, bizDispatchers;
|
370
370
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
371
|
-
while (1) {
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
return _context.stop();
|
405
|
-
}
|
371
|
+
while (1) switch (_context.prev = _context.next) {
|
372
|
+
case 0:
|
373
|
+
// rlog.debug('AttributeMetricDisplay.loadAttributeAndMetric', data);
|
374
|
+
topo = this.topo; // 设置ciType
|
375
|
+
|
376
|
+
ciDatas = data.filter(function (item) {
|
377
|
+
// 过滤不存在的ci,解决编辑模式删除资源后切换到显示模式报错
|
378
|
+
return !!topo.dataModel.getDataById(item.id);
|
379
|
+
}).map(function (item) {
|
380
|
+
return _extends({
|
381
|
+
ciType: topo.dataModel.getDataById(item.id).ciType
|
382
|
+
}, item);
|
383
|
+
}); // 翻译引用属性
|
384
|
+
|
385
|
+
_context.next = 4;
|
386
|
+
return this.translateRefAttribute(ciDatas);
|
387
|
+
|
388
|
+
case 4:
|
389
|
+
ciDatas = _context.sent;
|
390
|
+
bizDispatchers = topo.store.getModelDispatchers('topoBizMod');
|
391
|
+
_context.next = 8;
|
392
|
+
return bizDispatchers.setAttrsAndMetrics(ciDatas);
|
393
|
+
|
394
|
+
case 8:
|
395
|
+
_context.next = 10;
|
396
|
+
return DictCache.init();
|
397
|
+
|
398
|
+
case 10:
|
399
|
+
this.updateTagsTips();
|
400
|
+
|
401
|
+
case 11:
|
402
|
+
case "end":
|
403
|
+
return _context.stop();
|
406
404
|
}
|
407
405
|
}, _callee, this);
|
408
|
-
}));
|
409
|
-
|
410
|
-
function loadData(_x) {
|
411
|
-
return _loadData.apply(this, arguments);
|
412
|
-
}
|
413
|
-
|
414
|
-
return loadData;
|
415
|
-
}()
|
406
|
+
}))).apply(this, arguments);
|
407
|
+
}
|
416
408
|
/**
|
417
409
|
* 加载标注、悬浮框数据
|
418
410
|
* 业务拓扑使用
|
@@ -421,31 +413,21 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
421
413
|
*/
|
422
414
|
;
|
423
415
|
|
424
|
-
_proto.loadAttributeAndMetric =
|
425
|
-
|
426
|
-
function () {
|
427
|
-
var _loadAttributeAndMetric = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(data) {
|
416
|
+
_proto.loadAttributeAndMetric = function loadAttributeAndMetric(_x2) {
|
417
|
+
return (_loadAttributeAndMetric = _loadAttributeAndMetric || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(data) {
|
428
418
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
429
|
-
while (1) {
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
return _context2.stop();
|
438
|
-
}
|
419
|
+
while (1) switch (_context2.prev = _context2.next) {
|
420
|
+
case 0:
|
421
|
+
_context2.next = 2;
|
422
|
+
return this.loadData(data);
|
423
|
+
|
424
|
+
case 2:
|
425
|
+
case "end":
|
426
|
+
return _context2.stop();
|
439
427
|
}
|
440
428
|
}, _callee2, this);
|
441
|
-
}));
|
442
|
-
|
443
|
-
function loadAttributeAndMetric(_x2) {
|
444
|
-
return _loadAttributeAndMetric.apply(this, arguments);
|
445
|
-
}
|
446
|
-
|
447
|
-
return loadAttributeAndMetric;
|
448
|
-
}()
|
429
|
+
}))).apply(this, arguments);
|
430
|
+
}
|
449
431
|
/**
|
450
432
|
* 临时由前端翻译引用属性名称
|
451
433
|
* @param {array<{id, ciType, attributeMap: {}, ...}>} ciDatas
|
@@ -453,95 +435,85 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
453
435
|
*/
|
454
436
|
;
|
455
437
|
|
456
|
-
_proto.translateRefAttribute =
|
457
|
-
|
458
|
-
function () {
|
459
|
-
var _translateRefAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(ciDatas) {
|
438
|
+
_proto.translateRefAttribute = function translateRefAttribute(_x3) {
|
439
|
+
return (_translateRefAttribute = _translateRefAttribute || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(ciDatas) {
|
460
440
|
var _this5 = this;
|
461
441
|
|
462
442
|
var refIdMap, ciRefAttributeMap, refIds, refCiMap;
|
463
443
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
464
|
-
while (1) {
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
}
|
487
|
-
|
488
|
-
ciRefAttributeMap[id].push({
|
489
|
-
attrCode: attributeMeta.code,
|
490
|
-
id: refId
|
491
|
-
});
|
492
|
-
});
|
493
|
-
} else {
|
494
|
-
rlog.warn("\u63A8\u9001\u5C5E\u6027\u6307\u6807\u6570\u636E\uFF1A\u672A\u67E5\u8BE2\u5230ciType " + ciType, ciData);
|
495
|
-
}
|
496
|
-
});
|
497
|
-
refIds = Object.keys(refIdMap);
|
444
|
+
while (1) switch (_context3.prev = _context3.next) {
|
445
|
+
case 0:
|
446
|
+
// 查找引用字段及值
|
447
|
+
refIdMap = {};
|
448
|
+
ciRefAttributeMap = {};
|
449
|
+
ciDatas.forEach(function (ciData) {
|
450
|
+
var id = ciData.id,
|
451
|
+
ciType = ciData.ciType,
|
452
|
+
attributeMap = ciData.attributeMap;
|
453
|
+
ciRefAttributeMap[id] = [];
|
454
|
+
|
455
|
+
var ciTypeMeta = _this5.topo.ciTyeCache.getCiType(ciType);
|
456
|
+
|
457
|
+
if (ciTypeMeta) {
|
458
|
+
ciTypeMeta.attributes.filter(function (attributeMeta) {
|
459
|
+
return !!attributeMeta.refCi;
|
460
|
+
}).forEach(function (attributeMeta) {
|
461
|
+
var refId = attributeMap[attributeMeta.code];
|
462
|
+
|
463
|
+
if (refId && !refIdMap[refId]) {
|
464
|
+
refIdMap[refId] = true;
|
465
|
+
}
|
498
466
|
|
499
|
-
|
500
|
-
|
501
|
-
|
467
|
+
ciRefAttributeMap[id].push({
|
468
|
+
attrCode: attributeMeta.code,
|
469
|
+
id: refId
|
470
|
+
});
|
471
|
+
});
|
472
|
+
} else {
|
473
|
+
rlog.warn("\u63A8\u9001\u5C5E\u6027\u6307\u6807\u6570\u636E\uFF1A\u672A\u67E5\u8BE2\u5230ciType " + ciType, ciData);
|
502
474
|
}
|
475
|
+
});
|
476
|
+
refIds = Object.keys(refIdMap);
|
503
477
|
|
504
|
-
|
478
|
+
if (refIds.length) {
|
479
|
+
_context3.next = 6;
|
480
|
+
break;
|
481
|
+
}
|
505
482
|
|
506
|
-
|
507
|
-
_context3.next = 8;
|
508
|
-
return this.topo.ciCache.load(refIds);
|
483
|
+
return _context3.abrupt("return", ciDatas);
|
509
484
|
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
var id = ciData.id;
|
485
|
+
case 6:
|
486
|
+
_context3.next = 8;
|
487
|
+
return this.topo.ciCache.load(refIds);
|
514
488
|
|
515
|
-
|
489
|
+
case 8:
|
490
|
+
refCiMap = _context3.sent;
|
491
|
+
return _context3.abrupt("return", ciDatas.map(function (ciData) {
|
492
|
+
var id = ciData.id;
|
516
493
|
|
517
|
-
|
518
|
-
var refCi = refCiMap[refAttrs.id];
|
494
|
+
var attributeMap = _extends({}, ciData.attributeMap);
|
519
495
|
|
520
|
-
|
521
|
-
|
522
|
-
displayName: refCi.attributes.display_name
|
523
|
-
};
|
524
|
-
}
|
525
|
-
});
|
526
|
-
return _extends({}, ciData, {
|
527
|
-
attributeMap: attributeMap
|
528
|
-
});
|
529
|
-
}));
|
496
|
+
ciRefAttributeMap[id].forEach(function (refAttrs) {
|
497
|
+
var refCi = refCiMap[refAttrs.id];
|
530
498
|
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
499
|
+
if (refCi) {
|
500
|
+
attributeMap[refAttrs.attrCode + "_object"] = {
|
501
|
+
displayName: refCi.attributes.display_name
|
502
|
+
};
|
503
|
+
}
|
504
|
+
});
|
505
|
+
return _extends({}, ciData, {
|
506
|
+
attributeMap: attributeMap
|
507
|
+
});
|
508
|
+
}));
|
509
|
+
|
510
|
+
case 10:
|
511
|
+
case "end":
|
512
|
+
return _context3.stop();
|
535
513
|
}
|
536
514
|
}, _callee3, this);
|
537
|
-
}));
|
538
|
-
|
539
|
-
function translateRefAttribute(_x3) {
|
540
|
-
return _translateRefAttribute.apply(this, arguments);
|
541
|
-
}
|
542
|
-
|
543
|
-
return translateRefAttribute;
|
544
|
-
}()
|
515
|
+
}))).apply(this, arguments);
|
516
|
+
}
|
545
517
|
/**
|
546
518
|
* 推送标注、悬浮框数据 => ht
|
547
519
|
* @returns
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import corePlugins from "./plugins";
|
2
2
|
|
3
3
|
var PluginManager = /*#__PURE__*/function () {
|
4
|
-
/**
|
5
|
-
* @type {Array}
|
6
|
-
*/
|
7
4
|
function PluginManager(topo) {
|
8
5
|
this.topo = void 0;
|
9
6
|
this.pluginMap = {};
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @type {Array}
|
10
|
+
*/
|
10
11
|
this.plugins = void 0;
|
11
12
|
this.topo = topo;
|
12
13
|
this.init(corePlugins);
|
@@ -10,6 +10,9 @@ var SelectionModel = /*#__PURE__*/function () {
|
|
10
10
|
this.topo = null;
|
11
11
|
this.inited = false;
|
12
12
|
|
13
|
+
/**
|
14
|
+
* 同步选中元素到store
|
15
|
+
*/
|
13
16
|
this.updateSelection = function () {
|
14
17
|
try {
|
15
18
|
var selectionModel = _this.topo.getSelectionModel();
|
@@ -87,11 +90,7 @@ var SelectionModel = /*#__PURE__*/function () {
|
|
87
90
|
_proto.getSelection = function getSelection() {
|
88
91
|
var selectionModel = this.topo.getSelectionModel();
|
89
92
|
return selectionModel.getSelection().getArray();
|
90
|
-
}
|
91
|
-
/**
|
92
|
-
* 同步选中元素到store
|
93
|
-
*/
|
94
|
-
;
|
93
|
+
};
|
95
94
|
|
96
95
|
_proto.handleSelectionChange = function handleSelectionChange(e) {
|
97
96
|
rlog.info('Selection handleSelectionChange', e);
|