@cloud-app-dev/vidc 2.0.0-alpha.1 → 2.0.0-alpha.13
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 +2 -3
- package/es/Api/index.d.ts +3 -4
- package/es/Api/index.js +7 -8
- package/es/AppRedirect/index.css +0 -0
- package/es/AppRedirect/index.d.ts +16 -0
- package/es/AppRedirect/index.js +34 -0
- package/es/AppRoute/index.d.ts +10 -0
- package/es/AppRoute/index.js +115 -0
- package/es/AppRoute/interface.d.ts +8 -0
- package/es/Auth/index.d.ts +8 -0
- package/es/Auth/index.js +17 -0
- package/es/AutoExit/index.js +15 -10
- package/es/Box/BetweenBox/index.css +5 -0
- package/es/Box/BetweenBox/index.d.ts +12 -0
- package/es/Box/BetweenBox/index.js +24 -0
- package/es/Box/InfoBox/index.css +23 -0
- package/es/Box/InfoBox/index.d.ts +12 -0
- package/es/Box/InfoBox/index.js +26 -0
- package/es/Box/TwoColumnBox/index.css +77 -0
- package/es/Box/TwoColumnBox/index.d.ts +10 -0
- package/es/Box/TwoColumnBox/index.js +50 -0
- package/es/Box/deps/content-grid.d.ts +9 -0
- package/es/Box/deps/content-grid.js +9 -0
- package/es/Box/deps/grid-factory.d.ts +10 -0
- package/es/Box/deps/grid-factory.js +72 -0
- package/es/Box/deps/simple-grid.d.ts +9 -0
- package/es/Box/deps/simple-grid.js +8 -0
- package/es/Box/index.css +9 -0
- package/es/Box/index.d.ts +14 -0
- package/es/Box/index.js +28 -0
- package/es/CheckGroupFixed/index.css +49 -0
- package/es/CheckGroupFixed/index.d.ts +17 -0
- package/es/CheckGroupFixed/index.js +148 -0
- package/es/Config/index.js +63 -6
- package/es/Config/interface.d.ts +30 -5
- package/es/Config/utils.d.ts +2 -11
- package/es/Config/utils.js +1 -12
- package/es/ConfigContext/index.d.ts +3 -0
- package/es/DeviceIcon/icon.js +5 -5
- package/es/DeviceIcon/index.js +2 -2
- package/es/DeviceSelect/TreeType.d.ts +6 -0
- package/es/DeviceSelect/TreeType.js +36 -0
- package/es/DeviceSelect/demo.js +2 -2
- package/es/DeviceSelect/index.css +6 -1
- package/es/DeviceSelect/index.d.ts +5 -0
- package/es/DeviceSelect/index.js +22 -53
- 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/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/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 +23 -0
- package/es/IconFont/index.d.ts +12 -0
- package/es/IconFont/index.js +57 -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.js +7 -11
- package/es/InitialConfig/utils.d.ts +1 -1
- package/es/InitialConfig/utils.js +8 -31
- package/es/InitialRequest/index.d.ts +1 -1
- package/es/InitialRequest/index.js +19 -11
- package/es/InitialRequest/utils.d.ts +5 -4
- package/es/InitialRequest/utils.js +58 -94
- package/es/Input/index.css +8 -0
- package/es/Input/index.d.ts +18 -0
- package/es/Input/index.js +76 -0
- package/es/LabelValue/index.css +18 -0
- package/es/LabelValue/index.d.ts +23 -0
- package/es/LabelValue/index.js +32 -0
- package/es/{DynamicDeviceList → List}/CheckExt.d.ts +0 -0
- package/es/{DynamicDeviceList → List}/CheckExt.js +4 -4
- package/es/List/DeviceList/index.css +0 -0
- package/es/List/DeviceList/index.d.ts +11 -0
- package/es/{DeviceList → List/DeviceList}/index.js +8 -20
- package/es/{DynamicDeviceList → List/DynamicDeviceList}/Demo.d.ts +0 -0
- package/es/List/DynamicDeviceList/Demo.js +54 -0
- package/es/{DynamicDeviceList → List/DynamicDeviceList}/index.css +5 -17
- package/es/List/DynamicDeviceList/index.d.ts +11 -0
- package/es/List/DynamicDeviceList/index.js +205 -0
- package/es/List/DynamicDeviceList/interface.d.ts +37 -0
- package/es/List/DynamicDeviceList/utils.d.ts +16 -0
- package/es/List/DynamicDeviceList/utils.js +61 -0
- package/es/List/DynamicGridList/Demo.d.ts +2 -0
- package/es/List/DynamicGridList/Demo.js +70 -0
- package/es/List/DynamicGridList/index.d.ts +26 -0
- package/es/List/DynamicGridList/index.js +73 -0
- package/es/List/GridList/Demo.d.ts +2 -0
- package/es/List/GridList/Demo.js +91 -0
- package/es/List/GridList/hook.d.ts +13 -0
- package/es/List/GridList/hook.js +301 -0
- package/es/List/GridList/index.css +7 -0
- package/es/List/GridList/index.d.ts +15 -0
- package/es/List/GridList/index.js +47 -0
- package/es/List/GridList/interface.d.ts +59 -0
- package/es/List/GridList/utils.d.ts +9 -0
- package/es/List/GridList/utils.js +43 -0
- package/es/List/ListExt/index.css +3 -0
- package/es/List/ListExt/index.d.ts +19 -0
- package/es/List/ListExt/index.js +44 -0
- package/es/List/VList/index.css +6 -0
- package/es/List/VList/index.d.ts +18 -0
- package/es/List/VList/index.js +51 -0
- package/es/List/VList/utils.d.ts +14 -0
- package/es/List/VList/utils.js +17 -0
- package/es/List/index.css +60 -5
- package/es/List/index.d.ts +10 -13
- package/es/List/index.js +170 -36
- package/es/List/interface.d.ts +87 -0
- package/es/List/renderItem.d.ts +20 -0
- package/es/List/renderItem.js +71 -0
- package/es/LoaderApp/index.css +3 -0
- package/es/LoaderApp/index.d.ts +31 -0
- package/es/LoaderApp/index.js +135 -0
- package/es/LoaderApp/interface.d.ts +6 -0
- package/es/LoaderApp/loader.d.ts +20 -0
- package/es/LoaderApp/loader.js +86 -0
- package/es/LoaderApp/utils.d.ts +13 -0
- package/es/LoaderApp/utils.js +121 -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 +133 -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/Progress/index.js +68 -0
- package/es/RefDrawer/index.js +4 -5
- package/es/RefModal/index.js +4 -5
- package/es/Service/http.d.ts +1 -1
- package/es/Service/http.js +2 -25
- package/es/TableLayout/index.css +4 -0
- package/es/TableLayout/index.d.ts +13 -0
- package/es/TableLayout/index.js +33 -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/{TreeTitle → Title}/index.css +5 -5
- package/es/{TreeTitle → Title}/index.d.ts +2 -2
- package/es/{TreeTitle → Title}/index.js +9 -6
- package/es/{TreeMode → Tree/BaseTree}/demo.d.ts +0 -0
- package/es/Tree/BaseTree/demo.js +69 -0
- package/es/Tree/BaseTree/index.css +64 -0
- package/es/Tree/BaseTree/index.d.ts +24 -0
- package/es/Tree/BaseTree/index.js +83 -0
- package/es/Tree/demo.d.ts +2 -0
- package/es/{TreeMode → Tree}/demo.js +0 -0
- package/es/{TreeMode → Tree}/index.css +1 -1
- package/es/{TreeMode → Tree}/index.d.ts +1 -1
- package/es/{TreeMode → Tree}/index.js +9 -12
- package/es/UserSelect/index.d.ts +3 -3
- package/es/UserSelect/index.js +18 -15
- package/es/WorkerFlow/Form/Condition.js +6 -8
- package/es/WorkerFlow/Form/EmptyUserSet.js +4 -6
- package/es/WorkerFlow/Form/FormAuth.js +3 -3
- package/es/WorkerFlow/Form/GroupList.js +2 -2
- package/es/WorkerFlow/Form/GroupSelect.js +4 -6
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +8 -7
- package/es/WorkerFlow/Form/LevelGroupSelect.js +5 -7
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +4 -6
- package/es/WorkerFlow/Form/UserSelect.js +4 -6
- package/es/WorkerFlow/Form/UserSelectModalContent.js +8 -6
- package/es/WorkerFlow/Form/UserSet.js +3 -3
- 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 +70 -36
- package/es/WorkerFlow/index.css +9 -3
- package/es/WorkerFlow/index.js +3 -3
- package/es/WorkerFlow/utils.js +2 -2
- package/es/core.d.ts +27 -0
- package/es/index.d.ts +27 -4
- package/es/index.js +27 -4
- package/es/useDrawer/index.d.ts +14 -0
- package/es/useDrawer/index.js +91 -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 +93 -0
- package/es/useNavigate/index.css +0 -0
- package/es/useNavigate/index.d.ts +4 -0
- package/es/useNavigate/index.js +14 -0
- package/es/utils.d.ts +11 -0
- package/es/utils.js +68 -1
- package/package.json +10 -8
- package/es/DeviceList/index.css +0 -32
- package/es/DeviceList/index.d.ts +0 -14
- package/es/DynamicDeviceList/Demo.js +0 -17
- package/es/DynamicDeviceList/index.d.ts +0 -35
- package/es/DynamicDeviceList/index.js +0 -224
- package/es/DynamicDeviceList/utils.d.ts +0 -2
- package/es/DynamicDeviceList/utils.js +0 -15
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import "antd/lib/config-provider/style";
|
|
2
|
+
import _ConfigProvider from "antd/lib/config-provider";
|
|
3
|
+
|
|
4
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
+
|
|
6
|
+
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."); }
|
|
7
|
+
|
|
8
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
+
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
11
|
+
|
|
12
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
13
|
+
|
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
+
|
|
16
|
+
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
17
|
+
import ReactDOM from 'react-dom';
|
|
18
|
+
import Modal from '../Modal';
|
|
19
|
+
import CC from '../ConfigContext';
|
|
20
|
+
|
|
21
|
+
function useModal() {
|
|
22
|
+
var prefixCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'cloudapp';
|
|
23
|
+
var context = useContext(CC);
|
|
24
|
+
var root = useMemo(function () {
|
|
25
|
+
return (context === null || context === void 0 ? void 0 : context.root) || document.body;
|
|
26
|
+
}, [context === null || context === void 0 ? void 0 : context.root]);
|
|
27
|
+
var div = useMemo(function () {
|
|
28
|
+
return document.createElement('div');
|
|
29
|
+
}, []);
|
|
30
|
+
|
|
31
|
+
var _useState = useState({
|
|
32
|
+
content: null,
|
|
33
|
+
visible: false,
|
|
34
|
+
title: '',
|
|
35
|
+
onOk: undefined,
|
|
36
|
+
width: undefined,
|
|
37
|
+
className: undefined
|
|
38
|
+
}),
|
|
39
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
40
|
+
state = _useState2[0],
|
|
41
|
+
setState = _useState2[1];
|
|
42
|
+
|
|
43
|
+
useEffect(function () {
|
|
44
|
+
root.appendChild(div);
|
|
45
|
+
return function () {
|
|
46
|
+
root.removeChild(div);
|
|
47
|
+
ReactDOM.unmountComponentAtNode(div);
|
|
48
|
+
div.remove();
|
|
49
|
+
};
|
|
50
|
+
}, []);
|
|
51
|
+
useEffect(function () {
|
|
52
|
+
ReactDOM.render( /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
53
|
+
prefixCls: prefixCls,
|
|
54
|
+
getPopupContainer: function getPopupContainer() {
|
|
55
|
+
return root;
|
|
56
|
+
}
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Modal, {
|
|
58
|
+
okText: "\u786E\u5B9A",
|
|
59
|
+
cancelText: "\u53D6\u6D88",
|
|
60
|
+
visible: state.visible,
|
|
61
|
+
onOk: state.onOk,
|
|
62
|
+
onCancel: close,
|
|
63
|
+
destroyOnClose: true,
|
|
64
|
+
title: state.title,
|
|
65
|
+
width: state.width,
|
|
66
|
+
className: state.className,
|
|
67
|
+
getContainer: false
|
|
68
|
+
}, state.content)), div);
|
|
69
|
+
}, [state.content, state.visible, state.title, state.onOk, state.width, state.className]);
|
|
70
|
+
|
|
71
|
+
var open = function open(options) {
|
|
72
|
+
setState(function (old) {
|
|
73
|
+
return Object.assign(Object.assign(Object.assign({}, old), options), {
|
|
74
|
+
visible: true
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
var close = function close() {
|
|
80
|
+
setState(function (old) {
|
|
81
|
+
return Object.assign(Object.assign({}, old), {
|
|
82
|
+
visible: false
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
open: open,
|
|
89
|
+
close: close
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export default useModal;
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useNavigate as useNativeNavigate } from 'react-router-dom';
|
|
3
|
+
import "./index.css";
|
|
4
|
+
var _global = window;
|
|
5
|
+
|
|
6
|
+
function useNavigate() {
|
|
7
|
+
var naticeNavigate = useNativeNavigate();
|
|
8
|
+
var navigate = useMemo(function () {
|
|
9
|
+
return _global.BasicNavigate || naticeNavigate;
|
|
10
|
+
}, [naticeNavigate]);
|
|
11
|
+
return navigate;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default useNavigate;
|
package/es/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
1
2
|
export declare const getHeader: () => {
|
|
2
3
|
Authorization: any;
|
|
3
4
|
};
|
|
@@ -11,3 +12,13 @@ export declare function getParentListById(id: string, orgList?: any[], list?: an
|
|
|
11
12
|
* @param {Array} ids = []
|
|
12
13
|
*/
|
|
13
14
|
export declare function getPlaceCodesWithParent(areaCode: string, list?: any[], areaCodes?: string[], key?: string, pkey?: string): any;
|
|
15
|
+
export declare function nextTick(cb: () => void): void;
|
|
16
|
+
export declare function tryCatch(resolveFn: () => Promise<any>, rejectFn?: (e: unknown) => void): Promise<void>;
|
|
17
|
+
declare type TargetValue<T> = T | undefined | null;
|
|
18
|
+
declare type TargetType = HTMLElement | Element | Window | Document;
|
|
19
|
+
export declare type BasicTarget<T extends TargetType = Element> = (() => TargetValue<T>) | TargetValue<T> | MutableRefObject<TargetValue<T>>;
|
|
20
|
+
export declare function getTargetElement<T extends TargetType>(target: BasicTarget<T>, defaultElement?: T): T;
|
|
21
|
+
declare const getScrollTop: (el: Document | Element) => number;
|
|
22
|
+
declare const getScrollHeight: (el: Document | Element) => number;
|
|
23
|
+
declare const getClientHeight: (el: Document | Element) => number;
|
|
24
|
+
export { getScrollTop, getScrollHeight, getClientHeight };
|
package/es/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
2
|
+
import { __awaiter } from "tslib";
|
|
2
3
|
export var getHeader = function getHeader() {
|
|
3
4
|
return {
|
|
4
5
|
Authorization: _cache.getCache('token', 'session')
|
|
@@ -56,4 +57,70 @@ export function getPlaceCodesWithParent(areaCode) {
|
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
return areaCodes;
|
|
59
|
-
}
|
|
60
|
+
}
|
|
61
|
+
export function nextTick(cb) {
|
|
62
|
+
Promise.resolve().then(cb);
|
|
63
|
+
}
|
|
64
|
+
export function tryCatch(resolveFn) {
|
|
65
|
+
var rejectFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : console.error;
|
|
66
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
67
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
68
|
+
while (1) {
|
|
69
|
+
switch (_context.prev = _context.next) {
|
|
70
|
+
case 0:
|
|
71
|
+
_context.prev = 0;
|
|
72
|
+
_context.next = 3;
|
|
73
|
+
return resolveFn();
|
|
74
|
+
|
|
75
|
+
case 3:
|
|
76
|
+
_context.next = 8;
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
case 5:
|
|
80
|
+
_context.prev = 5;
|
|
81
|
+
_context.t0 = _context["catch"](0);
|
|
82
|
+
rejectFn(_context.t0);
|
|
83
|
+
|
|
84
|
+
case 8:
|
|
85
|
+
case "end":
|
|
86
|
+
return _context.stop();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}, _callee, null, [[0, 5]]);
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
export function getTargetElement(target, defaultElement) {
|
|
93
|
+
if (!target) {
|
|
94
|
+
return defaultElement;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
var targetElement;
|
|
98
|
+
|
|
99
|
+
if (typeof target === 'function') {
|
|
100
|
+
targetElement = target();
|
|
101
|
+
} else if ('current' in target) {
|
|
102
|
+
targetElement = target.current;
|
|
103
|
+
} else {
|
|
104
|
+
targetElement = target;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return targetElement;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
var getScrollTop = function getScrollTop(el) {
|
|
111
|
+
if (el === document || el === document.body) {
|
|
112
|
+
return Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return el.scrollTop;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
var getScrollHeight = function getScrollHeight(el) {
|
|
119
|
+
return el.scrollHeight || Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var getClientHeight = function getClientHeight(el) {
|
|
123
|
+
return el.clientHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export { getScrollTop, getScrollHeight, getClientHeight };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@cloud-app-dev/vidc",
|
|
4
4
|
"description": "Video Image Data Componennts",
|
|
5
|
-
"version": "2.0.0-alpha.
|
|
5
|
+
"version": "2.0.0-alpha.13",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -30,17 +30,19 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"add-dom-event-listener": "^1.1.0",
|
|
34
|
+
"ahooks": "^3.1.0",
|
|
33
35
|
"chroma-js": "^2.1.2",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
36
|
+
"fetch-like-axios": "^0.0.5",
|
|
37
|
+
"immer": "^9.0.5",
|
|
38
|
+
"lodash-es": "^4.17.21",
|
|
37
39
|
"rc-queue-anim": "^2.0.0"
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|
|
40
|
-
"@cloud-app-dev/utils": "^
|
|
41
|
-
"@
|
|
42
|
+
"@cloud-app-dev/utils": "^3.0.2",
|
|
43
|
+
"@types/add-dom-event-listener": "^1.1.0",
|
|
42
44
|
"@types/chroma-js": "^2.1.3",
|
|
43
|
-
"@types/lodash": "^4.
|
|
45
|
+
"@types/lodash-es": "^4.17.5",
|
|
44
46
|
"@umijs/test": "^3.0.5",
|
|
45
47
|
"antd": "^4.17.0",
|
|
46
48
|
"babel-plugin-import": "^1.13.3",
|
|
@@ -52,7 +54,7 @@
|
|
|
52
54
|
"prettier": "^2.2.1",
|
|
53
55
|
"react": "^17.0.2",
|
|
54
56
|
"react-dom": "^17.0.2",
|
|
55
|
-
"react-router-dom": "^
|
|
57
|
+
"react-router-dom": "^6.2.1",
|
|
56
58
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
57
59
|
"yorkie": "^2.0.0"
|
|
58
60
|
},
|
package/es/DeviceList/index.css
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.lm-c-device-list-wrapper {
|
|
2
|
-
margin-left: -1px;
|
|
3
|
-
}
|
|
4
|
-
.lm-c-device-list-wrapper .list-item label .clear-item {
|
|
5
|
-
display: none;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
font-size: var(--fs);
|
|
8
|
-
}
|
|
9
|
-
.lm-c-device-list-wrapper .list-item:hover .clear-item {
|
|
10
|
-
display: inline-block;
|
|
11
|
-
}
|
|
12
|
-
.lm-c-device-list-wrapper .list-item .an-device-task {
|
|
13
|
-
width: 250px;
|
|
14
|
-
display: flex;
|
|
15
|
-
}
|
|
16
|
-
.lm-c-device-list-wrapper .list-item .an-device-task .an-device-task-operate {
|
|
17
|
-
margin-right: 8px;
|
|
18
|
-
}
|
|
19
|
-
.lm-c-device-list-wrapper .list-item .an-device-task .an-device-task-operate .operateitem {
|
|
20
|
-
margin-right: 14px;
|
|
21
|
-
font-size: 14px;
|
|
22
|
-
}
|
|
23
|
-
.lm-c-device-list-wrapper .list-item .an-device-task .an-device-task-chose {
|
|
24
|
-
display: flex;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
align-items: center;
|
|
27
|
-
width: 120px;
|
|
28
|
-
margin-left: 46px;
|
|
29
|
-
}
|
|
30
|
-
.lm-c-device-list-wrapper .list-item .an-device-task .an-device-task-chose .operate-item {
|
|
31
|
-
margin-right: 22px;
|
|
32
|
-
}
|
package/es/DeviceList/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DeviceItemType } from '../core';
|
|
3
|
-
import { CheckListProps } from '@cloud-app-dev/basic-components/es/CheckList';
|
|
4
|
-
import './index.less';
|
|
5
|
-
interface DeviceListProps extends CheckListProps<DeviceItemType> {
|
|
6
|
-
deviceList?: Array<DeviceItemType>;
|
|
7
|
-
deleteItem?: (item: DeviceItemType) => void;
|
|
8
|
-
className?: string;
|
|
9
|
-
getIconStyle?: (item: DeviceItemType) => React.CSSProperties;
|
|
10
|
-
title?: string;
|
|
11
|
-
onKeywordChange?: (v: string) => void;
|
|
12
|
-
}
|
|
13
|
-
declare function DeviceList({ getIconStyle, className, deleteItem, deviceList, onMouseOverItem, renderItemExt, title, onKeywordChange, itemKey, ...props }: DeviceListProps): JSX.Element;
|
|
14
|
-
export default DeviceList;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import DynamicDeviceList from './index';
|
|
3
|
-
|
|
4
|
-
function App() {
|
|
5
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
-
style: {
|
|
7
|
-
display: 'flex'
|
|
8
|
-
}
|
|
9
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
10
|
-
style: {
|
|
11
|
-
height: 400,
|
|
12
|
-
width: 300
|
|
13
|
-
}
|
|
14
|
-
}, /*#__PURE__*/React.createElement(DynamicDeviceList, null)));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default App;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { DeviceItemType } from '../core';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface IDynamicDeviceListProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 列表点击事件
|
|
6
|
-
*/
|
|
7
|
-
onClick?: (item: DeviceItemType) => void;
|
|
8
|
-
/**
|
|
9
|
-
* @description 选中设备cid集合
|
|
10
|
-
*/
|
|
11
|
-
checkedKeys?: string[];
|
|
12
|
-
/**
|
|
13
|
-
* @description 传入onSelect列表默认渲染为checkbox模式
|
|
14
|
-
*/
|
|
15
|
-
onChecked?: (ids: string[], list: DeviceItemType[], checked: boolean) => void;
|
|
16
|
-
/**
|
|
17
|
-
* @description 传入queryList需要的参数,例如业务树ID,场所id等,分页参数除外
|
|
18
|
-
*/
|
|
19
|
-
params?: {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @description 自定义渲染列表
|
|
24
|
-
*/
|
|
25
|
-
renderItem?: (item: DeviceItemType, index: number) => JSX.Element;
|
|
26
|
-
/**
|
|
27
|
-
* @description 列表高度
|
|
28
|
-
*/
|
|
29
|
-
itemHeight?: number;
|
|
30
|
-
title?: string;
|
|
31
|
-
onKeywordChange?: (v: string) => void;
|
|
32
|
-
defaultCheckedIds?: string[];
|
|
33
|
-
}
|
|
34
|
-
declare function DynamicDeviceList({ onClick, checkedKeys, defaultCheckedIds, onChecked, params, renderItem, itemHeight, title, onKeywordChange }: IDynamicDeviceListProps): JSX.Element;
|
|
35
|
-
export default DynamicDeviceList;
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import "antd/lib/checkbox/style";
|
|
2
|
-
import _Checkbox from "antd/lib/checkbox";
|
|
3
|
-
import _DynamicList from "@cloud-app-dev/basic-components/es/DynamicList";
|
|
4
|
-
|
|
5
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
-
|
|
7
|
-
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."); }
|
|
8
|
-
|
|
9
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
-
|
|
11
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
-
|
|
13
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
-
|
|
15
|
-
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."); }
|
|
16
|
-
|
|
17
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
-
|
|
19
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
20
|
-
|
|
21
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
22
|
-
|
|
23
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
-
|
|
25
|
-
import { __awaiter } from "tslib";
|
|
26
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
27
|
-
import { queryDeviceList } from './utils';
|
|
28
|
-
import DeviceIcon from '../DeviceIcon';
|
|
29
|
-
import TreeTitle from '../TreeTitle';
|
|
30
|
-
import CheckExt from './CheckExt';
|
|
31
|
-
import "./index.css";
|
|
32
|
-
var OFFSET = 0;
|
|
33
|
-
var LIMIT = 30;
|
|
34
|
-
|
|
35
|
-
function DynamicDeviceList(_ref) {
|
|
36
|
-
var _this = this;
|
|
37
|
-
|
|
38
|
-
var onClick = _ref.onClick,
|
|
39
|
-
checkedKeys = _ref.checkedKeys,
|
|
40
|
-
defaultCheckedIds = _ref.defaultCheckedIds,
|
|
41
|
-
onChecked = _ref.onChecked,
|
|
42
|
-
params = _ref.params,
|
|
43
|
-
_renderItem = _ref.renderItem,
|
|
44
|
-
_ref$itemHeight = _ref.itemHeight,
|
|
45
|
-
itemHeight = _ref$itemHeight === void 0 ? 40 : _ref$itemHeight,
|
|
46
|
-
title = _ref.title,
|
|
47
|
-
onKeywordChange = _ref.onKeywordChange;
|
|
48
|
-
|
|
49
|
-
var _useState = useState({
|
|
50
|
-
offset: OFFSET,
|
|
51
|
-
limit: LIMIT,
|
|
52
|
-
list: [],
|
|
53
|
-
count: LIMIT,
|
|
54
|
-
checkedKeys: defaultCheckedIds || checkedKeys || []
|
|
55
|
-
}),
|
|
56
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
-
state = _useState2[0],
|
|
58
|
-
setState = _useState2[1];
|
|
59
|
-
|
|
60
|
-
var loadRef = useRef(false);
|
|
61
|
-
var listRef = useRef(null);
|
|
62
|
-
/**
|
|
63
|
-
* 列表选中处理
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
var onCheckedAction = useCallback(function (item) {
|
|
67
|
-
var ids = state.checkedKeys || [];
|
|
68
|
-
var id = item.cid;
|
|
69
|
-
var checked = !ids.includes(item.cid);
|
|
70
|
-
|
|
71
|
-
if (checked) {
|
|
72
|
-
ids.push(id);
|
|
73
|
-
} else {
|
|
74
|
-
ids = ids.filter(function (v) {
|
|
75
|
-
return v !== id;
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
setState(function (old) {
|
|
80
|
-
return Object.assign(Object.assign({}, old), {
|
|
81
|
-
checkedKeys: _toConsumableArray(ids)
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
onChecked && onChecked(ids, [item], checked);
|
|
85
|
-
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
86
|
-
[state.checkedKeys]);
|
|
87
|
-
var onSelectAll = useCallback(function () {
|
|
88
|
-
var ids = state.list.map(function (v) {
|
|
89
|
-
return v.cid;
|
|
90
|
-
});
|
|
91
|
-
setState(function (old) {
|
|
92
|
-
return Object.assign(Object.assign({}, old), {
|
|
93
|
-
checkedKeys: ids
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
onChecked && onChecked(ids, state.list, true);
|
|
97
|
-
}, [state.list]);
|
|
98
|
-
var onCancelAll = useCallback(function () {
|
|
99
|
-
setState(function (old) {
|
|
100
|
-
return Object.assign(Object.assign({}, old), {
|
|
101
|
-
checkedKeys: []
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
onChecked && onChecked([], [], false);
|
|
105
|
-
}, []);
|
|
106
|
-
/**
|
|
107
|
-
* @desc 参数变化列表需要重新初始化
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
|
-
useEffect(function () {
|
|
111
|
-
loadRef.current = true;
|
|
112
|
-
var data = params || {};
|
|
113
|
-
setState(function (old) {
|
|
114
|
-
return Object.assign(Object.assign({}, old), {
|
|
115
|
-
list: [],
|
|
116
|
-
count: LIMIT
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
queryDeviceList(Object.assign({
|
|
120
|
-
offset: 0,
|
|
121
|
-
limit: LIMIT
|
|
122
|
-
}, data)).then(function (res) {
|
|
123
|
-
setState(function (old) {
|
|
124
|
-
return Object.assign(Object.assign({}, old), {
|
|
125
|
-
list: res.data || [],
|
|
126
|
-
count: res.totalCount,
|
|
127
|
-
offset: LIMIT,
|
|
128
|
-
limit: LIMIT
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
Promise.resolve().then(function () {
|
|
132
|
-
loadRef.current = false;
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
}, [params]);
|
|
136
|
-
/**
|
|
137
|
-
* @desc 懒加载方法
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
var loadNextPage = useCallback(function () {
|
|
141
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
142
|
-
var offset;
|
|
143
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
144
|
-
while (1) {
|
|
145
|
-
switch (_context.prev = _context.next) {
|
|
146
|
-
case 0:
|
|
147
|
-
if (!loadRef.current) {
|
|
148
|
-
_context.next = 2;
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return _context.abrupt("return", Promise.resolve());
|
|
153
|
-
|
|
154
|
-
case 2:
|
|
155
|
-
offset = state.offset;
|
|
156
|
-
_context.next = 5;
|
|
157
|
-
return queryDeviceList(Object.assign({
|
|
158
|
-
offset: offset,
|
|
159
|
-
limit: LIMIT
|
|
160
|
-
}, params)).then(function (res) {
|
|
161
|
-
setState(function (old) {
|
|
162
|
-
return Object.assign(Object.assign({}, old), {
|
|
163
|
-
list: [].concat(_toConsumableArray(old.list), _toConsumableArray(res.data || [])),
|
|
164
|
-
offset: offset + LIMIT
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
}).catch(console.error);
|
|
168
|
-
|
|
169
|
-
case 5:
|
|
170
|
-
case "end":
|
|
171
|
-
return _context.stop();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}, _callee);
|
|
175
|
-
}));
|
|
176
|
-
}, [state.offset, state.limit, params]);
|
|
177
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
178
|
-
className: "zenview-c-dynamic-device-list-layout"
|
|
179
|
-
}, /*#__PURE__*/React.createElement(TreeTitle, {
|
|
180
|
-
title: title,
|
|
181
|
-
onChange: onKeywordChange,
|
|
182
|
-
inputPlaceholder: "\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0"
|
|
183
|
-
}), onChecked && /*#__PURE__*/React.createElement(CheckExt, {
|
|
184
|
-
count: state.count,
|
|
185
|
-
selectCount: state.checkedKeys.length,
|
|
186
|
-
onCancel: onCancelAll,
|
|
187
|
-
onCheck: onSelectAll
|
|
188
|
-
}), /*#__PURE__*/React.createElement(_DynamicList, {
|
|
189
|
-
list: state.list,
|
|
190
|
-
loadMore: loadNextPage,
|
|
191
|
-
rowCount: state.count,
|
|
192
|
-
renderItem: function renderItem(item, index) {
|
|
193
|
-
return _renderItem ? _renderItem(item, index) : /*#__PURE__*/React.createElement("div", {
|
|
194
|
-
className: "device-item-box ".concat(state.checkedKeys.includes(item.cid) ? 'device-item-selected' : '')
|
|
195
|
-
}, onChecked ? /*#__PURE__*/React.createElement(_Checkbox, {
|
|
196
|
-
className: "device-name device-checkbox-name",
|
|
197
|
-
checked: state.checkedKeys.includes(item.cid),
|
|
198
|
-
value: item.cid,
|
|
199
|
-
onClick: function onClick() {
|
|
200
|
-
return onCheckedAction(item);
|
|
201
|
-
}
|
|
202
|
-
}, /*#__PURE__*/React.createElement(DeviceIcon, {
|
|
203
|
-
type: item.deviceType,
|
|
204
|
-
status: item.deviceStatus
|
|
205
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
206
|
-
title: item.deviceName
|
|
207
|
-
}, item.deviceName)) : /*#__PURE__*/React.createElement("span", {
|
|
208
|
-
className: "device-name",
|
|
209
|
-
onClick: onClick ? function () {
|
|
210
|
-
return onClick(item);
|
|
211
|
-
} : undefined
|
|
212
|
-
}, /*#__PURE__*/React.createElement(DeviceIcon, {
|
|
213
|
-
type: item.deviceType,
|
|
214
|
-
status: item.deviceStatus
|
|
215
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
216
|
-
title: item.deviceName
|
|
217
|
-
}, item.deviceName)));
|
|
218
|
-
},
|
|
219
|
-
itemHeight: itemHeight,
|
|
220
|
-
ref: listRef
|
|
221
|
-
}));
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export default DynamicDeviceList;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
2
|
-
import { getHeader } from '../utils';
|
|
3
|
-
export function queryDeviceList() {
|
|
4
|
-
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5
|
-
return _Service.$http({
|
|
6
|
-
method: 'post',
|
|
7
|
-
url: '/api/udm-api/device/queryList',
|
|
8
|
-
requestId: 'queryDeviceList',
|
|
9
|
-
headers: getHeader(),
|
|
10
|
-
data: Object.assign(Object.assign({}, params), {
|
|
11
|
-
includeSubOrganizations: 1,
|
|
12
|
-
isPagination: true
|
|
13
|
-
})
|
|
14
|
-
});
|
|
15
|
-
}
|