@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
@@ -1,8 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
-
4
- 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;
5
-
6
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
4
  import { request } from '@riil-frontend/component-topology-utils';
8
5
  import { isNull } from '@riil-frontend/utils';
@@ -13,8 +10,8 @@ import { modelDictList } from "./mdc";
13
10
  * 查询 CI 组件信息(又实例的)
14
11
  */
15
12
 
16
- export var getCommonCount = function getCommonCount(_x) {
17
- return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
13
+ export var getCommonCount = /*#__PURE__*/function () {
14
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
18
15
  return _regeneratorRuntime.wrap(function _callee$(_context) {
19
16
  while (1) switch (_context.prev = _context.next) {
20
17
  case 0:
@@ -32,14 +29,18 @@ export var getCommonCount = function getCommonCount(_x) {
32
29
  return _context.stop();
33
30
  }
34
31
  }, _callee);
35
- }))).apply(this, arguments);
36
- };
32
+ }));
33
+
34
+ return function getCommonCount(_x) {
35
+ return _ref.apply(this, arguments);
36
+ };
37
+ }();
37
38
  /**
38
39
  * 查询 CI 组件信息
39
40
  */
40
41
 
41
- export var getComponents = function getComponents(_x2) {
42
- return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(code) {
42
+ export var getComponents = /*#__PURE__*/function () {
43
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(code) {
43
44
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
44
45
  while (1) switch (_context2.prev = _context2.next) {
45
46
  case 0:
@@ -56,14 +57,18 @@ export var getComponents = function getComponents(_x2) {
56
57
  return _context2.stop();
57
58
  }
58
59
  }, _callee2);
59
- }))).apply(this, arguments);
60
- };
60
+ }));
61
+
62
+ return function getComponents(_x2) {
63
+ return _ref2.apply(this, arguments);
64
+ };
65
+ }();
61
66
  /**
62
67
  * 查询关系类型定义
63
68
  */
64
69
 
65
- export var getAllRelationType = function getAllRelationType() {
66
- return (_ref3 = _ref3 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
70
+ export var getAllRelationType = /*#__PURE__*/function () {
71
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
67
72
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
68
73
  while (1) switch (_context3.prev = _context3.next) {
69
74
  case 0:
@@ -78,15 +83,19 @@ export var getAllRelationType = function getAllRelationType() {
78
83
  return _context3.stop();
79
84
  }
80
85
  }, _callee3);
81
- }))).apply(this, arguments);
82
- };
86
+ }));
87
+
88
+ return function getAllRelationType() {
89
+ return _ref3.apply(this, arguments);
90
+ };
91
+ }();
83
92
  /**
84
93
  * ci类型树(包含组件)
85
94
  * @param {string} moduleName 标识模块名
86
95
  */
87
96
 
88
- export var getCiTypes = function getCiTypes(_x3) {
89
- return (_ref4 = _ref4 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(moduleName) {
97
+ export var getCiTypes = /*#__PURE__*/function () {
98
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(moduleName) {
90
99
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
91
100
  while (1) switch (_context4.prev = _context4.next) {
92
101
  case 0:
@@ -103,14 +112,18 @@ export var getCiTypes = function getCiTypes(_x3) {
103
112
  return _context4.stop();
104
113
  }
105
114
  }, _callee4);
106
- }))).apply(this, arguments);
107
- };
115
+ }));
116
+
117
+ return function getCiTypes(_x3) {
118
+ return _ref4.apply(this, arguments);
119
+ };
120
+ }();
108
121
  /**
109
122
  * 模型树拖动接口,用于节点拖拽
110
123
  */
111
124
 
112
- export var dragTree = function dragTree(_x4) {
113
- return (_ref5 = _ref5 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(param) {
125
+ export var dragTree = /*#__PURE__*/function () {
126
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(param) {
114
127
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
115
128
  while (1) switch (_context5.prev = _context5.next) {
116
129
  case 0:
@@ -125,14 +138,18 @@ export var dragTree = function dragTree(_x4) {
125
138
  return _context5.stop();
126
139
  }
127
140
  }, _callee5);
128
- }))).apply(this, arguments);
129
- };
141
+ }));
142
+
143
+ return function dragTree(_x4) {
144
+ return _ref5.apply(this, arguments);
145
+ };
146
+ }();
130
147
  /**
131
148
  * 模型改造树
132
149
  */
133
150
 
134
- export var getModelTree = function getModelTree() {
135
- return (_ref6 = _ref6 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
151
+ export var getModelTree = /*#__PURE__*/function () {
152
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
136
153
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
137
154
  while (1) switch (_context6.prev = _context6.next) {
138
155
  case 0:
@@ -147,8 +164,12 @@ export var getModelTree = function getModelTree() {
147
164
  return _context6.stop();
148
165
  }
149
166
  }, _callee6);
150
- }))).apply(this, arguments);
151
- };
167
+ }));
168
+
169
+ return function getModelTree() {
170
+ return _ref6.apply(this, arguments);
171
+ };
172
+ }();
152
173
  /**
153
174
  * 验证CI名称
154
175
  * @param {Object} param - 验证值对象.
@@ -161,8 +182,8 @@ export var getModelTree = function getModelTree() {
161
182
  * @param {string} employee.data - 被验证的值. eg:{"name":"未命名类型-1"}
162
183
  */
