@riil-frontend/component-topology 11.0.35 → 12.0.0-dev.2

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 (147) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.js +45 -29
  4. package/es/components/BatchAttrMetric/setting.js +1 -1
  5. package/es/components/MultiResourceDrawer/index.js +8 -6
  6. package/es/components/ResourceList/ResourceSelect.js +8 -7
  7. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
  8. package/es/components/SingleResourceDrawer/SelectDrawer.js +8 -6
  9. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
  10. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
  11. package/es/core/editor/components/BackgroundView/index.js +73 -54
  12. package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
  13. package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -5
  14. package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
  15. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
  16. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
  17. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
  18. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
  19. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
  20. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
  21. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
  22. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
  23. package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
  24. package/es/core/editor/utils/copyElementUtil.js +174 -0
  25. package/es/core/hooks/useCiAttributeChange.js +6 -3
  26. package/es/core/hooks/usePolling.js +21 -13
  27. package/es/core/hooks/useResourceConfig.js +37 -21
  28. package/es/core/hooks/useTopoEdit.js +202 -139
  29. package/es/core/models/Alarm.js +104 -38
  30. package/es/core/models/AttributeMetricDisplay.js +36 -14
  31. package/es/core/models/TopoApp.js +197 -75
  32. package/es/core/models/TopoGraphView.js +20 -10
  33. package/es/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
  34. package/es/core/models/cache/CiCache.js +12 -6
  35. package/es/core/models/cache/CiTypeCache.js +20 -10
  36. package/es/core/models/cache/DictCache.js +10 -6
  37. package/es/core/models/graph/Background.js +9 -6
  38. package/es/core/models/plugins/resourceWebControllUrl.js +21 -8
  39. package/es/core/models/tagstips/ElementTagTipConfig.js +20 -10
  40. package/es/core/models/topoData.js +7 -5
  41. package/es/core/models/utils/linkUtils.js +8 -5
  42. package/es/core/services/cmdb/metric.js +7 -5
  43. package/es/core/services/cmdb.js +9 -5
  44. package/es/core/services/index.js +23 -9
  45. package/es/core/services/topo/tagtip.js +7 -5
  46. package/es/core/store/models/customIcon.js +11 -6
  47. package/es/core/utils/imageUtil.js +7 -5
  48. package/es/core/utils/metricUtil.js +13 -1
  49. package/es/core/utils/saveSerialize.js +7 -5
  50. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
  51. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +8 -5
  52. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
  53. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +47 -34
  54. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
  55. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +74 -34
  56. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
  57. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
  58. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -26
  59. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +15 -7
  60. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
  61. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
  62. package/es/networkTopo/components/Link/hook.js +21 -14
  63. package/es/networkTopo/components/Link/index.js +32 -18
  64. package/es/networkTopo/components/Link/setting.js +8 -6
  65. package/es/networkTopo/getTopoData.js +23 -10
  66. package/es/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
  67. package/es/networkTopo/models/TopoCenter.js +24 -10
  68. package/es/networkTopo/services/cmdb.js +333 -233
  69. package/es/networkTopo/services/mdc.js +24 -15
  70. package/es/networkTopo/services/metric.js +16 -11
  71. package/es/networkTopo/services/model.js +412 -283
  72. package/es/networkTopo/utils/exportData.js +7 -5
  73. package/es/utils/clipboardUtil.d.ts +7 -0
  74. package/es/utils/clipboardUtil.js +104 -0
  75. package/lib/components/BatchAttrMetric/setting.js +1 -1
  76. package/lib/components/MultiResourceDrawer/index.js +8 -6
  77. package/lib/components/ResourceList/ResourceSelect.js +8 -6
  78. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
  79. package/lib/components/SingleResourceDrawer/SelectDrawer.js +8 -6
  80. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
  81. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
  82. package/lib/core/editor/components/BackgroundView/index.js +74 -55
  83. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
  84. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -4
  85. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
  86. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
  87. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
  88. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
  89. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
  90. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
  91. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
  92. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
  93. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
  94. package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
  95. package/lib/core/editor/utils/copyElementUtil.js +187 -0
  96. package/lib/core/hooks/useCiAttributeChange.js +6 -3
  97. package/lib/core/hooks/usePolling.js +21 -13
  98. package/lib/core/hooks/useResourceConfig.js +37 -21
  99. package/lib/core/hooks/useTopoEdit.js +202 -139
  100. package/lib/core/models/Alarm.js +104 -38
  101. package/lib/core/models/AttributeMetricDisplay.js +36 -14
  102. package/lib/core/models/TopoApp.js +197 -75
  103. package/lib/core/models/TopoGraphView.js +20 -10
  104. package/lib/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
  105. package/lib/core/models/cache/CiCache.js +12 -6
  106. package/lib/core/models/cache/CiTypeCache.js +20 -10
  107. package/lib/core/models/cache/DictCache.js +10 -6
  108. package/lib/core/models/graph/Background.js +9 -6
  109. package/lib/core/models/plugins/resourceWebControllUrl.js +21 -8
  110. package/lib/core/models/tagstips/ElementTagTipConfig.js +20 -10
  111. package/lib/core/models/topoData.js +7 -4
  112. package/lib/core/models/utils/linkUtils.js +8 -4
  113. package/lib/core/services/cmdb/metric.js +7 -4
  114. package/lib/core/services/cmdb.js +9 -4
  115. package/lib/core/services/index.js +21 -8
  116. package/lib/core/services/topo/tagtip.js +7 -4
  117. package/lib/core/store/models/customIcon.js +11 -6
  118. package/lib/core/utils/imageUtil.js +7 -4
  119. package/lib/core/utils/metricUtil.js +13 -1
  120. package/lib/core/utils/saveSerialize.js +7 -4
  121. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
  122. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +9 -6
  123. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
  124. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +49 -36
  125. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
  126. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +73 -35
  127. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
  128. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
  129. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -25
  130. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +14 -6
  131. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
  132. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
  133. package/lib/networkTopo/components/Link/hook.js +23 -15
  134. package/lib/networkTopo/components/Link/index.js +32 -18
  135. package/lib/networkTopo/components/Link/setting.js +8 -6
  136. package/lib/networkTopo/getTopoData.js +23 -10
  137. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
  138. package/lib/networkTopo/models/TopoCenter.js +24 -10
  139. package/lib/networkTopo/services/cmdb.js +336 -235
  140. package/lib/networkTopo/services/mdc.js +24 -14
  141. package/lib/networkTopo/services/metric.js +16 -10
  142. package/lib/networkTopo/services/model.js +414 -284
  143. package/lib/networkTopo/utils/exportData.js +7 -4
  144. package/lib/utils/clipboardUtil.d.ts +7 -0
  145. package/lib/utils/clipboardUtil.js +113 -0
  146. package/lib/utils/htElementDataUtil.js +4 -2
  147. package/package.json +3 -2
