@riil-frontend/component-topology 11.0.36 → 11.0.39

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.
Files changed (216) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +2 -4
  4. package/build/index.js +34 -49
  5. package/es/components/MultiResourceDrawer/index.js +18 -16
  6. package/es/components/ResourceList/ResourceSelect.js +50 -48
  7. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +26 -24
  8. package/es/components/SingleResourceDrawer/SelectDrawer.js +20 -18
  9. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +25 -23
  10. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
  11. package/es/core/components/titlebar/widgets/TitleWidget.js +3 -5
  12. package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
  13. package/es/core/editor/components/BackgroundView/index.js +129 -119
  14. package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -20
  15. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
  16. package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +17 -15
  17. package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +9 -7
  18. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
  19. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
  20. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
  21. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -11
  22. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +23 -21
  23. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
  24. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -10
  25. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +27 -21
  26. package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
  27. package/es/core/editor/hooks/useNewElementTheme.js +2 -2
  28. package/es/core/editor/store/background.js +10 -8
  29. package/es/core/editor/store/topoEdit.js +6 -4
  30. package/es/core/editor/utils/edgeTypeStyleUtil.js +4 -2
  31. package/es/core/hooks/usePolling.js +121 -117
  32. package/es/core/hooks/useResourceConfig.js +66 -58
  33. package/es/core/hooks/useTopoEdit.js +511 -476
  34. package/es/core/models/Alarm.js +298 -281
  35. package/es/core/models/AttributeMetricDisplay.js +107 -101
  36. package/es/core/models/PluginManager.js +3 -4
  37. package/es/core/models/SelectionModel.js +5 -4
  38. package/es/core/models/TopoApp.js +240 -205
  39. package/es/core/models/TopoGraphView.js +21 -18
  40. package/es/core/models/cache/CiCache.js +27 -28
  41. package/es/core/models/cache/CiTypeCache.js +41 -37
  42. package/es/core/models/cache/DictCache.js +35 -33
  43. package/es/core/models/graph/Background.js +17 -15
  44. package/es/core/models/plugins/resourceWebControllUrl.js +82 -76
  45. package/es/core/models/tagstips/ElementTagTipConfig.js +38 -34
  46. package/es/core/models/topoData.js +70 -68
  47. package/es/core/models/utils/linkUtils.js +43 -41
  48. package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
  49. package/es/core/services/alarm.js +16 -14
  50. package/es/core/services/background.js +67 -59
  51. package/es/core/services/cmdb/metric.js +11 -9
  52. package/es/core/services/cmdb.js +20 -18
  53. package/es/core/services/index.js +45 -39
  54. package/es/core/services/overview.js +151 -131
  55. package/es/core/services/topo/basic.js +41 -37
  56. package/es/core/services/topo/tagtip.js +12 -10
  57. package/es/core/store/models/ciModel.js +62 -58
  58. package/es/core/store/models/customIcon.js +134 -120
  59. package/es/core/store/models/displayConfig.js +19 -15
  60. package/es/core/store/models/selection.js +6 -4
  61. package/es/core/store/models/topoAlarm.js +145 -162
  62. package/es/core/store/models/topoBaseInfoOverview.js +6 -4
  63. package/es/core/store/models/topoBizMod.js +11 -9
  64. package/es/core/store/models/topoConfig.js +231 -215
  65. package/es/core/store/models/topoGraphView.js +6 -4
  66. package/es/core/store/models/topoMod.js +395 -373
  67. package/es/core/utils/imageUtil.js +20 -18
  68. package/es/core/utils/saveSerialize.js +11 -9
  69. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
  70. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +29 -28
  71. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +357 -343
  72. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
  73. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
  74. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +205 -189
  75. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +111 -107
  76. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
  77. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +37 -33
  78. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
  79. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
  80. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +19 -17
  81. package/es/networkTopo/components/Link/hook.js +77 -73
  82. package/es/networkTopo/components/Link/index.js +94 -86
  83. package/es/networkTopo/components/Link/setting.js +44 -42
  84. package/es/networkTopo/getTopoData.js +69 -63
  85. package/es/networkTopo/hooks/viewer/useRelateTopo.js +32 -30
  86. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  87. package/es/networkTopo/models/TopoCenter.js +22 -18
  88. package/es/networkTopo/services/alert.js +22 -18
  89. package/es/networkTopo/services/authorization.js +55 -45
  90. package/es/networkTopo/services/cmdb.js +470 -422
  91. package/es/networkTopo/services/funcAuth.js +24 -22
  92. package/es/networkTopo/services/link.js +117 -107
  93. package/es/networkTopo/services/mdc.js +24 -18
  94. package/es/networkTopo/services/metric.js +27 -23
  95. package/es/networkTopo/services/model.js +509 -445
  96. package/es/networkTopo/services/risk.js +11 -9
  97. package/es/networkTopo/services/topo/auth.js +33 -27
  98. package/es/networkTopo/services/topo/basic.js +289 -251
  99. package/es/networkTopo/services/topo/blacklist.js +24 -20
  100. package/es/networkTopo/services/topo/ciInfo.js +31 -27
  101. package/es/networkTopo/services/topo/icon.js +59 -49
  102. package/es/networkTopo/services/topo/networkLink.js +36 -32
  103. package/es/networkTopo/services/topo/relation.js +11 -9
  104. package/es/networkTopo/services/topo/resourceWebUrl.js +42 -36
  105. package/es/networkTopo/store/functionAuth.js +37 -31
  106. package/es/networkTopo/store/topoCenter.js +152 -142
  107. package/es/networkTopo/store/topoLinkMod.js +6 -4
  108. package/es/networkTopo/store/topoTreeMod.js +182 -170
  109. package/es/networkTopo/utils/exportData.js +54 -52
  110. package/lib/components/MultiResourceDrawer/index.js +18 -16
  111. package/lib/components/ResourceList/ResourceSelect.js +50 -48
  112. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +29 -27
  113. package/lib/components/SingleResourceDrawer/SelectDrawer.js +20 -18
  114. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +32 -30
  115. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
  116. package/lib/core/components/titlebar/widgets/TitleWidget.js +3 -5
  117. package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
  118. package/lib/core/editor/components/BackgroundView/index.js +128 -118
  119. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +24 -22
  120. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
  121. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +21 -19
  122. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +10 -8
  123. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
  124. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
  125. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
  126. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +14 -12
  127. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +28 -26
  128. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
  129. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +14 -12
  130. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +31 -25
  131. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
  132. package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
  133. package/lib/core/editor/store/background.js +10 -8
  134. package/lib/core/editor/store/topoEdit.js +6 -4
  135. package/lib/core/editor/utils/edgeTypeStyleUtil.js +4 -2
  136. package/lib/core/hooks/usePolling.js +120 -116
  137. package/lib/core/hooks/useResourceConfig.js +66 -58
  138. package/lib/core/hooks/useTopoEdit.js +503 -468
  139. package/lib/core/models/Alarm.js +292 -275
  140. package/lib/core/models/AttributeMetricDisplay.js +110 -104
  141. package/lib/core/models/PluginManager.js +3 -4
  142. package/lib/core/models/SelectionModel.js +5 -4
  143. package/lib/core/models/TopoApp.js +240 -205
  144. package/lib/core/models/TopoGraphView.js +21 -18
  145. package/lib/core/models/cache/CiCache.js +32 -33
  146. package/lib/core/models/cache/CiTypeCache.js +42 -38
  147. package/lib/core/models/cache/DictCache.js +35 -33
  148. package/lib/core/models/graph/Background.js +18 -16
  149. package/lib/core/models/plugins/resourceWebControllUrl.js +80 -74
  150. package/lib/core/models/tagstips/ElementTagTipConfig.js +38 -34
  151. package/lib/core/models/topoData.js +71 -69
  152. package/lib/core/models/utils/linkUtils.js +43 -41
  153. package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
  154. package/lib/core/services/alarm.js +20 -18
  155. package/lib/core/services/background.js +78 -70
  156. package/lib/core/services/cmdb/metric.js +12 -10
  157. package/lib/core/services/cmdb.js +22 -20
  158. package/lib/core/services/index.js +51 -45
  159. package/lib/core/services/overview.js +151 -131
  160. package/lib/core/services/topo/basic.js +41 -37
  161. package/lib/core/services/topo/tagtip.js +14 -12
  162. package/lib/core/store/models/ciModel.js +70 -66
  163. package/lib/core/store/models/customIcon.js +134 -120
  164. package/lib/core/store/models/displayConfig.js +19 -15
  165. package/lib/core/store/models/selection.js +6 -4
  166. package/lib/core/store/models/topoAlarm.js +145 -163
  167. package/lib/core/store/models/topoBaseInfoOverview.js +6 -4
  168. package/lib/core/store/models/topoBizMod.js +11 -9
  169. package/lib/core/store/models/topoConfig.js +238 -222
  170. package/lib/core/store/models/topoGraphView.js +6 -4
  171. package/lib/core/store/models/topoMod.js +397 -375
  172. package/lib/core/utils/imageUtil.js +24 -22
  173. package/lib/core/utils/saveSerialize.js +11 -9
  174. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
  175. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +29 -28
  176. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +358 -344
  177. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
  178. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
  179. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +206 -190
  180. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +111 -107
  181. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
  182. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -29
  183. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
  184. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
  185. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +20 -18
  186. package/lib/networkTopo/components/Link/hook.js +77 -73
  187. package/lib/networkTopo/components/Link/index.js +95 -87
  188. package/lib/networkTopo/components/Link/setting.js +44 -42
  189. package/lib/networkTopo/getTopoData.js +69 -63
  190. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +33 -31
  191. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  192. package/lib/networkTopo/models/TopoCenter.js +22 -18
  193. package/lib/networkTopo/services/alert.js +22 -18
  194. package/lib/networkTopo/services/authorization.js +65 -55
  195. package/lib/networkTopo/services/cmdb.js +470 -422
  196. package/lib/networkTopo/services/funcAuth.js +26 -24
  197. package/lib/networkTopo/services/link.js +118 -108
  198. package/lib/networkTopo/services/mdc.js +27 -21
  199. package/lib/networkTopo/services/metric.js +31 -27
  200. package/lib/networkTopo/services/model.js +509 -445
  201. package/lib/networkTopo/services/risk.js +13 -11
  202. package/lib/networkTopo/services/topo/auth.js +33 -27
  203. package/lib/networkTopo/services/topo/basic.js +290 -252
  204. package/lib/networkTopo/services/topo/blacklist.js +24 -20
  205. package/lib/networkTopo/services/topo/ciInfo.js +38 -34
  206. package/lib/networkTopo/services/topo/icon.js +69 -59
  207. package/lib/networkTopo/services/topo/networkLink.js +36 -32
  208. package/lib/networkTopo/services/topo/relation.js +13 -11
  209. package/lib/networkTopo/services/topo/resourceWebUrl.js +50 -44
  210. package/lib/networkTopo/store/functionAuth.js +37 -31
  211. package/lib/networkTopo/store/topoCenter.js +152 -142
  212. package/lib/networkTopo/store/topoLinkMod.js +6 -4
  213. package/lib/networkTopo/store/topoTreeMod.js +178 -166
  214. package/lib/networkTopo/utils/exportData.js +61 -59
  215. package/lib/utils/htElementDataUtil.js +2 -4
  216. package/package.json +3 -3
