@titaui/pc 1.10.7 → 1.10.8-2.beta-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/.eslintrc.js +2 -2
- package/.prettierignore +4 -4
- package/lib/components/book-demo/utils.js +4 -0
- package/lib/components/button/default-button/index.css +10 -4
- package/lib/components/button/default-button/index.js +13 -2
- package/lib/components/change-okr-modal/index.js +3 -2
- package/lib/components/checkbox/index.css +1 -0
- package/lib/components/communication/CommunicationRecord.js +16 -16
- package/lib/components/communication/index.css +16 -15
- package/lib/components/communication/index.js +23 -6
- package/lib/components/communication/style.js +4 -4
- package/lib/components/create-okr-modal/fields/o-new-name.js +31 -21
- package/lib/components/create-okr-modal/fields/okr-parent.js +1 -5
- package/lib/components/create-okr-modal/kr-items/krDatas.js +16 -16
- package/lib/components/{dynamic/components/dangerous-html → dangerous-html}/index.js +0 -0
- package/lib/components/dialog/index.css +4 -1
- package/lib/components/dialog/index.js +1 -1
- package/lib/components/dialog-confirm/index.css +1 -1
- package/lib/components/drawer/index.js +3 -2
- package/lib/components/drawer-manager/index.js +6 -1
- package/lib/components/dynamic/components/first-level-tabs/index.css +12 -2
- package/lib/components/dynamic/components/first-level-tabs/index.js +19 -6
- package/lib/components/dynamic/components/obj-status/index.css +1 -0
- package/lib/components/dynamic/components/obj-status/utils.js +1 -1
- package/lib/components/dynamic/constant.js +12 -2
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.css +71 -0
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +112 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.css +2 -1
- package/lib/components/dynamic/dynamic-item/components/header/index.js +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +27 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +13 -7
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +10 -4
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +5 -3
- package/lib/components/dynamic/dynamic-item/dynamic-chart/index.css +4 -0
- package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +102 -0
- package/lib/components/dynamic/dynamic-item/dynamic-chart/utils.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +12 -11
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -5
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -3
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/dynamic-share-course.png +0 -0
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/jiantou-right@3x.png +0 -0
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/user-photo.png +0 -0
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/index.js +6 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +9 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +2 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +13 -7
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +42 -6
- package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.css +14 -30
- package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +12 -3
- package/lib/components/dynamic/dynamic-item/dynamic-reward/img/reward.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +6 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +18 -51
- package/lib/components/dynamic/dynamic-item/dynamic-reward/utils.js +28 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +6 -2
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +55 -2
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/index.css +58 -3
- package/lib/components/dynamic/dynamic-item/index.js +124 -23
- package/lib/components/dynamic/dynamic-like-ranking/item.js +1 -1
- package/lib/components/dynamic/dynamic-list/index.js +11 -2
- package/lib/components/dynamic/dynamic-topping/item.js +8 -4
- package/lib/components/dynamic/dynamic.js +5 -2
- package/lib/components/dynamic/img/dynamic-operate.png +0 -0
- package/lib/components/dynamic/img/dynamic-point.svg +13 -0
- package/lib/components/dynamic/img/dynamic-reward-hover.svg +1 -0
- package/lib/components/dynamic/img/dynamic-reward-normal.svg +1 -0
- package/lib/components/dynamic/online-broadcast/data.js +13 -1
- package/lib/components/e-status-dropdown/index.css +3 -0
- package/lib/components/e-status-dropdown/index.js +94 -0
- package/lib/components/edit-kr-wight/style/index.js +2 -2
- package/lib/components/file-list/components/single-file/index.css +6 -5
- package/lib/components/file-list/components/single-file/index.js +1 -1
- package/lib/components/file-list/index.css +1 -0
- package/lib/components/follower-visitor/index.js +6 -4
- package/lib/components/grid-layout/okr-progress/index.js +20 -30
- package/lib/components/help-card/image/not-try.png +0 -0
- package/lib/components/help-card/image/try.png +0 -0
- package/lib/components/help-card/index.css +31 -2
- package/lib/components/help-card/index.js +54 -17
- package/lib/components/invite-people/img/invite-people.svg +62 -0
- package/lib/components/invite-people/index.css +1 -1
- package/lib/components/mblog/index.js +14 -5
- package/lib/components/menus/export-modules/demo-menus/index.js +2 -2
- package/lib/components/menus/export-modules/demo-menus/menu-highlight.js +25 -1
- package/lib/components/menus/export-modules/demo-menus/menus.js +60 -11
- package/lib/components/menus/export-modules/manage-menus/constant.js +1 -1
- package/lib/components/menus/export-modules/manage-menus/index.css +3 -0
- package/lib/components/menus/export-modules/okr-menus/subordinate-menus/index.js +34 -12
- package/lib/components/menus/images/okr-gongsi.svg +17 -0
- package/lib/components/nav-top/components/menu/index.css +24 -0
- package/lib/components/nav-top/components/menu/index.js +9 -1
- package/lib/components/nav-top/components/user-message/components/reply/index.js +9 -8
- package/lib/components/nav-top/components/user-message/components/reply/reply-item.js +15 -5
- package/lib/components/nav-top/components/user-message/index.css +4 -3
- package/lib/components/nav-top/components/user-message/index.js +33 -6
- package/lib/components/nav-top/request.apis.js +22 -8
- package/lib/components/nav-top/useGlobalValue.js +14 -0
- package/lib/components/okr-detail/components/header/o-name.js +11 -4
- package/lib/components/okr-detail/components/header/o-score.js +4 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.css +26 -12
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +11 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +20 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +27 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +29 -10
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +1 -1
- package/lib/components/okr-detail/detail-header/actions.js +40 -44
- package/lib/components/okr-detail/detail-header/index.css +2 -2
- package/lib/components/okr-detail/detail-header/index.js +207 -195
- package/lib/components/okr-detail/e-list/index.js +70 -24
- package/lib/components/okr-detail/e-list/util.js +11 -2
- package/lib/components/okr-detail/index.js +4 -0
- package/lib/components/okr-detail/okr-list/index.js +1 -5
- package/lib/components/okr-flow/export-modal/index.js +3 -3
- package/lib/components/okr-flow/root-node/index.js +14 -1
- package/lib/components/okr-progress-detail/index.css +11 -10
- package/lib/components/okr-progress-detail/index.js +5 -1
- package/lib/components/okr-progress-detail/utils.js +4 -4
- package/lib/components/okr-progress-modal/helper.js +20 -27
- package/lib/components/okr-share/common-painter/openDataPainter.js +34 -27
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +40 -36
- package/lib/components/open-data-painter/index.js +5 -1
- package/lib/components/progress/circle-progress/index.js +1 -1
- package/lib/components/rich-editor/basic/schema.js +47 -0
- package/lib/components/rich-editor/consts/events.js +12 -0
- package/lib/components/rich-editor/enums.js +42 -0
- package/lib/components/rich-editor/index.js +58 -0
- package/lib/components/rich-editor/keymap.js +119 -0
- package/lib/components/rich-editor/keymaps/index.js +241 -0
- package/lib/components/rich-editor/models/controller.js +18 -0
- package/lib/components/rich-editor/models/editor.js +47 -0
- package/lib/components/rich-editor/models/plugin.js +20 -0
- package/lib/components/rich-editor/models/schema.js +121 -0
- package/lib/components/rich-editor/plugins/block/block-quote/commond.js +27 -0
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +128 -0
- package/lib/components/rich-editor/plugins/block/heading/commonds.js +31 -0
- package/lib/components/rich-editor/plugins/block/heading/index.js +190 -0
- package/lib/components/rich-editor/plugins/block/index.js +57 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/conversions.js +172 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/indent-list-items-selected.js +163 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/indent-list.js +59 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-forward.js +74 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/index.js +45 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +104 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +92 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +89 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-paragraph-with-list.js +48 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-sibling-list-items.js +61 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/merge-lists.js +34 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/outdent-list-items-selected.js +289 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/wrap-and-join-lists.js +180 -0
- package/lib/components/rich-editor/plugins/block/lists/baseCommand.js +328 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/indent-list.js +60 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/index.js +396 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/join-list-item-forward.js +45 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/listBackspace.js +302 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/outdent-list.js +43 -0
- package/lib/components/rich-editor/plugins/block/lists/index.js +224 -0
- package/lib/components/rich-editor/plugins/block/lists/messages.js +38 -0
- package/lib/components/rich-editor/plugins/block/lists/pm-plugins/input-rule.js +152 -0
- package/lib/components/rich-editor/plugins/block/lists/pm-plugins/keymap.js +33 -0
- package/lib/components/rich-editor/plugins/block/lists/pm-plugins/main.js +94 -0
- package/lib/components/rich-editor/plugins/block/lists/styles.js +15 -0
- package/lib/components/rich-editor/plugins/block/lists/transforms.js +347 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/analytics.js +48 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/find.js +126 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/indentation.js +87 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/node.js +144 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/replace-content.js +31 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/selection.js +201 -0
- package/lib/components/rich-editor/plugins/block/lists/utils.js +52 -0
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +91 -0
- package/lib/components/rich-editor/plugins/core/index.js +90 -0
- package/lib/components/rich-editor/plugins/core/pm-plugins/focus-handler.js +67 -0
- package/lib/components/rich-editor/plugins/core/pm-plugins/keymap.js +29 -0
- package/lib/components/rich-editor/plugins/core/pm-plugins/reactNodeView.js +80 -0
- package/lib/components/rich-editor/plugins/extension/alignment/commond.js +24 -0
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +113 -0
- package/lib/components/rich-editor/plugins/extension/alignment/utils.js +19 -0
- package/lib/components/rich-editor/plugins/extension/index.js +18 -0
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +126 -0
- package/lib/components/rich-editor/plugins/extension/placeholder/styles.js +19 -0
- package/lib/components/rich-editor/plugins/index.js +44 -0
- package/lib/components/rich-editor/plugins/inline/color/commond.js +128 -0
- package/lib/components/rich-editor/plugins/inline/color/consts.js +43 -0
- package/lib/components/rich-editor/plugins/inline/color/index.css +61 -0
- package/lib/components/rich-editor/plugins/inline/color/index.js +217 -0
- package/lib/components/rich-editor/plugins/inline/color/selector.js +252 -0
- package/lib/components/rich-editor/plugins/inline/color/util.js +25 -0
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +149 -0
- package/lib/components/rich-editor/plugins/inline/em/index.js +93 -0
- package/lib/components/rich-editor/plugins/inline/index.js +83 -0
- package/lib/components/rich-editor/plugins/inline/link/commands.js +256 -0
- package/lib/components/rich-editor/plugins/inline/link/index.js +149 -0
- package/lib/components/rich-editor/plugins/inline/link/pm-plugins/fake-cursor-for-toolbar.js +77 -0
- package/lib/components/rich-editor/plugins/inline/link/pm-plugins/main.js +293 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/index.css +84 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/linkEditor.js +150 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/linkToolbar.js +101 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/toolbarBtn.js +117 -0
- package/lib/components/rich-editor/plugins/inline/link/utils.js +33 -0
- package/lib/components/rich-editor/plugins/inline/strong/index.js +139 -0
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +147 -0
- package/lib/components/rich-editor/plugins/util.js +284 -0
- package/lib/components/rich-editor/react/reactNodeView.js +383 -0
- package/lib/components/rich-editor/react/uiProvider.js +185 -0
- package/lib/components/rich-editor/schemas/basic.js +309 -0
- package/lib/components/rich-editor/schemas/index.js +19 -0
- package/lib/components/rich-editor/schemas/list.js +342 -0
- package/lib/components/rich-editor/types/commond.js +5 -0
- package/lib/components/rich-editor/types/index.js +18 -0
- package/lib/components/rich-editor/ui/Popup/index.js +247 -0
- package/lib/components/rich-editor/ui/Popup/utils.js +399 -0
- package/lib/components/rich-editor/ui/editor/index.css +178 -0
- package/lib/components/rich-editor/ui/editor/index.js +153 -0
- package/lib/components/rich-editor/ui/normal-toolbar/index.css +34 -0
- package/lib/components/rich-editor/ui/normal-toolbar/index.js +109 -0
- package/lib/components/rich-editor/utils/browser.js +35 -0
- package/lib/components/rich-editor/utils/commands.js +266 -0
- package/lib/components/rich-editor/utils/document.js +211 -0
- package/lib/components/rich-editor/utils/event.js +79 -0
- package/lib/components/rich-editor/utils/helpers.js +16 -0
- package/lib/components/rich-editor/utils/mark.js +168 -0
- package/lib/components/rich-editor/utils/slice.js +85 -0
- package/lib/components/rich-editor/utils/toolbar.js +228 -0
- package/lib/components/scrollbar/index.js +67 -9
- package/lib/components/scrollbar/scroll-mask/index.css +29 -0
- package/lib/components/scrollbar/scroll-mask/index.js +152 -0
- package/lib/components/superset-charts/components/chart/index.js +54 -0
- package/lib/components/superset-charts/fetch-assets-and-append/append-assets.js +106 -0
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +142 -0
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +79 -0
- package/lib/components/superset-charts/index.js +13 -0
- package/lib/components/superset-charts/interface.js +5 -0
- package/lib/components/superset-charts/utils/axios.js +102 -0
- package/lib/components/toast/index.js +5 -17
- package/lib/components/tree/index.css +3 -2
- package/lib/components/upload/index.js +4 -2
- package/lib/components/upload/util.js +2 -0
- package/lib/components/upload-photo-modal/request-api.js +1 -17
- package/lib/components/user-selector/empty/index.css +6 -6
- package/lib/components/user-selector/selected-panel/index.css +3 -3
- package/lib/components/{float-fixed-video-modal → video-modal/components/video-box}/index.css +118 -121
- package/lib/components/{float-fixed-video-modal → video-modal/components/video-box}/index.js +182 -182
- package/lib/components/{float-fixed-video-modal → video-modal}/img/close.png +0 -0
- package/lib/components/{float-fixed-video-modal → video-modal}/img/full.svg +0 -0
- package/lib/components/video-modal/img/muted.svg +8 -10
- package/lib/components/video-modal/img/not-muted.svg +17 -11
- package/lib/components/video-modal/img/pause.svg +7 -11
- package/lib/components/video-modal/img/play.svg +13 -11
- package/lib/components/video-modal/index.css +38 -168
- package/lib/components/video-modal/index.js +104 -244
- package/lib/components/video-modal/utils.js +2 -2
- package/lib/components/wechat-btn/index.css +10 -0
- package/lib/components/wechat-btn/index.js +232 -0
- package/lib/components/weekly-report/common-painter/openDataPainter.js +5 -1
- package/lib/hooks/useGlobalState.js +63 -0
- package/lib/index.js +39 -7
- package/lib/pages/aha2021/img/canceled.svg +13 -0
- package/lib/pages/aha2021/img/not-try.png +0 -0
- package/lib/pages/aha2021/img/try.png +0 -0
- package/lib/pages/aha2021/index.css +52 -0
- package/lib/pages/aha2021/index.js +73 -14
- package/lib/pages/group-management/tree/group-form/index.js +1 -1
- package/lib/pages/new-okr-list/header/index.js +2 -1
- package/lib/pages/new-okr-list/index.js +10 -13
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -5
- package/lib/pages/pay/image/success.png +0 -0
- package/lib/pages/pay/index.css +79 -0
- package/lib/pages/pay/index.js +66 -0
- package/lib/pages/personal-info/request-api.js +1 -1
- package/lib/utils/auth.js +15 -5
- package/lib/utils/bs-global.js +8 -8
- package/lib/utils/helpers.js +7 -1
- package/lib/utils/open-data.js +82 -2
- package/package.json +121 -101
- package/lib/components/float-fixed-video-modal/img/muted.svg +0 -21
- package/lib/components/float-fixed-video-modal/img/pause.svg +0 -21
- package/lib/components/float-fixed-video-modal/img/play.svg +0 -22
- package/lib/components/float-fixed-video-modal/img/small.svg +0 -22
- package/lib/components/float-fixed-video-modal/img/smallFaQi.png +0 -0
- package/lib/components/float-fixed-video-modal/img/volume.svg +0 -21
- package/lib/components/float-fixed-video-modal/utils.js +0 -25
- package/lib/components/invite-people/img/invite-people.png +0 -0
- package/lib/components/video-modal/img/play.png +0 -0
|
@@ -19,6 +19,8 @@ var _actions = require("./actions");
|
|
|
19
19
|
|
|
20
20
|
var _confirm = _interopRequireDefault(require("./confirm"));
|
|
21
21
|
|
|
22
|
+
var _wechatBtn = _interopRequireDefault(require("../../wechat-btn"));
|
|
23
|
+
|
|
22
24
|
var _toast = _interopRequireDefault(require("../../toast"));
|
|
23
25
|
|
|
24
26
|
var _requestApis = require("../request-apis");
|
|
@@ -109,7 +111,7 @@ function OkrDetailHeader(_ref) {
|
|
|
109
111
|
}));
|
|
110
112
|
|
|
111
113
|
case 3:
|
|
112
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
114
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
113
115
|
|
|
114
116
|
context.setGeneralVisibility({
|
|
115
117
|
visibility: visibility,
|
|
@@ -132,229 +134,232 @@ function OkrDetailHeader(_ref) {
|
|
|
132
134
|
setShareVisible(false);
|
|
133
135
|
}, []);
|
|
134
136
|
var actions = (0, _react.useMemo)(function () {
|
|
135
|
-
if (!detailInfo)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
137
|
+
if (!detailInfo) {
|
|
138
|
+
return [];
|
|
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
|
+
}
|
|
161
166
|
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}));
|
|
165
|
-
|
|
166
|
-
function openShareModal() {
|
|
167
|
-
return _openShareModal.apply(this, arguments);
|
|
168
|
-
}
|
|
167
|
+
}, _callee2);
|
|
168
|
+
}));
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
changeVisiblilty: function changeVisiblilty(visibility) {
|
|
173
|
-
if (visibility === 4) {
|
|
174
|
-
if (userSelectRef.current) {
|
|
175
|
-
userSelectRef.current.open();
|
|
170
|
+
function openShareModal() {
|
|
171
|
+
return _openShareModal.apply(this, arguments);
|
|
176
172
|
}
|
|
177
173
|
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
},
|
|
186
|
-
onCopyOkr: function onCopyOkr() {
|
|
187
|
-
// @ts-ignore
|
|
188
|
-
window.openCopyOkrModal({
|
|
189
|
-
okrId: detailInfo.workId,
|
|
190
|
-
okrType: detailInfo.okrType
|
|
191
|
-
});
|
|
192
|
-
},
|
|
193
|
-
onChangeOkrFollow: function () {
|
|
194
|
-
var _onChangeOkrFollow = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(follow) {
|
|
195
|
-
var res;
|
|
196
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
197
|
-
while (1) {
|
|
198
|
-
switch (_context3.prev = _context3.next) {
|
|
199
|
-
case 0:
|
|
200
|
-
_context3.next = 2;
|
|
201
|
-
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"));
|
|
202
|
-
|
|
203
|
-
case 2:
|
|
204
|
-
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
|
+
}
|
|
205
181
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
210
184
|
|
|
211
|
-
|
|
212
|
-
|
|
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;
|
|
213
225
|
break;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
_context3.next = 7;
|
|
217
|
-
return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
|
|
218
226
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
227
|
+
case 9:
|
|
228
|
+
_context3.next = 11;
|
|
229
|
+
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
222
230
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
231
|
+
case 11:
|
|
232
|
+
context.setGeneralRoleType(follow ? 3 : 0); // 关注
|
|
226
233
|
|
|
227
|
-
|
|
228
|
-
context.setGeneralRoleType(follow ? 3 : 0); // 关注
|
|
234
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
229
235
|
|
|
230
|
-
|
|
236
|
+
if (!follow) {
|
|
237
|
+
commonContext.refreshAll();
|
|
238
|
+
}
|
|
231
239
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
case 14:
|
|
237
|
-
case "end":
|
|
238
|
-
return _context3.stop();
|
|
240
|
+
case 14:
|
|
241
|
+
case "end":
|
|
242
|
+
return _context3.stop();
|
|
243
|
+
}
|
|
239
244
|
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}));
|
|
243
|
-
|
|
244
|
-
function onChangeOkrFollow(_x3) {
|
|
245
|
-
return _onChangeOkrFollow.apply(this, arguments);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
return onChangeOkrFollow;
|
|
249
|
-
}(),
|
|
250
|
-
onFinishOrReOpen: function () {
|
|
251
|
-
var _onFinishOrReOpen = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(isFinish) {
|
|
252
|
-
var res;
|
|
253
|
-
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
254
|
-
while (1) {
|
|
255
|
-
switch (_context4.prev = _context4.next) {
|
|
256
|
-
case 0:
|
|
257
|
-
_context4.next = 2;
|
|
258
|
-
return (0, _confirm["default"])(isFinish ? (0, _getLocale.getLocale)("OKR_MyO_Areycloseobjective") : (0, _getLocale.getLocale)("OKR_MyO_Err_Restart"));
|
|
259
|
-
|
|
260
|
-
case 2:
|
|
261
|
-
res = _context4.sent;
|
|
245
|
+
}, _callee3);
|
|
246
|
+
}));
|
|
262
247
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}
|
|
248
|
+
function onChangeOkrFollow(_x3) {
|
|
249
|
+
return _onChangeOkrFollow.apply(this, arguments);
|
|
250
|
+
}
|
|
267
251
|
|
|
268
|
-
|
|
269
|
-
|
|
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;
|
|
270
282
|
break;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
_context4.next = 7;
|
|
274
|
-
return (0, _requestApis.close)(detailInfo.workId);
|
|
275
283
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
284
|
+
case 9:
|
|
285
|
+
_context4.next = 11;
|
|
286
|
+
return (0, _requestApis.start)(detailInfo.workId);
|
|
279
287
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
return (0, _requestApis.start)(detailInfo.workId);
|
|
288
|
+
case 11:
|
|
289
|
+
commonContext.refreshAll(); // 刷新
|
|
283
290
|
|
|
284
|
-
|
|
285
|
-
commonContext.refreshAll(); // 刷新
|
|
291
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
286
292
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return _context4.stop();
|
|
293
|
+
case 13:
|
|
294
|
+
case "end":
|
|
295
|
+
return _context4.stop();
|
|
296
|
+
}
|
|
292
297
|
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}));
|
|
296
|
-
|
|
297
|
-
function onFinishOrReOpen(_x4) {
|
|
298
|
-
return _onFinishOrReOpen.apply(this, arguments);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
return onFinishOrReOpen;
|
|
302
|
-
}(),
|
|
303
|
-
onQuit: function () {
|
|
304
|
-
var _onQuit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
305
|
-
var res;
|
|
306
|
-
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
307
|
-
while (1) {
|
|
308
|
-
switch (_context5.prev = _context5.next) {
|
|
309
|
-
case 0:
|
|
310
|
-
_context5.next = 2;
|
|
311
|
-
return (0, _confirm["default"])((0, _getLocale.getLocale)("OKR_MyO_Err_Quit"), (0, _getLocale.getLocale)("OKR_MyO_Err_Inchargec"));
|
|
312
|
-
|
|
313
|
-
case 2:
|
|
314
|
-
res = _context5.sent;
|
|
315
|
-
|
|
316
|
-
if (!res) {
|
|
317
|
-
_context5.next = 8;
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
_context5.next = 6;
|
|
322
|
-
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 2);
|
|
323
|
-
|
|
324
|
-
case 6:
|
|
325
|
-
// context.setGeneralRoleType(0)
|
|
326
|
-
commonContext.refreshAll(); // 刷新
|
|
298
|
+
}, _callee4);
|
|
299
|
+
}));
|
|
327
300
|
|
|
328
|
-
|
|
301
|
+
function onFinishOrReOpen(_x4) {
|
|
302
|
+
return _onFinishOrReOpen.apply(this, arguments);
|
|
303
|
+
}
|
|
329
304
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|
+
}
|
|
333
338
|
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}));
|
|
339
|
+
}, _callee5);
|
|
340
|
+
}));
|
|
337
341
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
342
|
+
function onQuit() {
|
|
343
|
+
return _onQuit.apply(this, arguments);
|
|
344
|
+
}
|
|
341
345
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
346
|
+
return onQuit;
|
|
347
|
+
}()
|
|
348
|
+
});
|
|
349
|
+
}
|
|
345
350
|
}, [detailInfo, context.generalRoleType, context.generalPrincipalUser, context.generalVisibility.visibility]);
|
|
346
351
|
var parent = null;
|
|
347
352
|
|
|
348
353
|
if (context.generalParent) {
|
|
349
354
|
if (context.generalParent.parentKr) {
|
|
350
355
|
parent = {
|
|
351
|
-
type:
|
|
356
|
+
type: 'kr',
|
|
352
357
|
id: context.generalParent.parentKr.mileStoneId,
|
|
353
358
|
name: context.generalParent.parentKr.mileStoneName
|
|
354
359
|
};
|
|
355
360
|
} else if (context.generalParent.parentOkr) {
|
|
356
361
|
parent = {
|
|
357
|
-
type:
|
|
362
|
+
type: 'okr',
|
|
358
363
|
id: context.generalParent.parentOkr.workId,
|
|
359
364
|
name: context.generalParent.parentOkr.workName
|
|
360
365
|
};
|
|
@@ -363,19 +368,24 @@ function OkrDetailHeader(_ref) {
|
|
|
363
368
|
|
|
364
369
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
|
|
365
370
|
actions: actions,
|
|
371
|
+
actionComponent: /*#__PURE__*/_react["default"].createElement(_wechatBtn["default"], {
|
|
372
|
+
id: detailInfo.workId,
|
|
373
|
+
objType: 62,
|
|
374
|
+
name: detailInfo.workName
|
|
375
|
+
}),
|
|
366
376
|
content: parent ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
367
377
|
className: "okr-detail-head-parent"
|
|
368
378
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
369
379
|
className: "tu-icon-liebiao-duiqinubiao"
|
|
370
380
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
371
381
|
onClick: function onClick() {
|
|
372
|
-
return parent.type ===
|
|
382
|
+
return parent.type === 'okr' ? _drawerManager["default"].open('okrDetail', {
|
|
373
383
|
okrId: parent.id
|
|
374
|
-
}) : _drawerManager["default"].open(
|
|
384
|
+
}) : _drawerManager["default"].open('krDetail', {
|
|
375
385
|
krId: parent.id
|
|
376
386
|
});
|
|
377
387
|
}
|
|
378
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type ===
|
|
388
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null
|
|
379
389
|
}), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
|
|
380
390
|
visible: shareVisible,
|
|
381
391
|
onClose: closeShareModal,
|
|
@@ -412,9 +422,11 @@ function OkrDetailHeader(_ref) {
|
|
|
412
422
|
});
|
|
413
423
|
|
|
414
424
|
case 2:
|
|
415
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
425
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'));
|
|
416
426
|
|
|
417
|
-
|
|
427
|
+
setTimeout(function () {
|
|
428
|
+
commonContext.refreshAll();
|
|
429
|
+
}, 500);
|
|
418
430
|
|
|
419
431
|
case 4:
|
|
420
432
|
case "end":
|
|
@@ -434,7 +446,7 @@ function OkrDetailHeader(_ref) {
|
|
|
434
446
|
})
|
|
435
447
|
}, /*#__PURE__*/_react["default"].createElement("span", null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
436
448
|
style: {
|
|
437
|
-
textAlign:
|
|
449
|
+
textAlign: 'right',
|
|
438
450
|
height: 0
|
|
439
451
|
}
|
|
440
452
|
}, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
@@ -448,9 +460,9 @@ function OkrDetailHeader(_ref) {
|
|
|
448
460
|
selectNodes: context.generalVisibility.visibilityScope || {},
|
|
449
461
|
trigger: /*#__PURE__*/_react["default"].createElement("div", {
|
|
450
462
|
style: {
|
|
451
|
-
visibility:
|
|
463
|
+
visibility: 'hidden',
|
|
452
464
|
zIndex: -1,
|
|
453
|
-
display:
|
|
465
|
+
display: 'inline-block',
|
|
454
466
|
height: 0
|
|
455
467
|
}
|
|
456
468
|
}, "empty select")
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -51,10 +51,33 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
51
51
|
|
|
52
52
|
var preCls = "okr-detail-e";
|
|
53
53
|
|
|
54
|
-
function
|
|
55
|
-
var okrId = props.okrId
|
|
54
|
+
function Elist(props, ref) {
|
|
55
|
+
var okrId = props.okrId,
|
|
56
|
+
_props$hasSearch = props.hasSearch,
|
|
57
|
+
hasSearch = _props$hasSearch === void 0 ? true : _props$hasSearch,
|
|
58
|
+
_props$formatTree = props.formatTree,
|
|
59
|
+
formatTree = _props$formatTree === void 0 ? _util.formatEListDataToSelectTree : _props$formatTree,
|
|
60
|
+
_props$startDate = props.startDate,
|
|
61
|
+
startDate = _props$startDate === void 0 ? '' : _props$startDate,
|
|
62
|
+
_props$endDate = props.endDate,
|
|
63
|
+
endDate = _props$endDate === void 0 ? '' : _props$endDate,
|
|
64
|
+
_props$toLevel = props.toLevel,
|
|
65
|
+
toLevel = _props$toLevel === void 0 ? 999 : _props$toLevel,
|
|
66
|
+
_props$hasdivider = props.hasdivider,
|
|
67
|
+
hasdivider = _props$hasdivider === void 0 ? false : _props$hasdivider,
|
|
68
|
+
className = props.className,
|
|
69
|
+
_props$IncludeNoTaskK = props.IncludeNoTaskKr,
|
|
70
|
+
IncludeNoTaskKr = _props$IncludeNoTaskK === void 0 ? true : _props$IncludeNoTaskK,
|
|
71
|
+
_props$hasLoading = props.hasLoading,
|
|
72
|
+
hasLoading = _props$hasLoading === void 0 ? true : _props$hasLoading,
|
|
73
|
+
_props$IsDateFilter = props.IsDateFilter,
|
|
74
|
+
IsDateFilter = _props$IsDateFilter === void 0 ? false : _props$IsDateFilter,
|
|
75
|
+
emptyPage = props.emptyPage,
|
|
76
|
+
setIsEmpty = props.setIsEmpty,
|
|
77
|
+
_props$layoutPadding = props.layoutPadding,
|
|
78
|
+
layoutPadding = _props$layoutPadding === void 0 ? '0 32px 0 18px' : _props$layoutPadding;
|
|
56
79
|
var loginUser = (0, _bsGlobal.getUserInfo)().Id;
|
|
57
|
-
var hasCondition = localStorage.getItem("hasRememberCondition".concat(loginUser));
|
|
80
|
+
var hasCondition = hasSearch && localStorage.getItem("hasRememberCondition".concat(loginUser));
|
|
58
81
|
|
|
59
82
|
var _useState = (0, _react.useState)([]),
|
|
60
83
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -111,8 +134,9 @@ function _default(props) {
|
|
|
111
134
|
totalDataNum = _useState22[0],
|
|
112
135
|
setTotalDataNum = _useState22[1];
|
|
113
136
|
|
|
114
|
-
var getKrEsData = function getKrEsData() {
|
|
137
|
+
var getKrEsData = function getKrEsData(formatTree) {
|
|
115
138
|
setLoading(true);
|
|
139
|
+
var formatEList = formatTree ? formatTree : _util.formatEListDataToSelectTree;
|
|
116
140
|
(0, _requestApis.getKrsByCondition)({
|
|
117
141
|
okrId: okrId,
|
|
118
142
|
condition: (0, _util.formatCondition)({
|
|
@@ -121,38 +145,53 @@ function _default(props) {
|
|
|
121
145
|
selectName: selectName,
|
|
122
146
|
checkedStatus: checkedStatus,
|
|
123
147
|
users: selectUsers,
|
|
124
|
-
keyWord: searchKey
|
|
148
|
+
keyWord: searchKey,
|
|
149
|
+
startDate: startDate,
|
|
150
|
+
endDate: endDate,
|
|
151
|
+
toLevel: toLevel,
|
|
152
|
+
IncludeNoTaskKr: IncludeNoTaskKr,
|
|
153
|
+
IsDateFilter: IsDateFilter
|
|
125
154
|
})
|
|
126
155
|
}).then(function (krs) {
|
|
127
|
-
var formatKrs = (
|
|
128
|
-
var
|
|
156
|
+
var formatKrs = formatEList(krs, okrId, (0, _util.getIfInitCondition)(selectName, checkedStatus, selectUsers, searchKey));
|
|
157
|
+
var newexpandedKrEs = (formatKrs.krsEList || []).map(function (it) {
|
|
129
158
|
return it.key;
|
|
130
159
|
});
|
|
131
|
-
var
|
|
160
|
+
var newexpandedOEs = (formatKrs.oEList[0] || []).map(function (it) {
|
|
132
161
|
return it.key;
|
|
133
162
|
});
|
|
134
|
-
setExpandedKrEs(
|
|
135
|
-
setExpandedOEs(
|
|
163
|
+
setExpandedKrEs(newexpandedKrEs);
|
|
164
|
+
setExpandedOEs(newexpandedOEs);
|
|
136
165
|
setKrList(formatKrs.krsEList);
|
|
137
166
|
setOEList(formatKrs.oEList);
|
|
138
167
|
setLoading(false);
|
|
139
168
|
});
|
|
140
169
|
};
|
|
141
170
|
|
|
171
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
172
|
+
return {
|
|
173
|
+
getKrEsData: getKrEsData
|
|
174
|
+
};
|
|
175
|
+
});
|
|
142
176
|
(0, _react.useEffect)(function () {
|
|
143
|
-
|
|
144
|
-
|
|
177
|
+
// 可以接收一个格式化方法
|
|
178
|
+
getKrEsData(formatTree);
|
|
179
|
+
}, [noteOrder, searchKey, selectName, checkedStatus, selectUsers, startDate, endDate, okrId]);
|
|
145
180
|
(0, _react.useEffect)(function () {
|
|
146
181
|
var oElistLength = oEList[0] && oEList[0].length || 0;
|
|
147
|
-
|
|
182
|
+
var totalLength = krList.length + oElistLength;
|
|
183
|
+
setTotalDataNum(totalLength);
|
|
184
|
+
setIsEmpty && setIsEmpty(!totalLength);
|
|
148
185
|
}, [krList, oEList]);
|
|
149
186
|
return /*#__PURE__*/_react["default"].createElement(_context.EListContext.Provider, {
|
|
150
187
|
value: {
|
|
151
|
-
refreshEList:
|
|
188
|
+
refreshEList: function refreshEList() {
|
|
189
|
+
return getKrEsData(formatTree);
|
|
190
|
+
}
|
|
152
191
|
}
|
|
153
192
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
154
|
-
className: preCls
|
|
155
|
-
}, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
|
|
193
|
+
className: "".concat(preCls, " ").concat(className)
|
|
194
|
+
}, hasSearch && /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
|
|
156
195
|
checkedStatus: checkedStatus,
|
|
157
196
|
setCheckedStatus: setCheckedStatus,
|
|
158
197
|
selectName: selectName,
|
|
@@ -163,28 +202,30 @@ function _default(props) {
|
|
|
163
202
|
selectUsers: selectUsers,
|
|
164
203
|
setSelectUsers: setSelectUsers,
|
|
165
204
|
okrId: okrId
|
|
166
|
-
})), !loading ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
205
|
+
})), !loading || !hasLoading ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
167
206
|
condition: totalDataNum !== 0
|
|
168
207
|
}, krList.map(function (kr, index) {
|
|
169
208
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], {
|
|
170
|
-
padding:
|
|
209
|
+
padding: layoutPadding
|
|
171
210
|
}, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
|
|
211
|
+
key: Math.random(),
|
|
172
212
|
data: [kr],
|
|
173
213
|
defaultExpandedKeys: expandedKrEs
|
|
174
214
|
})), // kr左后一个节点 && 没有 OE 时,不显示横线
|
|
175
|
-
!(index + 1 == krList.length && oEList.length == 0) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
215
|
+
!(index + 1 == krList.length && oEList.length == 0) && hasdivider && /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
216
|
className: "e__divider"
|
|
177
217
|
}));
|
|
178
|
-
}), oEList.map(function (kr) {
|
|
218
|
+
}), !!oEList && !!oEList.length && oEList.map(function (kr) {
|
|
179
219
|
return /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], {
|
|
180
|
-
padding:
|
|
220
|
+
padding: layoutPadding
|
|
181
221
|
}, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
|
|
222
|
+
key: Math.random(),
|
|
182
223
|
data: kr,
|
|
183
224
|
defaultExpandedKeys: expandedOEs
|
|
184
225
|
}));
|
|
185
226
|
})), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
186
227
|
condition: totalDataNum === 0
|
|
187
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
228
|
+
}, emptyPage ? emptyPage() : /*#__PURE__*/_react["default"].createElement("div", {
|
|
188
229
|
className: "".concat(preCls, "__empty")
|
|
189
230
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
190
231
|
className: "".concat(preCls, "__empty-img"),
|
|
@@ -194,4 +235,9 @@ function _default(props) {
|
|
|
194
235
|
}, "\u6CA1\u6709\u641C\u7D22\u5230\u7B26\u5408\u6761\u4EF6\u7684E-\u6267\u884C")))) : /*#__PURE__*/_react["default"].createElement(_loading["default"], {
|
|
195
236
|
type: "panel"
|
|
196
237
|
})));
|
|
197
|
-
}
|
|
238
|
+
} // @ts-ignore
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
Elist = /*#__PURE__*/(0, _react.forwardRef)(Elist);
|
|
242
|
+
var _default = Elist;
|
|
243
|
+
exports["default"] = _default;
|