@@ -26,13 +26,11 @@ var _storage = require("../utils/storage");
26
26
 
27
27
  var _mdc = require("./mdc");
28
28
 
29
- var _ref, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _getUserDicts, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _getCiMeta, _formatCiAttributes, _queryAllModel, _ref27, _ref28;
30
-
31
29
  /**
32
30
  * 查询 CI 组件信息(又实例的)
33
31
  */
34
- var getCommonCount = function getCommonCount(_x) {
35
- return (_ref = _ref || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(code) {
32
+ var getCommonCount = /*#__PURE__*/function () {
33
+ var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(code) {
36
34
  return _regenerator["default"].wrap(function _callee$(_context) {
37
35
  while (1) switch (_context.prev = _context.next) {
38
36
  case 0:
@@ -50,8 +48,12 @@ var getCommonCount = function getCommonCount(_x) {
50
48
  return _context.stop();
51
49
  }
52
50
  }, _callee);
53
- }))).apply(this, arguments);
54
- };
51
+ }));
52
+
53
+ return function getCommonCount(_x) {
54
+ return _ref.apply(this, arguments);
55
+ };
56
+ }();
55
57
  /**
56
58
  * 查询 CI 组件信息
57
59
  */
@@ -59,8 +61,8 @@ var getCommonCount = function getCommonCount(_x) {
59
61
 
60
62
  exports.getCommonCount = getCommonCount;
61
63
 
62
- var getComponents = function getComponents(_x2) {
63
- return (_ref2 = _ref2 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(code) {
64
+ var getComponents = /*#__PURE__*/function () {
65
+ var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(code) {
64
66
  return _regenerator["default"].wrap(function _callee2$(_context2) {
65
67
  while (1) switch (_context2.prev = _context2.next) {
66
68
  case 0:
@@ -77,8 +79,12 @@ var getComponents = function getComponents(_x2) {
77
79
  return _context2.stop();
78
80
  }
79
81
  }, _callee2);
80
- }))).apply(this, arguments);
81
- };
82
+ }));
83
+
84
+ return function getComponents(_x2) {
85
+ return _ref2.apply(this, arguments);
86
+ };
87
+ }();
82
88
  /**
83
89
  * 查询关系类型定义
84
90
  */
@@ -86,8 +92,8 @@ var getComponents = function getComponents(_x2) {
86
92
 
87
93
  exports.getComponents = getComponents;
88
94
 
89
- var getAllRelationType = function getAllRelationType() {
90
- return (_ref3 = _ref3 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
95
+ var getAllRelationType = /*#__PURE__*/function () {
96
+ var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
91
97
  return _regenerator["default"].wrap(function _callee3$(_context3) {
92
98
  while (1) switch (_context3.prev = _context3.next) {
93
99
  case 0:
@@ -102,8 +108,12 @@ var getAllRelationType = function getAllRelationType() {
102
108
  return _context3.stop();
103
109
  }
104
110
  }, _callee3);
105
- }))).apply(this, arguments);
106
- };
111
+ }));
112
+
113
+ return function getAllRelationType() {
114
+ return _ref3.apply(this, arguments);
115
+ };
116
+ }();
107
117
  /**
108
118
  * ci类型树(包含组件)
109
119
  * @param {string} moduleName 标识模块名
@@ -112,8 +122,8 @@ var getAllRelationType = function getAllRelationType() {
112
122
 
113
123
  exports.getAllRelationType = getAllRelationType;
114
124
 
115
- var getCiTypes = function getCiTypes(_x3) {
116
- return (_ref4 = _ref4 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(moduleName) {
125
+ var getCiTypes = /*#__PURE__*/function () {
126
+ var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(moduleName) {
117
127
  return _regenerator["default"].wrap(function _callee4$(_context4) {
118
128
  while (1) switch (_context4.prev = _context4.next) {
119
129
  case 0:
@@ -130,8 +140,12 @@ var getCiTypes = function getCiTypes(_x3) {
130
140
  return _context4.stop();
131
141
  }
132
142
  }, _callee4);
133
- }))).apply(this, arguments);
134
- };
143
+ }));
144
+
145
+ return function getCiTypes(_x3) {
146
+ return _ref4.apply(this, arguments);
147
+ };
148
+ }();
135
149
  /**
136
150
  * 模型树拖动接口,用于节点拖拽
137
151
  */
@@ -139,8 +153,8 @@ var getCiTypes = function getCiTypes(_x3) {
139
153
 
140
154
  exports.getCiTypes = getCiTypes;
141
155
 
142
- var dragTree = function dragTree(_x4) {
143
- return (_ref5 = _ref5 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(param) {
156
+ var dragTree = /*#__PURE__*/function () {
157
+ var _ref5 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(param) {
144
158
  return _regenerator["default"].wrap(function _callee5$(_context5) {
145
159
  while (1) switch (_context5.prev = _context5.next) {
146
160
  case 0:
@@ -155,8 +169,12 @@ var dragTree = function dragTree(_x4) {
155
169
  return _context5.stop();
156
170
  }
157
171
  }, _callee5);
158
- }))).apply(this, arguments);
159
- };
172
+ }));
173
+
174
+ return function dragTree(_x4) {
175
+ return _ref5.apply(this, arguments);
176
+ };
177
+ }();
160
178
  /**
161
179
  * 模型改造树
162
180
  */
@@ -164,8 +182,8 @@ var dragTree = function dragTree(_x4) {
164
182
 
165
183
  exports.dragTree = dragTree;
166
184
 
167
- var getModelTree = function getModelTree() {
168
- return (_ref6 = _ref6 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
185
+ var getModelTree = /*#__PURE__*/function () {
186
+ var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
169
187
  return _regenerator["default"].wrap(function _callee6$(_context6) {
170
188
  while (1) switch (_context6.prev = _context6.next) {
171
189
  case 0:
@@ -180,8 +198,12 @@ var getModelTree = function getModelTree() {
180
198
  return _context6.stop();
181
199
  }
182
200
  }, _callee6);
183
- }))).apply(this, arguments);
184
- };
201
+ }));
202
+
203
+ return function getModelTree() {
204
+ return _ref6.apply(this, arguments);
205
+ };
206
+ }();
185
207
  /**
186
208
  * 验证CI名称
187
209
  * @param {Object} param - 验证值对象.
@@ -197,8 +219,8 @@ var getModelTree = function getModelTree() {
197
219
 
198
220
  exports.getModelTree = getModelTree;
199
221
 
200
- var verify = function verify(_x5) {
201
- return (_ref7 = _ref7 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(param) {
222
+ var verify = /*#__PURE__*/function () {
223
+ var _ref7 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(param) {
202
224
  return _regenerator["default"].wrap(function _callee7$(_context7) {
203
225
  while (1) switch (_context7.prev = _context7.next) {
204
226
  case 0:
@@ -213,8 +235,12 @@ var verify = function verify(_x5) {
213
235
  return _context7.stop();
214
236
  }
215
237
  }, _callee7);
216
- }))).apply(this, arguments);
217
- };
238
+ }));
239
+
240
+ return function verify(_x5) {
241
+ return _ref7.apply(this, arguments);
242
+ };
243
+ }();
218
244
  /**
219
245
  * 获得CI指标
220
246
  */