@@ -67,23 +67,25 @@ export default function (engine) {
67
67
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
68
68
  var icons;
69
69
  return _regeneratorRuntime.wrap(function _callee$(_context) {
70
- while (1) switch (_context.prev = _context.next) {
71
- case 0:
72
- _context.next = 2;
73
- return _this.getIcons();
70
+ while (1) {
71
+ switch (_context.prev = _context.next) {
72
+ case 0:
73
+ _context.next = 2;
74
+ return _this.getIcons();
74
75
 
75
- case 2:
76
- icons = _context.sent;
76
+ case 2:
77
+ icons = _context.sent;
77
78
 
78
- _this.update({
79
- icons: icons
80
- });
79
+ _this.update({
80
+ icons: icons
81
+ });
81
82
 
82
- return _context.abrupt("return", icons);
83
+ return _context.abrupt("return", icons);
83
84
 
84
- case 5:
85
- case "end":
86
- return _context.stop();
85
+ case 5:
86
+ case "end":
87
+ return _context.stop();
88
+ }
87
89
  }
88
90
  }, _callee);
89
91
  }))();
@@ -98,17 +100,19 @@ export default function (engine) {
98
100
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
99
101
  var icons;
100
102
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
101
- while (1) switch (_context2.prev = _context2.next) {
102
- case 0:
103
- _context2.next = 2;
104
- return _this2.loadCustomIcons();
105
-
106
- case 2:
107
- icons = _context2.sent;
108
-
109
- case 3:
110
- case "end":
111
- return _context2.stop();
103
+ while (1) {
104
+ switch (_context2.prev = _context2.next) {
105
+ case 0:
106
+ _context2.next = 2;
107
+ return _this2.loadCustomIcons();
108
+
109
+ case 2:
110
+ icons = _context2.sent;
111
+
112
+ case 3:
113
+ case "end":
114
+ return _context2.stop();
115
+ }
112
116
  }
113
117
  }, _callee2);
