@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
package/es/Dict/desc.js
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
+
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
+
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
6
|
+
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8
|
+
|
|
9
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
|
+
|
|
11
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
+
|
|
13
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
+
|
|
15
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
16
|
+
|
|
17
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
|
+
|
|
19
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
+
|
|
21
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
|
+
|
|
23
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
24
|
+
|
|
25
|
+
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."); }
|
|
26
|
+
|
|
27
|
+
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); }
|
|
28
|
+
|
|
29
|
+
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; }
|
|
30
|
+
|
|
31
|
+
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; }
|
|
32
|
+
|
|
33
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
34
|
+
|
|
35
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
36
|
+
import { queryByTypeCodes, queryTypeCodes, formartItemTextExt } from './utils';
|
|
37
|
+
import LMDict from './cache';
|
|
38
|
+
export function withDict() {
|
|
39
|
+
var codes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
40
|
+
var isWebVisible = arguments.length > 1 ? arguments[1] : undefined;
|
|
41
|
+
return function (Component) {
|
|
42
|
+
return function (props) {
|
|
43
|
+
var isInitRef = useRef(false);
|
|
44
|
+
|
|
45
|
+
var _useState = useState(function () {
|
|
46
|
+
var map = {};
|
|
47
|
+
codes.forEach(function (code) {
|
|
48
|
+
if (LMDict.data[code]) {
|
|
49
|
+
map[code] = LMDict.data[code];
|
|
50
|
+
} else {
|
|
51
|
+
map[code] = [];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return map;
|
|
55
|
+
}),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
dictMap = _useState2[0],
|
|
58
|
+
setDictMap = _useState2[1];
|
|
59
|
+
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
var nocacheCodes = codes.filter(function (v) {
|
|
62
|
+
return !LMDict.data[v];
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
if (nocacheCodes.length === 0) {
|
|
66
|
+
isInitRef.current = true;
|
|
67
|
+
setDictMap(function (old) {
|
|
68
|
+
return Object.assign({}, old);
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
queryByTypeCodes(nocacheCodes, isWebVisible).then(function (res) {
|
|
74
|
+
isInitRef.current = true;
|
|
75
|
+
var data = res.data;
|
|
76
|
+
data.forEach(function (item) {
|
|
77
|
+
item.label = item.name;
|
|
78
|
+
item.value = item.code;
|
|
79
|
+
item = Object.assign(Object.assign({}, item), formartItemTextExt(item.extText));
|
|
80
|
+
});
|
|
81
|
+
setDictMap(function (old) {
|
|
82
|
+
nocacheCodes.forEach(function (code) {
|
|
83
|
+
var itemCodes = data.filter(function (v1) {
|
|
84
|
+
return +v1.typeCode === +code;
|
|
85
|
+
});
|
|
86
|
+
old[code] = itemCodes;
|
|
87
|
+
LMDict.updateDictMap(code, itemCodes);
|
|
88
|
+
});
|
|
89
|
+
return Object.assign({}, old);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}, []);
|
|
93
|
+
|
|
94
|
+
if (!isInitRef.current) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return /*#__PURE__*/React.createElement(Component, Object.assign({}, props, {
|
|
99
|
+
dictMap: dictMap
|
|
100
|
+
}));
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export function withTypeCodes(Component) {
|
|
105
|
+
return /*#__PURE__*/function (_React$Component) {
|
|
106
|
+
_inherits(withTypeCodesComponent, _React$Component);
|
|
107
|
+
|
|
108
|
+
var _super = _createSuper(withTypeCodesComponent);
|
|
109
|
+
|
|
110
|
+
function withTypeCodesComponent(props) {
|
|
111
|
+
var _this;
|
|
112
|
+
|
|
113
|
+
_classCallCheck(this, withTypeCodesComponent);
|
|
114
|
+
|
|
115
|
+
_this = _super.call(this, props);
|
|
116
|
+
_this.state = {
|
|
117
|
+
typeCodes: LMDict.data['typeCodes'] || [],
|
|
118
|
+
isInit: false
|
|
119
|
+
};
|
|
120
|
+
return _this;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
_createClass(withTypeCodesComponent, [{
|
|
124
|
+
key: "componentDidMount",
|
|
125
|
+
value: function componentDidMount() {
|
|
126
|
+
var _this2 = this;
|
|
127
|
+
|
|
128
|
+
if (!LMDict.data['typeCodes']) {
|
|
129
|
+
queryTypeCodes().then(function (res) {
|
|
130
|
+
LMDict.updateDictMap('typeCodes', res);
|
|
131
|
+
|
|
132
|
+
_this2.setState({
|
|
133
|
+
typeCodes: res,
|
|
134
|
+
isInit: true
|
|
135
|
+
});
|
|
136
|
+
}).catch(function () {
|
|
137
|
+
_this2.setState({
|
|
138
|
+
typeCodes: [],
|
|
139
|
+
isInit: true
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
} else this.setState({
|
|
143
|
+
typeCodes: LMDict.data['typeCodes'],
|
|
144
|
+
isInit: true
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}, {
|
|
148
|
+
key: "render",
|
|
149
|
+
value: function render() {
|
|
150
|
+
if (!this.state.isInit) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return /*#__PURE__*/React.createElement(Component, Object.assign({}, this.props, {
|
|
155
|
+
typeCodes: this.state.typeCodes
|
|
156
|
+
}));
|
|
157
|
+
}
|
|
158
|
+
}]);
|
|
159
|
+
|
|
160
|
+
return withTypeCodesComponent;
|
|
161
|
+
}(React.Component);
|
|
162
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DictItem } from './interface';
|
|
2
|
+
export declare const ptjk: DictItem;
|
|
3
|
+
export declare const rlzp: DictItem;
|
|
4
|
+
export declare const zpj: DictItem;
|
|
5
|
+
export declare const clzpj: DictItem;
|
|
6
|
+
export declare const qmbzpj: DictItem;
|
|
7
|
+
export declare const ydjc: DictItem;
|
|
8
|
+
export declare const qtzp: DictItem;
|
|
9
|
+
export declare const znxj: DictItem;
|
|
10
|
+
export declare const qj: DictItem;
|
|
11
|
+
export declare const db: DictItem;
|
|
12
|
+
export declare const qt: DictItem;
|
|
13
|
+
export declare const dz: DictItem;
|
|
14
|
+
export declare const wgsb: DictItem;
|
|
15
|
+
export declare const xfs: DictItem;
|
|
16
|
+
export declare const znjg: DictItem;
|
|
17
|
+
export declare const wifi: DictItem;
|
|
18
|
+
export declare const mj: DictItem;
|
|
19
|
+
export declare const hw: DictItem;
|
|
20
|
+
export declare const yg: DictItem;
|
|
21
|
+
export declare const deviceStatus: DictItem[];
|
|
22
|
+
export declare const deviceLocation: DictItem[];
|
|
23
|
+
export declare const deviceLocationzWithoutAll: DictItem[];
|
|
24
|
+
export declare const cameraType: DictItem[];
|
|
25
|
+
export declare const cameraDeviceType: DictItem[];
|
|
26
|
+
export declare const cameraAndSoldierType: DictItem[];
|
|
27
|
+
export declare const deviceAndMjType: DictItem[];
|
|
28
|
+
export declare const deviceType: DictItem[];
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
var all = {
|
|
2
|
+
value: '-1',
|
|
3
|
+
label: '全部'
|
|
4
|
+
}; //摄像机状态
|
|
5
|
+
|
|
6
|
+
var on = {
|
|
7
|
+
value: '1',
|
|
8
|
+
label: '在线'
|
|
9
|
+
};
|
|
10
|
+
var off = {
|
|
11
|
+
value: '0',
|
|
12
|
+
label: '离线'
|
|
13
|
+
}; //经纬度状态
|
|
14
|
+
|
|
15
|
+
var noSet = {
|
|
16
|
+
value: '0',
|
|
17
|
+
label: '未设置'
|
|
18
|
+
};
|
|
19
|
+
var isSet = {
|
|
20
|
+
value: '1',
|
|
21
|
+
label: '已设置'
|
|
22
|
+
}; //摄像机类别
|
|
23
|
+
|
|
24
|
+
export var ptjk = {
|
|
25
|
+
value: '119651',
|
|
26
|
+
label: '普通监控'
|
|
27
|
+
};
|
|
28
|
+
export var rlzp = {
|
|
29
|
+
value: '119652',
|
|
30
|
+
label: '人脸抓拍机'
|
|
31
|
+
};
|
|
32
|
+
export var zpj = {
|
|
33
|
+
value: '119653',
|
|
34
|
+
label: '人像抓拍机'
|
|
35
|
+
};
|
|
36
|
+
export var clzpj = {
|
|
37
|
+
value: '119654',
|
|
38
|
+
label: '车辆抓拍机'
|
|
39
|
+
};
|
|
40
|
+
export var qmbzpj = {
|
|
41
|
+
value: '119655',
|
|
42
|
+
label: '全目标抓拍机'
|
|
43
|
+
};
|
|
44
|
+
export var ydjc = {
|
|
45
|
+
value: '119656',
|
|
46
|
+
label: '移动监测'
|
|
47
|
+
};
|
|
48
|
+
export var qtzp = {
|
|
49
|
+
value: '119657',
|
|
50
|
+
label: '其他'
|
|
51
|
+
}; //设备类型
|
|
52
|
+
|
|
53
|
+
export var znxj = {
|
|
54
|
+
value: '100604',
|
|
55
|
+
label: '智能枪机'
|
|
56
|
+
};
|
|
57
|
+
export var qj = {
|
|
58
|
+
value: '100602',
|
|
59
|
+
label: '球机'
|
|
60
|
+
};
|
|
61
|
+
export var db = {
|
|
62
|
+
value: '100605',
|
|
63
|
+
label: '单兵'
|
|
64
|
+
};
|
|
65
|
+
export var qt = {
|
|
66
|
+
value: '100601',
|
|
67
|
+
label: '其他摄像机'
|
|
68
|
+
};
|
|
69
|
+
export var dz = {
|
|
70
|
+
value: '100607',
|
|
71
|
+
label: '道闸'
|
|
72
|
+
};
|
|
73
|
+
export var wgsb = {
|
|
74
|
+
value: '100606',
|
|
75
|
+
label: '网关设备'
|
|
76
|
+
};
|
|
77
|
+
export var xfs = {
|
|
78
|
+
value: '100612',
|
|
79
|
+
label: '消防栓'
|
|
80
|
+
};
|
|
81
|
+
export var znjg = {
|
|
82
|
+
value: '100614',
|
|
83
|
+
label: '智能井盖'
|
|
84
|
+
}; //wifi
|
|
85
|
+
|
|
86
|
+
export var wifi = {
|
|
87
|
+
value: '100611',
|
|
88
|
+
label: 'WI-FI'
|
|
89
|
+
}; //门禁
|
|
90
|
+
|
|
91
|
+
export var mj = {
|
|
92
|
+
value: '103501,103502',
|
|
93
|
+
label: '门禁'
|
|
94
|
+
}; //闸机
|
|
95
|
+
// export const zj = {value: "103407", label: "闸机"}as DictItem
|
|
96
|
+
//红外传感器
|
|
97
|
+
|
|
98
|
+
export var hw = {
|
|
99
|
+
value: '100609',
|
|
100
|
+
label: '红外传感器'
|
|
101
|
+
}; //烟感传感器
|
|
102
|
+
|
|
103
|
+
export var yg = {
|
|
104
|
+
value: '100610',
|
|
105
|
+
label: '烟感传感器'
|
|
106
|
+
};
|
|
107
|
+
export var deviceStatus = [all, on, off];
|
|
108
|
+
export var deviceLocation = [all, noSet, isSet];
|
|
109
|
+
export var deviceLocationzWithoutAll = [noSet, isSet];
|
|
110
|
+
export var cameraType = [all, ptjk, rlzp, zpj, clzpj, qmbzpj, ydjc, qtzp];
|
|
111
|
+
export var cameraDeviceType = [all, znxj, qj, db, qt]; //摄像机+单兵
|
|
112
|
+
|
|
113
|
+
export var cameraAndSoldierType = [all, znxj, qj, db, qt]; //摄像机(无单兵)+门禁
|
|
114
|
+
|
|
115
|
+
export var deviceAndMjType = [all, znxj, qj, wifi, mj, wgsb, dz, xfs, znjg, qt]; //所有设备类型
|
|
116
|
+
|
|
117
|
+
export var deviceType = [all, znxj, qj, db, wifi, mj, wgsb, dz, xfs, znjg, qt, hw, yg];
|
package/es/Dict/hook.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
|
|
3
|
+
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."); }
|
|
4
|
+
|
|
5
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
+
|
|
7
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
+
|
|
9
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
|
|
11
|
+
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."); }
|
|
12
|
+
|
|
13
|
+
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); }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
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; }
|
|
18
|
+
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
|
|
21
|
+
import { useMemo, useState, useEffect } from 'react';
|
|
22
|
+
import { queryByTypeCode, queryByTypeCodes, queryTypeCodes, formartItemTextExt } from './utils';
|
|
23
|
+
import LMDict from './cache';
|
|
24
|
+
export function useDict(typeCode) {
|
|
25
|
+
var _useState = useState(LMDict.data[typeCode] || []),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
codes = _useState2[0],
|
|
28
|
+
setCodes = _useState2[1];
|
|
29
|
+
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
if (typeCode && !LMDict.data[typeCode]) {
|
|
32
|
+
queryByTypeCode(typeCode).then(function (res) {
|
|
33
|
+
var data = res.data || [];
|
|
34
|
+
data.forEach(function (item) {
|
|
35
|
+
item.label = item.name;
|
|
36
|
+
item.value = item.code;
|
|
37
|
+
item = Object.assign(Object.assign({}, item), formartItemTextExt(item.extText));
|
|
38
|
+
});
|
|
39
|
+
LMDict.updateDictMap(typeCode, data);
|
|
40
|
+
setCodes(data);
|
|
41
|
+
});
|
|
42
|
+
} else {
|
|
43
|
+
setCodes(function (old) {
|
|
44
|
+
return old.length > 0 ? old : LMDict.data[typeCode] || [];
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}, [typeCode]);
|
|
48
|
+
return codes;
|
|
49
|
+
}
|
|
50
|
+
export function useTypeCodes() {
|
|
51
|
+
var _useState3 = useState(LMDict.data['typeCodes'] || []),
|
|
52
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
53
|
+
typeCodes = _useState4[0],
|
|
54
|
+
setTypeCodes = _useState4[1];
|
|
55
|
+
|
|
56
|
+
useEffect(function () {
|
|
57
|
+
if (!LMDict.data['typeCodes']) {
|
|
58
|
+
queryTypeCodes().then(function (res) {
|
|
59
|
+
setTypeCodes(res);
|
|
60
|
+
LMDict.updateDictMap('typeCode', res);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}, []);
|
|
64
|
+
return typeCodes;
|
|
65
|
+
}
|
|
66
|
+
export function useDicts() {
|
|
67
|
+
var typeCodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
68
|
+
var isWebVisible = arguments.length > 1 ? arguments[1] : undefined;
|
|
69
|
+
var typeStr = useMemo(function () {
|
|
70
|
+
return typeCodes.toString();
|
|
71
|
+
}, [typeCodes]);
|
|
72
|
+
|
|
73
|
+
var _useState5 = useState(function () {
|
|
74
|
+
return typeCodes.map(function (v) {
|
|
75
|
+
return LMDict.data[v] ? LMDict.data[v] : [];
|
|
76
|
+
});
|
|
77
|
+
}),
|
|
78
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
79
|
+
dicts = _useState6[0],
|
|
80
|
+
setDicts = _useState6[1];
|
|
81
|
+
|
|
82
|
+
useEffect(function () {
|
|
83
|
+
var codes = typeCodes.filter(function (v) {
|
|
84
|
+
return !LMDict.data[v];
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
if (codes.length === 0) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
queryByTypeCodes(codes, isWebVisible).then(function (res) {
|
|
92
|
+
var data = res.data;
|
|
93
|
+
data.forEach(function (item) {
|
|
94
|
+
item.label = item.name;
|
|
95
|
+
item.value = item.code;
|
|
96
|
+
item = Object.assign(Object.assign({}, item), formartItemTextExt(item.extText));
|
|
97
|
+
});
|
|
98
|
+
setDicts(function (old) {
|
|
99
|
+
codes.forEach(function (code) {
|
|
100
|
+
var itemCodes = data.filter(function (v1) {
|
|
101
|
+
return +v1.typeCode === +code;
|
|
102
|
+
});
|
|
103
|
+
var index = typeCodes.findIndex(function (v) {
|
|
104
|
+
return v === code;
|
|
105
|
+
});
|
|
106
|
+
old[index] = itemCodes;
|
|
107
|
+
LMDict.updateDictMap(code, itemCodes);
|
|
108
|
+
});
|
|
109
|
+
return _toConsumableArray(old);
|
|
110
|
+
});
|
|
111
|
+
}); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
112
|
+
}, [typeStr]);
|
|
113
|
+
return dicts;
|
|
114
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as device from './device';
|
|
2
|
+
import { useDict, useDicts, useTypeCodes } from './hook';
|
|
3
|
+
import { withDict, withTypeCodes } from './desc';
|
|
4
|
+
declare const Dict: {
|
|
5
|
+
useDict: typeof useDict;
|
|
6
|
+
useDicts: typeof useDicts;
|
|
7
|
+
device: typeof device;
|
|
8
|
+
cacheMap: import("./interface").CacheDictType;
|
|
9
|
+
withDict: typeof withDict;
|
|
10
|
+
useTypeCodes: typeof useTypeCodes;
|
|
11
|
+
withTypeCodes: typeof withTypeCodes;
|
|
12
|
+
};
|
|
13
|
+
export default Dict;
|
package/es/Dict/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import LMDict from './cache';
|
|
2
|
+
import * as device from './device';
|
|
3
|
+
import { useDict, useDicts, useTypeCodes } from './hook';
|
|
4
|
+
import { withDict, withTypeCodes } from './desc';
|
|
5
|
+
var Dict = {
|
|
6
|
+
useDict: useDict,
|
|
7
|
+
useDicts: useDicts,
|
|
8
|
+
device: device,
|
|
9
|
+
cacheMap: LMDict,
|
|
10
|
+
withDict: withDict,
|
|
11
|
+
useTypeCodes: useTypeCodes,
|
|
12
|
+
withTypeCodes: withTypeCodes
|
|
13
|
+
};
|
|
14
|
+
export default Dict;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface DictItem {
|
|
2
|
+
label: string;
|
|
3
|
+
code: string;
|
|
4
|
+
id: string;
|
|
5
|
+
value: any;
|
|
6
|
+
name: string;
|
|
7
|
+
extText?: string;
|
|
8
|
+
typeCode?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
icon?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface CacheDictType {
|
|
14
|
+
data: { [key: string]: DictItem[] };
|
|
15
|
+
updateDictMap: (key: any, valuse: DictItem[]) => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DictItem } from './interface';
|
|
2
|
+
export declare function queryByTypeCode(typeCode: any): Promise<{
|
|
3
|
+
data: DictItem[];
|
|
4
|
+
}>;
|
|
5
|
+
export declare function queryByTypeCodes(typeCodes?: any[], isWebVisible?: boolean): Promise<{
|
|
6
|
+
data: DictItem[];
|
|
7
|
+
}>;
|
|
8
|
+
export declare function queryTypeCodes(): Promise<DictItem[]>;
|
|
9
|
+
export declare function formartItemTextExt(text: string): {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
package/es/Dict/utils.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
2
|
+
import Service from '../Service';
|
|
3
|
+
export function queryByTypeCode(typeCode) {
|
|
4
|
+
var headers = {
|
|
5
|
+
Authorization: _cache.getCache('token', 'session')
|
|
6
|
+
};
|
|
7
|
+
return Service.$http({
|
|
8
|
+
url: "/api/dictionary/v1/queryByTypeCode/".concat(typeCode),
|
|
9
|
+
method: 'get',
|
|
10
|
+
requestId: 'queryByTypeCode',
|
|
11
|
+
headers: headers,
|
|
12
|
+
data: {}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export function queryByTypeCodes() {
|
|
16
|
+
var typeCodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
17
|
+
var isWebVisible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
18
|
+
var headers = {
|
|
19
|
+
Authorization: _cache.getCache('token', 'session')
|
|
20
|
+
};
|
|
21
|
+
return Service.$http({
|
|
22
|
+
url: "/api/dictionary/v1/queryDictionaryListByCondition",
|
|
23
|
+
method: 'post',
|
|
24
|
+
requestId: 'queryByTypeCode',
|
|
25
|
+
headers: headers,
|
|
26
|
+
data: {
|
|
27
|
+
isWebVisible: isWebVisible,
|
|
28
|
+
typeCodeList: typeCodes
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export function queryTypeCodes() {
|
|
33
|
+
return Service.$http({
|
|
34
|
+
url: "/micro-apps/micro-dep-librarys/config/typeCodes.json",
|
|
35
|
+
method: 'get',
|
|
36
|
+
requestId: 'queryTypeCodes'
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export function formartItemTextExt(text) {
|
|
40
|
+
var ext = {};
|
|
41
|
+
|
|
42
|
+
if (!text) {
|
|
43
|
+
return ext;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
ext = JSON.stringify(text);
|
|
48
|
+
} catch (e) {}
|
|
49
|
+
|
|
50
|
+
return ext;
|
|
51
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IDragAndDropItemProps } from './interface';
|
|
3
|
+
declare function DragAndDropItem<T>({ children, dragData, dragId, style, onDropEnd, disabledCopyElement }: IDragAndDropItemProps<T>): React.FunctionComponentElement<any>;
|
|
4
|
+
export default DragAndDropItem;
|