@titaui/pc 1.12.0-beta.1 → 1.12.1
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/avatar/name-avatar/index.css +1 -0
- package/lib/components/avatar/name-avatar/index.js +22 -13
- package/lib/components/avatar/text-avatar/index.css +2 -2
- package/lib/components/avatar/text-avatar/index.js +6 -6
- 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.css +45 -11
- package/lib/components/button/rect-btn/index.js +12 -6
- package/lib/components/change-okr-modal/index.js +7 -6
- package/lib/components/checkbox/index.css +7 -3
- package/lib/{pages/aha2021 → components/contact-kefu}/img/canceled.svg +0 -0
- package/lib/{pages/aha2021 → components/contact-kefu}/img/kefu.svg +0 -0
- package/lib/{pages/aha2021 → components/contact-kefu}/img/not-try.png +0 -0
- package/lib/components/contact-kefu/img/notice.png +0 -0
- package/lib/{pages/aha2021 → components/contact-kefu}/img/try.png +0 -0
- package/lib/components/contact-kefu/index.css +95 -0
- package/lib/components/{dynamic/advertise → contact-kefu}/index.js +59 -77
- package/lib/components/create-okr-modal/index.js +48 -42
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +5 -1
- package/lib/components/drawer/headerDrop.js +42 -4
- package/lib/components/drawer/index.css +33 -0
- package/lib/components/drawer/index.js +26 -3
- package/lib/components/dynamic/constant.js +38 -33
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +48 -10
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +4 -2
- 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/e-priority/index.css +4 -4
- package/lib/components/e-priority/index.js +10 -2
- package/lib/components/form/form-fields/radios/index.css +4 -0
- package/lib/components/form/form-fields/radios/index.js +4 -3
- package/lib/components/mblog/components/MblogContent.js +5 -2
- package/lib/components/nav-top/components/menu/img/new.svg +30 -0
- package/lib/components/nav-top/components/menu/img/wecome-temp.png +0 -0
- package/lib/components/nav-top/components/menu/index.css +91 -0
- package/lib/components/nav-top/components/menu/index.js +72 -24
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +2 -1
- package/lib/components/nav-top/components/user-message/components/todos/index.css +1 -0
- package/lib/components/nav-top/index.js +8 -4
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/index.css +4 -0
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -0
- package/lib/components/okr-detail/components/header/index.js +10 -3
- package/lib/components/okr-detail/components/header/o-name.js +10 -3
- package/lib/components/okr-detail/components/o-classify.js +5 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +16 -16
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +111 -54
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +63 -0
- package/lib/components/okr-detail/detail-header/index.css +11 -0
- package/lib/components/okr-detail/detail-header/index.js +228 -234
- package/lib/components/okr-detail/e-list/index.js +2 -2
- package/lib/components/okr-detail/helper.js +108 -0
- package/lib/components/okr-detail/index.js +21 -4
- package/lib/components/okr-detail/okr-list/index.js +13 -6
- package/lib/components/okr-detail/request-apis.js +14 -8
- package/lib/components/okr-flow/child-node/index.css +1 -1
- package/lib/components/okr-flow/export-modal/index.js +66 -3
- package/lib/components/okr-period-selector/index.js +9 -5
- package/lib/components/okr-period-selector/select-cycle.js +23 -19
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/period-selector/interface.js +7 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/radio/index.css +3 -3
- package/lib/components/search-input/index.css +1 -1
- package/lib/components/select-layer/index.css +1 -1
- package/lib/components/survey-model/index.js +3 -0
- 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 -1
- 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 +30 -3
- 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/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-node/category-node/index.css +0 -11
- 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 +0 -6
- 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/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/task-tree/index.js +1 -7
- package/lib/components/task-tree/task-item-node/constant.js +39 -22
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +38 -8
- package/lib/components/task-tree/task-item-node/e-task.js +24 -24
- package/lib/components/task-tree/task-item-node/index.css +28 -18
- package/lib/components/task-tree/task-tree.css +1 -1
- package/lib/components/textarea/index.css +142 -0
- package/lib/components/textarea/index.js +262 -0
- package/lib/components/time-picker/time-picker.js +34 -102
- package/lib/components/time-picker/timer-picker-input.js +0 -6
- package/lib/components/toast/index.js +5 -3
- package/lib/components/tooltip/index.js +3 -0
- package/lib/components/tooltip/tooltip-rows/index.css +26 -0
- package/lib/components/tooltip/tooltip-rows/index.js +106 -0
- 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-v1/radio/radio.js +1 -1
- package/lib/index.js +48 -0
- package/lib/pages/aha2021/index.css +1 -26
- package/lib/pages/aha2021/index.js +3 -82
- package/lib/pages/new-okr-list/header/common.js +52 -0
- package/lib/pages/new-okr-list/header/index.css +45 -0
- package/lib/pages/new-okr-list/header/index.js +40 -16
- package/lib/pages/new-okr-list/header/operate-record.js +136 -0
- package/lib/pages/new-okr-list/index.js +4 -2
- package/lib/pages/new-okr-list/list/index.js +19 -2
- package/lib/pages/new-okr-list/request-api.js +8 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
- package/lib/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- 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 -77
- 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
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
- package/lib/components/task-tree/mock.js +0 -944
|
@@ -9,23 +9,17 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _reactSlick = _interopRequireDefault(require("react-slick"));
|
|
13
|
-
|
|
14
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
13
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _toast = _interopRequireDefault(require("../../toast"));
|
|
14
|
+
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
19
15
|
|
|
20
|
-
var
|
|
16
|
+
var _popup = _interopRequireDefault(require("../popup"));
|
|
21
17
|
|
|
22
|
-
var
|
|
18
|
+
var _platform = require("../../utils/platform");
|
|
23
19
|
|
|
24
|
-
var
|
|
20
|
+
var _notTry = _interopRequireDefault(require("./img/not-try.png"));
|
|
25
21
|
|
|
26
|
-
require("
|
|
27
|
-
|
|
28
|
-
require("slick-carousel/slick/slick-theme.css");
|
|
22
|
+
var _try = _interopRequireDefault(require("./img/try.png"));
|
|
29
23
|
|
|
30
24
|
require("./index.css");
|
|
31
25
|
|
|
@@ -35,8 +29,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
35
29
|
|
|
36
30
|
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
31
|
|
|
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
32
|
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
33
|
|
|
42
34
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -51,76 +43,66 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
51
43
|
|
|
52
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
45
|
|
|
54
|
-
var
|
|
55
|
-
var settings = {
|
|
56
|
-
dots: false,
|
|
57
|
-
infinite: true,
|
|
58
|
-
speed: 1000,
|
|
59
|
-
slidesToShow: 1,
|
|
60
|
-
slidesToScroll: 1,
|
|
61
|
-
// arrows: false,
|
|
62
|
-
autoplay: true
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
var DynamicAdvertise = function DynamicAdvertise() {
|
|
66
|
-
var _useState = (0, _react.useState)([]),
|
|
67
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
-
sliderData = _useState2[0],
|
|
69
|
-
setSliderData = _useState2[1];
|
|
70
|
-
|
|
71
|
-
var _useState3 = (0, _react.useState)(false),
|
|
72
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
-
isMouseEnter = _useState4[0],
|
|
74
|
-
setIsMouseEnter = _useState4[1];
|
|
46
|
+
var preCls = "contact-kefu";
|
|
75
47
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
48
|
+
var ContactKefu = function ContactKefu() {
|
|
49
|
+
var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$ten, _classNames;
|
|
79
50
|
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
|
|
51
|
+
var _useState = (0, _react.useState)(false),
|
|
52
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
53
|
+
visible = _useState2[0],
|
|
54
|
+
setVisible = _useState2[1];
|
|
83
55
|
|
|
84
|
-
var
|
|
85
|
-
|
|
56
|
+
var handleShowCode = function handleShowCode() {
|
|
57
|
+
setVisible(true);
|
|
86
58
|
};
|
|
87
59
|
|
|
88
|
-
(0
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}, []
|
|
101
|
-
|
|
102
|
-
className:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
handleImgClick(item.link);
|
|
60
|
+
var isTrial = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Version) === 1 && (0, _platform.isOfficialSite)();
|
|
61
|
+
|
|
62
|
+
if (!((_window$BSGlobal2 = window.BSGlobal) !== null && _window$BSGlobal2 !== void 0 && (_window$BSGlobal2$ten = _window$BSGlobal2.tenantAuthentication) !== null && _window$BSGlobal2$ten !== void 0 && _window$BSGlobal2$ten.Version)) {
|
|
63
|
+
isTrial = true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
67
|
+
className: "".concat(preCls, "__popup")
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
69
|
+
className: "".concat(preCls, "__popup-title")
|
|
70
|
+
}, "\u5FAE\u4FE1/\u4F01\u4E1A\u5FAE\u4FE1\u626B\u4E00\u626B"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
|
+
className: "".concat(preCls, "__popup-content")
|
|
72
|
+
}, "\u4E13\u5C5E\u5BA2\u670D\u4E3A\u4F60\u63D0\u4F9B\u54A8\u8BE2\u670D\u52A1"), /*#__PURE__*/_react["default"].createElement("img", {
|
|
73
|
+
src: isTrial ? _try["default"] : _notTry["default"],
|
|
74
|
+
className: "".concat(preCls, "__popup-img"),
|
|
75
|
+
alt: "\u5FAE\u4FE1\u626B\u7801"
|
|
76
|
+
}));
|
|
77
|
+
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
79
|
+
popup: popup,
|
|
80
|
+
popupTransitionName: "tita-popup-zoom-left-bottom",
|
|
81
|
+
placement: "topLeft",
|
|
82
|
+
popupAlign: {
|
|
83
|
+
offset: [-32, -10],
|
|
84
|
+
overflow: {
|
|
85
|
+
adjustX: 1,
|
|
86
|
+
adjustY: 1
|
|
116
87
|
}
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
}
|
|
88
|
+
},
|
|
89
|
+
popupVisible: visible,
|
|
90
|
+
onPopupVisibleChange: function onPopupVisibleChange(bol) {
|
|
91
|
+
return setVisible(bol);
|
|
92
|
+
}
|
|
93
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
94
|
+
overlay: "\u8054\u7CFB\u5BA2\u670D",
|
|
95
|
+
placement: "right",
|
|
96
|
+
align: {
|
|
97
|
+
offset: [0, 0]
|
|
98
|
+
}
|
|
99
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
|
+
className: (0, _classnames["default"])("".concat(preCls, "__kefu"), (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "__try-kefu"), isTrial), _defineProperty(_classNames, "".concat(preCls, "__hidden"), visible), _classNames)),
|
|
101
|
+
onClick: handleShowCode
|
|
102
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__cancel"), visible))
|
|
104
|
+
}))));
|
|
123
105
|
};
|
|
124
106
|
|
|
125
|
-
var _default =
|
|
107
|
+
var _default = ContactKefu;
|
|
126
108
|
exports["default"] = _default;
|
|
@@ -117,7 +117,9 @@ function CreateOkrModal(_ref, ref) {
|
|
|
117
117
|
_ref$visible = _ref.visible,
|
|
118
118
|
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
119
119
|
_ref$onClose = _ref.onClose,
|
|
120
|
-
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose
|
|
120
|
+
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
121
|
+
_ref$isFromAssess = _ref.isFromAssess,
|
|
122
|
+
isFromAssess = _ref$isFromAssess === void 0 ? false : _ref$isFromAssess;
|
|
121
123
|
|
|
122
124
|
var _useState = (0, _react.useState)(visible),
|
|
123
125
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -126,7 +128,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
126
128
|
|
|
127
129
|
|
|
128
130
|
var userId = BSGlobal.loginUserInfo.Id;
|
|
129
|
-
var setting = (0, _bsGlobal.getBSGlobal)(
|
|
131
|
+
var setting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting;
|
|
130
132
|
var openOkrType = setting.OkrTypeSetting;
|
|
131
133
|
var openClassify = setting.OkrClassify;
|
|
132
134
|
var openKrWeight = setting.KrWeight;
|
|
@@ -136,7 +138,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
136
138
|
Id = _ref2.Id,
|
|
137
139
|
UserAvatar = _ref2.UserAvatar;
|
|
138
140
|
|
|
139
|
-
var _useState3 = (0, _react.useState)(
|
|
141
|
+
var _useState3 = (0, _react.useState)(''),
|
|
140
142
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
141
143
|
okrName = _useState4[0],
|
|
142
144
|
setOkrName = _useState4[1]; // 目标名称
|
|
@@ -160,7 +162,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
160
162
|
|
|
161
163
|
var _useState9 = (0, _react.useState)({
|
|
162
164
|
departmentId: 0,
|
|
163
|
-
departmentName:
|
|
165
|
+
departmentName: ''
|
|
164
166
|
}),
|
|
165
167
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
166
168
|
dept = _useState10[0],
|
|
@@ -169,7 +171,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
169
171
|
|
|
170
172
|
var _useState11 = (0, _react.useState)({
|
|
171
173
|
groupId: 0,
|
|
172
|
-
groupName:
|
|
174
|
+
groupName: ''
|
|
173
175
|
}),
|
|
174
176
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
175
177
|
team = _useState12[0],
|
|
@@ -177,7 +179,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
177
179
|
|
|
178
180
|
|
|
179
181
|
var _useState13 = (0, _react.useState)({
|
|
180
|
-
typeName: (0, _getLocale.getLocale)(
|
|
182
|
+
typeName: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
|
|
181
183
|
typeId: 1
|
|
182
184
|
}),
|
|
183
185
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
@@ -216,7 +218,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
216
218
|
principalName: Name,
|
|
217
219
|
userAvatar: UserAvatar,
|
|
218
220
|
krWeight: 100,
|
|
219
|
-
mileStoneName:
|
|
221
|
+
mileStoneName: '',
|
|
220
222
|
confidenceIndex: 5
|
|
221
223
|
}]),
|
|
222
224
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
@@ -226,7 +228,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
226
228
|
var _useState25 = (0, _react.useState)({
|
|
227
229
|
// 对其目标
|
|
228
230
|
parentWorkId: 0,
|
|
229
|
-
parentWorkName:
|
|
231
|
+
parentWorkName: '',
|
|
230
232
|
parentType: 0,
|
|
231
233
|
parentKrId: 0
|
|
232
234
|
}),
|
|
@@ -283,7 +285,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
283
285
|
tipIndex = _useState44[0],
|
|
284
286
|
setTipIndex = _useState44[1];
|
|
285
287
|
|
|
286
|
-
var _useState45 = (0, _react.useState)(
|
|
288
|
+
var _useState45 = (0, _react.useState)(''),
|
|
287
289
|
_useState46 = _slicedToArray(_useState45, 2),
|
|
288
290
|
userAvatarBase64Url = _useState46[0],
|
|
289
291
|
setUserAvatarBase64Url = _useState46[1];
|
|
@@ -307,7 +309,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
307
309
|
var modalRef = (0, _react.useRef)();
|
|
308
310
|
var oInputFoucsRef = (0, _react.useRef)(false);
|
|
309
311
|
var krInputFoucsRef = (0, _react.useRef)(false);
|
|
310
|
-
var downloadDomRef = (0, _react.useRef)(document.createElement(
|
|
312
|
+
var downloadDomRef = (0, _react.useRef)(document.createElement('div'));
|
|
311
313
|
var newOkrDataRef = (0, _react.useRef)(); // kr权重总计
|
|
312
314
|
|
|
313
315
|
var total = 0;
|
|
@@ -351,7 +353,9 @@ function CreateOkrModal(_ref, ref) {
|
|
|
351
353
|
setData: function setData(data) {
|
|
352
354
|
setOkrName(data.okrName);
|
|
353
355
|
setUser(data.user);
|
|
354
|
-
}
|
|
356
|
+
},
|
|
357
|
+
show: showCreateOkrModal,
|
|
358
|
+
hide: hideCreateOkrModal
|
|
355
359
|
};
|
|
356
360
|
});
|
|
357
361
|
var handleOnSuccess = (0, _react.useCallback)(function () {
|
|
@@ -363,7 +367,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
363
367
|
setShowCreatedSuccessInfo(true);
|
|
364
368
|
setTipIndex(Math.floor(Math.random() * 6));
|
|
365
369
|
} else {
|
|
366
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
370
|
+
_toast["default"].Success((0, _getLocale.getLocale)('OKR_Db_Success'), {
|
|
367
371
|
duration: 3000
|
|
368
372
|
});
|
|
369
373
|
|
|
@@ -407,7 +411,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
407
411
|
break;
|
|
408
412
|
}
|
|
409
413
|
|
|
410
|
-
_toast["default"].Error((0, _getLocale.getLocale)(
|
|
414
|
+
_toast["default"].Error((0, _getLocale.getLocale)('OKR_MyO_Pop_Targetname'), {
|
|
411
415
|
canClose: false
|
|
412
416
|
});
|
|
413
417
|
|
|
@@ -419,7 +423,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
419
423
|
break;
|
|
420
424
|
}
|
|
421
425
|
|
|
422
|
-
_toast["default"].Error(
|
|
426
|
+
_toast["default"].Error('目标名称不能超过500字', {
|
|
423
427
|
canClose: false
|
|
424
428
|
});
|
|
425
429
|
|
|
@@ -431,7 +435,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
431
435
|
break;
|
|
432
436
|
}
|
|
433
437
|
|
|
434
|
-
_toast["default"].Error(
|
|
438
|
+
_toast["default"].Error('关键成果不能为空', {
|
|
435
439
|
canClose: false
|
|
436
440
|
});
|
|
437
441
|
|
|
@@ -448,7 +452,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
448
452
|
break;
|
|
449
453
|
}
|
|
450
454
|
|
|
451
|
-
_toast["default"].Error(
|
|
455
|
+
_toast["default"].Error('关键成果不能超过500字', {
|
|
452
456
|
canClose: false
|
|
453
457
|
});
|
|
454
458
|
|
|
@@ -462,7 +466,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
462
466
|
break;
|
|
463
467
|
}
|
|
464
468
|
|
|
465
|
-
_toast["default"].Error((0, _getLocale.getLocale)(
|
|
469
|
+
_toast["default"].Error((0, _getLocale.getLocale)('OKR_MyO_Pop_Totalkrnot100'), {
|
|
466
470
|
canClose: false
|
|
467
471
|
});
|
|
468
472
|
|
|
@@ -480,7 +484,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
480
484
|
handleCreatedClose();
|
|
481
485
|
visibilityArea = formatVisiableLimit();
|
|
482
486
|
_context.next = 24;
|
|
483
|
-
return (0, _requestApi.createWidthKr)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
487
|
+
return (0, _requestApi.createWidthKr)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
484
488
|
krInfos: krDatas.map(function (kr) {
|
|
485
489
|
return _objectSpread(_objectSpread({}, kr), {}, {
|
|
486
490
|
startDate: cycle.startDate,
|
|
@@ -492,14 +496,16 @@ function CreateOkrModal(_ref, ref) {
|
|
|
492
496
|
}, parent), {}, {
|
|
493
497
|
workType: 6,
|
|
494
498
|
visibility: visibility,
|
|
495
|
-
okrClassify: openClassify ? okrClassify :
|
|
496
|
-
okrType: openOkrType ? type.typeId :
|
|
499
|
+
okrClassify: openClassify ? okrClassify : '',
|
|
500
|
+
okrType: openOkrType ? type.typeId : ''
|
|
497
501
|
}, dept), team), {}, {
|
|
498
502
|
workRoles: [{
|
|
499
503
|
roleType: 1,
|
|
500
504
|
models: [user]
|
|
501
505
|
}]
|
|
502
|
-
}, visibilityArea)
|
|
506
|
+
}, visibilityArea), {}, {
|
|
507
|
+
CreateFromAssess: isFromAssess
|
|
508
|
+
}));
|
|
503
509
|
|
|
504
510
|
case 24:
|
|
505
511
|
data = _context.sent;
|
|
@@ -509,7 +515,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
509
515
|
break;
|
|
510
516
|
}
|
|
511
517
|
|
|
512
|
-
_toast["default"].Error(
|
|
518
|
+
_toast["default"].Error('创建失败,请重试', {
|
|
513
519
|
canClose: false
|
|
514
520
|
});
|
|
515
521
|
|
|
@@ -524,7 +530,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
524
530
|
krTotalLength = 0;
|
|
525
531
|
krDatas && krDatas.forEach(function (kr) {
|
|
526
532
|
// 计算平均长度要去掉百分号和数字
|
|
527
|
-
krTotalLength += kr.mileStoneName.replace(/(%|\d)/g,
|
|
533
|
+
krTotalLength += kr.mileStoneName.replace(/(%|\d)/g, '').length;
|
|
528
534
|
});
|
|
529
535
|
krAvarageLength = krDatas.length > 0 ? krTotalLength / krDatas.length : 0;
|
|
530
536
|
krMeasurableLength = krsCheckResult.friendlyResult.filter(function (kr) {
|
|
@@ -532,13 +538,13 @@ function CreateOkrModal(_ref, ref) {
|
|
|
532
538
|
}).length;
|
|
533
539
|
oHasVtWords = oNameCheckResult[0].result === _okrCreateSuggest.EOkrCreateSuggestResultType.correct;
|
|
534
540
|
callData = data;
|
|
535
|
-
callData.countSurpassPercentage = (0, _getCreateOkrSurpassPercent["default"])(okrName.replace(/(%|\d)/g,
|
|
541
|
+
callData.countSurpassPercentage = (0, _getCreateOkrSurpassPercent["default"])(okrName.replace(/(%|\d)/g, '').length, oHasVtWords, krNum, krMeasurableLength, Number.parseInt(krAvarageLength.toString()));
|
|
536
542
|
newOkrDataRef.current = callData;
|
|
537
543
|
handleOnSuccess();
|
|
538
544
|
} else {
|
|
539
545
|
workId = data.workId;
|
|
540
546
|
|
|
541
|
-
_drawerManager["default"].open(
|
|
547
|
+
_drawerManager["default"].open('okrDetail', {
|
|
542
548
|
okrId: workId
|
|
543
549
|
});
|
|
544
550
|
}
|
|
@@ -586,10 +592,10 @@ function CreateOkrModal(_ref, ref) {
|
|
|
586
592
|
principalName: Name,
|
|
587
593
|
userAvatar: UserAvatar,
|
|
588
594
|
krWeight: 100,
|
|
589
|
-
mileStoneName:
|
|
595
|
+
mileStoneName: '',
|
|
590
596
|
confidenceIndex: 5
|
|
591
597
|
}]);
|
|
592
|
-
setOkrName(
|
|
598
|
+
setOkrName('');
|
|
593
599
|
setUser({
|
|
594
600
|
name: Name,
|
|
595
601
|
id: Id,
|
|
@@ -598,10 +604,10 @@ function CreateOkrModal(_ref, ref) {
|
|
|
598
604
|
setIsCustomWeight(false);
|
|
599
605
|
setDept({
|
|
600
606
|
departmentId: 0,
|
|
601
|
-
departmentName:
|
|
607
|
+
departmentName: ''
|
|
602
608
|
});
|
|
603
609
|
setType({
|
|
604
|
-
typeName: (0, _getLocale.getLocale)(
|
|
610
|
+
typeName: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
|
|
605
611
|
typeId: 1
|
|
606
612
|
});
|
|
607
613
|
setCycle(cycle);
|
|
@@ -609,7 +615,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
609
615
|
setVisibility(1);
|
|
610
616
|
setParent({
|
|
611
617
|
parentWorkId: 0,
|
|
612
|
-
parentWorkName:
|
|
618
|
+
parentWorkName: '',
|
|
613
619
|
parentType: 0,
|
|
614
620
|
parentKrId: 0
|
|
615
621
|
});
|
|
@@ -723,7 +729,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
723
729
|
var ModalTitle = (0, _react.useMemo)(function () {
|
|
724
730
|
return /*#__PURE__*/_react["default"].createElement(_style.Line, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
725
731
|
className: "create-modal__title"
|
|
726
|
-
}, (0, _getLocale.getLocale)(
|
|
732
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Title_Newobjective')), /*#__PURE__*/_react["default"].createElement(_okrCase["default"], {
|
|
727
733
|
okrTemplateEnabled: true,
|
|
728
734
|
onOkrApply: OnOkRApplyTplHandler
|
|
729
735
|
}));
|
|
@@ -765,7 +771,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
765
771
|
|
|
766
772
|
setShowCreatedSuccessInfo(false);
|
|
767
773
|
|
|
768
|
-
_drawerManager["default"].open(
|
|
774
|
+
_drawerManager["default"].open('okrDetail', {
|
|
769
775
|
okrId: workId
|
|
770
776
|
});
|
|
771
777
|
|
|
@@ -784,10 +790,10 @@ function CreateOkrModal(_ref, ref) {
|
|
|
784
790
|
|
|
785
791
|
var trackAction = function trackAction() {
|
|
786
792
|
// @ts-ignore
|
|
787
|
-
window.titaTracker && window.titaTracker(
|
|
788
|
-
actionName:
|
|
789
|
-
actionGroup: (0, _getLocale.getLocale)(
|
|
790
|
-
productName: (0, _getLocale.getLocale)(
|
|
793
|
+
window.titaTracker && window.titaTracker('action').record({
|
|
794
|
+
actionName: '点击【教你写OKR】',
|
|
795
|
+
actionGroup: (0, _getLocale.getLocale)('OKR_MyO_Collr_Butt_CreatOKR'),
|
|
796
|
+
productName: (0, _getLocale.getLocale)('Menu_Title_OKRs')
|
|
791
797
|
});
|
|
792
798
|
};
|
|
793
799
|
|
|
@@ -797,7 +803,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
797
803
|
}
|
|
798
804
|
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
799
805
|
className: "teact-write-okr",
|
|
800
|
-
href: (0, _helpers.isDingDing)() ?
|
|
806
|
+
href: (0, _helpers.isDingDing)() ? 'https://wiki.tita.com/pages/viewpage.action?pageId=15696093' : 'https://docs.tita.com/question/okr-write/',
|
|
801
807
|
target: "_blank",
|
|
802
808
|
onClick: trackAction,
|
|
803
809
|
rel: "noreferrer"
|
|
@@ -806,7 +812,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
806
812
|
src: _teachOkr["default"]
|
|
807
813
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
808
814
|
className: "teact-write-okr__text"
|
|
809
|
-
}, (0, _getLocale.getLocale)(
|
|
815
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_TeachwriteOKR')));
|
|
810
816
|
}, []);
|
|
811
817
|
(0, _react.useEffect)(function () {
|
|
812
818
|
// @ts-ignore
|
|
@@ -820,8 +826,8 @@ function CreateOkrModal(_ref, ref) {
|
|
|
820
826
|
mask: true,
|
|
821
827
|
centered: true,
|
|
822
828
|
onOk: onModalOkHandler,
|
|
823
|
-
okText: (0, _getLocale.getLocale)(
|
|
824
|
-
cancelText: (0, _getLocale.getLocale)(
|
|
829
|
+
okText: (0, _getLocale.getLocale)('OKR_MyO_Pop_Createnow'),
|
|
830
|
+
cancelText: (0, _getLocale.getLocale)('Mod_Cancel'),
|
|
825
831
|
title: ModalTitle,
|
|
826
832
|
visible: isVisible,
|
|
827
833
|
onCancel: hideCreateOkrModal,
|
|
@@ -829,7 +835,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
829
835
|
footerLeftContent: renderFooterTeachWriteOKr,
|
|
830
836
|
zIndex: 1200,
|
|
831
837
|
bodyStyle: {
|
|
832
|
-
flexBasis:
|
|
838
|
+
flexBasis: 'auto'
|
|
833
839
|
}
|
|
834
840
|
}, /*#__PURE__*/_react["default"].createElement(_style.Wrapper, {
|
|
835
841
|
ref: wrapperRef
|
|
@@ -857,7 +863,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
857
863
|
setIsInputContent: setIsInputContent
|
|
858
864
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
859
865
|
className: "create-modal__title-line"
|
|
860
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.BlueBar, null), (0, _getLocale.getLocale)(
|
|
866
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.BlueBar, null), (0, _getLocale.getLocale)('Per_Ass_New_Appr_detail_moreS')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
861
867
|
className: "space-between-row"
|
|
862
868
|
}, /*#__PURE__*/_react["default"].createElement(_okrParent["default"], {
|
|
863
869
|
parent: parent,
|
|
@@ -46,7 +46,7 @@ var createWidthKr = /*#__PURE__*/function () {
|
|
|
46
46
|
while (1) {
|
|
47
47
|
switch (_context.prev = _context.next) {
|
|
48
48
|
case 0:
|
|
49
|
-
url = "".concat(requestDomain(), "/api/
|
|
49
|
+
url = "".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/createWithKr");
|
|
50
50
|
_context.next = 3;
|
|
51
51
|
return _axios["default"].post(url, _objectSpread({
|
|
52
52
|
workType: 6
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
|
|
34
34
|
.titaui-dialog-confirm__btn-cancel {
|
|
35
35
|
background: #ffffff;
|
|
36
|
-
border: 1px solid #dfe3ea;
|
|
36
|
+
border: 1px solid #dfe3ea !important;
|
|
37
37
|
color: #6f7886;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.titaui-dialog-confirm__btn-cancel:hover {
|
|
41
41
|
color: #2879ff;
|
|
42
|
-
border: 1px solid #2879ff;
|
|
42
|
+
border: 1px solid #2879ff !important;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.titaui-dialog-confirm__btn-cancel-text {
|
|
@@ -49,7 +49,9 @@ function HeaderAction(_ref) {
|
|
|
49
49
|
_onClick = _ref.onClick,
|
|
50
50
|
className = _ref.className,
|
|
51
51
|
title = _ref.title,
|
|
52
|
-
children = _ref.children
|
|
52
|
+
children = _ref.children,
|
|
53
|
+
approvalSetting = _ref.approvalSetting,
|
|
54
|
+
detailInfo = _ref.detailInfo;
|
|
53
55
|
|
|
54
56
|
var _useState = (0, _react.useState)(false),
|
|
55
57
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -99,6 +101,8 @@ function HeaderAction(_ref) {
|
|
|
99
101
|
if (children && children.length > 0) {
|
|
100
102
|
content = /*#__PURE__*/_react["default"].createElement(_headerDrop["default"], {
|
|
101
103
|
visible: dropVisible,
|
|
104
|
+
detailInfo: detailInfo,
|
|
105
|
+
approvalSetting: approvalSetting,
|
|
102
106
|
onVisibleChange: function onVisibleChange(visible) {
|
|
103
107
|
active.current = visible;
|
|
104
108
|
!visible && setDropVisible(false);
|
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _helper = require("../okr-detail/helper");
|
|
13
|
+
|
|
12
14
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -44,7 +46,9 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
44
46
|
colorInDrop = _ref.colorInDrop,
|
|
45
47
|
hoverColorInDrop = _ref.hoverColorInDrop,
|
|
46
48
|
_onClick = _ref.onClick,
|
|
47
|
-
onClose = _ref.onClose
|
|
49
|
+
onClose = _ref.onClose,
|
|
50
|
+
approvalSetting = _ref.approvalSetting,
|
|
51
|
+
detailInfo = _ref.detailInfo;
|
|
48
52
|
|
|
49
53
|
var _useState = (0, _react.useState)(false),
|
|
50
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -52,7 +56,37 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
52
56
|
setHover = _useState2[1];
|
|
53
57
|
|
|
54
58
|
var hasIcon = !!icon && typeof icon === "string";
|
|
55
|
-
|
|
59
|
+
var applyState = detailInfo === null || detailInfo === void 0 ? void 0 : detailInfo.applyState;
|
|
60
|
+
var OkrAndKrApprovalTypes = detailInfo === null || detailInfo === void 0 ? void 0 : detailInfo.OkrAndKrApprovalTypes;
|
|
61
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, icon === 'tu-icon-del' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _helper.getApprovalOkr)(approvalSetting, 'deleteOkr', applyState, OkrAndKrApprovalTypes) ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
|
+
className: "header-drop-item",
|
|
63
|
+
style: {
|
|
64
|
+
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
65
|
+
},
|
|
66
|
+
onClick: function onClick(e) {
|
|
67
|
+
_onClick && _onClick(e);
|
|
68
|
+
onClose(false);
|
|
69
|
+
},
|
|
70
|
+
onMouseOver: function onMouseOver() {
|
|
71
|
+
return setHover(true);
|
|
72
|
+
},
|
|
73
|
+
onMouseOut: function onMouseOut() {
|
|
74
|
+
return setHover(false);
|
|
75
|
+
}
|
|
76
|
+
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
|
+
className: "header-drop-item-icon",
|
|
78
|
+
style: {
|
|
79
|
+
color: hover ? hoverIconColorInDrop || hoverColorInDrop || hoverColor : iconColorInDrop || colorInDrop || color
|
|
80
|
+
}
|
|
81
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
|
+
className: icon
|
|
83
|
+
}) : icon), title) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
+
className: "header-drop-item-approval"
|
|
85
|
+
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
+
className: "header-drop-item-icon"
|
|
87
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
88
|
+
className: icon
|
|
89
|
+
}) : icon), title)) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
90
|
className: "header-drop-item",
|
|
57
91
|
style: {
|
|
58
92
|
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
@@ -74,19 +108,23 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
74
108
|
}
|
|
75
109
|
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
110
|
className: icon
|
|
77
|
-
}) : icon), title);
|
|
111
|
+
}) : icon), title));
|
|
78
112
|
};
|
|
79
113
|
|
|
80
114
|
var HeaderDrop = function HeaderDrop(_ref2) {
|
|
81
115
|
var visible = _ref2.visible,
|
|
82
116
|
onVisibleChange = _ref2.onVisibleChange,
|
|
83
117
|
items = _ref2.items,
|
|
84
|
-
children = _ref2.children
|
|
118
|
+
children = _ref2.children,
|
|
119
|
+
approvalSetting = _ref2.approvalSetting,
|
|
120
|
+
detailInfo = _ref2.detailInfo;
|
|
85
121
|
var renderDrop = (0, _react.useMemo)(function () {
|
|
86
122
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
123
|
className: "titaui-drawer-header-action-drop-wrapper"
|
|
88
124
|
}, items.map(function (item) {
|
|
89
125
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropItem, _extends({}, item, {
|
|
126
|
+
detailInfo: detailInfo,
|
|
127
|
+
approvalSetting: approvalSetting,
|
|
90
128
|
onClose: function onClose() {
|
|
91
129
|
return onVisibleChange(false);
|
|
92
130
|
}
|
|
@@ -164,6 +164,39 @@
|
|
|
164
164
|
background-repeat: no-repeat;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval {
|
|
168
|
+
height: 32px;
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
padding: 0 23px;
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
color: #BFC7D5;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon {
|
|
177
|
+
font-size: 18px;
|
|
178
|
+
color: inherit;
|
|
179
|
+
width: 18px;
|
|
180
|
+
height: 18px;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
margin-right: 10px;
|
|
183
|
+
background-size: contain;
|
|
184
|
+
background-position: center center;
|
|
185
|
+
background-repeat: no-repeat;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon > span {
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
color: inherit;
|
|
193
|
+
width: 18px;
|
|
194
|
+
height: 18px;
|
|
195
|
+
background-size: contain;
|
|
196
|
+
background-position: center center;
|
|
197
|
+
background-repeat: no-repeat;
|
|
198
|
+
}
|
|
199
|
+
|
|
167
200
|
.drawer-left .drawer-content-wrapper,
|
|
168
201
|
.drawer-right .drawer-content-wrapper,
|
|
169
202
|
.drawer-left .drawer-content,
|