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