@@ -222,8 +248,8 @@ var verify = function verify(_x5) {
222
248
 
223
249
  exports.verify = verify;
224
250
 
225
- var getCiMetric = function getCiMetric(_x6) {
226
- return (_ref8 = _ref8 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(ciCode) {
251
+ var getCiMetric = /*#__PURE__*/function () {
252
+ var _ref8 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(ciCode) {
227
253
  return _regenerator["default"].wrap(function _callee8$(_context8) {
228
254
  while (1) switch (_context8.prev = _context8.next) {
229
255
  case 0:
@@ -240,8 +266,12 @@ var getCiMetric = function getCiMetric(_x6) {
240
266
  return _context8.stop();
241
267
  }
242
268
  }, _callee8);
243
- }))).apply(this, arguments);
244
- };
269
+ }));
270
+
271
+ return function getCiMetric(_x6) {
272
+ return _ref8.apply(this, arguments);
273
+ };
274
+ }();
245
275
  /**
246
276
  * 所有领域
247
277
  * @returns {array} 对象数组
@@ -250,8 +280,8 @@ var getCiMetric = function getCiMetric(_x6) {
250
280
 
251
281
  exports.getCiMetric = getCiMetric;
252
282
 
253
- var getDomains = function getDomains() {
254
- return (_ref9 = _ref9 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
283
+ var getDomains = /*#__PURE__*/function () {
284
+ var _ref9 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
255
285
  return _regenerator["default"].wrap(function _callee9$(_context9) {
256
286
  while (1) switch (_context9.prev = _context9.next) {
257
287
  case 0:
@@ -266,8 +296,12 @@ var getDomains = function getDomains() {
266
296
  return _context9.stop();
267
297
  }
268
298
  }, _callee9);
269
- }))).apply(this, arguments);
270
- };
299
+ }));
300
+
301
+ return function getDomains() {
302
+ return _ref9.apply(this, arguments);
303
+ };
304
+ }();
271
305
  /** ************************************** 关系定义 start ************************************ */
272
306
 
273
307
  /**
@@ -279,8 +313,8 @@ var getDomains = function getDomains() {
279
313
 
280
314
  exports.getDomains = getDomains;
281
315
 
282
- var getRelation = function getRelation(_x7) {
283
- return (_ref10 = _ref10 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(params) {
316
+ var getRelation = /*#__PURE__*/function () {
317
+ var _ref10 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(params) {
284
318
  return _regenerator["default"].wrap(function _callee10$(_context10) {
285
319
  while (1) switch (_context10.prev = _context10.next) {
286
320
  case 0:
@@ -295,8 +329,12 @@ var getRelation = function getRelation(_x7) {
295
329
  return _context10.stop();
296
330
  }
297
331
  }, _callee10);
298
- }))).apply(this, arguments);
299
- };
332
+ }));
333
+
334
+ return function getRelation(_x7) {
335
+ return _ref10.apply(this, arguments);
336
+ };
337
+ }();
300
338
  /**
301
339
  * 创建关系
302
340
  * @param {object} params
@@ -305,8 +343,8 @@ var getRelation = function getRelation(_x7) {
305
343
 
306
344
  exports.getRelation = getRelation;
307
345
 
308
- var createRelation = function createRelation(_x8) {
309
- return (_ref11 = _ref11 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(params) {
346
+ var createRelation = /*#__PURE__*/function () {
347
+ var _ref11 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(params) {
310
348
  return _regenerator["default"].wrap(function _callee11$(_context11) {
311
349
  while (1) switch (_context11.prev = _context11.next) {
312
350
  case 0:
@@ -321,8 +359,12 @@ var createRelation = function createRelation(_x8) {
321
359
  return _context11.stop();
322
360
  }
323
361
  }, _callee11);
324
- }))).apply(this, arguments);
325
- };
362
+ }));
363
+
364
+ return function createRelation(_x8) {
365
+ return _ref11.apply(this, arguments);
366
+ };
367
+ }();
326
368
  /**
327
369
  * 编辑关系
328
370
  * @param {object} params
@@ -331,8 +373,8 @@ var createRelation = function createRelation(_x8) {
331
373
 
332
374
  exports.createRelation = createRelation;
333
375
 
334
- var updateRelation = function updateRelation(_x9) {
335
- return (_ref12 = _ref12 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(params) {
376
+ var updateRelation = /*#__PURE__*/function () {
377
+ var _ref12 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(params) {
336
378
  return _regenerator["default"].wrap(function _callee12$(_context12) {
337
379
  while (1) switch (_context12.prev = _context12.next) {
338
380
  case 0:
@@ -347,8 +389,12 @@ var updateRelation = function updateRelation(_x9) {
347
389
  return _context12.stop();
348
390
  }
349
391
  }, _callee12);
350
- }))).apply(this, arguments);
351
- };
392
+ }));
393
+
394
+ return function updateRelation(_x9) {
395
+ return _ref12.apply(this, arguments);
396
+ };
397
+ }();
352
398
  /**
353
399
  * 删除关系定义
354
400
  * @param {object} params {
@@ -371,8 +417,8 @@ var updateRelation = function updateRelation(_x9) {
371
417
 
372
418
  exports.updateRelation = updateRelation;
373
419
 
374
- var deleteRelation = function deleteRelation(_x10) {
375
- return (_ref13 = _ref13 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(params) {
420
+ var deleteRelation = /*#__PURE__*/function () {
421
+ var _ref13 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(params) {
376
422
  return _regenerator["default"].wrap(function _callee13$(_context13) {
377
423
  while (1) switch (_context13.prev = _context13.next) {
378
424
  case 0:
@@ -387,8 +433,12 @@ var deleteRelation = function deleteRelation(_x10) {
387
433
  return _context13.stop();
388
434
  }
389
435
  }, _callee13);
390
- }))).apply(this, arguments);
391
- };
436
+ }));
437
+
438
+ return function deleteRelation(_x10) {
439
+ return _ref13.apply(this, arguments);
440
+ };
441
+ }();
392
442
  /** ************************************** 关系定义 end************************************ */
393
443
 
394
444
  /** ************************************** 数据字典 start ********************************** */
