@riil-frontend/component-topology 11.0.33 → 11.0.35

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 (217) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +4 -2
  4. package/build/index.js +52 -45
  5. package/es/components/MultiResourceDrawer/index.js +22 -26
  6. package/es/components/ResourceList/ResourceSelect.js +55 -58
  7. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +30 -34
  8. package/es/components/SingleResourceDrawer/SelectDrawer.js +24 -28
  9. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +29 -33
  10. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
  11. package/es/core/components/titlebar/widgets/TitleWidget.js +5 -3
  12. package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -18
  13. package/es/core/editor/components/BackgroundView/index.js +149 -178
  14. package/es/core/editor/components/BackgroundView/index.module.scss +2 -1
  15. package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +26 -30
  16. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
  17. package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +20 -24
  18. package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +13 -17
  19. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
  20. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
  21. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
  22. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +17 -21
  23. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +27 -31
  24. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
  25. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +16 -20
  26. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +37 -55
  27. package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
  28. package/es/core/editor/hooks/useNewElementTheme.js +2 -2
  29. package/es/core/editor/store/background.js +8 -10
  30. package/es/core/editor/store/topoEdit.js +4 -6
  31. package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
  32. package/es/core/hooks/usePolling.js +130 -142
  33. package/es/core/hooks/useResourceConfig.js +76 -100
  34. package/es/core/hooks/useTopoEdit.js +525 -623
  35. package/es/core/models/Alarm.js +319 -402
  36. package/es/core/models/AttributeMetricDisplay.js +115 -143
  37. package/es/core/models/PluginManager.js +4 -3
  38. package/es/core/models/SelectionModel.js +4 -5
  39. package/es/core/models/TopoApp.js +279 -436
  40. package/es/core/models/TopoGraphView.js +28 -41
  41. package/es/core/models/cache/CiCache.js +34 -39
  42. package/es/core/models/cache/CiTypeCache.js +47 -61
  43. package/es/core/models/cache/DictCache.js +36 -42
  44. package/es/core/models/graph/Background.js +21 -26
  45. package/es/core/models/plugins/resourceWebControllUrl.js +84 -103
  46. package/es/core/models/tagstips/ElementTagTipConfig.js +44 -58
  47. package/es/core/models/topoData.js +73 -77
  48. package/es/core/models/utils/linkUtils.js +46 -51
  49. package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
  50. package/es/core/services/alarm.js +14 -16
  51. package/es/core/services/background.js +59 -67
  52. package/es/core/services/cmdb/metric.js +14 -18
  53. package/es/core/services/cmdb.js +23 -27
  54. package/es/core/services/index.js +48 -68
  55. package/es/core/services/overview.js +131 -151
  56. package/es/core/services/topo/basic.js +37 -41
  57. package/es/core/services/topo/tagtip.js +15 -19
  58. package/es/core/store/models/ciModel.js +58 -62
  59. package/es/core/store/models/customIcon.js +126 -145
  60. package/es/core/store/models/displayConfig.js +15 -19
  61. package/es/core/store/models/selection.js +4 -6
  62. package/es/core/store/models/topoAlarm.js +162 -145
  63. package/es/core/store/models/topoBaseInfoOverview.js +4 -6
  64. package/es/core/store/models/topoBizMod.js +9 -11
  65. package/es/core/store/models/topoConfig.js +215 -231
  66. package/es/core/store/models/topoGraphView.js +4 -6
  67. package/es/core/store/models/topoMod.js +373 -395
  68. package/es/core/utils/imageUtil.js +23 -27
  69. package/es/core/utils/saveSerialize.js +14 -18
  70. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
  71. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +20 -25
  72. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +363 -409
  73. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +112 -131
  74. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +40 -46
  75. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +219 -275
  76. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
  77. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
  78. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +45 -54
  79. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +32 -44
  80. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
  81. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +23 -27
  82. package/es/networkTopo/components/Link/hook.js +85 -96
  83. package/es/networkTopo/components/Link/index.js +104 -126
  84. package/es/networkTopo/components/Link/setting.js +48 -52
  85. package/es/networkTopo/getTopoData.js +73 -92
  86. package/es/networkTopo/hooks/viewer/useRelateTopo.js +34 -39
  87. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  88. package/es/networkTopo/models/TopoCenter.js +28 -46
  89. package/es/networkTopo/services/alert.js +18 -22
  90. package/es/networkTopo/services/authorization.js +45 -55
  91. package/es/networkTopo/services/cmdb.js +548 -696
  92. package/es/networkTopo/services/funcAuth.js +22 -24
  93. package/es/networkTopo/services/link.js +107 -117
  94. package/es/networkTopo/services/mdc.js +33 -48
  95. package/es/networkTopo/services/metric.js +38 -47
  96. package/es/networkTopo/services/model.js +616 -809
  97. package/es/networkTopo/services/risk.js +9 -11
  98. package/es/networkTopo/services/topo/auth.js +27 -33
  99. package/es/networkTopo/services/topo/basic.js +251 -289
  100. package/es/networkTopo/services/topo/blacklist.js +20 -24
  101. package/es/networkTopo/services/topo/ciInfo.js +27 -31
  102. package/es/networkTopo/services/topo/icon.js +49 -59
  103. package/es/networkTopo/services/topo/networkLink.js +32 -36
  104. package/es/networkTopo/services/topo/relation.js +9 -11
  105. package/es/networkTopo/services/topo/resourceWebUrl.js +36 -42
  106. package/es/networkTopo/store/functionAuth.js +31 -37
  107. package/es/networkTopo/store/topoCenter.js +142 -152
  108. package/es/networkTopo/store/topoLinkMod.js +4 -6
  109. package/es/networkTopo/store/topoTreeMod.js +170 -182
  110. package/es/networkTopo/utils/exportData.js +57 -61
  111. package/lib/components/MultiResourceDrawer/index.js +22 -26
  112. package/lib/components/ResourceList/ResourceSelect.js +54 -58
  113. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +33 -37
  114. package/lib/components/SingleResourceDrawer/SelectDrawer.js +24 -28
  115. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +36 -40
  116. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
  117. package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -3
  118. package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +18 -18
  119. package/lib/core/editor/components/BackgroundView/index.js +148 -177
  120. package/lib/core/editor/components/BackgroundView/index.module.scss +2 -1
  121. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +28 -32
  122. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
  123. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +23 -28
  124. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +14 -18
  125. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
  126. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
  127. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
  128. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +18 -22
  129. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +32 -36
  130. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
  131. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +18 -22
  132. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +41 -59
  133. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
  134. package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
  135. package/lib/core/editor/store/background.js +8 -10
  136. package/lib/core/editor/store/topoEdit.js +4 -6
  137. package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
  138. package/lib/core/hooks/usePolling.js +129 -141
  139. package/lib/core/hooks/useResourceConfig.js +76 -100
  140. package/lib/core/hooks/useTopoEdit.js +517 -615
  141. package/lib/core/models/Alarm.js +313 -396
  142. package/lib/core/models/AttributeMetricDisplay.js +118 -146
  143. package/lib/core/models/PluginManager.js +4 -3
  144. package/lib/core/models/SelectionModel.js +4 -5
  145. package/lib/core/models/TopoApp.js +279 -436
  146. package/lib/core/models/TopoGraphView.js +28 -41
  147. package/lib/core/models/cache/CiCache.js +39 -44
  148. package/lib/core/models/cache/CiTypeCache.js +48 -62
  149. package/lib/core/models/cache/DictCache.js +39 -45
  150. package/lib/core/models/graph/Background.js +22 -27
  151. package/lib/core/models/plugins/resourceWebControllUrl.js +82 -101
  152. package/lib/core/models/tagstips/ElementTagTipConfig.js +44 -58
  153. package/lib/core/models/topoData.js +73 -78
  154. package/lib/core/models/utils/linkUtils.js +45 -51
  155. package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
  156. package/lib/core/services/alarm.js +18 -20
  157. package/lib/core/services/background.js +70 -78
  158. package/lib/core/services/cmdb/metric.js +14 -19
  159. package/lib/core/services/cmdb.js +24 -29
  160. package/lib/core/services/index.js +53 -72
  161. package/lib/core/services/overview.js +131 -151
  162. package/lib/core/services/topo/basic.js +37 -41
  163. package/lib/core/services/topo/tagtip.js +16 -21
  164. package/lib/core/store/models/ciModel.js +66 -70
  165. package/lib/core/store/models/customIcon.js +126 -145
  166. package/lib/core/store/models/displayConfig.js +15 -19
  167. package/lib/core/store/models/selection.js +4 -6
  168. package/lib/core/store/models/topoAlarm.js +163 -145
  169. package/lib/core/store/models/topoBaseInfoOverview.js +4 -6
  170. package/lib/core/store/models/topoBizMod.js +9 -11
  171. package/lib/core/store/models/topoConfig.js +222 -238
  172. package/lib/core/store/models/topoGraphView.js +4 -6
  173. package/lib/core/store/models/topoMod.js +375 -397
  174. package/lib/core/utils/imageUtil.js +26 -31
  175. package/lib/core/utils/saveSerialize.js +13 -18
  176. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
  177. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +21 -26
  178. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +364 -410
  179. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +114 -133
  180. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +44 -50
  181. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +220 -274
  182. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
  183. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
  184. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +40 -50
  185. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +35 -47
  186. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
  187. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +24 -28
  188. package/lib/networkTopo/components/Link/hook.js +86 -98
  189. package/lib/networkTopo/components/Link/index.js +105 -127
  190. package/lib/networkTopo/components/Link/setting.js +48 -52
  191. package/lib/networkTopo/getTopoData.js +73 -92
  192. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +35 -40
  193. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  194. package/lib/networkTopo/models/TopoCenter.js +28 -46
  195. package/lib/networkTopo/services/alert.js +18 -22
  196. package/lib/networkTopo/services/authorization.js +55 -65
  197. package/lib/networkTopo/services/cmdb.js +551 -700
  198. package/lib/networkTopo/services/funcAuth.js +24 -26
  199. package/lib/networkTopo/services/link.js +108 -118
  200. package/lib/networkTopo/services/mdc.js +35 -51
  201. package/lib/networkTopo/services/metric.js +37 -47
  202. package/lib/networkTopo/services/model.js +615 -809
  203. package/lib/networkTopo/services/risk.js +11 -13
  204. package/lib/networkTopo/services/topo/auth.js +27 -33
  205. package/lib/networkTopo/services/topo/basic.js +252 -290
  206. package/lib/networkTopo/services/topo/blacklist.js +20 -24
  207. package/lib/networkTopo/services/topo/ciInfo.js +34 -38
  208. package/lib/networkTopo/services/topo/icon.js +59 -69
  209. package/lib/networkTopo/services/topo/networkLink.js +32 -36
  210. package/lib/networkTopo/services/topo/relation.js +11 -13
  211. package/lib/networkTopo/services/topo/resourceWebUrl.js +44 -50
  212. package/lib/networkTopo/store/functionAuth.js +31 -37
  213. package/lib/networkTopo/store/topoCenter.js +142 -152
  214. package/lib/networkTopo/store/topoLinkMod.js +4 -6
  215. package/lib/networkTopo/store/topoTreeMod.js +166 -178
  216. package/lib/networkTopo/utils/exportData.js +63 -68
  217. package/package.json +4 -3
