@cloud-app-dev/vidc 1.0.47 → 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.umirc.ts +1 -1
- package/README.md +4 -0
- package/es/AppContext/Sync.d.ts +6 -0
- package/es/AppContext/Sync.js +47 -0
- package/es/AppContext/index.d.ts +10 -0
- package/es/AppContext/index.js +111 -0
- package/es/AppContext/interface.d.ts +29 -0
- package/es/AppContext/static.d.ts +6 -0
- package/es/AppContext/static.js +6 -0
- package/es/AutoExit/index.d.ts +1 -1
- package/es/RefDrawer/index.d.ts +2 -2
- package/es/RefModal/index.d.ts +2 -2
- package/es/TreeMode/index.js +1 -2
- package/es/WorkerFlow/Demo.js +1 -0
- package/es/WorkerFlow/Form/Condition.js +8 -8
- package/es/WorkerFlow/Form/GroupList.d.ts +2 -1
- package/es/WorkerFlow/Form/GroupList.js +3 -2
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +4 -2
- package/es/WorkerFlow/Form/UserSet.js +1 -6
- package/es/WorkerFlow/Nodes/TitleElement.js +13 -6
- package/es/WorkerFlow/index.js +40 -8
- package/es/WorkerFlow/utils.js +1 -1
- package/es/index.d.ts +1 -8
- package/es/index.js +1 -8
- package/package.json +4 -4
- package/es/AppLayout/AppHeader/index.css +0 -4
- package/es/AppLayout/AppHeader/index.d.ts +0 -18
- package/es/AppLayout/AppHeader/index.js +0 -41
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +0 -1
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.js +0 -10
- package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppHorizontalMenu/SubGroup.js +0 -57
- package/es/AppLayout/AppHorizontalMenu/index.css +0 -152
- package/es/AppLayout/AppHorizontalMenu/index.d.ts +0 -13
- package/es/AppLayout/AppHorizontalMenu/index.js +0 -230
- package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppInlineMenu/SubGroup.js +0 -34
- package/es/AppLayout/AppInlineMenu/index.css +0 -110
- package/es/AppLayout/AppInlineMenu/index.d.ts +0 -12
- package/es/AppLayout/AppInlineMenu/index.js +0 -194
- package/es/AppLayout/AppLogo/index.css +0 -74
- package/es/AppLayout/AppLogo/index.d.ts +0 -13
- package/es/AppLayout/AppLogo/index.js +0 -100
- package/es/AppLayout/AppTools/index.css +0 -0
- package/es/AppLayout/AppTools/index.d.ts +0 -8
- package/es/AppLayout/AppTools/index.js +0 -10
- package/es/AppLayout/FunctionPreview/index.css +0 -128
- package/es/AppLayout/FunctionPreview/index.d.ts +0 -22
- package/es/AppLayout/FunctionPreview/index.js +0 -218
- package/es/AppLayout/Header/ListenceRoute.d.ts +0 -5
- package/es/AppLayout/Header/ListenceRoute.js +0 -28
- package/es/AppLayout/Header/ModifyPassword/index.d.ts +0 -6
- package/es/AppLayout/Header/ModifyPassword/index.js +0 -201
- package/es/AppLayout/Header/ModifyUserAvatar/index.css +0 -21
- package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +0 -10
- package/es/AppLayout/Header/ModifyUserAvatar/index.js +0 -98
- package/es/AppLayout/Header/NotifyAlarm.js +0 -122
- package/es/AppLayout/Header/ThemeTools.js +0 -69
- package/es/AppLayout/Header/Tools.d.ts +0 -11
- package/es/AppLayout/Header/Tools.js +0 -86
- package/es/AppLayout/Header/ToolsItem.d.ts +0 -1
- package/es/AppLayout/Header/ToolsItem.js +0 -12
- package/es/AppLayout/Header/UserAction.d.ts +0 -10
- package/es/AppLayout/Header/UserAction.js +0 -224
- package/es/AppLayout/Header/index.css +0 -136
- package/es/AppLayout/Header/index.d.ts +0 -9
- package/es/AppLayout/Header/index.js +0 -36
- package/es/AppLayout/index.css +0 -21
- package/es/AppLayout/index.d.ts +0 -12
- package/es/AppLayout/index.js +0 -38
- package/es/AppLayout/service/index.js +0 -174
- package/es/AppLayout/service/prefix.js +0 -4
- package/es/AppLayout/service/url.js +0 -35
- package/es/AppLayout/utils/menu.js +0 -24
- package/es/AppLayout/utils.d.ts +0 -4
- package/es/AppLayout/utils.js +0 -112
- package/es/DagInitialConfig/index.css +0 -0
- package/es/DagInitialConfig/index.d.ts +0 -10
- package/es/DagInitialConfig/index.js +0 -70
- package/es/DagInitialConfig/utils.js +0 -185
- package/es/DagInitialRequest/index.css +0 -0
- package/es/DagInitialRequest/index.d.ts +0 -10
- package/es/DagInitialRequest/index.js +0 -77
- package/es/DagInitialRequest/utils.js +0 -573
- package/es/FormContent/index.css +0 -27
- package/es/FormContent/index.d.ts +0 -19
- package/es/FormContent/index.js +0 -58
- package/es/OrgTree/index.css +0 -39
- package/es/OrgTree/index.d.ts +0 -16
- package/es/OrgTree/index.js +0 -177
- package/es/OrgUserTree/demo.d.ts +0 -2
- package/es/OrgUserTree/demo.js +0 -20
- package/es/OrgUserTree/index.css +0 -31
- package/es/OrgUserTree/index.d.ts +0 -28
- package/es/OrgUserTree/index.js +0 -132
- package/es/PlaceTree/demo.d.ts +0 -2
- package/es/PlaceTree/demo.js +0 -20
- package/es/PlaceTree/index.css +0 -40
- package/es/PlaceTree/index.d.ts +0 -26
- package/es/PlaceTree/index.js +0 -175
- package/es/Upload/AntUpload/index.css +0 -22
- package/es/Upload/AntUpload/index.d.ts +0 -19
- package/es/Upload/AntUpload/index.js +0 -226
- package/es/Upload/UploadChildren/index.css +0 -28
- package/es/Upload/UploadChildren/index.js +0 -26
- package/es/Upload/index.css +0 -0
- package/es/Upload/index.d.ts +0 -9
- package/es/Upload/index.js +0 -7
|
@@ -1,122 +0,0 @@
|
|
|
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
|
-
import _SocketEmitter from "@cloud-app-dev/utils/es/SocketEmitter";
|
|
4
|
-
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
5
|
-
|
|
6
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
-
|
|
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); } }
|
|
9
|
-
|
|
10
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11
|
-
|
|
12
|
-
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); }
|
|
13
|
-
|
|
14
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
15
|
-
|
|
16
|
-
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); }; }
|
|
17
|
-
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
-
|
|
22
|
-
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; } }
|
|
23
|
-
|
|
24
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
25
|
-
|
|
26
|
-
/* eslint-disable no-undef */
|
|
27
|
-
import React from 'react';
|
|
28
|
-
|
|
29
|
-
var NotifyAlarm = /*#__PURE__*/function (_React$Component) {
|
|
30
|
-
_inherits(NotifyAlarm, _React$Component);
|
|
31
|
-
|
|
32
|
-
var _super = _createSuper(NotifyAlarm);
|
|
33
|
-
|
|
34
|
-
function NotifyAlarm() {
|
|
35
|
-
var _this;
|
|
36
|
-
|
|
37
|
-
_classCallCheck(this, NotifyAlarm);
|
|
38
|
-
|
|
39
|
-
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
40
|
-
_args[_key] = arguments[_key];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
_this = _super.call.apply(_super, [this].concat(_args));
|
|
44
|
-
_this.state = {
|
|
45
|
-
alarmNum: 0
|
|
46
|
-
};
|
|
47
|
-
_this.audioRef = /*#__PURE__*/React.createRef();
|
|
48
|
-
_this.timer = null;
|
|
49
|
-
|
|
50
|
-
_this.handleAlarm = function (args) {
|
|
51
|
-
var _args$data;
|
|
52
|
-
|
|
53
|
-
//车辆标签布控的响铃提醒
|
|
54
|
-
if (+args.taskType === 101526) {
|
|
55
|
-
try {
|
|
56
|
-
var noticeType = JSON.parse(args.context).noticeType;
|
|
57
|
-
|
|
58
|
-
if (!noticeType.includes('1')) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
} catch (error) {}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (args.messageType === 'multiMonitorActivityMessage' && (+args.isAccept === 1 || +args.isAccept === 2)) return false; // 重点人员布控 响铃设置判断
|
|
65
|
-
|
|
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;
|
|
67
|
-
clearTimeout(_this.timer);
|
|
68
|
-
_this.audioRef.current && _this.audioRef.current.play();
|
|
69
|
-
_this.timer = setTimeout(function () {
|
|
70
|
-
_this.audioRef.current.pause();
|
|
71
|
-
}, 5000);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
_this.jumpAlarm = function () {};
|
|
75
|
-
|
|
76
|
-
return _this;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
_createClass(NotifyAlarm, [{
|
|
80
|
-
key: "componentDidMount",
|
|
81
|
-
value: function componentDidMount() {
|
|
82
|
-
_SocketEmitter.subscribe('alarm', this.handleAlarm);
|
|
83
|
-
|
|
84
|
-
_SocketEmitter.subscribe('vehicleAlarmMessage', this.handleAlarm);
|
|
85
|
-
|
|
86
|
-
_SocketEmitter.subscribe('multiMonitorActivityMessage', this.handleAlarm);
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
key: "componentWillUnmount",
|
|
90
|
-
value: function componentWillUnmount() {
|
|
91
|
-
clearTimeout(this.timer);
|
|
92
|
-
|
|
93
|
-
_SocketEmitter.unsubscribe('alarm', this.handleAlarm);
|
|
94
|
-
|
|
95
|
-
_SocketEmitter.unsubscribe('withoutCloakMessage', this.handleAlarm);
|
|
96
|
-
|
|
97
|
-
_SocketEmitter.unsubscribe('multiMonitorActivityMessage', this.handleAlarm);
|
|
98
|
-
|
|
99
|
-
this.audioRef = null;
|
|
100
|
-
this.timer = null;
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
key: "render",
|
|
104
|
-
value: function render() {
|
|
105
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
106
|
-
className: "system-alarm",
|
|
107
|
-
style: {
|
|
108
|
-
padding: 0
|
|
109
|
-
}
|
|
110
|
-
}, /*#__PURE__*/React.createElement("audio", {
|
|
111
|
-
src: "/micro-apps/micro-dep-librarys/media/alarm.mp3",
|
|
112
|
-
ref: this.audioRef,
|
|
113
|
-
autoPlay: false,
|
|
114
|
-
loop: false
|
|
115
|
-
}));
|
|
116
|
-
}
|
|
117
|
-
}]);
|
|
118
|
-
|
|
119
|
-
return NotifyAlarm;
|
|
120
|
-
}(React.Component);
|
|
121
|
-
|
|
122
|
-
export default NotifyAlarm;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import "antd/lib/select/style";
|
|
2
|
-
import _Select from "antd/lib/select";
|
|
3
|
-
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
4
|
-
|
|
5
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
|
|
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."); }
|
|
8
|
-
|
|
9
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
|
|
11
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
|
-
|
|
13
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
-
|
|
15
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
|
|
17
|
-
import React, { useEffect, useState } from 'react';
|
|
18
|
-
import MainService from '../../service';
|
|
19
|
-
|
|
20
|
-
function ThemeTools(_ref) {
|
|
21
|
-
var app = _ref.app;
|
|
22
|
-
|
|
23
|
-
var _useState = useState([]),
|
|
24
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
-
list = _useState2[0],
|
|
26
|
-
setList = _useState2[1];
|
|
27
|
-
|
|
28
|
-
var _useState3 = useState(_Config.ThemeConfig.themeClass),
|
|
29
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
30
|
-
selectKey = _useState4[0],
|
|
31
|
-
setSelectKey = _useState4[1];
|
|
32
|
-
|
|
33
|
-
useEffect(function () {
|
|
34
|
-
MainService.queryConfigureList().then(function (res) {
|
|
35
|
-
setList(res.data.filter(function (v) {
|
|
36
|
-
return v.type === 2;
|
|
37
|
-
}));
|
|
38
|
-
});
|
|
39
|
-
}, []);
|
|
40
|
-
useEffect(function () {
|
|
41
|
-
var obj = list.find(function (v) {
|
|
42
|
-
return app.appInfo.hues === v.id;
|
|
43
|
-
});
|
|
44
|
-
obj && setSelectKey(obj.info.themeClass);
|
|
45
|
-
}, [app.appInfo.hues, list]);
|
|
46
|
-
useEffect(function () {
|
|
47
|
-
if (_Config.ThemeConfig.themeClass !== selectKey) {
|
|
48
|
-
var item = list.find(function (v) {
|
|
49
|
-
return v.info.themeClass === selectKey;
|
|
50
|
-
});
|
|
51
|
-
item && _Config.registerThemeConfig(item.info);
|
|
52
|
-
}
|
|
53
|
-
}, [list, selectKey]);
|
|
54
|
-
return /*#__PURE__*/React.createElement(_Select, {
|
|
55
|
-
value: selectKey,
|
|
56
|
-
className: "theme-select-layout",
|
|
57
|
-
placeholder: "\u8BF7\u9009\u62E9\u4E3B\u9898",
|
|
58
|
-
onChange: function onChange(v) {
|
|
59
|
-
return setSelectKey(v);
|
|
60
|
-
}
|
|
61
|
-
}, list.map(function (item) {
|
|
62
|
-
return /*#__PURE__*/React.createElement(_Select.Option, {
|
|
63
|
-
key: item.info.themeClass,
|
|
64
|
-
value: item.info.themeClass
|
|
65
|
-
}, item.info.title);
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export default ThemeTools;
|
|
@@ -1,11 +0,0 @@
|
|
|
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,86 +0,0 @@
|
|
|
1
|
-
import "antd/lib/avatar/style";
|
|
2
|
-
import _Avatar from "antd/lib/avatar";
|
|
3
|
-
import _FullScreen from "@cloud-app-dev/basic-components/es/FullScreen";
|
|
4
|
-
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
5
|
-
import "antd/lib/popover/style";
|
|
6
|
-
import _Popover from "antd/lib/popover";
|
|
7
|
-
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
8
|
-
import React, { useCallback, useMemo } from 'react';
|
|
9
|
-
import UserAction from './UserAction';
|
|
10
|
-
import ToolsItem from './ToolsItem';
|
|
11
|
-
import { inject, observer } from 'mobx-react';
|
|
12
|
-
import NotifyAlarm from './NotifyAlarm';
|
|
13
|
-
|
|
14
|
-
function AppTools(_ref) {
|
|
15
|
-
var history = _ref.history,
|
|
16
|
-
app = _ref.app,
|
|
17
|
-
isMenuHome = _ref.isMenuHome,
|
|
18
|
-
portalPath = _ref.portalPath;
|
|
19
|
-
var GatewayState = useMemo(function () {
|
|
20
|
-
return _cache.getCache('GATEWAY_STATE', 'session');
|
|
21
|
-
}, []);
|
|
22
|
-
var handleGateway = useCallback(function () {
|
|
23
|
-
history.push(portalPath ? portalPath : !isMenuHome ? '/portalGateway/menuHome' : '/portalGateway/home');
|
|
24
|
-
}, [isMenuHome, history]);
|
|
25
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
-
className: "app-tools-layout"
|
|
27
|
-
}, GatewayState && /*#__PURE__*/React.createElement(_Popover, {
|
|
28
|
-
trigger: "hover",
|
|
29
|
-
overlayClassName: "goback-popover-box",
|
|
30
|
-
placement: "bottomRight",
|
|
31
|
-
content: /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
style: {
|
|
33
|
-
color: '#666666'
|
|
34
|
-
}
|
|
35
|
-
}, !isMenuHome ? '返回系统门户' : '返回平台门户')
|
|
36
|
-
}, /*#__PURE__*/React.createElement(ToolsItem, {
|
|
37
|
-
className: "user-info",
|
|
38
|
-
onClick: function onClick() {
|
|
39
|
-
return handleGateway();
|
|
40
|
-
}
|
|
41
|
-
}, /*#__PURE__*/React.createElement(_IconFont, {
|
|
42
|
-
type: "icon-S_Place_Undo"
|
|
43
|
-
}), "\u8FD4\u56DE")), /*#__PURE__*/React.createElement(NotifyAlarm, null), /*#__PURE__*/React.createElement(ToolsItem, {
|
|
44
|
-
className: "user-info"
|
|
45
|
-
}, /*#__PURE__*/React.createElement(_FullScreen, {
|
|
46
|
-
getContainer: function getContainer() {
|
|
47
|
-
return document.body;
|
|
48
|
-
}
|
|
49
|
-
})), /*#__PURE__*/React.createElement(_Popover, {
|
|
50
|
-
overlayClassName: "user-popover-box",
|
|
51
|
-
trigger: "hover",
|
|
52
|
-
placement: "bottomRight",
|
|
53
|
-
content: /*#__PURE__*/React.createElement(UserAction, {
|
|
54
|
-
portalPath: portalPath,
|
|
55
|
-
history: history,
|
|
56
|
-
app: app,
|
|
57
|
-
isMenuHome: isMenuHome
|
|
58
|
-
})
|
|
59
|
-
}, /*#__PURE__*/React.createElement(ToolsItem, {
|
|
60
|
-
className: "user-info"
|
|
61
|
-
}, /*#__PURE__*/React.createElement(_Avatar, {
|
|
62
|
-
size: 30,
|
|
63
|
-
style: {
|
|
64
|
-
backgroundColor: 'transparent'
|
|
65
|
-
},
|
|
66
|
-
icon: /*#__PURE__*/React.createElement(_IconFont, {
|
|
67
|
-
style: {
|
|
68
|
-
fontSize: 20,
|
|
69
|
-
position: 'relative',
|
|
70
|
-
left: 2
|
|
71
|
-
},
|
|
72
|
-
type: "icon-S_AID_username"
|
|
73
|
-
}),
|
|
74
|
-
src: app.userInfo.userAvatarUrl
|
|
75
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
76
|
-
className: "user-name",
|
|
77
|
-
title: app.userInfo.realName || app.userInfo.loginName,
|
|
78
|
-
style: {
|
|
79
|
-
fontSize: 'var(--fs)'
|
|
80
|
-
}
|
|
81
|
-
}, app.userInfo.realName || app.userInfo.loginName), /*#__PURE__*/React.createElement(_IconFont, {
|
|
82
|
-
type: "icon-S_Arrow_SmallDown"
|
|
83
|
-
}))));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export default inject('app')(observer(AppTools));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function ToolsItem({ className, children, ...props }: any): JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
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"]);
|
|
8
|
-
|
|
9
|
-
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
10
|
-
className: "user-item ".concat(className)
|
|
11
|
-
}, props), children);
|
|
12
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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,224 +0,0 @@
|
|
|
1
|
-
import _IconSpan from "@cloud-app-dev/basic-components/es/IconSpan";
|
|
2
|
-
import "antd/lib/avatar/style";
|
|
3
|
-
import _Avatar from "antd/lib/avatar";
|
|
4
|
-
import _AuthComponent from "@cloud-app-dev/basic-components/es/AuthComponent";
|
|
5
|
-
import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
|
|
6
|
-
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
7
|
-
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
8
|
-
|
|
9
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
-
|
|
11
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
-
|
|
13
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
|
|
15
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16
|
-
|
|
17
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
18
|
-
|
|
19
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
-
|
|
21
|
-
import { __awaiter } from "tslib";
|
|
22
|
-
import React, { useCallback, useReducer, useMemo } from 'react';
|
|
23
|
-
import ModifyUserAvatar from './ModifyUserAvatar';
|
|
24
|
-
import ModifyPassword from './ModifyPassword';
|
|
25
|
-
import UserService from '../service'; //用户个人中心下模块
|
|
26
|
-
|
|
27
|
-
var pageInfos = [{
|
|
28
|
-
key: 'myCollection',
|
|
29
|
-
iconType: 'icon-S_Photo_KeepYes',
|
|
30
|
-
title: '我的收藏',
|
|
31
|
-
url: '/personalCenter/myCollection'
|
|
32
|
-
}, {
|
|
33
|
-
key: 'attentivePeople',
|
|
34
|
-
iconType: 'icon-S_Please_attention',
|
|
35
|
-
title: '关注的人员',
|
|
36
|
-
url: '/personalCenter/attentivePeople'
|
|
37
|
-
}, {
|
|
38
|
-
key: 'attentiveVehicle',
|
|
39
|
-
iconType: 'icon-S_Please_attentionCar',
|
|
40
|
-
title: '关注的车辆',
|
|
41
|
-
url: '/personalCenter/attentiveVehicle'
|
|
42
|
-
}, {
|
|
43
|
-
alias: 'approvalManager',
|
|
44
|
-
key: 'approvalManager',
|
|
45
|
-
iconType: 'icon-S_View_Task',
|
|
46
|
-
title: '审批与任务',
|
|
47
|
-
url: '/approvalManager/view'
|
|
48
|
-
}, {
|
|
49
|
-
key: 'downloadCenter',
|
|
50
|
-
iconType: 'icon-S_Edit_LoadDown',
|
|
51
|
-
title: '下载中心',
|
|
52
|
-
url: '/personalCenter/downloadCenter'
|
|
53
|
-
}, {
|
|
54
|
-
alias: 'quicklink',
|
|
55
|
-
key: 'quicklink',
|
|
56
|
-
iconType: 'icon-S_Photo_LinkOn',
|
|
57
|
-
title: '友情链接绑定',
|
|
58
|
-
url: '/personalCenter/quicklinkbind'
|
|
59
|
-
}, {
|
|
60
|
-
alias: 'aboutCenter',
|
|
61
|
-
key: 'aboutCenter',
|
|
62
|
-
iconType: 'icon-XL_Keep',
|
|
63
|
-
title: '帮助中心',
|
|
64
|
-
url: '/aboutCenter'
|
|
65
|
-
}];
|
|
66
|
-
|
|
67
|
-
function UserAction(_ref) {
|
|
68
|
-
var _this = this;
|
|
69
|
-
|
|
70
|
-
var app = _ref.app,
|
|
71
|
-
history = _ref.history,
|
|
72
|
-
isMenuHome = _ref.isMenuHome,
|
|
73
|
-
portalPath = _ref.portalPath;
|
|
74
|
-
var userInfo = app.userInfo;
|
|
75
|
-
|
|
76
|
-
var _useReducer = useReducer(function (state, action) {
|
|
77
|
-
return Object.assign(Object.assign({}, state), action);
|
|
78
|
-
}, {
|
|
79
|
-
avatar: false,
|
|
80
|
-
password: false
|
|
81
|
-
}),
|
|
82
|
-
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
83
|
-
visibleMuster = _useReducer2[0],
|
|
84
|
-
setVisibleMuster = _useReducer2[1];
|
|
85
|
-
|
|
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
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}, _callee);
|
|
103
|
-
}));
|
|
104
|
-
}, []); //门户
|
|
105
|
-
|
|
106
|
-
var GatewayState = useMemo(function () {
|
|
107
|
-
return _cache.getCache('GATEWAY_STATE', 'session');
|
|
108
|
-
}, []);
|
|
109
|
-
var handleGateway = useCallback(function () {
|
|
110
|
-
history.push(portalPath || '/portalGateway/home');
|
|
111
|
-
}, [history]); //菜单项
|
|
112
|
-
|
|
113
|
-
var PageView = useMemo(function () {
|
|
114
|
-
var pageItemView = function pageItemView(item) {
|
|
115
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
116
|
-
className: "page-item",
|
|
117
|
-
onClick: function onClick() {
|
|
118
|
-
return history.push({
|
|
119
|
-
pathname: item.url
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
}, /*#__PURE__*/React.createElement(_IconFont, {
|
|
123
|
-
type: item.iconType
|
|
124
|
-
}), " ", item.title);
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
return userInfo.userType !== '100701' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_ContentBox, {
|
|
128
|
-
className: "worktable-page-btn"
|
|
129
|
-
}, pageInfos.map(function (v) {
|
|
130
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
131
|
-
key: v.key
|
|
132
|
-
}, v.alias ? /*#__PURE__*/React.createElement(_AuthComponent, {
|
|
133
|
-
actionName: v.alias
|
|
134
|
-
}, pageItemView(v)) : pageItemView(v));
|
|
135
|
-
})))) : null;
|
|
136
|
-
}, [userInfo.userType, history]);
|
|
137
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
138
|
-
className: "user-popover-content"
|
|
139
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
140
|
-
className: "user-info"
|
|
141
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
142
|
-
className: "user-info-left"
|
|
143
|
-
}, /*#__PURE__*/React.createElement(_Avatar, {
|
|
144
|
-
style: {
|
|
145
|
-
backgroundColor: 'var(--icon)'
|
|
146
|
-
},
|
|
147
|
-
icon: /*#__PURE__*/React.createElement(_IconFont, {
|
|
148
|
-
style: {
|
|
149
|
-
fontSize: 20,
|
|
150
|
-
position: 'relative'
|
|
151
|
-
},
|
|
152
|
-
type: "icon-S_AID_username"
|
|
153
|
-
}),
|
|
154
|
-
src: userInfo.userAvatarUrl
|
|
155
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
156
|
-
className: "user-info-right"
|
|
157
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
158
|
-
style: {
|
|
159
|
-
fontSize: 'var(--fs)'
|
|
160
|
-
},
|
|
161
|
-
className: "current-user"
|
|
162
|
-
}, userInfo.realName || userInfo.loginName), /*#__PURE__*/React.createElement("div", {
|
|
163
|
-
className: "btn-content"
|
|
164
|
-
}, /*#__PURE__*/React.createElement(_IconSpan, {
|
|
165
|
-
mode: "vertical",
|
|
166
|
-
onClick: function onClick() {
|
|
167
|
-
return setVisibleMuster({
|
|
168
|
-
avatar: true
|
|
169
|
-
});
|
|
170
|
-
},
|
|
171
|
-
icon: "icon-S_Edit_Avatar",
|
|
172
|
-
label: "\u4FEE\u6539\u5934\u50CF"
|
|
173
|
-
}), /*#__PURE__*/React.createElement(_IconSpan, {
|
|
174
|
-
mode: "vertical",
|
|
175
|
-
onClick: function onClick() {
|
|
176
|
-
return setVisibleMuster({
|
|
177
|
-
password: true
|
|
178
|
-
});
|
|
179
|
-
},
|
|
180
|
-
icon: "icon-S_AID_password",
|
|
181
|
-
label: "\u4FEE\u6539\u5BC6\u7801"
|
|
182
|
-
}), !isMenuHome && /*#__PURE__*/React.createElement(_AuthComponent, {
|
|
183
|
-
actionName: "assistantManager"
|
|
184
|
-
}, /*#__PURE__*/React.createElement(_IconSpan, {
|
|
185
|
-
mode: "vertical",
|
|
186
|
-
onClick: function onClick() {
|
|
187
|
-
history.push({
|
|
188
|
-
pathname: '/personSkillwar/main'
|
|
189
|
-
});
|
|
190
|
-
},
|
|
191
|
-
icon: "icon-Type2",
|
|
192
|
-
label: "\u5E94\u7528\u52A9\u624B"
|
|
193
|
-
})), GatewayState && /*#__PURE__*/React.createElement(_IconSpan, {
|
|
194
|
-
mode: "vertical",
|
|
195
|
-
className: "fl",
|
|
196
|
-
onClick: handleGateway,
|
|
197
|
-
icon: "icon-House",
|
|
198
|
-
label: "\u8FDB\u5165\u95E8\u6237"
|
|
199
|
-
})))), !isMenuHome && PageView, /*#__PURE__*/React.createElement("div", {
|
|
200
|
-
className: "login-out"
|
|
201
|
-
}, /*#__PURE__*/React.createElement(_IconSpan, {
|
|
202
|
-
mode: "vertical",
|
|
203
|
-
className: "login-out",
|
|
204
|
-
onClick: signOut,
|
|
205
|
-
icon: "icon-S_Place_over",
|
|
206
|
-
label: "\u9000\u51FA\u767B\u5F55"
|
|
207
|
-
})), /*#__PURE__*/React.createElement(ModifyUserAvatar, {
|
|
208
|
-
visible: !!visibleMuster.avatar,
|
|
209
|
-
onClose: function onClose() {
|
|
210
|
-
return setVisibleMuster({
|
|
211
|
-
avatar: false
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}), /*#__PURE__*/React.createElement(ModifyPassword, {
|
|
215
|
-
visible: !!visibleMuster.password,
|
|
216
|
-
onClose: function onClose() {
|
|
217
|
-
return setVisibleMuster({
|
|
218
|
-
password: false
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
}));
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export default UserAction;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
.app-tools-layout {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
line-height: var(--nav-height);
|
|
5
|
-
height: var(--nav-height);
|
|
6
|
-
justify-content: flex-end;
|
|
7
|
-
}
|
|
8
|
-
.app-tools-layout .theme-select-layout {
|
|
9
|
-
width: 150px;
|
|
10
|
-
}
|
|
11
|
-
.app-tools-layout .theme-select-layout .cloudapp-select-selector {
|
|
12
|
-
background-color: transparent !important;
|
|
13
|
-
}
|
|
14
|
-
.app-tools-layout .user-item {
|
|
15
|
-
height: 100%;
|
|
16
|
-
padding: 0 10px;
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
font-size: var(--fs-small);
|
|
22
|
-
-webkit-transition: color 0.3s;
|
|
23
|
-
transition: color 0.3s;
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
}
|
|
26
|
-
.app-tools-layout .user-item:hover {
|
|
27
|
-
color: var(--primary-light);
|
|
28
|
-
}
|
|
29
|
-
.app-tools-layout .user-item .anticon {
|
|
30
|
-
font-size: 16px;
|
|
31
|
-
padding-right: 4px;
|
|
32
|
-
}
|
|
33
|
-
.app-tools-layout .user-info {
|
|
34
|
-
padding: 0 8px;
|
|
35
|
-
}
|
|
36
|
-
.app-tools-layout .user-info .user-name {
|
|
37
|
-
padding: 0 5px;
|
|
38
|
-
display: inline-block;
|
|
39
|
-
overflow: hidden;
|
|
40
|
-
white-space: nowrap;
|
|
41
|
-
text-overflow: ellipsis;
|
|
42
|
-
}
|
|
43
|
-
.goback-popover-box .cloudapp-popover-inner-content {
|
|
44
|
-
padding: 3px 8px;
|
|
45
|
-
}
|
|
46
|
-
.user-popover-box .cloudapp-popover-inner {
|
|
47
|
-
background: var(--content-info-box-bg);
|
|
48
|
-
}
|
|
49
|
-
.user-popover-box .cloudapp-popover-inner-content {
|
|
50
|
-
padding: 0;
|
|
51
|
-
}
|
|
52
|
-
.user-popover-box .cloudapp-popover-arrow {
|
|
53
|
-
border-top-color: var(--content-info-box-bg) !important;
|
|
54
|
-
border-left-color: var(--content-info-box-bg) !important;
|
|
55
|
-
}
|
|
56
|
-
.user-popover-content {
|
|
57
|
-
width: 260px;
|
|
58
|
-
}
|
|
59
|
-
.user-popover-content .icon-span:hover .anticon,
|
|
60
|
-
.user-popover-content .icon-span:hover span {
|
|
61
|
-
color: var(--primary-dark);
|
|
62
|
-
}
|
|
63
|
-
.user-popover-content .user-info {
|
|
64
|
-
display: flex;
|
|
65
|
-
padding: 10px;
|
|
66
|
-
border-bottom: 1px solid var(--bd-color);
|
|
67
|
-
}
|
|
68
|
-
.user-popover-content .user-info .cloudapp-avatar {
|
|
69
|
-
width: 64px;
|
|
70
|
-
height: 64px;
|
|
71
|
-
border-radius: 50%;
|
|
72
|
-
}
|
|
73
|
-
.user-popover-content .user-info-right {
|
|
74
|
-
color: var(--color);
|
|
75
|
-
flex: 1;
|
|
76
|
-
display: flex;
|
|
77
|
-
flex-direction: column;
|
|
78
|
-
justify-content: space-around;
|
|
79
|
-
align-items: flex-start;
|
|
80
|
-
}
|
|
81
|
-
.user-popover-content .user-info-right .current-user {
|
|
82
|
-
color: var(--color-dark);
|
|
83
|
-
font-size: var(--fs);
|
|
84
|
-
font-weight: bold;
|
|
85
|
-
padding-left: 10px;
|
|
86
|
-
padding-bottom: 10px;
|
|
87
|
-
}
|
|
88
|
-
.user-popover-content .user-info-right .btn-content {
|
|
89
|
-
display: flex;
|
|
90
|
-
flex-wrap: wrap;
|
|
91
|
-
}
|
|
92
|
-
.user-popover-content .user-info-right .btn-content .icon-span {
|
|
93
|
-
font-size: 12px;
|
|
94
|
-
line-height: 200%;
|
|
95
|
-
margin-left: 10px;
|
|
96
|
-
color: var(--primary);
|
|
97
|
-
}
|
|
98
|
-
.user-popover-content .user-info-right .btn-content .icon-span .anticon {
|
|
99
|
-
color: inherit;
|
|
100
|
-
}
|
|
101
|
-
.user-popover-content .user-info-right .btn-content .icon-span:hover {
|
|
102
|
-
color: var(--primary-dark);
|
|
103
|
-
}
|
|
104
|
-
.user-popover-content .login-out {
|
|
105
|
-
padding: 8px;
|
|
106
|
-
text-align: center;
|
|
107
|
-
color: var(--disabled);
|
|
108
|
-
font-size: var(--fs-small);
|
|
109
|
-
}
|
|
110
|
-
.user-popover-content .login-out .anticon {
|
|
111
|
-
color: inherit;
|
|
112
|
-
}
|
|
113
|
-
.user-popover-content .login-out:hover {
|
|
114
|
-
color: var(--icon);
|
|
115
|
-
}
|
|
116
|
-
.user-popover-content .worktable-page-btn {
|
|
117
|
-
padding: 8px 8px;
|
|
118
|
-
}
|
|
119
|
-
.user-popover-content .worktable-page-btn .page-item {
|
|
120
|
-
line-height: 34px;
|
|
121
|
-
font-size: 12px;
|
|
122
|
-
color: var(--color);
|
|
123
|
-
cursor: pointer;
|
|
124
|
-
}
|
|
125
|
-
.user-popover-content .worktable-page-btn .page-item .anticon {
|
|
126
|
-
font-size: 16px;
|
|
127
|
-
margin-right: 2px;
|
|
128
|
-
color: var(--icon);
|
|
129
|
-
vertical-align: -3px;
|
|
130
|
-
}
|
|
131
|
-
.user-popover-content .worktable-page-btn .page-item:hover {
|
|
132
|
-
color: var(--primary);
|
|
133
|
-
}
|
|
134
|
-
.user-popover-content .worktable-page-btn .page-item:hover .anticon {
|
|
135
|
-
color: var(--primary);
|
|
136
|
-
}
|