@@ -432,8 +482,8 @@ var deleteRelation = function deleteRelation(_x10) {
432
482
 
433
483
  exports.deleteRelation = deleteRelation;
434
484
 
435
- var getCiAttributeDict = function getCiAttributeDict(_x11) {
436
- return (_ref14 = _ref14 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14(param) {
485
+ var getCiAttributeDict = /*#__PURE__*/function () {
486
+ var _ref14 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14(param) {
437
487
  return _regenerator["default"].wrap(function _callee14$(_context14) {
438
488
  while (1) switch (_context14.prev = _context14.next) {
439
489
  case 0:
@@ -448,8 +498,12 @@ var getCiAttributeDict = function getCiAttributeDict(_x11) {
448
498
  return _context14.stop();
449
499
  }
450
500
  }, _callee14);
451
- }))).apply(this, arguments);
452
- };
501
+ }));
502
+
503
+ return function getCiAttributeDict(_x11) {
504
+ return _ref14.apply(this, arguments);
505
+ };
506
+ }();
453
507
  /**
454
508
  * 获取用户自建的属性(数据字典)
455
509
  * @param {Array} codes ci类型code集合
@@ -460,30 +514,7 @@ var getCiAttributeDict = function getCiAttributeDict(_x11) {
460
514
  exports.getCiAttributeDict = getCiAttributeDict;
461
515
 
462
516
  function getUserDicts(_x12) {
463
- return (_getUserDicts = _getUserDicts || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15(codes) {
464
- var dicts, userDict;
465
- return _regenerator["default"].wrap(function _callee15$(_context15) {
466
- while (1) switch (_context15.prev = _context15.next) {
467
- case 0:
468
- _context15.next = 2;
469
- return getCiAttributeDict({
470
- ciCode: codes
471
- });
472
-
473
- case 2:
474
- dicts = _context15.sent;
475
- userDict = dicts.reduce(function (map, obj) {
476
- map[obj.attributeCode] = obj.dict.items;
477
- return map;
478
- }, {});
479
- return _context15.abrupt("return", userDict);
480
-
481
- case 5:
482
- case "end":
483
- return _context15.stop();
484
- }
485
- }, _callee15);
486
- }))).apply(this, arguments);
517
+ return _getUserDicts.apply(this, arguments);
487
518
  }
488
519
  /**
489
520
  * 查询单个数据字典
@@ -510,26 +541,58 @@ function getUserDicts(_x12) {
510
541
  */
511
542
 
512
543
 
