@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
@@ -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 =
|
14
|
-
|
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
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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 =
|
45
|
-
|
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
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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 =
|
75
|
-
|
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
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
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 =
|
104
|
-
|
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
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
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 =
|
134
|
-
|
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
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
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 =
|
162
|
-
|
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
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
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 =
|
198
|
-
|
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
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
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 =
|
226
|
-
|
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
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
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 =
|
257
|
-
|
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
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
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 =
|
289
|
-
|
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
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
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 =
|
318
|
-
|
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
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
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 =
|
347
|
-
|
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
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
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 =
|
390
|
-
|
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
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
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 =
|
454
|
-
|
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
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
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.
|
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
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
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
|
-
},
|
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 =
|
575
|
-
|
576
|
-
return _regeneratorRuntime.wrap(function
|
577
|
-
while (1) {
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
return
|
582
|
-
|
583
|
-
|
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
|
-
|
588
|
-
|
492
|
+
case 2:
|
493
|
+
return _context17.abrupt("return", _context17.sent);
|
589
494
|
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
}
|
495
|
+
case 3:
|
496
|
+
case "end":
|
497
|
+
return _context17.stop();
|
594
498
|
}
|
595
|
-
},
|
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 =
|
632
|
-
|
633
|
-
return _regeneratorRuntime.wrap(function
|
634
|
-
while (1) {
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
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
|
-
|
642
|
-
|
540
|
+
_context18.next = 3;
|
541
|
+
return modelDictList();
|
643
542
|
|
644
|
-
|
645
|
-
|
543
|
+
case 3:
|
544
|
+
return _context18.abrupt("return", _context18.sent);
|
646
545
|
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
}
|
546
|
+
case 4:
|
547
|
+
case "end":
|
548
|
+
return _context18.stop();
|
651
549
|
}
|
652
|
-
},
|
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 =
|
692
|
-
|
693
|
-
return _regeneratorRuntime.wrap(function
|
694
|
-
while (1) {
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
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
|
-
|
712
|
-
|
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 =
|
741
|
-
|
742
|
-
return _regeneratorRuntime.wrap(function
|
743
|
-
while (1) {
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
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
|
-
|
761
|
-
|
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 =
|
781
|
-
|
782
|
-
return _regeneratorRuntime.wrap(function
|
783
|
-
while (1) {
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
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
|
-
},
|
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 =
|
820
|
-
|
821
|
-
return _regeneratorRuntime.wrap(function
|
822
|
-
while (1) {
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
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
|
-
|
840
|
-
|
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 =
|
852
|
-
|
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
|
855
|
-
while (1) {
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
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
|
-
},
|
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 =
|
907
|
-
|
908
|
-
return _regeneratorRuntime.wrap(function
|
909
|
-
while (1) {
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
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
|
-
|
927
|
-
|
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 =
|
961
|
-
|
962
|
-
return _regeneratorRuntime.wrap(function
|
963
|
-
while (1) {
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
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
|
-
|
981
|
-
|
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 =
|
990
|
-
|
991
|
-
return _regeneratorRuntime.wrap(function
|
992
|
-
while (1) {
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
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
|
-
|
1010
|
-
|
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 =
|
1019
|
-
|
1020
|
-
return _regeneratorRuntime.wrap(function
|
1021
|
-
while (1) {
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
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
|
-
|
1039
|
-
|
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.
|
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.
|
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
|
1087
|
-
while (1) {
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
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
|
-
|
953
|
+
return _context29.abrupt("return", meta);
|
1127
954
|
|
1128
|
-
|
1129
|
-
|
955
|
+
case 9:
|
956
|
+
return _context29.abrupt("return", meta);
|
1130
957
|
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
}
|
958
|
+
case 10:
|
959
|
+
case "end":
|
960
|
+
return _context29.stop();
|
1135
961
|
}
|
1136
|
-
},
|
1137
|
-
}));
|
1138
|
-
|
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.
|
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
|
1190
|
-
|
1191
|
-
return _regeneratorRuntime.wrap(function
|
1192
|
-
while (1) {
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
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
|
-
},
|
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 =
|
1258
|
-
|
1259
|
-
return _regeneratorRuntime.wrap(function
|
1260
|
-
while (1) {
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
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
|
-
},
|
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 ************************************ */
|