@cloud-app-dev/vidc 1.0.39 → 1.0.43
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/.fatherrc.js +3 -0
- package/.umirc.ts +3 -0
- 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 +10 -16
- 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 +14 -18
- package/es/AppLayout/AppLogo/index.d.ts +13 -0
- package/es/AppLayout/AppLogo/index.js +11 -12
- package/es/AppLayout/AppTools/index.d.ts +7 -9
- package/es/AppLayout/FunctionPreview/index.d.ts +22 -0
- package/es/AppLayout/FunctionPreview/index.js +35 -40
- 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 +14 -9
- package/es/AppLayout/Header/Tools.d.ts +11 -0
- package/es/AppLayout/Header/Tools.js +4 -5
- 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 +30 -36
- 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/AppLayout/service/index.js +5 -5
- package/es/AppLayout/utils.d.ts +4 -0
- package/es/AppLayout/utils.js +12 -37
- package/es/DagInitialRequest/utils.js +7 -8
- package/es/InitialRequest/index.js +2 -2
- package/es/InitialRequest/utils.js +8 -9
- package/es/OrgUserTree/index.d.ts +6 -0
- package/es/OrgUserTree/index.js +6 -2
- package/es/PlaceTree/index.js +4 -3
- package/es/TreeMode/index.d.ts +1 -0
- package/es/TreeMode/index.js +12 -3
- package/es/UserSelect/demo.d.ts +2 -0
- package/es/UserSelect/demo.js +20 -0
- package/es/UserSelect/index.js +8 -5
- package/es/WorkerFlow/Demo.js +4 -33
- package/es/WorkerFlow/Form/Approver.d.ts +3 -2
- package/es/WorkerFlow/Form/Approver.js +14 -3
- package/es/WorkerFlow/Form/Condition.js +4 -1
- package/es/WorkerFlow/Form/FormAuth.js +1 -1
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +25 -13
- package/es/WorkerFlow/Form/Handle.d.ts +3 -2
- package/es/WorkerFlow/Form/Handle.js +13 -3
- package/es/WorkerFlow/Form/Notifier.js +2 -1
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +41 -2
- package/es/WorkerFlow/Form/UserSelectModalContent.js +12 -2
- package/es/WorkerFlow/Form/UserSet.d.ts +3 -2
- package/es/WorkerFlow/Form/UserSet.js +8 -5
- package/es/WorkerFlow/Form/UsersHandleType.js +3 -1
- package/es/WorkerFlow/Nodes/Add.js +16 -5
- package/es/WorkerFlow/Nodes/AddOptionList.d.ts +3 -4
- package/es/WorkerFlow/Nodes/AddOptionList.js +6 -6
- package/es/WorkerFlow/Nodes/Approver.js +1 -1
- package/es/WorkerFlow/Nodes/Condition.js +8 -11
- package/es/WorkerFlow/Nodes/Handle.js +1 -1
- package/es/WorkerFlow/Nodes/Notifier.js +1 -1
- package/es/WorkerFlow/Nodes/TitleElement.js +1 -1
- package/es/WorkerFlow/Tools.d.ts +1 -1
- package/es/WorkerFlow/Tools.js +3 -2
- package/es/WorkerFlow/XML/utils.d.ts +1 -0
- package/es/WorkerFlow/XML/utils.js +30 -0
- package/es/WorkerFlow/index.css +12 -2
- package/es/WorkerFlow/index.js +9 -2
- package/es/WorkerFlow/interface.d.ts +5 -2
- package/es/WorkerFlow/utils.d.ts +2 -2
- package/es/WorkerFlow/utils.js +16 -4
- package/es/utils.js +2 -2
- package/package.json +3 -3
- package/scripts/entry.js +1 -1
|
@@ -2,10 +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
|
-
|
|
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); }); }; }
|
|
5
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
9
6
|
|
|
10
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
8
|
|
|
@@ -27,11 +24,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
27
24
|
|
|
28
25
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
29
26
|
|
|
27
|
+
import { __awaiter } from "tslib";
|
|
30
28
|
import React from 'react';
|
|
31
29
|
import { getFunctionCount, clearFunctionCount, deleteFunctionItemCount } from '../utils';
|
|
32
|
-
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,11 +41,12 @@ 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) {
|
|
50
|
-
|
|
49
|
+
_cache.setUserCache(CACHE_KEY, counts);
|
|
51
50
|
|
|
52
51
|
_this.setState({
|
|
53
52
|
nearList: counts.map(function (item) {
|
|
@@ -59,31 +58,33 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
59
58
|
});
|
|
60
59
|
};
|
|
61
60
|
|
|
62
|
-
_this.clearNearList =
|
|
63
|
-
return regeneratorRuntime.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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();
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
case 2:
|
|
71
|
+
_cache.setUserCache(CACHE_KEY, []);
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
this.setState({
|
|
74
|
+
nearList: []
|
|
75
|
+
});
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
case 4:
|
|
78
|
+
case "end":
|
|
79
|
+
return _context.stop();
|
|
80
|
+
}
|
|
80
81
|
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
82
|
+
}, _callee, this);
|
|
83
|
+
}));
|
|
84
|
+
};
|
|
84
85
|
|
|
85
|
-
_this.deleteCountItem =
|
|
86
|
-
|
|
86
|
+
_this.deleteCountItem = function (event, item) {
|
|
87
|
+
return __awaiter(_assertThisInitialized(_this), void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
87
88
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
88
89
|
while (1) {
|
|
89
90
|
switch (_context2.prev = _context2.next) {
|
|
@@ -93,25 +94,20 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
93
94
|
return deleteFunctionItemCount(item.alias);
|
|
94
95
|
|
|
95
96
|
case 3:
|
|
96
|
-
|
|
97
|
+
this.getNearList();
|
|
97
98
|
|
|
98
99
|
case 4:
|
|
99
100
|
case "end":
|
|
100
101
|
return _context2.stop();
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
|
-
}, _callee2);
|
|
104
|
+
}, _callee2, this);
|
|
104
105
|
}));
|
|
106
|
+
};
|
|
105
107
|
|
|
106
|
-
|
|
107
|
-
return _ref2.apply(this, arguments);
|
|
108
|
-
};
|
|
109
|
-
}();
|
|
110
|
-
|
|
111
|
-
var _counts = cache.getUserCache(CACHE_KEY) || [];
|
|
112
|
-
|
|
108
|
+
var counts = _cache.getUserCache(CACHE_KEY) || [];
|
|
113
109
|
_this.state = {
|
|
114
|
-
nearList:
|
|
110
|
+
nearList: counts.map(function (item) {
|
|
115
111
|
return _Store.auth.getInfoByName(item.id);
|
|
116
112
|
}).filter(function (v) {
|
|
117
113
|
return !!v;
|
|
@@ -125,8 +121,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
125
121
|
return v.level === 3 && v.type !== 0;
|
|
126
122
|
});
|
|
127
123
|
return _this;
|
|
128
|
-
}
|
|
129
|
-
|
|
124
|
+
}
|
|
130
125
|
|
|
131
126
|
_createClass(FunctionPreview, [{
|
|
132
127
|
key: "render",
|
|
@@ -139,7 +134,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
139
134
|
className = _this$props.className;
|
|
140
135
|
var keyword = this.state.keyword;
|
|
141
136
|
var list = this.menuList.filter(function (v2) {
|
|
142
|
-
return v2.name.includes(keyword) ||
|
|
137
|
+
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
138
|
});
|
|
144
139
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
145
140
|
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();
|
|
@@ -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);
|
|
@@ -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);
|
|
@@ -80,17 +79,23 @@ var NotifyAlarm = /*#__PURE__*/function (_React$Component) {
|
|
|
80
79
|
_createClass(NotifyAlarm, [{
|
|
81
80
|
key: "componentDidMount",
|
|
82
81
|
value: function componentDidMount() {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
_SocketEmitter.subscribe('alarm', this.handleAlarm);
|
|
83
|
+
|
|
84
|
+
_SocketEmitter.subscribe('vehicleAlarmMessage', this.handleAlarm);
|
|
85
|
+
|
|
86
|
+
_SocketEmitter.subscribe('multiMonitorActivityMessage', this.handleAlarm);
|
|
86
87
|
}
|
|
87
88
|
}, {
|
|
88
89
|
key: "componentWillUnmount",
|
|
89
90
|
value: function componentWillUnmount() {
|
|
90
91
|
clearTimeout(this.timer);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
|
|
93
|
+
_SocketEmitter.unsubscribe('alarm', this.handleAlarm);
|
|
94
|
+
|
|
95
|
+
_SocketEmitter.unsubscribe('withoutCloakMessage', this.handleAlarm);
|
|
96
|
+
|
|
97
|
+
_SocketEmitter.unsubscribe('multiMonitorActivityMessage', this.handleAlarm);
|
|
98
|
+
|
|
94
99
|
this.audioRef = null;
|
|
95
100
|
this.timer = null;
|
|
96
101
|
}
|
|
@@ -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,13 +1,13 @@
|
|
|
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
|
|
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
|
|
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');
|
|
@@ -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,19 +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
|
-
|
|
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; }
|
|
7
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
17
8
|
|
|
18
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
10
|
|
|
@@ -27,8 +18,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
27
18
|
|
|
28
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
20
|
|
|
21
|
+
import { __awaiter } from "tslib";
|
|
30
22
|
import React, { useCallback, useReducer, useMemo } from 'react';
|
|
31
|
-
import { cache } from '@cloud-app-dev/utils';
|
|
32
23
|
import ModifyUserAvatar from './ModifyUserAvatar';
|
|
33
24
|
import ModifyPassword from './ModifyPassword';
|
|
34
25
|
import UserService from '../service'; //用户个人中心下模块
|
|
@@ -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,26 +83,28 @@ 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
|
-
return
|
|
107
|
+
return _cache.getCache('GATEWAY_STATE', 'session');
|
|
113
108
|
}, []);
|
|
114
109
|
var handleGateway = useCallback(function () {
|
|
115
110
|
history.push(portalPath || '/portalGateway/home');
|
|
@@ -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;
|