513
- var queryDict = function queryDict(_x13) {
514
- return (_ref15 = _ref15 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(code) {
515
- return _regenerator["default"].wrap(function _callee16$(_context16) {
516
- while (1) switch (_context16.prev = _context16.next) {
544
+ function _getUserDicts() {
545
+ _getUserDicts = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee29(codes) {
546
+ var dicts, userDict;
547
+ return _regenerator["default"].wrap(function _callee29$(_context29) {
548
+ while (1) switch (_context29.prev = _context29.next) {
517
549
  case 0:
518
- _context16.next = 2;
550
+ _context29.next = 2;
551
+ return getCiAttributeDict({
552
+ ciCode: codes
553
+ });
554
+
555
+ case 2:
556
+ dicts = _context29.sent;
557
+ userDict = dicts.reduce(function (map, obj) {
558
+ map[obj.attributeCode] = obj.dict.items;
559
+ return map;
560
+ }, {});
561
+ return _context29.abrupt("return", userDict);
562
+
563
+ case 5:
564
+ case "end":
565
+ return _context29.stop();
566
+ }
567
+ }, _callee29);
568
+ }));
569
+ return _getUserDicts.apply(this, arguments);
570
+ }
571
+
572
+ var queryDict = /*#__PURE__*/function () {
573
+ var _ref15 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15(code) {
574
+ return _regenerator["default"].wrap(function _callee15$(_context15) {
575
+ while (1) switch (_context15.prev = _context15.next) {
576
+ case 0:
577
+ _context15.next = 2;
519
578
  return _componentTopologyUtils.request.post('/model/v1/api/getDict', {
520
579
  code: code
521
580
  });
522
581
 
523
582
  case 2:
524
- return _context16.abrupt("return", _context16.sent);
583
+ return _context15.abrupt("return", _context15.sent);
525
584
 
526
585
  case 3:
527
586
  case "end":
528
- return _context16.stop();
587
+ return _context15.stop();
529
588
  }
530
- }, _callee16);
531
- }))).apply(this, arguments);
532
- };
589
+ }, _callee15);
590
+ }));
591
+
592
+ return function queryDict(_x13) {
593
+ return _ref15.apply(this, arguments);
594
+ };
595
+ }();
533
596
  /**
534
597
  * 查询厂商
535
598
  * TODO:由于当前后端只有一个单查厂商的接口,暂使用promise.all形式查询多个
@@ -541,12 +604,12 @@ var queryDict = function queryDict(_x13) {
541
604
 
542
605
  exports.queryDict = queryDict;
543
606
 
544
- var queryVendors = function queryVendors(_x14) {
545
- return (_ref16 = _ref16 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17(vendorKeys) {
546
- return _regenerator["default"].wrap(function _callee17$(_context17) {
547
- while (1) switch (_context17.prev = _context17.next) {
607
+ var queryVendors = /*#__PURE__*/function () {
608
+ var _ref16 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(vendorKeys) {
609
+ return _regenerator["default"].wrap(function _callee16$(_context16) {
610
+ while (1) switch (_context16.prev = _context16.next) {
548
611
  case 0:
549
- _context17.next = 2;
612
+ _context16.next = 2;
550
613
  return Promise.all(vendorKeys.map(function (vendor) {
551
614
  return _componentTopologyUtils.request.post('/model/v1/api/getDict', {
552
615
  vendor: vendor
@@ -554,15 +617,19 @@ var queryVendors = function queryVendors(_x14) {
554
617
  }));
555
618
 
556
619
  case 2:
557
- return _context17.abrupt("return", _context17.sent);
620
+ return _context16.abrupt("return", _context16.sent);
558
621
 
559
622
  case 3:
560
623
  case "end":
561
- return _context17.stop();
624
+ return _context16.stop();
562
625
  }
563
- }, _callee17);
564
- }))).apply(this, arguments);
565
- };
626
+ }, _callee16);
627
+ }));
628
+
629
+ return function queryVendors(_x14) {
630
+ return _ref16.apply(this, arguments);
631
+ };
632
+ }();
566
633
  /**
567
634
  * 查询全部数据字典
568
635
  * @param {string} source 查询全量:source=null,查询内建:source=system,查询自建: source=custom
@@ -595,28 +662,32 @@ var queryVendors = function queryVendors(_x14) {
595
662
 
596
663
  exports.queryVendors = queryVendors;
597
664
 
598
- var queryDicts = function queryDicts(_x15) {
599
- return (_ref17 = _ref17 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18(source) {
600
- return _regenerator["default"].wrap(function _callee18$(_context18) {
601
- while (1) switch (_context18.prev = _context18.next) {
665
+ var queryDicts = /*#__PURE__*/function () {
666
+ var _ref17 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17(source) {
667
+ return _regenerator["default"].wrap(function _callee17$(_context17) {
668
+ while (1) switch (_context17.prev = _context17.next) {
602
669
  case 0:
603
670
  if (source === void 0) {
604
671
  source = null;
605
672
  }
606
673
 
607
- _context18.next = 3;
674
+ _context17.next = 3;
608
675
  return (0, _mdc.modelDictList)();
609
676
 
610
677
  case 3:
611
- return _context18.abrupt("return", _context18.sent);
678
+ return _context17.abrupt("return", _context17.sent);
612
679
 
613
680
  case 4:
614
681
  case "end":
615
- return _context18.stop();
682
+ return _context17.stop();
616
683
  }
617
- }, _callee18);
618
- }))).apply(this, arguments);
619
- };
684
+ }, _callee17);
685
+ }));
686
+
687
+ return function queryDicts(_x15) {
688
+ return _ref17.apply(this, arguments);
689
+ };
690
+ }();
620
691
  /**
621
692
  * 新建数据字典
622
693
  * @param {object} param
@@ -652,24 +723,28 @@ var queryDicts = function queryDicts(_x15) {
652
723
 
653
724
  exports.queryDicts = queryDicts;
654
725
 
655
- var createDict = function createDict(_x16) {
656
- return (_ref18 = _ref18 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee19(param) {
657
- return _regenerator["default"].wrap(function _callee19$(_context19) {
658
- while (1) switch (_context19.prev = _context19.next) {
726
+ var createDict = /*#__PURE__*/function () {
727
+ var _ref18 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18(param) {
728
+ return _regenerator["default"].wrap(function _callee18$(_context18) {
729
+ while (1) switch (_context18.prev = _context18.next) {
659
730
  case 0:
660
- _context19.next = 2;
731
+ _context18.next = 2;
661
732
  return _componentTopologyUtils.request.post('/model/v1/api/createDict', param);
662
733
 
663
734
  case 2:
664
- return _context19.abrupt("return", _context19.sent);
735
+ return _context18.abrupt("return", _context18.sent);
665
736
 
666
737
  case 3:
667
738
  case "end":
668
- return _context19.stop();
739
+ return _context18.stop();
669
740
  }
670
- }, _callee19);
671
- }))).apply(this, arguments);
672
- };
741
+ }, _callee18);
742
+ }));
743
+
744
+ return function createDict(_x16) {
745
+ return _ref18.apply(this, arguments);
746
+ };
747
+ }();
673
748
  /**
674
749
  * 编辑数据字典
675
750
  * @param {object} param
@@ -698,24 +773,28 @@ var createDict = function createDict(_x16) {
698
773
 
699
774
  exports.createDict = createDict;
700
775
 
701
- var updateDict = function updateDict(_x17) {
702
- return (_ref19 = _ref19 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee20(param) {
703
- return _regenerator["default"].wrap(function _callee20$(_context20) {
704
- while (1) switch (_context20.prev = _context20.next) {
776
+ var updateDict = /*#__PURE__*/function () {
777
+ var _ref19 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee19(param) {
778
+ return _regenerator["default"].wrap(function _callee19$(_context19) {
779
+ while (1) switch (_context19.prev = _context19.next) {
705
780
  case 0:
706
- _context20.next = 2;
781
+ _context19.next = 2;
707
782
  return _componentTopologyUtils.request.post('/model/v1/api/updateDict', param);
708
783
 
709
784
  case 2:
710
- return _context20.abrupt("return", _context20.sent);
785
+ return _context19.abrupt("return", _context19.sent);
711
786
 
712
787
  case 3:
713
788
  case "end":
714
- return _context20.stop();
789
+ return _context19.stop();
715
790
  }
716
- }, _callee20);
717
- }))).apply(this, arguments);
718
- };
791
+ }, _callee19);
792
+ }));
793
+
794
+ return function updateDict(_x17) {
795
+ return _ref19.apply(this, arguments);
796
+ };
797
+ }();
719
798
  /**
720
799
  * 删除数据字典
721
800
  * @param {string} id
@@ -735,26 +814,30 @@ var updateDict = function updateDict(_x17) {
735
814
 
736
815
  exports.updateDict = updateDict;
737
816
 
738
- var deleteDict = function deleteDict(_x18) {
739
- return (_ref20 = _ref20 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee21(id) {
740
- return _regenerator["default"].wrap(function _callee21$(_context21) {
741
- while (1) switch (_context21.prev = _context21.next) {
817
+ var deleteDict = /*#__PURE__*/function () {
818
+ var _ref20 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee20(id) {
819
+ return _regenerator["default"].wrap(function _callee20$(_context20) {
820
+ while (1) switch (_context20.prev = _context20.next) {
742
821
  case 0:
743
- _context21.next = 2;
822
+ _context20.next = 2;
744
823
  return _componentTopologyUtils.request.post('/model/v1/api/deleteDict', {
745
824
  id: id
746
825
  });
747
826
 
748
827
  case 2:
749
- return _context21.abrupt("return", _context21.sent);
828
+ return _context20.abrupt("return", _context20.sent);
750
829
 
751
830
  case 3:
752
831
  case "end":
753
- return _context21.stop();
832
+ return _context20.stop();
754
833
  }
755
- }, _callee21);
756
- }))).apply(this, arguments);
757
- };
834
+ }, _callee20);
835
+ }));
836
+
837
+ return function deleteDict(_x18) {
838
+ return _ref20.apply(this, arguments);
839
+ };
840
+ }();
758
841
  /** ************************************** 数据字典 end ************************************ */
759
842
 
760
843
  /** ************************************** ci类型 start ************************************ */