114
118
  }))();
@@ -117,22 +121,24 @@ export default function (engine) {
117
121
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
118
122
  var iconList, data;
119
123
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
120
- while (1) switch (_context3.prev = _context3.next) {
121
- case 0:
122
- _context3.next = 2;
123
- return topoService.icon.listAll();
124
-
125
- case 2:
126
- iconList = _context3.sent;
127
- data = {
128
- node: iconList.map(addIconUrlData),
129
- container: []
130
- };
131
- return _context3.abrupt("return", data);
132
-
133
- case 5:
134
- case "end":
135
- return _context3.stop();
124
+ while (1) {
125
+ switch (_context3.prev = _context3.next) {
126
+ case 0:
127
+ _context3.next = 2;
128
+ return topoService.icon.listAll();
129
+
130
+ case 2:
131
+ iconList = _context3.sent;
132
+ data = {
133
+ node: iconList.map(addIconUrlData),
134
+ container: []
135
+ };
136
+ return _context3.abrupt("return", data);
137
+
138
+ case 5:
139
+ case "end":
140
+ return _context3.stop();
141
+ }
136
142
  }
137
143
  }, _callee3);
138
144
  }))();
@@ -147,37 +153,39 @@ export default function (engine) {
147
153
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
148
154
  var data, allIcons, newIcons;
149
155
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
150
- while (1) switch (_context4.prev = _context4.next) {
151
- case 0:
152
- data = payload.data;
153
-
154
- _this3.update({
155
- visible: false
156
- }); // 注册
157
-
158
-
159
- data.forEach(function (icon) {
160
- var iconUrl = topoService.icon.getIconImageUrl(icon.id);
161
- window.ht.Default.setImage(getCustomIconHtId(icon.id), iconUrl);
162
- });
163
- _context4.next = 5;
164
- return _this3.loadCustomIcons();
165
-
166
- case 5:
167
- allIcons = _context4.sent;
168
- newIcons = allIcons.node.filter(function (icon) {
169
- return !!data.find(function (item) {
170
- return item.id === icon.id;
171
- });
172
- }); // 通知ht
156
+ while (1) {
157
+ switch (_context4.prev = _context4.next) {
158
+ case 0:
159
+ data = payload.data;
160
+
161
+ _this3.update({
162
+ visible: false
163
+ }); // 注册
173
164
 
174
- engine.view.topoClient.emitEvent('topo_shape_upload_finish', _extends({}, payload, {
175
- data: transformCustomIcons2HtIcons(newIcons)
176
- }));
177
165
 
178
- case 8:
179
- case "end":
180
- return _context4.stop();
166
+ data.forEach(function (icon) {
167
+ var iconUrl = topoService.icon.getIconImageUrl(icon.id);
168
+ window.ht.Default.setImage(getCustomIconHtId(icon.id), iconUrl);
169
+ });
170
+ _context4.next = 5;
171
+ return _this3.loadCustomIcons();
172
+
173
+ case 5:
174
+ allIcons = _context4.sent;
175
+ newIcons = allIcons.node.filter(function (icon) {
176
+ return !!data.find(function (item) {
177
+ return item.id === icon.id;
178
+ });
179
+ }); // 通知ht
180
+
181
+ engine.view.topoClient.emitEvent('topo_shape_upload_finish', _extends({}, payload, {
182
+ data: transformCustomIcons2HtIcons(newIcons)
183
+ }));
184
+
185
+ case 8:
186
+ case "end":
187
+ return _context4.stop();
188
+ }
181
189
  }
182
190
  }, _callee4);