@@ -1,5 +1,8 @@
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
+
3
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
7
  import { request } from '@riil-frontend/component-topology-utils';
5
8
  import { isNull } from '@riil-frontend/utils';
@@ -10,178 +13,142 @@ import { modelDictList } from "./mdc";
10
13
  * 查询 CI 组件信息(又实例的)
11
14
  */
12
15
 
13
- export var getCommonCount = /*#__PURE__*/function () {
14
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
16
+ export var getCommonCount = function getCommonCount(_x) {
17
+ return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
15
18
  return _regeneratorRuntime.wrap(function _callee$(_context) {
16
- while (1) {
17
- switch (_context.prev = _context.next) {
18
- case 0:
19
- _context.next = 2;
20
- return request.post('/cmdb/v1/api/ci/commonCount', {
21
- condition: "\"principal(type('" + code + "'))\"",
22
- groupKeys: ['ci_type']
23
- });
24
-
25
- case 2:
26
- return _context.abrupt("return", _context.sent);
27
-
28
- case 3:
29
- case "end":
30
- return _context.stop();
31
- }
19
+ while (1) switch (_context.prev = _context.next) {
20
+ case 0:
21
+ _context.next = 2;
22
+ return request.post('/cmdb/v1/api/ci/commonCount', {
23
+ condition: "\"principal(type('" + code + "'))\"",
24
+ groupKeys: ['ci_type']
25
+ });
26
+
27
+ case 2:
28
+ return _context.abrupt("return", _context.sent);
29
+
30
+ case 3:
31
+ case "end":
32
+ return _context.stop();
32
33
  }
33
34
  }, _callee);
34
- }));
35
-
36
- return function getCommonCount(_x) {
37
- return _ref.apply(this, arguments);
38
- };
39
- }();
35
+ }))).apply(this, arguments);
36
+ };
40
37
  /**
41
38
  * 查询 CI 组件信息
42
39
  */
43
40
 
44
- export var getComponents = /*#__PURE__*/function () {
45
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(code) {
41
+ export var getComponents = function getComponents(_x2) {
42
+ return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(code) {
46
43
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
47
- while (1) {
48
- switch (_context2.prev = _context2.next) {
49
- case 0:
50
- _context2.next = 2;
51
- return request.post('/model/v1/api/getComponents', {
52
- code: code
53
- });
54
-
55
- case 2:
56
- return _context2.abrupt("return", _context2.sent);
57
-
58
- case 3:
59
- case "end":
60
- return _context2.stop();
61
- }
44
+ while (1) switch (_context2.prev = _context2.next) {
45
+ case 0:
46
+ _context2.next = 2;
47
+ return request.post('/model/v1/api/getComponents', {
48
+ code: code
49
+ });
50
+
51
+ case 2:
52
+ return _context2.abrupt("return", _context2.sent);
53
+
54
+ case 3:
55
+ case "end":
56
+ return _context2.stop();
62
57
  }
63
58
  }, _callee2);
64
- }));
65
-
66
- return function getComponents(_x2) {
67
- return _ref2.apply(this, arguments);
68
- };
69
- }();
59
+ }))).apply(this, arguments);
60
+ };
70
61
  /**
71
62
  * 查询关系类型定义
72
63
  */
73
64
 