@@ -771,24 +854,28 @@ var deleteDict = function deleteDict(_x18) {
771
854
 
772
855
  exports.deleteDict = deleteDict;
773
856
 
774
- var getCiExtends = function getCiExtends(_x19) {
775
- return (_ref21 = _ref21 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee22(param) {
776
- return _regenerator["default"].wrap(function _callee22$(_context22) {
777
- while (1) switch (_context22.prev = _context22.next) {
857
+ var getCiExtends = /*#__PURE__*/function () {
858
+ var _ref21 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee21(param) {
859
+ return _regenerator["default"].wrap(function _callee21$(_context21) {
860
+ while (1) switch (_context21.prev = _context21.next) {
778
861
  case 0:
779
- _context22.next = 2;
862
+ _context21.next = 2;
780
863
  return _componentTopologyUtils.request.post('/model/v1/api/getCiExtends', param);
781
864
 
782
865
  case 2:
783
- return _context22.abrupt("return", _context22.sent);
866
+ return _context21.abrupt("return", _context21.sent);
784
867
 
785
868
  case 3:
786
869
  case "end":
787
- return _context22.stop();
870
+ return _context21.stop();
788
871
  }
789
- }, _callee22);
790
- }))).apply(this, arguments);
791
- };
872
+ }, _callee21);
873
+ }));
874
+
875
+ return function getCiExtends(_x19) {
876
+ return _ref21.apply(this, arguments);
877
+ };
878
+ }();
792
879
  /**
793
880
  *
794
881
  * 模型接口-ci元数据
@@ -800,11 +887,11 @@ var getCiExtends = function getCiExtends(_x19) {
800
887
 
801
888
  exports.getCiExtends = getCiExtends;
802
889
 
803
- var getCi = function getCi(_x20, _x21, _x22) {
804
- return (_ref22 = _ref22 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee23(code, userVisibleFilter, dict) {
890
+ var getCi = /*#__PURE__*/function () {
891
+ var _ref22 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee22(code, userVisibleFilter, dict) {
805
892
  var meta;
806
- return _regenerator["default"].wrap(function _callee23$(_context23) {
807
- while (1) switch (_context23.prev = _context23.next) {
893
+ return _regenerator["default"].wrap(function _callee22$(_context22) {
894
+ while (1) switch (_context22.prev = _context22.next) {
808
895
  case 0:
809
896
  if (userVisibleFilter === void 0) {
810
897
  userVisibleFilter = true;
@@ -814,36 +901,40 @@ var getCi = function getCi(_x20, _x21, _x22) {
814
901
  dict = true;
815
902
  }
816
903
 
817
- _context23.next = 4;
904
+ _context22.next = 4;
818
905
  return formatCiAttributes(code, userVisibleFilter);
819
906
 
820
907
  case 4:
821
- meta = _context23.sent;
908
+ meta = _context22.sent;
822
909
 
823
910
  if (!dict) {
824
- _context23.next = 14;
911
+ _context22.next = 14;
825
912
  break;
826
913
  }
827
914
 
828
- _context23.prev = 6;
829
- return _context23.abrupt("return", bindDict(meta));
915
+ _context22.prev = 6;
916
+ return _context22.abrupt("return", bindDict(meta));
830
917
 
831
918
  case 10:
832
- _context23.prev = 10;
833
- _context23.t0 = _context23["catch"](6);
834
- console.error(_context23.t0);
835
- return _context23.abrupt("return", meta);
919
+ _context22.prev = 10;
920
+ _context22.t0 = _context22["catch"](6);
921
+ console.error(_context22.t0);
922
+ return _context22.abrupt("return", meta);
836
923
 
837
924
  case 14:
838
- return _context23.abrupt("return", meta);
925
+ return _context22.abrupt("return", meta);
839
926
 
840
927
  case 15:
841
928
  case "end":
842
- return _context23.stop();
929
+ return _context22.stop();
843
930
  }
844
- }, _callee23, null, [[6, 10]]);
845
- }))).apply(this, arguments);
846
- };
931
+ }, _callee22, null, [[6, 10]]);
932
+ }));
933
+
934
+ return function getCi(_x20, _x21, _x22) {
935
+ return _ref22.apply(this, arguments);
936
+ };
937
+ }();
847
938
  /**
848
939
  * 编辑ci类型
849
940
  * @param {string} code
@@ -852,24 +943,28 @@ var getCi = function getCi(_x20, _x21, _x22) {
852
943
 
853
944
  exports.getCi = getCi;
854
945
 
855
- var updateCi = function updateCi(_x23) {
856
- return (_ref23 = _ref23 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee24(data) {
857
- return _regenerator["default"].wrap(function _callee24$(_context24) {
858
- while (1) switch (_context24.prev = _context24.next) {
946
+ var updateCi = /*#__PURE__*/function () {
947
+ var _ref23 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee23(data) {
948
+ return _regenerator["default"].wrap(function _callee23$(_context23) {
949
+ while (1) switch (_context23.prev = _context23.next) {
859
950
  case 0:
860
- _context24.next = 2;
951
+ _context23.next = 2;
861
952
  return _componentTopologyUtils.request.post('/model/v1/api/updateCi', data);
862
953
 
863
954
  case 2:
864
- return _context24.abrupt("return", _context24.sent);
955
+ return _context23.abrupt("return", _context23.sent);
865
956
 
866
957
  case 3:
867
958
  case "end":
868
- return _context24.stop();
959
+ return _context23.stop();
869
960
  }
870
- }, _callee24);
871
- }))).apply(this, arguments);
872
- };
961
+ }, _callee23);
962
+ }));
963
+
964
+ return function updateCi(_x23) {
965
+ return _ref23.apply(this, arguments);
966
+ };
967
+ }();
873
968
  /**
874
969
  * 创建ci类型
875
970
  * @param {object} data
@@ -903,24 +998,28 @@ var updateCi = function updateCi(_x23) {
903
998
 
904
999
  exports.updateCi = updateCi;
905
1000
 
906
- var createCi = function createCi(_x24) {
907
- return (_ref24 = _ref24 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee25(data) {
908
- return _regenerator["default"].wrap(function _callee25$(_context25) {
909
- while (1) switch (_context25.prev = _context25.next) {
1001
+ var createCi = /*#__PURE__*/function () {
1002
+ var _ref24 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee24(data) {
1003
+ return _regenerator["default"].wrap(function _callee24$(_context24) {
1004
+ while (1) switch (_context24.prev = _context24.next) {
910
1005
  case 0:
911
- _context25.next = 2;
1006
+ _context24.next = 2;
912
1007
  return _componentTopologyUtils.request.post('/model/v1/api/createCi', data);
913
1008
 
914
1009
  case 2:
915
- return _context25.abrupt("return", _context25.sent);
1010
+ return _context24.abrupt("return", _context24.sent);
916
1011
 
917
1012
  case 3:
918
1013
  case "end":
919
- return _context25.stop();
1014
+ return _context24.stop();
920
1015
  }
921
- }, _callee25);
922
- }))).apply(this, arguments);
923
- };
1016
+ }, _callee24);
1017
+ }));
1018
+
1019
+ return function createCi(_x24) {
1020
+ return _ref24.apply(this, arguments);
1021
+ };
1022
+ }();
924
1023
  /**
925
1024
  * 删除ci类型
926
1025
  * @param {Object} param
@@ -929,24 +1028,28 @@ var createCi = function createCi(_x24) {
929
1028
 
930
1029
  exports.createCi = createCi;
931
1030
 
932
- var deleteCi = function deleteCi(_x25) {
933
- return (_ref25 = _ref25 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee26(param) {
934
- return _regenerator["default"].wrap(function _callee26$(_context26) {
935
- while (1) switch (_context26.prev = _context26.next) {
1031
+ var deleteCi = /*#__PURE__*/function () {
1032
+ var _ref25 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee25(param) {
1033
+ return _regenerator["default"].wrap(function _callee25$(_context25) {
1034
+ while (1) switch (_context25.prev = _context25.next) {
936
1035
  case 0:
937
- _context26.next = 2;
1036
+ _context25.next = 2;
938
1037
  return _componentTopologyUtils.request.post('/model/v1/api/deleteCi', param);
939
1038
 
940
1039
  case 2:
941
- return _context26.abrupt("return", _context26.sent);
1040
+ return _context25.abrupt("return", _context25.sent);
942
1041
 
943
1042
  case 3:
944
1043
  case "end":
945
- return _context26.stop();
1044
+ return _context25.stop();
946
1045
  }
947
- }, _callee26);
948
- }))).apply(this, arguments);
949
- };
1046
+ }, _callee25);
1047
+ }));
1048
+
1049
+ return function deleteCi(_x25) {
1050
+ return _ref25.apply(this, arguments);
1051
+ };
1052
+ }();
950
1053
  /**
951
1054
  * 查询所有 CI 类型
952
1055
  * @param {object} params
@@ -955,24 +1058,28 @@ var deleteCi = function deleteCi(_x25) {
955
1058
 
956
1059
  exports.deleteCi = deleteCi;
957
1060
 
958
- var getAllCi = function getAllCi(_x26) {
959
- return (_ref26 = _ref26 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee27(params) {
960
- return _regenerator["default"].wrap(function _callee27$(_context27) {
961
- while (1) switch (_context27.prev = _context27.next) {
1061
+ var getAllCi = /*#__PURE__*/function () {
1062
+ var _ref26 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee26(params) {
1063
+ return _regenerator["default"].wrap(function _callee26$(_context26) {
1064
+ while (1) switch (_context26.prev = _context26.next) {
962
1065
  case 0:
963
- _context27.next = 2;
1066
+ _context26.next = 2;
964
1067
  return _componentTopologyUtils.request.post('/model/v1/api/getAllCi', params);
965
1068
 
966
1069
  case 2:
967
- return _context27.abrupt("return", _context27.sent);
1070
+ return _context26.abrupt("return", _context26.sent);
968
1071
 
969
1072
  case 3:
970
1073
  case "end":
971
- return _context27.stop();
1074
+ return _context26.stop();
972
1075
  }
973
- }, _callee27);
974
- }))).apply(this, arguments);
975
- };
1076
+ }, _callee26);
1077
+ }));
1078
+
1079
+ return function getAllCi(_x26) {
1080
+ return _ref26.apply(this, arguments);
1081
+ };
1082
+ }();
976
1083
  /**
977
1084
  * 获取类型元数据
978
1085
  * @param {string} code
@@ -982,57 +1089,67 @@ var getAllCi = function getAllCi(_x26) {
982
1089
  exports.getAllCi = getAllCi;
983
1090
 
984
1091
  function getCiMeta(_x27) {
985
- return (_getCiMeta = _getCiMeta || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee28(code) {
986
- return _regenerator["default"].wrap(function _callee28$(_context28) {
987
- while (1) switch (_context28.prev = _context28.next) {
1092
+ return _getCiMeta.apply(this, arguments);
1093
+ }
1094
+ /**
1095
+ * 格式化ci类型元数据
1096
+ * @param {string} code
1097
+ * @param {boolean} userVisibleFilter
1098
+ */
1099
+
1100
+
1101
+ function _getCiMeta() {
1102
+ _getCiMeta = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee30(code) {
1103
+ return _regenerator["default"].wrap(function _callee30$(_context30) {
1104
+ while (1) switch (_context30.prev = _context30.next) {
988
1105
  case 0:
989
- _context28.next = 2;
1106
+ _context30.next = 2;
990
1107
  return _componentTopologyUtils.request.get("/mdc/v1/api/model-asset/" + code);
991
1108
 
992
1109
  case 2:
993
- return _context28.abrupt("return", _context28.sent);
1110
+ return _context30.abrupt("return", _context30.sent);
994
1111
 
995
1112
  case 3:
996
1113
  case "end":
997
- return _context28.stop();
1114
+ return _context30.stop();
998
1115
  }
999
- }, _callee28);
1000
- }))).apply(this, arguments);
1116
+ }, _callee30);
1117
+ }));
1118
+ return _getCiMeta.apply(this, arguments);
1001
1119
  }
