@cloud-app-dev/vidc 1.0.37 → 1.0.41
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/OrgUserTree/index.d.ts +6 -0
- package/es/OrgUserTree/index.js +4 -0
- package/es/PlaceTree/index.js +2 -1
- package/es/TreeMode/index.d.ts +1 -0
- package/es/TreeMode/index.js +10 -1
- package/es/WorkerFlow/Form/UserSet.js +5 -2
- package/es/WorkerFlow/index.js +12 -5
- package/es/WorkerFlow/utils.d.ts +2 -0
- package/es/WorkerFlow/utils.js +34 -9
- package/package.json +2 -2
- package/scripts/entry.js +1 -1
|
@@ -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)));
|
|
@@ -19,4 +19,10 @@ interface IOrgUserTreeProps extends BaseTreeProps {
|
|
|
19
19
|
onDefailtSelect?: (id?: string) => void;
|
|
20
20
|
}
|
|
21
21
|
declare function OrgUserTree({ title, className, renderHeader, inputPlaceholder, activeKey, treeNodeProps, onDefailtSelect, ...props }: IOrgUserTreeProps): JSX.Element;
|
|
22
|
+
declare namespace OrgUserTree {
|
|
23
|
+
var defaultProps: {
|
|
24
|
+
className: string;
|
|
25
|
+
treeNodeProps: {};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
22
28
|
export default OrgUserTree;
|
package/es/OrgUserTree/index.js
CHANGED
package/es/PlaceTree/index.js
CHANGED
|
@@ -48,7 +48,8 @@ function PlaceTree(params) {
|
|
|
48
48
|
inputPlaceholder = _b.inputPlaceholder,
|
|
49
49
|
renderHeader = _b.renderHeader,
|
|
50
50
|
keyword = _b.keyword,
|
|
51
|
-
treeNodeProps = _b.treeNodeProps,
|
|
51
|
+
_b$treeNodeProps = _b.treeNodeProps,
|
|
52
|
+
treeNodeProps = _b$treeNodeProps === void 0 ? {} : _b$treeNodeProps,
|
|
52
53
|
renderSuffix = _b.renderSuffix,
|
|
53
54
|
showCount = _b.showCount,
|
|
54
55
|
props = __rest(_b, ["title", "inputPlaceholder", "renderHeader", "keyword", "treeNodeProps", "renderSuffix", "showCount"]);
|
package/es/TreeMode/index.d.ts
CHANGED
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
|
|
|
@@ -185,6 +193,7 @@ function TreeMode(_a) {
|
|
|
185
193
|
|
|
186
194
|
TreeMode.defaultProps = {
|
|
187
195
|
mode: 'Bz',
|
|
188
|
-
className: ''
|
|
196
|
+
className: '',
|
|
197
|
+
treeNodeProps: {}
|
|
189
198
|
};
|
|
190
199
|
export default TreeMode;
|
|
@@ -73,6 +73,9 @@ function UserSet(_ref) {
|
|
|
73
73
|
return cloneDeep(Object.assign(Object.assign({}, old), options));
|
|
74
74
|
});
|
|
75
75
|
}, []);
|
|
76
|
+
var users = useMemo(function () {
|
|
77
|
+
return state[state.type];
|
|
78
|
+
}, [state]);
|
|
76
79
|
var data = useMemo(function () {
|
|
77
80
|
return {
|
|
78
81
|
userType: state.type,
|
|
@@ -106,7 +109,7 @@ function UserSet(_ref) {
|
|
|
106
109
|
})), /*#__PURE__*/React.createElement(Content, {
|
|
107
110
|
type: state.type,
|
|
108
111
|
emptyUsers: state.emptyUsers,
|
|
109
|
-
users:
|
|
112
|
+
users: users,
|
|
110
113
|
chargeLevel: state.chargeLevel,
|
|
111
114
|
usersHandType: state.usersHandType,
|
|
112
115
|
onChange: function onChange(options) {
|
|
@@ -205,7 +208,7 @@ function UserSelectType3(_ref4) {
|
|
|
205
208
|
emptyUsers = _ref4.emptyUsers;
|
|
206
209
|
var userList = useMemo(function () {
|
|
207
210
|
return users.filter(function (v) {
|
|
208
|
-
return v.key === '
|
|
211
|
+
return v.key === 'groupId';
|
|
209
212
|
});
|
|
210
213
|
}, [users]);
|
|
211
214
|
return /*#__PURE__*/React.createElement("div", {
|