74
- export var getAllRelationType = /*#__PURE__*/function () {
75
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
65
+ export var getAllRelationType = function getAllRelationType() {
66
+ return (_ref3 = _ref3 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
76
67
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
77
- while (1) {
78
- switch (_context3.prev = _context3.next) {
79
- case 0:
80
- _context3.next = 2;
81
- return request.post('/model/v1/api/getAllRelationType');
82
-
83
- case 2:
84
- return _context3.abrupt("return", _context3.sent);
85
-
86
- case 3:
87
- case "end":
88
- return _context3.stop();
89
- }
68
+ while (1) switch (_context3.prev = _context3.next) {
69
+ case 0:
70
+ _context3.next = 2;
71
+ return request.post('/model/v1/api/getAllRelationType');
72
+
73
+ case 2:
74
+ return _context3.abrupt("return", _context3.sent);
75
+
76
+ case 3:
77
+ case "end":
78
+ return _context3.stop();
90
79
  }
91
80
  }, _callee3);
92
- }));
93
-
94
- return function getAllRelationType() {
95
- return _ref3.apply(this, arguments);
96
- };
97
- }();
81
+ }))).apply(this, arguments);
82
+ };
98
83
  /**
99
84
  * ci类型树(包含组件)
100
85
  * @param {string} moduleName 标识模块名
101
86
  */
102
87
 
103
- export var getCiTypes = /*#__PURE__*/function () {
104
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(moduleName) {
88
+ export var getCiTypes = function getCiTypes(_x3) {
89
+ return (_ref4 = _ref4 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(moduleName) {
105
90
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
106
- while (1) {
107
- switch (_context4.prev = _context4.next) {
108
- case 0:
109
- _context4.next = 2;
110
- return request.post('/model/v1/api/getCiTypes', {
111
- moduleName: moduleName
112
- });
113
-
114
- case 2:
115
- return _context4.abrupt("return", _context4.sent);
116
-
117
- case 3:
118
- case "end":
119
- return _context4.stop();
120
- }
91
+ while (1) switch (_context4.prev = _context4.next) {
92
+ case 0:
93
+ _context4.next = 2;
94
+ return request.post('/model/v1/api/getCiTypes', {
95
+ moduleName: moduleName
96
+ });
97
+
98
+ case 2:
99
+ return _context4.abrupt("return", _context4.sent);
100
+
101
+ case 3:
102
+ case "end":
103
+ return _context4.stop();
121
104
  }
122
105
  }, _callee4);
123
- }));
124
-
125
- return function getCiTypes(_x3) {
126
- return _ref4.apply(this, arguments);
127
- };
128
- }();
106
+ }))).apply(this, arguments);
107
+ };
129
108
  /**
130
109
  * 模型树拖动接口,用于节点拖拽
131
110
  */
132
111
 
133
- export var dragTree = /*#__PURE__*/function () {
134
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(param) {
112
+ export var dragTree = function dragTree(_x4) {
113
+ return (_ref5 = _ref5 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(param) {
135
114
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
136
- while (1) {
137
- switch (_context5.prev = _context5.next) {
138
- case 0:
139
- _context5.next = 2;
140
- return request.post('/model/v1/api/dragTree', param);
141
-
142
- case 2:
143
- return _context5.abrupt("return", _context5.sent);
144
-
145
- case 3:
146
- case "end":
147
- return _context5.stop();
148
- }
115
+ while (1) switch (_context5.prev = _context5.next) {
116
+ case 0:
117
+ _context5.next = 2;
118
+ return request.post('/model/v1/api/dragTree', param);
119
+
120
+ case 2:
121
+ return _context5.abrupt("return", _context5.sent);
122
+
123
+ case 3:
124
+ case "end":
125
+ return _context5.stop();
149
126
  }
150
127
  }, _callee5);
151
- }));
152
-
153
- return function dragTree(_x4) {
154
- return _ref5.apply(this, arguments);
155
- };
156
- }();
128
+ }))).apply(this, arguments);
129
+ };
157
130
  /**
158
131
  * 模型改造树
159
132
  */
160
133
 
161
- export var getModelTree = /*#__PURE__*/function () {
162
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
134
+ export var getModelTree = function getModelTree() {
135
+ return (_ref6 = _ref6 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
163
136
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
164
- while (1) {
165
- switch (_context6.prev = _context6.next) {
166
- case 0:
167
- _context6.next = 2;
168
- return request.post('/mdc/v1/api/model-asset/tree');
169
-
170
- case 2:
171
- return _context6.abrupt("return", _context6.sent);
172
-
173
- case 3:
174
- case "end":
175
- return _context6.stop();
176
- }
137
+ while (1) switch (_context6.prev = _context6.next) {
138
+ case 0:
139
+ _context6.next = 2;
140
+ return request.post('/mdc/v1/api/model-asset/tree');
141
+
142
+ case 2:
143
+ return _context6.abrupt("return", _context6.sent);
144
+
145
+ case 3:
146
+ case "end":
147
+ return _context6.stop();
177
148
  }
178
149
  }, _callee6);
179
- }));
180
-
181
- return function getModelTree() {
182
- return _ref6.apply(this, arguments);
183
- };
184
- }();
150
+ }))).apply(this, arguments);
151
+ };
185
152
  /**
186
153
  * 验证CI名称
187
154
  * @param {Object} param - 验证值对象.
@@ -194,89 +161,71 @@ export var getModelTree = /*#__PURE__*/function () {
194
161
  * @param {string} employee.data - 被验证的值. eg:{"name":"未命名类型-1"}
195
162
  */
196
163
 
197
- export var verify = /*#__PURE__*/function () {
198
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(param) {
164
+ export var verify = function verify(_x5) {
165
+ return (_ref7 = _ref7 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(param) {
199
166
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
200
- while (1) {
201
- switch (_context7.prev = _context7.next) {
202
- case 0:
203
- _context7.next = 2;
204
- return request.post('/model/v1/api/verify', param);
205
-
206
- case 2:
207
- return _context7.abrupt("return", _context7.sent);
208
-
209
- case 3:
210
- case "end":
211
- return _context7.stop();
212
- }
167
+ while (1) switch (_context7.prev = _context7.next) {
168
+ case 0:
169
+ _context7.next = 2;
170
+ return request.post('/model/v1/api/verify', param);
171
+
172
+ case 2:
173
+ return _context7.abrupt("return", _context7.sent);
174
+
175
+ case 3:
176
+ case "end":
177
+ return _context7.stop();
213
178
  }
214
179
  }, _callee7);
215
- }));
216
-
217
- return function verify(_x5) {
218
- return _ref7.apply(this, arguments);
219
- };
220
- }();
180
+ }))).apply(this, arguments);
181
+ };
221
182
  /**
222
183
  * 获得CI指标
223
184
  */
224
185
 
225
- export var getCiMetric = /*#__PURE__*/function () {
226
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(ciCode) {
186
+ export var getCiMetric = function getCiMetric(_x6) {
187
+ return (_ref8 = _ref8 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(ciCode) {
227
188
  return _regeneratorRuntime.wrap(function _callee8$(_context8) {
228
- while (1) {
229
- switch (_context8.prev = _context8.next) {
230
- case 0:
231
- _context8.next = 2;
232
- return request.post('/model/v1/api/getCiMetric', {
233
- ciCode: ciCode
234
- });
235
-
236
- case 2:
237
- return _context8.abrupt("return", _context8.sent);
238
-
239
- case 3:
240
- case "end":
241
- return _context8.stop();
242
- }
189
+ while (1) switch (_context8.prev = _context8.next) {
190
+ case 0:
191
+ _context8.next = 2;
192
+ return request.post('/model/v1/api/getCiMetric', {
193
+ ciCode: ciCode
194
+ });
195
+
196
+ case 2:
197
+ return _context8.abrupt("return", _context8.sent);
198
+
199
+ case 3:
200
+ case "end":
201
+ return _context8.stop();
243
202
  }
244
203
  }, _callee8);
245
- }));
246
-
247
- return function getCiMetric(_x6) {
248
- return _ref8.apply(this, arguments);
249
- };
250
- }();
204
+ }))).apply(this, arguments);
205
+ };
251
206
  /**
252
207
  * 所有领域
253
208
  * @returns {array} 对象数组
254
209
  */