1002
- /**
1003
- * 格式化ci类型元数据
1004
- * @param {string} code
1005
- * @param {boolean} userVisibleFilter
1006
- */
1007
-
1008
1120
 
1009
1121
  function formatCiAttributes(_x28, _x29) {
1010
- return (_formatCiAttributes = _formatCiAttributes || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee29(code, userVisibleFilter) {
1122
+ return _formatCiAttributes.apply(this, arguments);
1123
+ } // 属性为用户字典
1124
+
1125
+
1126
+ function _formatCiAttributes() {
1127
+ _formatCiAttributes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee31(code, userVisibleFilter) {
1011
1128
  var meta, attributes;
1012
- return _regenerator["default"].wrap(function _callee29$(_context29) {
1013
- while (1) switch (_context29.prev = _context29.next) {
1129
+ return _regenerator["default"].wrap(function _callee31$(_context31) {
1130
+ while (1) switch (_context31.prev = _context31.next) {
1014
1131
  case 0:
1015
- _context29.next = 2;
1132
+ _context31.next = 2;
1016
1133
  return _componentTopologyUtils.request.post('/model/v1/api/getCi', {
1017
1134
  code: code
1018
1135
  });
1019
1136
 
1020
1137
  case 2:
1021
- meta = _context29.sent;
1138
+ meta = _context31.sent;
1022
1139
 
1023
1140
  if (!meta) {
1024
- _context29.next = 9;
1141
+ _context31.next = 9;
1025
1142
  break;
1026
1143
  }
1027
1144
 
1028
1145
  attributes = meta.attributes;
1029
1146
 
1030
1147
  if (attributes) {
1031
- _context29.next = 7;
1148
+ _context31.next = 7;
1032
1149
  break;
1033
1150
  }
1034
1151
 
1035
- return _context29.abrupt("return", meta);
1152
+ return _context31.abrupt("return", meta);
1036
1153
 
1037
1154
  case 7:
1038
1155
  try {
@@ -1048,19 +1165,19 @@ function formatCiAttributes(_x28, _x29) {
1048
1165
  _rlog["default"].error('services=>model=>:', error);
1049
1166
  }
1050
1167
 
1051
- return _context29.abrupt("return", meta);
1168
+ return _context31.abrupt("return", meta);
1052
1169
 
1053
1170
  case 9:
1054
- return _context29.abrupt("return", meta);
1171
+ return _context31.abrupt("return", meta);
1055
1172
 
1056
1173
  case 10:
1057
1174
  case "end":
1058
- return _context29.stop();
1175
+ return _context31.stop();
1059
1176
  }
1060
- }, _callee29);
1061
- }))).apply(this, arguments);
1062
- } // 属性为用户字典
1063
-
1177
+ }, _callee31);
1178
+ }));
1179
+ return _formatCiAttributes.apply(this, arguments);
1180
+ }
1064
1181
 
