@cloud-app-dev/vidc 1.0.49 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.umirc.ts +1 -2
- package/es/Api/index.d.ts +3 -4
- package/es/Api/index.js +7 -8
- package/es/AppContext/Sync.d.ts +6 -0
- package/es/AppContext/Sync.js +47 -0
- package/es/AppContext/index.d.ts +10 -0
- package/es/AppContext/index.js +117 -0
- package/es/AppContext/interface.d.ts +29 -0
- package/es/AppContext/static.d.ts +6 -0
- package/es/AppContext/static.js +6 -0
- package/es/{AppLayout/AppTools → AppRedirect}/index.css +0 -0
- package/es/AppRedirect/index.d.ts +16 -0
- package/es/AppRedirect/index.js +38 -0
- package/es/AppRoute/Render.d.ts +23 -0
- package/es/AppRoute/Render.js +111 -0
- package/es/AppRoute/Rendered.d.ts +4 -0
- package/es/AppRoute/Rendered.js +11 -0
- package/es/{DagInitialConfig → AppRoute}/index.css +0 -0
- package/es/AppRoute/index.d.ts +14 -0
- package/es/{AppLayout/Header/NotifyAlarm.js → AppRoute/index.js} +52 -68
- package/es/AppRoute/interface.d.ts +18 -0
- package/es/AppRoute/utils.d.ts +1 -0
- package/es/AppRoute/utils.js +28 -0
- package/es/Auth/index.d.ts +8 -0
- package/es/Auth/index.js +17 -0
- package/es/AutoExit/index.js +8 -5
- package/es/CheckGroupFixed/index.css +49 -0
- package/es/CheckGroupFixed/index.d.ts +17 -0
- package/es/CheckGroupFixed/index.js +146 -0
- package/es/Config/index.d.ts +4 -0
- package/es/Config/index.js +44 -0
- package/es/Config/interface.d.ts +47 -0
- package/es/Config/utils.d.ts +16 -0
- package/es/Config/utils.js +54 -0
- package/es/ConfigContext/index.d.ts +9 -0
- package/es/ConfigContext/index.js +3 -0
- package/es/ContentBox/BetweenBox/index.css +5 -0
- package/es/ContentBox/BetweenBox/index.d.ts +12 -0
- package/es/ContentBox/BetweenBox/index.js +24 -0
- package/es/ContentBox/InfoBox/index.css +23 -0
- package/es/ContentBox/InfoBox/index.d.ts +12 -0
- package/es/ContentBox/InfoBox/index.js +26 -0
- package/es/ContentBox/TwoColumnBox/index.css +77 -0
- package/es/ContentBox/TwoColumnBox/index.d.ts +10 -0
- package/es/ContentBox/TwoColumnBox/index.js +50 -0
- package/es/ContentBox/deps/content-grid.d.ts +9 -0
- package/es/ContentBox/deps/content-grid.js +9 -0
- package/es/ContentBox/deps/grid-factory.d.ts +10 -0
- package/es/ContentBox/deps/grid-factory.js +72 -0
- package/es/ContentBox/deps/simple-grid.d.ts +9 -0
- package/es/ContentBox/deps/simple-grid.js +8 -0
- package/es/ContentBox/index.css +9 -0
- package/es/ContentBox/index.d.ts +14 -0
- package/es/ContentBox/index.js +28 -0
- package/es/DeviceIcon/icon.js +5 -5
- package/es/DeviceIcon/index.js +2 -2
- package/es/DeviceList/index.d.ts +1 -1
- package/es/DeviceList/index.js +4 -4
- package/es/DeviceSelect/index.js +2 -2
- package/es/Dict/cache.d.ts +3 -0
- package/es/Dict/cache.js +21 -0
- package/es/Dict/desc.d.ts +64 -0
- package/es/Dict/desc.js +162 -0
- package/es/Dict/device.d.ts +28 -0
- package/es/Dict/device.js +117 -0
- package/es/Dict/hook.d.ts +4 -0
- package/es/Dict/hook.js +114 -0
- package/es/Dict/index.d.ts +13 -0
- package/es/Dict/index.js +14 -0
- package/es/Dict/interface.d.ts +16 -0
- package/es/Dict/utils.d.ts +11 -0
- package/es/Dict/utils.js +51 -0
- package/es/Drag/DragAndDropItem.d.ts +4 -0
- package/es/Drag/DragAndDropItem.js +145 -0
- package/es/Drag/DropItem.d.ts +4 -0
- package/es/Drag/DropItem.js +54 -0
- package/es/{DagInitialRequest → Drag}/index.css +0 -0
- package/es/Drag/index.d.ts +7 -0
- package/es/Drag/index.js +7 -0
- package/es/Drag/interface.d.ts +16 -0
- package/es/Drawer/Demo.d.ts +3 -0
- package/es/Drawer/Demo.js +52 -0
- package/es/Drawer/Footer.d.ts +4 -0
- package/es/Drawer/Footer.js +26 -0
- package/es/Drawer/index.css +39 -0
- package/es/Drawer/index.d.ts +12 -0
- package/es/Drawer/index.js +41 -0
- package/es/Drawer/interface.d.ts +191 -0
- package/es/DynamicDeviceList/CheckExt.js +3 -3
- package/es/DynamicDeviceList/index.js +2 -2
- package/es/DynamicDeviceList/utils.js +2 -2
- package/es/DynamicList/demo.d.ts +2 -0
- package/es/{DagInitialRequest/index.js → DynamicList/demo.js} +49 -55
- package/es/DynamicList/index.css +7 -0
- package/es/DynamicList/index.d.ts +31 -0
- package/es/DynamicList/index.js +132 -0
- package/es/FullScreen/index.css +16 -0
- package/es/FullScreen/index.d.ts +10 -0
- package/es/FullScreen/index.js +68 -0
- package/es/HightLevel/index.css +3 -0
- package/es/HightLevel/index.d.ts +9 -0
- package/es/HightLevel/index.js +22 -0
- package/es/{Upload → IconFont}/index.css +0 -0
- package/es/IconFont/index.d.ts +13 -0
- package/es/IconFont/index.js +58 -0
- package/es/ImageView/index.css +6 -0
- package/es/ImageView/index.d.ts +17 -0
- package/es/ImageView/index.js +58 -0
- package/es/InitialConfig/index.d.ts +5 -7
- package/es/InitialConfig/index.js +16 -51
- package/es/InitialConfig/utils.d.ts +15 -0
- package/es/InitialConfig/utils.js +40 -305
- package/es/InitialRequest/index.d.ts +5 -11
- package/es/InitialRequest/index.js +50 -67
- package/es/InitialRequest/utils.d.ts +8 -0
- package/es/InitialRequest/utils.js +28 -567
- package/es/Input/index.css +8 -0
- package/es/Input/index.d.ts +18 -0
- package/es/{DagInitialConfig → Input}/index.js +50 -45
- package/es/LabelValue/index.css +18 -0
- package/es/LabelValue/index.d.ts +23 -0
- package/es/LabelValue/index.js +32 -0
- package/es/List/CheckExt.d.ts +10 -0
- package/es/List/CheckExt.js +28 -0
- package/es/List/index.css +62 -6
- package/es/List/index.d.ts +73 -11
- package/es/List/index.js +162 -36
- package/es/List/renderItem.d.ts +20 -0
- package/es/List/renderItem.js +68 -0
- package/es/List/utils.d.ts +5 -0
- package/es/List/utils.js +18 -0
- package/es/ListExt/index.css +9 -0
- package/es/ListExt/index.d.ts +19 -0
- package/es/ListExt/index.js +44 -0
- package/es/LoaderScript/index.d.ts +26 -0
- package/es/LoaderScript/index.js +127 -0
- package/es/LoaderScript/interface.d.ts +26 -0
- package/es/LoaderScript/utils.d.ts +12 -0
- package/es/LoaderScript/utils.js +110 -0
- package/es/Modal/index.css +43 -0
- package/es/Modal/index.d.ts +17 -0
- package/es/Modal/index.js +34 -0
- package/es/Modal/interface.d.ts +339 -0
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +7 -0
- package/es/Picture/component/DefaultRects/RectInfo.js +94 -0
- package/es/Picture/component/DefaultRects/index.css +247 -0
- package/es/Picture/component/DefaultRects/index.d.ts +12 -0
- package/es/Picture/component/DefaultRects/index.js +47 -0
- package/es/Picture/component/DefaultRects/utils.d.ts +2 -0
- package/es/Picture/component/DefaultRects/utils.js +11 -0
- package/es/Picture/component/DrawRect/index.css +8 -0
- package/es/Picture/component/DrawRect/index.d.ts +14 -0
- package/es/Picture/component/DrawRect/index.js +41 -0
- package/es/Picture/component/MoveContent/index.css +0 -0
- package/es/Picture/component/MoveContent/index.d.ts +39 -0
- package/es/Picture/component/MoveContent/index.js +240 -0
- package/es/Picture/component/MoveContent/utils.d.ts +4 -0
- package/es/Picture/component/MoveContent/utils.js +19 -0
- package/es/Picture/component/RectMenu/index.css +31 -0
- package/es/Picture/component/RectMenu/index.d.ts +13 -0
- package/es/Picture/component/RectMenu/index.js +81 -0
- package/es/Picture/component/RectMenu/utils.d.ts +12 -0
- package/es/Picture/component/RectMenu/utils.js +22 -0
- package/es/Picture/component/Tools/index.css +42 -0
- package/es/Picture/component/Tools/index.d.ts +13 -0
- package/es/Picture/component/Tools/index.js +83 -0
- package/es/Picture/component/WheelScale/index.d.ts +6 -0
- package/es/Picture/component/WheelScale/index.js +29 -0
- package/es/Picture/dragBound.d.ts +5 -0
- package/es/Picture/dragBound.js +77 -0
- package/es/Picture/index.css +12 -0
- package/es/Picture/index.d.ts +16 -0
- package/es/Picture/index.js +344 -0
- package/es/Picture/interface.d.ts +67 -0
- package/es/Picture/loadCaptureRectImage.d.ts +8 -0
- package/es/Picture/loadCaptureRectImage.js +119 -0
- package/es/Picture/useDraw.d.ts +1 -0
- package/es/Picture/useDraw.js +136 -0
- package/es/Picture/utils.d.ts +22 -0
- package/es/Picture/utils.js +90 -0
- package/es/Progress/index.css +20 -0
- package/es/Progress/index.d.ts +11 -0
- package/es/{AppLayout/Header/ThemeTools.js → Progress/index.js} +46 -47
- package/es/RefDrawer/index.js +4 -5
- package/es/RefModal/index.js +4 -5
- package/es/ScrollList/index.css +73 -0
- package/es/ScrollList/index.d.ts +24 -0
- package/es/ScrollList/index.js +261 -0
- package/es/ScrollList/utils.js +84 -0
- package/es/Service/http.d.ts +4 -0
- package/es/Service/http.js +135 -0
- package/es/Service/index.d.ts +3 -0
- package/es/Service/index.js +14 -0
- package/es/Service/interface.d.ts +28 -0
- package/es/Service/logger.d.ts +3 -0
- package/es/Service/logger.js +13 -0
- package/es/Service/middleware.d.ts +5 -0
- package/es/Service/middleware.js +15 -0
- package/es/Service/utils.d.ts +3 -0
- package/es/Service/utils.js +11 -0
- package/es/TableLayout/index.css +4 -0
- package/es/TableLayout/index.d.ts +10 -0
- package/es/TableLayout/index.js +64 -0
- package/es/ThemeAntd/index.css +501 -0
- package/es/ThemeAntd/index.d.ts +7 -0
- package/es/ThemeAntd/index.js +6 -0
- package/es/ThemeAntd/style/button.css +46 -0
- package/es/ThemeAntd/style/checkbox.css +64 -0
- package/es/ThemeAntd/style/form.css +10 -0
- package/es/ThemeAntd/style/input.css +58 -0
- package/es/ThemeAntd/style/pagination.css +44 -0
- package/es/ThemeAntd/style/picker.css +86 -0
- package/es/ThemeAntd/style/popover.css +3 -0
- package/es/ThemeAntd/style/radio.css +71 -0
- package/es/ThemeAntd/style/scrollbar.css +19 -0
- package/es/ThemeAntd/style/select.css +57 -0
- package/es/ThemeAntd/style/table.css +36 -0
- package/es/ThemeAntd/style/tree.css +4 -0
- package/es/{OrgUserTree → Tree}/demo.d.ts +0 -0
- package/es/Tree/demo.js +69 -0
- package/es/Tree/index.css +64 -0
- package/es/Tree/index.d.ts +24 -0
- package/es/Tree/index.js +83 -0
- package/es/TreeMode/index.d.ts +1 -1
- package/es/TreeMode/index.js +6 -6
- package/es/TreeTitle/index.js +2 -2
- package/es/UserSelect/index.d.ts +3 -3
- package/es/UserSelect/index.js +13 -15
- package/es/VList/index.css +4 -0
- package/es/VList/index.d.ts +16 -0
- package/es/VList/index.js +56 -0
- package/es/VList/utils.d.ts +10 -0
- package/es/VList/utils.js +17 -0
- package/es/WorkerFlow/Demo.js +1 -0
- package/es/WorkerFlow/Form/Condition.js +6 -6
- package/es/WorkerFlow/Form/EmptyUserSet.js +2 -2
- package/es/WorkerFlow/Form/FormAuth.js +2 -2
- package/es/WorkerFlow/Form/GroupList.d.ts +2 -1
- package/es/WorkerFlow/Form/GroupList.js +3 -2
- package/es/WorkerFlow/Form/GroupSelect.js +2 -2
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +9 -7
- package/es/WorkerFlow/Form/LevelGroupSelect.js +3 -3
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +2 -2
- package/es/WorkerFlow/Form/UserSelect.js +2 -2
- package/es/WorkerFlow/Form/UserSelectModalContent.js +3 -4
- package/es/WorkerFlow/Form/UserSet.js +2 -2
- package/es/WorkerFlow/Nodes/Add.js +2 -3
- package/es/WorkerFlow/Nodes/AddOption.js +2 -2
- package/es/WorkerFlow/Nodes/Approver.js +2 -2
- package/es/WorkerFlow/Nodes/Condition.js +2 -2
- package/es/WorkerFlow/Nodes/Handle.js +2 -2
- package/es/WorkerFlow/Nodes/Notifier.js +2 -2
- package/es/WorkerFlow/Nodes/TitleElement.js +17 -13
- package/es/WorkerFlow/index.js +37 -9
- package/es/core.d.ts +27 -0
- package/es/index.d.ts +34 -8
- package/es/index.js +34 -8
- package/es/useChangeEffect/index.d.ts +3 -0
- package/es/useChangeEffect/index.js +32 -0
- package/es/useDrawer/index.d.ts +14 -0
- package/es/useDrawer/index.js +90 -0
- package/es/useHistory/index.css +0 -0
- package/es/useHistory/index.d.ts +3 -0
- package/es/useHistory/index.js +14 -0
- package/es/useHttp/index.d.ts +8 -0
- package/es/useHttp/index.js +78 -0
- package/es/useModal/index.d.ts +14 -0
- package/es/useModal/index.js +92 -0
- package/es/utils.d.ts +2 -0
- package/es/utils.js +32 -0
- package/package.json +12 -6
- package/es/AppLayout/AppHeader/index.css +0 -4
- package/es/AppLayout/AppHeader/index.d.ts +0 -18
- package/es/AppLayout/AppHeader/index.js +0 -41
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +0 -1
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.js +0 -10
- package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppHorizontalMenu/SubGroup.js +0 -57
- package/es/AppLayout/AppHorizontalMenu/index.css +0 -152
- package/es/AppLayout/AppHorizontalMenu/index.d.ts +0 -13
- package/es/AppLayout/AppHorizontalMenu/index.js +0 -230
- package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppInlineMenu/SubGroup.js +0 -34
- package/es/AppLayout/AppInlineMenu/index.css +0 -110
- package/es/AppLayout/AppInlineMenu/index.d.ts +0 -12
- package/es/AppLayout/AppInlineMenu/index.js +0 -194
- package/es/AppLayout/AppLogo/index.css +0 -74
- package/es/AppLayout/AppLogo/index.d.ts +0 -13
- package/es/AppLayout/AppLogo/index.js +0 -100
- package/es/AppLayout/AppTools/index.d.ts +0 -8
- package/es/AppLayout/AppTools/index.js +0 -10
- package/es/AppLayout/FunctionPreview/index.css +0 -128
- package/es/AppLayout/FunctionPreview/index.d.ts +0 -22
- package/es/AppLayout/FunctionPreview/index.js +0 -218
- package/es/AppLayout/Header/ListenceRoute.d.ts +0 -5
- package/es/AppLayout/Header/ListenceRoute.js +0 -28
- package/es/AppLayout/Header/ModifyPassword/index.d.ts +0 -6
- package/es/AppLayout/Header/ModifyPassword/index.js +0 -201
- package/es/AppLayout/Header/ModifyUserAvatar/index.css +0 -25
- package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +0 -10
- package/es/AppLayout/Header/ModifyUserAvatar/index.js +0 -97
- package/es/AppLayout/Header/Tools.d.ts +0 -11
- package/es/AppLayout/Header/Tools.js +0 -86
- package/es/AppLayout/Header/ToolsItem.d.ts +0 -1
- package/es/AppLayout/Header/ToolsItem.js +0 -12
- package/es/AppLayout/Header/UserAction.d.ts +0 -10
- package/es/AppLayout/Header/UserAction.js +0 -224
- package/es/AppLayout/Header/index.css +0 -136
- package/es/AppLayout/Header/index.d.ts +0 -9
- package/es/AppLayout/Header/index.js +0 -36
- package/es/AppLayout/index.css +0 -21
- package/es/AppLayout/index.d.ts +0 -12
- package/es/AppLayout/index.js +0 -38
- package/es/AppLayout/service/index.js +0 -174
- package/es/AppLayout/service/prefix.js +0 -4
- package/es/AppLayout/service/url.js +0 -35
- package/es/AppLayout/utils/menu.js +0 -24
- package/es/AppLayout/utils.d.ts +0 -4
- package/es/AppLayout/utils.js +0 -112
- package/es/DagInitialConfig/index.d.ts +0 -10
- package/es/DagInitialConfig/utils.js +0 -185
- package/es/DagInitialRequest/index.d.ts +0 -10
- package/es/DagInitialRequest/utils.js +0 -573
- package/es/FormContent/index.css +0 -27
- package/es/FormContent/index.d.ts +0 -19
- package/es/FormContent/index.js +0 -58
- package/es/OrgTree/index.css +0 -39
- package/es/OrgTree/index.d.ts +0 -16
- package/es/OrgTree/index.js +0 -176
- package/es/OrgUserTree/demo.js +0 -20
- package/es/OrgUserTree/index.css +0 -31
- package/es/OrgUserTree/index.d.ts +0 -28
- package/es/OrgUserTree/index.js +0 -131
- package/es/PlaceTree/demo.d.ts +0 -2
- package/es/PlaceTree/demo.js +0 -20
- package/es/PlaceTree/index.css +0 -40
- package/es/PlaceTree/index.d.ts +0 -26
- package/es/PlaceTree/index.js +0 -174
- package/es/Upload/AntUpload/index.css +0 -22
- package/es/Upload/AntUpload/index.d.ts +0 -19
- package/es/Upload/AntUpload/index.js +0 -226
- package/es/Upload/UploadChildren/index.css +0 -28
- package/es/Upload/UploadChildren/index.js +0 -26
- package/es/Upload/index.d.ts +0 -9
- package/es/Upload/index.js +0 -7
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UserInfoType, OperationInfoType } from '../AppContext/interface';
|
|
2
|
+
import { FeatureItemType } from '../Config/interface';
|
|
3
|
+
export declare function initialization(): Promise<{
|
|
4
|
+
userInfo: UserInfoType;
|
|
5
|
+
userPrivileges: FeatureItemType[];
|
|
6
|
+
centerPrivileges: FeatureItemType[];
|
|
7
|
+
centerInfo: OperationInfoType;
|
|
8
|
+
}>;
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
2
|
-
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
3
|
-
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
4
1
|
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
5
2
|
|
|
6
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
-
|
|
8
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9
|
-
|
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
-
|
|
12
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
-
|
|
14
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
|
|
16
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
-
|
|
18
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
|
-
|
|
20
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
4
|
|
|
22
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -29,9 +12,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
29
12
|
|
|
30
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
14
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
import { __awaiter } from "tslib";
|
|
16
|
+
import Config from '../Config';
|
|
17
|
+
import Service from '../Service';
|
|
35
18
|
|
|
36
19
|
function catchPromise(fn) {
|
|
37
20
|
return new Promise(function (resolve) {
|
|
@@ -39,19 +22,15 @@ function catchPromise(fn) {
|
|
|
39
22
|
return resolve(res);
|
|
40
23
|
}, function (err) {
|
|
41
24
|
console.error(err);
|
|
42
|
-
resolve();
|
|
25
|
+
resolve(null);
|
|
43
26
|
});
|
|
44
27
|
});
|
|
45
28
|
}
|
|
46
29
|
|
|
47
30
|
var method = 'post';
|
|
48
31
|
export function initialization() {
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
function _initialization() {
|
|
53
|
-
_initialization = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
54
|
-
var headers, result, userInfo, userId, operationCenterId, data, data2, centerUrl, centerInfo, themeInfo, themeConfig, themeStyle, themeId, themeUrl, themeRes, _themeRes$data, userPrivilegesUrl, centerPrivilegesUrl, allPrivilegesUrl, systemInfoUrl, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, userPrivileges, _yield$Promise$all2$2, centerPrivileges, _yield$Promise$all2$3, allPrivileges, systemInfo;
|
|
32
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
33
|
+
var headers, result, userInfo, userId, operationCenterId, data, data2, centerUrl, centerInfo, themeInfo, themeConfig, themeId, themeUrl, themeRes, userPrivilegesUrl, centerPrivilegesUrl, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, userPrivileges, _yield$Promise$all2$2, centerPrivileges;
|
|
55
34
|
|
|
56
35
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
57
36
|
while (1) {
|
|
@@ -61,7 +40,7 @@ function _initialization() {
|
|
|
61
40
|
Authorization: _cache.getCache('token', 'session')
|
|
62
41
|
};
|
|
63
42
|
_context.next = 3;
|
|
64
|
-
return
|
|
43
|
+
return Service.$http({
|
|
65
44
|
url: '/api/user/v1/getUserByToken',
|
|
66
45
|
method: method,
|
|
67
46
|
headers: headers,
|
|
@@ -81,7 +60,7 @@ function _initialization() {
|
|
|
81
60
|
};
|
|
82
61
|
centerUrl = "/api/user/operationCenter/v1/operationCenters/".concat(operationCenterId);
|
|
83
62
|
_context.next = 12;
|
|
84
|
-
return
|
|
63
|
+
return Service.$http({
|
|
85
64
|
data: data2,
|
|
86
65
|
method: method,
|
|
87
66
|
url: centerUrl,
|
|
@@ -92,7 +71,7 @@ function _initialization() {
|
|
|
92
71
|
case 12:
|
|
93
72
|
centerInfo = _context.sent;
|
|
94
73
|
_context.next = 15;
|
|
95
|
-
return
|
|
74
|
+
return Service.$http({
|
|
96
75
|
url: "/api/micro/configureApplication/v1/queryConfigureApplicationById/".concat(operationCenterId)
|
|
97
76
|
});
|
|
98
77
|
|
|
@@ -100,74 +79,50 @@ function _initialization() {
|
|
|
100
79
|
themeInfo = _context.sent;
|
|
101
80
|
themeConfig = themeInfo.data || {}; // eslint-disable-next-line no-eval
|
|
102
81
|
|
|
103
|
-
themeStyle = {
|
|
104
|
-
tabType: themeConfig.tabType ? eval(themeConfig.tabType) : true,
|
|
105
|
-
menuType: themeConfig.menuType || 'horizontal'
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
_Store.app.updateThemeStyle(themeStyle);
|
|
109
|
-
|
|
110
82
|
themeId = themeConfig.themeId || centerInfo.data.hues;
|
|
111
83
|
|
|
112
84
|
if (!themeId) {
|
|
113
|
-
_context.next =
|
|
85
|
+
_context.next = 24;
|
|
114
86
|
break;
|
|
115
87
|
}
|
|
116
88
|
|
|
117
89
|
themeUrl = "/api/micro/configure/v1/queryConfigureByConfigureId/".concat(themeId);
|
|
118
|
-
_context.next =
|
|
119
|
-
return
|
|
90
|
+
_context.next = 22;
|
|
91
|
+
return Service.$http({
|
|
120
92
|
data: data2,
|
|
121
93
|
method: 'get',
|
|
122
94
|
url: themeUrl,
|
|
123
|
-
headers: headers
|
|
124
|
-
requestId: 'themeRes'
|
|
95
|
+
headers: headers
|
|
125
96
|
});
|
|
126
97
|
|
|
127
|
-
case
|
|
98
|
+
case 22:
|
|
128
99
|
themeRes = _context.sent;
|
|
129
100
|
|
|
130
101
|
try {
|
|
131
|
-
|
|
102
|
+
Config.registerThemeConfig(themeRes.data);
|
|
132
103
|
} catch (e) {
|
|
133
104
|
console.error(e);
|
|
134
105
|
}
|
|
135
106
|
|
|
136
|
-
case
|
|
107
|
+
case 24:
|
|
137
108
|
userPrivilegesUrl = "/api/user/role/v1/queryUserRoles/".concat(userId);
|
|
138
109
|
centerPrivilegesUrl = "/api/micro/applicationSystemScene/v1/queryAllFunctionByApplicationSystemId/".concat(operationCenterId);
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
_context.next = 32;
|
|
142
|
-
return Promise.all([catchPromise(_Service.$http({
|
|
110
|
+
_context.next = 28;
|
|
111
|
+
return Promise.all([catchPromise(Service.$http({
|
|
143
112
|
data: data,
|
|
144
113
|
method: method,
|
|
145
114
|
url: userPrivilegesUrl,
|
|
146
|
-
headers: headers
|
|
147
|
-
|
|
148
|
-
})), catchPromise(_Service.$http({
|
|
115
|
+
headers: headers
|
|
116
|
+
})), catchPromise(Service.$http({
|
|
149
117
|
data: data2,
|
|
150
118
|
method: 'get',
|
|
151
119
|
url: centerPrivilegesUrl,
|
|
152
|
-
headers: headers
|
|
153
|
-
|
|
154
|
-
})), catchPromise(_Service.$http({
|
|
155
|
-
method: 'get',
|
|
156
|
-
url: allPrivilegesUrl,
|
|
157
|
-
headers: headers,
|
|
158
|
-
requestId: 'allPrivilegesUrl'
|
|
159
|
-
})), catchPromise(_Service.$http({
|
|
160
|
-
data: data,
|
|
161
|
-
method: method,
|
|
162
|
-
url: systemInfoUrl,
|
|
163
|
-
headers: headers,
|
|
164
|
-
requestId: 'systemInfoUrl'
|
|
165
|
-
})) //获取用户系统信息
|
|
166
|
-
]);
|
|
120
|
+
headers: headers
|
|
121
|
+
}))]);
|
|
167
122
|
|
|
168
|
-
case
|
|
123
|
+
case 28:
|
|
169
124
|
_yield$Promise$all = _context.sent;
|
|
170
|
-
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all,
|
|
125
|
+
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
171
126
|
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
172
127
|
userPrivileges = _yield$Promise$all2$ === void 0 ? {
|
|
173
128
|
data: []
|
|
@@ -176,512 +131,18 @@ function _initialization() {
|
|
|
176
131
|
centerPrivileges = _yield$Promise$all2$2 === void 0 ? {
|
|
177
132
|
data: []
|
|
178
133
|
} : _yield$Promise$all2$2;
|
|
179
|
-
_yield$Promise$all2$3 = _yield$Promise$all2[2];
|
|
180
|
-
allPrivileges = _yield$Promise$all2$3 === void 0 ? {
|
|
181
|
-
data: []
|
|
182
|
-
} : _yield$Promise$all2$3;
|
|
183
|
-
systemInfo = _yield$Promise$all2[3];
|
|
184
134
|
return _context.abrupt("return", {
|
|
185
135
|
userInfo: userInfo,
|
|
186
|
-
userPrivileges: userPrivileges,
|
|
187
|
-
centerPrivileges: centerPrivileges,
|
|
188
|
-
|
|
189
|
-
centerInfo: centerInfo,
|
|
190
|
-
systemInfo: systemInfo
|
|
136
|
+
userPrivileges: userPrivileges.data,
|
|
137
|
+
centerPrivileges: centerPrivileges.data,
|
|
138
|
+
centerInfo: centerInfo
|
|
191
139
|
});
|
|
192
140
|
|
|
193
|
-
case
|
|
141
|
+
case 35:
|
|
194
142
|
case "end":
|
|
195
143
|
return _context.stop();
|
|
196
144
|
}
|
|
197
145
|
}
|
|
198
146
|
}, _callee);
|
|
199
147
|
}));
|
|
200
|
-
return _initialization.apply(this, arguments);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export function queryOrganizationsList(_x) {
|
|
204
|
-
return _queryOrganizationsList.apply(this, arguments);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function _queryOrganizationsList() {
|
|
208
|
-
_queryOrganizationsList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(options) {
|
|
209
|
-
var headers, url, res, data;
|
|
210
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
211
|
-
while (1) {
|
|
212
|
-
switch (_context2.prev = _context2.next) {
|
|
213
|
-
case 0:
|
|
214
|
-
headers = {
|
|
215
|
-
Authorization: _cache.getCache('token', 'session')
|
|
216
|
-
};
|
|
217
|
-
url = '/api/udm-api/DeviceBuzTree/queryList';
|
|
218
|
-
_context2.next = 4;
|
|
219
|
-
return _Service.$http({
|
|
220
|
-
headers: headers,
|
|
221
|
-
url: url,
|
|
222
|
-
method: 'post',
|
|
223
|
-
requestId: 'queryBusinessTree',
|
|
224
|
-
data: {}
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
case 4:
|
|
228
|
-
res = _context2.sent;
|
|
229
|
-
data = res.data || [];
|
|
230
|
-
data.forEach(function (v) {
|
|
231
|
-
v.organizationName = v.groupName;
|
|
232
|
-
v.organizationDescription = v.description;
|
|
233
|
-
});
|
|
234
|
-
return _context2.abrupt("return", {
|
|
235
|
-
data: data
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
case 8:
|
|
239
|
-
case "end":
|
|
240
|
-
return _context2.stop();
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}, _callee2);
|
|
244
|
-
}));
|
|
245
|
-
return _queryOrganizationsList.apply(this, arguments);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export function queryUserOrganizationsList(_x2) {
|
|
249
|
-
return _queryUserOrganizationsList.apply(this, arguments);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
function _queryUserOrganizationsList() {
|
|
253
|
-
_queryUserOrganizationsList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(options) {
|
|
254
|
-
var headers, url;
|
|
255
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
256
|
-
while (1) {
|
|
257
|
-
switch (_context3.prev = _context3.next) {
|
|
258
|
-
case 0:
|
|
259
|
-
headers = {
|
|
260
|
-
Authorization: _cache.getCache('token', 'session')
|
|
261
|
-
};
|
|
262
|
-
url = '/api/user/v1/organization/queryChildOrganizationsById';
|
|
263
|
-
return _context3.abrupt("return", catchPromise(_Service.$http({
|
|
264
|
-
headers: headers,
|
|
265
|
-
url: url,
|
|
266
|
-
method: 'post',
|
|
267
|
-
requestId: 'queryOrganizationsList',
|
|
268
|
-
data: _objectSpread({
|
|
269
|
-
selectChildOrganization: true
|
|
270
|
-
}, options)
|
|
271
|
-
})));
|
|
272
|
-
|
|
273
|
-
case 3:
|
|
274
|
-
case "end":
|
|
275
|
-
return _context3.stop();
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}, _callee3);
|
|
279
|
-
}));
|
|
280
|
-
return _queryUserOrganizationsList.apply(this, arguments);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export function queryPlacesList(_x3) {
|
|
284
|
-
return _queryPlacesList.apply(this, arguments);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
function _queryPlacesList() {
|
|
288
|
-
_queryPlacesList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(orgId) {
|
|
289
|
-
var headers, url, url2, data, res, _res, _res$, placeDeviceList, _res$2, placeAuthList;
|
|
290
|
-
|
|
291
|
-
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
292
|
-
while (1) {
|
|
293
|
-
switch (_context4.prev = _context4.next) {
|
|
294
|
-
case 0:
|
|
295
|
-
headers = {
|
|
296
|
-
Authorization: _cache.getCache('token', 'session')
|
|
297
|
-
};
|
|
298
|
-
url = '/api/place/v1/getPlacesByHasDevice';
|
|
299
|
-
url2 = '/api/user/v1/organization/queryPlacesByOrganizationId';
|
|
300
|
-
data = {
|
|
301
|
-
organizationId: orgId,
|
|
302
|
-
includeSubOrgIds: true
|
|
303
|
-
};
|
|
304
|
-
_context4.next = 6;
|
|
305
|
-
return Promise.all([catchPromise(_Service.$http({
|
|
306
|
-
method: method,
|
|
307
|
-
url: url,
|
|
308
|
-
headers: headers,
|
|
309
|
-
data: {},
|
|
310
|
-
requestId: 'getPlacesByHasDevice'
|
|
311
|
-
})), catchPromise(_Service.$http({
|
|
312
|
-
method: method,
|
|
313
|
-
url: url2,
|
|
314
|
-
headers: headers,
|
|
315
|
-
data: data,
|
|
316
|
-
requestId: 'queryPlacesByOrganizationId'
|
|
317
|
-
})) //获取运营中心菜单
|
|
318
|
-
]);
|
|
319
|
-
|
|
320
|
-
case 6:
|
|
321
|
-
res = _context4.sent;
|
|
322
|
-
_res = _slicedToArray(res, 2), _res$ = _res[0], placeDeviceList = _res$ === void 0 ? {
|
|
323
|
-
data: []
|
|
324
|
-
} : _res$, _res$2 = _res[1], placeAuthList = _res$2 === void 0 ? {
|
|
325
|
-
data: []
|
|
326
|
-
} : _res$2;
|
|
327
|
-
return _context4.abrupt("return", [placeDeviceList.data, placeAuthList.data]);
|
|
328
|
-
|
|
329
|
-
case 9:
|
|
330
|
-
case "end":
|
|
331
|
-
return _context4.stop();
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}, _callee4);
|
|
335
|
-
}));
|
|
336
|
-
return _queryPlacesList.apply(this, arguments);
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
function queryUserDevicesNew(data) {
|
|
340
|
-
var headers = {
|
|
341
|
-
Authorization: _cache.getCache('token', 'session')
|
|
342
|
-
};
|
|
343
|
-
var url = '/api/device/v1/queryDevices4User';
|
|
344
|
-
return _Service.$http({
|
|
345
|
-
url: url,
|
|
346
|
-
method: 'post',
|
|
347
|
-
data: data,
|
|
348
|
-
headers: headers,
|
|
349
|
-
requestId: 'queryDevices4User'
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
function queryUserDevicesStatusNew(data) {
|
|
354
|
-
var headers = {
|
|
355
|
-
Authorization: _cache.getCache('token', 'session')
|
|
356
|
-
};
|
|
357
|
-
var url = '/api/device/v1/queryDeviceStatus4User';
|
|
358
|
-
return _Service.$http({
|
|
359
|
-
url: url,
|
|
360
|
-
method: 'post',
|
|
361
|
-
data: data,
|
|
362
|
-
headers: headers,
|
|
363
|
-
requestId: 'queryDeviceStatus4User'
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
function queryDeviceLocalRecordAbilityList(data) {
|
|
368
|
-
var headers = {
|
|
369
|
-
Authorization: _cache.getCache('token', 'session')
|
|
370
|
-
};
|
|
371
|
-
var url = '/api/device/v1/queryDeviceLocalRecordAbilityList';
|
|
372
|
-
return _Service.$http({
|
|
373
|
-
url: url,
|
|
374
|
-
method: 'post',
|
|
375
|
-
data: data,
|
|
376
|
-
headers: headers,
|
|
377
|
-
requestId: 'queryDeviceLocalRecordAbilityList'
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
function emptyPromise() {
|
|
382
|
-
return new Promise(function (resolve) {
|
|
383
|
-
return resolve(false);
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
export function formatDeviceMap() {
|
|
388
|
-
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
389
|
-
var groupLibs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
390
|
-
var deviceState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
391
|
-
var deviceFrontEnd = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
392
|
-
var deviceStorage = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
393
|
-
var deviceList = [];
|
|
394
|
-
data.forEach(function (item) {
|
|
395
|
-
var _item$split = item.split('|'),
|
|
396
|
-
_item$split2 = _slicedToArray(_item$split, 21),
|
|
397
|
-
cid = _item$split2[0],
|
|
398
|
-
deviceName = _item$split2[1],
|
|
399
|
-
deviceType = _item$split2[3],
|
|
400
|
-
id = _item$split2[4],
|
|
401
|
-
latitude = _item$split2[5],
|
|
402
|
-
longitude = _item$split2[6],
|
|
403
|
-
lygroupIndex = _item$split2[7],
|
|
404
|
-
manufacturerDeviceId = _item$split2[8],
|
|
405
|
-
manufacturerDeviceType = _item$split2[9],
|
|
406
|
-
organizationIds = _item$split2[10],
|
|
407
|
-
pathId = _item$split2[11],
|
|
408
|
-
placeId = _item$split2[12],
|
|
409
|
-
sn = _item$split2[13],
|
|
410
|
-
boxNum = _item$split2[14],
|
|
411
|
-
cameraType = _item$split2[15],
|
|
412
|
-
villageLocationType = _item$split2[16],
|
|
413
|
-
placeTags = _item$split2[17],
|
|
414
|
-
parentId = _item$split2[18],
|
|
415
|
-
accessType = _item$split2[19],
|
|
416
|
-
createTime = _item$split2[20];
|
|
417
|
-
|
|
418
|
-
try {
|
|
419
|
-
organizationIds = organizationIds.split(',');
|
|
420
|
-
} catch (e) {
|
|
421
|
-
organizationIds = [];
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
try {
|
|
425
|
-
pathId = pathId.split(',');
|
|
426
|
-
} catch (e) {
|
|
427
|
-
pathId = [];
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
try {
|
|
431
|
-
placeTags = placeTags.split(',');
|
|
432
|
-
} catch (e) {
|
|
433
|
-
placeTags = [];
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
try {
|
|
437
|
-
cameraType = JSON.parse(cameraType);
|
|
438
|
-
} catch (e) {
|
|
439
|
-
cameraType = null;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
deviceList.push({
|
|
443
|
-
cid: cid,
|
|
444
|
-
deviceName: deviceName,
|
|
445
|
-
deviceStatus: deviceState[id],
|
|
446
|
-
deviceType: deviceType,
|
|
447
|
-
id: id,
|
|
448
|
-
latitude: latitude,
|
|
449
|
-
longitude: longitude,
|
|
450
|
-
lygroupId: groupLibs[lygroupIndex],
|
|
451
|
-
manufacturerDeviceId: manufacturerDeviceId,
|
|
452
|
-
manufacturerDeviceType: manufacturerDeviceType,
|
|
453
|
-
organizationIds: organizationIds,
|
|
454
|
-
pathId: pathId,
|
|
455
|
-
placeId: placeId,
|
|
456
|
-
sn: sn,
|
|
457
|
-
boxNum: boxNum,
|
|
458
|
-
cameraType: cameraType,
|
|
459
|
-
hasFrontEnd: +deviceFrontEnd[id] !== 0,
|
|
460
|
-
hasStorage: +deviceStorage[id] !== 0,
|
|
461
|
-
parentId: parentId,
|
|
462
|
-
accessType: accessType,
|
|
463
|
-
villageLocationType: villageLocationType,
|
|
464
|
-
placeTags: placeTags,
|
|
465
|
-
createTime: createTime
|
|
466
|
-
});
|
|
467
|
-
});
|
|
468
|
-
return deviceList;
|
|
469
|
-
}
|
|
470
|
-
export function queryUserDevice(_x4) {
|
|
471
|
-
return _queryUserDevice.apply(this, arguments);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
function _queryUserDevice() {
|
|
475
|
-
_queryUserDevice = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(options) {
|
|
476
|
-
var needDeviceLocalRecordAbility,
|
|
477
|
-
devices,
|
|
478
|
-
_devices,
|
|
479
|
-
listRes,
|
|
480
|
-
statusRes,
|
|
481
|
-
frontEndRes,
|
|
482
|
-
deviceState,
|
|
483
|
-
deviceFrontEnd,
|
|
484
|
-
deviceStorage,
|
|
485
|
-
_args5 = arguments;
|
|
486
|
-
|
|
487
|
-
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
488
|
-
while (1) {
|
|
489
|
-
switch (_context5.prev = _context5.next) {
|
|
490
|
-
case 0:
|
|
491
|
-
needDeviceLocalRecordAbility = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : true;
|
|
492
|
-
_context5.next = 3;
|
|
493
|
-
return Promise.all([queryUserDevicesNew(options ? options : {
|
|
494
|
-
offset: 0,
|
|
495
|
-
limit: 100000
|
|
496
|
-
}), queryUserDevicesStatusNew(options ? options : {
|
|
497
|
-
offset: 0,
|
|
498
|
-
limit: 100000
|
|
499
|
-
}), needDeviceLocalRecordAbility ? queryDeviceLocalRecordAbilityList(options ? options : {
|
|
500
|
-
queryType: 2
|
|
501
|
-
}) : emptyPromise()]);
|
|
502
|
-
|
|
503
|
-
case 3:
|
|
504
|
-
devices = _context5.sent;
|
|
505
|
-
_devices = _slicedToArray(devices, 3), listRes = _devices[0], statusRes = _devices[1], frontEndRes = _devices[2];
|
|
506
|
-
deviceState = {};
|
|
507
|
-
statusRes.data.split('|').forEach(function (res) {
|
|
508
|
-
var _res$split = res.split(','),
|
|
509
|
-
_res$split2 = _slicedToArray(_res$split, 2),
|
|
510
|
-
id = _res$split2[0],
|
|
511
|
-
state = _res$split2[1];
|
|
512
|
-
|
|
513
|
-
deviceState[id] = "".concat(state);
|
|
514
|
-
});
|
|
515
|
-
deviceFrontEnd = {};
|
|
516
|
-
deviceStorage = {};
|
|
517
|
-
frontEndRes && frontEndRes.data.split('|').forEach(function (res_1) {
|
|
518
|
-
var _res_1$split = res_1.split(','),
|
|
519
|
-
_res_1$split2 = _slicedToArray(_res_1$split, 3),
|
|
520
|
-
id_1 = _res_1$split2[0],
|
|
521
|
-
state_1 = _res_1$split2[1],
|
|
522
|
-
storage = _res_1$split2[2];
|
|
523
|
-
|
|
524
|
-
deviceFrontEnd[id_1] = state_1;
|
|
525
|
-
deviceStorage[id_1] = storage;
|
|
526
|
-
});
|
|
527
|
-
return _context5.abrupt("return", formatDeviceMap(listRes.data.list, listRes.data.other, deviceState, deviceFrontEnd, deviceStorage));
|
|
528
|
-
|
|
529
|
-
case 11:
|
|
530
|
-
case "end":
|
|
531
|
-
return _context5.stop();
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}, _callee5);
|
|
535
|
-
}));
|
|
536
|
-
return _queryUserDevice.apply(this, arguments);
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
export function authFormat() {
|
|
540
|
-
var userRoles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
541
|
-
var systemFeatures = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
542
|
-
var userType = arguments.length > 2 ? arguments[2] : undefined;
|
|
543
|
-
var filterFeatures = arguments.length > 3 ? arguments[3] : undefined;
|
|
544
|
-
var features = [];
|
|
545
|
-
/* prettier-ignore */
|
|
546
|
-
|
|
547
|
-
var appIds = Object.values(_Config.AppConfig).filter(function (v) {
|
|
548
|
-
return v.appType === 0;
|
|
549
|
-
}).map(function (v) {
|
|
550
|
-
return v.id;
|
|
551
|
-
});
|
|
552
|
-
userRoles = userRoles.map(function (v) {
|
|
553
|
-
return "".concat(v);
|
|
554
|
-
});
|
|
555
|
-
systemFeatures.forEach(function (item) {
|
|
556
|
-
var _item$extJson;
|
|
557
|
-
|
|
558
|
-
if (Array.isArray((_item$extJson = item.extJson) === null || _item$extJson === void 0 ? void 0 : _item$extJson.relations) && userRoles.includes("".concat(item.code))) {
|
|
559
|
-
var _userRoles;
|
|
560
|
-
|
|
561
|
-
var _features = filterFeatures || systemFeatures;
|
|
562
|
-
|
|
563
|
-
var relationsFeatures = item.extJson.relations.map(function (v) {
|
|
564
|
-
return _features.find(function (v2) {
|
|
565
|
-
return v2.alias === v;
|
|
566
|
-
});
|
|
567
|
-
}).filter(function (v) {
|
|
568
|
-
return !!v;
|
|
569
|
-
});
|
|
570
|
-
var relationCodes = relationsFeatures.map(function (v) {
|
|
571
|
-
return "".concat(v.code);
|
|
572
|
-
});
|
|
573
|
-
var unSysFeatures = relationsFeatures.filter(function (v) {
|
|
574
|
-
return !systemFeatures.find(function (v1) {
|
|
575
|
-
return v1.code === v.code;
|
|
576
|
-
});
|
|
577
|
-
});
|
|
578
|
-
systemFeatures.push.apply(systemFeatures, _toConsumableArray(unSysFeatures));
|
|
579
|
-
|
|
580
|
-
(_userRoles = userRoles).push.apply(_userRoles, _toConsumableArray(relationCodes));
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
if (appIds.includes(item.microApplicationId)) {
|
|
584
|
-
userRoles.push("".concat(item.code));
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
systemFeatures.forEach(function (item) {
|
|
588
|
-
if (userRoles.includes("".concat(item.code)) || +userType === 100702 && userRoles.includes(item.parentCode)) {
|
|
589
|
-
if (item.groups && item.groups.group1) {
|
|
590
|
-
features.push({
|
|
591
|
-
id: item.groups.group1.key,
|
|
592
|
-
name: item.groups.group1.label,
|
|
593
|
-
code: item.groups.group1.key,
|
|
594
|
-
alias: item.groups.group1.key,
|
|
595
|
-
sort: item.groups.group1.sort || item.sort,
|
|
596
|
-
icon: item.groups.group1.icon,
|
|
597
|
-
isMenu: 1,
|
|
598
|
-
level: 1,
|
|
599
|
-
microApplicationId: item.microApplicationId
|
|
600
|
-
});
|
|
601
|
-
|
|
602
|
-
if (item.groups.group2) {
|
|
603
|
-
var _item$groups$group;
|
|
604
|
-
|
|
605
|
-
features.push({
|
|
606
|
-
id: item.groups.group2.key,
|
|
607
|
-
name: item.groups.group2.label,
|
|
608
|
-
code: item.groups.group2.key,
|
|
609
|
-
alias: item.groups.group2.key,
|
|
610
|
-
sort: item.groups.group2.sort || ((_item$groups$group = item.groups.group1) === null || _item$groups$group === void 0 ? void 0 : _item$groups$group.sort) || item.sort,
|
|
611
|
-
icon: item.groups.group2.icon,
|
|
612
|
-
isMenu: 1,
|
|
613
|
-
level: 2,
|
|
614
|
-
microApplicationId: item.microApplicationId,
|
|
615
|
-
parentCode: item.groups.group1.key
|
|
616
|
-
});
|
|
617
|
-
item.parentCode = item.groups.group2.key;
|
|
618
|
-
} else {
|
|
619
|
-
features.push({
|
|
620
|
-
id: item.groups.group1.key + 'lv2',
|
|
621
|
-
name: item.groups.group1.label,
|
|
622
|
-
code: item.groups.group1.key + 'lv2',
|
|
623
|
-
alias: item.groups.group1.key + 'lv2',
|
|
624
|
-
sort: item.groups.group1.sort || item.sort,
|
|
625
|
-
isMenu: 1,
|
|
626
|
-
level: 2,
|
|
627
|
-
microApplicationId: item.microApplicationId,
|
|
628
|
-
parentCode: item.groups.group1.key
|
|
629
|
-
});
|
|
630
|
-
item.parentCode = item.groups.group1.key + 'lv2';
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
item.level = item.isMenu === 1 ? 3 : 4;
|
|
635
|
-
features.push(item);
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
(window._HOT_FEATURES_ || []).forEach(function (item) {
|
|
639
|
-
if (item.groups && item.groups.group1) {
|
|
640
|
-
features.push({
|
|
641
|
-
id: item.groups.group1.key,
|
|
642
|
-
name: item.groups.group1.label,
|
|
643
|
-
code: item.groups.group1.key,
|
|
644
|
-
alias: item.groups.group1.key,
|
|
645
|
-
sort: item.groups.group1.sort || item.sort,
|
|
646
|
-
icon: item.groups.group1.icon,
|
|
647
|
-
isMenu: 1,
|
|
648
|
-
microApplicationId: item.microApplicationId
|
|
649
|
-
});
|
|
650
|
-
|
|
651
|
-
if (item.groups.group2) {
|
|
652
|
-
var _item$groups$group2;
|
|
653
|
-
|
|
654
|
-
features.push({
|
|
655
|
-
id: item.groups.group2.key,
|
|
656
|
-
name: item.groups.group2.label,
|
|
657
|
-
code: item.groups.group2.key,
|
|
658
|
-
sort: item.groups.group2.sort || ((_item$groups$group2 = item.groups.group1) === null || _item$groups$group2 === void 0 ? void 0 : _item$groups$group2.sort) || item.sort,
|
|
659
|
-
alias: item.groups.group2.key,
|
|
660
|
-
icon: item.groups.group2.icon,
|
|
661
|
-
isMenu: 1,
|
|
662
|
-
microApplicationId: item.microApplicationId,
|
|
663
|
-
parentCode: item.groups.group1.key
|
|
664
|
-
});
|
|
665
|
-
item.parentCode = item.groups.group2.key;
|
|
666
|
-
} else {
|
|
667
|
-
features.push({
|
|
668
|
-
id: item.groups.group1.key + 'lv2',
|
|
669
|
-
name: item.groups.group1.label,
|
|
670
|
-
code: item.groups.group1.key + 'lv2',
|
|
671
|
-
alias: item.groups.group1.key + 'lv2',
|
|
672
|
-
sort: item.groups.group1.sort || item.sort,
|
|
673
|
-
icon: item.groups.group1.icon,
|
|
674
|
-
isMenu: 1,
|
|
675
|
-
level: 2,
|
|
676
|
-
microApplicationId: item.microApplicationId,
|
|
677
|
-
parentCode: item.groups.group1.key
|
|
678
|
-
});
|
|
679
|
-
item.parentCode = item.groups.group1.key + 'lv2';
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
item.level = 3;
|
|
684
|
-
features.push(item);
|
|
685
|
-
});
|
|
686
|
-
return features;
|
|
687
148
|
}
|