163
184
 
164
- export var verify = function verify(_x5) {
165
- return (_ref7 = _ref7 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(param) {
185
+ export var verify = /*#__PURE__*/function () {
186
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(param) {
166
187
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
167
188
  while (1) switch (_context7.prev = _context7.next) {
168
189
  case 0:
@@ -177,14 +198,18 @@ export var verify = function verify(_x5) {
177
198
  return _context7.stop();
178
199
  }
179
200
  }, _callee7);
180
- }))).apply(this, arguments);
181
- };
201
+ }));
202
+
203
+ return function verify(_x5) {
204
+ return _ref7.apply(this, arguments);
205
+ };
206
+ }();
182
207
  /**
183
208
  * 获得CI指标
184
209
  */
185
210
 
186
- export var getCiMetric = function getCiMetric(_x6) {
187
- return (_ref8 = _ref8 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(ciCode) {
211
+ export var getCiMetric = /*#__PURE__*/function () {
212
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(ciCode) {
188
213
  return _regeneratorRuntime.wrap(function _callee8$(_context8) {
189
214
  while (1) switch (_context8.prev = _context8.next) {
190
215
  case 0:
@@ -201,15 +226,19 @@ export var getCiMetric = function getCiMetric(_x6) {
201
226
  return _context8.stop();
202
227
  }
203
228
  }, _callee8);
204
- }))).apply(this, arguments);
205
- };
229
+ }));
230
+
231
+ return function getCiMetric(_x6) {
232
+ return _ref8.apply(this, arguments);
233
+ };
234
+ }();
206
235
  /**
207
236
  * 所有领域
208
237
  * @returns {array} 对象数组
209
238
  */
210
239
 
211
- export var getDomains = function getDomains() {
212
- return (_ref9 = _ref9 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
240
+ export var getDomains = /*#__PURE__*/function () {
241
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
213
242
  return _regeneratorRuntime.wrap(function _callee9$(_context9) {
214
243
  while (1) switch (_context9.prev = _context9.next) {
215
244
  case 0:
@@ -224,8 +253,12 @@ export var getDomains = function getDomains() {
224
253
  return _context9.stop();
225
254
  }
226
255
  }, _callee9);
227
- }))).apply(this, arguments);
228
- };
256
+ }));
257
+
258
+ return function getDomains() {
259
+ return _ref9.apply(this, arguments);
260
+ };
261
+ }();
229
262
  /** ************************************** 关系定义 start ************************************ */
230
263
 
231
264
  /**
@@ -234,8 +267,8 @@ export var getDomains = function getDomains() {
234
267
  * @returns {object}
235
268
  */
236
269
 
237
- export var getRelation = function getRelation(_x7) {
238
- return (_ref10 = _ref10 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(params) {
270
+ export var getRelation = /*#__PURE__*/function () {
271
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(params) {
239
272
  return _regeneratorRuntime.wrap(function _callee10$(_context10) {
240
273
  while (1) switch (_context10.prev = _context10.next) {
241
274
  case 0:
@@ -250,15 +283,19 @@ export var getRelation = function getRelation(_x7) {
250
283
  return _context10.stop();
251
284
  }
252
285
  }, _callee10);
253
- }))).apply(this, arguments);
254
- };
286
+ }));
287
+
288
+ return function getRelation(_x7) {
289
+ return _ref10.apply(this, arguments);
290
+ };
291
+ }();
255
292
  /**
256
293
  * 创建关系
257
294
  * @param {object} params
258
295
  */
259
296
 
260
- export var createRelation = function createRelation(_x8) {
261
- return (_ref11 = _ref11 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(params) {
297
+ export var createRelation = /*#__PURE__*/function () {
298
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(params) {
262
299
  return _regeneratorRuntime.wrap(function _callee11$(_context11) {
263
300
  while (1) switch (_context11.prev = _context11.next) {
264
301
  case 0:
@@ -273,15 +310,19 @@ export var createRelation = function createRelation(_x8) {
273
310
  return _context11.stop();
274
311
  }
275
312
  }, _callee11);
276
- }))).apply(this, arguments);
277
- };
313
+ }));
314
+
315
+ return function createRelation(_x8) {
316
+ return _ref11.apply(this, arguments);
317
+ };
318
+ }();
278
319
  /**
279
320
  * 编辑关系
280
321
  * @param {object} params
281
322
  */
282
323
 
283
- export var updateRelation = function updateRelation(_x9) {
284
- return (_ref12 = _ref12 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(params) {
324
+ export var updateRelation = /*#__PURE__*/function () {
325
+ var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(params) {
285
326
  return _regeneratorRuntime.wrap(function _callee12$(_context12) {
286
327
  while (1) switch (_context12.prev = _context12.next) {
287
328
  case 0:
@@ -296,8 +337,12 @@ export var updateRelation = function updateRelation(_x9) {
296
337
  return _context12.stop();
297
338
  }
298
339
  }, _callee12);
299
- }))).apply(this, arguments);
300
- };
340
+ }));
341
+
342
+ return function updateRelation(_x9) {
343
+ return _ref12.apply(this, arguments);
344
+ };
345
+ }();
301
346
  /**
302
347
  * 删除关系定义
303
348
  * @param {object} params {
@@ -317,8 +362,8 @@ export var updateRelation = function updateRelation(_x9) {
317
362
  }
318
363
  */
