@titaui/pc 1.10.4 → 1.10.6-3.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/.eslintrc.js +2 -2
- package/.prettierignore +1 -1
- 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 +108 -87
- package/lib/components/checkbox/index.css +1 -0
- package/lib/components/communication/CommunicationRecord.js +22 -16
- package/lib/components/communication/index.css +50 -10
- package/lib/components/communication/index.js +86 -30
- package/lib/components/communication/style.js +8 -6
- 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-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 +3 -19
- package/lib/components/dynamic/components/obj-status/index.js +7 -8
- package/lib/components/dynamic/components/obj-status/utils.js +37 -0
- package/lib/components/dynamic/components/percent/index.css +1 -1
- package/lib/components/dynamic/components/title/index.css +21 -22
- package/lib/components/dynamic/components/title/index.js +20 -8
- 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 +8 -7
- package/lib/components/dynamic/dynamic-item/components/header/index.js +13 -7
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-kr.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-o.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +44 -27
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +43 -31
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +5 -33
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +6 -32
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +58 -18
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +31 -21
- 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 +56 -44
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +52 -44
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +39 -27
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +25 -29
- package/lib/components/dynamic/dynamic-item/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 +10 -18
- package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/index.js +15 -30
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +9 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +31 -14
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +14 -25
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +25 -40
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +10 -29
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +25 -40
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +13 -30
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +13 -55
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +33 -80
- package/lib/components/dynamic/dynamic-item/dynamic-progress/utils.js +72 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +35 -28
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +13 -24
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-kr.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-o.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-task.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela.svg +23 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +56 -31
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +78 -34
- package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.css +29 -32
- package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.js +12 -18
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +20 -22
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +42 -29
- package/lib/components/dynamic/dynamic-item/dynamic-reward/img/reward.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +8 -3
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +23 -66
- package/lib/components/dynamic/dynamic-item/dynamic-reward/utils.js +28 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +8 -19
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +59 -36
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +32 -28
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +11 -25
- package/lib/components/dynamic/dynamic-item/index.css +59 -4
- package/lib/components/dynamic/dynamic-item/index.js +148 -17
- package/lib/components/dynamic/dynamic-like-ranking/item.js +1 -1
- package/lib/components/dynamic/dynamic-list/index.js +2 -1
- package/lib/components/dynamic/dynamic-topping/item.js +8 -4
- package/lib/components/dynamic/dynamic.js +1 -1
- 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/util.js +41 -81
- package/lib/components/e-status-dropdown/index.css +3 -0
- package/lib/components/e-status-dropdown/index.js +94 -0
- package/lib/components/file-list/components/single-file/index.css +14 -12
- 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/context.js +3 -1
- package/lib/components/mblog/index.css +7 -0
- package/lib/components/mblog/index.js +45 -9
- package/lib/components/mblog/style.js +4 -4
- 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/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 +8 -2
- package/lib/components/nav-top/useGlobalValue.js +14 -0
- 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 +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +27 -13
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-empty.js +7 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +8 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +7 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +20 -1
- package/lib/components/okr-detail/e-list/index.js +23 -7
- package/lib/components/okr-detail/e-list/util.js +7 -2
- package/lib/components/okr-detail/index.js +2 -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-progress-detail/index.js +5 -1
- 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.css +1 -0
- package/lib/components/progress/circle-progress/index.js +8 -3
- 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/search-key-handle/index.js +7 -2
- 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 +131 -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 +94 -0
- package/lib/components/toast/index.js +5 -17
- package/lib/components/upload/index.js +4 -2
- package/lib/components/upload/util.js +2 -0
- package/lib/components/user-selector/empty/index.css +6 -6
- package/lib/components/user-selector/selected-panel/index.css +3 -3
- package/lib/components/video-modal/components/video-box/index.css +240 -0
- package/lib/components/video-modal/components/video-box/index.js +334 -0
- package/lib/components/video-modal/img/bigFaqi.png +0 -0
- package/lib/components/video-modal/img/close.png +0 -0
- package/lib/components/video-modal/img/full.svg +21 -0
- package/lib/components/video-modal/img/muted.svg +14 -0
- package/lib/components/video-modal/img/not-muted.svg +22 -0
- package/lib/components/video-modal/img/pause.svg +13 -0
- package/lib/components/video-modal/img/play.svg +18 -0
- package/lib/components/video-modal/img/small.svg +22 -0
- package/lib/components/video-modal/index.css +83 -0
- package/lib/components/video-modal/index.js +182 -0
- package/lib/components/video-modal/utils.js +25 -0
- package/lib/components/weekly-report/common-painter/openDataPainter.js +5 -1
- package/lib/hooks/useGlobalState.js +63 -0
- package/lib/index.js +40 -0
- 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/new-okr-list/header/index.js +2 -1
- package/lib/pages/new-okr-list/index.js +3 -3
- 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/utils/bs-global.js +13 -9
- package/lib/utils/helpers.js +7 -1
- package/lib/utils/open-data.js +2 -1
- package/lib/utils/tools.js +11 -2
- package/package.json +120 -101
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/guanlian.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-icon.png +0 -0
- package/lib/components/invite-people/img/invite-people.png +0 -0
|
@@ -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
|
|
|
@@ -27,6 +27,8 @@ var _tooltipText = _interopRequireDefault(require("../../../../../tooltip/toolti
|
|
|
27
27
|
|
|
28
28
|
var _getLocale = require("../../../../../../utils/getLocale");
|
|
29
29
|
|
|
30
|
+
var _bsGlobal = require("../../../../../../utils/bs-global");
|
|
31
|
+
|
|
30
32
|
require("./index.css");
|
|
31
33
|
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -39,12 +41,19 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
39
41
|
|
|
40
42
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
var hasProject = (0, _bsGlobal.hasWebHead)("project");
|
|
45
|
+
|
|
46
|
+
var EKrNode = function EKrNode(props) {
|
|
43
47
|
var index = props.index,
|
|
44
48
|
title = props.title,
|
|
45
49
|
data = props.data,
|
|
46
|
-
isOTask = props.isOTask
|
|
50
|
+
isOTask = props.isOTask,
|
|
51
|
+
_props$hasAddProject = props.hasAddProject,
|
|
52
|
+
hasAddProject = _props$hasAddProject === void 0 ? true : _props$hasAddProject,
|
|
53
|
+
_props$hasRelation = props.hasRelation,
|
|
54
|
+
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation;
|
|
47
55
|
var btnRef = (0, _react.useRef)();
|
|
56
|
+
hasProject = hasProject && hasAddProject;
|
|
48
57
|
|
|
49
58
|
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
50
59
|
okrInfo = _useContext.okrInfo;
|
|
@@ -77,7 +86,7 @@ function _default(props) {
|
|
|
77
86
|
while (1) {
|
|
78
87
|
switch (_context.prev = _context.next) {
|
|
79
88
|
case 0:
|
|
80
|
-
if (name
|
|
89
|
+
if (name === "addTask") {
|
|
81
90
|
params = {
|
|
82
91
|
objId: data.workId,
|
|
83
92
|
objType: 4,
|
|
@@ -129,7 +138,7 @@ function _default(props) {
|
|
|
129
138
|
};
|
|
130
139
|
}(), []);
|
|
131
140
|
var openRelatePop = (0, _react.useCallback)(function (name) {
|
|
132
|
-
if (name
|
|
141
|
+
if (name === "relateTask") {
|
|
133
142
|
window.openRelateTaskPop(btnRef.current, {
|
|
134
143
|
okrId: data.workId,
|
|
135
144
|
krId: data.mileStoneId
|
|
@@ -169,9 +178,11 @@ function _default(props) {
|
|
|
169
178
|
}, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("span", {
|
|
170
179
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node-title")),
|
|
171
180
|
onClick: function onClick() {
|
|
172
|
-
data.mileStoneId
|
|
173
|
-
|
|
174
|
-
|
|
181
|
+
if (data.mileStoneId) {
|
|
182
|
+
_drawerManager["default"].open("krDetail", {
|
|
183
|
+
krId: data.mileStoneId
|
|
184
|
+
});
|
|
185
|
+
}
|
|
175
186
|
}
|
|
176
187
|
}, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
177
188
|
text: title,
|
|
@@ -192,11 +203,11 @@ function _default(props) {
|
|
|
192
203
|
icon: "tu-icon-Add-renwu",
|
|
193
204
|
exIconClass: "e-kr-node-layer-icon",
|
|
194
205
|
name: "addTask"
|
|
195
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Addtask"))), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
206
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Addtask"))), hasProject ? /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
196
207
|
icon: "tu-icon-Add-xiangmu",
|
|
197
208
|
exIconClass: "e-kr-node-layer-icon",
|
|
198
209
|
name: "addProject"
|
|
199
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Addproject")))), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
210
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Addproject"))) : /*#__PURE__*/_react["default"].createElement("span", null)), hasRelation && /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
200
211
|
popupPlacement: "bottomRight",
|
|
201
212
|
onChange: openRelatePop,
|
|
202
213
|
trigger: /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -208,9 +219,12 @@ function _default(props) {
|
|
|
208
219
|
icon: "tu-icon-GL-renwu",
|
|
209
220
|
exIconClass: "e-kr-node-layer-icon",
|
|
210
221
|
name: "relateTask"
|
|
211
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Assotask"))), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Assotask"))), hasProject ? /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
212
223
|
icon: "tu-icon-GL-xiangmu",
|
|
213
224
|
exIconClass: "e-kr-node-layer-icon",
|
|
214
225
|
name: "relateProject"
|
|
215
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_AssProjects"))))) : null);
|
|
216
|
-
}
|
|
226
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_AssProjects"))) : /*#__PURE__*/_react["default"].createElement("span", null))) : null);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
var _default = EKrNode;
|
|
230
|
+
exports["default"] = _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -17,10 +17,13 @@ require("./index.css");
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
|
-
function
|
|
20
|
+
var EEmpty = function EEmpty(props) {
|
|
21
21
|
var index = props.index;
|
|
22
22
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
23
23
|
key: index,
|
|
24
24
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-empty-node"))
|
|
25
|
-
}, (0, _getLocale.getLocale)("OKR_MyO_E_SupportedtaskProject")
|
|
26
|
-
}
|
|
25
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_E_SupportedtaskProject"));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var _default = EEmpty;
|
|
29
|
+
exports["default"] = _default;
|
|
@@ -120,6 +120,9 @@ function _default(props) {
|
|
|
120
120
|
window.open(window.location.href.replace(location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(data.id)));
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
+
var workApplyType = data.workApplyType,
|
|
124
|
+
workApplyStatus = data.workApplyStatus;
|
|
125
|
+
var isCreate = (workApplyStatus === 1 || workApplyStatus === 3 || workApplyStatus === 4) && workApplyType === 48;
|
|
123
126
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
127
|
key: index,
|
|
125
128
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node"))
|
|
@@ -130,10 +133,14 @@ function _default(props) {
|
|
|
130
133
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
131
134
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title ")),
|
|
132
135
|
onClick: openProjectDetail
|
|
136
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
137
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title-name "))
|
|
133
138
|
}, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
134
139
|
text: (0, _helpers.escapeHtml)(title),
|
|
135
140
|
isPercent: true
|
|
136
|
-
})), /*#__PURE__*/_react["default"].createElement("
|
|
141
|
+
})), isCreate && /*#__PURE__*/_react["default"].createElement("span", {
|
|
142
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title-approvaling"))
|
|
143
|
+
}, (0, _getLocale.getLocale)('Pro_MyS_Establishment'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
137
144
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions"))
|
|
138
145
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
139
146
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-user"))
|
|
@@ -87,7 +87,11 @@ function ETaskNode(props) {
|
|
|
87
87
|
title = props.title,
|
|
88
88
|
data = props.data,
|
|
89
89
|
createUserId = props.createUserId,
|
|
90
|
-
krUser = props.krUser
|
|
90
|
+
krUser = props.krUser,
|
|
91
|
+
_props$hasProgress = props.hasProgress,
|
|
92
|
+
hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
|
|
93
|
+
_props$hasRelation = props.hasRelation,
|
|
94
|
+
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation;
|
|
91
95
|
|
|
92
96
|
var _useState = (0, _react.useState)(false),
|
|
93
97
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -369,7 +373,7 @@ function ETaskNode(props) {
|
|
|
369
373
|
isLongTerm: dataInfo.isLongTerm,
|
|
370
374
|
isCancel: dataInfo.status === 4,
|
|
371
375
|
isComplete: dataInfo.status === 2
|
|
372
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
376
|
+
})), hasProgress && /*#__PURE__*/_react["default"].createElement("span", {
|
|
373
377
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-progress ").concat((isGray || isCancel) && "".concat(_precls["default"], "__e-project-node-gray")))
|
|
374
378
|
}, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
|
|
375
379
|
size: 22,
|
|
@@ -380,7 +384,7 @@ function ETaskNode(props) {
|
|
|
380
384
|
linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearStartColor", dataInfo.status),
|
|
381
385
|
linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearEndColor", dataInfo.status),
|
|
382
386
|
backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "backgroundColor", dataInfo.status)
|
|
383
|
-
})), okrInfo.status === 1 && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
387
|
+
})), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
384
388
|
overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
|
|
385
389
|
placement: "top"
|
|
386
390
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
.tita-okrdt-tree__e-project-node-title {
|
|
150
|
-
display: inline-
|
|
150
|
+
display: inline-flex;
|
|
151
151
|
font-size: 14px;
|
|
152
152
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
153
153
|
color: #3f4755;
|
|
@@ -158,6 +158,25 @@
|
|
|
158
158
|
flex: 1;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
.tita-okrdt-tree__e-project-node-title-name {
|
|
162
|
+
overflow: hidden;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.tita-okrdt-tree__e-project-node-title-approvaling {
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
justify-content: center;
|
|
169
|
+
min-width: 36px;
|
|
170
|
+
padding: 0 6px;
|
|
171
|
+
height: 20px;
|
|
172
|
+
font-size: 12px;
|
|
173
|
+
font-weight: 400;
|
|
174
|
+
color: #F05E5E;
|
|
175
|
+
background: rgba(240, 94, 94, 0.1);
|
|
176
|
+
border-radius: 10px;
|
|
177
|
+
margin-left: 8px;
|
|
178
|
+
}
|
|
179
|
+
|
|
161
180
|
.tita-okrdt-tree__e-project-node-gray {
|
|
162
181
|
color: #BFC7D5 !important;
|
|
163
182
|
}
|
|
@@ -52,9 +52,19 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
52
52
|
var preCls = "okr-detail-e";
|
|
53
53
|
|
|
54
54
|
function _default(props) {
|
|
55
|
-
var okrId = props.okrId
|
|
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;
|
|
56
66
|
var loginUser = (0, _bsGlobal.getUserInfo)().Id;
|
|
57
|
-
var hasCondition = localStorage.getItem("hasRememberCondition".concat(loginUser));
|
|
67
|
+
var hasCondition = hasSearch && localStorage.getItem("hasRememberCondition".concat(loginUser));
|
|
58
68
|
|
|
59
69
|
var _useState = (0, _react.useState)([]),
|
|
60
70
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -111,8 +121,9 @@ function _default(props) {
|
|
|
111
121
|
totalDataNum = _useState22[0],
|
|
112
122
|
setTotalDataNum = _useState22[1];
|
|
113
123
|
|
|
114
|
-
var getKrEsData = function getKrEsData() {
|
|
124
|
+
var getKrEsData = function getKrEsData(formatTree) {
|
|
115
125
|
setLoading(true);
|
|
126
|
+
var formatEList = formatTree ? formatTree : _util.formatEListDataToSelectTree;
|
|
116
127
|
(0, _requestApis.getKrsByCondition)({
|
|
117
128
|
okrId: okrId,
|
|
118
129
|
condition: (0, _util.formatCondition)({
|
|
@@ -121,10 +132,14 @@ function _default(props) {
|
|
|
121
132
|
selectName: selectName,
|
|
122
133
|
checkedStatus: checkedStatus,
|
|
123
134
|
users: selectUsers,
|
|
124
|
-
keyWord: searchKey
|
|
135
|
+
keyWord: searchKey,
|
|
136
|
+
startDate: startDate,
|
|
137
|
+
endDate: endDate,
|
|
138
|
+
toLevel: toLevel
|
|
125
139
|
})
|
|
126
140
|
}).then(function (krs) {
|
|
127
|
-
|
|
141
|
+
debugger;
|
|
142
|
+
var formatKrs = formatEList(krs, okrId, (0, _util.getIfInitCondition)(selectName, checkedStatus, selectUsers, searchKey));
|
|
128
143
|
var expandedKrEs = (formatKrs.krsEList || []).map(function (it) {
|
|
129
144
|
return it.key;
|
|
130
145
|
});
|
|
@@ -140,7 +155,8 @@ function _default(props) {
|
|
|
140
155
|
};
|
|
141
156
|
|
|
142
157
|
(0, _react.useEffect)(function () {
|
|
143
|
-
|
|
158
|
+
// 可以接收一个格式化方法
|
|
159
|
+
getKrEsData(formatTree);
|
|
144
160
|
}, [noteOrder, searchKey, selectName, checkedStatus, selectUsers]);
|
|
145
161
|
(0, _react.useEffect)(function () {
|
|
146
162
|
var oElistLength = oEList[0] && oEList[0].length || 0;
|
|
@@ -152,7 +168,7 @@ function _default(props) {
|
|
|
152
168
|
}
|
|
153
169
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
154
170
|
className: preCls
|
|
155
|
-
}, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
|
|
171
|
+
}, hasSearch && /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
|
|
156
172
|
checkedStatus: checkedStatus,
|
|
157
173
|
setCheckedStatus: setCheckedStatus,
|
|
158
174
|
selectName: selectName,
|
|
@@ -163,7 +163,10 @@ var formatCondition = function formatCondition(_ref) {
|
|
|
163
163
|
selectName = _ref.selectName,
|
|
164
164
|
checkedStatus = _ref.checkedStatus,
|
|
165
165
|
users = _ref.users,
|
|
166
|
-
keyWord = _ref.keyWord
|
|
166
|
+
keyWord = _ref.keyWord,
|
|
167
|
+
startDate = _ref.startDate,
|
|
168
|
+
endDate = _ref.endDate,
|
|
169
|
+
toLevel = _ref.toLevel;
|
|
167
170
|
var resultStatus = [];
|
|
168
171
|
|
|
169
172
|
if (checkedStatus.includes("all")) {
|
|
@@ -189,10 +192,12 @@ var formatCondition = function formatCondition(_ref) {
|
|
|
189
192
|
pageIndex: 1,
|
|
190
193
|
FeedId: 0,
|
|
191
194
|
filter: 1,
|
|
192
|
-
toLevel: 999,
|
|
195
|
+
toLevel: toLevel || 999,
|
|
193
196
|
app_id: 1,
|
|
194
197
|
app_type: 1,
|
|
195
198
|
FilterKey: keyWord,
|
|
199
|
+
startDate: startDate || '',
|
|
200
|
+
endDate: endDate || '',
|
|
196
201
|
status: resultStatus.join(","),
|
|
197
202
|
userObjects: users.map(function (user) {
|
|
198
203
|
return {
|
|
@@ -345,11 +345,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
345
345
|
avatar: SuperiorUser.UserAvatar
|
|
346
346
|
});
|
|
347
347
|
} else {
|
|
348
|
-
setToUser({
|
|
349
|
-
name: Name,
|
|
350
|
-
userId: Id,
|
|
351
|
-
avatar: UserAvatar
|
|
352
|
-
});
|
|
348
|
+
setToUser({});
|
|
353
349
|
}
|
|
354
350
|
|
|
355
351
|
parenOkrtRef.current && parenOkrtRef.current.show(document.body, 0);
|
|
@@ -222,9 +222,9 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
222
222
|
});
|
|
223
223
|
|
|
224
224
|
return;
|
|
225
|
-
}
|
|
226
|
-
|
|
225
|
+
}
|
|
227
226
|
|
|
227
|
+
setIsExport(true);
|
|
228
228
|
downloadImg();
|
|
229
229
|
};
|
|
230
230
|
|
|
@@ -264,7 +264,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
264
264
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
265
265
|
className: "export-map-modal__color-trans",
|
|
266
266
|
onClick: colorChangeHandler
|
|
267
|
-
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_context2.CommonContext.Provider, {
|
|
267
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, visible && /*#__PURE__*/_react["default"].createElement(_context2.CommonContext.Provider, {
|
|
268
268
|
value: {
|
|
269
269
|
direction: direction,
|
|
270
270
|
showkr: showkr,
|
|
@@ -25,6 +25,8 @@ var _utils = require("./utils");
|
|
|
25
25
|
|
|
26
26
|
var _getLocale = require("../../utils/getLocale");
|
|
27
27
|
|
|
28
|
+
var _dangerousHtml = _interopRequireDefault(require("../dynamic/components/dangerous-html"));
|
|
29
|
+
|
|
28
30
|
require("./index.css");
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -128,7 +130,9 @@ var Detail = function Detail(_ref) {
|
|
|
128
130
|
src: _progressLeftQuoto["default"]
|
|
129
131
|
}) : null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
130
132
|
className: "".concat($prefix, "__content")
|
|
131
|
-
}, content &&
|
|
133
|
+
}, content && /*#__PURE__*/_react["default"].createElement(_dangerousHtml["default"], {
|
|
134
|
+
htmlText: content.trim()
|
|
135
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
132
136
|
className: "".concat($prefix, "__content-bottom")
|
|
133
137
|
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _utils.getTimeString)(time, nowTime)), canEdit && isMouseEnterDetail ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
134
138
|
className: "".concat($prefix, "__bottom-func-btns")
|
|
@@ -28,38 +28,31 @@ var getOSetting = function getOSetting() {
|
|
|
28
28
|
key: 2,
|
|
29
29
|
tooltip: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_SubO")
|
|
30
30
|
}],
|
|
31
|
-
getRecommandText: function getRecommandText(
|
|
32
|
-
var autoUpdate = arguments.length >
|
|
33
|
-
var updateWay = arguments.length >
|
|
31
|
+
getRecommandText: function getRecommandText() {
|
|
32
|
+
var autoUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
33
|
+
var updateWay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
34
|
+
var recommandProgressObj = arguments.length > 2 ? arguments[2] : undefined;
|
|
34
35
|
|
|
35
36
|
if (autoUpdate) {
|
|
36
|
-
if (updateWay
|
|
37
|
+
if (updateWay == 1) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
37
38
|
className: "auto-update__recommand-tip"
|
|
38
|
-
}, (0, _getLocale.getLocale)(
|
|
39
|
-
if (updateWay
|
|
39
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Automatic'));
|
|
40
|
+
if (updateWay == 2) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
40
41
|
className: "auto-update__recommand-tip"
|
|
41
|
-
}, (0, _getLocale.getLocale)(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
textArr.push("".concat((0, _getLocale.getLocale)("OKR_MyO_Ew_SubobjCom")).concat(childOkrProgress).concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Percentage")));
|
|
42
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_calculationSubO'));
|
|
43
|
+
} else {
|
|
44
|
+
var childOkrProgress = recommandProgressObj.childOkrProgress,
|
|
45
|
+
childkrProgress = recommandProgressObj.childkrProgress;
|
|
46
|
+
var textArr = [];
|
|
47
|
+
childkrProgress !== -1 && textArr.push("KR\u5B8C\u6210\u5EA6".concat(childkrProgress, "%"));
|
|
48
|
+
childOkrProgress !== -1 && textArr.push("".concat((0, _getLocale.getLocale)('OKR_MyO_Ew_SubobjCom')).concat(childOkrProgress, "%"));
|
|
49
|
+
if (textArr.length == 0) return '';
|
|
50
|
+
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
51
|
+
className: "auto-update__recommand-icon"
|
|
52
|
+
}, (0, _getLocale.getLocale)('Per_Ass_Pop_title_Recommend')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
53
|
+
className: "auto-update__recommand-tip"
|
|
54
|
+
}, "\uFF08", textArr.join(','), "\uFF09"));
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
if (textArr.length === 0) return "";
|
|
58
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
|
-
className: "auto-update__recommand-icon"
|
|
60
|
-
}, (0, _getLocale.getLocale)("Per_Ass_Pop_title_Recommend")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
|
-
className: "auto-update__recommand-tip"
|
|
62
|
-
}, "\uFF08", textArr.join(","), "\uFF09"));
|
|
63
56
|
}
|
|
64
57
|
};
|
|
65
58
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _openData = require("../../../utils/open-data");
|
|
9
9
|
|
|
@@ -13,12 +13,38 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
13
13
|
|
|
14
14
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15
15
|
|
|
16
|
-
function
|
|
17
|
-
|
|
16
|
+
var getOpenData = function getOpenData(_ref) {
|
|
17
|
+
var id = _ref.id,
|
|
18
|
+
name = _ref.name,
|
|
19
|
+
type = _ref.type;
|
|
20
|
+
var openId = (0, _openData.getOpenId)(id, type);
|
|
21
|
+
if (!window.WWOpenData || !openId) return Promise.resolve(name);
|
|
22
|
+
return new Promise(function (resolve, reject) {
|
|
23
|
+
window.WWOpenData.prefetch({
|
|
24
|
+
items: [{
|
|
25
|
+
id: openId,
|
|
26
|
+
type: type
|
|
27
|
+
}]
|
|
28
|
+
}, function (err, data) {
|
|
29
|
+
if (err) {
|
|
30
|
+
return reject(err);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (data && data.items[0]) {
|
|
34
|
+
resolve(data.items[0].data);
|
|
35
|
+
} else {
|
|
36
|
+
resolve(name);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
function openDataPainter(_x, _x2, _x3) {
|
|
43
|
+
return _openDataPainter.apply(this, arguments);
|
|
18
44
|
}
|
|
19
45
|
|
|
20
|
-
function
|
|
21
|
-
|
|
46
|
+
function _openDataPainter() {
|
|
47
|
+
_openDataPainter = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(ctx, openDataParams, lineHeight) {
|
|
22
48
|
var maxWidth,
|
|
23
49
|
name,
|
|
24
50
|
_ctx$measureText,
|
|
@@ -69,27 +95,8 @@ function _ref() {
|
|
|
69
95
|
}
|
|
70
96
|
}, _callee);
|
|
71
97
|
}));
|
|
72
|
-
return
|
|
98
|
+
return _openDataPainter.apply(this, arguments);
|
|
73
99
|
}
|
|
74
100
|
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
name = _ref2.name,
|
|
78
|
-
type = _ref2.type;
|
|
79
|
-
var openId = (0, _openData.getOpenId)(id, type);
|
|
80
|
-
if (!window.WWOpenData || !openId) return Promise.resolve(name);
|
|
81
|
-
return new Promise(function (resolve, reject) {
|
|
82
|
-
window.WWOpenData.prefetch({
|
|
83
|
-
items: [{
|
|
84
|
-
id: openId,
|
|
85
|
-
type: type
|
|
86
|
-
}]
|
|
87
|
-
}, function (err, data) {
|
|
88
|
-
if (err) {
|
|
89
|
-
return reject(err);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
resolve(data.items[0].data);
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
101
|
+
var _default = openDataPainter;
|
|
102
|
+
exports["default"] = _default;
|