255
210
 
256
- export var getDomains = /*#__PURE__*/function () {
257
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
211
+ export var getDomains = function getDomains() {
212
+ return (_ref9 = _ref9 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
258
213
  return _regeneratorRuntime.wrap(function _callee9$(_context9) {
259
- while (1) {
260
- switch (_context9.prev = _context9.next) {
261
- case 0:
262
- _context9.next = 2;
263
- return request.post('/model/v1/api/getDomains');
264
-
265
- case 2:
266
- return _context9.abrupt("return", _context9.sent);
267
-
268
- case 3:
269
- case "end":
270
- return _context9.stop();
271
- }
214
+ while (1) switch (_context9.prev = _context9.next) {
215
+ case 0:
216
+ _context9.next = 2;
217
+ return request.post('/model/v1/api/getDomains');
218
+
219
+ case 2:
220
+ return _context9.abrupt("return", _context9.sent);
221
+
222
+ case 3:
223
+ case "end":
224
+ return _context9.stop();
272
225
  }
273
226
  }, _callee9);
274
- }));
275
-
276
- return function getDomains() {
277
- return _ref9.apply(this, arguments);
278
- };
279
- }();
227
+ }))).apply(this, arguments);
228
+ };
280
229
  /** ************************************** 关系定义 start ************************************ */
281
230
 
282
231
  /**
@@ -285,88 +234,70 @@ export var getDomains = /*#__PURE__*/function () {
285
234
  * @returns {object}
286
235
  */
287
236
 
288
- export var getRelation = /*#__PURE__*/function () {
289
- var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(params) {
237
+ export var getRelation = function getRelation(_x7) {
238
+ return (_ref10 = _ref10 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(params) {
290
239
  return _regeneratorRuntime.wrap(function _callee10$(_context10) {
291
- while (1) {
292
- switch (_context10.prev = _context10.next) {
293
- case 0:
294
- _context10.next = 2;
295
- return request.post('/model/v1/api/getRelation', params);
296
-
297
- case 2:
298
- return _context10.abrupt("return", _context10.sent);
299
-
300
- case 3:
301
- case "end":
302
- return _context10.stop();
303
- }
240
+ while (1) switch (_context10.prev = _context10.next) {
241
+ case 0:
242
+ _context10.next = 2;
243
+ return request.post('/model/v1/api/getRelation', params);
244
+
245
+ case 2:
246
+ return _context10.abrupt("return", _context10.sent);
247
+
248
+ case 3:
249
+ case "end":
250
+ return _context10.stop();
304
251
  }
305
252
  }, _callee10);
306
- }));
307
-
308
- return function getRelation(_x7) {
309
- return _ref10.apply(this, arguments);
310
- };
311
- }();
253
+ }))).apply(this, arguments);
254
+ };
312
255
  /**
313
256
  * 创建关系
314
257
  * @param {object} params
315
258
  */
316
259
 
317
- export var createRelation = /*#__PURE__*/function () {
318
- var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(params) {
260
+ export var createRelation = function createRelation(_x8) {
261
+ return (_ref11 = _ref11 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(params) {
319
262
  return _regeneratorRuntime.wrap(function _callee11$(_context11) {
320
- while (1) {
321
- switch (_context11.prev = _context11.next) {
322
- case 0:
323
- _context11.next = 2;
324
- return request.post('/model/v1/api/createRelation', params);
325
-
326
- case 2:
327
- return _context11.abrupt("return", _context11.sent);
328
-
329
- case 3:
330
- case "end":
331
- return _context11.stop();
332
- }
263
+ while (1) switch (_context11.prev = _context11.next) {
264
+ case 0:
265
+ _context11.next = 2;
266
+ return request.post('/model/v1/api/createRelation', params);
267
+
268
+ case 2:
269
+ return _context11.abrupt("return", _context11.sent);
270
+
271
+ case 3:
272
+ case "end":
273
+ return _context11.stop();
333
274
  }
334
275
  }, _callee11);
335
- }));
336
-
337
- return function createRelation(_x8) {
338
- return _ref11.apply(this, arguments);
339
- };
340
- }();
276
+ }))).apply(this, arguments);
277
+ };
341
278
  /**
342
279
  * 编辑关系
343
280
  * @param {object} params
344
281
  */
345
282
 
346
- export var updateRelation = /*#__PURE__*/function () {
347
- var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(params) {
283
+ export var updateRelation = function updateRelation(_x9) {
284
+ return (_ref12 = _ref12 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(params) {
348
285
  return _regeneratorRuntime.wrap(function _callee12$(_context12) {
349
- while (1) {
350
- switch (_context12.prev = _context12.next) {
351
- case 0:
352
- _context12.next = 2;
353
- return request.post('/model/v1/api/updateRelation', params);
354
-
355
- case 2:
356
- return _context12.abrupt("return", _context12.sent);
357
-
358
- case 3:
359
- case "end":
360
- return _context12.stop();
361
- }
286
+ while (1) switch (_context12.prev = _context12.next) {
287
+ case 0:
288
+ _context12.next = 2;
289
+ return request.post('/model/v1/api/updateRelation', params);
290
+
291
+ case 2:
292
+ return _context12.abrupt("return", _context12.sent);
293
+
294
+ case 3:
295
+ case "end":
296
+ return _context12.stop();
362
297
  }
363
298
  }, _callee12);
364
- }));
365
-
366
- return function updateRelation(_x9) {
367
- return _ref12.apply(this, arguments);
368
- };
369
- }();
299
+ }))).apply(this, arguments);
300
+ };
370
301
  /**
371
302
  * 删除关系定义
372
303
  * @param {object} params {
@@ -386,30 +317,24 @@ export var updateRelation = /*#__PURE__*/function () {
386
317
  }
387
318
  */
388
319
 
389
- export var deleteRelation = /*#__PURE__*/function () {
390
- var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(params) {
320
+ export var deleteRelation = function deleteRelation(_x10) {
321
+ return (_ref13 = _ref13 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(params) {
391
322
  return _regeneratorRuntime.wrap(function _callee13$(_context13) {
392
- while (1) {
393
- switch (_context13.prev = _context13.next) {
394
- case 0:
395
- _context13.next = 2;
396
- return request.post('/model/v1/api/deleteRelation', params);
397
-
398
- case 2:
399
- return _context13.abrupt("return", _context13.sent);
400
-
401
- case 3:
402
- case "end":
403
- return _context13.stop();
404
- }
323
+ while (1) switch (_context13.prev = _context13.next) {
324
+ case 0:
325
+ _context13.next = 2;
326
+ return request.post('/model/v1/api/deleteRelation', params);
327
+
328
+ case 2:
329
+ return _context13.abrupt("return", _context13.sent);
330
+
331
+ case 3:
332
+ case "end":
333
+ return _context13.stop();
405
334
  }
406
335
  }, _callee13);
407
- }));
408
-
409
- return function deleteRelation(_x10) {
410
- return _ref13.apply(this, arguments);
411
- };
412
- }();
336
+ }))).apply(this, arguments);
337
+ };
413
338
  /** ************************************** 关系定义 end************************************ */
414
339
 
415
340
  /** ************************************** 数据字典 start ********************************** */
@@ -450,30 +375,24 @@ export var deleteRelation = /*#__PURE__*/function () {
450
375
  ...]
451
376
  */
452
377
 