319
364
 
320
- export var deleteRelation = function deleteRelation(_x10) {
321
- return (_ref13 = _ref13 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(params) {
365
+ export var deleteRelation = /*#__PURE__*/function () {
366
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(params) {
322
367
  return _regeneratorRuntime.wrap(function _callee13$(_context13) {
323
368
  while (1) switch (_context13.prev = _context13.next) {
324
369
  case 0:
@@ -333,8 +378,12 @@ export var deleteRelation = function deleteRelation(_x10) {
333
378
  return _context13.stop();
334
379
  }
335
380
  }, _callee13);
336
- }))).apply(this, arguments);
337
- };
381
+ }));
382
+
383
+ return function deleteRelation(_x10) {
384
+ return _ref13.apply(this, arguments);
385
+ };
386
+ }();
338
387
  /** ************************************** 关系定义 end************************************ */
339
388
 
340
389
  /** ************************************** 数据字典 start ********************************** */
@@ -375,8 +424,8 @@ export var deleteRelation = function deleteRelation(_x10) {
375
424
  ...]
376
425
  */
377
426
 
378
- export var getCiAttributeDict = function getCiAttributeDict(_x11) {
379
- return (_ref14 = _ref14 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(param) {
427
+ export var getCiAttributeDict = /*#__PURE__*/function () {
428
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(param) {
380
429
  return _regeneratorRuntime.wrap(function _callee14$(_context14) {
381
430
  while (1) switch (_context14.prev = _context14.next) {
382
431
  case 0:
@@ -391,8 +440,12 @@ export var getCiAttributeDict = function getCiAttributeDict(_x11) {
391
440
  return _context14.stop();
392
441
  }
393
442
  }, _callee14);
394
- }))).apply(this, arguments);
395
- };
443
+ }));
444
+
445
+ return function getCiAttributeDict(_x11) {
446
+ return _ref14.apply(this, arguments);
447
+ };
448
+ }();
396
449
  /**
397
450
  * 获取用户自建的属性(数据字典)
398
451
  * @param {Array} codes ci类型code集合
@@ -400,30 +453,7 @@ export var getCiAttributeDict = function getCiAttributeDict(_x11) {
400
453
  */
401
454
 
402
455
  export function getUserDicts(_x12) {
403
- return (_getUserDicts = _getUserDicts || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(codes) {
404
- var dicts, userDict;
405
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
406
- while (1) switch (_context15.prev = _context15.next) {
407
- case 0:
408
- _context15.next = 2;
409
- return getCiAttributeDict({
410
- ciCode: codes
411
- });
412
-
413
- case 2:
414
- dicts = _context15.sent;
415
- userDict = dicts.reduce(function (map, obj) {
416
- map[obj.attributeCode] = obj.dict.items;
417
- return map;
418
- }, {});
419
- return _context15.abrupt("return", userDict);
420
-
421
- case 5:
422
- case "end":
423
- return _context15.stop();
424
- }
425
- }, _callee15);
426
- }))).apply(this, arguments);
456
+ return _getUserDicts.apply(this, arguments);
427
457
  }
428
458
  /**
429
459
  * 查询单个数据字典
@@ -449,26 +479,58 @@ export function getUserDicts(_x12) {
449
479
  * }
450
480
  */
451
481
 
452
- export var queryDict = function queryDict(_x13) {
453
- return (_ref15 = _ref15 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(code) {
454
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
455
- while (1) switch (_context16.prev = _context16.next) {
482
+ function _getUserDicts() {
483
+ _getUserDicts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(codes) {
484
+ var dicts, userDict;
485
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
486
+ while (1) switch (_context29.prev = _context29.next) {
456
487
  case 0:
457
- _context16.next = 2;
488
+ _context29.next = 2;
489
+ return getCiAttributeDict({
490
+ ciCode: codes
491
+ });
492
+
493
+ case 2:
494
+ dicts = _context29.sent;
495
+ userDict = dicts.reduce(function (map, obj) {
496
+ map[obj.attributeCode] = obj.dict.items;
497
+ return map;
498
+ }, {});
499
+ return _context29.abrupt("return", userDict);
500
+
501
+ case 5:
502
+ case "end":
503
+ return _context29.stop();
504
+ }
505
+ }, _callee29);
506
+ }));
507
+ return _getUserDicts.apply(this, arguments);
508
+ }
509
+
510
+ export var queryDict = /*#__PURE__*/function () {
511
+ var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(code) {
512
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
513
+ while (1) switch (_context15.prev = _context15.next) {
514
+ case 0:
515
+ _context15.next = 2;
458
516
  return request.post('/model/v1/api/getDict', {
459
517
  code: code
460
518
  });
461
519
 
462
520
  case 2:
463
- return _context16.abrupt("return", _context16.sent);
521
+ return _context15.abrupt("return", _context15.sent);
464
522
 
465
523
  case 3:
466
524
  case "end":
467
- return _context16.stop();
525
+ return _context15.stop();
468
526
  }
469
- }, _callee16);
470
- }))).apply(this, arguments);
471
- };
527
+ }, _callee15);
528
+ }));
529
+
530
+ return function queryDict(_x13) {
531
+ return _ref15.apply(this, arguments);
532
+ };
533
+ }();
472
534
  /**
473
535
  * 查询厂商
474
536
  * TODO:由于当前后端只有一个单查厂商的接口,暂使用promise.all形式查询多个
@@ -477,12 +539,12 @@ export var queryDict = function queryDict(_x13) {
477
539
  * @param {*} vendorKeys 厂商key数组,如['ruijie']
478
540
  */
