@titaui/pc 1.11.27-beta.8 → 1.11.29
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 +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/icon-btn/index.js +17 -8
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +13 -19
- package/lib/components/change-okr-modal/Item.js +14 -14
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/index.js +1 -3
- 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 +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/drop-selector/index.js +25 -10
- package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
- package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/index.css +21 -0
- package/lib/components/dynamic/advertise/index.js +126 -0
- package/lib/components/dynamic/advertise/interface.js +5 -0
- package/lib/components/dynamic/advertise/util.js +28 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
- package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
- package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
- package/lib/components/dynamic/constant.js +33 -32
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/index.js +50 -32
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- 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 +146 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
- package/lib/components/dynamic/dynamic-liking/item.js +75 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.js +7 -15
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +141 -0
- package/lib/components/dynamic/dynamic-topping/index.js +82 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +153 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +173 -0
- package/lib/components/dynamic/dynamic.js +428 -0
- package/lib/components/dynamic/export-module/index.js +37 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +12 -9
- 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 +184 -0
- package/lib/components/dynamic/my-team/index.js +263 -0
- package/lib/components/dynamic/my-team/request-api.js +52 -0
- package/lib/components/dynamic/my-team/util.js +20 -0
- package/lib/components/dynamic/new-ui.css +192 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
- package/lib/components/dynamic/online-broadcast/data.js +77 -0
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
- 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 +46 -0
- package/lib/components/dynamic/online-broadcast/index.js +61 -0
- package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
- 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 +51 -0
- package/lib/components/dynamic/quick-operation/index.js +120 -0
- package/lib/components/dynamic/request-api.js +68 -7
- package/lib/components/e-priority/index.js +8 -8
- package/lib/components/eReport/eReportShare/index.js +11 -11
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +102 -0
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +23 -3
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/form/index.js +10 -3
- package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
- package/lib/components/icon-button-list/index.js +3 -3
- package/lib/components/img-viewer/index.css +3 -3
- package/lib/components/img-viewer/index.js +11 -11
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
- package/lib/components/menus/index.js +11 -5
- package/lib/components/nav-top/components/menu/index.js +14 -14
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/components/user-message/constant.js +1 -0
- package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
- package/lib/components/nav-top/components/user-message/index.js +23 -20
- package/lib/components/nav-top/index.js +4 -8
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
- 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/actions.js +23 -23
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +21 -40
- package/lib/components/okr-detail/okr-list/index.js +8 -11
- package/lib/components/okr-detail/request-apis.js +4 -10
- package/lib/components/okr-flow/child-node/index.css +6 -6
- package/lib/components/okr-flow/child-node/work-node.js +21 -21
- package/lib/components/okr-flow/export-modal/index.js +33 -19
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
- package/lib/components/okr-flow/okr-map/index.js +5 -5
- package/lib/components/okr-flow/request-apis.js +4 -4
- package/lib/components/okr-flow/root-node/index.js +25 -24
- package/lib/components/okr-flow/utils/index.js +5 -5
- package/lib/components/okr-flow/utils/tree-handler.js +17 -17
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +3 -3
- package/lib/components/period-selector/index.js +11 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +57 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +132 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/popup/index.js +4 -4
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -5
- package/lib/components/survey-model/index.css +18 -18
- package/lib/components/survey-model/instance.js +1 -1
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +22 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +212 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +426 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- package/lib/components/task-tree/task-item-node/index.css +289 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +16 -0
- package/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +123 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +336 -0
- package/lib/components/time-picker/timer-picker-input.js +96 -0
- package/lib/components/time-picker/utils.js +52 -0
- package/lib/components/toast/index.js +3 -5
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +0 -40
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
- package/lib/pages/okr-map/number-select/index.js +2 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/auth.js +6 -6
- package/lib/utils/bs-global.js +12 -12
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/hooks.js +72 -0
- package/lib/utils/open-data.js +27 -31
- package/package.json +6 -3
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _titaUi = require("tita-ui");
|
|
13
|
+
|
|
12
14
|
var _userSelector = _interopRequireDefault(require("../../user-selector"));
|
|
13
15
|
|
|
14
16
|
var _drawer = _interopRequireDefault(require("../../drawer"));
|
|
@@ -25,9 +27,7 @@ var _requestApis = require("../request-apis");
|
|
|
25
27
|
|
|
26
28
|
var _okrShare = _interopRequireDefault(require("../../okr-share"));
|
|
27
29
|
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var _constant = require("./constant");
|
|
30
|
+
var _context7 = require("../context");
|
|
31
31
|
|
|
32
32
|
var _deleteConfirm = _interopRequireDefault(require("./delete-confirm/delete-confirm"));
|
|
33
33
|
|
|
@@ -74,7 +74,7 @@ function OkrDetailHeader(_ref) {
|
|
|
74
74
|
setShareVisible = _useState2[1];
|
|
75
75
|
|
|
76
76
|
var userSelectRef = (0, _react.useRef)();
|
|
77
|
-
var
|
|
77
|
+
var popRef = (0, _react.useRef)();
|
|
78
78
|
|
|
79
79
|
var _useState3 = (0, _react.useState)([]),
|
|
80
80
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -83,11 +83,8 @@ function OkrDetailHeader(_ref) {
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
var loginUserId = window.BSGlobal.loginUserInfo.Id;
|
|
86
|
-
var context = (0, _react.useContext)(
|
|
87
|
-
var commonContext = (0, _react.useContext)(
|
|
88
|
-
var approvalSetting = commonContext.approvalSetting,
|
|
89
|
-
okrInfo = commonContext.okrInfo;
|
|
90
|
-
var approveStatusColor = (0, _constant.ApproveStatusColor)(okrInfo.applyState);
|
|
86
|
+
var context = (0, _react.useContext)(_context7.GeneralDataContext);
|
|
87
|
+
var commonContext = (0, _react.useContext)(_context7.CommonContext);
|
|
91
88
|
var changVisiblity = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
92
89
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(workId, visibility) {
|
|
93
90
|
var visibilityScope,
|
|
@@ -136,238 +133,220 @@ function OkrDetailHeader(_ref) {
|
|
|
136
133
|
var closeShareModal = (0, _react.useCallback)(function () {
|
|
137
134
|
setShareVisible(false);
|
|
138
135
|
}, []);
|
|
139
|
-
|
|
140
|
-
var handleDeleteOkr = function handleDeleteOkr(selected) {
|
|
141
|
-
(0, _requestApis.workDelete)({
|
|
142
|
-
deleteType: selected,
|
|
143
|
-
workId: detailInfo.workId
|
|
144
|
-
}).then(function (resp) {
|
|
145
|
-
if (resp.Code === 1) {
|
|
146
|
-
_toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'));
|
|
147
|
-
|
|
148
|
-
setTimeout(function () {
|
|
149
|
-
commonContext.refreshAll();
|
|
150
|
-
}, 500);
|
|
151
|
-
} else {
|
|
152
|
-
_toast["default"].Error(resp.Message);
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
|
|
157
136
|
var actions = (0, _react.useMemo)(function () {
|
|
158
137
|
if (!detailInfo) {
|
|
159
138
|
return [];
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
139
|
+
} else {
|
|
140
|
+
return (0, _actions.getOkrHeadActions)({
|
|
141
|
+
roleType: context.generalRoleType,
|
|
142
|
+
principalUser: context.generalPrincipalUser,
|
|
143
|
+
visibility: context.generalVisibility.visibility,
|
|
144
|
+
detailInfo: detailInfo,
|
|
145
|
+
openShareModal: function () {
|
|
146
|
+
var _openShareModal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
147
|
+
var krss;
|
|
148
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
149
|
+
while (1) {
|
|
150
|
+
switch (_context2.prev = _context2.next) {
|
|
151
|
+
case 0:
|
|
152
|
+
_context2.next = 2;
|
|
153
|
+
return (0, _requestApis.getKrs)({
|
|
154
|
+
okrId: detailInfo.workId
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
case 2:
|
|
158
|
+
krss = _context2.sent;
|
|
159
|
+
setKrs(krss);
|
|
160
|
+
setShareVisible(true);
|
|
161
|
+
|
|
162
|
+
case 5:
|
|
163
|
+
case "end":
|
|
164
|
+
return _context2.stop();
|
|
165
|
+
}
|
|
187
166
|
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}));
|
|
167
|
+
}, _callee2);
|
|
168
|
+
}));
|
|
191
169
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return openShareModal;
|
|
197
|
-
}(),
|
|
198
|
-
changeVisiblilty: function changeVisiblilty(visibility) {
|
|
199
|
-
if (visibility === 4) {
|
|
200
|
-
if (userSelectRef.current) {
|
|
201
|
-
userSelectRef.current.open();
|
|
170
|
+
function openShareModal() {
|
|
171
|
+
return _openShareModal.apply(this, arguments);
|
|
202
172
|
}
|
|
203
173
|
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
},
|
|
212
|
-
onCopyOkr: function onCopyOkr() {
|
|
213
|
-
// @ts-ignore
|
|
214
|
-
window.openCopyOkrModal({
|
|
215
|
-
okrId: detailInfo.workId,
|
|
216
|
-
okrType: detailInfo.okrType
|
|
217
|
-
});
|
|
218
|
-
},
|
|
219
|
-
onChangeOkrFollow: function () {
|
|
220
|
-
var _onChangeOkrFollow = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(follow) {
|
|
221
|
-
var res;
|
|
222
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
223
|
-
while (1) {
|
|
224
|
-
switch (_context3.prev = _context3.next) {
|
|
225
|
-
case 0:
|
|
226
|
-
_context3.next = 2;
|
|
227
|
-
return (0, _confirm["default"])(follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Focuson') : (0, _getLocale.getLocale)('OKR_MyO_Err_Unfollow'), follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Payatten') : (0, _getLocale.getLocale)('OKR_MyO_Err_Progress'));
|
|
228
|
-
|
|
229
|
-
case 2:
|
|
230
|
-
res = _context3.sent;
|
|
174
|
+
return openShareModal;
|
|
175
|
+
}(),
|
|
176
|
+
changeVisiblilty: function changeVisiblilty(visibility) {
|
|
177
|
+
if (visibility === 4) {
|
|
178
|
+
if (userSelectRef.current) {
|
|
179
|
+
userSelectRef.current.open();
|
|
180
|
+
}
|
|
231
181
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
236
184
|
|
|
237
|
-
|
|
238
|
-
|
|
185
|
+
changVisiblity(detailInfo.workId, visibility);
|
|
186
|
+
},
|
|
187
|
+
onDeleteOkr: function onDeleteOkr(e) {
|
|
188
|
+
popRef.current.getRef().show(e.target);
|
|
189
|
+
},
|
|
190
|
+
onCopyOkr: function onCopyOkr() {
|
|
191
|
+
// @ts-ignore
|
|
192
|
+
window.openCopyOkrModal({
|
|
193
|
+
okrId: detailInfo.workId,
|
|
194
|
+
okrType: detailInfo.okrType
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
onChangeOkrFollow: function () {
|
|
198
|
+
var _onChangeOkrFollow = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(follow) {
|
|
199
|
+
var res;
|
|
200
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
201
|
+
while (1) {
|
|
202
|
+
switch (_context3.prev = _context3.next) {
|
|
203
|
+
case 0:
|
|
204
|
+
_context3.next = 2;
|
|
205
|
+
return (0, _confirm["default"])(follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Focuson') : (0, _getLocale.getLocale)('OKR_MyO_Err_Unfollow'), follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Payatten') : (0, _getLocale.getLocale)('OKR_MyO_Err_Progress'));
|
|
206
|
+
|
|
207
|
+
case 2:
|
|
208
|
+
res = _context3.sent;
|
|
209
|
+
|
|
210
|
+
if (!res) {
|
|
211
|
+
_context3.next = 14;
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (!follow) {
|
|
216
|
+
_context3.next = 9;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
_context3.next = 7;
|
|
221
|
+
return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
|
|
222
|
+
|
|
223
|
+
case 7:
|
|
224
|
+
_context3.next = 11;
|
|
239
225
|
break;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
_context3.next = 7;
|
|
243
|
-
return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
|
|
244
226
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
227
|
+
case 9:
|
|
228
|
+
_context3.next = 11;
|
|
229
|
+
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
248
230
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
231
|
+
case 11:
|
|
232
|
+
context.setGeneralRoleType(follow ? 3 : 0); // 关注
|
|
252
233
|
|
|
253
|
-
|
|
254
|
-
context.setGeneralRoleType(follow ? 3 : 0); // 关注
|
|
234
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
255
235
|
|
|
256
|
-
|
|
236
|
+
if (!follow) {
|
|
237
|
+
commonContext.refreshAll();
|
|
238
|
+
}
|
|
257
239
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
case 14:
|
|
263
|
-
case "end":
|
|
264
|
-
return _context3.stop();
|
|
240
|
+
case 14:
|
|
241
|
+
case "end":
|
|
242
|
+
return _context3.stop();
|
|
243
|
+
}
|
|
265
244
|
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}));
|
|
269
|
-
|
|
270
|
-
function onChangeOkrFollow(_x3) {
|
|
271
|
-
return _onChangeOkrFollow.apply(this, arguments);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
return onChangeOkrFollow;
|
|
275
|
-
}(),
|
|
276
|
-
onFinishOrReOpen: function () {
|
|
277
|
-
var _onFinishOrReOpen = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(isFinish) {
|
|
278
|
-
var res;
|
|
279
|
-
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
280
|
-
while (1) {
|
|
281
|
-
switch (_context4.prev = _context4.next) {
|
|
282
|
-
case 0:
|
|
283
|
-
_context4.next = 2;
|
|
284
|
-
return (0, _confirm["default"])(isFinish ? (0, _getLocale.getLocale)('OKR_MyO_Areycloseobjective') : (0, _getLocale.getLocale)('OKR_MyO_Err_Restart'));
|
|
285
|
-
|
|
286
|
-
case 2:
|
|
287
|
-
res = _context4.sent;
|
|
245
|
+
}, _callee3);
|
|
246
|
+
}));
|
|
288
247
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
248
|
+
function onChangeOkrFollow(_x3) {
|
|
249
|
+
return _onChangeOkrFollow.apply(this, arguments);
|
|
250
|
+
}
|
|
293
251
|
|
|
294
|
-
|
|
295
|
-
|
|
252
|
+
return onChangeOkrFollow;
|
|
253
|
+
}(),
|
|
254
|
+
onFinishOrReOpen: function () {
|
|
255
|
+
var _onFinishOrReOpen = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(isFinish) {
|
|
256
|
+
var res;
|
|
257
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
258
|
+
while (1) {
|
|
259
|
+
switch (_context4.prev = _context4.next) {
|
|
260
|
+
case 0:
|
|
261
|
+
_context4.next = 2;
|
|
262
|
+
return (0, _confirm["default"])(isFinish ? (0, _getLocale.getLocale)('OKR_MyO_Areycloseobjective') : (0, _getLocale.getLocale)('OKR_MyO_Err_Restart'));
|
|
263
|
+
|
|
264
|
+
case 2:
|
|
265
|
+
res = _context4.sent;
|
|
266
|
+
|
|
267
|
+
if (!res) {
|
|
268
|
+
_context4.next = 13;
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (!isFinish) {
|
|
273
|
+
_context4.next = 9;
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
_context4.next = 7;
|
|
278
|
+
return (0, _requestApis.close)(detailInfo.workId);
|
|
279
|
+
|
|
280
|
+
case 7:
|
|
281
|
+
_context4.next = 11;
|
|
296
282
|
break;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
_context4.next = 7;
|
|
300
|
-
return (0, _requestApis.close)(detailInfo.workId);
|
|
301
283
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
284
|
+
case 9:
|
|
285
|
+
_context4.next = 11;
|
|
286
|
+
return (0, _requestApis.start)(detailInfo.workId);
|
|
305
287
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
return (0, _requestApis.start)(detailInfo.workId);
|
|
288
|
+
case 11:
|
|
289
|
+
commonContext.refreshAll(); // 刷新
|
|
309
290
|
|
|
310
|
-
|
|
311
|
-
commonContext.refreshAll(); // 刷新
|
|
291
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
312
292
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
return _context4.stop();
|
|
293
|
+
case 13:
|
|
294
|
+
case "end":
|
|
295
|
+
return _context4.stop();
|
|
296
|
+
}
|
|
318
297
|
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}));
|
|
322
|
-
|
|
323
|
-
function onFinishOrReOpen(_x4) {
|
|
324
|
-
return _onFinishOrReOpen.apply(this, arguments);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
return onFinishOrReOpen;
|
|
328
|
-
}(),
|
|
329
|
-
onQuit: function () {
|
|
330
|
-
var _onQuit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
331
|
-
var res;
|
|
332
|
-
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
333
|
-
while (1) {
|
|
334
|
-
switch (_context5.prev = _context5.next) {
|
|
335
|
-
case 0:
|
|
336
|
-
_context5.next = 2;
|
|
337
|
-
return (0, _confirm["default"])((0, _getLocale.getLocale)('OKR_MyO_Err_Quit'), (0, _getLocale.getLocale)('OKR_MyO_Err_Inchargec'));
|
|
338
|
-
|
|
339
|
-
case 2:
|
|
340
|
-
res = _context5.sent;
|
|
341
|
-
|
|
342
|
-
if (!res) {
|
|
343
|
-
_context5.next = 8;
|
|
344
|
-
break;
|
|
345
|
-
}
|
|
298
|
+
}, _callee4);
|
|
299
|
+
}));
|
|
346
300
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
case 6:
|
|
351
|
-
// context.setGeneralRoleType(0)
|
|
352
|
-
commonContext.refreshAll(); // 刷新
|
|
353
|
-
|
|
354
|
-
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
301
|
+
function onFinishOrReOpen(_x4) {
|
|
302
|
+
return _onFinishOrReOpen.apply(this, arguments);
|
|
303
|
+
}
|
|
355
304
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
305
|
+
return onFinishOrReOpen;
|
|
306
|
+
}(),
|
|
307
|
+
onQuit: function () {
|
|
308
|
+
var _onQuit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
309
|
+
var res;
|
|
310
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
311
|
+
while (1) {
|
|
312
|
+
switch (_context5.prev = _context5.next) {
|
|
313
|
+
case 0:
|
|
314
|
+
_context5.next = 2;
|
|
315
|
+
return (0, _confirm["default"])((0, _getLocale.getLocale)('OKR_MyO_Err_Quit'), (0, _getLocale.getLocale)('OKR_MyO_Err_Inchargec'));
|
|
316
|
+
|
|
317
|
+
case 2:
|
|
318
|
+
res = _context5.sent;
|
|
319
|
+
|
|
320
|
+
if (!res) {
|
|
321
|
+
_context5.next = 8;
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
_context5.next = 6;
|
|
326
|
+
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 2);
|
|
327
|
+
|
|
328
|
+
case 6:
|
|
329
|
+
// context.setGeneralRoleType(0)
|
|
330
|
+
commonContext.refreshAll(); // 刷新
|
|
331
|
+
|
|
332
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
333
|
+
|
|
334
|
+
case 8:
|
|
335
|
+
case "end":
|
|
336
|
+
return _context5.stop();
|
|
337
|
+
}
|
|
359
338
|
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}));
|
|
339
|
+
}, _callee5);
|
|
340
|
+
}));
|
|
363
341
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
342
|
+
function onQuit() {
|
|
343
|
+
return _onQuit.apply(this, arguments);
|
|
344
|
+
}
|
|
367
345
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
346
|
+
return onQuit;
|
|
347
|
+
}()
|
|
348
|
+
});
|
|
349
|
+
}
|
|
371
350
|
}, [detailInfo, context.generalRoleType, context.generalPrincipalUser, context.generalVisibility.visibility]);
|
|
372
351
|
var parent = null;
|
|
373
352
|
|
|
@@ -389,8 +368,6 @@ function OkrDetailHeader(_ref) {
|
|
|
389
368
|
|
|
390
369
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
|
|
391
370
|
actions: actions,
|
|
392
|
-
approvalSetting: approvalSetting,
|
|
393
|
-
detailInfo: detailInfo,
|
|
394
371
|
actionComponent: /*#__PURE__*/_react["default"].createElement(_wechatBtn["default"], {
|
|
395
372
|
id: detailInfo.workId,
|
|
396
373
|
objType: 62,
|
|
@@ -409,14 +386,7 @@ function OkrDetailHeader(_ref) {
|
|
|
409
386
|
krId: parent.id
|
|
410
387
|
});
|
|
411
388
|
}
|
|
412
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null
|
|
413
|
-
onlyShowContent: approveStatusColor ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
414
|
-
className: "okr-detail-header-status",
|
|
415
|
-
style: {
|
|
416
|
-
color: approveStatusColor.color,
|
|
417
|
-
backgroundColor: approveStatusColor.bgColor
|
|
418
|
-
}
|
|
419
|
-
}, (0, _constant.getApproveStatusTextMap)(okrInfo.applyState)) : null
|
|
389
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null
|
|
420
390
|
}), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
|
|
421
391
|
visible: shareVisible,
|
|
422
392
|
onClose: closeShareModal,
|
|
@@ -434,12 +404,48 @@ function OkrDetailHeader(_ref) {
|
|
|
434
404
|
})
|
|
435
405
|
},
|
|
436
406
|
zIndex: 2400
|
|
437
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
438
|
-
ref:
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
407
|
+
}), /*#__PURE__*/_react["default"].createElement(_titaUi.PopConfirm, {
|
|
408
|
+
ref: popRef,
|
|
409
|
+
showArrow: false,
|
|
410
|
+
align: "top",
|
|
411
|
+
className: "document-mouse-event-ignore",
|
|
412
|
+
content: /*#__PURE__*/_react["default"].createElement(_deleteConfirm["default"], {
|
|
413
|
+
onConfirm: /*#__PURE__*/function () {
|
|
414
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(selected) {
|
|
415
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
416
|
+
while (1) {
|
|
417
|
+
switch (_context6.prev = _context6.next) {
|
|
418
|
+
case 0:
|
|
419
|
+
_context6.next = 2;
|
|
420
|
+
return (0, _requestApis.workDelete)({
|
|
421
|
+
deleteType: selected,
|
|
422
|
+
workId: detailInfo.workId
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
case 2:
|
|
426
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'));
|
|
427
|
+
|
|
428
|
+
setTimeout(function () {
|
|
429
|
+
commonContext.refreshAll();
|
|
430
|
+
}, 500);
|
|
431
|
+
|
|
432
|
+
case 4:
|
|
433
|
+
case "end":
|
|
434
|
+
return _context6.stop();
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}, _callee6);
|
|
438
|
+
}));
|
|
439
|
+
|
|
440
|
+
return function (_x5) {
|
|
441
|
+
return _ref3.apply(this, arguments);
|
|
442
|
+
};
|
|
443
|
+
}(),
|
|
444
|
+
onCancel: function onCancel() {
|
|
445
|
+
return popRef.current && popRef.current.getRef().hide();
|
|
446
|
+
}
|
|
447
|
+
})
|
|
448
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
443
449
|
style: {
|
|
444
450
|
textAlign: 'right',
|
|
445
451
|
height: 0
|