@cloud-app-dev/vidc 1.0.41 → 1.0.45

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.
Files changed (58) hide show
  1. package/.fatherrc.js +3 -0
  2. package/.umirc.ts +4 -1
  3. package/es/Api/index.d.ts +1 -1
  4. package/es/Api/index.js +3 -2
  5. package/es/AppLayout/AppHorizontalMenu/index.js +4 -3
  6. package/es/AppLayout/AppInlineMenu/index.js +4 -3
  7. package/es/AppLayout/AppLogo/index.js +2 -2
  8. package/es/AppLayout/FunctionPreview/index.js +5 -4
  9. package/es/AppLayout/Header/NotifyAlarm.js +13 -7
  10. package/es/AppLayout/Header/Tools.js +2 -2
  11. package/es/AppLayout/Header/UserAction.js +2 -2
  12. package/es/AppLayout/service/index.js +5 -5
  13. package/es/AppLayout/utils.d.ts +4 -0
  14. package/es/AppLayout/utils.js +12 -37
  15. package/es/DagInitialRequest/utils.js +7 -8
  16. package/es/InitialRequest/index.js +2 -2
  17. package/es/InitialRequest/utils.js +8 -9
  18. package/es/OrgUserTree/index.js +2 -2
  19. package/es/PlaceTree/index.js +2 -2
  20. package/es/TreeMode/index.js +2 -2
  21. package/es/TreeTitle/index.css +1 -0
  22. package/es/UserSelect/demo.d.ts +2 -0
  23. package/es/UserSelect/demo.js +20 -0
  24. package/es/UserSelect/index.d.ts +4 -0
  25. package/es/UserSelect/index.js +26 -12
  26. package/es/WorkerFlow/Demo.js +4 -33
  27. package/es/WorkerFlow/Form/Approver.d.ts +3 -2
  28. package/es/WorkerFlow/Form/Approver.js +14 -3
  29. package/es/WorkerFlow/Form/Condition.js +4 -1
  30. package/es/WorkerFlow/Form/FormAuth.js +1 -1
  31. package/es/WorkerFlow/Form/GroupSelectModalContent.js +25 -13
  32. package/es/WorkerFlow/Form/Handle.d.ts +3 -2
  33. package/es/WorkerFlow/Form/Handle.js +13 -3
  34. package/es/WorkerFlow/Form/Notifier.js +2 -1
  35. package/es/WorkerFlow/Form/UserAndGroupSelect.js +41 -2
  36. package/es/WorkerFlow/Form/UserSelectModalContent.js +12 -2
  37. package/es/WorkerFlow/Form/UserSet.d.ts +3 -2
  38. package/es/WorkerFlow/Form/UserSet.js +8 -5
  39. package/es/WorkerFlow/Form/UsersHandleType.js +3 -1
  40. package/es/WorkerFlow/Nodes/Add.js +16 -5
  41. package/es/WorkerFlow/Nodes/AddOptionList.d.ts +3 -4
  42. package/es/WorkerFlow/Nodes/AddOptionList.js +6 -6
  43. package/es/WorkerFlow/Nodes/Approver.js +1 -1
  44. package/es/WorkerFlow/Nodes/Condition.js +8 -11
  45. package/es/WorkerFlow/Nodes/Handle.js +1 -1
  46. package/es/WorkerFlow/Nodes/Notifier.js +1 -1
  47. package/es/WorkerFlow/Nodes/TitleElement.js +1 -1
  48. package/es/WorkerFlow/Tools.d.ts +1 -1
  49. package/es/WorkerFlow/Tools.js +3 -2
  50. package/es/WorkerFlow/XML/utils.d.ts +1 -0
  51. package/es/WorkerFlow/XML/utils.js +30 -0
  52. package/es/WorkerFlow/index.css +12 -2
  53. package/es/WorkerFlow/index.js +9 -2
  54. package/es/WorkerFlow/interface.d.ts +5 -2
  55. package/es/WorkerFlow/utils.d.ts +2 -2
  56. package/es/WorkerFlow/utils.js +16 -4
  57. package/es/utils.js +2 -2
  58. package/package.json +2 -2