479
541
 
480
- export var queryVendors = function queryVendors(_x14) {
481
- return (_ref16 = _ref16 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(vendorKeys) {
482
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
483
- while (1) switch (_context17.prev = _context17.next) {
542
+ export var queryVendors = /*#__PURE__*/function () {
543
+ var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(vendorKeys) {
544
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
545
+ while (1) switch (_context16.prev = _context16.next) {
484
546
  case 0:
485
- _context17.next = 2;
547
+ _context16.next = 2;
486
548
  return Promise.all(vendorKeys.map(function (vendor) {
487
549
  return request.post('/model/v1/api/getDict', {
488
550
  vendor: vendor
@@ -490,15 +552,19 @@ export var queryVendors = function queryVendors(_x14) {
490
552
  }));
491
553
 
492
554
  case 2:
493
- return _context17.abrupt("return", _context17.sent);
555
+ return _context16.abrupt("return", _context16.sent);
494
556
 
495
557
  case 3:
496
558
  case "end":
497
- return _context17.stop();
559
+ return _context16.stop();
498
560
  }
499
- }, _callee17);
500
- }))).apply(this, arguments);
501
- };
561
+ }, _callee16);
562
+ }));
563
+
564
+ return function queryVendors(_x14) {
565
+ return _ref16.apply(this, arguments);
566
+ };
567
+ }();
502
568
  /**
503
569
  * 查询全部数据字典
504
570
  * @param {string} source 查询全量:source=null,查询内建:source=system,查询自建: source=custom
@@ -528,28 +594,32 @@ export var queryVendors = function queryVendors(_x14) {
528
594
  * ]
529
595
  */
530
596
 
531
- export var queryDicts = function queryDicts(_x15) {
532
- return (_ref17 = _ref17 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(source) {
533
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
534
- while (1) switch (_context18.prev = _context18.next) {
597
+ export var queryDicts = /*#__PURE__*/function () {
598
+ var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(source) {
599
+ return _regeneratorRuntime.wrap(function _callee17$(_context17) {
600
+ while (1) switch (_context17.prev = _context17.next) {
535
601
  case 0:
536
602
  if (source === void 0) {
537
603
  source = null;
538
604
  }
539
605
 
540
- _context18.next = 3;
606
+ _context17.next = 3;
541
607
  return modelDictList();
542
608
 
543
609
  case 3:
544
- return _context18.abrupt("return", _context18.sent);
610
+ return _context17.abrupt("return", _context17.sent);
545
611
 
546
612
  case 4:
547
613
  case "end":
548
- return _context18.stop();
614
+ return _context17.stop();
549
615
  }
550
- }, _callee18);
551
- }))).apply(this, arguments);
552
- };
616
+ }, _callee17);
617
+ }));
618
+
619
+ return function queryDicts(_x15) {
620
+ return _ref17.apply(this, arguments);
621
+ };
622
+ }();
553
623
  /**
554
624
  * 新建数据字典
555
625
  * @param {object} param
@@ -582,24 +652,28 @@ export var queryDicts = function queryDicts(_x15) {
582
652
  * }
583
653
  */
584
654
 
585
- export var createDict = function createDict(_x16) {
586
- return (_ref18 = _ref18 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(param) {
587
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
588
- while (1) switch (_context19.prev = _context19.next) {
655
+ export var createDict = /*#__PURE__*/function () {
656
+ var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(param) {
657
+ return _regeneratorRuntime.wrap(function _callee18$(_context18) {
658
+ while (1) switch (_context18.prev = _context18.next) {
589
659
  case 0:
590
- _context19.next = 2;
660
+ _context18.next = 2;
591
661
  return request.post('/model/v1/api/createDict', param);
592
662
 
593
663
  case 2:
594
- return _context19.abrupt("return", _context19.sent);
664
+ return _context18.abrupt("return", _context18.sent);
595
665
 
596
666
  case 3:
597
667
  case "end":
598
- return _context19.stop();
668
+ return _context18.stop();
599
669
  }
600
- }, _callee19);
601
- }))).apply(this, arguments);
602
- };
670
+ }, _callee18);
671
+ }));
672
+
673
+ return function createDict(_x16) {
674
+ return _ref18.apply(this, arguments);
675
+ };
676
+ }();
603
677
  /**
604
678
  * 编辑数据字典
605
679
  * @param {object} param
@@ -625,24 +699,28 @@ export var createDict = function createDict(_x16) {
625
699
  * "dict/000000000051dd09"
626
700
  */
627
701
 