453
- export var getCiAttributeDict = /*#__PURE__*/function () {
454
- var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(param) {
378
+ export var getCiAttributeDict = function getCiAttributeDict(_x11) {
379
+ return (_ref14 = _ref14 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(param) {
455
380
  return _regeneratorRuntime.wrap(function _callee14$(_context14) {
456
- while (1) {
457
- switch (_context14.prev = _context14.next) {
458
- case 0:
459
- _context14.next = 2;
460
- return request.post('/model/v1/api/getCiAttributeDict', param);
461
-
462
- case 2:
463
- return _context14.abrupt("return", _context14.sent);
464
-
465
- case 3:
466
- case "end":
467
- return _context14.stop();
468
- }
381
+ while (1) switch (_context14.prev = _context14.next) {
382
+ case 0:
383
+ _context14.next = 2;
384
+ return request.post('/model/v1/api/getCiAttributeDict', param);
385
+
386
+ case 2:
387
+ return _context14.abrupt("return", _context14.sent);
388
+
389
+ case 3:
390
+ case "end":
391
+ return _context14.stop();
469
392
  }
470
393
  }, _callee14);
471
- }));
472
-
473
- return function getCiAttributeDict(_x11) {
474
- return _ref14.apply(this, arguments);
475
- };
476
- }();
394
+ }))).apply(this, arguments);
395
+ };
477
396
  /**
478
397
  * 获取用户自建的属性(数据字典)
479
398
  * @param {Array} codes ci类型code集合
@@ -481,7 +400,30 @@ export var getCiAttributeDict = /*#__PURE__*/function () {
481
400
  */
482
401
 
483
402
  export function getUserDicts(_x12) {
484
- return _getUserDicts.apply(this, arguments);
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);
485
427
  }
486
428
  /**
487
429
  * 查询单个数据字典
@@ -507,62 +449,26 @@ export function getUserDicts(_x12) {
507
449
  * }
508
450
  */
509
451
 
510
- function _getUserDicts() {
511
- _getUserDicts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(codes) {
512
- var dicts, userDict;
513
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
514
- while (1) {
515
- switch (_context29.prev = _context29.next) {
516
- case 0:
517
- _context29.next = 2;
518
- return getCiAttributeDict({
519
- ciCode: codes
520
- });
521
-
522
- case 2:
523
- dicts = _context29.sent;
524
- userDict = dicts.reduce(function (map, obj) {
525
- map[obj.attributeCode] = obj.dict.items;
526
- return map;
527
- }, {});
528
- return _context29.abrupt("return", userDict);
529
-
530
- case 5:
531
- case "end":
532
- return _context29.stop();
533
- }
534
- }
535
- }, _callee29);
536
- }));
537
- return _getUserDicts.apply(this, arguments);
538
- }
539
-
540
- export var queryDict = /*#__PURE__*/function () {
541
- var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(code) {
542
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
543
- while (1) {
544
- switch (_context15.prev = _context15.next) {
545
- case 0:
546
- _context15.next = 2;
547
- return request.post('/model/v1/api/getDict', {
548
- code: code
549
- });
550
-
551
- case 2:
552
- return _context15.abrupt("return", _context15.sent);
553
-
554
- case 3:
555
- case "end":
556
- return _context15.stop();
557
- }
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) {
456
+ case 0:
457
+ _context16.next = 2;
458
+ return request.post('/model/v1/api/getDict', {
459
+ code: code
460
+ });
461
+
462
+ case 2:
463
+ return _context16.abrupt("return", _context16.sent);
464
+
465
+ case 3:
466
+ case "end":
467
+ return _context16.stop();
558
468
  }
559
- }, _callee15);
560
- }));
561
-
562
- return function queryDict(_x13) {
563
- return _ref15.apply(this, arguments);
564
- };
565
- }();
469
+ }, _callee16);
470
+ }))).apply(this, arguments);
471
+ };
566
472
  /**
567
473
  * 查询厂商
568
474
  * TODO:由于当前后端只有一个单查厂商的接口,暂使用promise.all形式查询多个
@@ -571,34 +477,28 @@ export var queryDict = /*#__PURE__*/function () {
571
477
  * @param {*} vendorKeys 厂商key数组,如['ruijie']
572
478
  */
573
479
 
574
- export var queryVendors = /*#__PURE__*/function () {
575
- var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(vendorKeys) {
576
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
577
- while (1) {
578
- switch (_context16.prev = _context16.next) {
579
- case 0:
580
- _context16.next = 2;
581
- return Promise.all(vendorKeys.map(function (vendor) {
582
- return request.post('/model/v1/api/getDict', {
583
- vendor: vendor
584
- });
585
- }));
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) {
484
+ case 0:
485
+ _context17.next = 2;
486
+ return Promise.all(vendorKeys.map(function (vendor) {
487
+ return request.post('/model/v1/api/getDict', {
488
+ vendor: vendor
489
+ });
490
+ }));
586
491
 
587
- case 2:
588
- return _context16.abrupt("return", _context16.sent);
492
+ case 2:
493
+ return _context17.abrupt("return", _context17.sent);
589
494
 
590
- case 3:
591
- case "end":
592
- return _context16.stop();
593
- }
495
+ case 3:
496
+ case "end":
497
+ return _context17.stop();
594
498
  }
595
- }, _callee16);
596
- }));
597
-
598
- return function queryVendors(_x14) {
599
- return _ref16.apply(this, arguments);
600
- };
601
- }();
499
+ }, _callee17);
500
+ }))).apply(this, arguments);
501
+ };
602
502
  /**
603
503
  * 查询全部数据字典
604
504
  * @param {string} source 查询全量:source=null,查询内建:source=system,查询自建: source=custom
@@ -628,34 +528,28 @@ export var queryVendors = /*#__PURE__*/function () {
628
528
  * ]
629
529
  */
630
530
 
631
- export var queryDicts = /*#__PURE__*/function () {
632
- var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(source) {
633
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
634
- while (1) {
635
- switch (_context17.prev = _context17.next) {
636
- case 0:
637
- if (source === void 0) {
638
- source = null;
639
- }
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) {
535
+ case 0:
536
+ if (source === void 0) {
537
+ source = null;
538
+ }
640
539
 
641
- _context17.next = 3;
642
- return modelDictList();
540
+ _context18.next = 3;
541
+ return modelDictList();
643
542
 
644
- case 3:
645
- return _context17.abrupt("return", _context17.sent);
543
+ case 3:
544
+ return _context18.abrupt("return", _context18.sent);
646
545
 
647
- case 4:
648
- case "end":
649
- return _context17.stop();
650
- }
546
+ case 4:
547
+ case "end":
548
+ return _context18.stop();
651
549
  }
652
- }, _callee17);
653
- }));
654
-
655
- return function queryDicts(_x15) {
656
- return _ref17.apply(this, arguments);
657
- };
658
- }();
550
+ }, _callee18);
551
+ }))).apply(this, arguments);
552
+ };
659
553
  /**
660
554
  * 新建数据字典
661
555
  * @param {object} param
@@ -688,30 +582,24 @@ export var queryDicts = /*#__PURE__*/function () {
688
582
  * }
689
583
  */
690
584
 
