@titaui/pc 1.12.0-beta.1 → 1.12.0-beta.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/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/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 +3 -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 +85 -0
- package/lib/components/contact-kefu/index.js +102 -0
- package/lib/components/create-okr-modal/index.js +45 -41
- 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/new-ui.css +4 -4
- package/lib/components/dynamic/online-broadcast/data.js +19 -1
- 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 +6 -2
- 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/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/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/radio/index.css +3 -3
- package/lib/components/survey-model/index.js +3 -0
- package/lib/components/task-relation-modal/index.js +0 -1
- package/lib/components/task-relation-modal/request-api.js +2 -1
- 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-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/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 +48 -17
- package/lib/components/user-selector/images/no-auth.png +0 -0
- package/lib/components/user-selector/searched-panel/index.js +1 -0
- 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/package.json +1 -1
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
- package/lib/components/task-tree/mock.js +0 -944
|
@@ -43,7 +43,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
43
43
|
|
|
44
44
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
45
45
|
|
|
46
|
-
var RadioWrapper = _styledComponents["default"].label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n color: #36434d;\n margin-right: 15px;\n box-sizing: border-box;\n display: flex;\n\n .label {\n position: relative;\n user-select: none;\n top: -2px;\n }\n"])));
|
|
46
|
+
var RadioWrapper = _styledComponents["default"].label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n color: #36434d;\n margin-right: 15px;\n box-sizing: border-box;\n display: inline-flex;\n\n .label {\n position: relative;\n user-select: none;\n top: -2px;\n }\n"])));
|
|
47
47
|
|
|
48
48
|
var Radio = /*#__PURE__*/function (_Component) {
|
|
49
49
|
_inherits(Radio, _Component);
|
package/lib/index.js
CHANGED
|
@@ -51,18 +51,36 @@ Object.defineProperty(exports, "Communication", {
|
|
|
51
51
|
return _communication["default"];
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "ConditionRender", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _conditionRender["default"];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
54
60
|
Object.defineProperty(exports, "Confidence", {
|
|
55
61
|
enumerable: true,
|
|
56
62
|
get: function get() {
|
|
57
63
|
return _confidence["default"];
|
|
58
64
|
}
|
|
59
65
|
});
|
|
66
|
+
Object.defineProperty(exports, "ContactKefu", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function get() {
|
|
69
|
+
return _contactKefu["default"];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
60
72
|
Object.defineProperty(exports, "CreateOkrModal", {
|
|
61
73
|
enumerable: true,
|
|
62
74
|
get: function get() {
|
|
63
75
|
return _createOkrModal["default"];
|
|
64
76
|
}
|
|
65
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "DangerousHtml", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function get() {
|
|
81
|
+
return _dangerousHtml["default"];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
66
84
|
Object.defineProperty(exports, "DatePicker", {
|
|
67
85
|
enumerable: true,
|
|
68
86
|
get: function get() {
|
|
@@ -159,6 +177,12 @@ Object.defineProperty(exports, "Form", {
|
|
|
159
177
|
return _form["default"];
|
|
160
178
|
}
|
|
161
179
|
});
|
|
180
|
+
Object.defineProperty(exports, "FormatTime", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function get() {
|
|
183
|
+
return _formatTime["default"];
|
|
184
|
+
}
|
|
185
|
+
});
|
|
162
186
|
Object.defineProperty(exports, "GridLayout", {
|
|
163
187
|
enumerable: true,
|
|
164
188
|
get: function get() {
|
|
@@ -375,6 +399,12 @@ Object.defineProperty(exports, "Progress", {
|
|
|
375
399
|
return _progress["default"];
|
|
376
400
|
}
|
|
377
401
|
});
|
|
402
|
+
Object.defineProperty(exports, "PublishDynamicModal", {
|
|
403
|
+
enumerable: true,
|
|
404
|
+
get: function get() {
|
|
405
|
+
return _publishDynamicModal["default"];
|
|
406
|
+
}
|
|
407
|
+
});
|
|
378
408
|
Object.defineProperty(exports, "Radio", {
|
|
379
409
|
enumerable: true,
|
|
380
410
|
get: function get() {
|
|
@@ -477,6 +507,12 @@ Object.defineProperty(exports, "TaskRelationModal", {
|
|
|
477
507
|
return _taskRelationModal["default"];
|
|
478
508
|
}
|
|
479
509
|
});
|
|
510
|
+
Object.defineProperty(exports, "Textarea", {
|
|
511
|
+
enumerable: true,
|
|
512
|
+
get: function get() {
|
|
513
|
+
return _textarea["default"];
|
|
514
|
+
}
|
|
515
|
+
});
|
|
480
516
|
Object.defineProperty(exports, "TitaChart", {
|
|
481
517
|
enumerable: true,
|
|
482
518
|
get: function get() {
|
|
@@ -602,6 +638,10 @@ var _button = _interopRequireDefault(require("./components/button"));
|
|
|
602
638
|
|
|
603
639
|
var _bookDemo = _interopRequireDefault(require("./components/book-demo"));
|
|
604
640
|
|
|
641
|
+
var _conditionRender = _interopRequireDefault(require("./components/condition-render"));
|
|
642
|
+
|
|
643
|
+
var _contactKefu = _interopRequireDefault(require("./components/contact-kefu"));
|
|
644
|
+
|
|
605
645
|
var _confidence = _interopRequireDefault(require("./components/confidence"));
|
|
606
646
|
|
|
607
647
|
var _communication = _interopRequireDefault(require("./components/communication"));
|
|
@@ -616,6 +656,8 @@ var _createOkrModal = _interopRequireDefault(require("./components/create-okr-mo
|
|
|
616
656
|
|
|
617
657
|
var _dialog = _interopRequireDefault(require("./components/dialog"));
|
|
618
658
|
|
|
659
|
+
var _dangerousHtml = _interopRequireDefault(require("./components/dangerous-html"));
|
|
660
|
+
|
|
619
661
|
var _datePicker = _interopRequireDefault(require("./components/date-picker"));
|
|
620
662
|
|
|
621
663
|
var _demoFree = _interopRequireDefault(require("./pages/demo-free"));
|
|
@@ -642,6 +684,8 @@ var _errorBoundary = _interopRequireDefault(require("./components/error-boundary
|
|
|
642
684
|
|
|
643
685
|
var _errorLevel = _interopRequireDefault(require("./utils/error-level"));
|
|
644
686
|
|
|
687
|
+
var _formatTime = _interopRequireDefault(require("./utils/format-time"));
|
|
688
|
+
|
|
645
689
|
var _fileList = _interopRequireDefault(require("./components/file-list"));
|
|
646
690
|
|
|
647
691
|
var _firework = _interopRequireDefault(require("./components/firework"));
|
|
@@ -714,6 +758,8 @@ var _periodSelector = _interopRequireDefault(require("./components/period-select
|
|
|
714
758
|
|
|
715
759
|
var _pagination = _interopRequireDefault(require("./components/pagination"));
|
|
716
760
|
|
|
761
|
+
var _publishDynamicModal = _interopRequireDefault(require("./components/publish-dynamic-modal"));
|
|
762
|
+
|
|
717
763
|
var _passwordInput = _interopRequireDefault(require("./components/password-input"));
|
|
718
764
|
|
|
719
765
|
var _photoCard = _interopRequireDefault(require("./components/photo-card"));
|
|
@@ -768,6 +814,8 @@ var _titaChart = _interopRequireDefault(require("./components/tita-chart"));
|
|
|
768
814
|
|
|
769
815
|
var _tooltip = _interopRequireDefault(require("./components/tooltip"));
|
|
770
816
|
|
|
817
|
+
var _textarea = _interopRequireDefault(require("./components/textarea"));
|
|
818
|
+
|
|
771
819
|
var _tooltipText = _interopRequireDefault(require("./components/tooltip/tooltip-text"));
|
|
772
820
|
|
|
773
821
|
var _userSelector = _interopRequireDefault(require("./components/user-selector"));
|
|
@@ -18,31 +18,13 @@
|
|
|
18
18
|
z-index: 3;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.titaui-aha-2021__invite
|
|
21
|
+
.titaui-aha-2021__invite {
|
|
22
22
|
position: absolute;
|
|
23
23
|
bottom: 74px;
|
|
24
24
|
right: 24px;
|
|
25
25
|
z-index: 2;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.titaui-aha-2021__try-kefu {
|
|
29
|
-
position: absolute;
|
|
30
|
-
bottom: 134px;
|
|
31
|
-
right: 24px;
|
|
32
|
-
z-index: 2;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.titaui-aha-2021__kefu {
|
|
36
|
-
width: 42px;
|
|
37
|
-
height: 42px;
|
|
38
|
-
background: url("./img/kefu.svg") no-repeat;
|
|
39
|
-
background-color: #fff;
|
|
40
|
-
background-size: 42px;
|
|
41
|
-
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
42
|
-
cursor: pointer;
|
|
43
|
-
border-radius: 50%;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
28
|
.titaui-aha-2021__notice {
|
|
47
29
|
width: 42px;
|
|
48
30
|
height: 42px;
|
|
@@ -96,13 +78,6 @@
|
|
|
96
78
|
background-image: none;
|
|
97
79
|
}
|
|
98
80
|
|
|
99
|
-
.titaui-aha-2021__cancel {
|
|
100
|
-
height: 100%;
|
|
101
|
-
background: url("./img/canceled.svg") 50% 50% no-repeat;
|
|
102
|
-
animation-duration: 0.3s;
|
|
103
|
-
animation-name: kefuActive;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
81
|
.titaui-aha-2021__popup {
|
|
107
82
|
width: 332px;
|
|
108
83
|
height: 376px;
|
|
@@ -11,9 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var _popup = _interopRequireDefault(require("../../components/popup"));
|
|
14
|
+
var _contactKefu = _interopRequireDefault(require("../../components/contact-kefu"));
|
|
17
15
|
|
|
18
16
|
var _navTop = _interopRequireDefault(require("../../components/nav-top"));
|
|
19
17
|
|
|
@@ -39,10 +37,6 @@ var _errorBoundary = _interopRequireDefault(require("../../components/error-boun
|
|
|
39
37
|
|
|
40
38
|
var _errorLevel = _interopRequireDefault(require("../../utils/error-level"));
|
|
41
39
|
|
|
42
|
-
var _notTry = _interopRequireDefault(require("./img/not-try.png"));
|
|
43
|
-
|
|
44
|
-
var _try = _interopRequireDefault(require("./img/try.png"));
|
|
45
|
-
|
|
46
40
|
require("./index.css");
|
|
47
41
|
|
|
48
42
|
var _hooks = _interopRequireDefault(require("../../utils/hooks"));
|
|
@@ -53,20 +47,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
53
47
|
|
|
54
48
|
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; }
|
|
55
49
|
|
|
56
|
-
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; }
|
|
57
|
-
|
|
58
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
59
|
-
|
|
60
|
-
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."); }
|
|
61
|
-
|
|
62
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
63
|
-
|
|
64
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
65
|
-
|
|
66
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
67
|
-
|
|
68
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
69
|
-
|
|
70
50
|
var preCls = "titaui-aha-2021";
|
|
71
51
|
|
|
72
52
|
function ContentTemplate(props) {
|
|
@@ -92,30 +72,9 @@ function ContentTemplate(props) {
|
|
|
92
72
|
|
|
93
73
|
function PageLayout(props) {
|
|
94
74
|
var children = props.children;
|
|
95
|
-
|
|
96
|
-
var _useState = (0, _react.useState)(false),
|
|
97
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
98
|
-
visible = _useState2[0],
|
|
99
|
-
setVisible = _useState2[1];
|
|
100
|
-
|
|
101
75
|
var hideNavTop = (0, _hooks["default"])("hideNavTop");
|
|
102
|
-
|
|
103
|
-
var handleShowCode = function handleShowCode() {
|
|
104
|
-
setVisible(true);
|
|
105
|
-
};
|
|
106
|
-
|
|
107
76
|
var isTrial = window.BSGlobal.tenantAuthentication.Version === 1 && (0, _platform.isOfficialSite)();
|
|
108
|
-
var isTencentHr = window.BSGlobal.tenantInfo.Source === 964;
|
|
109
|
-
// const kefuUrl = isTrial
|
|
110
|
-
// ? 'https://wpa1.qq.com/vZYKN3kT?_type=wpa&qidian=true'
|
|
111
|
-
// : 'https://wpa1.qq.com/o6X4XD1n?_type=wpa&qidian=true'
|
|
112
|
-
// window.open(kefuUrl)
|
|
113
|
-
// }
|
|
114
|
-
// const onClickNotice = () => {
|
|
115
|
-
// let domain = `//${location.host}/u/${window.BSGlobal.loginUserInfo.Id}/Home`;
|
|
116
|
-
// let hash = `#more/messages?messageType=1&isRead=2&messageSubNav=1`
|
|
117
|
-
// window.open(domain + hash);
|
|
118
|
-
// };
|
|
77
|
+
var isTencentHr = window.BSGlobal.tenantInfo.Source === 964;
|
|
119
78
|
|
|
120
79
|
var getBookDemoVersion = function getBookDemoVersion() {
|
|
121
80
|
var menuVersion = window.BSGlobal.tenantAuthentication.MenuVersion;
|
|
@@ -131,18 +90,6 @@ function PageLayout(props) {
|
|
|
131
90
|
return _bookDemo["default"].DemoType.UniversalBookDemo;
|
|
132
91
|
};
|
|
133
92
|
|
|
134
|
-
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
135
|
-
className: "".concat(preCls, "__popup")
|
|
136
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
137
|
-
className: "".concat(preCls, "__popup-title")
|
|
138
|
-
}, "\u5FAE\u4FE1/\u4F01\u4E1A\u5FAE\u4FE1\u626B\u4E00\u626B"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
|
-
className: "".concat(preCls, "__popup-content")
|
|
140
|
-
}, "\u4E13\u5C5E\u5BA2\u670D\u4E3A\u4F60\u63D0\u4F9B\u54A8\u8BE2\u670D\u52A1"), /*#__PURE__*/_react["default"].createElement("img", {
|
|
141
|
-
src: isTrial ? _try["default"] : _notTry["default"],
|
|
142
|
-
className: "".concat(preCls, "__popup-img"),
|
|
143
|
-
alt: "\u5FAE\u4FE1\u626B\u7801"
|
|
144
|
-
}));
|
|
145
|
-
|
|
146
93
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
147
94
|
className: (0, _classnames["default"])(preCls)
|
|
148
95
|
}, hideNavTop !== "true" && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -156,33 +103,7 @@ function PageLayout(props) {
|
|
|
156
103
|
}
|
|
157
104
|
}, children), !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
|
|
158
105
|
className: (0, _classnames["default"])("".concat(preCls, "__help"))
|
|
159
|
-
}, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)), !isTencentHr && !(0, _helpers.isDingDing)() && !(0, _helpers.isFeishu)() && /*#__PURE__*/_react["default"].createElement(
|
|
160
|
-
popup: popup,
|
|
161
|
-
popupTransitionName: "tita-popup-zoom-left-bottom",
|
|
162
|
-
placement: "topLeft",
|
|
163
|
-
popupAlign: {
|
|
164
|
-
offset: [-32, -10],
|
|
165
|
-
overflow: {
|
|
166
|
-
adjustX: 1,
|
|
167
|
-
adjustY: 1
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
popupVisible: visible,
|
|
171
|
-
onPopupVisibleChange: function onPopupVisibleChange(bol) {
|
|
172
|
-
return setVisible(bol);
|
|
173
|
-
}
|
|
174
|
-
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
175
|
-
overlay: "\u8054\u7CFB\u5BA2\u670D",
|
|
176
|
-
placement: "right",
|
|
177
|
-
align: {
|
|
178
|
-
offset: [0, 0]
|
|
179
|
-
}
|
|
180
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
181
|
-
className: (0, _classnames["default"])("".concat(preCls, "__kefu"), _defineProperty({}, "".concat(preCls, "__try-kefu"), isTrial), _defineProperty({}, "".concat(preCls, "__hidden"), visible)),
|
|
182
|
-
onClick: handleShowCode
|
|
183
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
184
|
-
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__cancel"), visible))
|
|
185
|
-
})))), isTrial && !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
|
+
}, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)), !isTencentHr && !(0, _helpers.isDingDing)() && !(0, _helpers.isFeishu)() && /*#__PURE__*/_react["default"].createElement(_contactKefu["default"], null), isTrial && !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
|
|
186
107
|
className: "".concat(preCls, "__invite")
|
|
187
108
|
}, /*#__PURE__*/_react["default"].createElement(_invitePeople["default"], null)), isTencentHr && /*#__PURE__*/_react["default"].createElement(_hrMessage["default"], null), /*#__PURE__*/_react["default"].createElement(_errorBoundary["default"], {
|
|
188
109
|
errorLevel: _errorLevel["default"].P0,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formatPeriod = void 0;
|
|
7
|
+
|
|
8
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
9
|
+
|
|
10
|
+
var _constant = require("../../../utils/constant");
|
|
11
|
+
|
|
12
|
+
var formatPeriod = function formatPeriod(selected) {
|
|
13
|
+
if (!selected) return "";
|
|
14
|
+
var quarter = ["", "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_1stQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_2ndQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_3rdQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_4thQuarter"))];
|
|
15
|
+
var cycleDate = "";
|
|
16
|
+
var annualNum = Number("".concat(selected.annualNum)) === -1 ? "".concat((0, _getLocale.getLocale)("OKR_MyO_Butt_Allyears")) : "".concat(selected.annualNum).concat(_getLocale.isEn ? "" : "年");
|
|
17
|
+
var month = (0, _constant.getMonth)();
|
|
18
|
+
|
|
19
|
+
switch ("".concat(selected.cycleType)) {
|
|
20
|
+
case "-1":
|
|
21
|
+
cycleDate = "".concat((0, _getLocale.getLocale)("OKR_MyO_Butt_AllStatee"));
|
|
22
|
+
break;
|
|
23
|
+
|
|
24
|
+
case "1":
|
|
25
|
+
cycleDate = "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Year"));
|
|
26
|
+
break;
|
|
27
|
+
|
|
28
|
+
case "2":
|
|
29
|
+
// 季度
|
|
30
|
+
cycleDate = quarter[Number(selected.yqmNum)];
|
|
31
|
+
break;
|
|
32
|
+
|
|
33
|
+
case "3":
|
|
34
|
+
cycleDate = month[Number(selected.yqmNum) - 1];
|
|
35
|
+
break;
|
|
36
|
+
|
|
37
|
+
case "4":
|
|
38
|
+
cycleDate = "".concat(month[Number(selected.yqmNum) - 1], " - ").concat(month[((Number(selected.yqmNum) + 1) % 12 || 12) - 1]);
|
|
39
|
+
break;
|
|
40
|
+
|
|
41
|
+
case "5":
|
|
42
|
+
cycleDate = Number("".concat(selected.yqmNum)) === 1 ? "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Firsthalf")) : "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Secondhalf"));
|
|
43
|
+
break;
|
|
44
|
+
|
|
45
|
+
default:
|
|
46
|
+
cycleDate = "".concat((0, _getLocale.getLocale)("Mod_Customization"));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return "".concat(annualNum, " ").concat(cycleDate);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.formatPeriod = formatPeriod;
|
|
@@ -36,6 +36,51 @@
|
|
|
36
36
|
color: #2879ff;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
.tita-okr-list-v2__header-record {
|
|
40
|
+
display: flex;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
align-items: center;
|
|
44
|
+
transform: rotate(90deg);
|
|
45
|
+
background: #fff;
|
|
46
|
+
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
47
|
+
width: 36px;
|
|
48
|
+
height: 36px;
|
|
49
|
+
margin-left: 12px;
|
|
50
|
+
border-radius: 18px;
|
|
51
|
+
font-size: 20px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.tita-okr-list-v2__header-record-popup {
|
|
56
|
+
padding: 16px 12px;
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
background: #ffffff;
|
|
59
|
+
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
60
|
+
border-radius: 12px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.tita-okr-list-v2__header-record-item {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
padding: 5px 8px;
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
font-size: 16px;
|
|
69
|
+
color: #3f4755;
|
|
70
|
+
line-height: 22px;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.tita-okr-list-v2__header-record-item:hover {
|
|
75
|
+
color: #2879ff;
|
|
76
|
+
background: #f7f8fa;
|
|
77
|
+
border-radius: 8px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.tita-okr-list-v2__header-record-item-content {
|
|
81
|
+
margin-left: 8px;
|
|
82
|
+
}
|
|
83
|
+
|
|
39
84
|
.tita-okr-list-v2__header-filter {
|
|
40
85
|
box-sizing: border-box;
|
|
41
86
|
height: 36px;
|
|
@@ -29,12 +29,16 @@ var _filter = _interopRequireDefault(require("./filter"));
|
|
|
29
29
|
|
|
30
30
|
var _comments = _interopRequireDefault(require("./comments"));
|
|
31
31
|
|
|
32
|
+
var _operateRecord = _interopRequireDefault(require("./operate-record"));
|
|
33
|
+
|
|
32
34
|
var _context = require("../context");
|
|
33
35
|
|
|
34
36
|
var _requestApi = require("../request-api");
|
|
35
37
|
|
|
36
38
|
var _getLocale = require("../../../utils/getLocale");
|
|
37
39
|
|
|
40
|
+
var _tools = require("../../../utils/tools");
|
|
41
|
+
|
|
38
42
|
require("./index.css");
|
|
39
43
|
|
|
40
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -65,6 +69,7 @@ function Header(props, ref) {
|
|
|
65
69
|
cycleType = _useContext.cycleType,
|
|
66
70
|
yqmNum = _useContext.yqmNum;
|
|
67
71
|
|
|
72
|
+
var relationShip = parseInt(relation, 10);
|
|
68
73
|
var onSearch = props.onSearch,
|
|
69
74
|
onFrontAddOKR = props.onFrontAddOKR;
|
|
70
75
|
|
|
@@ -84,21 +89,26 @@ function Header(props, ref) {
|
|
|
84
89
|
setUserInfo = _useState6[1];
|
|
85
90
|
|
|
86
91
|
(0, _react.useEffect)(function () {
|
|
87
|
-
if (toUserId !== undefined ||
|
|
92
|
+
if (toUserId !== undefined || relationShip === 1) {
|
|
88
93
|
var userId = toUserId;
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
if (relationShip === 1) userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
95
|
+
|
|
96
|
+
if (userId) {
|
|
97
|
+
(0, _requestApi.getUserInfoById)(userId).then(function (res) {
|
|
98
|
+
setUserInfo(res.Data);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
93
101
|
}
|
|
94
102
|
}, [toUserId, relation]);
|
|
95
103
|
(0, _react.useEffect)(function () {
|
|
96
104
|
setInit(true);
|
|
97
105
|
}, []);
|
|
98
106
|
(0, _react.useEffect)(function () {
|
|
99
|
-
init
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
if (init) {
|
|
108
|
+
onSearch({
|
|
109
|
+
onlyThisDept: onlyThisDept
|
|
110
|
+
});
|
|
111
|
+
}
|
|
102
112
|
}, [onlyThisDept]);
|
|
103
113
|
var createOkrRef = (0, _react.useRef)();
|
|
104
114
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
@@ -125,7 +135,7 @@ function Header(props, ref) {
|
|
|
125
135
|
};
|
|
126
136
|
var searchType = "company";
|
|
127
137
|
|
|
128
|
-
if (departmentId && departmentId
|
|
138
|
+
if (departmentId && departmentId !== -1) {
|
|
129
139
|
rootNode.rootId = departmentId;
|
|
130
140
|
rootNode.rootName = departmentName || "";
|
|
131
141
|
searchType = "depart";
|
|
@@ -141,7 +151,7 @@ function Header(props, ref) {
|
|
|
141
151
|
level2Selected.name = userInfo.name || "";
|
|
142
152
|
}
|
|
143
153
|
|
|
144
|
-
if (relation
|
|
154
|
+
if (parseInt(relation, 10) === 1) {
|
|
145
155
|
rootNode.rootId = (0, _bsGlobal.getUserInfo)().Id;
|
|
146
156
|
rootNode.rootName = (0, _bsGlobal.getUserInfo)().Name || "";
|
|
147
157
|
searchType = "user";
|
|
@@ -154,18 +164,18 @@ function Header(props, ref) {
|
|
|
154
164
|
annualNum: annualNum,
|
|
155
165
|
yqmNum: yqmNum
|
|
156
166
|
})), "rootNode=".concat(JSON.stringify(rootNode)), "level2Selected=".concat(JSON.stringify(level2Selected))].join("&");
|
|
157
|
-
var origin = window.location.href.split(
|
|
167
|
+
var origin = window.location.href.split("#")[0];
|
|
158
168
|
window.location.href = "".concat(origin, "/#okr/map?").concat(urlQuery);
|
|
159
169
|
};
|
|
160
170
|
|
|
161
171
|
var getTitle = function getTitle() {
|
|
162
|
-
if (
|
|
172
|
+
if (relationShip === 1) {
|
|
163
173
|
return /*#__PURE__*/_react["default"].createElement(_userTitle["default"], {
|
|
164
174
|
toUserId: (0, _bsGlobal.getUserInfo)().Id
|
|
165
175
|
});
|
|
166
176
|
}
|
|
167
177
|
|
|
168
|
-
if (
|
|
178
|
+
if (relationShip === 2 || relationShip === 3) {
|
|
169
179
|
return /*#__PURE__*/_react["default"].createElement(_relationTitle["default"], {
|
|
170
180
|
relation: relation
|
|
171
181
|
});
|
|
@@ -197,11 +207,11 @@ function Header(props, ref) {
|
|
|
197
207
|
className: "".concat(_precls.precls, "__header-item")
|
|
198
208
|
}, getTitle())), /*#__PURE__*/_react["default"].createElement("div", {
|
|
199
209
|
className: "".concat(_precls.precls, "__header-right")
|
|
200
|
-
}, departmentId
|
|
210
|
+
}, Number(departmentId) === 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
201
211
|
className: "".concat(_precls.precls, "__header-item")
|
|
202
212
|
}, /*#__PURE__*/_react["default"].createElement(_keywordSearch["default"], {
|
|
203
213
|
onSearch: onSearch
|
|
204
|
-
})),
|
|
214
|
+
})), relationShip !== 2 && relationShip !== 3 &&
|
|
205
215
|
/*#__PURE__*/
|
|
206
216
|
// 我关注的 我参与的 没有创建按钮
|
|
207
217
|
_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -221,10 +231,24 @@ function Header(props, ref) {
|
|
|
221
231
|
className: "tu-icon-yangshi-ditu"
|
|
222
232
|
}))))), /*#__PURE__*/_react["default"].createElement(_comments["default"], {
|
|
223
233
|
toUserId: toUserId,
|
|
224
|
-
relation:
|
|
234
|
+
relation: relationShip,
|
|
225
235
|
userInfo: userInfo
|
|
226
236
|
}), /*#__PURE__*/_react["default"].createElement(_filter["default"], {
|
|
227
237
|
onSearch: onSearch
|
|
238
|
+
}), Number(cycleType) !== -1 && (Number(relation) === 1 || Object.keys((0, _tools.getQueryString)()).length === 0) && /*#__PURE__*/_react["default"].createElement(_operateRecord["default"], {
|
|
239
|
+
toUserId: toUserId,
|
|
240
|
+
userInfo: userInfo,
|
|
241
|
+
relation: relationShip,
|
|
242
|
+
okrFeedParams: {
|
|
243
|
+
objId: departmentId === undefined ? Number(toUserId || (0, _bsGlobal.getUserInfo)().Id) : Number(departmentId),
|
|
244
|
+
// 人员或部门Id
|
|
245
|
+
objType: departmentId === undefined ? 1 : 2,
|
|
246
|
+
// 1:负责人,2:部门
|
|
247
|
+
cycleType: Number(cycleType),
|
|
248
|
+
// 目标周期:0-自定义,1-年度,2-季度,3-月度
|
|
249
|
+
yqmNum: Number(yqmNum),
|
|
250
|
+
annualNum: Number(annualNum)
|
|
251
|
+
}
|
|
228
252
|
})));
|
|
229
253
|
}
|
|
230
254
|
|