628
- export var updateDict = function updateDict(_x17) {
629
- return (_ref19 = _ref19 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(param) {
630
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
631
- while (1) switch (_context20.prev = _context20.next) {
702
+ export var updateDict = /*#__PURE__*/function () {
703
+ var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(param) {
704
+ return _regeneratorRuntime.wrap(function _callee19$(_context19) {
705
+ while (1) switch (_context19.prev = _context19.next) {
632
706
  case 0:
633
- _context20.next = 2;
707
+ _context19.next = 2;
634
708
  return request.post('/model/v1/api/updateDict', param);
635
709
 
636
710
  case 2:
637
- return _context20.abrupt("return", _context20.sent);
711
+ return _context19.abrupt("return", _context19.sent);
638
712
 
639
713
  case 3:
640
714
  case "end":
641
- return _context20.stop();
715
+ return _context19.stop();
642
716
  }
643
- }, _callee20);
644
- }))).apply(this, arguments);
645
- };
717
+ }, _callee19);
718
+ }));
719
+
720
+ return function updateDict(_x17) {
721
+ return _ref19.apply(this, arguments);
722
+ };
723
+ }();
646
724
  /**
647
725
  * 删除数据字典
648
726
  * @param {string} id
@@ -659,26 +737,30 @@ export var updateDict = function updateDict(_x17) {
659
737
  * "000000000051dc4d"
660
738
  */
661
739
 
662
- export var deleteDict = function deleteDict(_x18) {
663
- return (_ref20 = _ref20 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(id) {
664
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
665
- while (1) switch (_context21.prev = _context21.next) {
740
+ export var deleteDict = /*#__PURE__*/function () {
741
+ var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(id) {
742
+ return _regeneratorRuntime.wrap(function _callee20$(_context20) {
743
+ while (1) switch (_context20.prev = _context20.next) {
666
744
  case 0:
667
- _context21.next = 2;
745
+ _context20.next = 2;
668
746
  return request.post('/model/v1/api/deleteDict', {
669
747
  id: id
670
748
  });
671
749
 
672
750
  case 2:
673
- return _context21.abrupt("return", _context21.sent);
751
+ return _context20.abrupt("return", _context20.sent);
674
752
 
675
753
  case 3:
676
754
  case "end":
677
- return _context21.stop();
755
+ return _context20.stop();
678
756
  }
679
- }, _callee21);
680
- }))).apply(this, arguments);
681
- };
757
+ }, _callee20);
758
+ }));
759
+
760
+ return function deleteDict(_x18) {
761
+ return _ref20.apply(this, arguments);
762
+ };
763
+ }();
682
764
  /** ************************************** 数据字典 end ************************************ */
683
765
 
684
766
  /** ************************************** ci类型 start ************************************ */
@@ -692,24 +774,28 @@ export var deleteDict = function deleteDict(_x18) {
692
774
  * @returns
693
775
  */
694
776
 
695
- export var getCiExtends = function getCiExtends(_x19) {
696
- return (_ref21 = _ref21 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(param) {
697
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
698
- while (1) switch (_context22.prev = _context22.next) {
777
+ export var getCiExtends = /*#__PURE__*/function () {
778
+ var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(param) {
779
+ return _regeneratorRuntime.wrap(function _callee21$(_context21) {
780
+ while (1) switch (_context21.prev = _context21.next) {
699
781
  case 0:
700
- _context22.next = 2;
782
+ _context21.next = 2;
701
783
  return request.post('/model/v1/api/getCiExtends', param);
702
784
 
703
785
  case 2:
704
- return _context22.abrupt("return", _context22.sent);
786
+ return _context21.abrupt("return", _context21.sent);
705
787
 
706
788
  case 3:
707
789
  case "end":
708
- return _context22.stop();
790
+ return _context21.stop();
709
791
  }
710
- }, _callee22);
711
- }))).apply(this, arguments);
712
- };
792
+ }, _callee21);
793
+ }));
794
+
795
+ return function getCiExtends(_x19) {
796
+ return _ref21.apply(this, arguments);
797
+ };
798
+ }();
713
799
  /**
714
800
  *
715
801
  * 模型接口-ci元数据
@@ -718,11 +804,11 @@ export var getCiExtends = function getCiExtends(_x19) {
718
804
  * @param {boolean} dict 是否需要绑定数据字典
719
805
  */
720
806
 
721
- export var getCi = function getCi(_x20, _x21, _x22) {
722
- return (_ref22 = _ref22 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(code, userVisibleFilter, dict) {
807
+ export var getCi = /*#__PURE__*/function () {
808
+ var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(code, userVisibleFilter, dict) {
723
809
  var meta;
724
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
725
- while (1) switch (_context23.prev = _context23.next) {
810
+ return _regeneratorRuntime.wrap(function _callee22$(_context22) {
811
+ while (1) switch (_context22.prev = _context22.next) {
726
812
  case 0:
727
813
  if (userVisibleFilter === void 0) {
728
814
  userVisibleFilter = true;
@@ -732,59 +818,67 @@ export var getCi = function getCi(_x20, _x21, _x22) {
732
818
  dict = true;
733
819
  }
734
820
 
735
- _context23.next = 4;
821
+ _context22.next = 4;
736
822
  return formatCiAttributes(code, userVisibleFilter);
737
823
 
738
824
  case 4:
739
- meta = _context23.sent;
825
+ meta = _context22.sent;
740
826
 
741
827
  if (!dict) {
742
- _context23.next = 14;
828
+ _context22.next = 14;
743
829
  break;
744
830
  }
745
831
 
746
- _context23.prev = 6;
747
- return _context23.abrupt("return", bindDict(meta));
832
+ _context22.prev = 6;
833
+ return _context22.abrupt("return", bindDict(meta));
748
834
 
749
835
  case 10:
750
- _context23.prev = 10;
751
- _context23.t0 = _context23["catch"](6);
752
- console.error(_context23.t0);
753
- return _context23.abrupt("return", meta);
836
+ _context22.prev = 10;
837
+ _context22.t0 = _context22["catch"](6);
838
+ console.error(_context22.t0);
839
+ return _context22.abrupt("return", meta);
754
840
 
755
841
  case 14:
756
- return _context23.abrupt("return", meta);
842
+ return _context22.abrupt("return", meta);
757
843
 
758
844
  case 15:
759
845
  case "end":
760
- return _context23.stop();
846
+ return _context22.stop();
761
847
  }
762
- }, _callee23, null, [[6, 10]]);
763
- }))).apply(this, arguments);
764
- };
848
+ }, _callee22, null, [[6, 10]]);
849
+ }));
850
+
851
+ return function getCi(_x20, _x21, _x22) {
852
+ return _ref22.apply(this, arguments);
853
+ };
854
+ }();
765
855
  /**
766
856
  * 编辑ci类型
767
857
  * @param {string} code
768
858
  */