183
191
  }))();
@@ -201,38 +209,40 @@ export default function (engine) {
201
209
  var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
202
210
  var success;
203
211
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
204
- while (1) switch (_context5.prev = _context5.next) {
205
- case 0:
206
- _context5.prev = 0;
207
- _context5.next = 3;
208
- return topoService.icon["delete"](id);
209
-
210
- case 3:
211
- success = _context5.sent;
212
- _context5.next = 6;
213
- return _this4.loadCustomIcons();
214
-
215
- case 6:
216
- if (success) {
217
- iconFactory.remove(getCustomIconHtId(id));
218
- engine.view.topoClient.emitEvent('topo_shape_delete_finish', htIconId);
219
-
220
- _Message.success('删除成功');
221
- } else {
222
- _Message.error('删除失败');
223
- }
224
-
225
- _context5.next = 12;
226
- break;
227
-
228
- case 9:
229
- _context5.prev = 9;
230
- _context5.t0 = _context5["catch"](0);
231
- rlog.warn('删除图标失败', _context5.t0);
232
-
233
- case 12:
234
- case "end":
235
- return _context5.stop();
212
+ while (1) {
213
+ switch (_context5.prev = _context5.next) {
214
+ case 0:
215
+ _context5.prev = 0;
216
+ _context5.next = 3;
217
+ return topoService.icon["delete"](id);
218
+
219
+ case 3:
220
+ success = _context5.sent;
221
+ _context5.next = 6;
222
+ return _this4.loadCustomIcons();
223
+
224
+ case 6:
225
+ if (success) {
226
+ iconFactory.remove(getCustomIconHtId(id));
227
+ engine.view.topoClient.emitEvent('topo_shape_delete_finish', htIconId);
228
+
229
+ _Message.success('删除成功');
230
+ } else {
231
+ _Message.error('删除失败');
232
+ }
233
+
234
+ _context5.next = 12;
235
+ break;
236
+
237
+ case 9:
238
+ _context5.prev = 9;
239
+ _context5.t0 = _context5["catch"](0);
240
+ rlog.warn('删除图标失败', _context5.t0);
241
+
242
+ case 12:
243
+ case "end":
244
+ return _context5.stop();
245
+ }
236
246
  }
237
247
  }, _callee5, null, [[0, 9]]);
