@titaui/pc 1.6.14 → 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/rect-btn/index.css +21 -0
- 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-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/index.css +13 -13
- package/lib/components/help-card/index.js +35 -31
- package/lib/components/help-card/request-api.js +2 -2
- package/lib/components/img-viewer/index.css +4 -0
- package/lib/components/img-viewer/index.js +2 -1
- package/lib/components/menus/components/flip-menu-card/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/depart-node/index.js +7 -3
- package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.css +6 -2
- package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.js +15 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +1 -0
- package/lib/components/menus/components/menu-tree/tree-node/user-concern-node.js +7 -3
- package/lib/components/menus/export-modules/depart-menus/index.js +34 -7
- package/lib/components/menus/export-modules/okr-menus/datas.js +43 -0
- package/lib/components/menus/export-modules/okr-menus/index.css +0 -2
- package/lib/components/menus/export-modules/okr-menus/index.js +27 -3
- 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/user-message/components/inform/index.css +20 -6
- package/lib/components/nav-top/components/user-message/components/inform/index.js +111 -13
- package/lib/components/nav-top/components/user-message/components/remind/index.css +17 -6
- package/lib/components/nav-top/components/user-message/components/remind/index.js +57 -11
- package/lib/components/nav-top/components/user-message/components/reply/index.css +19 -5
- package/lib/components/nav-top/components/user-message/components/reply/index.js +110 -12
- 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 +19 -5
- package/lib/components/nav-top/components/user-message/components/todos/index.js +99 -21
- 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/index.css +37 -0
- package/lib/components/nav-top/components/user-message/index.js +32 -7
- package/lib/components/nav-top/components/user-message/msg/index.js +14 -93
- 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/request.apis.js +29 -3
- package/lib/components/nav-top/utils.js +1 -72
- 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/tree/index.js +0 -2
- package/lib/hooks/useLocalStorage.js +37 -0
- package/lib/index.js +10 -2
- package/lib/pages/aha2021/index.css +9 -1
- package/lib/pages/new-okr-list/context.js +14 -0
- package/lib/pages/new-okr-list/header/create-okr.js +61 -0
- 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/pages/new-okr-list/keyword-search/index.js +100 -0
- 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/package.json +2 -1
- 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
|
@@ -188,8 +188,9 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
188
188
|
transform: "rotate(".concat(currentRotateDeg, "deg)")
|
|
189
189
|
}
|
|
190
190
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
191
|
+
className: prefix + '__body-img',
|
|
191
192
|
ref: imgRef,
|
|
192
|
-
src: currentImgData.bigImageUrl,
|
|
193
|
+
src: currentImgData.previewUrl || currentImgData.bigImageUrl,
|
|
193
194
|
style: {
|
|
194
195
|
transform: "scale(".concat(currentScale, ")")
|
|
195
196
|
}
|
|
@@ -107,7 +107,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
107
107
|
setTimeout(function () {
|
|
108
108
|
// 1秒后隐藏菜单到左侧
|
|
109
109
|
setIsFloatHide(!isFloatHide);
|
|
110
|
-
}, !isFloat ?
|
|
110
|
+
}, !isFloat ? 400 : 0);
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
var onFixedHideIconMouseEnter = function onFixedHideIconMouseEnter() {
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
+
var _openData = require("../../../../../../utils/open-data");
|
|
15
|
+
|
|
14
16
|
var _precls = _interopRequireDefault(require("../../precls"));
|
|
15
17
|
|
|
16
18
|
require("./index.css");
|
|
@@ -37,8 +39,7 @@ var DepartNode = function DepartNode(props) {
|
|
|
37
39
|
var onExpand = props.onExpand,
|
|
38
40
|
data = props.data,
|
|
39
41
|
_props$level = props.level,
|
|
40
|
-
level = _props$level === void 0 ? 0 : _props$level
|
|
41
|
-
title = props.title;
|
|
42
|
+
level = _props$level === void 0 ? 0 : _props$level;
|
|
42
43
|
var hasChild = data.hasChild;
|
|
43
44
|
|
|
44
45
|
var _useState = (0, _react.useState)(false),
|
|
@@ -60,7 +61,10 @@ var DepartNode = function DepartNode(props) {
|
|
|
60
61
|
className: "tu-icon-biaoqian-bumen"
|
|
61
62
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
62
63
|
className: "".concat(_precls["default"], "__depart-node-title")
|
|
63
|
-
},
|
|
64
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
|
|
65
|
+
name: data.name,
|
|
66
|
+
id: data.id
|
|
67
|
+
})), !isOpen && hasChild && /*#__PURE__*/_react["default"].createElement("span", {
|
|
64
68
|
className: (0, _classnames["default"])("tu-icon-APP-xi", "".concat(_precls["default"], "__depart-node-expand")),
|
|
65
69
|
onClick: handleExpand
|
|
66
70
|
}), isOpen && /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -39,6 +39,10 @@
|
|
|
39
39
|
border: 5px solid transparent;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.titaui-menus-tree__follower-node-cancel
|
|
43
|
-
color: #
|
|
42
|
+
.titaui-menus-tree__follower-node-cancel > span {
|
|
43
|
+
color: #a4acb9 !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.titaui-menus-tree__follower-node-cancel:hover > span {
|
|
47
|
+
color: #f05e5e !important;
|
|
44
48
|
}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
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); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
13
|
|
|
12
14
|
var _openData = require("../../../../../../utils/open-data");
|
|
13
15
|
|
|
16
|
+
var _context = require("../../../../context");
|
|
17
|
+
|
|
14
18
|
var _avatar = _interopRequireDefault(require("../avatar"));
|
|
15
19
|
|
|
16
20
|
var _precls = _interopRequireDefault(require("../../precls"));
|
|
@@ -19,12 +23,21 @@ require("./index.css");
|
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
25
|
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
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; }
|
|
29
|
+
|
|
22
30
|
var _default = function _default(props) {
|
|
23
31
|
var user = props.data,
|
|
24
32
|
_props$level = props.level,
|
|
25
33
|
level = _props$level === void 0 ? 0 : _props$level;
|
|
26
34
|
|
|
27
|
-
var
|
|
35
|
+
var _useContext = (0, _react.useContext)(_context.OkrMenusContext),
|
|
36
|
+
onRemoveConcerner = _useContext.onRemoveConcerner;
|
|
37
|
+
|
|
38
|
+
var onCancelFollowHandler = function onCancelFollowHandler() {
|
|
39
|
+
onRemoveConcerner(user);
|
|
40
|
+
};
|
|
28
41
|
|
|
29
42
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
43
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__follower-node")),
|
|
@@ -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
|
});
|
|
@@ -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); } }
|
|
@@ -18,6 +30,8 @@ var defaultRefObject = {
|
|
|
18
30
|
'getMenus': function getMenus() {},
|
|
19
31
|
'setConcernLoading': function setConcernLoading() {},
|
|
20
32
|
'setSubordinatesLoading': function setSubordinatesLoading() {},
|
|
33
|
+
'addConcerner': function addConcerner() {},
|
|
34
|
+
'removeConcerner': function removeConcerner() {},
|
|
21
35
|
'USERCONCERN': '',
|
|
22
36
|
'SUBORDINATES': '',
|
|
23
37
|
'MYOKR': ''
|
|
@@ -187,6 +201,35 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
187
201
|
});
|
|
188
202
|
}
|
|
189
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
|
+
}
|
|
190
233
|
}, {
|
|
191
234
|
key: "insertSubordinates",
|
|
192
235
|
value: function insertSubordinates(users) {
|
|
@@ -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,11 +82,17 @@ 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);
|
|
91
97
|
}; // 获取关注的人数据列表
|
|
92
98
|
|
|
@@ -163,9 +169,27 @@ var _default = function _default(props) {
|
|
|
163
169
|
}
|
|
164
170
|
};
|
|
165
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
|
+
|
|
166
188
|
return /*#__PURE__*/_react["default"].createElement(_context.OkrMenusContext.Provider, {
|
|
167
189
|
value: {
|
|
168
|
-
flipGoNext: flipGoNext
|
|
190
|
+
flipGoNext: flipGoNext,
|
|
191
|
+
onAddConcerner: onAddConcerner,
|
|
192
|
+
onRemoveConcerner: onRemoveConcerner
|
|
169
193
|
}
|
|
170
194
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
195
|
ref: menuRef,
|
|
@@ -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"], {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getDepsAndUsers = exports.addFollower = exports.getSubordinates = exports.getFollowerList = void 0;
|
|
6
|
+
exports.getDepsAndUsers = exports.removeFollower = exports.addFollower = exports.getSubordinates = exports.getFollowerList = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
@@ -69,10 +69,13 @@ var getSubordinates = function getSubordinates(_ref) {
|
|
|
69
69
|
|
|
70
70
|
exports.getSubordinates = getSubordinates;
|
|
71
71
|
|
|
72
|
-
var addFollower = function addFollower(
|
|
73
|
-
return _axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/follow/addFollower?followerId=").concat(
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
var addFollower = function addFollower(id) {
|
|
73
|
+
return _axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/follow/addFollower?followerId=").concat(id), null, {
|
|
74
|
+
'headers': {
|
|
75
|
+
'Content-Type': 'application/json; charset=utf-8',
|
|
76
|
+
'Accept': 'application/json, application/xml, text/play, text/html, *.*'
|
|
77
|
+
},
|
|
78
|
+
'withCredentials': true
|
|
76
79
|
}).then(function (res) {
|
|
77
80
|
return res.data;
|
|
78
81
|
});
|
|
@@ -80,6 +83,20 @@ var addFollower = function addFollower(userId) {
|
|
|
80
83
|
|
|
81
84
|
exports.addFollower = addFollower;
|
|
82
85
|
|
|
86
|
+
var removeFollower = function removeFollower(id) {
|
|
87
|
+
return _axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/follow/delFollower?followerId=").concat(id), null, {
|
|
88
|
+
'headers': {
|
|
89
|
+
'Content-Type': 'application/json; charset=utf-8',
|
|
90
|
+
'Accept': 'application/json, application/xml, text/play, text/html, *.*'
|
|
91
|
+
},
|
|
92
|
+
'withCredentials': true
|
|
93
|
+
}).then(function (res) {
|
|
94
|
+
return res.data;
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
exports.removeFollower = removeFollower;
|
|
99
|
+
|
|
83
100
|
var getDepsAndUsers = function getDepsAndUsers() {
|
|
84
101
|
var departmentId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
85
102
|
var isGetUser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
.titaui-user-message-msg-inform__loading {
|
|
2
|
+
width: 80px;
|
|
3
|
+
position: absolute;
|
|
4
|
+
top: 0;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
margin: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
1
11
|
.titaui-user-message-msg-inform__items {
|
|
2
12
|
width: 420px;
|
|
3
13
|
}
|
|
@@ -8,8 +18,7 @@
|
|
|
8
18
|
height: 82px;
|
|
9
19
|
border-radius: 12px;
|
|
10
20
|
margin-bottom: 4px;
|
|
11
|
-
margin:
|
|
12
|
-
margin-top: 8px;
|
|
21
|
+
margin-left: 12px;
|
|
13
22
|
}
|
|
14
23
|
|
|
15
24
|
.titaui-user-message-msg-inform__item:first-of-type {
|
|
@@ -103,6 +112,10 @@
|
|
|
103
112
|
position: absolute;
|
|
104
113
|
bottom: 0;
|
|
105
114
|
left: 0;
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
padding-right: 24px;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
106
119
|
width: 420px;
|
|
107
120
|
height: 50px;
|
|
108
121
|
background: #ffffff;
|
|
@@ -110,13 +123,14 @@
|
|
|
110
123
|
}
|
|
111
124
|
|
|
112
125
|
.titaui-user-message-msg-inform__footer-all {
|
|
113
|
-
|
|
114
|
-
margin: 16px 24px 16px 348px;
|
|
115
|
-
width: 48px;
|
|
116
|
-
height: 18px;
|
|
126
|
+
margin-left: auto;
|
|
117
127
|
font-size: 12px;
|
|
118
128
|
font-family: Resource-Han-Rounded-CN-Regular, Resource-Han-Rounded-CN;
|
|
119
129
|
font-weight: 400;
|
|
120
130
|
color: #2879ff;
|
|
121
131
|
line-height: 18px;
|
|
122
132
|
}
|
|
133
|
+
|
|
134
|
+
.titaui-user-message-msg-inform__footer-all:hover {
|
|
135
|
+
color: #2879ff;
|
|
136
|
+
}
|