769
859
 
770
- export var updateCi = function updateCi(_x23) {
771
- return (_ref23 = _ref23 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(data) {
772
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
773
- while (1) switch (_context24.prev = _context24.next) {
860
+ export var updateCi = /*#__PURE__*/function () {
861
+ var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(data) {
862
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
863
+ while (1) switch (_context23.prev = _context23.next) {
774
864
  case 0:
775
- _context24.next = 2;
865
+ _context23.next = 2;
776
866
  return request.post('/model/v1/api/updateCi', data);
777
867
 
778
868
  case 2:
779
- return _context24.abrupt("return", _context24.sent);
869
+ return _context23.abrupt("return", _context23.sent);
780
870
 
781
871
  case 3:
782
872
  case "end":
783
- return _context24.stop();
873
+ return _context23.stop();
784
874
  }
785
- }, _callee24);
786
- }))).apply(this, arguments);
787
- };
875
+ }, _callee23);
876
+ }));
877
+
878
+ return function updateCi(_x23) {
879
+ return _ref23.apply(this, arguments);
880
+ };
881
+ }();
788
882
  /**
789
883
  * 创建ci类型
790
884
  * @param {object} data
@@ -815,126 +909,148 @@ export var updateCi = function updateCi(_x23) {
815
909
  * "513b7713-4854-496f-9e4a-a4bf85cb0f63"
816
910
  */
817
911
 
818
- export var createCi = function createCi(_x24) {
819
- return (_ref24 = _ref24 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(data) {
820
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
821
- while (1) switch (_context25.prev = _context25.next) {
912
+ export var createCi = /*#__PURE__*/function () {
913
+ var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(data) {
914
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
915
+ while (1) switch (_context24.prev = _context24.next) {
822
916
  case 0:
823
- _context25.next = 2;
917
+ _context24.next = 2;
824
918
  return request.post('/model/v1/api/createCi', data);
825
919
 
826
920
  case 2:
827
- return _context25.abrupt("return", _context25.sent);
921
+ return _context24.abrupt("return", _context24.sent);
828
922
 
829
923
  case 3:
830
924
  case "end":
831
- return _context25.stop();
925
+ return _context24.stop();
832
926
  }
833
- }, _callee25);
834
- }))).apply(this, arguments);
835
- };
927
+ }, _callee24);
928
+ }));
929
+
930
+ return function createCi(_x24) {
931
+ return _ref24.apply(this, arguments);
932
+ };
933
+ }();
836
934
  /**
837
935
  * 删除ci类型
838
936
  * @param {Object} param
839
937
  */
840
938
 
841
- export var deleteCi = function deleteCi(_x25) {
842
- return (_ref25 = _ref25 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(param) {
843
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
844
- while (1) switch (_context26.prev = _context26.next) {
939
+ export var deleteCi = /*#__PURE__*/function () {
940
+ var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(param) {
941
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
942
+ while (1) switch (_context25.prev = _context25.next) {
845
943
  case 0:
846
- _context26.next = 2;
944
+ _context25.next = 2;
847
945
  return request.post('/model/v1/api/deleteCi', param);
848
946
 
849
947
  case 2:
850
- return _context26.abrupt("return", _context26.sent);
948
+ return _context25.abrupt("return", _context25.sent);
851
949
 
852
950
  case 3:
853
951
  case "end":
854
- return _context26.stop();
952
+ return _context25.stop();
855
953
  }
856
- }, _callee26);
857
- }))).apply(this, arguments);
858
- };
954
+ }, _callee25);
955
+ }));
956
+
957
+ return function deleteCi(_x25) {
958
+ return _ref25.apply(this, arguments);
959
+ };
960
+ }();
859
961
  /**
860
962
  * 查询所有 CI 类型
861
963
  * @param {object} params
862
964
  */
863
965
 
