@riil-frontend/component-topology 2.12.3 → 2.12.4
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/CHANGELOG.md +26 -0
- package/build/index.js +1 -1
- package/es/core/models/TopoApp.js +27 -15
- package/es/topoCenter/models/TopoCenter.js +40 -12
- package/lib/core/models/TopoApp.js +27 -15
- package/lib/topoCenter/models/TopoCenter.js +40 -12
- package/package.json +2 -2
|
@@ -478,42 +478,54 @@ var TopoApp = /*#__PURE__*/function () {
|
|
|
478
478
|
/*#__PURE__*/
|
|
479
479
|
function () {
|
|
480
480
|
var _enterEditMode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
|
|
481
|
-
var topoDispatchers, editDispatchers, ciSetDoc, linkDynamicStyleDispatcher
|
|
481
|
+
var topoDispatchers, editDispatchers, iconManageDispatchers, ciSetDoc, linkDynamicStyleDispatcher;
|
|
482
482
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
483
483
|
while (1) {
|
|
484
484
|
switch (_context11.prev = _context11.next) {
|
|
485
485
|
case 0:
|
|
486
|
-
_context11.next = 2;
|
|
487
|
-
return this.view.switchToEditMode();
|
|
488
|
-
|
|
489
|
-
case 2:
|
|
490
486
|
topoDispatchers = this.store.getModelDispatchers('topoMod');
|
|
491
487
|
topoDispatchers.update({
|
|
492
488
|
viewState: 'edit'
|
|
493
489
|
});
|
|
490
|
+
|
|
491
|
+
if (!this.options.beforeSwitchToEditMode) {
|
|
492
|
+
_context11.next = 5;
|
|
493
|
+
break;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
_context11.next = 5;
|
|
497
|
+
return this.options.beforeSwitchToEditMode();
|
|
498
|
+
|
|
499
|
+
case 5:
|
|
500
|
+
_context11.next = 7;
|
|
501
|
+
return this.view.switchToEditMode();
|
|
502
|
+
|
|
503
|
+
case 7:
|
|
494
504
|
editDispatchers = this.store.getModelDispatchers('topoCreateMod');
|
|
495
505
|
editDispatchers.switchToEditMode();
|
|
496
506
|
|
|
497
507
|
if (this.options.onSwitchToEditMode) {
|
|
498
508
|
this.options.onSwitchToEditMode();
|
|
499
|
-
} //
|
|
509
|
+
} // 加载自定义图标
|
|
500
510
|
|
|
501
511
|
|
|
512
|
+
iconManageDispatchers = this.store.getModelDispatchers('iconManage');
|
|
513
|
+
iconManageDispatchers.loadIcons(); // 每个节点的属性指标显示配置 TODO 每个节点都传了属性指标列表,待优化
|
|
514
|
+
|
|
502
515
|
ciSetDoc = this.store.getModelState('topoBizMod').ciSetDoc;
|
|
503
516
|
this.view.topoClient.saveMarkSetting({
|
|
504
517
|
tagAndTipSet: ciSetDoc
|
|
505
518
|
}); // 刷新链路动态样式
|
|
506
519
|
|
|
507
520
|
linkDynamicStyleDispatcher = this.store.getModelDispatchers('linkDynamicStyle');
|
|
508
|
-
linkDynamicStyleDispatcher.execute(); //
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
case 15:
|
|
521
|
+
linkDynamicStyleDispatcher.execute(); // 加载关联拓扑图数据 FIXME 关联拓扑图时动态获取
|
|
522
|
+
// const topoTreeData = formatTreeDataSelect(
|
|
523
|
+
// this.store.getModelState('topoTreeMod').treeData,
|
|
524
|
+
// this.id
|
|
525
|
+
// );
|
|
526
|
+
// this.view.topoClient.setTopoTreeData(topoTreeData);
|
|
527
|
+
|
|
528
|
+
case 16:
|
|
517
529
|
case "end":
|
|
518
530
|
return _context11.stop();
|
|
519
531
|
}
|
|
@@ -17,6 +17,34 @@ var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
|
17
17
|
loadData: getTopoData
|
|
18
18
|
}, options, {
|
|
19
19
|
usePermission: true,
|
|
20
|
+
beforeSwitchToEditMode: function () {
|
|
21
|
+
var _beforeSwitchToEditMode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
22
|
+
var topoDispatchers;
|
|
23
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
24
|
+
while (1) {
|
|
25
|
+
switch (_context.prev = _context.next) {
|
|
26
|
+
case 0:
|
|
27
|
+
topoDispatchers = _this.store.getModelDispatchers('topoMod');
|
|
28
|
+
topoDispatchers.update({
|
|
29
|
+
topoData: null
|
|
30
|
+
});
|
|
31
|
+
_context.next = 4;
|
|
32
|
+
return topoDispatchers.refreshTopo();
|
|
33
|
+
|
|
34
|
+
case 4:
|
|
35
|
+
case "end":
|
|
36
|
+
return _context.stop();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, _callee);
|
|
40
|
+
}));
|
|
41
|
+
|
|
42
|
+
function beforeSwitchToEditMode() {
|
|
43
|
+
return _beforeSwitchToEditMode.apply(this, arguments);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return beforeSwitchToEditMode;
|
|
47
|
+
}(),
|
|
20
48
|
onSwitchToEditMode: function onSwitchToEditMode() {
|
|
21
49
|
var editDispatchers = _this.store.getModelDispatchers('topoCreateMod');
|
|
22
50
|
|
|
@@ -49,22 +77,22 @@ var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
|
49
77
|
_proto.initData =
|
|
50
78
|
/*#__PURE__*/
|
|
51
79
|
function () {
|
|
52
|
-
var _initData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
80
|
+
var _initData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(params) {
|
|
53
81
|
var topoDispatchers;
|
|
54
|
-
return _regeneratorRuntime.wrap(function
|
|
82
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
55
83
|
while (1) {
|
|
56
|
-
switch (
|
|
84
|
+
switch (_context2.prev = _context2.next) {
|
|
57
85
|
case 0:
|
|
58
86
|
topoDispatchers = this.store.getModelDispatchers('topoCenter');
|
|
59
|
-
|
|
87
|
+
_context2.next = 3;
|
|
60
88
|
return topoDispatchers.initData(params);
|
|
61
89
|
|
|
62
90
|
case 3:
|
|
63
91
|
case "end":
|
|
64
|
-
return
|
|
92
|
+
return _context2.stop();
|
|
65
93
|
}
|
|
66
94
|
}
|
|
67
|
-
},
|
|
95
|
+
}, _callee2, this);
|
|
68
96
|
}));
|
|
69
97
|
|
|
70
98
|
function initData(_x) {
|
|
@@ -86,22 +114,22 @@ var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
|
86
114
|
_proto.exit =
|
|
87
115
|
/*#__PURE__*/
|
|
88
116
|
function () {
|
|
89
|
-
var _exit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
117
|
+
var _exit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
90
118
|
var topoDispatchers;
|
|
91
|
-
return _regeneratorRuntime.wrap(function
|
|
119
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
92
120
|
while (1) {
|
|
93
|
-
switch (
|
|
121
|
+
switch (_context3.prev = _context3.next) {
|
|
94
122
|
case 0:
|
|
95
123
|
topoDispatchers = this.store.getModelDispatchers('topoCenter');
|
|
96
|
-
|
|
124
|
+
_context3.next = 3;
|
|
97
125
|
return topoDispatchers.exit();
|
|
98
126
|
|
|
99
127
|
case 3:
|
|
100
128
|
case "end":
|
|
101
|
-
return
|
|
129
|
+
return _context3.stop();
|
|
102
130
|
}
|
|
103
131
|
}
|
|
104
|
-
},
|
|
132
|
+
}, _callee3, this);
|
|
105
133
|
}));
|
|
106
134
|
|
|
107
135
|
function exit() {
|
|
@@ -505,42 +505,54 @@ var TopoApp = /*#__PURE__*/function () {
|
|
|
505
505
|
/*#__PURE__*/
|
|
506
506
|
function () {
|
|
507
507
|
var _enterEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
|
508
|
-
var topoDispatchers, editDispatchers, ciSetDoc, linkDynamicStyleDispatcher
|
|
508
|
+
var topoDispatchers, editDispatchers, iconManageDispatchers, ciSetDoc, linkDynamicStyleDispatcher;
|
|
509
509
|
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
510
510
|
while (1) {
|
|
511
511
|
switch (_context11.prev = _context11.next) {
|
|
512
512
|
case 0:
|
|
513
|
-
_context11.next = 2;
|
|
514
|
-
return this.view.switchToEditMode();
|
|
515
|
-
|
|
516
|
-
case 2:
|
|
517
513
|
topoDispatchers = this.store.getModelDispatchers('topoMod');
|
|
518
514
|
topoDispatchers.update({
|
|
519
515
|
viewState: 'edit'
|
|
520
516
|
});
|
|
517
|
+
|
|
518
|
+
if (!this.options.beforeSwitchToEditMode) {
|
|
519
|
+
_context11.next = 5;
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
_context11.next = 5;
|
|
524
|
+
return this.options.beforeSwitchToEditMode();
|
|
525
|
+
|
|
526
|
+
case 5:
|
|
527
|
+
_context11.next = 7;
|
|
528
|
+
return this.view.switchToEditMode();
|
|
529
|
+
|
|
530
|
+
case 7:
|
|
521
531
|
editDispatchers = this.store.getModelDispatchers('topoCreateMod');
|
|
522
532
|
editDispatchers.switchToEditMode();
|
|
523
533
|
|
|
524
534
|
if (this.options.onSwitchToEditMode) {
|
|
525
535
|
this.options.onSwitchToEditMode();
|
|
526
|
-
} //
|
|
536
|
+
} // 加载自定义图标
|
|
527
537
|
|
|
528
538
|
|
|
539
|
+
iconManageDispatchers = this.store.getModelDispatchers('iconManage');
|
|
540
|
+
iconManageDispatchers.loadIcons(); // 每个节点的属性指标显示配置 TODO 每个节点都传了属性指标列表,待优化
|
|
541
|
+
|
|
529
542
|
ciSetDoc = this.store.getModelState('topoBizMod').ciSetDoc;
|
|
530
543
|
this.view.topoClient.saveMarkSetting({
|
|
531
544
|
tagAndTipSet: ciSetDoc
|
|
532
545
|
}); // 刷新链路动态样式
|
|
533
546
|
|
|
534
547
|
linkDynamicStyleDispatcher = this.store.getModelDispatchers('linkDynamicStyle');
|
|
535
|
-
linkDynamicStyleDispatcher.execute(); //
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
case 15:
|
|
548
|
+
linkDynamicStyleDispatcher.execute(); // 加载关联拓扑图数据 FIXME 关联拓扑图时动态获取
|
|
549
|
+
// const topoTreeData = formatTreeDataSelect(
|
|
550
|
+
// this.store.getModelState('topoTreeMod').treeData,
|
|
551
|
+
// this.id
|
|
552
|
+
// );
|
|
553
|
+
// this.view.topoClient.setTopoTreeData(topoTreeData);
|
|
554
|
+
|
|
555
|
+
case 16:
|
|
544
556
|
case "end":
|
|
545
557
|
return _context11.stop();
|
|
546
558
|
}
|
|
@@ -31,6 +31,34 @@ var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
|
31
31
|
loadData: _getTopoData["default"]
|
|
32
32
|
}, options, {
|
|
33
33
|
usePermission: true,
|
|
34
|
+
beforeSwitchToEditMode: function () {
|
|
35
|
+
var _beforeSwitchToEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
36
|
+
var topoDispatchers;
|
|
37
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
38
|
+
while (1) {
|
|
39
|
+
switch (_context.prev = _context.next) {
|
|
40
|
+
case 0:
|
|
41
|
+
topoDispatchers = _this.store.getModelDispatchers('topoMod');
|
|
42
|
+
topoDispatchers.update({
|
|
43
|
+
topoData: null
|
|
44
|
+
});
|
|
45
|
+
_context.next = 4;
|
|
46
|
+
return topoDispatchers.refreshTopo();
|
|
47
|
+
|
|
48
|
+
case 4:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, _callee);
|
|
54
|
+
}));
|
|
55
|
+
|
|
56
|
+
function beforeSwitchToEditMode() {
|
|
57
|
+
return _beforeSwitchToEditMode.apply(this, arguments);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return beforeSwitchToEditMode;
|
|
61
|
+
}(),
|
|
34
62
|
onSwitchToEditMode: function onSwitchToEditMode() {
|
|
35
63
|
var editDispatchers = _this.store.getModelDispatchers('topoCreateMod');
|
|
36
64
|
|
|
@@ -63,22 +91,22 @@ var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
|
63
91
|
_proto.initData =
|
|
64
92
|
/*#__PURE__*/
|
|
65
93
|
function () {
|
|
66
|
-
var _initData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
94
|
+
var _initData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(params) {
|
|
67
95
|
var topoDispatchers;
|
|
68
|
-
return _regenerator["default"].wrap(function
|
|
96
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
69
97
|
while (1) {
|
|
70
|
-
switch (
|
|
98
|
+
switch (_context2.prev = _context2.next) {
|
|
71
99
|
case 0:
|
|
72
100
|
topoDispatchers = this.store.getModelDispatchers('topoCenter');
|
|
73
|
-
|
|
101
|
+
_context2.next = 3;
|
|
74
102
|
return topoDispatchers.initData(params);
|
|
75
103
|
|
|
76
104
|
case 3:
|
|
77
105
|
case "end":
|
|
78
|
-
return
|
|
106
|
+
return _context2.stop();
|
|
79
107
|
}
|
|
80
108
|
}
|
|
81
|
-
},
|
|
109
|
+
}, _callee2, this);
|
|
82
110
|
}));
|
|
83
111
|
|
|
84
112
|
function initData(_x) {
|
|
@@ -100,22 +128,22 @@ var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
|
100
128
|
_proto.exit =
|
|
101
129
|
/*#__PURE__*/
|
|
102
130
|
function () {
|
|
103
|
-
var _exit = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
131
|
+
var _exit = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
104
132
|
var topoDispatchers;
|
|
105
|
-
return _regenerator["default"].wrap(function
|
|
133
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
106
134
|
while (1) {
|
|
107
|
-
switch (
|
|
135
|
+
switch (_context3.prev = _context3.next) {
|
|
108
136
|
case 0:
|
|
109
137
|
topoDispatchers = this.store.getModelDispatchers('topoCenter');
|
|
110
|
-
|
|
138
|
+
_context3.next = 3;
|
|
111
139
|
return topoDispatchers.exit();
|
|
112
140
|
|
|
113
141
|
case 3:
|
|
114
142
|
case "end":
|
|
115
|
-
return
|
|
143
|
+
return _context3.stop();
|
|
116
144
|
}
|
|
117
145
|
}
|
|
118
|
-
},
|
|
146
|
+
}, _callee3, this);
|
|
119
147
|
}));
|
|
120
148
|
|
|
121
149
|
function exit() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.4",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -105,6 +105,6 @@
|
|
|
105
105
|
"access": "public"
|
|
106
106
|
},
|
|
107
107
|
"license": "MIT",
|
|
108
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.12.
|
|
108
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.12.4/build/index.html",
|
|
109
109
|
"gitHead": "e53aaebbab89c4155be21b26a1cbac09542ad400"
|
|
110
110
|
}
|