@titaui/pc 1.11.51 → 1.11.52-beta.11
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/change-okr-modal/Item.js +19 -18
- package/lib/components/change-okr-modal/styledComponents.js +9 -9
- package/lib/components/checkbox/index.css +4 -0
- package/lib/components/contact-kefu/index.css +11 -1
- package/lib/components/contact-kefu/index.js +10 -4
- package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
- package/lib/components/create-okr-modal/fields/index.css +14 -3
- package/lib/components/create-okr-modal/fields/o-new-name.js +30 -19
- package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
- package/lib/components/create-okr-modal/index.js +200 -133
- package/lib/components/create-okr-modal/kr-items/index.css +23 -13
- package/lib/components/create-okr-modal/kr-items/krDatas.js +95 -76
- package/lib/components/create-okr-modal/kr-items/krItem.js +53 -56
- package/lib/components/create-okr-modal/style.js +5 -5
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/dynamic/constant.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +8 -8
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -8
- 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/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +11 -9
- package/lib/components/nav-top/components/menu/index.js +18 -16
- 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/components/header/edit-name.js +86 -40
- package/lib/components/okr-detail/components/header/index.css +120 -41
- package/lib/components/okr-detail/components/header/index.js +36 -46
- package/lib/components/okr-detail/components/header/o-classify.js +152 -0
- package/lib/components/okr-detail/components/header/o-name.js +7 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +58 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +159 -63
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +15 -13
- package/lib/components/okr-detail/detail-header/index.js +8 -4
- package/lib/components/okr-detail/e-list/index.js +2 -2
- package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
- package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
- package/lib/components/okr-detail/request-apis.js +73 -69
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
- package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-flow/child-node/kr-node.js +3 -1
- package/lib/components/okr-flow/child-node/work-node.js +3 -1
- package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
- package/lib/components/okr-progress/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
- package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
- package/lib/components/okr-share/common-painter/utils.js +183 -36
- package/lib/components/okr-share/index.css +5 -4
- package/lib/components/okr-share/pink-card/card.js +3 -3
- package/lib/components/okr-share/pink-card/drawKrs.js +93 -18
- package/lib/components/okr-share/pink-card/index.js +20 -12
- package/lib/components/open-data-painter/index.js +6 -5
- package/lib/components/period-selector/interface.js +7 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/search-input/index.css +1 -1
- package/lib/components/search-key-handle/index.js +9 -7
- package/lib/components/select/Option.js +3 -3
- 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 -12
- package/lib/components/task-relation-modal/tree-node/category-node/index.js +1 -3
- package/lib/components/task-relation-modal/tree-node/kr-node/index.css +0 -16
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -10
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +0 -16
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +0 -4
- package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
- 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/tita-chart/errorBoundary/index.js +3 -3
- 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/empty/index.css +5 -0
- package/lib/components/user-selector/empty/index.js +9 -3
- package/lib/components/user-selector/export-modules/depart-search-selector/index.js +45 -17
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
- package/lib/components/user-selector/images/no-auth.png +0 -0
- package/lib/components/user-selector/request-apis.js +28 -9
- package/lib/components/user-selector/searched-panel/index.js +21 -7
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
- package/lib/components/wechat-btn/index.css +5 -1
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
- package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
- package/lib/utils/open-data.js +213 -65
- package/lib/utils/planDataJson.js +11115 -0
- package/package.json +3 -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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.tooltip-rows {
|
|
2
|
+
width: 100%;
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tooltip-rows-wrapper {
|
|
7
|
+
width: 100%;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.tooltip-rows-wrapper--hidden {
|
|
12
|
+
position: absolute;
|
|
13
|
+
visibility: hidden;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.tooltip-rows-wrapper--normal-chirdren {
|
|
17
|
+
margin-right: 4px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tooltip-rows-wrapper-suffix {
|
|
21
|
+
position: absolute;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
right: 0;
|
|
24
|
+
padding: 0 4px 0 14px;
|
|
25
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 20%);
|
|
26
|
+
}
|
|
@@ -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;
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
background: url(../images/empty-131.png) transparent no-repeat 50% 50%;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.persel-empty > span.empty-special {
|
|
16
|
+
background-image: url("../images/no-auth.png");
|
|
17
|
+
background-size: contain;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.add-group {
|
|
16
21
|
display: inline-block;
|
|
17
22
|
color: #2879ff;
|
|
@@ -7,13 +7,17 @@ exports["default"] = _default;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
10
12
|
var _getLocale = require("../../../utils/getLocale");
|
|
11
13
|
|
|
12
14
|
require("./index.css");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
16
|
-
function _default() {
|
|
18
|
+
function _default(_ref) {
|
|
19
|
+
var _ref$errorTip = _ref.errorTip,
|
|
20
|
+
errorTip = _ref$errorTip === void 0 ? "" : _ref$errorTip;
|
|
17
21
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
18
22
|
style: {
|
|
19
23
|
textAlign: "center"
|
|
@@ -21,8 +25,10 @@ function _default() {
|
|
|
21
25
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
26
|
className: "persel-empty"
|
|
23
27
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
24
|
-
className: "icon"
|
|
28
|
+
className: (0, _classnames["default"])("icon", {
|
|
29
|
+
"empty-special": !!errorTip
|
|
30
|
+
})
|
|
25
31
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
26
32
|
className: "empty-tip"
|
|
27
|
-
}, (0, _getLocale.getLocale)("OKR_MyO_Thnothinghere")));
|
|
33
|
+
}, errorTip || (0, _getLocale.getLocale)("OKR_MyO_Thnothinghere")));
|
|
28
34
|
}
|
|
@@ -19,6 +19,8 @@ var _resultPart = _interopRequireDefault(require("./result-part"));
|
|
|
19
19
|
|
|
20
20
|
var _chooseTree = _interopRequireDefault(require("../../select-tree/choose-tree"));
|
|
21
21
|
|
|
22
|
+
var _empty = _interopRequireDefault(require("../../empty"));
|
|
23
|
+
|
|
22
24
|
var _selectorInput = _interopRequireDefault(require("../../../selector-input"));
|
|
23
25
|
|
|
24
26
|
var _layout = require("../../layout");
|
|
@@ -29,6 +31,8 @@ var _utils = require("../../utils");
|
|
|
29
31
|
|
|
30
32
|
var _requestApis = require("../../request-apis");
|
|
31
33
|
|
|
34
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
35
|
+
|
|
32
36
|
require("rc-tabs/assets/index.css");
|
|
33
37
|
|
|
34
38
|
require("./index.css");
|
|
@@ -102,12 +106,17 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
102
106
|
users = _useState10[0],
|
|
103
107
|
setUsers = _useState10[1];
|
|
104
108
|
|
|
105
|
-
var _useState11 = (0, _react.useState)(
|
|
109
|
+
var _useState11 = (0, _react.useState)(false),
|
|
110
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
111
|
+
noAuth = _useState12[0],
|
|
112
|
+
setNoAuth = _useState12[1];
|
|
113
|
+
|
|
114
|
+
var _useState13 = (0, _react.useState)(function () {
|
|
106
115
|
if (!auth) return [];
|
|
107
116
|
return ["-1"];
|
|
108
117
|
}),
|
|
109
|
-
|
|
110
|
-
defaultExpandedKeys =
|
|
118
|
+
_useState14 = _slicedToArray(_useState13, 1),
|
|
119
|
+
defaultExpandedKeys = _useState14[0];
|
|
111
120
|
|
|
112
121
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
113
122
|
return {
|
|
@@ -120,12 +129,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
120
129
|
};
|
|
121
130
|
});
|
|
122
131
|
|
|
123
|
-
var
|
|
132
|
+
var _useState15 = (0, _react.useState)(function () {
|
|
124
133
|
if (props.selected) return props.selected;
|
|
125
134
|
}),
|
|
126
|
-
|
|
127
|
-
selected =
|
|
128
|
-
setSelected =
|
|
135
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
136
|
+
selected = _useState16[0],
|
|
137
|
+
setSelected = _useState16[1]; // 获取数据的API
|
|
129
138
|
|
|
130
139
|
|
|
131
140
|
var searchTreeData = function searchTreeData() {
|
|
@@ -134,9 +143,17 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
134
143
|
departOnly: true,
|
|
135
144
|
sourceFrom: sourceFrom
|
|
136
145
|
}).then(function (res) {
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
|
|
146
|
+
var Code = res.Code,
|
|
147
|
+
Data = res.Data;
|
|
148
|
+
|
|
149
|
+
if (Code === 401) {
|
|
150
|
+
setNoAuth(true);
|
|
151
|
+
} else {
|
|
152
|
+
setNoAuth(false);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
var departments = Data.departments,
|
|
156
|
+
users = Data.users;
|
|
140
157
|
|
|
141
158
|
if (searchDepart) {
|
|
142
159
|
setDeparts((0, _utils.translateDepartsToTreeNode)(departments || []));
|
|
@@ -197,18 +214,29 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
197
214
|
onGetTreeDataDone(departs);
|
|
198
215
|
});
|
|
199
216
|
}
|
|
200
|
-
}, []);
|
|
217
|
+
}, []);
|
|
218
|
+
|
|
219
|
+
var getResult = function getResult() {
|
|
220
|
+
if (noAuth) {
|
|
221
|
+
return /*#__PURE__*/_react["default"].createElement(_empty["default"], {
|
|
222
|
+
errorTip: (0, _getLocale.getLocale)("Mod_Nopermissiondep")
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return /*#__PURE__*/_react["default"].createElement(_resultPart["default"], {
|
|
227
|
+
treeData: searchDepart ? departs : searchUser ? users : [],
|
|
228
|
+
onSelect: onSelectHandler,
|
|
229
|
+
departOnly: true,
|
|
230
|
+
height: height - 44
|
|
231
|
+
});
|
|
232
|
+
}; // 选人组件内容
|
|
233
|
+
|
|
201
234
|
|
|
202
235
|
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
203
236
|
className: (0, _classnames["default"])("persel-box", "perspm-depart-search-selector")
|
|
204
237
|
}, /*#__PURE__*/_react["default"].createElement(_layout.SinglePersonalLayout, null, /*#__PURE__*/_react["default"].createElement(_selectorInput["default"], {
|
|
205
238
|
onChange: onSearchChangeHandler
|
|
206
|
-
}), searchKey ? loading ? /*#__PURE__*/_react["default"].createElement(_loading["default"], null) : /*#__PURE__*/_react["default"].createElement(
|
|
207
|
-
treeData: searchDepart ? departs : searchUser ? users : [],
|
|
208
|
-
onSelect: onSelectHandler,
|
|
209
|
-
departOnly: true,
|
|
210
|
-
height: height - 44
|
|
211
|
-
}) : /*#__PURE__*/_react["default"].createElement(_context.TreeNodeContext.Provider, {
|
|
239
|
+
}), searchKey ? loading ? /*#__PURE__*/_react["default"].createElement(_loading["default"], null) : getResult() : /*#__PURE__*/_react["default"].createElement(_context.TreeNodeContext.Provider, {
|
|
212
240
|
value: {}
|
|
213
241
|
}, /*#__PURE__*/_react["default"].createElement(_chooseTree["default"], {
|
|
214
242
|
onSelect: onSelectHandler,
|
|
@@ -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 = [];
|
|
Binary file
|
|
@@ -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,10 +97,18 @@ function _default(props) {
|
|
|
92
97
|
departOnly: departOnly,
|
|
93
98
|
sourceFrom: sourceFrom
|
|
94
99
|
}).then(function (res) {
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
+
|
|
99
112
|
setPerson((0, _utils.translateUsersToTreeNode)(users || []));
|
|
100
113
|
setGroup((0, _utils.translateGroupsToTreeNode)(groups || []));
|
|
101
114
|
setDeparts((0, _utils.translateDepartsToTreeNode)(departments || []));
|
|
@@ -103,7 +116,6 @@ function _default(props) {
|
|
|
103
116
|
});
|
|
104
117
|
}, [searchKey]); // 计算结果,是否显示空值
|
|
105
118
|
|
|
106
|
-
var showEmpty = false;
|
|
107
119
|
var itemCount = 0;
|
|
108
120
|
|
|
109
121
|
if (searchedPanes.user && person) {
|
|
@@ -120,7 +132,7 @@ function _default(props) {
|
|
|
120
132
|
|
|
121
133
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
134
|
className: "persel-searched"
|
|
123
|
-
}, 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"], {
|
|
124
136
|
title: (0, _getLocale.getLocale)("Per_Ma_form_detail_Personnel"),
|
|
125
137
|
treeData: person,
|
|
126
138
|
onSelect: onNodeSelect,
|
|
@@ -135,5 +147,7 @@ function _default(props) {
|
|
|
135
147
|
treeData: group,
|
|
136
148
|
onSelect: onNodeSelect,
|
|
137
149
|
selected: selected
|
|
138
|
-
}) : 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
|
+
})));
|
|
139
153
|
}
|