864
- export var getAllCi = function getAllCi(_x26) {
865
- return (_ref26 = _ref26 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(params) {
866
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
867
- while (1) switch (_context27.prev = _context27.next) {
966
+ export var getAllCi = /*#__PURE__*/function () {
967
+ var _ref26 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(params) {
968
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
969
+ while (1) switch (_context26.prev = _context26.next) {
868
970
  case 0:
869
- _context27.next = 2;
971
+ _context26.next = 2;
870
972
  return request.post('/model/v1/api/getAllCi', params);
871
973
 
872
974
  case 2:
873
- return _context27.abrupt("return", _context27.sent);
975
+ return _context26.abrupt("return", _context26.sent);
874
976
 
875
977
  case 3:
876
978
  case "end":
877
- return _context27.stop();
979
+ return _context26.stop();
878
980
  }
879
- }, _callee27);
880
- }))).apply(this, arguments);
881
- };
981
+ }, _callee26);
982
+ }));
983
+
984
+ return function getAllCi(_x26) {
985
+ return _ref26.apply(this, arguments);
986
+ };
987
+ }();
882
988
  /**
883
989
  * 获取类型元数据
884
990
  * @param {string} code
885
991
  */
886
992
 
887
993
  export function getCiMeta(_x27) {
888
- return (_getCiMeta = _getCiMeta || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(code) {
889
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
890
- while (1) switch (_context28.prev = _context28.next) {
994
+ return _getCiMeta.apply(this, arguments);
995
+ }
996
+ /**
997
+ * 格式化ci类型元数据
998
+ * @param {string} code
999
+ * @param {boolean} userVisibleFilter
1000
+ */
1001
+
1002
+ function _getCiMeta() {
1003
+ _getCiMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(code) {
1004
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1005
+ while (1) switch (_context30.prev = _context30.next) {
891
1006
  case 0:
892
- _context28.next = 2;
1007
+ _context30.next = 2;
893
1008
  return request.get("/mdc/v1/api/model-asset/" + code);
894
1009
 
895
1010
  case 2:
896
- return _context28.abrupt("return", _context28.sent);
1011
+ return _context30.abrupt("return", _context30.sent);
897
1012
 
898
1013
  case 3:
899
1014
  case "end":
900
- return _context28.stop();
1015
+ return _context30.stop();
901
1016
  }
902
- }, _callee28);
903
- }))).apply(this, arguments);
1017
+ }, _callee30);
1018
+ }));
1019
+ return _getCiMeta.apply(this, arguments);
904
1020
  }
905
- /**
906
- * 格式化ci类型元数据
907
- * @param {string} code
908
- * @param {boolean} userVisibleFilter
909
- */
910
1021
 
911
1022
  function formatCiAttributes(_x28, _x29) {
912
- return (_formatCiAttributes = _formatCiAttributes || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(code, userVisibleFilter) {
1023
+ return _formatCiAttributes.apply(this, arguments);
1024
+ } // 属性为用户字典
1025
+
1026
+
1027
+ function _formatCiAttributes() {
1028
+ _formatCiAttributes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(code, userVisibleFilter) {
913
1029
  var meta, attributes;
914
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
915
- while (1) switch (_context29.prev = _context29.next) {
1030
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
1031
+ while (1) switch (_context31.prev = _context31.next) {
916
1032
  case 0:
917
- _context29.next = 2;
1033
+ _context31.next = 2;
918
1034
  return request.post('/model/v1/api/getCi', {
919
1035
  code: code
920
1036
  });
921
1037
 
922
1038
  case 2:
923
- meta = _context29.sent;
1039
+ meta = _context31.sent;
924
1040
 
925
1041
  if (!meta) {
926
- _context29.next = 9;
1042
+ _context31.next = 9;
927
1043
  break;
928
1044
  }
929
1045
 
930
1046
  attributes = meta.attributes;
931
1047
 
932
1048
  if (attributes) {
933
- _context29.next = 7;
1049
+ _context31.next = 7;
934
1050
  break;
935
1051
  }
936
1052
 
937
- return _context29.abrupt("return", meta);
1053
+ return _context31.abrupt("return", meta);
938
1054
 
939
1055
  case 7:
940
1056
  try {
@@ -950,19 +1066,19 @@ function formatCiAttributes(_x28, _x29) {
950
1066
  rlog.error('services=>model=>:', error);
951
1067
  }
952
1068
 
953
- return _context29.abrupt("return", meta);
1069
+ return _context31.abrupt("return", meta);
954
1070
 
955
1071
  case 9:
956
- return _context29.abrupt("return", meta);
1072
+ return _context31.abrupt("return", meta);
957
1073
 
958
1074
  case 10:
959
1075
  case "end":
960
- return _context29.stop();
1076
+ return _context31.stop();
961
1077
  }
962
- }, _callee29);
963
- }))).apply(this, arguments);
964
- } // 属性为用户字典
965
-
1078
+ }, _callee31);
1079
+ }));
1080
+ return _formatCiAttributes.apply(this, arguments);
1081
+ }
966
1082
 
967
1083
  var ATTRIBUTE_USER_DICT = 'userDict';
