@riil-frontend/component-topology 8.0.5 → 8.0.7

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.
@@ -68,7 +68,8 @@ var HistoryManager = /*#__PURE__*/function () {
68
68
  var displayConfigProperties = [// 单多链路
69
69
  'expandAllEdges', // 节点标注
70
70
  'nodeLabelStyle', // 画布主题
71
- 'canvasTheme', 'linkTag', 'linkTip', 'nodeTag', 'nodeTip'];
71
+ 'canvasTheme', 'linkTag', 'linkTip', 'nodeTag', 'nodeTip', // @V1.4 网络拓扑特有,待迁移到网络拓扑
72
+ 'autoChangeEdgeWidth', 'autoHideEdgeTag'];
72
73
  var items = [{
73
74
  modelName: 'topoMod',
74
75
  property: 'data'
@@ -23,7 +23,7 @@ import topoFactory from "./topoFactory";
23
23
  import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
24
24
  import SelectionModel from "./SelectionModel"; // eslint-disable-next-line no-undef
25
25
 
26
- var version = typeof "8.0.5" === 'string' ? "8.0.5" : null;
26
+ var version = typeof "8.0.7" === 'string' ? "8.0.7" : null;
27
27
  console.info("\u62D3\u6251\u7248\u672C: " + version);
28
28
  /**
29
29
  * 拓扑显示和编辑
@@ -535,44 +535,46 @@ var Topo = /*#__PURE__*/function () {
535
535
  while (1) {
536
536
  switch (_context12.prev = _context12.next) {
537
537
  case 0:
538
+ rlog.info('TopoApp.enterEditMode');
539
+
538
540
  if (!this.options.onSwitchToEditModeBegin) {
539
- _context12.next = 3;
541
+ _context12.next = 4;
540
542
  break;
541
543
  }
542
544
 
543
- _context12.next = 3;
545
+ _context12.next = 4;
544
546
  return this.options.onSwitchToEditModeBegin(this);
545
547
 
546
- case 3:
548
+ case 4:
547
549
  topoDispatchers = this.store.getModelDispatchers('topoMod');
548
- _context12.next = 6;
550
+ _context12.next = 7;
549
551
  return topoDispatchers.update({
550
552
  viewState: 'edit'
551
553
  });
552
554
 
553
- case 6:
554
- _context12.next = 8;
555
+ case 7:
556
+ _context12.next = 9;
555
557
  return this.view.switchToEditMode();
556
558
 
557
- case 8:
559
+ case 9:
558
560
  updateEdgeExpanded(this);
559
561
 
560
562
  if (!this.options.onSwitchToEditMode) {
561
- _context12.next = 12;
563
+ _context12.next = 13;
562
564
  break;
563
565
  }
564
566
 
565
- _context12.next = 12;
567
+ _context12.next = 13;
566
568
  return this.options.onSwitchToEditMode(this);
567
569
 
568
- case 12:
570
+ case 13:
569
571
  // 更新节点名称显示隐藏
570
572
  this.attributeMetricDisplay.updateNodesNameVisible(); // 加载自定义上传的图标
571
573
 
572
574
  iconManageDispatchers = this.store.getModelDispatchers('customIcon');
573
575
  iconManageDispatchers.loadEditorIcons();
574
576
 
575
- case 15:
577
+ case 16:
576
578
  case "end":
577
579
  return _context12.stop();
578
580
  }
@@ -60,4 +60,37 @@ function _queryModelAsset() {
60
60
  }, _callee2);
61
61
  }));
62
62
  return _queryModelAsset.apply(this, arguments);
63
+ }
64
+
65
+ export function commonQueryCiData(_x3) {
66
+ return _commonQueryCiData.apply(this, arguments);
67
+ }
68
+
69
+ function _commonQueryCiData() {
70
+ _commonQueryCiData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id) {
71
+ var result;
72
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
73
+ while (1) {
74
+ switch (_context3.prev = _context3.next) {
75
+ case 0:
76
+ _context3.next = 2;
77
+ return request.post('/mdc/v1/api/cmdb/authority/commonQueryCiData', {
78
+ condition: "type('machine_room') && id('" + id + "')",
79
+ orders: [],
80
+ pageIndex: 1,
81
+ pageSize: 20
82
+ });
83
+
84
+ case 2:
85
+ result = _context3.sent;
86
+ return _context3.abrupt("return", result);
87
+
88
+ case 4:
89
+ case "end":
90
+ return _context3.stop();
91
+ }
92
+ }
93
+ }, _callee3);
94
+ }));
95
+ return _commonQueryCiData.apply(this, arguments);
63
96
  }
@@ -167,6 +167,10 @@ export default function (topoApp) {
167
167
  case 6:
168
168
  if (viewState === 'edit') {
169
169
  // TODO 待优化进入编辑模式方式
170
+ _this2.update({
171
+ graphLoaded2: false
172
+ });
173
+
170
174
  _this2.enterEditMode();
171
175
  }
172
176