691
- export var createDict = /*#__PURE__*/function () {
692
- var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(param) {
693
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
694
- while (1) {
695
- switch (_context18.prev = _context18.next) {
696
- case 0:
697
- _context18.next = 2;
698
- return request.post('/model/v1/api/createDict', param);
699
-
700
- case 2:
701
- return _context18.abrupt("return", _context18.sent);
702
-
703
- case 3:
704
- case "end":
705
- return _context18.stop();
706
- }
707
- }
708
- }, _callee18);
709
- }));
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) {
589
+ case 0:
590
+ _context19.next = 2;
591
+ return request.post('/model/v1/api/createDict', param);
592
+
593
+ case 2:
594
+ return _context19.abrupt("return", _context19.sent);
710
595
 
711
- return function createDict(_x16) {
712
- return _ref18.apply(this, arguments);
713
- };
714
- }();
596
+ case 3:
597
+ case "end":
598
+ return _context19.stop();
599
+ }
600
+ }, _callee19);
601
+ }))).apply(this, arguments);
602
+ };
715
603
  /**
716
604
  * 编辑数据字典
717
605
  * @param {object} param
@@ -737,30 +625,24 @@ export var createDict = /*#__PURE__*/function () {
737
625
  * "dict/000000000051dd09"
738
626
  */
739
627
 
740
- export var updateDict = /*#__PURE__*/function () {
741
- var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(param) {
742
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
743
- while (1) {
744
- switch (_context19.prev = _context19.next) {
745
- case 0:
746
- _context19.next = 2;
747
- return request.post('/model/v1/api/updateDict', param);
748
-
749
- case 2:
750
- return _context19.abrupt("return", _context19.sent);
751
-
752
- case 3:
753
- case "end":
754
- return _context19.stop();
755
- }
756
- }
757
- }, _callee19);
758
- }));
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) {
632
+ case 0:
633
+ _context20.next = 2;
634
+ return request.post('/model/v1/api/updateDict', param);
635
+
636
+ case 2:
637
+ return _context20.abrupt("return", _context20.sent);
759
638
 
760
- return function updateDict(_x17) {
761
- return _ref19.apply(this, arguments);
762
- };
763
- }();
639
+ case 3:
640
+ case "end":
641
+ return _context20.stop();
642
+ }
643
+ }, _callee20);
644
+ }))).apply(this, arguments);
645
+ };
764
646
  /**
765
647
  * 删除数据字典
766
648
  * @param {string} id
@@ -777,32 +659,26 @@ export var updateDict = /*#__PURE__*/function () {
777
659
  * "000000000051dc4d"
778
660
  */
779
661
 
780
- export var deleteDict = /*#__PURE__*/function () {
781
- var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(id) {
782
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
783
- while (1) {
784
- switch (_context20.prev = _context20.next) {
785
- case 0:
786
- _context20.next = 2;
787
- return request.post('/model/v1/api/deleteDict', {
788
- id: id
789
- });
790
-
791
- case 2:
792
- return _context20.abrupt("return", _context20.sent);
793
-
794
- case 3:
795
- case "end":
796
- return _context20.stop();
797
- }
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) {
666
+ case 0:
667
+ _context21.next = 2;
668
+ return request.post('/model/v1/api/deleteDict', {
669
+ id: id
670
+ });
671
+
672
+ case 2:
673
+ return _context21.abrupt("return", _context21.sent);
674
+
675
+ case 3:
676
+ case "end":
677
+ return _context21.stop();
798
678
  }
799
- }, _callee20);
800
- }));
801
-
802
- return function deleteDict(_x18) {
803
- return _ref20.apply(this, arguments);
804
- };
805
- }();
679
+ }, _callee21);
680
+ }))).apply(this, arguments);
681
+ };
806
682
  /** ************************************** 数据字典 end ************************************ */
807
683
 
808
684
  /** ************************************** ci类型 start ************************************ */
@@ -816,30 +692,24 @@ export var deleteDict = /*#__PURE__*/function () {
816
692
  * @returns
817
693
  */
818
694
 
819
- export var getCiExtends = /*#__PURE__*/function () {
820
- var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(param) {
821
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
822
- while (1) {
823
- switch (_context21.prev = _context21.next) {
824
- case 0:
825
- _context21.next = 2;
826
- return request.post('/model/v1/api/getCiExtends', param);
827
-
828
- case 2:
829
- return _context21.abrupt("return", _context21.sent);
830
-
831
- case 3:
832
- case "end":
833
- return _context21.stop();
834
- }
835
- }
836
- }, _callee21);
837
- }));
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) {
699
+ case 0:
700
+ _context22.next = 2;
701
+ return request.post('/model/v1/api/getCiExtends', param);
702
+
703
+ case 2:
704
+ return _context22.abrupt("return", _context22.sent);
838
705
 
839
- return function getCiExtends(_x19) {
840
- return _ref21.apply(this, arguments);
841
- };
842
- }();
706
+ case 3:
707
+ case "end":
708
+ return _context22.stop();
709
+ }
710
+ }, _callee22);
711
+ }))).apply(this, arguments);
712
+ };
843
713
  /**
844
714
  *
845
715
  * 模型接口-ci元数据
@@ -848,85 +718,73 @@ export var getCiExtends = /*#__PURE__*/function () {
848
718
  * @param {boolean} dict 是否需要绑定数据字典
849
719
  */
850
720
 
851
- export var getCi = /*#__PURE__*/function () {
852
- var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(code, userVisibleFilter, dict) {
721
+ export var getCi = function getCi(_x20, _x21, _x22) {
722
+ return (_ref22 = _ref22 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(code, userVisibleFilter, dict) {
853
723
  var meta;
854
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
855
- while (1) {
856
- switch (_context22.prev = _context22.next) {
857
- case 0:
858
- if (userVisibleFilter === void 0) {
859
- userVisibleFilter = true;
860
- }
861
-
862
- if (dict === void 0) {
863
- dict = true;
864
- }
865
-
866
- _context22.next = 4;
867
- return formatCiAttributes(code, userVisibleFilter);
868
-
869
- case 4:
870
- meta = _context22.sent;
871
-
872
- if (!dict) {
873
- _context22.next = 14;
874
- break;
875
- }
876
-
877
- _context22.prev = 6;
878
- return _context22.abrupt("return", bindDict(meta));
879
-
880
- case 10:
881
- _context22.prev = 10;
882
- _context22.t0 = _context22["catch"](6);
883
- console.error(_context22.t0);
884
- return _context22.abrupt("return", meta);
885
-
886
- case 14:
887
- return _context22.abrupt("return", meta);
888
-
889
- case 15:
890
- case "end":
891
- return _context22.stop();
892
- }
724
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
725
+ while (1) switch (_context23.prev = _context23.next) {
726
+ case 0:
727
+ if (userVisibleFilter === void 0) {
728
+ userVisibleFilter = true;
729
+ }
730
+
731
+ if (dict === void 0) {
732
+ dict = true;
733
+ }
734
+
735
+ _context23.next = 4;
736
+ return formatCiAttributes(code, userVisibleFilter);
737
+
738
+ case 4:
739
+ meta = _context23.sent;
740
+
741
+ if (!dict) {
742
+ _context23.next = 14;
743
+ break;
744
+ }
745
+
746
+ _context23.prev = 6;
747
+ return _context23.abrupt("return", bindDict(meta));
748
+
749
+ case 10:
750
+ _context23.prev = 10;
751
+ _context23.t0 = _context23["catch"](6);
752
+ console.error(_context23.t0);
753
+ return _context23.abrupt("return", meta);
754
+
755
+ case 14:
756
+ return _context23.abrupt("return", meta);
757
+
758
+ case 15:
759
+ case "end":
760
+ return _context23.stop();
893
761
  }
894
- }, _callee22, null, [[6, 10]]);
895
- }));
896
-
897
- return function getCi(_x20, _x21, _x22) {
898
- return _ref22.apply(this, arguments);
899
- };
900
- }();
762
+ }, _callee23, null, [[6, 10]]);
763
+ }))).apply(this, arguments);
764
+ };
901
765
  /**
902
766
  * 编辑ci类型
903
767
  * @param {string} code
904
768
  */