968
1084
  /**
@@ -996,95 +1112,108 @@ function bindDict(data) {
996
1112
  }
997
1113
 
998
1114
  export function queryAllModel(_x30) {
999
- return (_queryAllModel = _queryAllModel || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(isAuth) {
1000
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1001
- while (1) switch (_context30.prev = _context30.next) {
1115
+ return _queryAllModel.apply(this, arguments);
1116
+ }
1117
+ /**
1118
+ * 查询知识库分类列表
1119
+ */
1120
+ // export async function queryAllType(isAuth = false) {
1121
+ // if (isAuth){
1122
+ // return await request.post('/knowledge/v1/api/type/list');
1123
+ // }
1124
+ // return await request.post('/type/list');
1125
+ // }
1126
+
1127
+ /** *
1128
+ * 批量查询ci属性
1129
+ */
1130
+
1131
+ function _queryAllModel() {
1132
+ _queryAllModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(isAuth) {
1133
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1134
+ while (1) switch (_context32.prev = _context32.next) {
1002
1135
  case 0:
1003
1136
  if (isAuth === void 0) {
1004
1137
  isAuth = false;
1005
1138
  }
1006
1139
 
1007
1140
  if (!isAuth) {
1008
- _context30.next = 5;
1141
+ _context32.next = 5;
1009
1142
  break;
1010
1143
  }
1011
1144
 
1012
- _context30.next = 4;
1145
+ _context32.next = 4;
1013
1146
  return request.post('/model/v1/api/authority/modelTree');
1014
1147
 
1015
1148
  case 4:
1016
- return _context30.abrupt("return", _context30.sent);
1149
+ return _context32.abrupt("return", _context32.sent);
1017
1150
 
1018
1151
  case 5:
1019
- _context30.next = 7;
1152
+ _context32.next = 7;
1020
1153
  return request.get('/mdc/v1/api/model-asset/tree');
1021
1154
 
1022
1155
  case 7:
1023
- return _context30.abrupt("return", _context30.sent);
1156
+ return _context32.abrupt("return", _context32.sent);
1024
1157
 
1025
1158
  case 8:
1026
1159
  case "end":
1027
- return _context30.stop();
1160
+ return _context32.stop();
1028
1161
  }
1029
- }, _callee30);
1030
- }))).apply(this, arguments);
1162
+ }, _callee32);
1163
+ }));
1164
+ return _queryAllModel.apply(this, arguments);
1031
1165
  }
1032
- /**
1033
- * 查询知识库分类列表
1034
- */
1035
- // export async function queryAllType(isAuth = false) {
1036
- // if (isAuth){
1037
- // return await request.post('/knowledge/v1/api/type/list');
1038
- // }
1039
- // return await request.post('/type/list');
1040
- // }
1041
1166
 
1042
- /** *
1043
- * 批量查询ci属性
1044
- */
1045
-
1046
- export var getBatchCi = function getBatchCi(_x31) {
1047
- return (_ref27 = _ref27 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(typeCodes) {
1048
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
1049
- while (1) switch (_context31.prev = _context31.next) {
1167
+ export var getBatchCi = /*#__PURE__*/function () {
1168
+ var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(typeCodes) {
1169
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
1170
+ while (1) switch (_context27.prev = _context27.next) {
1050
1171
  case 0:
1051
- _context31.next = 2;
1172
+ _context27.next = 2;
1052
1173
  return request.post('/model/v1/api/getBatchCi', {
1053
1174
  typeCodes: typeCodes
1054
1175
  });
1055
1176
 
1056
1177
  case 2:
1057
- return _context31.abrupt("return", _context31.sent);
1178
+ return _context27.abrupt("return", _context27.sent);
1058
1179
 
1059
1180
  case 3:
1060
1181
  case "end":
1061
- return _context31.stop();
1182
+ return _context27.stop();
1062
1183
  }
1063
- }, _callee31);
1064
- }))).apply(this, arguments);
1065
- };
1184
+ }, _callee27);
1185
+ }));
1186
+
1187
+ return function getBatchCi(_x31) {
1188
+ return _ref27.apply(this, arguments);
1189
+ };
1190
+ }();
1066
1191
  /** *
1067
1192
  * 批量查询ci属性
1068
1193
  */
1069
1194
 
1070
- export var getBatchCiMetric = function getBatchCiMetric(_x32) {
1071
- return (_ref28 = _ref28 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(typeCodes) {
1072
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1073
- while (1) switch (_context32.prev = _context32.next) {
1195
+ export var getBatchCiMetric = /*#__PURE__*/function () {
1196
+ var _ref28 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(typeCodes) {
1197
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1198
+ while (1) switch (_context28.prev = _context28.next) {
1074
1199
  case 0:
1075
- _context32.next = 2;
1200
+ _context28.next = 2;
1076
1201
  return request.post('/model/v1/api/getBatchCiMetric', {
1077
1202
  typeCodes: typeCodes
1078
1203
  });
1079
1204
 
1080
1205
  case 2:
1081
- return _context32.abrupt("return", _context32.sent);
1206
+ return _context28.abrupt("return", _context28.sent);
1082
1207
 
1083
1208
  case 3:
1084
1209
  case "end":
1085
- return _context32.stop();
1210
+ return _context28.stop();
1086
1211
  }
1087
- }, _callee32);
1088
- }))).apply(this, arguments);
1089
- };
1212
+ }, _callee28);
1213
+ }));
1214
+
1215
+ return function getBatchCiMetric(_x32) {
1216
+ return _ref28.apply(this, arguments);
1217
+ };
1218
+ }();
1090
1219
  /** ************************************** ci类型 end ************************************ */