package/.fatherrc.js CHANGED
@@ -11,5 +11,8 @@ export default {
11
11
  extraBabelPlugins: [
12
12
  ['import', { libraryName: 'antd', style: true }, 'antd'],
13
13
  ['import', { libraryName: '@cloud-app-dev/basic-components', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'basic-components'],
14
+ ['import', { libraryName: '@cloud-app-dev/utils', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'utils'],
15
+ ['import', { libraryName: 'ahooks', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'ahooks'],
16
+ ['import', { libraryName: '@cloud-app-dev/map', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'map-components'],
14
17
  ],
15
18
  };
package/.umirc.ts CHANGED
@@ -2,7 +2,7 @@ import { defineConfig } from 'dumi';
2
2
  import path from 'path';
3
3
 
4
4
  const token =
5
- 'eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NiIsImV4dCI6MTYzNzgwNjQ5ODI3OSwidWlkIjoiMTAxMDAwMDAwMjQ5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTAzODddLCJ2YWxpZFRpbWUiOm51bGwsIm9wdENlbnRlcklkIjoiMTAwMTAwMDAwMjMzIiwidXNlclR5cGUiOjEwMDcwMiwiaWF0IjoxNjM3NTQ3Mjk4Mjc5fQ.FX6-kuuaituBjzuBxY0s51V_V_tVRVMuiWp8fIZI6YQ';
5
+ 'eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NiIsImV4dCI6MTYzODA3ODM3NjE0NSwidWlkIjoiMTAxMDAwMDAwMjQ5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTAzODddLCJ2YWxpZFRpbWUiOm51bGwsIm9wdENlbnRlcklkIjoiMTAwMTAwMDAwMjMzIiwidXNlclR5cGUiOjEwMDcwMiwiaWF0IjoxNjM3ODE5MTc2MTQ1fQ.x9o6vi8T5YW7P05AkeQh1Sse8sp6tGs7zxUWgB_rxtk';
6
6
 
7
7
  export default defineConfig({
8
8
  title: '云应用-业务组件库',
@@ -14,6 +14,9 @@ export default defineConfig({
14
14
  extraBabelPlugins: [
15
15
  ['import', { libraryName: 'antd', style: true }, 'antd'],
16
16
  ['import', { libraryName: '@cloud-app-dev/basic-components', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'basic-components'],
17
+ ['import', { libraryName: '@cloud-app-dev/utils', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'utils'],
18
+ ['import', { libraryName: 'ahooks', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'ahooks'],
19
+ ['import', { libraryName: '@cloud-app-dev/map', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'map-components'],
17
20
  ],
18
21
  theme: {
19
22
  '@ant-prefix': 'cloudapp',
package/es/Api/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { UserInfo } from '@cloud-app-dev/basic-components/es/Store/app';
3
3
  import { BzTreeItemType, PostItemType } from '../core';
4
4
  declare class Api {
5
5
  getOrgs(): Promise<OrgItemType[]>;
6
- getUsers(organizationId: string): Promise<UserInfo[]>;
6
+ getUsers(organizationId: string, params?: any): Promise<UserInfo[]>;
7
7
  getPosts(orgId: string): Promise<PostItemType[]>;
8
8
  getDeviceBzTree(): Promise<BzTreeItemType[]>;
9
9
  getCustomDeviceGroup(): Promise<BzTreeItemType[]>;
package/es/Api/index.js CHANGED
@@ -49,6 +49,7 @@ var Api = /*#__PURE__*/function () {
49
49
  }, {
50
50
  key: "getUsers",
51
51
  value: function getUsers(organizationId) {
52
+ var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52
53
  return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
53
54
  var res;
54
55
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
@@ -61,13 +62,13 @@ var Api = /*#__PURE__*/function () {
61
62
  method: 'post',
62
63
  requestId: 'queryUsers',
63
64
  headers: getHeader(),
64
- data: {
65
+ data: Object.assign({
65
66
  containSubOrganization: 1,
66
67
  limit: 10000,
67
68
  offset: 0,
68
69
  organizationId: organizationId,
69
70
  validState: ['104406']
70
- }
71
+ }, params)
71
72
  });
72
73
 
73
74
  case 2:
@@ -1,6 +1,8 @@
1
1
  import "antd/lib/popover/style";
2
2
  import _Popover from "antd/lib/popover";
3
3
  import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
4
+ import _uuid from "@cloud-app-dev/utils/es/uuid";
5
+ import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
4
6
 
5
7
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
8
 
@@ -16,7 +18,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
18
 
17
19
  import React, { useState, useMemo, useCallback, useRef, useEffect } from 'react';
18
20
  import { inject, observer } from 'mobx-react';
19
- import { treeHelper, uuid } from '@cloud-app-dev/utils';
20
21
  import { updateFunctionCount } from '../utils';
21
22
  import FunctionPreview from '../FunctionPreview';
22
23
  import QueueAnim from 'rc-queue-anim';
@@ -35,7 +36,7 @@ function AppHorizontalMenu(_ref) {
35
36
  });
36
37
  }, [auth.userMenuList]);
37
38
  var menuList = useMemo(function () {
38
- return renderMenu ? treeHelper.computTreeList(filterMenus, 'code', 'parentCode') : [];
39
+ return renderMenu ? _treeHelper.computTreeList(filterMenus, 'code', 'parentCode') : [];
39
40
  }, [filterMenus, renderMenu]);
40
41
 
41
42
  var _useState = useState({
@@ -70,7 +71,7 @@ function AppHorizontalMenu(_ref) {
70
71
  var menu = auth.userMenuList.find(function (v) {
71
72
  return +v.code === +item.code;
72
73
  });
73
- history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(uuid()) : ''));
74
+ history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(_uuid()) : ''));
74
75
  setTimeout(function () {
75
76
  return setState(function (old) {
76
77
  return Object.assign(Object.assign({}, old), {
@@ -1,6 +1,8 @@
1
1
  import "antd/lib/tooltip/style";
2
2
  import _Tooltip from "antd/lib/tooltip";
3
3
  import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
4
+ import _uuid from "@cloud-app-dev/utils/es/uuid";
5
+ import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
4
6
 
5
7
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
8
 
@@ -16,7 +18,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
18
 
17
19
  import React, { useCallback, useLayoutEffect, useMemo, useState } from 'react';
18
20
  import { inject, observer } from 'mobx-react';
19
- import { treeHelper, uuid } from '@cloud-app-dev/utils';
20
21
  import QueueAnim from 'rc-queue-anim';
21
22
  import FunctionPreview from '../FunctionPreview';
22
23
  import SubGroup from './SubGroup';
@@ -45,7 +46,7 @@ function AppInlineMenu(_ref) {
45
46
  });
46
47
  }, [auth.userMenuList]);
47
48
  var menuList = useMemo(function () {
48
- return treeHelper.computTreeList(filterMenus, 'code', 'parentCode');
49
+ return _treeHelper.computTreeList(filterMenus, 'code', 'parentCode');
49
50
  }, [filterMenus]);
50
51
  var popStyle = useMemo(function () {
51
52
  return {
@@ -62,7 +63,7 @@ function AppInlineMenu(_ref) {
62
63
  var menu = auth.userMenuList.find(function (v) {
63
64
  return +v.code === +item.code;
64
65
  });
65
- history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(uuid()) : ''));
66
+ history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(_uuid()) : ''));
66
67
 
67
68
  if (flag) {
68
69
  setState(function (old) {
@@ -3,6 +3,7 @@ import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
3
3
  import "antd/lib/col/style";
4
4
  import _Col from "antd/lib/col";
5
5
  import _Service from "@cloud-app-dev/basic-components/es/Service";
6
+ import _cache from "@cloud-app-dev/utils/es/cache";
6
7
  import _Config from "@cloud-app-dev/basic-components/es/Config";
7
8
 
8
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -18,7 +19,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
18
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
20
 
20
21
  import React, { useState, useEffect, useMemo } from 'react';
21
- import { cache } from '@cloud-app-dev/utils';
22
22
  import "./index.css";
23
23
  export default function AppLogo(_ref) {
24
24
  var systemLogo = _ref.systemLogo,
@@ -40,7 +40,7 @@ export default function AppLogo(_ref) {
40
40
 
41
41
 
42
42
  var GatewayState = useMemo(function () {
43
- return cache.getCache('GATEWAY_STATE', 'session');
43
+ return _cache.getCache('GATEWAY_STATE', 'session');
44
44
  }, []);
45
45
  useEffect(function () {
46
46
  var _a; //用户名显示是否加入行政区划
@@ -2,6 +2,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
2
2
 
3
3
  import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
4
4
  import _Store from "@cloud-app-dev/basic-components/es/Store";
5
+ import _cache from "@cloud-app-dev/utils/es/cache";
5
6
 
6
7
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
8
 
@@ -26,7 +27,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
26
27
  import { __awaiter } from "tslib";
27
28
  import React from 'react';
28
29
  import { getFunctionCount, clearFunctionCount, deleteFunctionItemCount } from '../utils';
29
- import { cache } from '@cloud-app-dev/utils';
30
30
  import "./index.css";
31
31
  var CACHE_KEY = 'functionCount';
32
32
  var _global = window;
@@ -46,7 +46,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
46
46
 
47
47
  _this.getNearList = function () {
48
48
  getFunctionCount().then(function (counts) {
49
- cache.setUserCache(CACHE_KEY, counts);
49
+ _cache.setUserCache(CACHE_KEY, counts);
50
50
 
51
51
  _this.setState({
52
52
  nearList: counts.map(function (item) {
@@ -68,7 +68,8 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
68
68
  return clearFunctionCount();
69
69
 
70
70
  case 2:
71
- cache.setUserCache(CACHE_KEY, []);
71
+ _cache.setUserCache(CACHE_KEY, []);
72
+
72
73
  this.setState({
73
74
  nearList: []
74
75
  });
@@ -104,7 +105,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
104
105
  }));
105
106
  };
106
107
 
107
- var counts = cache.getUserCache(CACHE_KEY) || [];
108
+ var counts = _cache.getUserCache(CACHE_KEY) || [];
108
109
  _this.state = {
109
110
  nearList: counts.map(function (item) {
110
111
  return _Store.auth.getInfoByName(item.id);
@@ -1,5 +1,6 @@
1
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
2
 
3
+ import _SocketEmitter from "@cloud-app-dev/utils/es/SocketEmitter";
3
4
  import _Store from "@cloud-app-dev/basic-components/es/Store";
4
5
 
5
6
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -24,7 +25,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
24
25
 
25
26
  /* eslint-disable no-undef */
26
27
  import React from 'react';
27
- import { SocketEmitter } from '@cloud-app-dev/utils';
28
28
 
29
29
  var NotifyAlarm = /*#__PURE__*/function (_React$Component) {
30
30
  _inherits(NotifyAlarm, _React$Component);
@@ -79,17 +79,23 @@ var NotifyAlarm = /*#__PURE__*/function (_React$Component) {
79
79
  _createClass(NotifyAlarm, [{
80
80
  key: "componentDidMount",
81
81
  value: function componentDidMount() {
82
- SocketEmitter.subscribe('alarm', this.handleAlarm);
83
- SocketEmitter.subscribe('vehicleAlarmMessage', this.handleAlarm);
84
- SocketEmitter.subscribe('multiMonitorActivityMessage', this.handleAlarm);
82
+ _SocketEmitter.subscribe('alarm', this.handleAlarm);
83
+
84
+ _SocketEmitter.subscribe('vehicleAlarmMessage', this.handleAlarm);
85
+
86
+ _SocketEmitter.subscribe('multiMonitorActivityMessage', this.handleAlarm);
85
87
  }
86
88
  }, {
87
89
  key: "componentWillUnmount",
88
90
  value: function componentWillUnmount() {
89
91
  clearTimeout(this.timer);
90
- SocketEmitter.unsubscribe('alarm', this.handleAlarm);
91
- SocketEmitter.unsubscribe('withoutCloakMessage', this.handleAlarm);
92
- SocketEmitter.unsubscribe('multiMonitorActivityMessage', this.handleAlarm);
92
+
93
+ _SocketEmitter.unsubscribe('alarm', this.handleAlarm);
94
+
95
+ _SocketEmitter.unsubscribe('withoutCloakMessage', this.handleAlarm);
96
+
97
+ _SocketEmitter.unsubscribe('multiMonitorActivityMessage', this.handleAlarm);
98
+
93
99
  this.audioRef = null;
94
100
  this.timer = null;
95
101
  }
@@ -4,10 +4,10 @@ import _FullScreen from "@cloud-app-dev/basic-components/es/FullScreen";
4
4
  import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
5
5
  import "antd/lib/popover/style";
6
6
  import _Popover from "antd/lib/popover";
7
+ import _cache from "@cloud-app-dev/utils/es/cache";
7
8
  import React, { useCallback, useMemo } from 'react';
8
9
  import UserAction from './UserAction';
9
10
  import ToolsItem from './ToolsItem';
10
- import { cache } from '@cloud-app-dev/utils';
11
11
  import { inject, observer } from 'mobx-react';
12
12
  import NotifyAlarm from './NotifyAlarm';
13
13
 
@@ -17,7 +17,7 @@ function AppTools(_ref) {
17
17
  isMenuHome = _ref.isMenuHome,
18
18
  portalPath = _ref.portalPath;
19
19
  var GatewayState = useMemo(function () {
20
- return cache.getCache('GATEWAY_STATE', 'session');
20
+ return _cache.getCache('GATEWAY_STATE', 'session');
21
21
  }, []);
22
22
  var handleGateway = useCallback(function () {
23
23
  history.push(portalPath ? portalPath : !isMenuHome ? '/portalGateway/menuHome' : '/portalGateway/home');
@@ -4,6 +4,7 @@ import _Avatar from "antd/lib/avatar";
4
4
  import _AuthComponent from "@cloud-app-dev/basic-components/es/AuthComponent";
5
5
  import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
6
6
  import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
7
+ import _cache from "@cloud-app-dev/utils/es/cache";
7
8
 
8
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
10
 
@@ -19,7 +20,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
20
 
20
21
  import { __awaiter } from "tslib";
21
22
  import React, { useCallback, useReducer, useMemo } from 'react';
22
- import { cache } from '@cloud-app-dev/utils';
23
23
  import ModifyUserAvatar from './ModifyUserAvatar';
24
24
  import ModifyPassword from './ModifyPassword';
25
25
  import UserService from '../service'; //用户个人中心下模块
@@ -104,7 +104,7 @@ function UserAction(_ref) {
104
104
  }, []); //门户
105
105
 
106
106
  var GatewayState = useMemo(function () {
107
- return cache.getCache('GATEWAY_STATE', 'session');
107
+ return _cache.getCache('GATEWAY_STATE', 'session');
108
108
  }, []);
109
109
  var handleGateway = useCallback(function () {
110
110
  history.push(portalPath || '/portalGateway/home');
@@ -1,4 +1,5 @@
1
1
  import _Service from "@cloud-app-dev/basic-components/es/Service";
2
+ import _cache from "@cloud-app-dev/utils/es/cache";
2
3
 
3
4
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
5
 
@@ -11,7 +12,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
11
12
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
12
13
 
13
14
  import URL from './url';
14
- import { cache } from '@cloud-app-dev/utils';
15
15
  import JSEncrypt from 'jsencrypt';
16
16
  var RSA = {
17
17
  decrypt: function decrypt(ciphertext, key) {
@@ -26,7 +26,7 @@ var RSA = {
26
26
  }
27
27
  };
28
28
  var defaultHeaders = {
29
- Authorization: cache.getCache('token', 'session')
29
+ Authorization: _cache.getCache('token', 'session')
30
30
  };
31
31
 
32
32
  var MainService = /*#__PURE__*/function () {
@@ -80,7 +80,7 @@ var MainService = /*#__PURE__*/function () {
80
80
  key: "getPublicKey",
81
81
  value: function getPublicKey() {
82
82
  var headers = {
83
- Authorization: cache.getCache('token', 'session')
83
+ Authorization: _cache.getCache('token', 'session')
84
84
  };
85
85
  return _Service.$http({
86
86
  headers: headers,
@@ -107,7 +107,7 @@ var MainService = /*#__PURE__*/function () {
107
107
  switch (_context.prev = _context.next) {
108
108
  case 0:
109
109
  headers = {
110
- Authorization: cache.getCache('token', 'session')
110
+ Authorization: _cache.getCache('token', 'session')
111
111
  };
112
112
  _context.next = 3;
113
113
  return this.getPublicKey();
@@ -160,7 +160,7 @@ var MainService = /*#__PURE__*/function () {
160
160
  url: '/api/user/v1/getUserByToken',
161
161
  method: 'post',
162
162
  headers: {
163
- Authorization: cache.getCache('token', 'session')
163
+ Authorization: _cache.getCache('token', 'session')
164
164
  },
165
165
  requestId: 'getUserInfo'
166
166
  });
@@ -0,0 +1,4 @@
1
+ export declare function updateFunctionCount(name: string): Promise<void>;
2
+ export declare function getFunctionCount(): Promise<any[]>;
3
+ export declare function clearFunctionCount(): Promise<void>;
4
+ export declare function deleteFunctionItemCount(name: string): Promise<void>;
@@ -1,16 +1,10 @@
1
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
2
-
3
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
-
5
- import { LM_DB, SocketEmitter } from '@cloud-app-dev/utils';
1
+ import _SocketEmitter from "@cloud-app-dev/utils/es/SocketEmitter";
2
+ import _LM_DB from "@cloud-app-dev/utils/es/LM_DB";
3
+ import { __awaiter } from "tslib";
6
4
  import { orderBy } from 'lodash';
7
- var db = new LM_DB('functionCount');
8
- export function updateFunctionCount(_x) {
9
- return _updateFunctionCount.apply(this, arguments);
10
- }
11
-
12
- function _updateFunctionCount() {
13
- _updateFunctionCount = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(name) {
5
+ var db = new _LM_DB('functionCount');
6
+ export function updateFunctionCount(name) {
7
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
14
8
  var item, expireTime;
15
9
  return regeneratorRuntime.wrap(function _callee$(_context) {
16
10
  while (1) {
@@ -50,7 +44,7 @@ function _updateFunctionCount() {
50
44
  });
51
45
 
52
46
  case 11:
53
- SocketEmitter.emit('updateFunctionCount');
47
+ _SocketEmitter.emit('updateFunctionCount', null);
54
48
 
55
49
  case 12:
56
50
  case "end":
@@ -59,22 +53,16 @@ function _updateFunctionCount() {
59
53
  }
60
54
  }, _callee);
61
55
  }));
62
- return _updateFunctionCount.apply(this, arguments);
63
56
  }
64
-
65
57
  export function getFunctionCount() {
66
- return _getFunctionCount.apply(this, arguments);
67
- }
68
-
69
- function _getFunctionCount() {
70
- _getFunctionCount = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
58
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
71
59
  var list;
72
60
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
73
61
  while (1) {
74
62
  switch (_context2.prev = _context2.next) {
75
63
  case 0:
76
64
  _context2.next = 2;
77
- return db.query('functionCount');
65
+ return db.query();
78
66
 
79
67
  case 2:
80
68
  list = _context2.sent;
@@ -87,15 +75,9 @@ function _getFunctionCount() {
87
75
  }
88
76
  }, _callee2);
89
77
  }));
90
- return _getFunctionCount.apply(this, arguments);
91
78
  }
92
-
93
79
  export function clearFunctionCount() {
94
- return _clearFunctionCount.apply(this, arguments);
95
- }
96
-
97
- function _clearFunctionCount() {
98
- _clearFunctionCount = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
80
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
99
81
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
100
82
  while (1) {
101
83
  switch (_context3.prev = _context3.next) {
@@ -110,15 +92,9 @@ function _clearFunctionCount() {
110
92
  }
111
93
  }, _callee3);
112
94
  }));
113
- return _clearFunctionCount.apply(this, arguments);
114
95
  }
115
-
116
- export function deleteFunctionItemCount(_x2) {
117
- return _deleteFunctionItemCount.apply(this, arguments);
118
- }
119
-
120
- function _deleteFunctionItemCount() {
121
- _deleteFunctionItemCount = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(name) {
96
+ export function deleteFunctionItemCount(name) {
97
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
122
98
  return regeneratorRuntime.wrap(function _callee4$(_context4) {
123
99
  while (1) {
124
100
  switch (_context4.prev = _context4.next) {
@@ -133,5 +109,4 @@ function _deleteFunctionItemCount() {
133
109
  }
134
110
  }, _callee4);
135
111
  }));
136
- return _deleteFunctionItemCount.apply(this, arguments);
137
112
  }
@@ -1,5 +1,6 @@
1
1
  import _Config from "@cloud-app-dev/basic-components/es/Config";
2
2
  import _Service from "@cloud-app-dev/basic-components/es/Service";
3
+ import _cache from "@cloud-app-dev/utils/es/cache";
3
4
 
4
5
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
6
 
@@ -31,8 +32,6 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
31
32
 
32
33
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
33
34
 
34
- import { cache } from '@cloud-app-dev/utils';
35
-
36
35
  function catchPromise(fn) {
37
36
  return new Promise(function (resolve) {
38
37
  fn.then(function (res) {
@@ -58,7 +57,7 @@ function _initialization() {
58
57
  switch (_context.prev = _context.next) {
59
58
  case 0:
60
59
  headers = {
61
- Authorization: cache.getCache('token', 'session')
60
+ Authorization: _cache.getCache('token', 'session')
62
61
  };
63
62
  _context.next = 3;
64
63
  return _Service.$http({
@@ -159,7 +158,7 @@ function _initialization() {
159
158
 
160
159
  export function queryOrganizationsList(options) {
161
160
  var headers = {
162
- Authorization: cache.getCache('token', 'session')
161
+ Authorization: _cache.getCache('token', 'session')
163
162
  };
164
163
  var url = '/api/user/v1/organization/queryChildOrganizationsById';
165
164
  return catchPromise(_Service.$http({
@@ -185,7 +184,7 @@ function _queryPlacesList() {
185
184
  switch (_context2.prev = _context2.next) {
186
185
  case 0:
187
186
  headers = {
188
- Authorization: cache.getCache('token', 'session')
187
+ Authorization: _cache.getCache('token', 'session')
189
188
  };
190
189
  url = '/api/place/v1/getPlacesByHasDevice';
191
190
  url2 = '/api/user/v1/organization/queryPlacesByOrganizationId';
@@ -230,7 +229,7 @@ function _queryPlacesList() {
230
229
 
231
230
  function queryUserDevicesNew(data) {
232
231
  var headers = {
233
- Authorization: cache.getCache('token', 'session')
232
+ Authorization: _cache.getCache('token', 'session')
234
233
  };
235
234
  var url = '/api/device/v1/queryDevices4User';
236
235
  return _Service.$http({
@@ -244,7 +243,7 @@ function queryUserDevicesNew(data) {
244
243
 
245
244
  function queryUserDevicesStatusNew(data) {
246
245
  var headers = {
247
- Authorization: cache.getCache('token', 'session')
246
+ Authorization: _cache.getCache('token', 'session')
248
247
  };
249
248
  var url = '/api/device/v1/queryDeviceStatus4User';
250
249
  return _Service.$http({
@@ -258,7 +257,7 @@ function queryUserDevicesStatusNew(data) {
258
257
 
259
258
  function queryDeviceLocalRecordAbilityList(data) {
260
259
  var headers = {
261
- Authorization: cache.getCache('token', 'session')
260
+ Authorization: _cache.getCache('token', 'session')
262
261
  };
263
262
  var url = '/api/device/v1/queryDeviceLocalRecordAbilityList';
264
263
  return _Service.$http({
@@ -1,3 +1,4 @@
1
+ import _logger from "@cloud-app-dev/utils/es/logger";
1
2
  import _Store from "@cloud-app-dev/basic-components/es/Store";
2
3
 
3
4
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
@@ -22,7 +23,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
23
 
23
24
  import React, { useState, useEffect } from 'react';
24
25
  import { initialization, queryOrganizationsList, queryPlacesList, queryUserDevice, authFormat, queryUserOrganizationsList } from './utils';
25
- import { logger } from '@cloud-app-dev/utils';
26
26
  var _BASE_DATA_INIT = false;
27
27
 
28
28
  function InitialRequest(_ref) {
@@ -89,7 +89,7 @@ function InitialRequest(_ref) {
89
89
  }).then(function () {
90
90
  return setIsInit(true);
91
91
  }).catch(function (e) {
92
- return logger.error('接口初始化失败!', e);
92
+ return _logger.error('接口初始化失败!', e);
93
93
  }); // eslint-disable-next-line react-hooks/exhaustive-deps
94
94
  }, []);
95
95
  return isInit ? children : Spin ? /*#__PURE__*/React.createElement(Spin, {
@@ -1,6 +1,7 @@
1
1
  import _Store from "@cloud-app-dev/basic-components/es/Store";
2
2
  import _Config from "@cloud-app-dev/basic-components/es/Config";
3
3
  import _Service from "@cloud-app-dev/basic-components/es/Service";
4
+ import _cache from "@cloud-app-dev/utils/es/cache";
4
5
 
5
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; }
6
7
 
@@ -32,8 +33,6 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
32
33
 
33
34
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
34
35
 
35
- import { cache } from '@cloud-app-dev/utils';
36
-
37
36
  function catchPromise(fn) {
38
37
  return new Promise(function (resolve) {
39
38
  fn.then(function (res) {
@@ -59,7 +58,7 @@ function _initialization() {
59
58
  switch (_context.prev = _context.next) {
60
59
  case 0:
61
60
  headers = {
62
- Authorization: cache.getCache('token', 'session')
61
+ Authorization: _cache.getCache('token', 'session')
63
62
  };
64
63
  _context.next = 3;
65
64
  return _Service.$http({
@@ -213,7 +212,7 @@ function _queryOrganizationsList() {
213
212
  switch (_context2.prev = _context2.next) {
214
213
  case 0:
215
214
  headers = {
216
- Authorization: cache.getCache('token', 'session')
215
+ Authorization: _cache.getCache('token', 'session')
217
216
  };
218
217
  url = '/api/udm-api/DeviceBuzTree/queryList';
219
218
  _context2.next = 4;
@@ -258,7 +257,7 @@ function _queryUserOrganizationsList() {
258
257
  switch (_context3.prev = _context3.next) {
259
258
  case 0:
260
259
  headers = {
261
- Authorization: cache.getCache('token', 'session')
260
+ Authorization: _cache.getCache('token', 'session')
262
261
  };
263
262
  url = '/api/user/v1/organization/queryChildOrganizationsById';
264
263
  return _context3.abrupt("return", catchPromise(_Service.$http({
@@ -294,7 +293,7 @@ function _queryPlacesList() {
294
293
  switch (_context4.prev = _context4.next) {
295
294
  case 0:
296
295
  headers = {
297
- Authorization: cache.getCache('token', 'session')
296
+ Authorization: _cache.getCache('token', 'session')
298
297
  };
299
298
  url = '/api/place/v1/getPlacesByHasDevice';
300
299
  url2 = '/api/user/v1/organization/queryPlacesByOrganizationId';
@@ -339,7 +338,7 @@ function _queryPlacesList() {
339
338
 
340
339
  function queryUserDevicesNew(data) {
341
340
  var headers = {
342
- Authorization: cache.getCache('token', 'session')
341
+ Authorization: _cache.getCache('token', 'session')
343
342
  };
344
343
  var url = '/api/device/v1/queryDevices4User';
345
344
  return _Service.$http({
@@ -353,7 +352,7 @@ function queryUserDevicesNew(data) {
353
352
 
354
353
  function queryUserDevicesStatusNew(data) {
355
354
  var headers = {
356
- Authorization: cache.getCache('token', 'session')
355
+ Authorization: _cache.getCache('token', 'session')
357
356
  };
358
357
  var url = '/api/device/v1/queryDeviceStatus4User';
359
358
  return _Service.$http({
@@ -367,7 +366,7 @@ function queryUserDevicesStatusNew(data) {
367
366
 
368
367
  function queryDeviceLocalRecordAbilityList(data) {
369
368
  var headers = {
370
- Authorization: cache.getCache('token', 'session')
369
+ Authorization: _cache.getCache('token', 'session')
371
370
  };
372
371
  var url = '/api/device/v1/queryDeviceLocalRecordAbilityList';
373
372
  return _Service.$http({
@@ -1,6 +1,7 @@
1
1
  import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
2
2
  import _Tree from "@cloud-app-dev/basic-components/es/Tree";
3
3
  import _CBox from "@cloud-app-dev/basic-components/es/CBox";
4
+ import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
4
5
  import _useHttp2 from "@cloud-app-dev/basic-components/es/useHttp";
5
6
 
6
7
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
@@ -27,7 +28,6 @@ import { __rest } from "tslib";
27
28
  import React, { useEffect, useMemo, useState } from 'react';
28
29
  import api from '../Api';
29
30
  import TreeTitle from '../TreeTitle';
30
- import { treeHelper } from '@cloud-app-dev/utils';
31
31
  import { getParentListById } from '../utils';
32
32
  import "./index.css";
33
33
 
@@ -56,7 +56,7 @@ function OrgUserTree(_a) {
56
56
  orgList = _useHttp$data === void 0 ? [] : _useHttp$data;
57
57
 
58
58
  var treeData = useMemo(function () {
59
- return treeHelper.computTreeList(orgList);
59
+ return _treeHelper.computTreeList(orgList);
60
60
  }, [orgList]);
61
61
  useEffect(function () {
62
62
  var keys = [];