238
248
  }));
@@ -267,26 +277,28 @@ export default function (engine) {
267
277
 
268
278
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
269
279
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
270
- while (1) switch (_context6.prev = _context6.next) {
271
- case 0:
272
- _context6.next = 2;
273
- return topoService.icon.rename(icon);
280
+ while (1) {
281
+ switch (_context6.prev = _context6.next) {
282
+ case 0:
283
+ _context6.next = 2;
284
+ return topoService.icon.rename(icon);
274
285
 
275
- case 2:
276
- _Message.success('重命名成功');
286
+ case 2:
287
+ _Message.success('重命名成功');
277
288
 
278
- engine.view.topoClient.emitEvent('topo_shape_rename_finish', _extends({}, icon, {
279
- id: getCustomIconHtId(icon.id)
280
- }));
289
+ engine.view.topoClient.emitEvent('topo_shape_rename_finish', _extends({}, icon, {
290
+ id: getCustomIconHtId(icon.id)
291
+ }));
281
292
 
282
- _this5.closeRenameDialog();
293
+ _this5.closeRenameDialog();
283
294
 
284
- _context6.next = 7;
285
- return _this5.loadCustomIcons();
295
+ _context6.next = 7;
296
+ return _this5.loadCustomIcons();
286
297
 
287
- case 7:
288
- case "end":
289
- return _context6.stop();
298
+ case 7:
299
+ case "end":
300
+ return _context6.stop();
301
+ }
290
302
  }
291
303
  }, _callee6);
