@titaui/pc 1.6.11 → 1.6.15
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/lib/components/button/icon-btn/index.css +2 -0
- package/lib/components/button/index.js +1 -9
- package/lib/components/button/rect-btn/index.css +41 -8
- package/lib/components/button/rect-btn/index.js +8 -8
- package/lib/components/button/text-btn/index.css +33 -0
- package/lib/components/button/text-btn/index.js +52 -2
- package/lib/components/dynamic/components/title/index.css +2 -2
- package/lib/components/dynamic/constant.js +2 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +7 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +4 -21
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +4 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +7 -1
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +4 -7
- package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +1 -35
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/dynamic-task.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +7 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +17 -7
- package/lib/components/dynamic/dynamic-like-ranking/index.css +1 -2
- package/lib/components/dynamic/dynamic-like-ranking/index.js +11 -6
- package/lib/components/dynamic/dynamic-liking/index.css +0 -1
- package/lib/components/dynamic/dynamic-liking/item.js +2 -20
- package/lib/components/dynamic/dynamic.js +4 -1
- package/lib/components/dynamic/new-ui.css +206 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +2 -2
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +2 -2
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +2 -2
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +2 -2
- package/lib/components/dynamic/quick-operation/img/okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/send-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/send-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/task.png +0 -0
- package/lib/components/dynamic/util.js +1 -1
- package/lib/components/file-list/components/single-file/index.css +2 -2
- package/lib/components/file-list/components/single-file/index.js +1 -1
- package/lib/components/form/form-fields/radios/index.css +5 -0
- package/lib/components/form/form-fields/radios/index.js +34 -5
- package/lib/components/help-card/image/canceled.svg +13 -0
- package/lib/components/help-card/image/helpzx.svg +8 -0
- package/lib/components/help-card/image/kefu.svg +18 -0
- package/lib/components/help-card/image/kefu1.svg +8 -0
- package/lib/components/help-card/image/okr-shequ.svg +14 -0
- package/lib/components/help-card/image/question.svg +20 -0
- package/lib/components/help-card/image/yuyueyanshi.svg +8 -0
- package/lib/components/help-card/index.css +219 -0
- package/lib/components/help-card/index.js +286 -0
- package/lib/components/help-card/request-api.js +34 -0
- package/lib/components/img-viewer/index.css +4 -0
- package/lib/components/img-viewer/index.js +2 -1
- package/lib/components/menus/components/drag-resize/index.css +4 -4
- package/lib/components/menus/components/drag-resize/index.js +35 -30
- package/lib/components/menus/components/flip-menu-card/index.css +7 -2
- package/lib/components/menus/components/flip-menu-card/index.js +17 -15
- package/lib/components/menus/components/menu-card/index.js +1 -6
- package/lib/components/menus/components/menu-close-btn/index.css +2 -1
- package/lib/components/menus/components/menu-tree/images/loading-node.gif +0 -0
- package/lib/components/menus/components/menu-tree/index.js +4 -3
- package/lib/components/menus/components/menu-tree/tree-node/avatar/index.css +50 -0
- package/lib/components/menus/components/menu-tree/tree-node/avatar/index.js +72 -0
- package/lib/components/menus/components/menu-tree/tree-node/compony-node/index.js +3 -1
- package/lib/components/menus/components/menu-tree/tree-node/depart-node/index.js +8 -4
- package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.css +48 -0
- package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.js +65 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.css +72 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.js +19 -0
- package/lib/components/{button/admin-button/primary.js → menus/components/menu-tree/tree-node/loading-node.js} +7 -14
- package/lib/components/menus/components/menu-tree/tree-node/no-follower-node.js +24 -0
- package/lib/components/menus/components/menu-tree/tree-node/user-concern-node.js +7 -3
- package/lib/components/menus/components/menu-tree/tree-node/user-node/index.css +3 -0
- package/lib/components/menus/components/menu-tree/tree-node/user-node/index.js +9 -42
- package/lib/components/menus/export-modules/appraisal-menus/datas.js +45 -18
- package/lib/components/menus/export-modules/depart-menus/index.js +34 -7
- package/lib/components/menus/export-modules/okr-menus/datas.js +102 -2
- package/lib/components/menus/export-modules/okr-menus/index.css +0 -3
- package/lib/components/menus/export-modules/okr-menus/index.js +73 -20
- package/lib/components/menus/export-modules/subordinate-menus/index.js +3 -2
- package/lib/components/menus/request-apis.js +22 -5
- package/lib/components/nav-top/components/menu/index.js +7 -5
- package/lib/components/nav-top/components/user-message/components/inform/index.css +28 -6
- package/lib/components/nav-top/components/user-message/components/inform/index.js +184 -22
- package/lib/components/nav-top/components/user-message/components/red-pack/index.css +40 -0
- package/lib/components/nav-top/components/user-message/components/red-pack/index.js +105 -0
- package/lib/components/nav-top/components/user-message/components/red-pack/request-api.js +14 -0
- package/lib/components/nav-top/components/user-message/components/remind/index.css +25 -8
- package/lib/components/nav-top/components/user-message/components/remind/index.js +74 -21
- package/lib/components/nav-top/components/user-message/components/reply/index.css +27 -6
- package/lib/components/nav-top/components/user-message/components/reply/index.js +129 -24
- package/lib/components/nav-top/components/user-message/components/tab-title/index.js +4 -8
- package/lib/components/nav-top/components/user-message/components/todos/index.css +25 -12
- package/lib/components/nav-top/components/user-message/components/todos/index.js +147 -23
- package/lib/components/nav-top/components/user-message/constant.js +11 -1
- package/lib/components/nav-top/components/user-message/images/loading.gif +0 -0
- package/lib/components/nav-top/components/user-message/images/msg-reward.png +0 -0
- package/lib/components/nav-top/components/user-message/index.css +37 -0
- package/lib/components/nav-top/components/user-message/index.js +86 -72
- package/lib/components/nav-top/components/user-message/msg/index.js +17 -24
- package/lib/components/nav-top/components/user-message/utils.js +14 -0
- package/lib/components/nav-top/components/user-own-menu/index.js +3 -4
- package/lib/components/nav-top/components/user-own-menu/utils.js +77 -0
- package/lib/components/nav-top/constant.js +1 -1
- package/lib/components/nav-top/index.js +12 -12
- package/lib/components/nav-top/request.apis.js +52 -0
- package/lib/components/nav-top/utils.js +10 -70
- package/lib/components/okr-filter-drawer/filter-button.js +1 -0
- package/lib/components/okr-filter-drawer/filter-form.js +163 -0
- package/lib/components/okr-filter-drawer/index.css +45 -0
- package/lib/components/okr-filter-drawer/index.js +42 -0
- package/lib/components/pagination/index.css +6 -12
- package/lib/components/photo-card/components/card/index.css +78 -105
- package/lib/components/photo-card/components/card/index.js +133 -40
- package/lib/components/photo-card/data.js +5 -5
- package/lib/components/photo-card/images/assistant.svg +40 -0
- package/lib/components/photo-card/images/back-manager.svg +40 -0
- package/lib/components/photo-card/images/boss.svg +38 -0
- package/lib/components/photo-card/images/depart-leader.svg +40 -0
- package/lib/components/photo-card/images/super-manager.svg +40 -0
- package/lib/components/photo-card/index.css +12 -12
- package/lib/components/photo-card/index.js +17 -13
- package/lib/components/point-demo/drop-down-box/index.css +98 -0
- package/lib/components/point-demo/drop-down-box/index.js +159 -0
- package/lib/components/point-demo/image/demo-bcg.png +0 -0
- package/lib/components/point-demo/image/down.svg +14 -0
- package/lib/components/point-demo/image/icon-canceled.svg +7 -0
- package/lib/components/point-demo/image/logo.svg +64 -0
- package/lib/components/point-demo/index.css +348 -0
- package/lib/components/point-demo/index.js +657 -0
- package/lib/components/point-demo/input/index.css +74 -0
- package/lib/components/point-demo/input/index.js +176 -0
- package/lib/components/point-demo/point-demo.js +93 -0
- package/lib/components/point-demo/popup/index.css +7 -0
- package/lib/components/point-demo/popup/index.js +113 -0
- package/lib/components/point-demo/popup/placement.js +44 -0
- package/lib/components/point-demo/popup/rc-trigger.css +127 -0
- package/lib/components/tree/index.js +0 -2
- package/lib/components/update-modal/img/background.png +0 -0
- package/lib/components/update-modal/img/rocket.png +0 -0
- package/lib/components/update-modal/index.css +80 -0
- package/lib/components/update-modal/index.js +83 -0
- package/lib/components/update-modal/request-api.js +17 -0
- package/lib/hooks/useLocalStorage.js +37 -0
- package/lib/index.js +22 -2
- package/lib/pages/aha2021/index.css +16 -1
- package/lib/pages/aha2021/index.js +15 -5
- package/lib/pages/new-okr-list/context.js +14 -0
- package/lib/{components/button/export-button/index.js → pages/new-okr-list/header/create-okr.js} +24 -44
- package/lib/pages/new-okr-list/header/depart-title.js +19 -0
- package/lib/pages/new-okr-list/header/filter.js +58 -0
- package/lib/pages/new-okr-list/header/index.css +31 -0
- package/lib/pages/new-okr-list/header/index.js +94 -0
- package/lib/pages/new-okr-list/header/user-title.js +19 -0
- package/lib/pages/new-okr-list/index.css +10 -0
- package/lib/pages/new-okr-list/index.js +127 -0
- package/lib/pages/new-okr-list/keyword-search/index.css +71 -0
- package/lib/{components/button/admin-button/drop-down-arrow.js → pages/new-okr-list/keyword-search/index.js} +54 -47
- package/lib/pages/new-okr-list/list/index.css +0 -0
- package/lib/pages/new-okr-list/list/index.js +48 -0
- package/lib/pages/new-okr-list/precls.js +8 -0
- package/lib/pages/new-okr-list/request-api.js +57 -0
- package/lib/pages/new-okr-list/theme.css +3 -0
- package/lib/pages/okr-map/hooks/useStorage.js +1 -1
- package/lib/pages/okr-map/utils.js +11 -7
- package/lib/pages/personal-info/index.js +5 -3
- package/lib/utils/bs-global.js +16 -1
- package/package.json +2 -1
- package/lib/components/button/admin-button/default.js +0 -35
- package/lib/components/button/admin-button/index.css +0 -86
- package/lib/components/button/admin-button/index.js +0 -40
- package/lib/components/button/admin-button/secondary.js +0 -35
- package/lib/components/button/export-button/index.css +0 -51
- package/lib/components/dynamic/dynamic-item/components/icon/index.css +0 -10
- package/lib/components/dynamic/dynamic-item/components/icon/index.js +0 -35
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
- package/lib/components/nav-top/mock.js +0 -36
|
@@ -17,6 +17,8 @@ var _requestApis = require("../../../request-apis");
|
|
|
17
17
|
|
|
18
18
|
var _popDownNotification = require("../../../../pop-down-notification");
|
|
19
19
|
|
|
20
|
+
var _context = require("../../../context");
|
|
21
|
+
|
|
20
22
|
var _precls = _interopRequireDefault(require("../precls"));
|
|
21
23
|
|
|
22
24
|
require("./index.css");
|
|
@@ -33,6 +35,9 @@ var _default = function _default(props) {
|
|
|
33
35
|
data = props.data;
|
|
34
36
|
var userRef = (0, _react.useRef)();
|
|
35
37
|
|
|
38
|
+
var _useContext = (0, _react.useContext)(_context.OkrMenusContext),
|
|
39
|
+
onAddConcerner = _useContext.onAddConcerner;
|
|
40
|
+
|
|
36
41
|
var onExpandHander = function onExpandHander(e) {
|
|
37
42
|
onExpand(e);
|
|
38
43
|
};
|
|
@@ -45,14 +50,13 @@ var _default = function _default(props) {
|
|
|
45
50
|
|
|
46
51
|
var onUserSelectHandler = function onUserSelectHandler(users, _, e) {
|
|
47
52
|
(0, _requestApis.addFollower)(users[0].data.userId).then(function (res) {
|
|
48
|
-
if (res.
|
|
53
|
+
if (res.Code != 1) {
|
|
49
54
|
_popDownNotification.Toast.Error(res.Message, {});
|
|
50
55
|
|
|
51
|
-
onExpand(e);
|
|
52
56
|
return;
|
|
53
57
|
}
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
onAddConcerner(users[0]);
|
|
56
60
|
})["catch"](function (err) {
|
|
57
61
|
return console.log(err);
|
|
58
62
|
});
|
|
@@ -15,6 +15,8 @@ var _openData = require("../../../../../../utils/open-data");
|
|
|
15
15
|
|
|
16
16
|
var _context = require("../../../../context");
|
|
17
17
|
|
|
18
|
+
var _avatar = _interopRequireDefault(require("../avatar"));
|
|
19
|
+
|
|
18
20
|
var _precls = _interopRequireDefault(require("../../precls"));
|
|
19
21
|
|
|
20
22
|
require("./index.css");
|
|
@@ -25,18 +27,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
27
|
|
|
26
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
29
|
|
|
28
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
-
|
|
30
|
-
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."); }
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
30
|
var _default = function _default(props) {
|
|
41
31
|
var user = props.data,
|
|
42
32
|
_props$level = props.level,
|
|
@@ -49,34 +39,6 @@ var _default = function _default(props) {
|
|
|
49
39
|
var _useContext = (0, _react.useContext)(_context.OkrMenusContext),
|
|
50
40
|
flipGoNext = _useContext.flipGoNext;
|
|
51
41
|
|
|
52
|
-
var _useState = (0, _react.useState)(function () {
|
|
53
|
-
return !!user.avatar.medium;
|
|
54
|
-
}),
|
|
55
|
-
_useState2 = _slicedToArray(_useState, 1),
|
|
56
|
-
hasAvatar = _useState2[0];
|
|
57
|
-
|
|
58
|
-
var renderImgAvatar = function renderImgAvatar() {
|
|
59
|
-
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
60
|
-
style: {
|
|
61
|
-
width: 24,
|
|
62
|
-
height: 24,
|
|
63
|
-
verticalAlign: "top"
|
|
64
|
-
},
|
|
65
|
-
src: user.avatar.medium
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
var renderTextAvatar = function renderTextAvatar() {
|
|
70
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
71
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-node-avatar"), "noselect"),
|
|
72
|
-
style: {
|
|
73
|
-
backgroundColor: user.avatar.color
|
|
74
|
-
}
|
|
75
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-node-avatar-slice"))
|
|
77
|
-
}, user.name));
|
|
78
|
-
};
|
|
79
|
-
|
|
80
42
|
var openSubordinate = function openSubordinate(e) {
|
|
81
43
|
if (isFlip) {
|
|
82
44
|
flipGoNext({
|
|
@@ -93,9 +55,14 @@ var _default = function _default(props) {
|
|
|
93
55
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
94
56
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-node")),
|
|
95
57
|
style: {
|
|
96
|
-
paddingLeft: 12 + level * 10
|
|
58
|
+
'paddingLeft': 12 + level * 10
|
|
97
59
|
}
|
|
98
|
-
},
|
|
60
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
61
|
+
user: user
|
|
62
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
63
|
+
style: {
|
|
64
|
+
'width': "calc(100% - ".concat(12 + 13 + level * 10, "px)")
|
|
65
|
+
},
|
|
99
66
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-node-username"), "noselect")
|
|
100
67
|
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
101
68
|
name: user.name,
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.defaultRefObject = void 0;
|
|
7
7
|
|
|
8
|
+
var _bsGlobal = require("../../../../utils/bs-global");
|
|
9
|
+
|
|
8
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
11
|
|
|
10
12
|
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); } }
|
|
@@ -17,6 +19,18 @@ var defaultRefObject = {
|
|
|
17
19
|
};
|
|
18
20
|
exports.defaultRefObject = defaultRefObject;
|
|
19
21
|
|
|
22
|
+
var _getBSGlobal = (0, _bsGlobal.getBSGlobal)('AssessAdvancedSetting'),
|
|
23
|
+
_getBSGlobal$AssessFu = _getBSGlobal.AssessFunctionSetting,
|
|
24
|
+
StartAssessByDepartmentLeader = _getBSGlobal$AssessFu.StartAssessByDepartmentLeader,
|
|
25
|
+
StartAssessByUser = _getBSGlobal$AssessFu.StartAssessByUser;
|
|
26
|
+
|
|
27
|
+
var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
28
|
+
HasSub = _getUserInfo.HasSub,
|
|
29
|
+
IsAssessManager = _getUserInfo.IsAssessManager,
|
|
30
|
+
IsLeader = _getUserInfo.IsLeader;
|
|
31
|
+
|
|
32
|
+
var performanceManageAuthority = IsAssessManager || IsLeader && StartAssessByDepartmentLeader || StartAssessByUser;
|
|
33
|
+
|
|
20
34
|
var AppraisalMenus = /*#__PURE__*/function () {
|
|
21
35
|
function AppraisalMenus() {
|
|
22
36
|
_classCallCheck(this, AppraisalMenus);
|
|
@@ -25,54 +39,64 @@ var AppraisalMenus = /*#__PURE__*/function () {
|
|
|
25
39
|
'icon': 'kaohe',
|
|
26
40
|
'label': '我的考核',
|
|
27
41
|
'key': 'my-appraisal',
|
|
28
|
-
'href': '#/performance?reactRouterName=self'
|
|
42
|
+
'href': '#/performance?reactRouterName=self',
|
|
43
|
+
'isShow': true
|
|
29
44
|
}, {
|
|
30
45
|
'icon': 'caidan-xiashu',
|
|
31
46
|
'label': '下属绩效',
|
|
32
47
|
'key': 'subordinate-appraisal',
|
|
33
|
-
'href': '#/performance?reactRouterName=subordinate'
|
|
48
|
+
'href': '#/performance?reactRouterName=subordinate',
|
|
49
|
+
'isShow': HasSub
|
|
34
50
|
}, {
|
|
35
51
|
'icon': 'bumen',
|
|
36
52
|
'label': '部门绩效',
|
|
37
53
|
'key': 'depart-appraisal',
|
|
38
|
-
'href': '#/performance?reactRouterName=department'
|
|
54
|
+
'href': '#/performance?reactRouterName=department',
|
|
55
|
+
'isShow': IsLeader
|
|
39
56
|
}, {
|
|
40
57
|
'icon': '',
|
|
41
58
|
'label': '考核管理',
|
|
42
59
|
'key': 'manage-appraisal-group',
|
|
43
60
|
'type': 'group-name',
|
|
44
|
-
'href': ''
|
|
61
|
+
'href': '',
|
|
62
|
+
'isShow': performanceManageAuthority
|
|
45
63
|
}, {
|
|
46
64
|
'icon': 'untitled',
|
|
47
65
|
'label': '考核管理',
|
|
48
66
|
'key': 'manage-appraisal',
|
|
49
|
-
'href': '#/performance?reactRouterName=manage'
|
|
67
|
+
'href': '#/performance?reactRouterName=manage',
|
|
68
|
+
'isShow': performanceManageAuthority
|
|
50
69
|
}, {
|
|
51
70
|
'icon': 'uniEA10',
|
|
52
71
|
'label': '考核表',
|
|
53
72
|
'key': 'template-appraisal',
|
|
54
|
-
'href': '#/performance?reactRouterName=template'
|
|
73
|
+
'href': '#/performance?reactRouterName=template',
|
|
74
|
+
'isShow': performanceManageAuthority
|
|
55
75
|
}, {
|
|
56
76
|
'icon': 'ZBmuban',
|
|
57
77
|
'label': '考核指标库',
|
|
58
78
|
'key': 'library-appraisal',
|
|
59
|
-
'href': '#/performance?reactRouterName=templateLibrary'
|
|
79
|
+
'href': '#/performance?reactRouterName=templateLibrary',
|
|
80
|
+
'isShow': performanceManageAuthority
|
|
60
81
|
}, {
|
|
61
82
|
'icon': 'PF-shezhi',
|
|
62
83
|
'label': '评分设置',
|
|
63
84
|
'key': 'score-appraisal',
|
|
64
|
-
'href': '#/performance?reactRouterName=setting'
|
|
85
|
+
'href': '#/performance?reactRouterName=setting',
|
|
86
|
+
'isShow': IsAssessManager
|
|
65
87
|
}, {
|
|
66
88
|
'icon': '',
|
|
67
89
|
'label': '考核统计',
|
|
68
90
|
'key': 'statistics-appraisal',
|
|
69
91
|
'type': 'group-name',
|
|
70
|
-
'href': ''
|
|
92
|
+
'href': '',
|
|
93
|
+
'isShow': false
|
|
71
94
|
}, {
|
|
72
95
|
'icon': 'yibiao',
|
|
73
96
|
'label': '考核仪表盘',
|
|
74
97
|
'key': 'dashboard-appraisal',
|
|
75
|
-
'href': ''
|
|
98
|
+
'href': '',
|
|
99
|
+
'isShow': false
|
|
76
100
|
}];
|
|
77
101
|
}
|
|
78
102
|
|
|
@@ -89,14 +113,17 @@ var AppraisalMenus = /*#__PURE__*/function () {
|
|
|
89
113
|
|
|
90
114
|
for (var i = 0; i < menus.length; i++) {
|
|
91
115
|
var menu = menus[i];
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
116
|
+
|
|
117
|
+
if (menu.isShow) {
|
|
118
|
+
treeNodes.push({
|
|
119
|
+
'key': "".concat(menu.key),
|
|
120
|
+
'title': menu.label,
|
|
121
|
+
'data': menu,
|
|
122
|
+
'isLeaf': true,
|
|
123
|
+
'children': [],
|
|
124
|
+
'nodeType': menu.type || 'menu-item'
|
|
125
|
+
});
|
|
126
|
+
}
|
|
100
127
|
}
|
|
101
128
|
|
|
102
129
|
return treeNodes;
|
|
@@ -25,6 +25,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
29
|
+
|
|
30
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
+
|
|
32
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
33
|
+
|
|
34
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
35
|
+
|
|
28
36
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
37
|
|
|
30
38
|
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."); }
|
|
@@ -37,7 +45,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
37
45
|
|
|
38
46
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
47
|
|
|
40
|
-
var
|
|
48
|
+
var _default = function _default() {
|
|
41
49
|
var loadedNode = (0, _react.useRef)([]);
|
|
42
50
|
|
|
43
51
|
var _useState = (0, _react.useState)([]),
|
|
@@ -56,8 +64,21 @@ var DepartMenus = function DepartMenus(props) {
|
|
|
56
64
|
|
|
57
65
|
(0, _react.useEffect)(function () {
|
|
58
66
|
(0, _requestApis.getDepsAndUsers)(-1, isGetUser).then(function (rawTreeData) {
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
var rootNode = {
|
|
68
|
+
'async': true,
|
|
69
|
+
'data': {
|
|
70
|
+
'id': 0,
|
|
71
|
+
'name': "公司全部"
|
|
72
|
+
},
|
|
73
|
+
'id': "0",
|
|
74
|
+
'isLeaf': true,
|
|
75
|
+
'key': 0,
|
|
76
|
+
'nodeType': "depart-node",
|
|
77
|
+
'pid': -1,
|
|
78
|
+
'title': "公司全部"
|
|
79
|
+
};
|
|
80
|
+
setRawTreeData([rootNode].concat(_toConsumableArray(rawTreeData)));
|
|
81
|
+
setTreeData((0, _utils.toTree)([rootNode].concat(_toConsumableArray(rawTreeData))));
|
|
61
82
|
});
|
|
62
83
|
}, []); // 动态加载子节点数据集
|
|
63
84
|
|
|
@@ -82,9 +103,16 @@ var DepartMenus = function DepartMenus(props) {
|
|
|
82
103
|
return (0, _requestApis.getDepsAndUsers)(nodeId, isGetUser);
|
|
83
104
|
};
|
|
84
105
|
|
|
85
|
-
var onSelectHandler = function onSelectHandler() {
|
|
86
|
-
|
|
87
|
-
|
|
106
|
+
var onSelectHandler = function onSelectHandler(_id, _ref) {
|
|
107
|
+
var node = _ref.node;
|
|
108
|
+
var nodeType = node.nodeType,
|
|
109
|
+
data = node.data;
|
|
110
|
+
|
|
111
|
+
if (nodeType == "user") {
|
|
112
|
+
location.href = "#/okr/manage?toUserId=".concat(data.userId);
|
|
113
|
+
} else if (nodeType == "depart-node") {
|
|
114
|
+
location.href = "#/okr/manage?departmentName=".concat(data.name, "&departmentId=").concat(data.id);
|
|
115
|
+
}
|
|
88
116
|
};
|
|
89
117
|
|
|
90
118
|
return /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|
|
@@ -95,5 +123,4 @@ var DepartMenus = function DepartMenus(props) {
|
|
|
95
123
|
});
|
|
96
124
|
};
|
|
97
125
|
|
|
98
|
-
var _default = DepartMenus;
|
|
99
126
|
exports["default"] = _default;
|
|
@@ -5,6 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.defaultRefObject = void 0;
|
|
7
7
|
|
|
8
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
|
|
10
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
+
|
|
12
|
+
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); }
|
|
13
|
+
|
|
14
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
+
|
|
16
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
8
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
21
|
|
|
10
22
|
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); } }
|
|
@@ -16,6 +28,10 @@ var defaultRefObject = {
|
|
|
16
28
|
'insertConcern': function insertConcern() {},
|
|
17
29
|
'insertSubordinates': function insertSubordinates() {},
|
|
18
30
|
'getMenus': function getMenus() {},
|
|
31
|
+
'setConcernLoading': function setConcernLoading() {},
|
|
32
|
+
'setSubordinatesLoading': function setSubordinatesLoading() {},
|
|
33
|
+
'addConcerner': function addConcerner() {},
|
|
34
|
+
'removeConcerner': function removeConcerner() {},
|
|
19
35
|
'USERCONCERN': '',
|
|
20
36
|
'SUBORDINATES': '',
|
|
21
37
|
'MYOKR': ''
|
|
@@ -111,10 +127,48 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
111
127
|
|
|
112
128
|
return false;
|
|
113
129
|
}
|
|
130
|
+
}, {
|
|
131
|
+
key: "setConcernLoading",
|
|
132
|
+
value: function setConcernLoading(loading) {
|
|
133
|
+
this.menus[2].children = [];
|
|
134
|
+
|
|
135
|
+
if (loading) {
|
|
136
|
+
this.menus[2].children.push({
|
|
137
|
+
'icon': '',
|
|
138
|
+
'label': 'loading',
|
|
139
|
+
'key': "loading-concern",
|
|
140
|
+
'type': 'loading',
|
|
141
|
+
'href': '',
|
|
142
|
+
'data': {}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
key: "setSubordinatesLoading",
|
|
148
|
+
value: function setSubordinatesLoading(loading) {
|
|
149
|
+
this.menus[1].children = [];
|
|
150
|
+
|
|
151
|
+
if (loading) {
|
|
152
|
+
this.menus[1].children.push({
|
|
153
|
+
'icon': '',
|
|
154
|
+
'label': 'loading',
|
|
155
|
+
'key': "loading-concern",
|
|
156
|
+
'type': 'loading',
|
|
157
|
+
'href': '',
|
|
158
|
+
'data': {}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
114
162
|
}, {
|
|
115
163
|
key: "insertConcern",
|
|
116
164
|
value: function insertConcern(users) {
|
|
117
|
-
var treeNodeUsers = [];
|
|
165
|
+
var treeNodeUsers = []; // 如果没有关注者,显示空
|
|
166
|
+
|
|
167
|
+
this.setEmptyConcerners(false);
|
|
168
|
+
|
|
169
|
+
if (!users || !users.length) {
|
|
170
|
+
this.setEmptyConcerners(true);
|
|
171
|
+
}
|
|
118
172
|
|
|
119
173
|
for (var i = 0; i < users.length; i++) {
|
|
120
174
|
var user = users[i];
|
|
@@ -123,7 +177,7 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
123
177
|
'icon': '',
|
|
124
178
|
'label': user.name,
|
|
125
179
|
'key': "".concat(user.userId),
|
|
126
|
-
'type': '
|
|
180
|
+
'type': 'follower',
|
|
127
181
|
'href': '',
|
|
128
182
|
'data': user
|
|
129
183
|
});
|
|
@@ -131,6 +185,51 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
131
185
|
|
|
132
186
|
this.menus[2].children = this.menus[2].children.concat(treeNodeUsers);
|
|
133
187
|
}
|
|
188
|
+
}, {
|
|
189
|
+
key: "setEmptyConcerners",
|
|
190
|
+
value: function setEmptyConcerners(empty) {
|
|
191
|
+
this.menus[2].children = [];
|
|
192
|
+
|
|
193
|
+
if (empty) {
|
|
194
|
+
this.menus[2].children.push({
|
|
195
|
+
'icon': '',
|
|
196
|
+
'label': 'empty-concerners',
|
|
197
|
+
'key': "empty-concerners",
|
|
198
|
+
'type': 'no-follower',
|
|
199
|
+
'href': '',
|
|
200
|
+
'data': {}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}, {
|
|
205
|
+
key: "addConcerner",
|
|
206
|
+
value: function addConcerner(user) {
|
|
207
|
+
if (this.menus[2].children.length && this.menus[2].children[0].key == 'empty-concerners') {
|
|
208
|
+
this.menus[2].children = [];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
this.menus[2].children.push({
|
|
212
|
+
'icon': '',
|
|
213
|
+
'label': user.name,
|
|
214
|
+
'key': "".concat(user.userId),
|
|
215
|
+
'type': 'follower',
|
|
216
|
+
'href': '',
|
|
217
|
+
'data': user
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}, {
|
|
221
|
+
key: "removeConcerner",
|
|
222
|
+
value: function removeConcerner(user) {
|
|
223
|
+
var newChildren = _toConsumableArray(this.menus[2].children).filter(function (it) {
|
|
224
|
+
return it.key != user.userId;
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
if (!newChildren.length) {
|
|
228
|
+
this.setEmptyConcerners(true);
|
|
229
|
+
} else {
|
|
230
|
+
this.menus[2].children = newChildren;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
134
233
|
}, {
|
|
135
234
|
key: "insertSubordinates",
|
|
136
235
|
value: function insertSubordinates(users) {
|
|
@@ -154,6 +253,7 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
154
253
|
key: "getMenus",
|
|
155
254
|
value: function getMenus() {
|
|
156
255
|
var menus = this.formateToTreeNodeData(this.menus);
|
|
256
|
+
1;
|
|
157
257
|
return menus;
|
|
158
258
|
}
|
|
159
259
|
}, {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
.titaui-menus-okr-menus {
|
|
2
2
|
position: relative;
|
|
3
|
-
height: 100vh;
|
|
4
3
|
box-sizing: border-box;
|
|
5
4
|
}
|
|
6
5
|
|
|
7
6
|
.titaui-menus-okr-menus-back {
|
|
8
|
-
height: 100%;
|
|
9
7
|
overflow-y: auto;
|
|
10
8
|
}
|
|
11
9
|
|
|
@@ -19,7 +17,6 @@
|
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
.titaui-menus-okr-menus-tree {
|
|
22
|
-
height: 100%;
|
|
23
20
|
overflow-y: auto;
|
|
24
21
|
}
|
|
25
22
|
|
|
@@ -55,7 +55,7 @@ var _default = function _default(props) {
|
|
|
55
55
|
var _props$onSelect = props.onSelect,
|
|
56
56
|
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect;
|
|
57
57
|
|
|
58
|
-
var _useState = (0, _react.useState)("
|
|
58
|
+
var _useState = (0, _react.useState)(""),
|
|
59
59
|
_useState2 = _slicedToArray(_useState, 2),
|
|
60
60
|
flipBackType = _useState2[0],
|
|
61
61
|
setFlipBackType = _useState2[1];
|
|
@@ -82,36 +82,71 @@ var _default = function _default(props) {
|
|
|
82
82
|
|
|
83
83
|
var onSelectHandler = function onSelectHandler(_, _ref) {
|
|
84
84
|
var node = _ref.node;
|
|
85
|
+
var nodeType = node.nodeType,
|
|
86
|
+
data = node.data;
|
|
87
|
+
|
|
88
|
+
if (nodeType == 'user') {
|
|
89
|
+
location.href = "#/okr/manage?toUserId=".concat(data.userId);
|
|
90
|
+
}
|
|
91
|
+
|
|
85
92
|
onSelect(node);
|
|
86
93
|
};
|
|
87
94
|
|
|
88
95
|
var onUserSelectHandler = function onUserSelectHandler(user) {
|
|
89
|
-
onSelect(user);
|
|
90
96
|
location.href = "#/okr/manage?26toUserId=".concat(user.id);
|
|
97
|
+
}; // 获取关注的人数据列表
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
var getConcerners = function getConcerners() {
|
|
101
|
+
return new Promise(function (resolve, reject) {
|
|
102
|
+
var mdata = okrMenusData.current; // 初始化 Loading
|
|
103
|
+
|
|
104
|
+
mdata.setConcernLoading(true);
|
|
105
|
+
setMenus(mdata.getMenus());
|
|
106
|
+
resolve(true); // 获取数据
|
|
107
|
+
|
|
108
|
+
(0, _requestApis.getFollowerList)().then(function (user) {
|
|
109
|
+
mdata.setConcernLoading(false);
|
|
110
|
+
mdata.insertConcern(user);
|
|
111
|
+
setMenus(mdata.getMenus());
|
|
112
|
+
})["catch"](reject);
|
|
113
|
+
});
|
|
114
|
+
}; // 获取下属OKR数据列表
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
var getSubordinaters = function getSubordinaters() {
|
|
118
|
+
return new Promise(function (resolve, reject) {
|
|
119
|
+
var mdata = okrMenusData.current; // 初始化 Loading
|
|
120
|
+
|
|
121
|
+
mdata.setSubordinatesLoading(true);
|
|
122
|
+
setMenus(mdata.getMenus());
|
|
123
|
+
resolve(true); // 获取数据
|
|
124
|
+
|
|
125
|
+
(0, _requestApis.getSubordinates)({
|
|
126
|
+
'relationIds': '1,3'
|
|
127
|
+
}).then(function (users) {
|
|
128
|
+
mdata.setSubordinatesLoading(false);
|
|
129
|
+
mdata.insertSubordinates(users);
|
|
130
|
+
setMenus(mdata.getMenus());
|
|
131
|
+
resolve(true);
|
|
132
|
+
})["catch"](reject);
|
|
133
|
+
});
|
|
91
134
|
};
|
|
92
135
|
|
|
93
136
|
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
94
137
|
return new Promise(function (resolve) {
|
|
95
138
|
if (treeNode.key == okrMenusData.current.MYOKR) {
|
|
96
139
|
resolve(true);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
setMenus(okrMenusData.current.getMenus());
|
|
102
|
-
resolve(true);
|
|
103
|
-
})["catch"](function (err) {
|
|
140
|
+
} else if (treeNode.key == okrMenusData.current.USERCONCERN) {
|
|
141
|
+
getConcerners().then(function () {
|
|
142
|
+
return resolve(true);
|
|
143
|
+
})["catch"](function () {
|
|
104
144
|
return resolve(true);
|
|
105
145
|
});
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}).then(function (users) {
|
|
111
|
-
okrMenusData.current.insertSubordinates(users);
|
|
112
|
-
setMenus(okrMenusData.current.getMenus());
|
|
113
|
-
resolve(true);
|
|
114
|
-
})["catch"](function (err) {
|
|
146
|
+
} else if (treeNode.key == okrMenusData.current.SUBORDINATES) {
|
|
147
|
+
getSubordinaters().then(function () {
|
|
148
|
+
return resolve(true);
|
|
149
|
+
})["catch"](function () {
|
|
115
150
|
return resolve(true);
|
|
116
151
|
});
|
|
117
152
|
} else {
|
|
@@ -134,16 +169,34 @@ var _default = function _default(props) {
|
|
|
134
169
|
}
|
|
135
170
|
};
|
|
136
171
|
|
|
172
|
+
var onAddConcerner = function onAddConcerner(user) {
|
|
173
|
+
var mdata = okrMenusData.current;
|
|
174
|
+
mdata.addConcerner(user.data);
|
|
175
|
+
setMenus(mdata.getMenus());
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
var onRemoveConcerner = function onRemoveConcerner(user) {
|
|
179
|
+
(0, _requestApis.removeFollower)(user.userId).then(function (res) {
|
|
180
|
+
if (res.Code == 1) {
|
|
181
|
+
var mdata = okrMenusData.current;
|
|
182
|
+
mdata.removeConcerner(user);
|
|
183
|
+
setMenus(mdata.getMenus());
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
|
|
137
188
|
return /*#__PURE__*/_react["default"].createElement(_context.OkrMenusContext.Provider, {
|
|
138
189
|
value: {
|
|
139
|
-
flipGoNext: flipGoNext
|
|
190
|
+
flipGoNext: flipGoNext,
|
|
191
|
+
onAddConcerner: onAddConcerner,
|
|
192
|
+
onRemoveConcerner: onRemoveConcerner
|
|
140
193
|
}
|
|
141
194
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
195
|
ref: menuRef,
|
|
143
196
|
className: (0, _classnames["default"])("".concat(_precls["default"], "-okr-menus"))
|
|
144
197
|
}, /*#__PURE__*/_react["default"].createElement(_flipMenuCard["default"], {
|
|
145
|
-
collapseMenu: collapseMenu,
|
|
146
198
|
ref: flipRef,
|
|
199
|
+
collapseMenu: collapseMenu,
|
|
147
200
|
defaultWidth: 180
|
|
148
201
|
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
149
202
|
style: {
|
|
@@ -92,8 +92,9 @@ var SubOrdinateMenus = function SubOrdinateMenus(props) {
|
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
var onSelectHandler = function onSelectHandler() {
|
|
96
|
-
|
|
95
|
+
var onSelectHandler = function onSelectHandler(_id, _ref) {
|
|
96
|
+
var node = _ref.node;
|
|
97
|
+
location.href = "#/okr/manage?toUserId=".concat(node.id);
|
|
97
98
|
};
|
|
98
99
|
|
|
99
100
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, !loading && /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|