905
769
 
906
- export var updateCi = /*#__PURE__*/function () {
907
- var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(data) {
908
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
909
- while (1) {
910
- switch (_context23.prev = _context23.next) {
911
- case 0:
912
- _context23.next = 2;
913
- return request.post('/model/v1/api/updateCi', data);
914
-
915
- case 2:
916
- return _context23.abrupt("return", _context23.sent);
917
-
918
- case 3:
919
- case "end":
920
- return _context23.stop();
921
- }
922
- }
923
- }, _callee23);
924
- }));
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) {
774
+ case 0:
775
+ _context24.next = 2;
776
+ return request.post('/model/v1/api/updateCi', data);
777
+
778
+ case 2:
779
+ return _context24.abrupt("return", _context24.sent);
925
780
 
926
- return function updateCi(_x23) {
927
- return _ref23.apply(this, arguments);
928
- };
929
- }();
781
+ case 3:
782
+ case "end":
783
+ return _context24.stop();
784
+ }
785
+ }, _callee24);
786
+ }))).apply(this, arguments);
787
+ };
930
788
  /**
931
789
  * 创建ci类型
932
790
  * @param {object} data
@@ -957,95 +815,92 @@ export var updateCi = /*#__PURE__*/function () {
957
815
  * "513b7713-4854-496f-9e4a-a4bf85cb0f63"
958
816
  */
959
817
 
960
- export var createCi = /*#__PURE__*/function () {
961
- var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(data) {
962
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
963
- while (1) {
964
- switch (_context24.prev = _context24.next) {
965
- case 0:
966
- _context24.next = 2;
967
- return request.post('/model/v1/api/createCi', data);
968
-
969
- case 2:
970
- return _context24.abrupt("return", _context24.sent);
971
-
972
- case 3:
973
- case "end":
974
- return _context24.stop();
975
- }
976
- }
977
- }, _callee24);
978
- }));
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) {
822
+ case 0:
823
+ _context25.next = 2;
824
+ return request.post('/model/v1/api/createCi', data);
825
+
826
+ case 2:
827
+ return _context25.abrupt("return", _context25.sent);
979
828
 
980
- return function createCi(_x24) {
981
- return _ref24.apply(this, arguments);
982
- };
983
- }();
829
+ case 3:
830
+ case "end":
831
+ return _context25.stop();
832
+ }
833
+ }, _callee25);
834
+ }))).apply(this, arguments);
835
+ };
984
836
  /**
985
837
  * 删除ci类型
986
838
  * @param {Object} param
987
839
  */
988
840
 
989
- export var deleteCi = /*#__PURE__*/function () {
990
- var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(param) {
991
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
992
- while (1) {
993
- switch (_context25.prev = _context25.next) {
994
- case 0:
995
- _context25.next = 2;
996
- return request.post('/model/v1/api/deleteCi', param);
997
-
998
- case 2:
999
- return _context25.abrupt("return", _context25.sent);
1000
-
1001
- case 3:
1002
- case "end":
1003
- return _context25.stop();
1004
- }
1005
- }
1006
- }, _callee25);
1007
- }));
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) {
845
+ case 0:
846
+ _context26.next = 2;
847
+ return request.post('/model/v1/api/deleteCi', param);
848
+
849
+ case 2:
850
+ return _context26.abrupt("return", _context26.sent);
1008
851
 
1009
- return function deleteCi(_x25) {
1010
- return _ref25.apply(this, arguments);
1011
- };
1012
- }();
852
+ case 3:
853
+ case "end":
854
+ return _context26.stop();
855
+ }
856
+ }, _callee26);
857
+ }))).apply(this, arguments);
858
+ };
1013
859
  /**
1014
860
  * 查询所有 CI 类型
1015
861
  * @param {object} params
1016
862
  */
1017
863
 
1018
- export var getAllCi = /*#__PURE__*/function () {
1019
- var _ref26 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(params) {
1020
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
1021
- while (1) {
1022
- switch (_context26.prev = _context26.next) {
1023
- case 0:
1024
- _context26.next = 2;
1025
- return request.post('/model/v1/api/getAllCi', params);
1026
-
1027
- case 2:
1028
- return _context26.abrupt("return", _context26.sent);
1029
-
1030
- case 3:
1031
- case "end":
1032
- return _context26.stop();
1033
- }
1034
- }
1035
- }, _callee26);
1036
- }));
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) {
868
+ case 0:
869
+ _context27.next = 2;
870
+ return request.post('/model/v1/api/getAllCi', params);
871
+
872
+ case 2:
873
+ return _context27.abrupt("return", _context27.sent);
1037
874
 
1038
- return function getAllCi(_x26) {
1039
- return _ref26.apply(this, arguments);
1040
- };
1041
- }();
875
+ case 3:
876
+ case "end":
877
+ return _context27.stop();
878
+ }
879
+ }, _callee27);
880
+ }))).apply(this, arguments);
881
+ };
1042
882
  /**
1043
883
  * 获取类型元数据
1044
884
  * @param {string} code
1045
885
  */
1046
886
 
1047
887
  export function getCiMeta(_x27) {
1048
- return _getCiMeta.apply(this, arguments);
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) {
891
+ case 0:
892
+ _context28.next = 2;
893
+ return request.get("/mdc/v1/api/model-asset/" + code);
894
+
895
+ case 2:
896
+ return _context28.abrupt("return", _context28.sent);
897
+
898
+ case 3:
899
+ case "end":
900
+ return _context28.stop();
901
+ }
902
+ }, _callee28);
903
+ }))).apply(this, arguments);
1049
904
  }
1050
905
  /**
1051
906
  * 格式化ci类型元数据
@@ -1053,90 +908,61 @@ export function getCiMeta(_x27) {
1053
908
  * @param {boolean} userVisibleFilter
1054
909
  */
1055
910
 
