@titaui/pc 1.12.65 → 1.12.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/attachments-preview/index.css +9 -0
- package/lib/components/attachments-preview/index.js +116 -0
- package/lib/components/auto-save/img/failed.svg +17 -0
- package/lib/components/auto-save/img/success.svg +16 -0
- package/lib/components/auto-save/index.css +39 -0
- package/lib/components/auto-save/index.js +78 -0
- package/lib/components/auto-save/interface.js +5 -0
- package/lib/components/avatar/default.js +5 -2
- package/lib/components/avatar/index.css +2 -0
- package/lib/components/color-date-picker/index.css +69 -0
- package/lib/components/color-date-picker/index.js +129 -0
- package/lib/components/color-date-picker/interface.js +14 -0
- package/lib/components/dialog-confirm/index.css +1 -0
- package/lib/components/dialog-confirm/index.js +8 -4
- package/lib/components/dialog-upload/img/doc.svg +1 -0
- package/lib/components/dialog-upload/img/other.svg +1 -0
- package/lib/components/dialog-upload/img/pdf.svg +1 -0
- package/lib/components/dialog-upload/img/ppt.svg +1 -0
- package/lib/components/dialog-upload/img/radio.svg +1 -0
- package/lib/components/dialog-upload/img/video.svg +1 -0
- package/lib/components/dialog-upload/img/xls.svg +1 -0
- package/lib/components/dialog-upload/index.css +77 -0
- package/lib/components/dialog-upload/index.js +332 -0
- package/lib/components/dialog-upload/type.js +35 -0
- package/lib/components/dialog-upload/uploaded-preview.css +80 -0
- package/lib/components/dialog-upload/uploaded-preview.js +134 -0
- package/lib/components/dialog-upload/util.js +131 -0
- package/lib/components/drawer/index.css +5 -5
- package/lib/components/drawer/index.js +7 -7
- package/lib/components/drop-selector/index.js +7 -4
- package/lib/components/dynamic/components/comments-dialog/api.js +27 -0
- package/lib/components/dynamic/components/comments-dialog/encourage.js +127 -0
- package/lib/components/dynamic/components/comments-dialog/img/APP-shoucang-m.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/ascore.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curEfforts.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curGood.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curGreat.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/efforts.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/good.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/great.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/halfscore.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/loading.gif +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/score.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/top.svg +14 -0
- package/lib/components/dynamic/components/comments-dialog/index.css +116 -0
- package/lib/components/dynamic/components/comments-dialog/index.js +208 -0
- package/lib/components/dynamic/components/comments-dialog/rate.js +143 -0
- package/lib/components/dynamic/constant.js +5 -1
- package/lib/components/dynamic/dynamic-item/components/header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.js +49 -47
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +31 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +217 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +176 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/request-api.js +10 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/utils.js +27 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.js +26 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.js +26 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.css +197 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +222 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/request-api.js +20 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/util.js +134 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.js +60 -0
- package/lib/components/dynamic/dynamic-item/components/progress/index.css +25 -0
- package/lib/components/dynamic/dynamic-item/components/progress/index.js +71 -0
- package/lib/components/dynamic/dynamic-item/components/progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +36 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +31 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/guide-img.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +187 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +426 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +49 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +23 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +30 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +57 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +50 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +67 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +29 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +310 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +193 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +22 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +80 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/request-api.js +16 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +158 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-write.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/evaluate-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-write.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-write.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +115 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +212 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +43 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +49 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +152 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +254 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +67 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +4 -21
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +3 -5
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/index.css +3 -2
- package/lib/components/dynamic/dynamic-item/index.js +52 -33
- package/lib/components/dynamic/dynamic-list/index.js +8 -8
- package/lib/components/form/form-fields/date/index.js +9 -8
- package/lib/components/guide-tip/index.css +68 -0
- package/lib/components/guide-tip/index.js +115 -0
- package/lib/components/import-modal/helper.js +170 -0
- package/lib/components/import-modal/image/loading.gif +0 -0
- package/lib/components/import-modal/import-okr-modal/index.css +18 -0
- package/lib/components/import-modal/import-okr-modal/index.js +146 -0
- package/lib/components/import-modal/import-task-modal/index.css +18 -0
- package/lib/components/import-modal/import-task-modal/index.js +251 -0
- package/lib/components/import-modal/import-task-modal/search-form.js +142 -0
- package/lib/components/import-modal/index.css +30 -0
- package/lib/components/import-modal/index.js +20 -0
- package/lib/components/import-modal/radio.js +62 -0
- package/lib/components/import-modal/request-api.js +206 -0
- package/lib/components/import-modal/search/category-select.js +74 -0
- package/lib/components/import-modal/search/okr-classify-select.js +74 -0
- package/lib/components/import-modal/search/okr-status-select.js +74 -0
- package/lib/components/import-modal/search/okr-type-select.js +87 -0
- package/lib/components/import-modal/search/principal.js +135 -0
- package/lib/components/import-modal/search/relation.js +89 -0
- package/lib/components/import-modal/search/search-dropdown/index.css +50 -0
- package/lib/components/import-modal/search/search-dropdown/index.js +32 -0
- package/lib/components/import-modal/search/task-relation.js +84 -0
- package/lib/components/import-modal/search/task-status-select.js +87 -0
- package/lib/components/import-modal/search/work-relation.js +83 -0
- package/lib/components/import-modal/search/work-status-select.js +74 -0
- package/lib/components/import-modal/tree/okr-tree/index.css +61 -0
- package/lib/components/import-modal/tree/okr-tree/index.js +269 -0
- package/lib/components/import-modal/tree/okr-tree/search-form.js +169 -0
- package/lib/components/import-modal/tree/task-work-tree/index.css +124 -0
- package/lib/components/import-modal/tree/task-work-tree/index.js +190 -0
- package/lib/components/import-modal/tree-node/index.css +0 -0
- package/lib/components/import-modal/tree-node/index.js +51 -0
- package/lib/components/import-modal/tree-node/kr-node/index.css +65 -0
- package/lib/components/import-modal/tree-node/kr-node/index.js +112 -0
- package/lib/components/import-modal/tree-node/milestone-node/index.css +61 -0
- package/lib/components/import-modal/tree-node/milestone-node/index.js +118 -0
- package/lib/components/import-modal/tree-node/o-node/index.css +53 -0
- package/lib/components/import-modal/tree-node/o-node/index.js +142 -0
- package/lib/components/import-modal/tree-node/work-node/index.css +51 -0
- package/lib/components/import-modal/tree-node/work-node/index.js +108 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/caidan-enjoy.svg +14 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-setup.svg +18 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-zongjie.svg +15 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/zongjie-s.svg +15 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.css +120 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.js +22 -2
- package/lib/components/menus/components/menu-tree/tree-node/menu-item.js +5 -1
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +78 -0
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +78 -0
- package/lib/components/menus/components/search-colleague/index.js +3 -1
- package/lib/components/menus/export-modules/appraisal-menus/index.js +6 -6
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +69 -69
- package/lib/components/menus/export-modules/demo-menus/menus.js +5 -4
- package/lib/components/menus/export-modules/interview-menus/constant.js +12 -12
- package/lib/components/menus/export-modules/okr-menus/index.js +6 -6
- package/lib/components/menus/export-modules/okr-menus/menus.js +60 -60
- package/lib/components/menus/export-modules/okr-menus/okr-front-menus.js +2 -2
- package/lib/components/menus/export-modules/summary-menus/depart-menus/helper.js +56 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.css +32 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +243 -0
- package/lib/components/menus/export-modules/summary-menus/index.css +9 -0
- package/lib/components/menus/export-modules/summary-menus/index.js +136 -0
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +76 -0
- package/lib/components/menus/export-modules/summary-menus/menus.js +251 -0
- package/lib/components/menus/export-modules/summary-menus/request-api.js +17 -0
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/helper.js +28 -0
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.css +14 -0
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.js +201 -0
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +250 -0
- package/lib/components/menus/i18n.js +8 -0
- package/lib/components/menus/index.js +6 -0
- package/lib/components/menus/request-apis.js +22 -2
- package/lib/components/nav-top/components/app-center/images/demo.png +0 -0
- package/lib/components/nav-top/components/app-center/images/new.svg +30 -0
- package/lib/components/nav-top/components/app-center/index.css +24 -1
- package/lib/components/nav-top/components/app-center/index.js +18 -10
- package/lib/components/nav-top/components/menu/index.css +11 -0
- package/lib/components/nav-top/components/menu/index.js +49 -53
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +28 -17
- package/lib/components/nav-top/components/user-message/index.js +19 -19
- package/lib/components/nav-top/index.css +5 -0
- package/lib/components/nav-top/index.js +39 -2
- package/lib/components/new-confidence/constant.js +53 -0
- package/lib/components/new-confidence/img/1.svg +40 -0
- package/lib/components/new-confidence/img/10.svg +33 -0
- package/lib/components/new-confidence/img/2.svg +40 -0
- package/lib/components/new-confidence/img/3.svg +40 -0
- package/lib/components/new-confidence/img/4.svg +40 -0
- package/lib/components/new-confidence/img/5.svg +40 -0
- package/lib/components/new-confidence/img/6.svg +40 -0
- package/lib/components/new-confidence/img/7.svg +40 -0
- package/lib/components/new-confidence/img/8.svg +40 -0
- package/lib/components/new-confidence/img/9.svg +40 -0
- package/lib/components/new-confidence/index.css +62 -0
- package/lib/components/new-confidence/index.js +120 -0
- package/lib/components/new-confidence/interface.js +5 -0
- package/lib/components/okr-detail/components/header/index.js +1 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +6 -6
- package/lib/components/okr-flow/export-modal/index.css +3 -3
- package/lib/components/okr-flow/export-modal/index.js +1 -1
- package/lib/components/okr-flow/okr-map/index.js +3 -1
- package/lib/components/order-have-award/index.js +6 -6
- package/lib/components/period-selector/components/button/style.js +5 -5
- package/lib/components/picker/components/cross.svg +17 -0
- package/lib/components/picker/components/panels/date-panel/date-body.js +31 -19
- package/lib/components/picker/components/panels/date-panel/date-head.js +8 -8
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.css +5 -0
- package/lib/components/picker/components/panels/month-panel/index.js +35 -4
- package/lib/components/picker/components/panels/month-panel/month-body.js +4 -5
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/week-panel/index.css +51 -0
- package/lib/components/picker/components/panels/week-panel/index.js +63 -0
- package/lib/components/picker/components/panels/week-panel/utils.js +153 -0
- package/lib/components/picker/components/panels/week-panel/week-body.js +79 -0
- package/lib/components/picker/components/panels/week-panel/week-head.js +80 -0
- package/lib/components/picker/components/panels/year-panel/index.css +5 -0
- package/lib/components/picker/components/panels/year-panel/index.js +1 -1
- package/lib/components/picker/components/panels/year-panel/year-body.js +10 -3
- package/lib/components/picker/components/picker-trigger/index.css +6 -1
- package/lib/components/picker/components/picker-trigger/index.js +16 -11
- package/lib/components/picker/context.js +17 -2
- package/lib/components/picker/index.css +29 -1
- package/lib/components/picker/index.js +3 -0
- package/lib/components/picker/picker-panels.js +106 -60
- package/lib/components/picker/picker.js +44 -30
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +97 -0
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +109 -0
- package/lib/components/picker/range-picker/components/placeholder/index.js +91 -0
- package/lib/components/picker/range-picker/components/select-input/index.js +79 -0
- package/lib/components/picker/range-picker/components/shortcuts/index.js +45 -0
- package/lib/components/picker/range-picker/index.css +158 -0
- package/lib/components/picker/range-picker/index.js +263 -0
- package/lib/components/picker/utils.js +168 -11
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +117 -0
- package/lib/components/promise-confirm/interface.js +5 -0
- package/lib/components/rate/index.css +111 -0
- package/lib/components/rate/index.js +79 -0
- package/lib/components/regulation-setting-item/index.css +33 -0
- package/lib/components/regulation-setting-item/index.js +37 -0
- package/lib/components/rich-editor/schemas/list.js +0 -1
- package/lib/components/rich-editor/ui/editor/index.css +32 -32
- package/lib/components/rich-editor/ui/editor/index.js +1 -1
- package/lib/components/rich-editor-at/components/index.css +67 -0
- package/lib/components/rich-editor-at/components/index.js +189 -0
- package/lib/components/rich-editor-at/index.css +40 -0
- package/lib/components/rich-editor-at/index.js +113 -0
- package/lib/components/rich-editor-upload/index.css +11 -0
- package/lib/components/rich-editor-upload/index.js +87 -0
- package/lib/components/search-input/index.js +5 -0
- package/lib/components/select-tags/index.js +12 -2
- package/lib/components/task-relation-modal/helper.js +6 -6
- package/lib/components/task-relation-modal/request-api.js +9 -9
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +4 -4
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +5 -5
- package/lib/components/textarea/index.css +61 -66
- package/lib/components/textarea/index.js +23 -18
- package/lib/components/toast/index.js +1 -1
- package/lib/components/tooltip/tooltip.js +2 -2
- package/lib/components/upvote/index.js +10 -4
- package/lib/components/upvote/selector.js +2 -3
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +1 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +1 -1
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +3 -3
- package/lib/components/user-selector/request-apis.js +13 -13
- package/lib/components/write-summary-modal/constants.js +21 -0
- package/lib/components/write-summary-modal/index.css +80 -0
- package/lib/components/write-summary-modal/index.js +167 -0
- package/lib/components/write-summary-modal/interface.js +19 -0
- package/lib/components/write-summary-modal/request-api.js +18 -0
- package/lib/components/write-summary-modal/utils.js +32 -0
- package/lib/components-v1/radio/style/index.css +1 -1
- package/lib/index.js +64 -0
- package/lib/pages/aha2021/new-menu-switcher/index.js +4 -4
- package/lib/pages/aha2021/request-api.js +1 -1
- package/lib/utils/auth.js +10 -0
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +14 -2
- package/lib/utils/helpers.js +112 -12
- package/lib/utils/open-data.js +41 -42
- package/lib/utils/planDataJson.js +1 -0
- package/package.json +3 -2
- package/lib/components/dynamic/img/dynamic-submit-delay.svg +0 -16
- package/lib/components/dynamic/img/dynamic-submit-normal.svg +0 -18
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = _default;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _resizeObserverPolyfill = _interopRequireDefault(require("resize-observer-polyfill"));
|
|
15
|
+
|
|
16
|
+
var _menuTree = _interopRequireDefault(require("../../../components/menu-tree"));
|
|
17
|
+
|
|
18
|
+
var _requestApis = require("../../../request-apis");
|
|
19
|
+
|
|
20
|
+
var _utils = require("../../../utils");
|
|
21
|
+
|
|
22
|
+
var _scrollbar = _interopRequireDefault(require("../../../../scrollbar"));
|
|
23
|
+
|
|
24
|
+
var _helper = require("./helper");
|
|
25
|
+
|
|
26
|
+
var _precls = _interopRequireDefault(require("../../../precls"));
|
|
27
|
+
|
|
28
|
+
require("../../../index.css");
|
|
29
|
+
|
|
30
|
+
require("./index.css");
|
|
31
|
+
|
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
|
+
|
|
34
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
|
+
|
|
36
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
+
|
|
38
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
39
|
+
|
|
40
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
41
|
+
|
|
42
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
43
|
+
|
|
44
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
45
|
+
|
|
46
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
47
|
+
|
|
48
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
49
|
+
|
|
50
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
|
+
|
|
52
|
+
function _default(props) {
|
|
53
|
+
var toUserId = props.toUserId;
|
|
54
|
+
var loadedNode = (0, _react.useRef)([]);
|
|
55
|
+
|
|
56
|
+
var _useState = (0, _react.useState)(true),
|
|
57
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
+
loading = _useState2[0],
|
|
59
|
+
setLoading = _useState2[1];
|
|
60
|
+
|
|
61
|
+
var _useState3 = (0, _react.useState)(["".concat(toUserId)]),
|
|
62
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
63
|
+
expandedKeys = _useState4[0];
|
|
64
|
+
|
|
65
|
+
var _useState5 = (0, _react.useState)([]),
|
|
66
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
67
|
+
treeData = _useState6[0],
|
|
68
|
+
setTreeData = _useState6[1];
|
|
69
|
+
|
|
70
|
+
var _useState7 = (0, _react.useState)([]),
|
|
71
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
72
|
+
rawTreeData = _useState8[0],
|
|
73
|
+
setRawTreeData = _useState8[1];
|
|
74
|
+
|
|
75
|
+
var _useState9 = (0, _react.useState)([]),
|
|
76
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
77
|
+
selectedMenuKeys = _useState10[0],
|
|
78
|
+
setSelectedMenuKeys = _useState10[1];
|
|
79
|
+
|
|
80
|
+
var _useState11 = (0, _react.useState)(window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0),
|
|
81
|
+
_useState12 = _slicedToArray(_useState11, 1),
|
|
82
|
+
loginUserId = _useState12[0];
|
|
83
|
+
|
|
84
|
+
var _useState13 = (0, _react.useState)(function () {
|
|
85
|
+
return document.body.offsetHeight - 200;
|
|
86
|
+
}),
|
|
87
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
88
|
+
maxHeight = _useState14[0],
|
|
89
|
+
setMaxHeight = _useState14[1];
|
|
90
|
+
|
|
91
|
+
(0, _react.useEffect)(function () {
|
|
92
|
+
setLoading(true); // 获取登陆者的直接/虚线下级
|
|
93
|
+
|
|
94
|
+
(0, _requestApis.getSubordinates)({
|
|
95
|
+
toUserId: loginUserId,
|
|
96
|
+
relationIds: "1,2"
|
|
97
|
+
}, {
|
|
98
|
+
disabledDottedSubordinatesDig: true
|
|
99
|
+
}).then(function (users) {
|
|
100
|
+
var rawTreeData = (0, _helper.transToTreeNode)(users); // 要过滤掉那些既是登录者的虚线下级,又是登录者下属的下级,让他默认展开的时候重新获取
|
|
101
|
+
|
|
102
|
+
var newRawTreeData = rawTreeData.filter(function (item) {
|
|
103
|
+
return item.pid === loginUserId;
|
|
104
|
+
});
|
|
105
|
+
setRawTreeData(newRawTreeData);
|
|
106
|
+
setTreeData((0, _utils.toTree)(newRawTreeData));
|
|
107
|
+
setLoading(false);
|
|
108
|
+
});
|
|
109
|
+
}, []);
|
|
110
|
+
|
|
111
|
+
var loadNodes = function loadNodes(nodeId) {
|
|
112
|
+
// 钻去隔级的直接下级
|
|
113
|
+
return (0, _requestApis.getSubordinates)({
|
|
114
|
+
toUserId: nodeId,
|
|
115
|
+
relationIds: "1"
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
var filterData = function filterData(newNode, oldNode) {
|
|
120
|
+
var mark = {};
|
|
121
|
+
newNode.forEach(function (item) {
|
|
122
|
+
mark[item.userId] = true;
|
|
123
|
+
});
|
|
124
|
+
var newArry = oldNode.filter(function (item) {
|
|
125
|
+
return !mark[item.id];
|
|
126
|
+
});
|
|
127
|
+
return newArry;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
131
|
+
if (loadedNode.current.includes(treeNode.id)) return null;
|
|
132
|
+
return new Promise(function (resolve) {
|
|
133
|
+
var promise = loadNodes(treeNode.id);
|
|
134
|
+
if (!promise) return resolve(true);
|
|
135
|
+
promise.then(function (nodes) {
|
|
136
|
+
var _treeNode$children;
|
|
137
|
+
|
|
138
|
+
if (!nodes.length) return null;
|
|
139
|
+
var oldRawTreeData = rawTreeData;
|
|
140
|
+
|
|
141
|
+
if (treeNode !== null && treeNode !== void 0 && (_treeNode$children = treeNode.children) !== null && _treeNode$children !== void 0 && _treeNode$children.length) {
|
|
142
|
+
oldRawTreeData = filterData(nodes, oldRawTreeData);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
(0, _helper.transToTreeNode)(nodes).forEach(function (it) {
|
|
146
|
+
return oldRawTreeData.push(it);
|
|
147
|
+
});
|
|
148
|
+
setRawTreeData(oldRawTreeData);
|
|
149
|
+
setTreeData((0, _utils.toTree)(oldRawTreeData));
|
|
150
|
+
return true;
|
|
151
|
+
});
|
|
152
|
+
resolve(true);
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
|
|
157
|
+
var node = _ref.node;
|
|
158
|
+
// 处理菜单选中
|
|
159
|
+
if (!selectedKyes.length) return;
|
|
160
|
+
location.href = "#/summary/manage?toUserId=".concat(node.id);
|
|
161
|
+
setSelectedMenuKeys(selectedKyes);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
(0, _react.useEffect)(function () {
|
|
165
|
+
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
166
|
+
var _iterator = _createForOfIteratorHelper(entries),
|
|
167
|
+
_step;
|
|
168
|
+
|
|
169
|
+
try {
|
|
170
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
171
|
+
var entry = _step.value;
|
|
172
|
+
var cr = entry.contentRect;
|
|
173
|
+
setMaxHeight(cr.height - 200);
|
|
174
|
+
}
|
|
175
|
+
} catch (err) {
|
|
176
|
+
_iterator.e(err);
|
|
177
|
+
} finally {
|
|
178
|
+
_iterator.f();
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
obs.observe(document.body);
|
|
182
|
+
return function () {
|
|
183
|
+
obs.unobserve(document.body);
|
|
184
|
+
};
|
|
185
|
+
}, []);
|
|
186
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
187
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__subordinate-menus"))
|
|
188
|
+
}, loading ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
189
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__subordinate-menus--loading"))
|
|
190
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null)) : /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
191
|
+
style: {
|
|
192
|
+
maxHeight: maxHeight
|
|
193
|
+
}
|
|
194
|
+
}, /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|
|
195
|
+
data: treeData,
|
|
196
|
+
defaultExpandedKeys: expandedKeys,
|
|
197
|
+
selectedKeys: selectedMenuKeys,
|
|
198
|
+
onSelect: onSelectHandler,
|
|
199
|
+
loadData: onLoadTreeNodeDataHandler
|
|
200
|
+
})));
|
|
201
|
+
}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _resizeObserverPolyfill = _interopRequireDefault(require("resize-observer-polyfill"));
|
|
13
|
+
|
|
14
|
+
var _scrollbar = _interopRequireDefault(require("../../../scrollbar"));
|
|
15
|
+
|
|
16
|
+
var _menuTree = _interopRequireDefault(require("../../components/menu-tree"));
|
|
17
|
+
|
|
18
|
+
var _index = require("../../components/menu-tree/tree-node/index");
|
|
19
|
+
|
|
20
|
+
var _menus = _interopRequireWildcard(require("./menus"));
|
|
21
|
+
|
|
22
|
+
var _menuHighlight = _interopRequireDefault(require("./menu-highlight"));
|
|
23
|
+
|
|
24
|
+
var _requestApis = require("../../request-apis");
|
|
25
|
+
|
|
26
|
+
var _requestApi = require("./request-api");
|
|
27
|
+
|
|
28
|
+
var _auth = require("../../../../utils/auth");
|
|
29
|
+
|
|
30
|
+
require("../../index.css");
|
|
31
|
+
|
|
32
|
+
require("./index.css");
|
|
33
|
+
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
|
+
|
|
36
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
|
+
|
|
38
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
|
+
|
|
40
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
41
|
+
|
|
42
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
+
|
|
44
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
45
|
+
|
|
46
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
47
|
+
|
|
48
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
49
|
+
|
|
50
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
+
|
|
52
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
+
|
|
54
|
+
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
55
|
+
var _props$onSelect = props.onSelect,
|
|
56
|
+
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
|
|
57
|
+
history = props.history;
|
|
58
|
+
var baseAuth = new _auth.BaseAuth();
|
|
59
|
+
|
|
60
|
+
var _useState = (0, _react.useState)(function () {
|
|
61
|
+
return document.body.offsetHeight - 198;
|
|
62
|
+
}),
|
|
63
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
64
|
+
maxHeight = _useState2[0],
|
|
65
|
+
setMaxHeight = _useState2[1];
|
|
66
|
+
|
|
67
|
+
var _useState3 = (0, _react.useState)(['myokr']),
|
|
68
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
69
|
+
expandedKeys = _useState4[0],
|
|
70
|
+
setExpandedKeys = _useState4[1];
|
|
71
|
+
|
|
72
|
+
var _useState5 = (0, _react.useState)([]),
|
|
73
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
74
|
+
selectedMenuKeys = _useState6[0],
|
|
75
|
+
setSelectedMenuKeys = _useState6[1];
|
|
76
|
+
|
|
77
|
+
var _useState7 = (0, _react.useState)(false),
|
|
78
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
79
|
+
isShowShare = _useState8[0],
|
|
80
|
+
setIsShowShare = _useState8[1];
|
|
81
|
+
|
|
82
|
+
var isShowDepartment = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isDepartmentLeader() || baseAuth.isHrbp();
|
|
83
|
+
var flipRef = (0, _react.useRef)({
|
|
84
|
+
next: function next() {},
|
|
85
|
+
goback: function goback() {}
|
|
86
|
+
});
|
|
87
|
+
var summaryMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
88
|
+
|
|
89
|
+
var _useState9 = (0, _react.useState)(function () {
|
|
90
|
+
summaryMenusData.current = new _menus["default"]({
|
|
91
|
+
isShowShare: false,
|
|
92
|
+
isShowDept: true
|
|
93
|
+
});
|
|
94
|
+
return summaryMenusData.current.getMenus();
|
|
95
|
+
}),
|
|
96
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
97
|
+
menus = _useState10[0],
|
|
98
|
+
setMenus = _useState10[1]; // 判断路由高亮菜单
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
(0, _react.useEffect)(function () {
|
|
102
|
+
var menuHighlight = new _menuHighlight["default"](history);
|
|
103
|
+
menuHighlight.highlight(function (menu) {
|
|
104
|
+
return changeHighlightMenu([menu]);
|
|
105
|
+
});
|
|
106
|
+
}, [history.location.pathname, history.location.search]);
|
|
107
|
+
|
|
108
|
+
var changeHighlightMenu = function changeHighlightMenu(menuKeys) {
|
|
109
|
+
setSelectedMenuKeys(menuKeys);
|
|
110
|
+
flipRef.current.goback();
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
|
|
114
|
+
var node = _ref.node;
|
|
115
|
+
var nodeType = node.nodeType,
|
|
116
|
+
data = node.data;
|
|
117
|
+
|
|
118
|
+
if (nodeType == _index.USER_NODE || nodeType == _index.FOLLOWER_NODE) {
|
|
119
|
+
location.href = "#/summary/manage?toUserId=".concat(data.userId, "&subordinates=1");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
onSelect(node); // 处理菜单选中
|
|
123
|
+
|
|
124
|
+
if (!selectedKyes.length) return; // setSelectedMenuKeys(selectedKyes) // 为了点总结管理规定的时候不高亮这个菜单,这个菜单新页面打开的,自测没影响,有影响了再说
|
|
125
|
+
}; // 获取下属数据列表
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
var getSubordinaters = function getSubordinaters() {
|
|
129
|
+
return new Promise(function (resolve, reject) {
|
|
130
|
+
var mdata = summaryMenusData.current; // 初始化 Loading
|
|
131
|
+
|
|
132
|
+
mdata.setSubordinatesLoading(true);
|
|
133
|
+
setMenus(mdata.getMenus());
|
|
134
|
+
resolve(true); // 获取数据
|
|
135
|
+
|
|
136
|
+
(0, _requestApis.getSubordinates)({
|
|
137
|
+
relationIds: '1,2'
|
|
138
|
+
}, {
|
|
139
|
+
disabledDottedSubordinatesDig: true
|
|
140
|
+
}).then(function (users) {
|
|
141
|
+
mdata.setSubordinatesLoading(false);
|
|
142
|
+
mdata.insertSubordinates(users);
|
|
143
|
+
setMenus(mdata.getMenus());
|
|
144
|
+
resolve(true);
|
|
145
|
+
})["catch"](reject);
|
|
146
|
+
});
|
|
147
|
+
}; // 获取共享我的数据列表
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
var getShareUsers = function getShareUsers() {
|
|
151
|
+
return new Promise(function (resolve, reject) {
|
|
152
|
+
var mdata = summaryMenusData.current; // 初始化 Loading
|
|
153
|
+
|
|
154
|
+
mdata.setShareLoading(true);
|
|
155
|
+
setMenus(mdata.getMenus());
|
|
156
|
+
resolve(true); // 获取数据
|
|
157
|
+
|
|
158
|
+
(0, _requestApis.getShareUsersData)().then(function (users) {
|
|
159
|
+
console.log(users);
|
|
160
|
+
mdata.setShareLoading(false);
|
|
161
|
+
mdata.insertShare(users);
|
|
162
|
+
setMenus(mdata.getMenus());
|
|
163
|
+
resolve(true);
|
|
164
|
+
})["catch"](reject);
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
169
|
+
return new Promise(function (resolve) {
|
|
170
|
+
if (treeNode.key == summaryMenusData.current.SUBORDINATES) {
|
|
171
|
+
getSubordinaters().then(function () {
|
|
172
|
+
return resolve(true);
|
|
173
|
+
})["catch"](function () {
|
|
174
|
+
return resolve(true);
|
|
175
|
+
});
|
|
176
|
+
} else if (treeNode.key == summaryMenusData.current.SHARE) {
|
|
177
|
+
getShareUsers().then(function () {
|
|
178
|
+
return resolve(true);
|
|
179
|
+
})["catch"](function () {
|
|
180
|
+
return resolve(true);
|
|
181
|
+
});
|
|
182
|
+
} else {
|
|
183
|
+
resolve(true);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
var onExpandHandler = function onExpandHandler(expandKeys, _ref2) {
|
|
189
|
+
var expanded = _ref2.expanded,
|
|
190
|
+
node = _ref2.node;
|
|
191
|
+
setExpandedKeys(expandKeys);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
195
|
+
return {
|
|
196
|
+
setSelectedMenuKeys: setSelectedMenuKeys
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
(0, _react.useEffect)(function () {
|
|
200
|
+
var newMenu = new _menus["default"]({
|
|
201
|
+
isShowShare: isShowShare,
|
|
202
|
+
isShowDept: isShowDepartment
|
|
203
|
+
});
|
|
204
|
+
summaryMenusData.current = newMenu;
|
|
205
|
+
setMenus(newMenu.getMenus());
|
|
206
|
+
}, [isShowShare, isShowDepartment]);
|
|
207
|
+
(0, _react.useEffect)(function () {
|
|
208
|
+
(0, _requestApi.getShareStatus)().then(function (resp) {
|
|
209
|
+
if (resp.Code === 1) {
|
|
210
|
+
if (resp.Data.length > 0) {
|
|
211
|
+
setIsShowShare(true);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
216
|
+
var _iterator = _createForOfIteratorHelper(entries),
|
|
217
|
+
_step;
|
|
218
|
+
|
|
219
|
+
try {
|
|
220
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
221
|
+
var entry = _step.value;
|
|
222
|
+
var cr = entry.contentRect;
|
|
223
|
+
setMaxHeight(cr.height - 198);
|
|
224
|
+
}
|
|
225
|
+
} catch (err) {
|
|
226
|
+
_iterator.e(err);
|
|
227
|
+
} finally {
|
|
228
|
+
_iterator.f();
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
obs.observe(document.body);
|
|
232
|
+
return function () {
|
|
233
|
+
obs.unobserve(document.body);
|
|
234
|
+
};
|
|
235
|
+
}, []);
|
|
236
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
237
|
+
style: {
|
|
238
|
+
maxHeight: maxHeight
|
|
239
|
+
}
|
|
240
|
+
}, /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|
|
241
|
+
data: menus,
|
|
242
|
+
selectedKeys: selectedMenuKeys,
|
|
243
|
+
expandedKeys: expandedKeys,
|
|
244
|
+
onSelect: onSelectHandler,
|
|
245
|
+
onExpand: onExpandHandler,
|
|
246
|
+
loadData: onLoadTreeNodeDataHandler
|
|
247
|
+
})));
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
exports["default"] = _default;
|
|
@@ -50,6 +50,14 @@ var I18N = /*#__PURE__*/_createClass(function I18N() {
|
|
|
50
50
|
this.menu_regulation_daily = "Regul_Menu_DailyReport";
|
|
51
51
|
this.menu_regulation_weekly = "Regul_Menu_WeeklyReport";
|
|
52
52
|
this.menu_regulation_monthly = "Regul_Menu_MonthlyReport";
|
|
53
|
+
this.menu_all_summary = 'DailyReport_Menu_AllReports';
|
|
54
|
+
this.menu_my_summary = 'Rep_Tab_Mysmary';
|
|
55
|
+
this.menu_my_subordinates = 'Datadetails_Menu_DirectReports';
|
|
56
|
+
this.menu_my_share = 'Rep_NewS_Share';
|
|
57
|
+
this.menu_department = 'OKR_Ali_From_Viewdepartment';
|
|
58
|
+
this.menu_summary_role = 'Rep_NewS_ManaRegu';
|
|
59
|
+
this.menu_summary_count = 'Data_Summarystatistics';
|
|
60
|
+
this.menu_summary = 'Rep_NewS_Management';
|
|
53
61
|
});
|
|
54
62
|
|
|
55
63
|
var locale = new I18N();
|
|
@@ -21,6 +21,8 @@ require("./index.css");
|
|
|
21
21
|
|
|
22
22
|
var _demoMenus = _interopRequireDefault(require("./export-modules/demo-menus"));
|
|
23
23
|
|
|
24
|
+
var _summaryMenus = _interopRequireDefault(require("./export-modules/summary-menus"));
|
|
25
|
+
|
|
24
26
|
var _excluded = ["type"];
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -56,6 +58,10 @@ var Menus = function Menus(props) {
|
|
|
56
58
|
return /*#__PURE__*/_react["default"].createElement(_interviewMenus["default"], restProps);
|
|
57
59
|
}
|
|
58
60
|
|
|
61
|
+
if (type === 'summary') {
|
|
62
|
+
return /*#__PURE__*/_react["default"].createElement(_summaryMenus["default"], restProps);
|
|
63
|
+
}
|
|
64
|
+
|
|
59
65
|
return undefined;
|
|
60
66
|
};
|
|
61
67
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.removeFollower = exports.getSubordinates = exports.getFollowerList = exports.getDepsAndUsers = exports.addFollower = void 0;
|
|
6
|
+
exports.removeFollower = exports.getSubordinates = exports.getShareUsersData = exports.getMyDepartMent = exports.getFollowerList = exports.getDepsAndUsers = exports.addFollower = void 0;
|
|
7
7
|
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
|
|
@@ -96,6 +96,20 @@ var getSubordinates = function getSubordinates(_ref) {
|
|
|
96
96
|
|
|
97
97
|
exports.getSubordinates = getSubordinates;
|
|
98
98
|
|
|
99
|
+
var getShareUsersData = function getShareUsersData() {
|
|
100
|
+
return (0, _request.rget)("v1")("summary/getShareUsers?toUserId=".concat(userId)).then(function (res) {
|
|
101
|
+
var users = [];
|
|
102
|
+
|
|
103
|
+
if (res.Code === 1) {
|
|
104
|
+
users = res.Data;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return users;
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
exports.getShareUsersData = getShareUsersData;
|
|
112
|
+
|
|
99
113
|
var addFollower = function addFollower(id) {
|
|
100
114
|
return _axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/follow/addFollower?followerId=").concat(id), null, {
|
|
101
115
|
headers: {
|
|
@@ -137,4 +151,10 @@ var getDepsAndUsers = function getDepsAndUsers() {
|
|
|
137
151
|
});
|
|
138
152
|
};
|
|
139
153
|
|
|
140
|
-
exports.getDepsAndUsers = getDepsAndUsers;
|
|
154
|
+
exports.getDepsAndUsers = getDepsAndUsers;
|
|
155
|
+
|
|
156
|
+
var getMyDepartMent = function getMyDepartMent() {
|
|
157
|
+
return (0, _request.rget)('v2')("department/sub/depsAndUsersByPrivilege?objType=8&isGetUser=false");
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
exports.getMyDepartMent = getMyDepartMent;
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="36px" height="26px" viewBox="0 0 36 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>气泡</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<path d="M26.0757238,0 C26.0757238,0 26.5924276,0.590963041 26.752784,2.04150869 C26.8839846,3.22831876 26.7408566,3.5759702 26.6844729,3.66315551 L26.6693863,3.6833642 L26.6693863,3.6833642 C26.6636971,3.68904201 27.2516704,3.6353181 27.3942094,3.25925071 C27.5358931,2.88547554 28.1011492,5.62102555 27.2497105,6.55512322 C27.2725189,6.60410922 27.2788178,6.63812034 27.2701648,6.65847289 C27.7385548,7.67365164 28,8.80629392 28,10 C28,14.418278 24.418278,18 20,18 L8,18 C3.581722,18 5.41083001e-16,14.418278 0,10 C-5.41083001e-16,5.581722 3.581722,2 8,2 L20,2 C20.4454205,2 20.8823388,2.03640207 21.3079422,2.10639354 C21.2551772,2.04616026 21.2417596,2.01501277 21.2749755,2.02035937 C21.4000713,1.99627315 21.6377016,1.90182651 22.0846325,1.61171738 C22.9398664,1.05657029 23.1002227,0.823766663 23.1002227,0.823766663 C23.1002227,0.823766663 23.2249443,1.19983405 23.1714922,1.53113152 C23.1180401,1.86242898 23.064588,2.05941666 23.064588,2.05941666 C23.064588,2.05941666 24.2583519,1.98778477 24.9888641,1.27146594 C25.7193764,0.555147099 26.0757238,0 26.0757238,0 Z" id="path-1"></path>
|
|
6
|
+
<filter x="-25.0%" y="-27.8%" width="150.0%" height="177.8%" filterUnits="objectBoundingBox" id="filter-2">
|
|
7
|
+
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
|
8
|
+
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
|
9
|
+
<feColorMatrix values="0 0 0 0 0.941176471 0 0 0 0 0.368627451 0 0 0 0 0.368627451 0 0 0 0.4 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
|
10
|
+
</filter>
|
|
11
|
+
</defs>
|
|
12
|
+
<g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
13
|
+
<g id="top-面谈" transform="translate(-797.000000, -7.000000)">
|
|
14
|
+
<g id="一级菜单" transform="translate(204.000000, 3.000000)">
|
|
15
|
+
<g id="气泡" transform="translate(597.000000, 6.000000)">
|
|
16
|
+
<text id="new" font-family="Arial-BoldMT, Arial" font-size="12" font-weight="bold" line-spacing="18" fill="#FFFFFF">
|
|
17
|
+
<tspan x="1" y="11">new</tspan>
|
|
18
|
+
</text>
|
|
19
|
+
<g id="hot" fill-rule="nonzero">
|
|
20
|
+
<g id="形状">
|
|
21
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
|
|
22
|
+
<use fill="#F05E5E" xlink:href="#path-1"></use>
|
|
23
|
+
</g>
|
|
24
|
+
<path d="M4.61115455,12.8702703 L4.61115455,10.2702703 C4.61115455,9.62882883 4.65224568,9.18918919 4.73442794,8.95135135 C4.8166102,8.71351351 4.96855182,8.52252252 5.1902528,8.37837838 C5.41195378,8.23423423 5.662323,8.16216216 5.94136044,8.16216216 C6.15923899,8.16216216 6.34558249,8.21261261 6.50039093,8.31351351 C6.65519937,8.41441441 6.76700547,8.55585586 6.83580923,8.73783784 C6.90461298,8.91981982 6.93901486,9.32072072 6.93901486,9.94054054 L6.93901486,9.94054054 L6.93901486,12.8702703 L8.5501694,12.8702703 L8.5501694,9.3027027 C8.5501694,8.85945946 8.52054557,8.51891892 8.46129789,8.28108108 C8.40205021,8.04324324 8.29693337,7.83063063 8.14594735,7.64324324 C7.99496134,7.45585586 7.77230475,7.3018018 7.47797759,7.18108108 C7.18365042,7.06036036 6.85874381,7 6.50325775,7 C5.69672487,7 5.0277995,7.32432432 4.49648163,7.97297297 L4.49648163,7.97297297 L4.49648163,7.12972973 L3,7.12972973 L3,12.8702703 L4.61115455,12.8702703 Z M12.6669273,13 C13.3358527,13 13.8929719,12.854955 14.3382851,12.5648649 C14.7835983,12.2747748 15.1094605,11.8522523 15.3158718,11.2972973 L15.3158718,11.2972973 L13.7104509,11.0432432 C13.622535,11.3315315 13.4925723,11.5405405 13.3205629,11.6702703 C13.1485536,11.8 12.9364087,11.8648649 12.6841282,11.8648649 C12.3133524,11.8648649 12.0037356,11.7396396 11.7552776,11.4891892 C11.5068196,11.2387387 11.3768569,10.8882883 11.3653896,10.4378378 L11.3653896,10.4378378 L15.4018765,10.4378378 C15.4248111,9.27387387 15.1744418,8.40990991 14.6507688,7.84594595 C14.1270958,7.28198198 13.4123013,7 12.5063852,7 C11.6998523,7 11.0328382,7.26936937 10.5053427,7.80810811 C9.97784728,8.34684685 9.71409956,9.09189189 9.71409956,10.0432432 C9.71409956,10.8396396 9.91477717,11.4990991 10.3161324,12.0216216 C10.8245157,12.6738739 11.608114,13 12.6669273,13 Z M13.8021892,9.50810811 L11.3940579,9.50810811 C11.3902354,9.09369369 11.5029971,8.76576577 11.732343,8.52432432 C11.9616888,8.28288288 12.2521936,8.16216216 12.6038572,8.16216216 C12.9325862,8.16216216 13.2116237,8.27657658 13.4409695,8.50540541 C13.6703154,8.73423423 13.7907219,9.06846847 13.8021892,9.50810811 L13.8021892,9.50810811 Z M19.4154287,12.8702703 L20.447485,9.17837838 L21.4967422,12.8702703 L23.0448267,12.8702703 L25,7.12972973 L23.41178,7.12972973 L22.2478499,10.8918919 L21.2329945,7.12972973 L19.6791764,7.12972973 L18.6299192,10.8918919 L17.4889236,7.12972973 L15.9236383,7.12972973 L17.8501433,12.8702703 L19.4154287,12.8702703 Z" id="new" fill="#FFFFFF"></path>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</g>
|
|
29
|
+
</g>
|
|
30
|
+
</svg>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.app-center__app-item {
|
|
21
|
+
position: relative;
|
|
21
22
|
flex: 1;
|
|
22
23
|
box-sizing: border-box;
|
|
23
24
|
min-width: 260px;
|
|
@@ -29,6 +30,12 @@
|
|
|
29
30
|
cursor: pointer;
|
|
30
31
|
}
|
|
31
32
|
|
|
33
|
+
.app-center__app-item-new {
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 15px;
|
|
36
|
+
left: 100px;
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
.app-center__app-item-icon {
|
|
33
40
|
position: absolute;
|
|
34
41
|
left: 16px;
|
|
@@ -75,6 +82,10 @@
|
|
|
75
82
|
background-image: url("./images/plan.svg");
|
|
76
83
|
}
|
|
77
84
|
|
|
85
|
+
.app-center__app-item-icon--demo {
|
|
86
|
+
background-image: url("./images/demo.png");
|
|
87
|
+
}
|
|
88
|
+
|
|
78
89
|
.app-center__app-item-desc {
|
|
79
90
|
margin-top: 3px;
|
|
80
91
|
margin-left: 44px;
|
|
@@ -133,7 +144,7 @@
|
|
|
133
144
|
background-color: rgba(240, 94, 94, 0.1);
|
|
134
145
|
}
|
|
135
146
|
|
|
136
|
-
.app-center__app-item--
|
|
147
|
+
.app-center__app-item--summary:hover {
|
|
137
148
|
background-color: rgba(255, 168, 28, 0.1);
|
|
138
149
|
}
|
|
139
150
|
|
|
@@ -141,6 +152,18 @@
|
|
|
141
152
|
background-color: rgba(90, 216, 166, 0.1);
|
|
142
153
|
}
|
|
143
154
|
|
|
155
|
+
.app-center__app-guide .titaui-pc__guide-tip__popup-triangle {
|
|
156
|
+
left: 18%;
|
|
157
|
+
top: -5px;
|
|
158
|
+
transform: rotate(180deg);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.app-center__app-guide-content {
|
|
162
|
+
font-size: 14px;
|
|
163
|
+
color: #FFFFFF;
|
|
164
|
+
line-height: 22px;
|
|
165
|
+
}
|
|
166
|
+
|
|
144
167
|
.app-center__drawer {
|
|
145
168
|
transform: translateY(54px);
|
|
146
169
|
}
|