1065
1182
  var ATTRIBUTE_USER_DICT = 'userDict';
1066
1183
  /**
@@ -1092,74 +1209,83 @@ function bindDict(data) {
1092
1209
  }
1093
1210
 
1094
1211
  function queryAllModel(_x30) {
1095
- return (_queryAllModel = _queryAllModel || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee30(isAuth) {
1096
- return _regenerator["default"].wrap(function _callee30$(_context30) {
1097
- while (1) switch (_context30.prev = _context30.next) {
1212
+ return _queryAllModel.apply(this, arguments);
1213
+ }
1214
+ /**
1215
+ * 查询知识库分类列表
1216
+ */
1217
+ // export async function queryAllType(isAuth = false) {
1218
+ // if (isAuth){
1219
+ // return await request.post('/knowledge/v1/api/type/list');
1220
+ // }
1221
+ // return await request.post('/type/list');
1222
+ // }
1223
+
1224
+ /** *
1225
+ * 批量查询ci属性
1226
+ */
1227
+
1228
+
1229
+ function _queryAllModel() {
1230
+ _queryAllModel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee32(isAuth) {
1231
+ return _regenerator["default"].wrap(function _callee32$(_context32) {
1232
+ while (1) switch (_context32.prev = _context32.next) {
1098
1233
  case 0:
1099
1234
  if (isAuth === void 0) {
1100
1235
  isAuth = false;
1101
1236
  }
1102
1237
 
1103
1238
  if (!isAuth) {
1104
- _context30.next = 5;
1239
+ _context32.next = 5;
1105
1240
  break;
1106
1241
  }
1107
1242
 
1108
- _context30.next = 4;
1243
+ _context32.next = 4;
1109
1244
  return _componentTopologyUtils.request.post('/model/v1/api/authority/modelTree');
1110
1245
 
1111
1246
  case 4:
1112
- return _context30.abrupt("return", _context30.sent);
1247
+ return _context32.abrupt("return", _context32.sent);
1113
1248
 
1114
1249
  case 5:
1115
- _context30.next = 7;
1250
+ _context32.next = 7;
1116
1251
  return _componentTopologyUtils.request.get('/mdc/v1/api/model-asset/tree');
1117
1252
 
1118
1253
  case 7:
1119
- return _context30.abrupt("return", _context30.sent);
1254
+ return _context32.abrupt("return", _context32.sent);
1120
1255
 
1121
1256
  case 8:
1122
1257
  case "end":
1123
- return _context30.stop();
1258
+ return _context32.stop();
1124
1259
  }
1125
- }, _callee30);
1126
- }))).apply(this, arguments);
1260
+ }, _callee32);
1261
+ }));
1262
+ return _queryAllModel.apply(this, arguments);
1127
1263
  }
1128
- /**
1129
- * 查询知识库分类列表
1130
- */
1131
- // export async function queryAllType(isAuth = false) {
1132
- // if (isAuth){
1133
- // return await request.post('/knowledge/v1/api/type/list');
1134
- // }
1135
- // return await request.post('/type/list');
1136
- // }
1137
1264
 
1138
- /** *
1139
- * 批量查询ci属性
1140
- */
1141
-
1142
-
1143
- var getBatchCi = function getBatchCi(_x31) {
1144
- return (_ref27 = _ref27 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee31(typeCodes) {
1145
- return _regenerator["default"].wrap(function _callee31$(_context31) {
1146
- while (1) switch (_context31.prev = _context31.next) {
1265
+ var getBatchCi = /*#__PURE__*/function () {
1266
+ var _ref27 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee27(typeCodes) {
1267
+ return _regenerator["default"].wrap(function _callee27$(_context27) {
1268
+ while (1) switch (_context27.prev = _context27.next) {
1147
1269
  case 0:
1148
- _context31.next = 2;
1270
+ _context27.next = 2;
1149
1271
  return _componentTopologyUtils.request.post('/model/v1/api/getBatchCi', {
1150
1272
  typeCodes: typeCodes
1151
1273
  });
1152
1274
 
1153
1275
  case 2:
1154
- return _context31.abrupt("return", _context31.sent);
1276
+ return _context27.abrupt("return", _context27.sent);
1155
1277
 
1156
1278
  case 3:
1157
1279
  case "end":
1158
- return _context31.stop();
1280
+ return _context27.stop();
1159
1281
  }
1160
- }, _callee31);
1161
- }))).apply(this, arguments);
1162
- };
1282
+ }, _callee27);
1283
+ }));
1284
+
1285
+ return function getBatchCi(_x31) {
1286
+ return _ref27.apply(this, arguments);
1287
+ };
1288
+ }();
1163
1289
  /** *
1164
1290
  * 批量查询ci属性
1165
1291
  */
@@ -1167,26 +1293,30 @@ var getBatchCi = function getBatchCi(_x31) {
1167
1293
 
1168
1294
  exports.getBatchCi = getBatchCi;
1169
1295
 
1170
- var getBatchCiMetric = function getBatchCiMetric(_x32) {
1171
- return (_ref28 = _ref28 || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee32(typeCodes) {
1172
- return _regenerator["default"].wrap(function _callee32$(_context32) {
1173
- while (1) switch (_context32.prev = _context32.next) {
1296
+ var getBatchCiMetric = /*#__PURE__*/function () {
1297
+ var _ref28 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee28(typeCodes) {
1298
+ return _regenerator["default"].wrap(function _callee28$(_context28) {
1299
+ while (1) switch (_context28.prev = _context28.next) {
1174
1300
  case 0:
1175
- _context32.next = 2;
1301
+ _context28.next = 2;
1176
1302
  return _componentTopologyUtils.request.post('/model/v1/api/getBatchCiMetric', {
1177
1303
  typeCodes: typeCodes
1178
1304
  });
1179
1305
 
1180
1306
  case 2:
1181
- return _context32.abrupt("return", _context32.sent);
1307
+ return _context28.abrupt("return", _context28.sent);
1182
1308
 
1183
1309
  case 3:
1184
1310
  case "end":
1185
- return _context32.stop();
1311
+ return _context28.stop();
1186
1312
  }
1187
- }, _callee32);
1188
- }))).apply(this, arguments);
1189
- };
1313
+ }, _callee28);
1314
+ }));
1315
+
1316
+ return function getBatchCiMetric(_x32) {
1317
+ return _ref28.apply(this, arguments);
1318
+ };
1319
+ }();
1190
1320
  /** ************************************** ci类型 end ************************************ */
1191
1321
 
1192
1322