292
304
  }))();
@@ -294,10 +306,12 @@ export default function (engine) {
294
306
  downloadIcons: function downloadIcons() {
295
307
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
296
308
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
297
- while (1) switch (_context7.prev = _context7.next) {
298
- case 0:
299
- case "end":
300
- return _context7.stop();
309
+ while (1) {
310
+ switch (_context7.prev = _context7.next) {
311
+ case 0:
312
+ case "end":
313
+ return _context7.stop();
314
+ }
301
315
  }
302
316
  }, _callee7);
303
317
  }))();
@@ -32,13 +32,15 @@ export default function (topo) {
32
32
  getConfig: function getConfig(payload, rootState) {
33
33
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
34
34
  return _regeneratorRuntime.wrap(function _callee$(_context) {
35
- while (1) switch (_context.prev = _context.next) {
36
- case 0:
37
- return _context.abrupt("return", rootState.displayConfig);
35
+ while (1) {
36
+ switch (_context.prev = _context.next) {
37
+ case 0:
38
+ return _context.abrupt("return", rootState.displayConfig);
38
39
 
39
- case 1:
40
- case "end":
41
- return _context.stop();
40
+ case 1:
41
+ case "end":
42
+ return _context.stop();
43
+ }
42
44
  }
43
45
  }, _callee);
44
46
  }))();
@@ -57,17 +59,19 @@ export default function (topo) {
57
59
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
58
60
  var styleConfig;
59
61
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
60
- while (1) switch (_context2.prev = _context2.next) {
61
- case 0:
62
- _context2.next = 2;
63
- return _this.getConfig();
62
+ while (1) {
63
+ switch (_context2.prev = _context2.next) {
64
+ case 0:
65
+ _context2.next = 2;
66
+ return _this.getConfig();
64
67
 
65
- case 2:
66
- styleConfig = _context2.sent;
68
+ case 2:
69
+ styleConfig = _context2.sent;
67
70
 
68
- case 3:
69
- case "end":
70
- return _context2.stop();
71
+ case 3:
72
+ case "end":
73
+ return _context2.stop();
74
+ }
71
75
  }
72
76
  }, _callee2);
73
77
  }))();
@@ -26,10 +26,12 @@ export default {
26
26
  init: function init(payload, rootState) {
27
27
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
28
28
  return _regeneratorRuntime.wrap(function _callee$(_context) {
29
- while (1) switch (_context.prev = _context.next) {
30
- case 0:
31
- case "end":
32
- return _context.stop();
29
+ while (1) {
30
+ switch (_context.prev = _context.next) {
31
+ case 0:
32
+ case "end":
33
+ return _context.stop();
34
+ }
33
35
  }
34
36
  }, _callee);
35
37
  }))();