@titaui/pc 1.12.0-beta.2 → 1.12.2
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/images/blue.svg +21 -0
- package/lib/components/button/images/red.svg +21 -0
- package/lib/components/button/images/white.svg +19 -0
- package/lib/components/button/rect-btn/index.js +3 -3
- package/lib/components/checkbox/index.css +4 -0
- package/lib/components/contact-kefu/index.css +10 -0
- package/lib/components/contact-kefu/index.js +8 -2
- package/lib/components/create-okr-modal/index.js +3 -1
- package/lib/components/dynamic/constant.js +1 -1
- package/lib/components/dynamic/dynamic-list/index.js +14 -7
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/nav-top/components/menu/index.js +16 -14
- package/lib/components/nav-top/index.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/e-list/index.js +2 -2
- package/lib/components/period-selector/interface.js +7 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/search-input/index.css +1 -1
- package/lib/components/select-layer/index.css +1 -1
- package/lib/components/task-relation-modal/helper.js +139 -2
- package/lib/components/task-relation-modal/image/loading.gif +0 -0
- package/lib/components/task-relation-modal/index.js +9 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +262 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +129 -0
- package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +185 -0
- package/lib/components/task-relation-modal/request-api.js +28 -2
- package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
- package/lib/components/task-relation-modal/search/principal.js +36 -19
- package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
- package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
- package/lib/components/{dynamic/dynamic-topping/index.js → task-relation-modal/search/task-relation.js} +45 -44
- package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
- package/lib/components/{dynamic/dynamic-liking/index.js → task-relation-modal/search/work-relation.js} +43 -39
- package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
- package/lib/components/task-relation-modal/tree/category-tree/index.css +3 -3
- package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
- package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
- package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
- package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
- package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
- package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
- package/lib/components/task-relation-modal/tree/work-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
- package/lib/components/task-relation-modal/work-relation/index.css +0 -0
- package/lib/components/task-relation-modal/work-relation/index.js +256 -0
- package/lib/components/tooltip/index.js +3 -0
- package/lib/components/tooltip/tooltip-rows/index.css +26 -0
- package/lib/components/{dynamic/advertise → tooltip/tooltip-rows}/index.js +65 -85
- package/lib/components/user-selector/category-selector-panel/index.js +6 -1
- package/lib/components/{dynamic/quick-operation/components/create-task/index.js → user-selector/category-selector-panel/subordinate-tree.js} +37 -20
- package/lib/components/user-selector/constant.js +10 -2
- package/lib/components/user-selector/export-modules/depart-search-selector/index.js +0 -3
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
- package/lib/components/user-selector/request-apis.js +28 -9
- package/lib/components/user-selector/searched-panel/index.js +21 -8
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
- package/lib/utils/planDataJson.js +11115 -0
- package/package.json +2 -2
- package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
- package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/index.css +0 -21
- package/lib/components/dynamic/advertise/interface.js +0 -5
- package/lib/components/dynamic/advertise/util.js +0 -28
- package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
- package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
- package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
- package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
- package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
- package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
- package/lib/components/dynamic/dynamic-liking/index.css +0 -81
- package/lib/components/dynamic/dynamic-liking/item.js +0 -75
- package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
- package/lib/components/dynamic/dynamic-topping/index.css +0 -141
- package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
- package/lib/components/dynamic/dynamic-topping/item.js +0 -153
- package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/lib/components/dynamic/dynamic.css +0 -173
- package/lib/components/dynamic/dynamic.js +0 -428
- package/lib/components/dynamic/export-module/index.js +0 -37
- package/lib/components/dynamic/img/dynamic-top.svg +0 -14
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +0 -184
- package/lib/components/dynamic/my-team/index.js +0 -263
- package/lib/components/dynamic/my-team/request-api.js +0 -52
- package/lib/components/dynamic/my-team/util.js +0 -20
- package/lib/components/dynamic/new-ui.css +0 -192
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
- package/lib/components/dynamic/online-broadcast/data.js +0 -95
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +0 -46
- package/lib/components/dynamic/online-broadcast/index.js +0 -61
- package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +0 -51
- package/lib/components/dynamic/quick-operation/index.js +0 -120
|
@@ -9,23 +9,7 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
|
-
var _requestApi = require("../request-api");
|
|
17
|
-
|
|
18
|
-
var _toast = _interopRequireDefault(require("../../toast"));
|
|
19
|
-
|
|
20
|
-
var _util = require("./util");
|
|
21
|
-
|
|
22
|
-
var _nextBtn = _interopRequireDefault(require("./components/next-btn"));
|
|
23
|
-
|
|
24
|
-
var _preBtn = _interopRequireDefault(require("./components/pre-btn"));
|
|
25
|
-
|
|
26
|
-
require("slick-carousel/slick/slick.css");
|
|
27
|
-
|
|
28
|
-
require("slick-carousel/slick/slick-theme.css");
|
|
12
|
+
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
29
13
|
|
|
30
14
|
require("./index.css");
|
|
31
15
|
|
|
@@ -35,10 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
35
19
|
|
|
36
20
|
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; }
|
|
37
21
|
|
|
38
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
39
|
-
|
|
40
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
|
-
|
|
42
22
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
23
|
|
|
44
24
|
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."); }
|
|
@@ -51,76 +31,76 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
51
31
|
|
|
52
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
33
|
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
34
|
+
var TooltipText = function TooltipText(_ref) {
|
|
35
|
+
var _ref$overlayText = _ref.overlayText,
|
|
36
|
+
overlayText = _ref$overlayText === void 0 ? "" : _ref$overlayText,
|
|
37
|
+
_ref$exClass = _ref.exClass,
|
|
38
|
+
exClass = _ref$exClass === void 0 ? "" : _ref$exClass,
|
|
39
|
+
_ref$isPercent = _ref.isPercent,
|
|
40
|
+
isPercent = _ref$isPercent === void 0 ? false : _ref$isPercent,
|
|
41
|
+
_ref$overlayClassName = _ref.overlayClassName,
|
|
42
|
+
overlayClassName = _ref$overlayClassName === void 0 ? "" : _ref$overlayClassName,
|
|
43
|
+
_ref$mouseEnterDelay = _ref.mouseEnterDelay,
|
|
44
|
+
mouseEnterDelay = _ref$mouseEnterDelay === void 0 ? 0 : _ref$mouseEnterDelay,
|
|
45
|
+
_ref$lineHeight = _ref.lineHeight,
|
|
46
|
+
lineHeight = _ref$lineHeight === void 0 ? 22 : _ref$lineHeight,
|
|
47
|
+
_ref$rowNum = _ref.rowNum,
|
|
48
|
+
rowNum = _ref$rowNum === void 0 ? 2 : _ref$rowNum,
|
|
49
|
+
_ref$suffix = _ref.suffix,
|
|
50
|
+
suffix = _ref$suffix === void 0 ? null : _ref$suffix,
|
|
51
|
+
_ref$suffixClass = _ref.suffixClass,
|
|
52
|
+
suffixClass = _ref$suffixClass === void 0 ? "" : _ref$suffixClass,
|
|
53
|
+
children = _ref.children;
|
|
54
|
+
|
|
55
|
+
var _useState = (0, _react.useState)(false),
|
|
67
56
|
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var _useState3 = (0, _react.useState)(false),
|
|
72
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
-
isMouseEnter = _useState4[0],
|
|
74
|
-
setIsMouseEnter = _useState4[1];
|
|
75
|
-
|
|
76
|
-
var handleImgClick = function handleImgClick(link) {
|
|
77
|
-
window.open(link, "_blank");
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
var handleMouseEnter = function handleMouseEnter() {
|
|
81
|
-
setIsMouseEnter(true);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
var handleMouseLeave = function handleMouseLeave() {
|
|
85
|
-
setIsMouseEnter(false);
|
|
86
|
-
};
|
|
57
|
+
hasTooltip = _useState2[0],
|
|
58
|
+
setHasTooltip = _useState2[1];
|
|
87
59
|
|
|
60
|
+
var domRef = (0, _react.useRef)();
|
|
88
61
|
(0, _react.useEffect)(function () {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
62
|
+
if (isPercent) {
|
|
63
|
+
var _console = console,
|
|
64
|
+
log = _console.log;
|
|
65
|
+
log(domRef.current.getBoundingClientRect());
|
|
66
|
+
var domClient = domRef.current ? domRef.current.getBoundingClientRect() : {
|
|
67
|
+
height: 0,
|
|
68
|
+
width: 0
|
|
69
|
+
};
|
|
70
|
+
var height = domClient.height;
|
|
71
|
+
|
|
72
|
+
if (height > rowNum * lineHeight) {
|
|
73
|
+
setHasTooltip(true);
|
|
98
74
|
}
|
|
99
|
-
}
|
|
75
|
+
}
|
|
100
76
|
}, []);
|
|
101
77
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
|
-
className:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
78
|
+
className: "tooltip-rows"
|
|
79
|
+
}, hasTooltip && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
80
|
+
overlayClassName: overlayClassName,
|
|
81
|
+
overlay: overlayText || children,
|
|
82
|
+
placement: "top",
|
|
83
|
+
mouseEnterDelay: mouseEnterDelay
|
|
84
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
|
+
className: "tooltip-rows-wrapper ".concat(exClass),
|
|
86
|
+
style: {
|
|
87
|
+
height: rowNum * lineHeight,
|
|
88
|
+
lineHeight: "".concat(lineHeight, "px")
|
|
89
|
+
}
|
|
90
|
+
}, children, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
+
className: "tooltip-rows-wrapper-suffix ".concat(suffixClass)
|
|
92
|
+
}, !!suffix && suffix))), !hasTooltip && /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
+
className: "tooltip-rows-wrapper ".concat(exClass)
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
95
|
+
className: "tooltip-rows-wrapper--normal-chirdren"
|
|
96
|
+
}, children), suffix), /*#__PURE__*/_react["default"].createElement("span", {
|
|
97
|
+
className: "tooltip-rows-wrapper tooltip-rows-wrapper--hidden ".concat(exClass),
|
|
98
|
+
ref: domRef,
|
|
99
|
+
style: {
|
|
100
|
+
lineHeight: "".concat(lineHeight, "px")
|
|
101
|
+
}
|
|
102
|
+
}, children));
|
|
123
103
|
};
|
|
124
104
|
|
|
125
|
-
var _default =
|
|
105
|
+
var _default = TooltipText;
|
|
126
106
|
exports["default"] = _default;
|
|
@@ -39,7 +39,12 @@ function _default(props) {
|
|
|
39
39
|
multiple = props.multiple;
|
|
40
40
|
|
|
41
41
|
var _useContext = (0, _react.useContext)(_context.CommonContext),
|
|
42
|
-
panes = _useContext.panes
|
|
42
|
+
panes = _useContext.panes,
|
|
43
|
+
departOnly = _useContext.departOnly;
|
|
44
|
+
|
|
45
|
+
if (departOnly) {
|
|
46
|
+
panes.subordinate = false;
|
|
47
|
+
}
|
|
43
48
|
|
|
44
49
|
var _useState = (0, _react.useState)(function () {
|
|
45
50
|
var panelCount = 0;
|
|
@@ -9,9 +9,11 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chooseTree = _interopRequireDefault(require("../select-tree/choose-tree"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _requestApis = require("../request-apis");
|
|
15
|
+
|
|
16
|
+
var _context = require("../context");
|
|
15
17
|
|
|
16
18
|
require("./index.css");
|
|
17
19
|
|
|
@@ -21,24 +23,39 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
23
|
|
|
22
24
|
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; }
|
|
23
25
|
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
var SubordinateTree = function SubordinateTree(props) {
|
|
27
|
+
var onSelect = props.onSelect,
|
|
28
|
+
selected = props.selected,
|
|
29
|
+
multiple = props.multiple,
|
|
30
|
+
itemHeight = props.itemHeight,
|
|
31
|
+
height = props.height;
|
|
32
|
+
|
|
33
|
+
var _useContext = (0, _react.useContext)(_context.CommonContext),
|
|
34
|
+
auth = _useContext.auth,
|
|
35
|
+
authType = _useContext.authType,
|
|
36
|
+
isGetRoot = _useContext.isGetRoot;
|
|
37
|
+
|
|
38
|
+
var onGetTreeData = function onGetTreeData() {
|
|
39
|
+
return (0, _requestApis.getSubordinateData)({
|
|
40
|
+
auth: auth,
|
|
41
|
+
authType: authType
|
|
42
|
+
});
|
|
30
43
|
};
|
|
31
44
|
|
|
32
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
return /*#__PURE__*/_react["default"].createElement(_context.TreeNodeContext.Provider, {
|
|
46
|
+
value: {}
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement(_chooseTree["default"], {
|
|
48
|
+
onSelect: onSelect,
|
|
49
|
+
selected: selected,
|
|
50
|
+
multiple: multiple,
|
|
51
|
+
virtual: true,
|
|
52
|
+
asyncData: true,
|
|
53
|
+
height: height,
|
|
54
|
+
isGetRoot: isGetRoot,
|
|
55
|
+
itemHeight: itemHeight,
|
|
56
|
+
getTreeData: onGetTreeData
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var _default = SubordinateTree;
|
|
44
61
|
exports["default"] = _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getPanesConfig = void 0;
|
|
6
|
+
exports.getPanesConfig = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../utils/getLocale");
|
|
9
9
|
|
|
@@ -11,6 +11,8 @@ var _departTree = _interopRequireDefault(require("./category-selector-panel/depa
|
|
|
11
11
|
|
|
12
12
|
var _groupTree = _interopRequireDefault(require("./category-selector-panel/group-tree"));
|
|
13
13
|
|
|
14
|
+
var _subordinateTree = _interopRequireDefault(require("./category-selector-panel/subordinate-tree"));
|
|
15
|
+
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
16
18
|
var getPanesConfig = function getPanesConfig() {
|
|
@@ -22,8 +24,14 @@ var getPanesConfig = function getPanesConfig() {
|
|
|
22
24
|
group: {
|
|
23
25
|
label: (0, _getLocale.getLocale)("Mod_Groups"),
|
|
24
26
|
Component: _groupTree["default"]
|
|
27
|
+
},
|
|
28
|
+
subordinate: {
|
|
29
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Butt_Subordinate"),
|
|
30
|
+
Component: _subordinateTree["default"]
|
|
25
31
|
}
|
|
26
32
|
};
|
|
27
33
|
};
|
|
28
34
|
|
|
29
|
-
exports.getPanesConfig = getPanesConfig;
|
|
35
|
+
exports.getPanesConfig = getPanesConfig;
|
|
36
|
+
var _default = getPanesConfig;
|
|
37
|
+
exports["default"] = _default;
|
|
@@ -143,7 +143,6 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
143
143
|
departOnly: true,
|
|
144
144
|
sourceFrom: sourceFrom
|
|
145
145
|
}).then(function (res) {
|
|
146
|
-
debugger;
|
|
147
146
|
var Code = res.Code,
|
|
148
147
|
Data = res.Data;
|
|
149
148
|
|
|
@@ -218,8 +217,6 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
218
217
|
}, []);
|
|
219
218
|
|
|
220
219
|
var getResult = function getResult() {
|
|
221
|
-
debugger;
|
|
222
|
-
|
|
223
220
|
if (noAuth) {
|
|
224
221
|
return /*#__PURE__*/_react["default"].createElement(_empty["default"], {
|
|
225
222
|
errorTip: (0, _getLocale.getLocale)("Mod_Nopermissiondep")
|
|
@@ -81,7 +81,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
81
81
|
_props$panes = props.panes,
|
|
82
82
|
panes = _props$panes === void 0 ? {
|
|
83
83
|
depart: true,
|
|
84
|
-
group: true
|
|
84
|
+
group: true,
|
|
85
|
+
subordinate: true
|
|
85
86
|
} : _props$panes,
|
|
86
87
|
_props$searchedPanes = props.searchedPanes,
|
|
87
88
|
searchedPanes = _props$searchedPanes === void 0 ? {
|
|
@@ -214,6 +215,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
214
215
|
});
|
|
215
216
|
|
|
216
217
|
var onOkHandler = function onOkHandler(selectNodes, e) {
|
|
218
|
+
debugger;
|
|
217
219
|
setVisible(false);
|
|
218
220
|
setSelected(selectNodes);
|
|
219
221
|
var texts = [];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.searchGroups = exports.searchDuties = exports.search = exports.getTreeData = exports.getGourps = exports.getDuties = void 0;
|
|
6
|
+
exports.searchGroups = exports.searchDuties = exports.search = exports.getTreeData = exports.getSubordinateData = exports.getGourps = exports.getDuties = void 0;
|
|
7
7
|
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
|
|
@@ -137,10 +137,29 @@ var getTreeData = function getTreeData(id, opts, resolve) {
|
|
|
137
137
|
|
|
138
138
|
exports.getTreeData = getTreeData;
|
|
139
139
|
|
|
140
|
-
var
|
|
141
|
-
var
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
var getSubordinateData = function getSubordinateData(_ref3) {
|
|
141
|
+
var auth = _ref3.auth,
|
|
142
|
+
authType = _ref3.authType;
|
|
143
|
+
var authTypeId;
|
|
144
|
+
if (auth && !authType) authType = "okr";
|
|
145
|
+
if (authType == "okr") authTypeId = "62";
|
|
146
|
+
if (authType == "performance") authTypeId = "31";
|
|
147
|
+
if (authType == "total") authTypeId = "0";
|
|
148
|
+
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/org/GetDepartmentSubordinates?objtype=").concat(authTypeId)).then(function (res) {
|
|
149
|
+
var _res$data$Data$users = res.data.Data.users,
|
|
150
|
+
users = _res$data$Data$users === void 0 ? [] : _res$data$Data$users;
|
|
151
|
+
var transUsers = (0, _utils.translateUsersToTreeNode)(users || []); // resolve && resolve([...transUsers]);
|
|
152
|
+
|
|
153
|
+
return _toConsumableArray(transUsers);
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
exports.getSubordinateData = getSubordinateData;
|
|
158
|
+
|
|
159
|
+
var search = function search(_ref4) {
|
|
160
|
+
var searchKey = _ref4.searchKey,
|
|
161
|
+
departOnly = _ref4.departOnly,
|
|
162
|
+
sourceFrom = _ref4.sourceFrom;
|
|
144
163
|
var args = [];
|
|
145
164
|
if (departOnly) args.push("isGetUser=false");
|
|
146
165
|
if (sourceFrom) args.push("sourceFrom=".concat(sourceFrom)); // 追加来源,用于企业微信搜索
|
|
@@ -153,8 +172,8 @@ var search = function search(_ref3) {
|
|
|
153
172
|
|
|
154
173
|
exports.search = search;
|
|
155
174
|
|
|
156
|
-
var searchGroups = function searchGroups(
|
|
157
|
-
var searchKey =
|
|
175
|
+
var searchGroups = function searchGroups(_ref5) {
|
|
176
|
+
var searchKey = _ref5.searchKey;
|
|
158
177
|
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/map/group?keyWork=").concat(searchKey)).then(function (searchRes) {
|
|
159
178
|
return searchRes.data;
|
|
160
179
|
});
|
|
@@ -170,8 +189,8 @@ var getDuties = function getDuties() {
|
|
|
170
189
|
|
|
171
190
|
exports.getDuties = getDuties;
|
|
172
191
|
|
|
173
|
-
var searchDuties = function searchDuties(
|
|
174
|
-
var searchKey =
|
|
192
|
+
var searchDuties = function searchDuties(_ref6) {
|
|
193
|
+
var searchKey = _ref6.searchKey;
|
|
175
194
|
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/position/search?status=1&pageNum=1&pageSize=100&filter=").concat(searchKey)).then(function (res) {
|
|
176
195
|
return res.data;
|
|
177
196
|
});
|
|
@@ -85,6 +85,11 @@ function _default(props) {
|
|
|
85
85
|
group = _useState8[0],
|
|
86
86
|
setGroup = _useState8[1];
|
|
87
87
|
|
|
88
|
+
var _useState9 = (0, _react.useState)(false),
|
|
89
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
90
|
+
noAuth = _useState10[0],
|
|
91
|
+
setNoAuth = _useState10[1];
|
|
92
|
+
|
|
88
93
|
(0, _react.useEffect)(function () {
|
|
89
94
|
setLoading(true);
|
|
90
95
|
(0, _requestApis.search)({
|
|
@@ -92,11 +97,18 @@ function _default(props) {
|
|
|
92
97
|
departOnly: departOnly,
|
|
93
98
|
sourceFrom: sourceFrom
|
|
94
99
|
}).then(function (res) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
groups =
|
|
99
|
-
users =
|
|
100
|
+
var Code = res.Code,
|
|
101
|
+
Data = res.Data;
|
|
102
|
+
var departments = Data.departments,
|
|
103
|
+
groups = Data.groups,
|
|
104
|
+
users = Data.users;
|
|
105
|
+
|
|
106
|
+
if (Code === 401) {
|
|
107
|
+
setNoAuth(true);
|
|
108
|
+
} else {
|
|
109
|
+
setNoAuth(false);
|
|
110
|
+
}
|
|
111
|
+
|
|
100
112
|
setPerson((0, _utils.translateUsersToTreeNode)(users || []));
|
|
101
113
|
setGroup((0, _utils.translateGroupsToTreeNode)(groups || []));
|
|
102
114
|
setDeparts((0, _utils.translateDepartsToTreeNode)(departments || []));
|
|
@@ -104,7 +116,6 @@ function _default(props) {
|
|
|
104
116
|
});
|
|
105
117
|
}, [searchKey]); // 计算结果,是否显示空值
|
|
106
118
|
|
|
107
|
-
var showEmpty = false;
|
|
108
119
|
var itemCount = 0;
|
|
109
120
|
|
|
110
121
|
if (searchedPanes.user && person) {
|
|
@@ -121,7 +132,7 @@ function _default(props) {
|
|
|
121
132
|
|
|
122
133
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
134
|
className: "persel-searched"
|
|
124
|
-
}, loading
|
|
135
|
+
}, loading && /*#__PURE__*/_react["default"].createElement(_loading["default"], null), !loading && /*#__PURE__*/_react["default"].createElement("div", null, searchedPanes.user && person && person.length ? /*#__PURE__*/_react["default"].createElement(_resultPart["default"], {
|
|
125
136
|
title: (0, _getLocale.getLocale)("Per_Ma_form_detail_Personnel"),
|
|
126
137
|
treeData: person,
|
|
127
138
|
onSelect: onNodeSelect,
|
|
@@ -136,5 +147,7 @@ function _default(props) {
|
|
|
136
147
|
treeData: group,
|
|
137
148
|
onSelect: onNodeSelect,
|
|
138
149
|
selected: selected
|
|
139
|
-
}) : undefined, itemCount == 0 && /*#__PURE__*/_react["default"].createElement(_empty["default"], null)
|
|
150
|
+
}) : undefined, itemCount == 0 && !noAuth && /*#__PURE__*/_react["default"].createElement(_empty["default"], null), itemCount == 0 && noAuth && /*#__PURE__*/_react["default"].createElement(_empty["default"], {
|
|
151
|
+
errorTip: (0, _getLocale.getLocale)("Mod_Nopermissiondep")
|
|
152
|
+
})));
|
|
140
153
|
}
|
|
@@ -35,30 +35,58 @@ function _default(props) {
|
|
|
35
35
|
onRemove && onRemove(props);
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
var renderAvatar = function renderAvatar() {
|
|
39
|
+
var _data$avatar, _data$avatar2, _data$avatar3;
|
|
40
|
+
|
|
41
|
+
if ((data === null || data === void 0 ? void 0 : (_data$avatar = data.avatar) === null || _data$avatar === void 0 ? void 0 : _data$avatar.hasAvatar) === false) {
|
|
42
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
43
|
+
style: {
|
|
44
|
+
backgroundColor: data.avatar.color
|
|
45
|
+
}
|
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
47
|
+
className: "perspm-person__avatar-text",
|
|
48
|
+
title: ""
|
|
49
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
50
|
+
id: data.userId,
|
|
51
|
+
name: data.name
|
|
52
|
+
})));
|
|
53
|
+
} else if (data !== null && data !== void 0 && (_data$avatar2 = data.avatar) !== null && _data$avatar2 !== void 0 && _data$avatar2.original || data !== null && data !== void 0 && (_data$avatar3 = data.avatar) !== null && _data$avatar3 !== void 0 && _data$avatar3.small) {
|
|
54
|
+
var _data$avatar4, _data$avatar5;
|
|
55
|
+
|
|
56
|
+
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
57
|
+
key: data.userId,
|
|
58
|
+
src: (data === null || data === void 0 ? void 0 : (_data$avatar4 = data.avatar) === null || _data$avatar4 === void 0 ? void 0 : _data$avatar4.original) || (data === null || data === void 0 ? void 0 : (_data$avatar5 = data.avatar) === null || _data$avatar5 === void 0 ? void 0 : _data$avatar5.small),
|
|
59
|
+
style: {
|
|
60
|
+
width: "100%",
|
|
61
|
+
height: "100%",
|
|
62
|
+
position: 'relative',
|
|
63
|
+
top: '-1px'
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
} else {
|
|
67
|
+
var _data$avatar6;
|
|
68
|
+
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
70
|
+
style: {
|
|
71
|
+
backgroundColor: data === null || data === void 0 ? void 0 : (_data$avatar6 = data.avatar) === null || _data$avatar6 === void 0 ? void 0 : _data$avatar6.color
|
|
72
|
+
}
|
|
73
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
74
|
+
className: "perspm-person__avatar-text",
|
|
75
|
+
title: ""
|
|
76
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
77
|
+
id: data.userId,
|
|
78
|
+
name: data.name
|
|
79
|
+
})));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
38
83
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
39
84
|
className: (0, _classnames["default"])("perspm-person", {
|
|
40
85
|
"perspm-person--small": hideUserInfo
|
|
41
86
|
})
|
|
42
87
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
43
88
|
className: "perspm-person__avatar"
|
|
44
|
-
},
|
|
45
|
-
key: data.userId,
|
|
46
|
-
src: data.avatar.small,
|
|
47
|
-
style: {
|
|
48
|
-
width: "100%",
|
|
49
|
-
height: "100%"
|
|
50
|
-
}
|
|
51
|
-
}) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
52
|
-
style: {
|
|
53
|
-
backgroundColor: data.avatar.color
|
|
54
|
-
}
|
|
55
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
56
|
-
className: "perspm-person__avatar-text",
|
|
57
|
-
title: ""
|
|
58
|
-
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
59
|
-
id: data.userId,
|
|
60
|
-
name: data.name
|
|
61
|
-
})))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
89
|
+
}, renderAvatar()), /*#__PURE__*/_react["default"].createElement("span", {
|
|
62
90
|
className: "perspm-person__info"
|
|
63
91
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
64
92
|
style: {
|