@titaui/pc 1.12.46 → 1.12.49
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 +4 -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/change-okr-modal/Filter.js +1 -1
- package/lib/components/change-okr-modal/Item.js +1 -1
- package/lib/components/change-okr-modal/filterTab.js +1 -1
- package/lib/components/change-okr-modal/index.js +1 -1
- 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/communication/CommunicationAttachments.js +1 -1
- package/lib/components/communication/ConvertUserName.js +1 -1
- package/lib/components/communication/index.js +1 -1
- package/lib/components/create-okr-modal/objectType.js +1 -1
- package/lib/components/date-picker/BodyItem.js +4 -4
- package/lib/components/date-picker/CalendarBody.js +1 -1
- package/lib/components/date-picker/CalendarHeader.js +4 -4
- package/lib/components/date-picker/index.js +1 -1
- package/lib/components/date-range-picker/index.js +1 -1
- package/lib/components/delete-confirm-pop/ConfirmPop.js +4 -4
- 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 +330 -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/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 +220 -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 +177 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +423 -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 +17 -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 +102 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +210 -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 +110 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +253 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +30 -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 +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/index.css +2 -1
- package/lib/components/dynamic/dynamic-item/index.js +52 -33
- package/lib/components/dynamic/dynamic-list/index.js +8 -8
- package/lib/components/eReport/eReportListEmpty.js +1 -1
- package/lib/components/eReport/eReportLists/reportList.js +4 -4
- package/lib/components/eReport/eReportShare/index.js +1 -1
- package/lib/components/eReport/eReportShare/toast/index.js +1 -1
- package/lib/components/edit-kr-wight/EditKrWightModal.js +1 -1
- package/lib/components/edit-kr-wight/FormItemV2.js +1 -1
- package/lib/components/emotions-selector/selector-content.js +1 -1
- package/lib/components/emotions-selector/selector-pop.js +4 -4
- package/lib/components/ereport-list/index.js +4 -4
- package/lib/components/error-boundary/index.js +1 -1
- 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 +127 -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 +267 -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/mblog/components/ConfirmPop.js +1 -1
- package/lib/components/mblog/components/MblogAction.js +4 -4
- package/lib/components/mblog/components/MblogContent.js +1 -1
- package/lib/components/mblog/index.js +1 -1
- 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/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/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 +233 -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 +201 -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 +228 -0
- package/lib/components/menus/i18n.js +8 -0
- package/lib/components/menus/index.js +6 -0
- package/lib/components/menus/request-apis.js +8 -2
- package/lib/components/nav-top/components/app-center/images/demo.png +0 -0
- package/lib/components/nav-top/components/app-center/index.css +4 -0
- package/lib/components/nav-top/components/app-center/index.js +9 -9
- package/lib/components/nav-top/components/menu/index.js +4 -0
- 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.js +18 -18
- 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/auth.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +6 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +4 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +1 -1
- 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-review/ReviewPop/components/ReviewBody/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/components/Toast/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/index.js +1 -1
- package/lib/components/okr-review/components/ReviewItem/index.js +4 -4
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +4 -4
- package/lib/components/okr-review/index.js +1 -1
- package/lib/components/operation-records/OperationRecordItem.js +1 -1
- package/lib/components/operation-records/index.js +1 -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 +34 -3
- 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/point-demo/input/index.js +1 -1
- package/lib/components/praise-record/PraiseRecordItem.js +1 -1
- package/lib/components/praise-record/index.js +1 -1
- 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/range-picker-pop/index.js +1 -1
- package/lib/components/range-selector-pop/RangeList.js +1 -1
- package/lib/components/range-selector-pop/RangeSelectorPop.js +4 -4
- package/lib/components/rate/index.css +111 -0
- package/lib/components/rate/index.js +52 -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/models/schema.js +7 -7
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +9 -9
- package/lib/components/rich-editor/plugins/block/heading/index.js +9 -9
- package/lib/components/rich-editor/plugins/block/lists/index.js +15 -15
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +6 -6
- package/lib/components/rich-editor/plugins/core/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +6 -6
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/color/index.js +12 -12
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +9 -9
- package/lib/components/rich-editor/plugins/inline/em/index.js +6 -6
- package/lib/components/rich-editor/plugins/inline/link/index.js +9 -9
- package/lib/components/rich-editor/plugins/inline/strong/index.js +9 -9
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +9 -9
- package/lib/components/rich-editor/react/reactNodeView.js +1 -1
- package/lib/components/rich-editor/react/uiProvider.js +4 -4
- package/lib/components/rich-editor/schemas/list.js +0 -1
- package/lib/components/rich-editor/ui/Popup/index.js +4 -4
- 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/scroll-container/index.js +1 -1
- package/lib/components/search-input/index.js +5 -0
- package/lib/components/select/Option.js +4 -4
- package/lib/components/select/index.js +1 -1
- package/lib/components/select-tags/index.js +10 -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/tita-chart/errorBoundary/index.js +4 -4
- package/lib/components/toast/index.js +1 -1
- package/lib/components/tooltip/tooltip.js +2 -2
- package/lib/components/upload/components/uploadedPreview.js +1 -1
- package/lib/components/upload/index.js +1 -1
- 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/viewer/ImageListRender.js +1 -1
- package/lib/components/viewer/index.js +1 -1
- 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/animate/AnimateChild.js +4 -4
- package/lib/components-v1/animate/animate.js +1 -1
- package/lib/components-v1/avatar/index.js +4 -4
- package/lib/components-v1/buttonv2/ButtonOutlined.js +1 -1
- package/lib/components-v1/buttonv2/ButtonRounded.js +1 -1
- package/lib/components-v1/buttonv2/DefaultButton.js +1 -1
- package/lib/components-v1/confirm/index.js +1 -1
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +4 -4
- package/lib/components-v1/dropDownSelector/dropDownSelector.js +1 -1
- package/lib/components-v1/input/Input.js +1 -1
- package/lib/components-v1/input/InputNumber.js +1 -1
- package/lib/components-v1/placement/placement.js +1 -1
- package/lib/components-v1/placement/placementInner.js +1 -1
- package/lib/components-v1/pop/Pop.js +1 -1
- package/lib/components-v1/pop/PopInner.js +1 -1
- package/lib/components-v1/portals/Portals.js +1 -1
- package/lib/components-v1/progress/CircleProgress.js +4 -4
- package/lib/components-v1/progress/LineProgress.js +1 -1
- package/lib/components-v1/progress/index.js +1 -1
- package/lib/components-v1/radio/radio.js +1 -1
- package/lib/components-v1/radio/radioGroup.js +1 -1
- package/lib/components-v1/radio/style/index.css +1 -1
- package/lib/components-v1/search/index.js +1 -1
- package/lib/components-v1/select/Option.js +4 -4
- package/lib/components-v1/select/index.js +1 -1
- package/lib/components-v1/tabs/index.js +1 -1
- package/lib/components-v1/textarea/index.js +1 -1
- package/lib/components-v1/transition/index.js +1 -1
- package/lib/components-v1/userSelector/UserSelectorPop.js +4 -4
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/index.js +4 -4
- package/lib/components-v1/userSelector/components/SearchBar.js +1 -1
- package/lib/components-v1/userSelector/components/SingleMode.js +1 -1
- package/lib/components-v1/userSelector/components/UserItem.js +4 -4
- package/lib/components-v1/userSelector/index.js +1 -1
- package/lib/index.js +64 -0
- package/lib/pages/aha2021/index.js +3 -3
- package/lib/pages/aha2021/new-menu-switcher/index.js +4 -4
- package/lib/pages/aha2021/request-api.js +1 -1
- package/lib/pages/appointment-demo/input/index.js +1 -1
- package/lib/pages/group-management/components/input-form/index.js +1 -1
- package/lib/utils/auth.js +6 -1
- 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
|
@@ -43,24 +43,24 @@ var defaultRefObject = {
|
|
|
43
43
|
addConcerner: function addConcerner() {},
|
|
44
44
|
removeConcerner: function removeConcerner() {},
|
|
45
45
|
// 'showSubordinateMenu': () => { },
|
|
46
|
-
USERCONCERN:
|
|
47
|
-
SUBORDINATES:
|
|
48
|
-
MYOKR:
|
|
46
|
+
USERCONCERN: '',
|
|
47
|
+
SUBORDINATES: '',
|
|
48
|
+
MYOKR: ''
|
|
49
49
|
};
|
|
50
50
|
exports.defaultRefObject = defaultRefObject;
|
|
51
|
-
var PAGE_MY_OWNER_OKR =
|
|
51
|
+
var PAGE_MY_OWNER_OKR = 'myownerokr';
|
|
52
52
|
exports.PAGE_MY_OWNER_OKR = PAGE_MY_OWNER_OKR;
|
|
53
|
-
var PAGE_MY_PART_OKR =
|
|
53
|
+
var PAGE_MY_PART_OKR = 'mypartokr';
|
|
54
54
|
exports.PAGE_MY_PART_OKR = PAGE_MY_PART_OKR;
|
|
55
|
-
var PAGE_MY_TARGET_OKR =
|
|
55
|
+
var PAGE_MY_TARGET_OKR = 'mytargetokr';
|
|
56
56
|
exports.PAGE_MY_TARGET_OKR = PAGE_MY_TARGET_OKR;
|
|
57
|
-
var PAGE_OKR_MAP =
|
|
57
|
+
var PAGE_OKR_MAP = 'map';
|
|
58
58
|
exports.PAGE_OKR_MAP = PAGE_OKR_MAP;
|
|
59
|
-
var PAGE_OKR_DASHBOARD =
|
|
59
|
+
var PAGE_OKR_DASHBOARD = 'panzi';
|
|
60
60
|
exports.PAGE_OKR_DASHBOARD = PAGE_OKR_DASHBOARD;
|
|
61
|
-
var PAGE_OKR_FUNCTION =
|
|
61
|
+
var PAGE_OKR_FUNCTION = 'panel';
|
|
62
62
|
exports.PAGE_OKR_FUNCTION = PAGE_OKR_FUNCTION;
|
|
63
|
-
var PAGE_OKR_CASES =
|
|
63
|
+
var PAGE_OKR_CASES = 'cases';
|
|
64
64
|
exports.PAGE_OKR_CASES = PAGE_OKR_CASES;
|
|
65
65
|
|
|
66
66
|
var okrMenus = /*#__PURE__*/function () {
|
|
@@ -69,8 +69,8 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
69
69
|
|
|
70
70
|
this.COMPANYALL = _index.COMPANY_ALL_NODE;
|
|
71
71
|
this.USERCONCERN = _index.USER_CONCERN_NODE;
|
|
72
|
-
this.MYOKR =
|
|
73
|
-
this.SUBORDINATES =
|
|
72
|
+
this.MYOKR = 'myokr';
|
|
73
|
+
this.SUBORDINATES = 'subordinates';
|
|
74
74
|
var hasDashboardAuth = false;
|
|
75
75
|
var baseAuth = new _auth.BaseAuth();
|
|
76
76
|
|
|
@@ -80,81 +80,81 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
80
80
|
|
|
81
81
|
var isUseNewMenu = window.BSGlobal.isUseNewMenu;
|
|
82
82
|
this.menus = [{
|
|
83
|
-
icon:
|
|
83
|
+
icon: 'okr',
|
|
84
84
|
label: _i18n.locale.menu_myokr,
|
|
85
85
|
key: this.MYOKR,
|
|
86
|
-
href:
|
|
86
|
+
href: '',
|
|
87
87
|
children: [{
|
|
88
|
-
icon:
|
|
88
|
+
icon: '',
|
|
89
89
|
label: _i18n.locale.menu_responsible,
|
|
90
90
|
key: PAGE_MY_OWNER_OKR,
|
|
91
|
-
href:
|
|
91
|
+
href: '#/okr/manage?relation=1'
|
|
92
92
|
}, {
|
|
93
|
-
icon:
|
|
93
|
+
icon: '',
|
|
94
94
|
label: _i18n.locale.menu_participated,
|
|
95
95
|
key: PAGE_MY_PART_OKR,
|
|
96
|
-
href:
|
|
96
|
+
href: '#/okr/manage?relation=2'
|
|
97
97
|
}, {
|
|
98
|
-
icon:
|
|
98
|
+
icon: '',
|
|
99
99
|
label: _i18n.locale.menu_concerned,
|
|
100
100
|
key: PAGE_MY_TARGET_OKR,
|
|
101
|
-
href:
|
|
101
|
+
href: '#/okr/manage?relation=3'
|
|
102
102
|
}]
|
|
103
103
|
}, {
|
|
104
|
-
icon:
|
|
104
|
+
icon: 'caidan-xiashu',
|
|
105
105
|
label: _i18n.locale.menu_subordinate,
|
|
106
106
|
key: this.SUBORDINATES,
|
|
107
107
|
isLeaf: false,
|
|
108
108
|
children: [],
|
|
109
|
-
href:
|
|
109
|
+
href: '',
|
|
110
110
|
isShow: window.BSGlobal.loginUserInfo.HasSub
|
|
111
111
|
}, {
|
|
112
|
-
icon:
|
|
112
|
+
icon: 'guanzhu',
|
|
113
113
|
label: _i18n.locale.menu_concerned_user,
|
|
114
114
|
key: this.USERCONCERN,
|
|
115
115
|
type: this.USERCONCERN,
|
|
116
116
|
isLeaf: false,
|
|
117
117
|
children: [],
|
|
118
|
-
href:
|
|
118
|
+
href: ''
|
|
119
119
|
}, {
|
|
120
|
-
icon:
|
|
120
|
+
icon: 'okr-gongsi-m',
|
|
121
121
|
label: _i18n.locale.menu_alldeparment,
|
|
122
122
|
key: this.COMPANYALL,
|
|
123
123
|
type: this.COMPANYALL,
|
|
124
|
-
href:
|
|
124
|
+
href: ''
|
|
125
125
|
}, {
|
|
126
|
-
icon:
|
|
126
|
+
icon: '',
|
|
127
127
|
label: _i18n.locale.menu_other,
|
|
128
|
-
key:
|
|
128
|
+
key: 'other',
|
|
129
129
|
type: _index.GROUP_NAME_NODE,
|
|
130
|
-
href:
|
|
130
|
+
href: ''
|
|
131
131
|
}, {
|
|
132
|
-
icon:
|
|
132
|
+
icon: 'ditu',
|
|
133
133
|
label: _i18n.locale.menu_okrmap,
|
|
134
134
|
key: PAGE_OKR_MAP,
|
|
135
135
|
type: _index.MENU_ITEM_NOE,
|
|
136
|
-
href:
|
|
136
|
+
href: '#/okr/map',
|
|
137
137
|
isShow: !isUseNewMenu
|
|
138
138
|
}, {
|
|
139
|
-
icon:
|
|
139
|
+
icon: 'panel',
|
|
140
140
|
label: _i18n.locale.menu_okr_working_method,
|
|
141
141
|
type: _index.MENU_ITEM_NOE,
|
|
142
142
|
key: PAGE_OKR_FUNCTION,
|
|
143
|
-
href:
|
|
143
|
+
href: '#/okr/panel',
|
|
144
144
|
isShow: !isUseNewMenu
|
|
145
145
|
}, {
|
|
146
|
-
icon:
|
|
146
|
+
icon: 'yibiao',
|
|
147
147
|
label: _i18n.locale.menu_okrdashboard,
|
|
148
148
|
key: PAGE_OKR_DASHBOARD,
|
|
149
149
|
type: _index.MENU_ITEM_NOE,
|
|
150
|
-
href:
|
|
150
|
+
href: '#/okr/chart?iTalentFrameType=iframe&iTalentFrame=%2F%2Fwww.tita.gift%2Fmenuroute%3FmenuId%3D44269%26roleId%3D',
|
|
151
151
|
isShow: hasDashboardAuth && !isUseNewMenu
|
|
152
152
|
}, {
|
|
153
|
-
icon:
|
|
153
|
+
icon: 'cases',
|
|
154
154
|
label: _i18n.locale.menu_okrcases,
|
|
155
155
|
type: _index.MENU_ITEM_NOE,
|
|
156
156
|
key: PAGE_OKR_CASES,
|
|
157
|
-
href:
|
|
157
|
+
href: '#/okr/cases',
|
|
158
158
|
isShow: !(0, _helpers.isLocal)()
|
|
159
159
|
}];
|
|
160
160
|
} // showSubordinateMenu() {
|
|
@@ -186,11 +186,11 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
186
186
|
|
|
187
187
|
if (loading) {
|
|
188
188
|
this.menus[2].children.push({
|
|
189
|
-
icon:
|
|
190
|
-
label:
|
|
191
|
-
key:
|
|
189
|
+
icon: '',
|
|
190
|
+
label: 'loading',
|
|
191
|
+
key: 'loading-concern',
|
|
192
192
|
type: _index.LOADING_NODE,
|
|
193
|
-
href:
|
|
193
|
+
href: '',
|
|
194
194
|
data: {}
|
|
195
195
|
});
|
|
196
196
|
}
|
|
@@ -202,11 +202,11 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
202
202
|
|
|
203
203
|
if (loading) {
|
|
204
204
|
this.menus[1].children.push({
|
|
205
|
-
icon:
|
|
206
|
-
label:
|
|
207
|
-
key:
|
|
205
|
+
icon: '',
|
|
206
|
+
label: 'loading',
|
|
207
|
+
key: 'loading-subordinates',
|
|
208
208
|
type: _index.LOADING_NODE,
|
|
209
|
-
href:
|
|
209
|
+
href: '',
|
|
210
210
|
data: {}
|
|
211
211
|
});
|
|
212
212
|
}
|
|
@@ -226,11 +226,11 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
226
226
|
var user = users[i];
|
|
227
227
|
if (this.checkConcernExist(user)) continue;
|
|
228
228
|
treeNodeUsers.push({
|
|
229
|
-
icon:
|
|
229
|
+
icon: '',
|
|
230
230
|
label: user.name,
|
|
231
231
|
key: "concern-".concat(user.userId),
|
|
232
232
|
type: _index.FOLLOWER_NODE,
|
|
233
|
-
href:
|
|
233
|
+
href: '',
|
|
234
234
|
data: user
|
|
235
235
|
});
|
|
236
236
|
}
|
|
@@ -244,11 +244,11 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
244
244
|
|
|
245
245
|
if (empty) {
|
|
246
246
|
this.menus[2].children.push({
|
|
247
|
-
icon:
|
|
248
|
-
label:
|
|
249
|
-
key:
|
|
247
|
+
icon: '',
|
|
248
|
+
label: 'empty-concerners',
|
|
249
|
+
key: 'empty-concerners',
|
|
250
250
|
type: _index.NO_FOLLOWER_NODE,
|
|
251
|
-
href:
|
|
251
|
+
href: '',
|
|
252
252
|
data: {}
|
|
253
253
|
});
|
|
254
254
|
}
|
|
@@ -256,16 +256,16 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
256
256
|
}, {
|
|
257
257
|
key: "addConcerner",
|
|
258
258
|
value: function addConcerner(user) {
|
|
259
|
-
if (this.menus[2].children.length && this.menus[2].children[0].key ==
|
|
259
|
+
if (this.menus[2].children.length && this.menus[2].children[0].key == 'empty-concerners') {
|
|
260
260
|
this.menus[2].children = [];
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
this.menus[2].children.push({
|
|
264
|
-
icon:
|
|
264
|
+
icon: '',
|
|
265
265
|
label: user.name,
|
|
266
266
|
key: "concern-".concat(user.userId),
|
|
267
267
|
type: _index.FOLLOWER_NODE,
|
|
268
|
-
href:
|
|
268
|
+
href: '',
|
|
269
269
|
data: user
|
|
270
270
|
});
|
|
271
271
|
}
|
|
@@ -287,11 +287,11 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
287
287
|
value: function insertSubordinates(users) {
|
|
288
288
|
if (!users || !users.length) {
|
|
289
289
|
this.menus[1].children = [{
|
|
290
|
-
icon:
|
|
291
|
-
label:
|
|
292
|
-
key:
|
|
290
|
+
icon: '',
|
|
291
|
+
label: 'empty-subordinates',
|
|
292
|
+
key: 'empty-subordinates',
|
|
293
293
|
type: _index.NO_SUBORDINATES_NODE,
|
|
294
|
-
href:
|
|
294
|
+
href: '',
|
|
295
295
|
data: {}
|
|
296
296
|
}];
|
|
297
297
|
return;
|
|
@@ -302,11 +302,11 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
302
302
|
for (var i = 0; i < users.length; i++) {
|
|
303
303
|
var user = users[i];
|
|
304
304
|
treeNodeUsers.push({
|
|
305
|
-
icon:
|
|
305
|
+
icon: '',
|
|
306
306
|
label: user.name,
|
|
307
307
|
key: "".concat(user.userId),
|
|
308
308
|
type: _index.USER_NODE,
|
|
309
|
-
href:
|
|
309
|
+
href: '',
|
|
310
310
|
data: user
|
|
311
311
|
});
|
|
312
312
|
}
|
|
@@ -61,7 +61,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
61
61
|
maxHeight = _useState2[0],
|
|
62
62
|
setMaxHeight = _useState2[1];
|
|
63
63
|
|
|
64
|
-
var _useState3 = (0, _react.useState)([
|
|
64
|
+
var _useState3 = (0, _react.useState)(['myokr']),
|
|
65
65
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
66
|
expandedKeys = _useState4[0],
|
|
67
67
|
setExpandedKeys = _useState4[1];
|
|
@@ -140,7 +140,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
140
140
|
resolve(true); // 获取数据
|
|
141
141
|
|
|
142
142
|
(0, _requestApis.getSubordinates)({
|
|
143
|
-
relationIds:
|
|
143
|
+
relationIds: '1,2'
|
|
144
144
|
}, {
|
|
145
145
|
disabledDottedSubordinatesDig: true
|
|
146
146
|
}).then(function (users) {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.translateUsersToTreeNode = exports.translateDepartsToTreeNode = void 0;
|
|
7
|
+
|
|
8
|
+
var _index = require("../../../components/menu-tree/tree-node/index");
|
|
9
|
+
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
|
|
14
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
|
|
16
|
+
var translateDepartsToTreeNode = function translateDepartsToTreeNode() {
|
|
17
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
18
|
+
var res = [];
|
|
19
|
+
data.forEach(function (item) {
|
|
20
|
+
var node = {
|
|
21
|
+
key: "".concat(item.id),
|
|
22
|
+
id: "".concat(item.id),
|
|
23
|
+
pid: "".concat(item.pid),
|
|
24
|
+
title: item.name,
|
|
25
|
+
nodeType: _index.DEPART_NODE,
|
|
26
|
+
async: item.hasChild,
|
|
27
|
+
isLeaf: !item.hasChild,
|
|
28
|
+
data: _objectSpread({}, item)
|
|
29
|
+
};
|
|
30
|
+
res.push(node);
|
|
31
|
+
});
|
|
32
|
+
return res;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.translateDepartsToTreeNode = translateDepartsToTreeNode;
|
|
36
|
+
|
|
37
|
+
var translateUsersToTreeNode = function translateUsersToTreeNode() {
|
|
38
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
39
|
+
var pid = arguments.length > 1 ? arguments[1] : undefined;
|
|
40
|
+
var res = [];
|
|
41
|
+
data.forEach(function (item) {
|
|
42
|
+
var node = {
|
|
43
|
+
key: "".concat(item.userId),
|
|
44
|
+
id: "".concat(item.userId),
|
|
45
|
+
pid: "".concat(pid),
|
|
46
|
+
title: item.name,
|
|
47
|
+
nodeType: _index.USER_NODE,
|
|
48
|
+
isLeaf: true,
|
|
49
|
+
data: _objectSpread({}, item)
|
|
50
|
+
};
|
|
51
|
+
res.push(node);
|
|
52
|
+
});
|
|
53
|
+
return res;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.translateUsersToTreeNode = translateUsersToTreeNode;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.titaui-menus__depart-menus {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.titaui-menus__depart-menus--loading {
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
cursor: default;
|
|
9
|
+
margin-top: 25px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.titaui-menus__depart-menus--loading > span {
|
|
13
|
+
display: inline-block;
|
|
14
|
+
width: 96px;
|
|
15
|
+
height: 20px;
|
|
16
|
+
background: url(../../../images/loading.gif) transparent no-repeat 50% 50%;
|
|
17
|
+
background-size: contain;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.titaui-menus__depart-menus .rc-tree-list-scrollbar {
|
|
21
|
+
width: 4px !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.titaui-menus__depart-menus .rc-tree-list-scrollbar .rc-tree-list-scrollbar-thumb {
|
|
25
|
+
border-radius: 10px !important;
|
|
26
|
+
background: #bac2cf !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.titaui-menus__depart-menus .rc-tree-treenode-selected .titaui-menus-tree__depart-node-title {
|
|
30
|
+
color: #2879ff;
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _resizeObserverPolyfill = _interopRequireDefault(require("resize-observer-polyfill"));
|
|
15
|
+
|
|
16
|
+
var _i18n = require("../../../i18n");
|
|
17
|
+
|
|
18
|
+
var _menuTree = _interopRequireDefault(require("../../../components/menu-tree"));
|
|
19
|
+
|
|
20
|
+
var _requestApis = require("../../../request-apis");
|
|
21
|
+
|
|
22
|
+
var _index = require("../../../components/menu-tree/tree-node/index");
|
|
23
|
+
|
|
24
|
+
var _utils = require("../../../utils");
|
|
25
|
+
|
|
26
|
+
var _precls = _interopRequireDefault(require("../../../precls"));
|
|
27
|
+
|
|
28
|
+
var _scrollbar = _interopRequireDefault(require("../../../../scrollbar"));
|
|
29
|
+
|
|
30
|
+
var _helper = require("./helper");
|
|
31
|
+
|
|
32
|
+
var _auth = require("../../../../../utils/auth");
|
|
33
|
+
|
|
34
|
+
require("../../../index.css");
|
|
35
|
+
|
|
36
|
+
require("./index.css");
|
|
37
|
+
|
|
38
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; } } }; }
|
|
45
|
+
|
|
46
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
47
|
+
|
|
48
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
49
|
+
|
|
50
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
51
|
+
|
|
52
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
53
|
+
|
|
54
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
55
|
+
|
|
56
|
+
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."); }
|
|
57
|
+
|
|
58
|
+
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); }
|
|
59
|
+
|
|
60
|
+
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; }
|
|
61
|
+
|
|
62
|
+
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; }
|
|
63
|
+
|
|
64
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
65
|
+
|
|
66
|
+
var _default = function _default() {
|
|
67
|
+
var loadedNode = (0, _react.useRef)([]);
|
|
68
|
+
|
|
69
|
+
var _useState = (0, _react.useState)([]),
|
|
70
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
71
|
+
treeData = _useState2[0],
|
|
72
|
+
setTreeData = _useState2[1];
|
|
73
|
+
|
|
74
|
+
var _useState3 = (0, _react.useState)([]),
|
|
75
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
76
|
+
rawTreeData = _useState4[0],
|
|
77
|
+
setRawTreeData = _useState4[1];
|
|
78
|
+
|
|
79
|
+
var _useState5 = (0, _react.useState)(['0']),
|
|
80
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
81
|
+
selectedMenuKeys = _useState6[0],
|
|
82
|
+
setSelectedMenuKeys = _useState6[1];
|
|
83
|
+
|
|
84
|
+
var _useState7 = (0, _react.useState)(true),
|
|
85
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
86
|
+
loading = _useState8[0],
|
|
87
|
+
setLoading = _useState8[1]; // 部门虚拟列表高度配置
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
var _useState9 = (0, _react.useState)(0),
|
|
91
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
92
|
+
height = _useState10[0],
|
|
93
|
+
setHeight = _useState10[1];
|
|
94
|
+
|
|
95
|
+
var _useState11 = (0, _react.useState)(40),
|
|
96
|
+
_useState12 = _slicedToArray(_useState11, 1),
|
|
97
|
+
itemHeight = _useState12[0];
|
|
98
|
+
|
|
99
|
+
var baseAuth = new _auth.BaseAuth();
|
|
100
|
+
var showCompanyAll = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager();
|
|
101
|
+
(0, _react.useEffect)(function () {
|
|
102
|
+
if (showCompanyAll) {
|
|
103
|
+
window.location.href = '#/summary/manage?departmentName=公司全部&departmentId=0';
|
|
104
|
+
|
|
105
|
+
var allDepartmentText = window.getLocale && window.getLocale(_i18n.locale.menu_alldeparment) || _i18n.locale.menu_alldeparment;
|
|
106
|
+
|
|
107
|
+
(0, _requestApis.getDepsAndUsers)(-1, false).then(function (rawTreeData) {
|
|
108
|
+
var rootNode = {
|
|
109
|
+
async: true,
|
|
110
|
+
data: {
|
|
111
|
+
id: 0,
|
|
112
|
+
name: allDepartmentText
|
|
113
|
+
},
|
|
114
|
+
pid: -1,
|
|
115
|
+
id: '0',
|
|
116
|
+
key: '0',
|
|
117
|
+
isLeaf: true,
|
|
118
|
+
nodeType: _index.DEPART_NODE,
|
|
119
|
+
title: allDepartmentText
|
|
120
|
+
};
|
|
121
|
+
setRawTreeData([rootNode].concat(_toConsumableArray(rawTreeData)));
|
|
122
|
+
setTreeData((0, _utils.toTree)([rootNode].concat(_toConsumableArray(rawTreeData))));
|
|
123
|
+
setLoading(false);
|
|
124
|
+
});
|
|
125
|
+
} else {
|
|
126
|
+
(0, _requestApis.getMyDepartMent)().then(function (res) {
|
|
127
|
+
location.href = "#/summary/manage?departmentName=".concat(res.Data.departments[0].name, "&departmentId=").concat(res.Data.departments[0].id);
|
|
128
|
+
var rawTreeData = (0, _helper.translateDepartsToTreeNode)(res.Data.departments);
|
|
129
|
+
var rootNode = {
|
|
130
|
+
async: true,
|
|
131
|
+
data: {
|
|
132
|
+
id: -1,
|
|
133
|
+
name: '全部管理部门'
|
|
134
|
+
},
|
|
135
|
+
pid: 0,
|
|
136
|
+
id: rawTreeData[0].id,
|
|
137
|
+
key: -1,
|
|
138
|
+
nodeType: _index.DEPART_NODE,
|
|
139
|
+
title: '全部管理部门'
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
if (rawTreeData.length > 1) {
|
|
143
|
+
rawTreeData.unshift(rootNode);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
setRawTreeData(_toConsumableArray(rawTreeData));
|
|
147
|
+
setTreeData((0, _utils.toTree)(_toConsumableArray(rawTreeData)));
|
|
148
|
+
setLoading(false);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}, []); // 因为要实现虚拟列表的功能,所有要动态的计算出一个菜单的高度
|
|
152
|
+
|
|
153
|
+
(0, _react.useEffect)(function () {
|
|
154
|
+
setHeight(document.body.offsetHeight - 164);
|
|
155
|
+
}, []); // 动态加载子节点数据集
|
|
156
|
+
|
|
157
|
+
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
158
|
+
if (loadedNode.current.includes(treeNode.id)) return null;
|
|
159
|
+
return new Promise(function (resolve) {
|
|
160
|
+
(0, _requestApis.getDepsAndUsers)(treeNode.id, false).then(function (nodes) {
|
|
161
|
+
if (!nodes.length) {
|
|
162
|
+
resolve(true);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
nodes.forEach(function (it) {
|
|
167
|
+
return rawTreeData.push(it);
|
|
168
|
+
});
|
|
169
|
+
setRawTreeData(rawTreeData);
|
|
170
|
+
setTreeData((0, _utils.toTree)(rawTreeData));
|
|
171
|
+
resolve(true);
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
|
|
177
|
+
var node = _ref.node;
|
|
178
|
+
// 处理菜单选中
|
|
179
|
+
if (!selectedKyes.length) return;
|
|
180
|
+
var nodeType = node.nodeType,
|
|
181
|
+
data = node.data;
|
|
182
|
+
|
|
183
|
+
if (nodeType == _index.USER_NODE) {
|
|
184
|
+
location.href = "#/summary/manage?toUserId=".concat(data.userId);
|
|
185
|
+
} else if (nodeType == _index.DEPART_NODE) {
|
|
186
|
+
location.href = "#/summary/manage?departmentName=".concat(data.name, "&departmentId=").concat(data.id);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
setSelectedMenuKeys(selectedKyes);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
(0, _react.useEffect)(function () {
|
|
193
|
+
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
194
|
+
var _iterator = _createForOfIteratorHelper(entries),
|
|
195
|
+
_step;
|
|
196
|
+
|
|
197
|
+
try {
|
|
198
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
199
|
+
var entry = _step.value;
|
|
200
|
+
var cr = entry.contentRect;
|
|
201
|
+
setHeight(cr.height - 164);
|
|
202
|
+
}
|
|
203
|
+
} catch (err) {
|
|
204
|
+
_iterator.e(err);
|
|
205
|
+
} finally {
|
|
206
|
+
_iterator.f();
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
obs.observe(document.body);
|
|
210
|
+
return function () {
|
|
211
|
+
obs.unobserve(document.body);
|
|
212
|
+
};
|
|
213
|
+
}, []);
|
|
214
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
215
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__depart-menus"))
|
|
216
|
+
}, loading ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
217
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__depart-menus--loading"))
|
|
218
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null)) : /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
219
|
+
style: {
|
|
220
|
+
maxHeight: height
|
|
221
|
+
}
|
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|
|
223
|
+
data: treeData,
|
|
224
|
+
itemHeight: itemHeight,
|
|
225
|
+
virtual: true,
|
|
226
|
+
onSelect: onSelectHandler // defaultExpandedKeys={["0"]}
|
|
227
|
+
,
|
|
228
|
+
selectedKeys: selectedMenuKeys,
|
|
229
|
+
loadData: onLoadTreeNodeDataHandler
|
|
230
|
+
})));
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
exports["default"] = _default;
|