@cloud-app-dev/vidc 1.0.39 → 1.0.40
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/es/AppLayout/AppHeader/index.d.ts +18 -0
- package/es/AppLayout/AppHeader/index.js +5 -6
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +1 -0
- package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +9 -0
- package/es/AppLayout/AppHorizontalMenu/index.d.ts +13 -0
- package/es/AppLayout/AppHorizontalMenu/index.js +6 -13
- package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +9 -0
- package/es/AppLayout/AppInlineMenu/SubGroup.js +29 -70
- package/es/AppLayout/AppInlineMenu/index.d.ts +12 -0
- package/es/AppLayout/AppInlineMenu/index.js +10 -15
- package/es/AppLayout/AppLogo/index.d.ts +13 -0
- package/es/AppLayout/AppLogo/index.js +9 -10
- package/es/AppLayout/AppTools/index.d.ts +7 -9
- package/es/AppLayout/FunctionPreview/index.d.ts +22 -0
- package/es/AppLayout/FunctionPreview/index.js +33 -39
- package/es/AppLayout/Header/ListenceRoute.d.ts +5 -0
- package/es/AppLayout/Header/ListenceRoute.js +1 -1
- package/es/AppLayout/Header/ModifyPassword/index.d.ts +6 -0
- package/es/AppLayout/Header/ModifyPassword/index.js +72 -38
- package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +10 -0
- package/es/AppLayout/Header/ModifyUserAvatar/index.js +4 -10
- package/es/AppLayout/Header/NotifyAlarm.js +1 -2
- package/es/AppLayout/Header/Tools.d.ts +11 -0
- package/es/AppLayout/Header/Tools.js +2 -3
- package/es/AppLayout/Header/ToolsItem.d.ts +1 -0
- package/es/AppLayout/Header/ToolsItem.js +7 -14
- package/es/AppLayout/Header/UserAction.d.ts +10 -0
- package/es/AppLayout/Header/UserAction.js +28 -34
- package/es/AppLayout/Header/index.d.ts +9 -0
- package/es/AppLayout/Header/index.js +10 -22
- package/es/AppLayout/index.d.ts +10 -12
- package/es/AppLayout/index.js +2 -1
- package/es/TreeMode/index.js +8 -0
- package/package.json +2 -2
- package/scripts/entry.js +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as H from 'history';
|
|
3
|
+
import { UserInfo } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
4
|
+
import './index.less';
|
|
5
|
+
interface IAppHeaderProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
renderMenu?: boolean;
|
|
8
|
+
isMenuHome?: boolean;
|
|
9
|
+
systemLogo?: string;
|
|
10
|
+
defaultSrc?: string;
|
|
11
|
+
systemName?: string;
|
|
12
|
+
appTools?: React.ReactNode;
|
|
13
|
+
history: H.History;
|
|
14
|
+
menuType?: string;
|
|
15
|
+
userInfo?: UserInfo;
|
|
16
|
+
}
|
|
17
|
+
declare function AppHeader({ className, renderMenu, isMenuHome, systemLogo, defaultSrc, systemName, appTools, history, menuType, userInfo }: IAppHeaderProps): JSX.Element;
|
|
18
|
+
export default AppHeader;
|
|
@@ -4,16 +4,15 @@ import AppTools from '../AppTools';
|
|
|
4
4
|
import AppHorizontalMenu from '../AppHorizontalMenu';
|
|
5
5
|
import MenuEmptyBox from '../AppHorizontalMenu/MenuEmptyBox';
|
|
6
6
|
import "./index.css";
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
function AppHeader(_ref) {
|
|
8
9
|
var _ref$className = _ref.className,
|
|
9
10
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
10
11
|
renderMenu = _ref.renderMenu,
|
|
11
12
|
isMenuHome = _ref.isMenuHome,
|
|
12
|
-
menuSelect = _ref.menuSelect,
|
|
13
13
|
systemLogo = _ref.systemLogo,
|
|
14
14
|
defaultSrc = _ref.defaultSrc,
|
|
15
15
|
systemName = _ref.systemName,
|
|
16
|
-
selectedKeys = _ref.selectedKeys,
|
|
17
16
|
appTools = _ref.appTools,
|
|
18
17
|
history = _ref.history,
|
|
19
18
|
menuType = _ref.menuType,
|
|
@@ -35,8 +34,8 @@ export default function AppHeader(_ref) {
|
|
|
35
34
|
userInfo: userInfo
|
|
36
35
|
}), menuType !== 'inline' ? /*#__PURE__*/React.createElement(AppHorizontalMenu, {
|
|
37
36
|
renderMenu: renderMenu,
|
|
38
|
-
onSelect: menuSelect,
|
|
39
|
-
selectedKeys: selectedKeys,
|
|
40
37
|
history: history
|
|
41
38
|
}) : /*#__PURE__*/React.createElement(MenuEmptyBox, null), /*#__PURE__*/React.createElement(AppTools, null, appTools));
|
|
42
|
-
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default AppHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function MenuEmptyBox(): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FeatureItem } from '@cloud-app-dev/basic-components/es/Store/auth';
|
|
3
|
+
interface ISubGroupProps {
|
|
4
|
+
item: FeatureItem & any;
|
|
5
|
+
onClick: (e: React.MouseEvent, item: FeatureItem) => void;
|
|
6
|
+
currentMenuKeys: string[];
|
|
7
|
+
}
|
|
8
|
+
declare function SubGroup({ item, onClick, currentMenuKeys }: ISubGroupProps): JSX.Element;
|
|
9
|
+
export default SubGroup;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AuthStoreInterface } from '@cloud-app-dev/basic-components/es/Store/auth';
|
|
2
|
+
import { AppStoreInterface } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
3
|
+
import * as H from 'history';
|
|
4
|
+
import './index.less';
|
|
5
|
+
interface IAppHorizontalMenuProps {
|
|
6
|
+
auth?: AuthStoreInterface;
|
|
7
|
+
app?: AppStoreInterface;
|
|
8
|
+
history: H.History;
|
|
9
|
+
renderMenu?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function AppHorizontalMenu({ auth, app, history, renderMenu }: IAppHorizontalMenuProps): JSX.Element;
|
|
12
|
+
declare const _default: typeof AppHorizontalMenu & import("mobx-react").IWrappedComponent<IAppHorizontalMenuProps>;
|
|
13
|
+
export default _default;
|
|
@@ -2,12 +2,6 @@ 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
4
|
|
|
5
|
-
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
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
-
|
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
-
|
|
11
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
6
|
|
|
13
7
|
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."); }
|
|
@@ -65,7 +59,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
65
59
|
var container = menuBoxRef.current.querySelector('.menu-layout-wrapper');
|
|
66
60
|
var menuBox = container.querySelector('.menu-layout-box');
|
|
67
61
|
setState(function (old) {
|
|
68
|
-
return
|
|
62
|
+
return Object.assign(Object.assign({}, old), {
|
|
69
63
|
visible: container.clientWidth < menuBox.clientWidth
|
|
70
64
|
});
|
|
71
65
|
});
|
|
@@ -79,7 +73,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
79
73
|
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(uuid()) : ''));
|
|
80
74
|
setTimeout(function () {
|
|
81
75
|
return setState(function (old) {
|
|
82
|
-
return
|
|
76
|
+
return Object.assign(Object.assign({}, old), {
|
|
83
77
|
isFunc: false
|
|
84
78
|
});
|
|
85
79
|
});
|
|
@@ -94,7 +88,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
94
88
|
}
|
|
95
89
|
|
|
96
90
|
setPosState(function (old) {
|
|
97
|
-
return
|
|
91
|
+
return Object.assign(Object.assign({}, old), {
|
|
98
92
|
offset: offset
|
|
99
93
|
});
|
|
100
94
|
});
|
|
@@ -110,7 +104,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
setPosState(function (old) {
|
|
113
|
-
return
|
|
107
|
+
return Object.assign(Object.assign({}, old), {
|
|
114
108
|
offset: offset
|
|
115
109
|
});
|
|
116
110
|
});
|
|
@@ -150,7 +144,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
150
144
|
className: "app-menu-item-top app-top-all-func ".concat(state.isFunc ? 'app-menu-item-top-selected' : ''),
|
|
151
145
|
onClick: function onClick() {
|
|
152
146
|
return setState(function (old) {
|
|
153
|
-
return
|
|
147
|
+
return Object.assign(Object.assign({}, old), {
|
|
154
148
|
isFunc: true
|
|
155
149
|
});
|
|
156
150
|
});
|
|
@@ -210,7 +204,6 @@ function AppHorizontalMenu(_ref) {
|
|
|
210
204
|
type: "top"
|
|
211
205
|
}, state.isFunc ? /*#__PURE__*/React.createElement(FunctionPreview, {
|
|
212
206
|
className: "app-horizontal-funcs",
|
|
213
|
-
currentMenuKeys: app.currentMenuKeys,
|
|
214
207
|
onMenuSelect: onMenuSelect,
|
|
215
208
|
key: "all",
|
|
216
209
|
menuList: auth.userMenuList
|
|
@@ -223,7 +216,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
223
216
|
className: "fun-preview-mask",
|
|
224
217
|
onClick: function onClick() {
|
|
225
218
|
return setState(function (old) {
|
|
226
|
-
return
|
|
219
|
+
return Object.assign(Object.assign({}, old), {
|
|
227
220
|
isFunc: false
|
|
228
221
|
});
|
|
229
222
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ISubGroupProps {
|
|
3
|
+
menuList: any[];
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
onMenuSelect?: (e: React.MouseEvent, v2: any, flag: boolean) => void;
|
|
6
|
+
currentMenuKeys?: string[];
|
|
7
|
+
}
|
|
8
|
+
declare function SubGroup({ menuList, style, onMenuSelect, currentMenuKeys }: ISubGroupProps): JSX.Element;
|
|
9
|
+
export default SubGroup;
|
|
@@ -1,75 +1,34 @@
|
|
|
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
1
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
|
-
|
|
5
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
-
|
|
7
|
-
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); } }
|
|
8
|
-
|
|
9
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10
|
-
|
|
11
|
-
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); }
|
|
12
|
-
|
|
13
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
|
-
|
|
15
|
-
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); }; }
|
|
16
|
-
|
|
17
|
-
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); }
|
|
18
|
-
|
|
19
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
20
|
-
|
|
21
|
-
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; } }
|
|
22
|
-
|
|
23
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
|
-
|
|
25
2
|
import React from 'react';
|
|
26
3
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
57
|
-
key: v2.code,
|
|
58
|
-
className: "app-menu-lv3-item ".concat(currentMenuKeys.includes("".concat(v2.code)) ? 'app-menu-lv3-item-selected' : ''),
|
|
59
|
-
onClick: function onClick(e) {
|
|
60
|
-
return onMenuSelect(e, v2, true);
|
|
61
|
-
}
|
|
62
|
-
}, /*#__PURE__*/React.createElement(_IconFont, {
|
|
63
|
-
type: v2.icon || 'icon-L_Bar_Objectification1'
|
|
64
|
-
}), " ", /*#__PURE__*/React.createElement("span", null, v2.name), /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "menu-bg-mask"
|
|
66
|
-
}));
|
|
67
|
-
}));
|
|
68
|
-
})));
|
|
69
|
-
}
|
|
70
|
-
}]);
|
|
71
|
-
|
|
72
|
-
return SubGroup;
|
|
73
|
-
}(React.Component);
|
|
4
|
+
function SubGroup(_ref) {
|
|
5
|
+
var menuList = _ref.menuList,
|
|
6
|
+
style = _ref.style,
|
|
7
|
+
onMenuSelect = _ref.onMenuSelect,
|
|
8
|
+
currentMenuKeys = _ref.currentMenuKeys;
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "app-inline-menu-sub-container",
|
|
11
|
+
style: style
|
|
12
|
+
}, /*#__PURE__*/React.createElement("ul", null, menuList.map(function (v) {
|
|
13
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
14
|
+
key: v.code
|
|
15
|
+
}, /*#__PURE__*/React.createElement("li", {
|
|
16
|
+
className: "app-menu-lv2-item",
|
|
17
|
+
key: v.code
|
|
18
|
+
}, /*#__PURE__*/React.createElement("span", null, v.name)), Array.isArray(v.children) && v.children.map(function (v2) {
|
|
19
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
20
|
+
key: v2.code,
|
|
21
|
+
className: "app-menu-lv3-item ".concat(currentMenuKeys.includes("".concat(v2.code)) ? 'app-menu-lv3-item-selected' : ''),
|
|
22
|
+
onClick: function onClick(e) {
|
|
23
|
+
return onMenuSelect(e, v2, true);
|
|
24
|
+
}
|
|
25
|
+
}, /*#__PURE__*/React.createElement(_IconFont, {
|
|
26
|
+
type: v2.icon || 'icon-L_Bar_Objectification1'
|
|
27
|
+
}), " ", /*#__PURE__*/React.createElement("span", null, v2.name), /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: "menu-bg-mask"
|
|
29
|
+
}));
|
|
30
|
+
}));
|
|
31
|
+
})));
|
|
32
|
+
}
|
|
74
33
|
|
|
75
34
|
export default SubGroup;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as H from 'history';
|
|
2
|
+
import { AppStoreInterface } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
3
|
+
import { AuthStoreInterface } from '@cloud-app-dev/basic-components/es/Store/auth';
|
|
4
|
+
import './index.less';
|
|
5
|
+
interface IAppInlineMenuProps {
|
|
6
|
+
auth?: AuthStoreInterface;
|
|
7
|
+
app?: AppStoreInterface;
|
|
8
|
+
history: H.History;
|
|
9
|
+
}
|
|
10
|
+
declare function AppInlineMenu({ auth, app, history }: IAppInlineMenuProps): JSX.Element;
|
|
11
|
+
declare const _default: typeof AppInlineMenu & import("mobx-react").IWrappedComponent<IAppInlineMenuProps>;
|
|
12
|
+
export default _default;
|
|
@@ -2,12 +2,6 @@ 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
4
|
|
|
5
|
-
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
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
-
|
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
-
|
|
11
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
6
|
|
|
13
7
|
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."); }
|
|
@@ -59,7 +53,8 @@ function AppInlineMenu(_ref) {
|
|
|
59
53
|
};
|
|
60
54
|
}, [state.collapsed]);
|
|
61
55
|
var scrollSize = useMemo(function () {
|
|
62
|
-
|
|
56
|
+
var root = document.querySelector(':root');
|
|
57
|
+
return root.style.getPropertyValue('--scrollbar-width');
|
|
63
58
|
}, []);
|
|
64
59
|
var onMenuSelect = useCallback(function (e, item, flag) {
|
|
65
60
|
if (item.level === 3) {
|
|
@@ -71,7 +66,7 @@ function AppInlineMenu(_ref) {
|
|
|
71
66
|
|
|
72
67
|
if (flag) {
|
|
73
68
|
setState(function (old) {
|
|
74
|
-
return
|
|
69
|
+
return Object.assign(Object.assign({}, old), {
|
|
75
70
|
subMenuKey: '',
|
|
76
71
|
subMenus: [],
|
|
77
72
|
collapsed: true
|
|
@@ -83,7 +78,7 @@ function AppInlineMenu(_ref) {
|
|
|
83
78
|
}
|
|
84
79
|
|
|
85
80
|
setState(function (old) {
|
|
86
|
-
return
|
|
81
|
+
return Object.assign(Object.assign({}, old), {
|
|
87
82
|
subMenuKey: old.subMenuKey === item.code ? '' : item.code,
|
|
88
83
|
subMenus: item.children
|
|
89
84
|
});
|
|
@@ -91,20 +86,21 @@ function AppInlineMenu(_ref) {
|
|
|
91
86
|
}, [auth.userMenuList, history]);
|
|
92
87
|
var onSelectFuns = useCallback(function () {
|
|
93
88
|
return setState(function (old) {
|
|
94
|
-
return
|
|
89
|
+
return Object.assign(Object.assign({}, old), {
|
|
95
90
|
subMenuKey: old.subMenuKey === 'all' ? '' : 'all'
|
|
96
91
|
});
|
|
97
92
|
});
|
|
98
93
|
}, []);
|
|
99
94
|
useLayoutEffect(function () {
|
|
100
95
|
var fn = function fn(e) {
|
|
101
|
-
var
|
|
96
|
+
var arr = Array.from(e.path);
|
|
97
|
+
var item = arr.find(function (v) {
|
|
102
98
|
return v.classList && (v.classList.contains('app-inline-menu-sub-container') || v.classList.contains('app-inline-menu-container'));
|
|
103
99
|
});
|
|
104
100
|
|
|
105
101
|
if (!item) {
|
|
106
102
|
setState(function (old) {
|
|
107
|
-
return
|
|
103
|
+
return Object.assign(Object.assign({}, old), {
|
|
108
104
|
collapsed: true,
|
|
109
105
|
subMenuKey: '',
|
|
110
106
|
subMenus: []
|
|
@@ -130,7 +126,7 @@ function AppInlineMenu(_ref) {
|
|
|
130
126
|
className: "menu-collapsed-btn",
|
|
131
127
|
onClick: function onClick() {
|
|
132
128
|
return setState(function (old) {
|
|
133
|
-
return
|
|
129
|
+
return Object.assign(Object.assign({}, old), {
|
|
134
130
|
collapsed: !state.collapsed
|
|
135
131
|
});
|
|
136
132
|
});
|
|
@@ -155,7 +151,7 @@ function AppInlineMenu(_ref) {
|
|
|
155
151
|
type: "icon-quangongneng"
|
|
156
152
|
}), !state.collapsed ? /*#__PURE__*/React.createElement("span", null, "\u5FEB\u901F\u5BFC\u822A") : null))), menuList.map(function (v) {
|
|
157
153
|
return /*#__PURE__*/React.createElement("li", {
|
|
158
|
-
className: "app-menu-top-item ".concat(app.currentMenuKeys.includes("".concat(v.code)) ? 'app-menu-top-item-selected' : '', " ").concat(state.subMenuKey === v.code ? 'app-menu-sub-item-selected' : ''),
|
|
154
|
+
className: "app-menu-top-item ".concat(app.currentMenuKeys.includes("".concat(v.code)) ? 'app-menu-top-item-selected' : '', " ").concat("".concat(state.subMenuKey) === "".concat(v.code) ? 'app-menu-sub-item-selected' : ''),
|
|
159
155
|
key: v.code
|
|
160
156
|
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
|
161
157
|
title: v.name,
|
|
@@ -178,7 +174,6 @@ function AppInlineMenu(_ref) {
|
|
|
178
174
|
}) : /*#__PURE__*/React.createElement(React.Fragment, {
|
|
179
175
|
key: "menuempty"
|
|
180
176
|
}), state.subMenuKey && state.subMenuKey === 'all' ? /*#__PURE__*/React.createElement(FunctionPreview, {
|
|
181
|
-
currentMenuKeys: app.currentMenuKeys,
|
|
182
177
|
style: popStyle,
|
|
183
178
|
onMenuSelect: onMenuSelect,
|
|
184
179
|
key: "all",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { UserInfo } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
3
|
+
import * as H from 'history';
|
|
4
|
+
interface IAppLogoProps {
|
|
5
|
+
systemLogo?: string;
|
|
6
|
+
defaultSrc?: string;
|
|
7
|
+
systemName?: string;
|
|
8
|
+
userInfo?: UserInfo;
|
|
9
|
+
isMenuHome?: boolean;
|
|
10
|
+
history?: H.History;
|
|
11
|
+
}
|
|
12
|
+
export default function AppLogo({ systemLogo, defaultSrc, systemName, userInfo, isMenuHome }: IAppLogoProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "antd/lib/col/style";
|
|
2
|
-
import _Col from "antd/lib/col";
|
|
3
1
|
import _ImageView from "@cloud-app-dev/basic-components/es/ImageView";
|
|
4
2
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
3
|
+
import "antd/lib/col/style";
|
|
4
|
+
import _Col from "antd/lib/col";
|
|
5
5
|
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
6
6
|
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
7
7
|
|
|
@@ -25,8 +25,7 @@ export default function AppLogo(_ref) {
|
|
|
25
25
|
defaultSrc = _ref.defaultSrc,
|
|
26
26
|
systemName = _ref.systemName,
|
|
27
27
|
userInfo = _ref.userInfo,
|
|
28
|
-
isMenuHome = _ref.isMenuHome
|
|
29
|
-
history = _ref.history;
|
|
28
|
+
isMenuHome = _ref.isMenuHome;
|
|
30
29
|
var BSConfig = _Config.BSConfig;
|
|
31
30
|
|
|
32
31
|
var _useState = useState(false),
|
|
@@ -44,11 +43,11 @@ export default function AppLogo(_ref) {
|
|
|
44
43
|
return cache.getCache('GATEWAY_STATE', 'session');
|
|
45
44
|
}, []);
|
|
46
45
|
useEffect(function () {
|
|
47
|
-
//用户名显示是否加入行政区划
|
|
48
|
-
|
|
49
|
-
var _BSConfig$funcConfig;
|
|
46
|
+
var _a; //用户名显示是否加入行政区划
|
|
47
|
+
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
if (!isMenuHome) {
|
|
50
|
+
if (userInfo.addressCode && ((_a = BSConfig === null || BSConfig === void 0 ? void 0 : BSConfig.funcConfig) === null || _a === void 0 ? void 0 : _a.needUserAddress)) {
|
|
52
51
|
_Service.$http({
|
|
53
52
|
method: 'get',
|
|
54
53
|
url: "/micro-apps/micro-dep-librarys/config/location.json"
|
|
@@ -89,8 +88,8 @@ export default function AppLogo(_ref) {
|
|
|
89
88
|
defaultSrc: defaultSrc
|
|
90
89
|
})), !isMenuHome || GatewayState ? /*#__PURE__*/React.createElement("span", {
|
|
91
90
|
className: "logo-name",
|
|
92
|
-
title: name
|
|
93
|
-
|
|
91
|
+
title: name,
|
|
92
|
+
// onClick={() => handleGateway()}
|
|
94
93
|
style: {
|
|
95
94
|
cursor: 'pointer'
|
|
96
95
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IAppToolsProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export default AppTools;
|
|
7
|
+
export default function AppTools({ className, children }: IAppToolsProps): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FeatureItem } from '@cloud-app-dev/basic-components/es/Store/auth';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface IFunctionPreviewProps {
|
|
5
|
+
menuList: FeatureItem[];
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
className?: string;
|
|
8
|
+
onMenuSelect: (e: React.MouseEvent, item: FeatureItem, flag?: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
interface IFunctionPreviewState {
|
|
11
|
+
nearList: any[];
|
|
12
|
+
keyword: string;
|
|
13
|
+
}
|
|
14
|
+
declare class FunctionPreview extends React.Component<IFunctionPreviewProps, IFunctionPreviewState> {
|
|
15
|
+
menuList: FeatureItem[];
|
|
16
|
+
constructor(props: IFunctionPreviewProps);
|
|
17
|
+
getNearList: () => void;
|
|
18
|
+
clearNearList: () => Promise<void>;
|
|
19
|
+
deleteCountItem: (event: React.MouseEvent, item: FeatureItem) => Promise<void>;
|
|
20
|
+
render(): JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
export default FunctionPreview;
|
|
@@ -3,10 +3,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
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
5
|
|
|
6
|
-
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); } }
|
|
7
|
-
|
|
8
|
-
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); }); }; }
|
|
9
|
-
|
|
10
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
7
|
|
|
12
8
|
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); } }
|
|
@@ -27,11 +23,13 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
27
23
|
|
|
28
24
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
29
25
|
|
|
26
|
+
import { __awaiter } from "tslib";
|
|
30
27
|
import React from 'react';
|
|
31
28
|
import { getFunctionCount, clearFunctionCount, deleteFunctionItemCount } from '../utils';
|
|
32
29
|
import { cache } from '@cloud-app-dev/utils';
|
|
33
30
|
import "./index.css";
|
|
34
31
|
var CACHE_KEY = 'functionCount';
|
|
32
|
+
var _global = window;
|
|
35
33
|
|
|
36
34
|
var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
37
35
|
_inherits(FunctionPreview, _React$Component);
|
|
@@ -43,7 +41,8 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
43
41
|
|
|
44
42
|
_classCallCheck(this, FunctionPreview);
|
|
45
43
|
|
|
46
|
-
_this = _super.call(this);
|
|
44
|
+
_this = _super.call(this, props);
|
|
45
|
+
_this.menuList = []; // eslint-disable-next-line no-undef
|
|
47
46
|
|
|
48
47
|
_this.getNearList = function () {
|
|
49
48
|
getFunctionCount().then(function (counts) {
|
|
@@ -59,31 +58,32 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
59
58
|
});
|
|
60
59
|
};
|
|
61
60
|
|
|
62
|
-
_this.clearNearList =
|
|
63
|
-
return regeneratorRuntime.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
case 2:
|
|
71
|
-
cache.setUserCache(CACHE_KEY, []);
|
|
61
|
+
_this.clearNearList = function () {
|
|
62
|
+
return __awaiter(_assertThisInitialized(_this), void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
63
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
64
|
+
while (1) {
|
|
65
|
+
switch (_context.prev = _context.next) {
|
|
66
|
+
case 0:
|
|
67
|
+
_context.next = 2;
|
|
68
|
+
return clearFunctionCount();
|
|
72
69
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
case 2:
|
|
71
|
+
cache.setUserCache(CACHE_KEY, []);
|
|
72
|
+
this.setState({
|
|
73
|
+
nearList: []
|
|
74
|
+
});
|
|
76
75
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
case 4:
|
|
77
|
+
case "end":
|
|
78
|
+
return _context.stop();
|
|
79
|
+
}
|
|
80
80
|
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
81
|
+
}, _callee, this);
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
84
84
|
|
|
85
|
-
_this.deleteCountItem =
|
|
86
|
-
|
|
85
|
+
_this.deleteCountItem = function (event, item) {
|
|
86
|
+
return __awaiter(_assertThisInitialized(_this), void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
87
87
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
88
88
|
while (1) {
|
|
89
89
|
switch (_context2.prev = _context2.next) {
|
|
@@ -93,25 +93,20 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
93
93
|
return deleteFunctionItemCount(item.alias);
|
|
94
94
|
|
|
95
95
|
case 3:
|
|
96
|
-
|
|
96
|
+
this.getNearList();
|
|
97
97
|
|
|
98
98
|
case 4:
|
|
99
99
|
case "end":
|
|
100
100
|
return _context2.stop();
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
}, _callee2);
|
|
103
|
+
}, _callee2, this);
|
|
104
104
|
}));
|
|
105
|
+
};
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
return _ref2.apply(this, arguments);
|
|
108
|
-
};
|
|
109
|
-
}();
|
|
110
|
-
|
|
111
|
-
var _counts = cache.getUserCache(CACHE_KEY) || [];
|
|
112
|
-
|
|
107
|
+
var counts = cache.getUserCache(CACHE_KEY) || [];
|
|
113
108
|
_this.state = {
|
|
114
|
-
nearList:
|
|
109
|
+
nearList: counts.map(function (item) {
|
|
115
110
|
return _Store.auth.getInfoByName(item.id);
|
|
116
111
|
}).filter(function (v) {
|
|
117
112
|
return !!v;
|
|
@@ -125,8 +120,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
125
120
|
return v.level === 3 && v.type !== 0;
|
|
126
121
|
});
|
|
127
122
|
return _this;
|
|
128
|
-
}
|
|
129
|
-
|
|
123
|
+
}
|
|
130
124
|
|
|
131
125
|
_createClass(FunctionPreview, [{
|
|
132
126
|
key: "render",
|
|
@@ -139,7 +133,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
139
133
|
className = _this$props.className;
|
|
140
134
|
var keyword = this.state.keyword;
|
|
141
135
|
var list = this.menuList.filter(function (v2) {
|
|
142
|
-
return v2.name.includes(keyword) ||
|
|
136
|
+
return v2.name.includes(keyword) || _global.pinyinUtil.getFirstLetter(v2.name).includes(keyword.toUpperCase()) || _global.pinyinUtil.getPinyin(v2.name).replace(/\s/g, '').includes(keyword.toLowerCase());
|
|
143
137
|
});
|
|
144
138
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
145
139
|
className: "app-inline-menu-sub-container app-inline-funs-sub-container ".concat(className),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _Drawer from "@cloud-app-dev/basic-components/es/Drawer";
|
|
2
|
-
import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
|
|
3
1
|
import "antd/lib/input/style";
|
|
4
2
|
import _Input from "antd/lib/input";
|
|
3
|
+
import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
|
|
4
|
+
import _Drawer from "@cloud-app-dev/basic-components/es/Drawer";
|
|
5
5
|
import "antd/lib/message/style";
|
|
6
6
|
import _message from "antd/lib/message";
|
|
7
7
|
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
@@ -21,11 +21,14 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
21
21
|
|
|
22
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
23
|
|
|
24
|
+
import { __awaiter } from "tslib";
|
|
24
25
|
import React, { useCallback } from 'react';
|
|
25
26
|
import AppService from '../../service';
|
|
26
27
|
var FormItem = _Form.Item;
|
|
27
28
|
|
|
28
29
|
function ModifyPassword(_ref) {
|
|
30
|
+
var _this = this;
|
|
31
|
+
|
|
29
32
|
var visible = _ref.visible,
|
|
30
33
|
_onClose = _ref.onClose;
|
|
31
34
|
|
|
@@ -35,42 +38,73 @@ function ModifyPassword(_ref) {
|
|
|
35
38
|
|
|
36
39
|
var onOk = useCallback(function () {
|
|
37
40
|
form.validateFields().then(function (values) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
41
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
42
|
+
var _a, res, msg;
|
|
43
|
+
|
|
44
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
45
|
+
while (1) {
|
|
46
|
+
switch (_context.prev = _context.next) {
|
|
47
|
+
case 0:
|
|
48
|
+
_Service.logger.save({
|
|
49
|
+
description: "\u3010".concat(_Store.app.userInfo.loginName, "\u3011\u4FEE\u6539\u5BC6\u7801"),
|
|
50
|
+
module: 120300,
|
|
51
|
+
function: 120301
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
_context.prev = 1;
|
|
55
|
+
_context.next = 4;
|
|
56
|
+
return AppService.changePassword({
|
|
57
|
+
id: _Store.app.userInfo.id,
|
|
58
|
+
oldPassword: values.oldPassword,
|
|
59
|
+
newPassword: values.newPassword
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
case 4:
|
|
63
|
+
res = _context.sent;
|
|
64
|
+
|
|
65
|
+
if (!((res === null || res === void 0 ? void 0 : res.code) !== 0)) {
|
|
66
|
+
_context.next = 7;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return _context.abrupt("return", _message.warn((res === null || res === void 0 ? void 0 : res.message) || '请求失败'));
|
|
71
|
+
|
|
72
|
+
case 7:
|
|
73
|
+
_message.success('密码修改成功!');
|
|
74
|
+
|
|
75
|
+
_context.next = 10;
|
|
76
|
+
return AppService.loginOut();
|
|
77
|
+
|
|
78
|
+
case 10:
|
|
79
|
+
_onClose();
|
|
80
|
+
|
|
81
|
+
setTimeout(function () {
|
|
82
|
+
sessionStorage.clear();
|
|
83
|
+
window.location.replace('/login');
|
|
84
|
+
}, 100);
|
|
85
|
+
_context.next = 19;
|
|
86
|
+
break;
|
|
87
|
+
|
|
88
|
+
case 14:
|
|
89
|
+
_context.prev = 14;
|
|
90
|
+
_context.t0 = _context["catch"](1);
|
|
91
|
+
console.log(_context.t0);
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
msg = (_a = _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.data) === null || _a === void 0 ? void 0 : _a.message;
|
|
95
|
+
} catch (e) {
|
|
96
|
+
msg = '密码修改失败!';
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
_message.error(msg);
|
|
100
|
+
|
|
101
|
+
case 19:
|
|
102
|
+
case "end":
|
|
103
|
+
return _context.stop();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}, _callee, null, [[1, 14]]);
|
|
107
|
+
}));
|
|
74
108
|
});
|
|
75
109
|
}, [form, _onClose]);
|
|
76
110
|
return /*#__PURE__*/React.createElement(_Drawer, {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AppStoreInterface } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IModifyUserAvatarProps {
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
app?: AppStoreInterface;
|
|
7
|
+
}
|
|
8
|
+
declare function ModifyUserAvatar({ visible, onClose, app }: IModifyUserAvatarProps): JSX.Element;
|
|
9
|
+
declare const _default: typeof ModifyUserAvatar & import("mobx-react").IWrappedComponent<IModifyUserAvatarProps>;
|
|
10
|
+
export default _default;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import _Drawer from "@cloud-app-dev/basic-components/es/Drawer";
|
|
2
|
-
import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
|
|
3
1
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
|
-
import _CBox from "@cloud-app-dev/basic-components/es/CBox";
|
|
5
2
|
import _ImageView from "@cloud-app-dev/basic-components/es/ImageView";
|
|
3
|
+
import _CBox from "@cloud-app-dev/basic-components/es/CBox";
|
|
4
|
+
import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
|
|
5
|
+
import _Drawer from "@cloud-app-dev/basic-components/es/Drawer";
|
|
6
6
|
import "antd/lib/message/style";
|
|
7
7
|
import _message from "antd/lib/message";
|
|
8
8
|
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
9
9
|
|
|
10
|
-
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; }
|
|
11
|
-
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
13
|
-
|
|
14
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
|
|
16
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
11
|
|
|
18
12
|
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."); }
|
|
@@ -53,7 +47,7 @@ function ModifyUserAvatar(_ref) {
|
|
|
53
47
|
id: app.userInfo.id,
|
|
54
48
|
userAvatarUrl: userAvatarUrl
|
|
55
49
|
}).then(function () {
|
|
56
|
-
app.updateUserInfo(
|
|
50
|
+
app.updateUserInfo(Object.assign(Object.assign({}, app.userInfo), {
|
|
57
51
|
userAvatarUrl: userAvatarUrl
|
|
58
52
|
}));
|
|
59
53
|
onClose();
|
|
@@ -61,8 +61,7 @@ var NotifyAlarm = /*#__PURE__*/function (_React$Component) {
|
|
|
61
61
|
} catch (error) {}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
if (args.messageType === 'multiMonitorActivityMessage' && (+args.isAccept === 1 || +args.isAccept === 2)) return false;
|
|
65
|
-
console.info('告警消息args====', args); // 重点人员布控 响铃设置判断
|
|
64
|
+
if (args.messageType === 'multiMonitorActivityMessage' && (+args.isAccept === 1 || +args.isAccept === 2)) return false; // 重点人员布控 响铃设置判断
|
|
66
65
|
|
|
67
66
|
if (args.alarmType * 1 === 1 && Array.apply(null, args === null || args === void 0 ? void 0 : (_args$data = args.data) === null || _args$data === void 0 ? void 0 : _args$data.ignoreSoundAlarmUser).includes(1 * _Store.app.userInfo.id)) return false;
|
|
68
67
|
clearTimeout(_this.timer);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as H from 'history';
|
|
2
|
+
import { AppStoreInterface } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
3
|
+
interface IAppToolsProps {
|
|
4
|
+
history: H.History;
|
|
5
|
+
app?: AppStoreInterface & any;
|
|
6
|
+
isMenuHome?: boolean;
|
|
7
|
+
portalPath?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function AppTools({ history, app, isMenuHome, portalPath }: IAppToolsProps): JSX.Element;
|
|
10
|
+
declare const _default: typeof AppTools & import("mobx-react").IWrappedComponent<IAppToolsProps>;
|
|
11
|
+
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "antd/lib/avatar/style";
|
|
2
2
|
import _Avatar from "antd/lib/avatar";
|
|
3
3
|
import _FullScreen from "@cloud-app-dev/basic-components/es/FullScreen";
|
|
4
|
+
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
5
|
import "antd/lib/popover/style";
|
|
5
6
|
import _Popover from "antd/lib/popover";
|
|
6
|
-
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
7
7
|
import React, { useCallback, useMemo } from 'react';
|
|
8
8
|
import UserAction from './UserAction';
|
|
9
9
|
import ToolsItem from './ToolsItem';
|
|
@@ -79,8 +79,7 @@ function AppTools(_ref) {
|
|
|
79
79
|
fontSize: 'var(--fs)'
|
|
80
80
|
}
|
|
81
81
|
}, app.userInfo.realName || app.userInfo.loginName), /*#__PURE__*/React.createElement(_IconFont, {
|
|
82
|
-
type: "icon-S_Arrow_SmallDown"
|
|
83
|
-
theme: "outlined"
|
|
82
|
+
type: "icon-S_Arrow_SmallDown"
|
|
84
83
|
}))));
|
|
85
84
|
}
|
|
86
85
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ToolsItem({ className, children, ...props }: any): JSX.Element;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
-
|
|
7
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
-
|
|
1
|
+
import { __rest } from "tslib";
|
|
9
2
|
import React from 'react';
|
|
10
|
-
export default function ToolsItem(
|
|
11
|
-
var
|
|
12
|
-
className =
|
|
13
|
-
children =
|
|
14
|
-
props =
|
|
3
|
+
export default function ToolsItem(_a) {
|
|
4
|
+
var _a$className = _a.className,
|
|
5
|
+
className = _a$className === void 0 ? '' : _a$className,
|
|
6
|
+
children = _a.children,
|
|
7
|
+
props = __rest(_a, ["className", "children"]);
|
|
15
8
|
|
|
16
|
-
return /*#__PURE__*/React.createElement("div",
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
17
10
|
className: "user-item ".concat(className)
|
|
18
11
|
}, props), children);
|
|
19
12
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AppStoreInterface } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
2
|
+
import * as H from 'history';
|
|
3
|
+
interface IUserActionProps {
|
|
4
|
+
app?: AppStoreInterface & any;
|
|
5
|
+
history: H.History;
|
|
6
|
+
isMenuHome?: boolean;
|
|
7
|
+
portalPath?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function UserAction({ app, history, isMenuHome, portalPath }: IUserActionProps): JSX.Element;
|
|
10
|
+
export default UserAction;
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import _IconSpan from "@cloud-app-dev/basic-components/es/IconSpan";
|
|
2
2
|
import "antd/lib/avatar/style";
|
|
3
3
|
import _Avatar from "antd/lib/avatar";
|
|
4
|
-
import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
|
|
5
4
|
import _AuthComponent from "@cloud-app-dev/basic-components/es/AuthComponent";
|
|
5
|
+
import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
|
|
6
6
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
7
7
|
|
|
8
|
-
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); } }
|
|
9
|
-
|
|
10
|
-
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); }); }; }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15
|
-
|
|
16
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
|
|
18
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
9
|
|
|
20
10
|
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."); }
|
|
@@ -27,6 +17,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
27
17
|
|
|
28
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
19
|
|
|
20
|
+
import { __awaiter } from "tslib";
|
|
30
21
|
import React, { useCallback, useReducer, useMemo } from 'react';
|
|
31
22
|
import { cache } from '@cloud-app-dev/utils';
|
|
32
23
|
import ModifyUserAvatar from './ModifyUserAvatar';
|
|
@@ -74,6 +65,8 @@ var pageInfos = [{
|
|
|
74
65
|
}];
|
|
75
66
|
|
|
76
67
|
function UserAction(_ref) {
|
|
68
|
+
var _this = this;
|
|
69
|
+
|
|
77
70
|
var app = _ref.app,
|
|
78
71
|
history = _ref.history,
|
|
79
72
|
isMenuHome = _ref.isMenuHome,
|
|
@@ -81,7 +74,7 @@ function UserAction(_ref) {
|
|
|
81
74
|
var userInfo = app.userInfo;
|
|
82
75
|
|
|
83
76
|
var _useReducer = useReducer(function (state, action) {
|
|
84
|
-
return
|
|
77
|
+
return Object.assign(Object.assign({}, state), action);
|
|
85
78
|
}, {
|
|
86
79
|
avatar: false,
|
|
87
80
|
password: false
|
|
@@ -90,23 +83,25 @@ function UserAction(_ref) {
|
|
|
90
83
|
visibleMuster = _useReducer2[0],
|
|
91
84
|
setVisibleMuster = _useReducer2[1];
|
|
92
85
|
|
|
93
|
-
var signOut = useCallback(
|
|
94
|
-
return regeneratorRuntime.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
86
|
+
var signOut = useCallback(function () {
|
|
87
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
88
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
89
|
+
while (1) {
|
|
90
|
+
switch (_context.prev = _context.next) {
|
|
91
|
+
case 0:
|
|
92
|
+
UserService.loginOut().finally(function () {
|
|
93
|
+
sessionStorage.clear();
|
|
94
|
+
window.location.replace('/login');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
case 1:
|
|
98
|
+
case "end":
|
|
99
|
+
return _context.stop();
|
|
100
|
+
}
|
|
106
101
|
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
102
|
+
}, _callee);
|
|
103
|
+
}));
|
|
104
|
+
}, []); //门户
|
|
110
105
|
|
|
111
106
|
var GatewayState = useMemo(function () {
|
|
112
107
|
return cache.getCache('GATEWAY_STATE', 'session');
|
|
@@ -167,7 +162,7 @@ function UserAction(_ref) {
|
|
|
167
162
|
}, userInfo.realName || userInfo.loginName), /*#__PURE__*/React.createElement("div", {
|
|
168
163
|
className: "btn-content"
|
|
169
164
|
}, /*#__PURE__*/React.createElement(_IconSpan, {
|
|
170
|
-
mode: "
|
|
165
|
+
mode: "vertical",
|
|
171
166
|
onClick: function onClick() {
|
|
172
167
|
return setVisibleMuster({
|
|
173
168
|
avatar: true
|
|
@@ -176,7 +171,7 @@ function UserAction(_ref) {
|
|
|
176
171
|
icon: "icon-S_Edit_Avatar",
|
|
177
172
|
label: "\u4FEE\u6539\u5934\u50CF"
|
|
178
173
|
}), /*#__PURE__*/React.createElement(_IconSpan, {
|
|
179
|
-
mode: "
|
|
174
|
+
mode: "vertical",
|
|
180
175
|
onClick: function onClick() {
|
|
181
176
|
return setVisibleMuster({
|
|
182
177
|
password: true
|
|
@@ -187,7 +182,7 @@ function UserAction(_ref) {
|
|
|
187
182
|
}), !isMenuHome && /*#__PURE__*/React.createElement(_AuthComponent, {
|
|
188
183
|
actionName: "assistantManager"
|
|
189
184
|
}, /*#__PURE__*/React.createElement(_IconSpan, {
|
|
190
|
-
mode: "
|
|
185
|
+
mode: "vertical",
|
|
191
186
|
onClick: function onClick() {
|
|
192
187
|
history.push({
|
|
193
188
|
pathname: '/personSkillwar/main'
|
|
@@ -196,7 +191,7 @@ function UserAction(_ref) {
|
|
|
196
191
|
icon: "icon-Type2",
|
|
197
192
|
label: "\u5E94\u7528\u52A9\u624B"
|
|
198
193
|
})), GatewayState && /*#__PURE__*/React.createElement(_IconSpan, {
|
|
199
|
-
mode: "
|
|
194
|
+
mode: "vertical",
|
|
200
195
|
className: "fl",
|
|
201
196
|
onClick: handleGateway,
|
|
202
197
|
icon: "icon-House",
|
|
@@ -204,8 +199,7 @@ function UserAction(_ref) {
|
|
|
204
199
|
})))), !isMenuHome && PageView, /*#__PURE__*/React.createElement("div", {
|
|
205
200
|
className: "login-out"
|
|
206
201
|
}, /*#__PURE__*/React.createElement(_IconSpan, {
|
|
207
|
-
|
|
208
|
-
mode: "inline",
|
|
202
|
+
mode: "vertical",
|
|
209
203
|
className: "login-out",
|
|
210
204
|
onClick: signOut,
|
|
211
205
|
icon: "icon-S_Place_over",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
interface IHeaderProps {
|
|
3
|
+
renderMenu?: boolean;
|
|
4
|
+
isMenuHome?: boolean;
|
|
5
|
+
portalPath?: string;
|
|
6
|
+
menuType?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function Header({ renderMenu, isMenuHome, portalPath, menuType }: IHeaderProps): JSX.Element;
|
|
9
|
+
export default Header;
|
|
@@ -1,39 +1,27 @@
|
|
|
1
1
|
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
2
|
+
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
2
3
|
import _useHistory from "@cloud-app-dev/basic-components/es/useHistory";
|
|
3
|
-
import React
|
|
4
|
-
import { uuid } from '@cloud-app-dev/utils';
|
|
4
|
+
import React from 'react';
|
|
5
5
|
import AppHeader from '../AppHeader';
|
|
6
|
-
import { inject, observer } from 'mobx-react';
|
|
7
6
|
import ListenceRoute from './ListenceRoute';
|
|
8
7
|
import AppTools from './Tools';
|
|
9
8
|
import "./index.css";
|
|
10
9
|
|
|
11
10
|
function Header(_ref) {
|
|
12
|
-
var
|
|
13
|
-
auth = _ref.auth,
|
|
14
|
-
renderMenu = _ref.renderMenu,
|
|
11
|
+
var renderMenu = _ref.renderMenu,
|
|
15
12
|
isMenuHome = _ref.isMenuHome,
|
|
16
|
-
portalPath = _ref.portalPath
|
|
13
|
+
portalPath = _ref.portalPath,
|
|
14
|
+
menuType = _ref.menuType;
|
|
17
15
|
|
|
18
16
|
var history = _useHistory();
|
|
19
17
|
|
|
20
|
-
var onSelectItem = useCallback(function (e) {
|
|
21
|
-
var menu = auth.userMenuList.find(function (v) {
|
|
22
|
-
return isNaN(+v.code) || isNaN(+e.key) ? v.code === e.key : +v.code === +e.key;
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
if (menu && menu.routeUrl) {
|
|
26
|
-
history.push("".concat(menu.routeUrl).concat(e.domEvent.ctrlKey || e.domEvent.metaKey ? "?key=".concat(uuid()) : ''));
|
|
27
|
-
}
|
|
28
|
-
}, [history, auth.userMenuList]);
|
|
29
18
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AppHeader, {
|
|
30
|
-
userInfo: app.userInfo,
|
|
31
|
-
systemLogo: app.appInfo.systemLogoUrl || app.systemConfig.systemLogo || _Config.BSConfig.systemLogo,
|
|
32
|
-
systemName: app.systemConfig.systemName,
|
|
33
|
-
menuType:
|
|
19
|
+
userInfo: _Store.app.userInfo,
|
|
20
|
+
systemLogo: _Store.app.appInfo.systemLogoUrl || _Store.app.systemConfig.systemLogo || _Config.BSConfig.systemLogo,
|
|
21
|
+
systemName: _Store.app.systemConfig.systemName,
|
|
22
|
+
menuType: menuType,
|
|
34
23
|
history: history,
|
|
35
24
|
renderMenu: renderMenu,
|
|
36
|
-
menuSelect: onSelectItem,
|
|
37
25
|
isMenuHome: isMenuHome,
|
|
38
26
|
appTools: /*#__PURE__*/React.createElement(AppTools, {
|
|
39
27
|
history: history,
|
|
@@ -45,4 +33,4 @@ function Header(_ref) {
|
|
|
45
33
|
}));
|
|
46
34
|
}
|
|
47
35
|
|
|
48
|
-
export default
|
|
36
|
+
export default Header;
|
package/es/AppLayout/index.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IAppLayoutProps {
|
|
4
|
+
content?: React.ReactNode;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
menuType?: string;
|
|
7
|
+
isMenuHome?: boolean;
|
|
8
|
+
renderMenu?: boolean;
|
|
9
|
+
portalPath?: string;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
declare const AppLayout: React.FunctionComponent<AppLayoutProps>;
|
|
13
|
-
|
|
11
|
+
declare function AppLayout({ content, children, menuType, isMenuHome, renderMenu, portalPath }: IAppLayoutProps): JSX.Element;
|
|
14
12
|
export default AppLayout;
|
package/es/AppLayout/index.js
CHANGED
|
@@ -28,7 +28,8 @@ function AppLayout(_ref) {
|
|
|
28
28
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
29
29
|
isMenuHome: isMenuHome,
|
|
30
30
|
renderMenu: renderMenu,
|
|
31
|
-
portalPath: portalPath
|
|
31
|
+
portalPath: portalPath,
|
|
32
|
+
menuType: menuType
|
|
32
33
|
})), /*#__PURE__*/React.createElement(_Layout.Content, {
|
|
33
34
|
className: "app-layout-content"
|
|
34
35
|
}, children || content)));
|
package/es/TreeMode/index.js
CHANGED
|
@@ -68,6 +68,10 @@ function TreeMode(_a) {
|
|
|
68
68
|
var treeData = useMemo(function () {
|
|
69
69
|
return mode === 'Place' ? treeHelper.computPlaceTree(list) : treeHelper.computTreeList(list);
|
|
70
70
|
}, [list, mode]);
|
|
71
|
+
/**
|
|
72
|
+
* @description 实现关键字展开节点
|
|
73
|
+
*/
|
|
74
|
+
|
|
71
75
|
useEffect(function () {
|
|
72
76
|
var _a, _b;
|
|
73
77
|
|
|
@@ -137,6 +141,10 @@ function TreeMode(_a) {
|
|
|
137
141
|
var treeName = useMemo(function () {
|
|
138
142
|
return mode === 'Place' ? 'areaName' : mode === 'Org' ? 'organizationName' : 'groupName';
|
|
139
143
|
}, [mode]);
|
|
144
|
+
/**
|
|
145
|
+
* @description 触发默认选中节点事件
|
|
146
|
+
*/
|
|
147
|
+
|
|
140
148
|
useEffect(function () {
|
|
141
149
|
var id = treeData[0] ? treeData[0][treeKey] : undefined;
|
|
142
150
|
|
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": "1.0.
|
|
5
|
+
"version": "1.0.40",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"rc-queue-anim": "^2.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@cloud-app-dev/basic-components": "^1.0.
|
|
41
|
+
"@cloud-app-dev/basic-components": "^1.0.52",
|
|
42
42
|
"@types/chroma-js": "^2.1.3",
|
|
43
43
|
"@types/lodash": "^4.14.172",
|
|
44
44
|
"@umijs/test": "^3.0.5",
|
package/scripts/entry.js
CHANGED