1056
- function _getCiMeta() {
1057
- _getCiMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(code) {
1058
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1059
- while (1) {
1060
- switch (_context30.prev = _context30.next) {
1061
- case 0:
1062
- _context30.next = 2;
1063
- return request.get("/mdc/v1/api/model-asset/" + code);
1064
-
1065
- case 2:
1066
- return _context30.abrupt("return", _context30.sent);
1067
-
1068
- case 3:
1069
- case "end":
1070
- return _context30.stop();
1071
- }
1072
- }
1073
- }, _callee30);
1074
- }));
1075
- return _getCiMeta.apply(this, arguments);
1076
- }
1077
-
1078
911
  function formatCiAttributes(_x28, _x29) {
1079
- return _formatCiAttributes.apply(this, arguments);
1080
- } // 属性为用户字典
1081
-
1082
-
1083
- function _formatCiAttributes() {
1084
- _formatCiAttributes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(code, userVisibleFilter) {
912
+ return (_formatCiAttributes = _formatCiAttributes || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(code, userVisibleFilter) {
1085
913
  var meta, attributes;
1086
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
1087
- while (1) {
1088
- switch (_context31.prev = _context31.next) {
1089
- case 0:
1090
- _context31.next = 2;
1091
- return request.post('/model/v1/api/getCi', {
1092
- code: code
1093
- });
1094
-
1095
- case 2:
1096
- meta = _context31.sent;
1097
-
1098
- if (!meta) {
1099
- _context31.next = 9;
1100
- break;
1101
- }
1102
-
1103
- attributes = meta.attributes;
1104
-
1105
- if (attributes) {
1106
- _context31.next = 7;
1107
- break;
1108
- }
1109
-
1110
- return _context31.abrupt("return", meta);
1111
-
1112
- case 7:
1113
- try {
1114
- // 适配后端,使属性正序
1115
- attributes = attributes.reverse(); // 获取过滤userVisible=true的属性(用户可见)
1116
-
1117
- if (userVisibleFilter) {
1118
- meta.attributes = attributes.filter(function (item) {
1119
- return item.userVisible === 'true';
1120
- });
1121
- }
1122
- } catch (error) {
1123
- rlog.error('services=>model=>:', error);
914
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
915
+ while (1) switch (_context29.prev = _context29.next) {
916
+ case 0:
917
+ _context29.next = 2;
918
+ return request.post('/model/v1/api/getCi', {
919
+ code: code
920
+ });
921
+
922
+ case 2:
923
+ meta = _context29.sent;
924
+
925
+ if (!meta) {
926
+ _context29.next = 9;
927
+ break;
928
+ }
929
+
930
+ attributes = meta.attributes;
931
+
932
+ if (attributes) {
933
+ _context29.next = 7;
934
+ break;
935
+ }
936
+
937
+ return _context29.abrupt("return", meta);
938
+
939
+ case 7:
940
+ try {
941
+ // 适配后端,使属性正序
942
+ attributes = attributes.reverse(); // 获取过滤userVisible=true的属性(用户可见)
943
+
944
+ if (userVisibleFilter) {
945
+ meta.attributes = attributes.filter(function (item) {
946
+ return item.userVisible === 'true';
947
+ });
1124
948
  }
949
+ } catch (error) {
950
+ rlog.error('services=>model=>:', error);
951
+ }
1125
952
 
1126
- return _context31.abrupt("return", meta);
953
+ return _context29.abrupt("return", meta);
1127
954
 
1128
- case 9:
1129
- return _context31.abrupt("return", meta);
955
+ case 9:
956
+ return _context29.abrupt("return", meta);
1130
957
 
1131
- case 10:
1132
- case "end":
1133
- return _context31.stop();
1134
- }
958
+ case 10:
959
+ case "end":
960
+ return _context29.stop();
1135
961
  }
1136
- }, _callee31);
1137
- }));
1138
- return _formatCiAttributes.apply(this, arguments);
1139
- }
962
+ }, _callee29);
963
+ }))).apply(this, arguments);
964
+ } // 属性为用户字典
965
+
1140
966
 
1141
967
  var ATTRIBUTE_USER_DICT = 'userDict';
1142
968
  /**
@@ -1170,7 +996,38 @@ function bindDict(data) {
1170
996
  }
1171
997
 
1172
998
  export function queryAllModel(_x30) {
1173
- return _queryAllModel.apply(this, arguments);
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) {
1002
+ case 0:
1003
+ if (isAuth === void 0) {
1004
+ isAuth = false;
1005
+ }
1006
+
1007
+ if (!isAuth) {
1008
+ _context30.next = 5;
1009
+ break;
1010
+ }
1011
+
1012
+ _context30.next = 4;
1013
+ return request.post('/model/v1/api/authority/modelTree');
1014
+
1015
+ case 4:
1016
+ return _context30.abrupt("return", _context30.sent);
1017
+
1018
+ case 5:
1019
+ _context30.next = 7;
1020
+ return request.get('/mdc/v1/api/model-asset/tree');
1021
+
1022
+ case 7:
1023
+ return _context30.abrupt("return", _context30.sent);
1024
+
1025
+ case 8:
1026
+ case "end":
1027
+ return _context30.stop();
1028
+ }
1029
+ }, _callee30);
1030
+ }))).apply(this, arguments);
1174
1031
  }
1175
1032
  /**
1176
1033
  * 查询知识库分类列表
@@ -1186,98 +1043,48 @@ export function queryAllModel(_x30) {
1186
1043
  * 批量查询ci属性
1187
1044
  */
1188
1045
 
1189
- function _queryAllModel() {
1190
- _queryAllModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(isAuth) {
1191
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1192
- while (1) {
1193
- switch (_context32.prev = _context32.next) {
1194
- case 0:
1195
- if (isAuth === void 0) {
1196
- isAuth = false;
1197
- }
1198
-
1199
- if (!isAuth) {
1200
- _context32.next = 5;
1201
- break;
1202
- }
1203
-
1204
- _context32.next = 4;
1205
- return request.post('/model/v1/api/authority/modelTree');
1206
-
1207
- case 4:
1208
- return _context32.abrupt("return", _context32.sent);
1209
-
1210
- case 5:
1211
- _context32.next = 7;
1212
- return request.get('/mdc/v1/api/model-asset/tree');
1213
-
1214
- case 7:
1215
- return _context32.abrupt("return", _context32.sent);
1216
-
1217
- case 8:
1218
- case "end":
1219
- return _context32.stop();
1220
- }
1221
- }
1222
- }, _callee32);
1223
- }));
1224
- return _queryAllModel.apply(this, arguments);
1225
- }
1226
-
1227
- export var getBatchCi = /*#__PURE__*/function () {
1228
- var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(typeCodes) {
1229
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
1230
- while (1) {
1231
- switch (_context27.prev = _context27.next) {
1232
- case 0:
1233
- _context27.next = 2;
1234
- return request.post('/model/v1/api/getBatchCi', {
1235
- typeCodes: typeCodes
1236
- });
1237
-
1238
- case 2:
1239
- return _context27.abrupt("return", _context27.sent);
1240
-
1241
- case 3:
1242
- case "end":
1243
- return _context27.stop();
1244
- }
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) {
1050
+ case 0:
1051
+ _context31.next = 2;
1052
+ return request.post('/model/v1/api/getBatchCi', {
1053
+ typeCodes: typeCodes
1054
+ });
1055
+
1056
+ case 2:
1057
+ return _context31.abrupt("return", _context31.sent);
1058
+
1059
+ case 3:
1060
+ case "end":
1061
+ return _context31.stop();
1245
1062
  }
1246
- }, _callee27);
1247
- }));
1248
-
1249
- return function getBatchCi(_x31) {
1250
- return _ref27.apply(this, arguments);
1251
- };
1252
- }();
1063
+ }, _callee31);
1064
+ }))).apply(this, arguments);
1065
+ };
1253
1066
  /** *
1254
1067
  * 批量查询ci属性
1255
1068
  */
1256
1069
 
1257
- export var getBatchCiMetric = /*#__PURE__*/function () {
1258
- var _ref28 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(typeCodes) {
1259
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1260
- while (1) {
1261
- switch (_context28.prev = _context28.next) {
1262
- case 0:
1263
- _context28.next = 2;
1264
- return request.post('/model/v1/api/getBatchCiMetric', {
1265
- typeCodes: typeCodes
1266
- });
1267
-
1268
- case 2:
1269
- return _context28.abrupt("return", _context28.sent);
1270
-
1271
- case 3:
1272
- case "end":
1273
- return _context28.stop();
1274
- }
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) {
1074
+ case 0:
1075
+ _context32.next = 2;
1076
+ return request.post('/model/v1/api/getBatchCiMetric', {
1077
+ typeCodes: typeCodes
1078
+ });
1079
+
1080
+ case 2:
1081
+ return _context32.abrupt("return", _context32.sent);
1082
+
1083
+ case 3:
1084
+ case "end":
1085
+ return _context32.stop();
1275
1086
  }
1276
- }, _callee28);
1277
- }));
1278
-
1279
- return function getBatchCiMetric(_x32) {
1280
- return _ref28.apply(this, arguments);
1281
- };
1282
- }();
1087
+ }, _callee32);
1088
+ }))).apply(this, arguments);
1089
+ };
1283
1090
  /** ************************************** ci类型 end ************************************ */