@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
package/.eslintrc.js
CHANGED
|
@@ -62,7 +62,7 @@ module.exports = {
|
|
|
62
62
|
"react/jsx-filename-extension": 0,
|
|
63
63
|
"react/prop-types": 2,
|
|
64
64
|
"react/function-component-definition": 0,
|
|
65
|
-
"react/no-danger":
|
|
65
|
+
"react/no-danger": 0,
|
|
66
66
|
"react/self-closing-comp": 2,
|
|
67
67
|
"no-useless-escape": 2,
|
|
68
68
|
"curly": 2,
|
|
@@ -98,7 +98,7 @@ module.exports = {
|
|
|
98
98
|
"max-len": ["error", { "code": 200 }],
|
|
99
99
|
"lines-between-class-members": 2,
|
|
100
100
|
"no-tabs": 2,
|
|
101
|
-
"react/jsx-indent":
|
|
101
|
+
"react/jsx-indent": 0,
|
|
102
102
|
"react/jsx-closing-tag-location": 2,
|
|
103
103
|
"react/jsx-tag-spacing": 2,
|
|
104
104
|
"react/jsx-indent-props": 2,
|
package/.prettierignore
CHANGED
|
@@ -41,6 +41,10 @@ var bookDemoTransformDataToJson = function bookDemoTransformDataToJson(data, sou
|
|
|
41
41
|
if (item.id === "employeeRange") {
|
|
42
42
|
if (/-/.test(item.value)) {
|
|
43
43
|
result.employeeCount = item.value.split("-")[1];
|
|
44
|
+
} else if (item.value === "10000+") {
|
|
45
|
+
result.employeeCount = "20000";
|
|
46
|
+
} else if (item.value === "我代表一组公司") {
|
|
47
|
+
result.employeeCount = "30000";
|
|
44
48
|
} else {
|
|
45
49
|
result.employeeCount = item.value;
|
|
46
50
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.tita-button-primary {
|
|
20
|
-
background: #
|
|
20
|
+
background: #2879ff;
|
|
21
21
|
color: #ffffff;
|
|
22
22
|
border-radius: 4px;
|
|
23
23
|
box-sizing: border-box;
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.tita-button-primary:hover {
|
|
32
|
-
background: #
|
|
32
|
+
background: #5c8eff;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.tita-button-default {
|
|
36
36
|
background: #ffffff;
|
|
37
37
|
border-radius: 4px;
|
|
38
|
-
border: 1px solid #
|
|
38
|
+
border: 1px solid #2879ff;
|
|
39
39
|
box-sizing: border-box;
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
@@ -45,5 +45,11 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.tita-button-default:hover {
|
|
48
|
-
background: #
|
|
48
|
+
background: #e9f1ff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tita-button--disabled {
|
|
52
|
+
opacity: 0.4;
|
|
53
|
+
cursor: not-allowed;
|
|
54
|
+
user-select: none;
|
|
49
55
|
}
|
|
@@ -13,7 +13,7 @@ var _getLocale = require("../../../utils/getLocale");
|
|
|
13
13
|
|
|
14
14
|
require("./index.css");
|
|
15
15
|
|
|
16
|
-
var _excluded = ["type", "children", "size", "className"];
|
|
16
|
+
var _excluded = ["type", "children", "size", "disable", "className"];
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
@@ -28,20 +28,31 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
28
28
|
var preCls = "tita-button";
|
|
29
29
|
|
|
30
30
|
var Button = function Button(_ref) {
|
|
31
|
+
var _classNames;
|
|
32
|
+
|
|
31
33
|
var _ref$type = _ref.type,
|
|
32
34
|
type = _ref$type === void 0 ? "default" : _ref$type,
|
|
33
35
|
_ref$children = _ref.children,
|
|
34
36
|
children = _ref$children === void 0 ? (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine") : _ref$children,
|
|
35
37
|
_ref$size = _ref.size,
|
|
36
38
|
size = _ref$size === void 0 ? "middle" : _ref$size,
|
|
39
|
+
_ref$disable = _ref.disable,
|
|
40
|
+
disable = _ref$disable === void 0 ? false : _ref$disable,
|
|
37
41
|
_ref$className = _ref.className,
|
|
38
42
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
39
43
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
40
44
|
|
|
41
45
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
42
|
-
className: (0, _classnames["default"])(
|
|
46
|
+
className: (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "-primary"), type === "primary"), _defineProperty(_classNames, "".concat(preCls, "-default"), type === "default"), _defineProperty(_classNames, "".concat(preCls, "--disabled"), disable), _classNames), "".concat(preCls, "-").concat(size), className)
|
|
43
47
|
}, restProps), children);
|
|
44
48
|
};
|
|
45
49
|
|
|
50
|
+
Button.defaultProps = {
|
|
51
|
+
type: "default",
|
|
52
|
+
children: (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"),
|
|
53
|
+
size: "middle",
|
|
54
|
+
disable: false,
|
|
55
|
+
className: ""
|
|
56
|
+
};
|
|
46
57
|
var _default = Button;
|
|
47
58
|
exports["default"] = _default;
|
|
@@ -25,6 +25,8 @@ var _constant = require("./constant");
|
|
|
25
25
|
|
|
26
26
|
var _getLocale = require("../../utils/getLocale");
|
|
27
27
|
|
|
28
|
+
var _tools = require("../../utils/tools");
|
|
29
|
+
|
|
28
30
|
require("./index.css");
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -78,13 +80,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
78
80
|
var pageSize = 20;
|
|
79
81
|
|
|
80
82
|
function parseUser(toUser) {
|
|
83
|
+
if (!toUser || JSON.stringify(toUser) === '{}') return {};
|
|
81
84
|
return {
|
|
82
85
|
Name: toUser.name,
|
|
83
86
|
Id: toUser.userId,
|
|
84
87
|
DepartmentId: 0,
|
|
85
88
|
Email: toUser.email,
|
|
86
89
|
UserAvatar: toUser.avatar,
|
|
87
|
-
Department:
|
|
90
|
+
Department: ''
|
|
88
91
|
};
|
|
89
92
|
} // ChangeOKR 是伴随父组件的出现而出现的, 构造阶段就已经有所有的数据
|
|
90
93
|
|
|
@@ -113,11 +116,11 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
113
116
|
status: null,
|
|
114
117
|
cycle: null,
|
|
115
118
|
type: null,
|
|
116
|
-
users: [user],
|
|
119
|
+
users: JSON.stringify(user) === '{}' ? [] : [user],
|
|
117
120
|
// 构造之后这里还是空的
|
|
118
121
|
departments: [],
|
|
119
122
|
data: [],
|
|
120
|
-
keywords:
|
|
123
|
+
keywords: '',
|
|
121
124
|
loadingMore: false,
|
|
122
125
|
isEnd: false,
|
|
123
126
|
nextPage: 1,
|
|
@@ -141,7 +144,7 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
141
144
|
this.setState({
|
|
142
145
|
users: [user],
|
|
143
146
|
data: [],
|
|
144
|
-
keywords:
|
|
147
|
+
keywords: ''
|
|
145
148
|
});
|
|
146
149
|
}
|
|
147
150
|
}
|
|
@@ -155,20 +158,20 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
155
158
|
// 首次加载的时候 需要把 cycle 通过 cycleType 与 yqmNum 合并出来
|
|
156
159
|
|
|
157
160
|
var url = (0, _requestV.getApiUrl)("customizequery/condition/get?dataKey=".concat(this.DATA_KEY, "&pageId=").concat(this.PAGE_ID));
|
|
158
|
-
(0, _requestV.taker)(url,
|
|
161
|
+
(0, _requestV.taker)(url, 'GET').then(function (res) {
|
|
159
162
|
// condition 设置完筛选条件 然后再调用 getData()
|
|
160
163
|
if (res.Code === 1) {
|
|
161
164
|
var _res$Data = res.Data,
|
|
162
165
|
cycleType = _res$Data.cycleType,
|
|
163
166
|
yqmNum = _res$Data.yqmNum,
|
|
164
167
|
annualNum = _res$Data.annualNum,
|
|
165
|
-
okrType = _res$Data.okrType,
|
|
166
168
|
status = _res$Data.status,
|
|
167
169
|
users = _res$Data.users;
|
|
170
|
+
var okrType = res.Data.okrType;
|
|
168
171
|
var cycle;
|
|
169
|
-
cycleType ||
|
|
172
|
+
cycleType || '';
|
|
170
173
|
|
|
171
|
-
if (cycleType
|
|
174
|
+
if (cycleType === 1 || cycleType === -1) {
|
|
172
175
|
cycle = "".concat(cycleType);
|
|
173
176
|
} else {
|
|
174
177
|
cycle = cycleType ? "".concat(cycleType, ",").concat(yqmNum) : null;
|
|
@@ -176,7 +179,7 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
176
179
|
|
|
177
180
|
var year = annualNum || null; // status = status || 0;
|
|
178
181
|
|
|
179
|
-
okrType = okrType
|
|
182
|
+
okrType = okrType === undefined ? null : okrType;
|
|
180
183
|
|
|
181
184
|
if (!_this2.KRSetting.OkrTypeSetting) {
|
|
182
185
|
okrType = null;
|
|
@@ -188,8 +191,8 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
188
191
|
year: year,
|
|
189
192
|
status: status,
|
|
190
193
|
type: okrType,
|
|
191
|
-
users: [user],
|
|
192
|
-
keywords:
|
|
194
|
+
users: JSON.stringify(user) === '{}' ? [] : [user],
|
|
195
|
+
keywords: '',
|
|
193
196
|
nextPage: 1
|
|
194
197
|
}, function () {
|
|
195
198
|
return _this2.getListData();
|
|
@@ -209,9 +212,9 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
209
212
|
Id: id,
|
|
210
213
|
DepartmentId: 0,
|
|
211
214
|
Email: email,
|
|
212
|
-
Department:
|
|
213
|
-
UserAvatar:
|
|
214
|
-
keywords:
|
|
215
|
+
Department: '',
|
|
216
|
+
UserAvatar: '',
|
|
217
|
+
keywords: '',
|
|
215
218
|
nextPage: 1
|
|
216
219
|
};
|
|
217
220
|
})
|
|
@@ -239,13 +242,15 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
239
242
|
isEnd = _this$state.isEnd,
|
|
240
243
|
departments = _this$state.departments,
|
|
241
244
|
keywords = _this$state.keywords,
|
|
242
|
-
remembered = _this$state.remembered;
|
|
245
|
+
remembered = _this$state.remembered; // container
|
|
246
|
+
|
|
243
247
|
var _this$props = this.props,
|
|
244
248
|
className = _this$props.className,
|
|
245
249
|
okrPopType = _this$props.okrPopType,
|
|
246
250
|
parentId = _this$props.parentId,
|
|
247
|
-
|
|
248
|
-
|
|
251
|
+
hideCancelBtn = _this$props.hideCancelBtn,
|
|
252
|
+
alilgn = _this$props.alilgn,
|
|
253
|
+
autoAdjust = _this$props.autoAdjust;
|
|
249
254
|
var activeItem = selected || {
|
|
250
255
|
workId: parentId
|
|
251
256
|
};
|
|
@@ -258,8 +263,8 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
258
263
|
ref: function ref(r) {
|
|
259
264
|
return _this3.pop = r;
|
|
260
265
|
},
|
|
261
|
-
align:
|
|
262
|
-
autoAdjust:
|
|
266
|
+
align: alilgn,
|
|
267
|
+
autoAdjust: autoAdjust,
|
|
263
268
|
onBeforeShow: this.onBeforeShow,
|
|
264
269
|
onAfterShow: this.onAfterShow,
|
|
265
270
|
onBeforeHide: this.onBeforeShow,
|
|
@@ -272,7 +277,7 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
272
277
|
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.Header, null, (0, _constant.getPopType)()[okrPopType], /*#__PURE__*/_react["default"].createElement("i", {
|
|
273
278
|
className: "tu-icon-close",
|
|
274
279
|
style: {
|
|
275
|
-
cursor:
|
|
280
|
+
cursor: 'pointer'
|
|
276
281
|
},
|
|
277
282
|
onClick: this.hide
|
|
278
283
|
})), /*#__PURE__*/_react["default"].createElement(_styledComponents.Body, null, /*#__PURE__*/_react["default"].createElement(_Filter["default"], {
|
|
@@ -291,11 +296,10 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
291
296
|
ref: function ref(r) {
|
|
292
297
|
return _this3.list = r;
|
|
293
298
|
}
|
|
294
|
-
}, data.map(function (d
|
|
299
|
+
}, data.map(function (d) {
|
|
295
300
|
return /*#__PURE__*/_react["default"].createElement(_Item["default"], {
|
|
296
301
|
data: d,
|
|
297
302
|
keywords: keywords,
|
|
298
|
-
key: "".concat(d.workId).concat(i),
|
|
299
303
|
active: activeItem,
|
|
300
304
|
onSelect: function onSelect(data) {
|
|
301
305
|
return _this3.handleSelect(data);
|
|
@@ -306,21 +310,21 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
306
310
|
onClick: function onClick() {
|
|
307
311
|
return _this3.getListData(true);
|
|
308
312
|
}
|
|
309
|
-
}, loadingMore ? "".concat((0, _getLocale.getLocale)(
|
|
313
|
+
}, loadingMore ? "".concat((0, _getLocale.getLocale)('Mod_loading'), "\u2026") : (0, _getLocale.getLocale)('OKR_MyO_Butt_Loadmore'), /*#__PURE__*/_react["default"].createElement("i", {
|
|
310
314
|
className: "tu-icon-arrow-down"
|
|
311
|
-
}))), !!data.length && isEnd && /*#__PURE__*/_react["default"].createElement(_styledComponents.NoMore, null, (0, _getLocale.getLocale)(
|
|
315
|
+
}))), !!data.length && isEnd && /*#__PURE__*/_react["default"].createElement(_styledComponents.NoMore, null, (0, _getLocale.getLocale)('Mod_Nomore'), "\uFF5E"))), /*#__PURE__*/_react["default"].createElement(_styledComponents.Footer, null, okrPopType === 1 && parentId !== 0 && !hideCancelBtn && /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
|
|
312
316
|
type: "confirm",
|
|
313
317
|
onClick: this.handleUnConnect
|
|
314
|
-
}, (0, _getLocale.getLocale)(
|
|
318
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_Cancel')), /*#__PURE__*/_react["default"].createElement(_styledComponents.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
|
|
315
319
|
onClick: this.hide
|
|
316
|
-
}, (0, _getLocale.getLocale)(
|
|
320
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
|
|
317
321
|
style: {
|
|
318
322
|
marginLeft: 15
|
|
319
323
|
},
|
|
320
|
-
disabled: !selected && parentId
|
|
324
|
+
disabled: !selected && parentId === 0,
|
|
321
325
|
type: "confirm",
|
|
322
326
|
onClick: this.handleConfirm
|
|
323
|
-
}, (0, _getLocale.getLocale)(
|
|
327
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Determine'))))));
|
|
324
328
|
}
|
|
325
329
|
}]);
|
|
326
330
|
|
|
@@ -335,9 +339,9 @@ ChangeOkr.defaultProps = {
|
|
|
335
339
|
var _initialiseProps = function _initialiseProps() {
|
|
336
340
|
var _this4 = this;
|
|
337
341
|
|
|
338
|
-
this.PAGE_ID = this.props.okrPopType
|
|
342
|
+
this.PAGE_ID = this.props.okrPopType === 1 ? 40001 : 40011;
|
|
339
343
|
this.DATA_KEY = "62_".concat((0, _bsGlobal.getUserInfo)().Id);
|
|
340
|
-
this.KRSetting = (0, _bsGlobal.getBSGlobal)(
|
|
344
|
+
this.KRSetting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting;
|
|
341
345
|
this.page = 1;
|
|
342
346
|
this.moveX = 0;
|
|
343
347
|
this.pending = false;
|
|
@@ -363,9 +367,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
363
367
|
});
|
|
364
368
|
}
|
|
365
369
|
|
|
366
|
-
if (okrPopType
|
|
370
|
+
if (okrPopType === 1) {
|
|
367
371
|
_this4.setState({
|
|
368
|
-
keywords:
|
|
372
|
+
keywords: '',
|
|
369
373
|
nextPage: 1
|
|
370
374
|
});
|
|
371
375
|
}
|
|
@@ -386,21 +390,21 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
386
390
|
};
|
|
387
391
|
|
|
388
392
|
this.onBeforeShow = function () {
|
|
389
|
-
var p = document.querySelector(
|
|
393
|
+
var p = document.querySelector('.okr-panel-changeOkrPop'); // @ts-ignore
|
|
390
394
|
|
|
391
395
|
p && (p.style.transform = "translate(".concat(_this4.moveX, "px,-20px) scale(0)"));
|
|
392
396
|
};
|
|
393
397
|
|
|
394
398
|
this.onAfterShow = function () {
|
|
395
|
-
var p = document.querySelector(
|
|
399
|
+
var p = document.querySelector('.okr-panel-changeOkrPop'); // @ts-ignore
|
|
396
400
|
|
|
397
|
-
p && (p.style.transform =
|
|
401
|
+
p && (p.style.transform = 'translate(0,0) scale(1)');
|
|
398
402
|
};
|
|
399
403
|
|
|
400
404
|
this.handleFilterChange = function (propName, value) {
|
|
401
405
|
var _this4$setState;
|
|
402
406
|
|
|
403
|
-
if (propName
|
|
407
|
+
if (propName === 'clear') {
|
|
404
408
|
_this4.setState({
|
|
405
409
|
users: [],
|
|
406
410
|
departments: [],
|
|
@@ -419,7 +423,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
419
423
|
|
|
420
424
|
_this4.setState((_this4$setState = {}, _defineProperty(_this4$setState, propName, value), _defineProperty(_this4$setState, "nextPage", 1), _defineProperty(_this4$setState, "remembered", false), _this4$setState), _this4.getListData);
|
|
421
425
|
|
|
422
|
-
if (propName
|
|
426
|
+
if (propName === 'remembered' && value) {
|
|
423
427
|
_this4.setState(_defineProperty({}, propName, value));
|
|
424
428
|
|
|
425
429
|
_this4.saveCondition(_this4.state.users, _this4.state.departments);
|
|
@@ -427,7 +431,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
427
431
|
return;
|
|
428
432
|
}
|
|
429
433
|
|
|
430
|
-
if (propName
|
|
434
|
+
if (propName === 'remembered' && !value) {
|
|
431
435
|
_this4.setState(_defineProperty({}, propName, value));
|
|
432
436
|
|
|
433
437
|
_this4.deleteCondition();
|
|
@@ -435,7 +439,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
435
439
|
};
|
|
436
440
|
|
|
437
441
|
this.saveCondition = function (users, depts) {
|
|
438
|
-
var url = (0, _requestV.getApiUrl)(
|
|
442
|
+
var url = (0, _requestV.getApiUrl)('customizequery/condition/save');
|
|
439
443
|
var departmentIdsArr = depts.map(function (item) {
|
|
440
444
|
return item.Id;
|
|
441
445
|
});
|
|
@@ -449,31 +453,31 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
449
453
|
// 用户ID_项目ID_里程碑ID
|
|
450
454
|
pageId: _this4.PAGE_ID,
|
|
451
455
|
// 列表页Id
|
|
452
|
-
startTime:
|
|
456
|
+
startTime: '',
|
|
453
457
|
// 开始时间
|
|
454
|
-
endTime:
|
|
458
|
+
endTime: '',
|
|
455
459
|
// 结束时间
|
|
456
|
-
departmentIds: departmentIdsArr.join(
|
|
460
|
+
departmentIds: departmentIdsArr.join(','),
|
|
457
461
|
// 部门id
|
|
458
462
|
userObjects: [{
|
|
459
|
-
Id:
|
|
460
|
-
Name:
|
|
461
|
-
Email:
|
|
463
|
+
Id: '',
|
|
464
|
+
Name: '',
|
|
465
|
+
Email: '',
|
|
462
466
|
Relation: 0
|
|
463
467
|
}],
|
|
464
468
|
// 用户id
|
|
465
|
-
scope:
|
|
466
|
-
|
|
467
|
-
categoryIds:
|
|
469
|
+
scope: '',
|
|
470
|
+
//范围
|
|
471
|
+
categoryIds: '',
|
|
468
472
|
// 分类
|
|
469
|
-
sortType:
|
|
473
|
+
sortType: '',
|
|
470
474
|
// 排序
|
|
471
475
|
annualNum: year,
|
|
472
476
|
// 0 -1 undefined 1999
|
|
473
477
|
status: status,
|
|
474
478
|
okrType: type,
|
|
475
|
-
cycleType: cycle ? "".concat(cycle).split(
|
|
476
|
-
yqmNum: cycle ? "".concat(cycle).split(
|
|
479
|
+
cycleType: cycle ? "".concat(cycle).split(',')[0] : null,
|
|
480
|
+
yqmNum: cycle ? "".concat(cycle).split(',')[1] : null
|
|
477
481
|
};
|
|
478
482
|
data.userObjects = [];
|
|
479
483
|
users.forEach(function (item) {
|
|
@@ -484,21 +488,23 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
484
488
|
Relation: 0
|
|
485
489
|
});
|
|
486
490
|
});
|
|
487
|
-
(0, _requestV.taker)(url,
|
|
491
|
+
(0, _requestV.taker)(url, 'POST', data);
|
|
488
492
|
};
|
|
489
493
|
|
|
490
494
|
this.deleteCondition = function () {
|
|
491
495
|
var url = (0, _requestV.getApiUrl)("customizequery/condition/delete?dataKey=".concat(_this4.DATA_KEY, "&pageId=").concat(_this4.PAGE_ID));
|
|
492
|
-
(0, _requestV.taker)(url,
|
|
496
|
+
(0, _requestV.taker)(url, 'DELETE', {});
|
|
493
497
|
};
|
|
494
498
|
|
|
495
499
|
this.scollListToTop = function () {
|
|
496
|
-
|
|
500
|
+
if (_this4.list) {
|
|
501
|
+
_this4.list.scrollTop = 0;
|
|
502
|
+
}
|
|
497
503
|
};
|
|
498
504
|
|
|
499
505
|
this.getListData = /*#__PURE__*/function () {
|
|
500
506
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(isLoading) {
|
|
501
|
-
var _this4$state2,
|
|
507
|
+
var _this4$state2, keywords, type, users, departments, data, nextPage, toUserId, _this4$state3, status, cycle, year, okrPopType, url;
|
|
502
508
|
|
|
503
509
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
504
510
|
while (1) {
|
|
@@ -512,11 +518,13 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
512
518
|
return _context.abrupt("return");
|
|
513
519
|
|
|
514
520
|
case 2:
|
|
515
|
-
_this4$state2 = _this4.state,
|
|
516
|
-
cycle = cycle
|
|
521
|
+
_this4$state2 = _this4.state, keywords = _this4$state2.keywords, type = _this4$state2.type, users = _this4$state2.users, departments = _this4$state2.departments, data = _this4$state2.data, nextPage = _this4$state2.nextPage, toUserId = _this4$state2.toUserId;
|
|
522
|
+
_this4$state3 = _this4.state, status = _this4$state3.status, cycle = _this4$state3.cycle, year = _this4$state3.year;
|
|
523
|
+
okrPopType = _this4.props.okrPopType;
|
|
524
|
+
cycle = cycle || '-1';
|
|
517
525
|
year = year || -1;
|
|
518
526
|
status = status || 0;
|
|
519
|
-
url = (0, _requestV.getApiUrl)(
|
|
527
|
+
url = (0, _requestV.getApiUrl)('okr/search');
|
|
520
528
|
_this4.pending = true;
|
|
521
529
|
|
|
522
530
|
if (isLoading) {
|
|
@@ -529,38 +537,38 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
529
537
|
_this4.page = 1;
|
|
530
538
|
}
|
|
531
539
|
|
|
532
|
-
(0, _requestV.taker)(url,
|
|
540
|
+
(0, _requestV.taker)(url, 'POST', {
|
|
533
541
|
// 优秀!
|
|
534
542
|
|
|
535
543
|
/**
|
|
536
544
|
* pageNum: 0
|
|
537
545
|
* pageSize: 20
|
|
538
546
|
*/
|
|
539
|
-
cycleType: "".concat(cycle).split(
|
|
540
|
-
yqmNum: "".concat(cycle).split(
|
|
547
|
+
cycleType: "".concat(cycle).split(',')[0],
|
|
548
|
+
yqmNum: "".concat(cycle).split(',')[1] || 0,
|
|
541
549
|
// 如果是 undefined 就控制成 0 说明没有第二条件
|
|
542
550
|
annualNum: year,
|
|
543
|
-
pageNum: nextPage
|
|
551
|
+
pageNum: nextPage === 0 ? 1 : _this4.page,
|
|
544
552
|
// pageNum 最小是1
|
|
545
553
|
pageSize: pageSize,
|
|
546
554
|
status: status,
|
|
547
555
|
keywords: keywords,
|
|
548
|
-
okrType: type
|
|
549
|
-
orderType:
|
|
550
|
-
// 13:按人员排序
|
|
556
|
+
okrType: type === -1 ? '' : type,
|
|
557
|
+
orderType: 1,
|
|
558
|
+
// 13:按人员排序 1按照创建时间最晚排序
|
|
551
559
|
departmentIds: departments.map(function (d) {
|
|
552
560
|
return d.Id;
|
|
553
|
-
}).join(
|
|
561
|
+
}).join(','),
|
|
554
562
|
userIds: users.map(function (u) {
|
|
555
563
|
return u.Id;
|
|
556
|
-
}).join(
|
|
557
|
-
searchKr:
|
|
564
|
+
}).join(','),
|
|
565
|
+
searchKr: okrPopType,
|
|
558
566
|
// 是否搜索KR:默认为0-不搜索,1-只有对齐目标弹层可以搜索KR
|
|
559
|
-
toUserId:
|
|
567
|
+
toUserId: toUserId
|
|
560
568
|
}).then(function (res) {
|
|
561
569
|
_this4.pending = false;
|
|
562
570
|
var resData = res && res.Data && res.Data.works || [];
|
|
563
|
-
var isRefresh = _this4.page
|
|
571
|
+
var isRefresh = _this4.page === 1;
|
|
564
572
|
|
|
565
573
|
_this4.setState({
|
|
566
574
|
nextPage: res.Data.nextPage,
|
|
@@ -568,16 +576,24 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
568
576
|
data: isRefresh ? resData : [].concat(_toConsumableArray(data), _toConsumableArray(resData)),
|
|
569
577
|
isEnd: res.Data.nextPage === 0
|
|
570
578
|
}, function () {
|
|
571
|
-
|
|
579
|
+
console.log(_this4.state.data);
|
|
580
|
+
|
|
581
|
+
if (isRefresh) {
|
|
582
|
+
_this4.scollListToTop();
|
|
583
|
+
}
|
|
572
584
|
});
|
|
573
|
-
})["catch"](function (
|
|
585
|
+
})["catch"](function () {
|
|
574
586
|
_this4.pending = false;
|
|
575
|
-
_this4.state.loadingMore
|
|
576
|
-
|
|
577
|
-
|
|
587
|
+
var loadingMore = _this4.state.loadingMore;
|
|
588
|
+
|
|
589
|
+
if (loadingMore) {
|
|
590
|
+
_this4.setState({
|
|
591
|
+
loadingMore: false
|
|
592
|
+
});
|
|
593
|
+
}
|
|
578
594
|
});
|
|
579
595
|
|
|
580
|
-
case
|
|
596
|
+
case 12:
|
|
581
597
|
case "end":
|
|
582
598
|
return _context.stop();
|
|
583
599
|
}
|
|
@@ -601,7 +617,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
601
617
|
selectData.workId = 0;
|
|
602
618
|
}
|
|
603
619
|
|
|
604
|
-
if (selected && (selectData.workId && selected.workId && selectData.workId
|
|
620
|
+
if (selected && (selectData.workId && selected.workId && selectData.workId === selected.workId || selectData.mileStoneId && selected.mileStoneId && selectData.mileStoneId === selected.mileStoneId)) return;
|
|
605
621
|
|
|
606
622
|
_this4.setState({
|
|
607
623
|
selected: selectData,
|
|
@@ -610,9 +626,12 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
610
626
|
};
|
|
611
627
|
|
|
612
628
|
this.handleConfirm = function () {
|
|
613
|
-
var _this4$
|
|
614
|
-
selected = _this4$
|
|
615
|
-
selectOkr = _this4$
|
|
629
|
+
var _this4$state4 = _this4.state,
|
|
630
|
+
selected = _this4$state4.selected,
|
|
631
|
+
selectOkr = _this4$state4.selectOkr;
|
|
632
|
+
var _this4$props2 = _this4.props,
|
|
633
|
+
onConfirm = _this4$props2.onConfirm,
|
|
634
|
+
parentId = _this4$props2.parentId;
|
|
616
635
|
var parentType = selected && selected.mileStoneId ? 2 : 1; // 临时注入
|
|
617
636
|
|
|
618
637
|
var data = _objectSpread(_objectSpread({}, selected), {}, {
|
|
@@ -621,28 +640,30 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
621
640
|
|
|
622
641
|
|
|
623
642
|
data.parentType = parentType;
|
|
643
|
+
data.workName = (0, _tools.htmlToText)(data.workName);
|
|
624
644
|
|
|
625
|
-
if (selected && (selected.workId || selected.mileStoneId)
|
|
626
|
-
|
|
645
|
+
if (selected && (selected.workId || selected.mileStoneId) !== parentId) {
|
|
646
|
+
onConfirm(data);
|
|
627
647
|
}
|
|
628
648
|
|
|
629
649
|
_this4.hide();
|
|
630
650
|
};
|
|
631
651
|
|
|
632
652
|
this.handleUnConnect = function () {
|
|
633
|
-
// 取消关联对齐目标
|
|
634
|
-
|
|
653
|
+
var onConfirm = _this4.props.onConfirm; // 取消关联对齐目标
|
|
654
|
+
|
|
655
|
+
onConfirm({
|
|
635
656
|
workId: 0,
|
|
636
|
-
workName:
|
|
657
|
+
workName: '',
|
|
637
658
|
mileStoneId: 0,
|
|
638
|
-
mileStoneName:
|
|
659
|
+
mileStoneName: '',
|
|
639
660
|
parentType: 0
|
|
640
661
|
});
|
|
641
662
|
|
|
642
663
|
_this4.setState({
|
|
643
664
|
selected: {
|
|
644
665
|
workId: 0,
|
|
645
|
-
workName:
|
|
666
|
+
workName: ''
|
|
646
667
|
}
|
|
647
668
|
});
|
|
648
669
|
|