@titaui/pc 1.15.68 → 1.15.69-beta.11
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/avatar/icon-avatar/index.js +1 -1
- package/lib/components/avatar/name-avatar/index.css +2 -3
- package/lib/components/avatar/name-avatar/index.js +14 -24
- package/lib/components/avatar/num-avatar/index.js +1 -1
- package/lib/components/book-demo/components/pc/components/content/index.js +1 -1
- package/lib/components/book-demo/constant.js +118 -0
- package/lib/components/book-demo/interface.js +1 -0
- package/lib/components/button/default-button/index.js +1 -1
- package/lib/components/button/icon-btn/index.css +24 -1
- package/lib/components/button/icon-btn/index.js +5 -3
- package/lib/components/button/text-btn/index.css +2 -2
- package/lib/components/cascader/index.js +1 -1
- package/lib/components/cascader/time.js +1 -1
- package/lib/components/change-okr-modal/Filter.js +2 -2
- package/lib/components/change-okr-modal/Item.js +2 -2
- package/lib/components/change-okr-modal/filterTab.js +2 -2
- package/lib/components/change-okr-modal/index.js +6 -4
- package/lib/components/checkbox/index.css +1 -0
- package/lib/components/common-share/publishMblog.js +4 -2
- package/lib/components/communication/CommunicationAttachments.js +2 -2
- package/lib/components/communication/ConvertUserName.js +2 -2
- package/lib/components/communication/index.js +2 -2
- package/lib/components/create-okr-modal/fields/okr-type-detail.js +4 -2
- package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +4 -2
- package/lib/components/create-okr-modal/index.js +4 -2
- package/lib/components/create-okr-modal/objectType.js +2 -2
- package/lib/components/create-okr-modal/request-api.js +16 -12
- package/lib/components/create-okr-modal/utils/helper.js +6 -2
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarBody.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/date-range-picker/index.js +2 -2
- package/lib/components/delete-confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/dialog/index.js +1 -1
- package/lib/components/dialog-confirm/index.css +8 -2
- package/lib/components/dialog-confirm/index.js +29 -17
- package/lib/components/dialog-qq-docs/index.js +11 -9
- package/lib/components/dialog-qq-docs/utils.js +6 -2
- package/lib/components/dialog-select/index.js +1 -1
- package/lib/components/dialog-upload/index.js +4 -2
- package/lib/components/dialog-upload-type/components/upload-type-item/index.js +1 -1
- package/lib/components/dialog-upload-type/index.js +1 -1
- package/lib/components/drawer/headerDrop.js +1 -1
- package/lib/components/drawer/index.css +4 -0
- package/lib/components/drawer/index.js +1 -1
- package/lib/components/drawer-manager/drawerWrapper.js +5 -3
- package/lib/components/drawer-manager/index.js +1 -1
- package/lib/components/drop-selector/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +11 -6
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +9 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +34 -7
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +6 -5
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/utils.js +2 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +23 -1
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-discovery/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-learning/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/index.js +1 -1
- package/lib/components/dynamic/dynamic-list/index.js +1 -1
- package/lib/components/eReport/eReportListEmpty.js +2 -2
- package/lib/components/eReport/eReportLists/reportList.js +2 -2
- package/lib/components/eReport/eReportShare/index.js +2 -2
- package/lib/components/eReport/eReportShare/toast/index.js +2 -2
- package/lib/components/edit-kr-wight/EditKrWightModal.js +2 -2
- package/lib/components/edit-kr-wight/FormItemV2.js +2 -2
- package/lib/components/emotions-selector/selector-content.js +2 -2
- package/lib/components/emotions-selector/selector-pop.js +2 -2
- package/lib/components/ereport-list/index.js +2 -2
- package/lib/components/error-boundary/index.js +2 -2
- package/lib/{pages/like-ranking → components}/filter-buttons/department.js +20 -6
- package/lib/{pages/like-ranking → components}/filter-buttons/group.js +2 -2
- package/lib/{pages/like-ranking → components}/filter-buttons/index.css +4 -0
- package/lib/components/filter-buttons/index.js +85 -0
- package/lib/{pages/like-ranking → components}/filter-buttons/modular.js +3 -3
- package/lib/components/filter-buttons/name.js +86 -0
- package/lib/{pages/like-ranking → components}/filter-buttons/search-dropdown/index.css +5 -0
- package/lib/{pages/like-ranking → components}/filter-buttons/search-dropdown/index.js +1 -1
- package/lib/{pages/like-ranking → components}/filter-buttons/timer.js +3 -3
- package/lib/components/firework/index.js +6 -2
- package/lib/components/form/form-fields/cycle/index.css +135 -0
- package/lib/components/form/form-fields/cycle/index.js +190 -0
- package/lib/components/form/form-fields/cycle/interface.js +5 -0
- package/lib/components/form/form-fields/cycle/utils.js +47 -0
- package/lib/components/form/form-fields/date/index.js +1 -1
- package/lib/components/form/form-fields/dropdown/index.css +9 -0
- package/lib/components/form/form-fields/dropdown/index.js +9 -4
- package/lib/components/form/form-fields/input/index.css +4 -0
- package/lib/components/form/form-fields/input/index.js +21 -2
- package/lib/components/form/form-fields/input-verification-code/index.js +4 -2
- package/lib/components/form/form-fields/user/index.js +1 -1
- package/lib/components/form/index.js +4 -1
- package/lib/components/grid-layout/util/network.js +10 -6
- package/lib/components/guide-order/index.css +228 -0
- package/lib/components/guide-order/index.js +295 -0
- package/lib/components/guide-tip/index.js +5 -2
- package/lib/components/help-card/index.js +3 -3
- package/lib/components/import-modal/import-task-modal/index.js +1 -1
- package/lib/components/import-modal/tree/okr-tree/index.js +4 -2
- package/lib/components/import-modal/tree-node/index.js +1 -1
- package/lib/components/magnet/index.css +9 -0
- package/lib/components/magnet/index.js +141 -0
- package/lib/components/mblog/components/ConfirmPop.js +2 -2
- package/lib/components/mblog/components/MblogAction.js +2 -2
- package/lib/components/mblog/components/MblogContent.js +2 -2
- package/lib/components/mblog/index.js +2 -2
- package/lib/components/menus/components/menu-tree/images/survey-menu/involved.svg +8 -0
- package/lib/components/menus/components/menu-tree/images/survey-menu/manage.svg +11 -0
- package/lib/components/menus/components/menu-tree/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.css +60 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/sub-menu-item.js +58 -1
- package/lib/components/menus/export-modules/appraisal-menus/index.js +1 -1
- package/lib/components/menus/export-modules/okr-menus/menus.js +3 -1
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +1 -1
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +8 -0
- package/lib/components/menus/export-modules/summary-menus/menus.js +21 -9
- package/lib/components/menus/export-modules/summary-menus/request-api.js +8 -2
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +26 -7
- package/lib/components/menus/export-modules/survey-menu/index.css +9 -0
- package/lib/components/menus/export-modules/survey-menu/index.js +120 -0
- package/lib/components/menus/export-modules/survey-menu/menu-highlight.js +52 -0
- package/lib/components/menus/export-modules/survey-menu/menus.js +87 -0
- package/lib/components/menus/export-modules/survey-menu/request-api.js +5 -0
- package/lib/components/menus/export-modules/survey-menu/survey-front-menus.js +178 -0
- package/lib/components/menus/i18n.js +1 -0
- package/lib/components/menus/index.js +6 -0
- package/lib/components/menus/request-apis.js +7 -1
- package/lib/components/nav-top/components/app-center/images/survey.svg +20 -0
- package/lib/components/nav-top/components/app-center/index.css +8 -0
- package/lib/components/nav-top/components/app-center/index.js +6 -1
- package/lib/components/nav-top/components/menu/index.js +2 -1
- package/lib/components/nav-top/components/user-message/index.js +12 -9
- package/lib/components/nav-top/index.js +6 -1
- package/lib/components/nav-top/useGlobalValue.js +4 -1
- package/lib/components/okr-detail/auth.js +2 -2
- package/lib/components/okr-detail/base-info/base-info.js +25 -22
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +7 -2
- package/lib/components/okr-detail/components/ao-nice/index.js +6 -4
- package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +2 -2
- package/lib/components/okr-detail/components/header/edit-name.js +4 -2
- package/lib/components/okr-detail/components/header/index.js +3 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +4 -2
- package/lib/components/okr-detail/components/header/o-classify.js +4 -2
- package/lib/components/okr-detail/components/header/o-score.js +1 -1
- package/lib/components/okr-detail/components/icon-text/index.js +1 -1
- package/lib/components/okr-detail/components/o-classify.js +4 -2
- package/lib/components/okr-detail/components/o-progress-update/index.js +4 -2
- package/lib/components/okr-detail/components/okr-tree/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +10 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +8 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +12 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +12 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +6 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +4 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +8 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +4 -2
- package/lib/components/okr-detail/detail-footer/index.js +4 -2
- package/lib/components/okr-detail/detail-header/actions.js +7 -2
- package/lib/components/okr-detail/detail-header/index.js +12 -10
- package/lib/components/okr-detail/e-list/util.js +6 -5
- package/lib/components/okr-detail/okr-list/index.js +9 -5
- package/lib/components/okr-detail/request-apis.js +6 -2
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +7 -7
- package/lib/components/okr-excel/index.css +5 -0
- package/lib/components/okr-excel/renders.js +8 -4
- package/lib/components/okr-flow/child-node/fields/creator.js +4 -2
- package/lib/components/okr-flow/child-node/work-node.js +4 -2
- package/lib/components/okr-flow/export-modal/index.js +6 -43
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +10 -8
- package/lib/components/okr-flow/request-apis.js +6 -2
- package/lib/components/okr-flow/root-node/index.js +4 -2
- package/lib/components/okr-progress/components/o-progress-update/index.js +4 -2
- package/lib/components/okr-progress-modal/index.js +4 -2
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +6 -4
- package/lib/components/okr-review/ReviewPop/components/Toast/index.js +2 -2
- package/lib/components/okr-review/ReviewPop/index.js +2 -2
- package/lib/components/okr-review/components/ReviewItem/index.js +2 -2
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/okr-review/index.js +2 -2
- package/lib/components/okr-share/common-painter/darwAvatar.js +8 -4
- package/lib/components/okr-share/common-painter/openDataPainter.js +6 -2
- package/lib/components/okr-share/common-painter/utils.js +8 -4
- package/lib/components/okr-share/pink-card/drawDepartmentName.js +6 -2
- package/lib/components/okr-share/pink-card/drawKrs.js +6 -2
- package/lib/components/okr-share/pink-card/drawQuote.js +6 -2
- package/lib/components/okr-share/pink-card/drawUserName.js +6 -2
- package/lib/components/okr-share/pink-card/index.js +6 -2
- package/lib/components/okr-share/publishMblog.js +4 -2
- package/lib/components/okr-share/shareCardSelector.js +6 -4
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
- package/lib/components/okrcase-library/server/network.js +24 -20
- package/lib/components/open-data-painter/index.js +6 -2
- package/lib/components/operation-records/OperationRecordItem.js +2 -2
- package/lib/components/operation-records/index.js +58 -10
- package/lib/components/order-have-award/index.js +47 -3
- package/lib/components/pagination/index.css +5 -0
- package/lib/components/pagination/pagination.js +21 -11
- package/lib/components/pagination/select.css +0 -1
- package/lib/components/period-selector/components/button/index.js +1 -1
- package/lib/components/period-selector/helper/index.js +6 -2
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/week-panel/index.js +1 -1
- package/lib/components/picker/components/panels/year-panel/index.js +1 -1
- package/lib/components/picker/components/panels/year-panel/year-head.js +1 -1
- package/lib/components/picker/picker.js +1 -1
- package/lib/components/picker/range-picker/index.js +1 -1
- package/lib/components/point-demo/drop-down-box/index.js +1 -1
- package/lib/components/point-demo/input/index.js +3 -3
- package/lib/components/point-demo/popup/index.js +1 -1
- package/lib/components/popup/index.js +1 -1
- package/lib/components/popup-select/index.js +1 -1
- package/lib/components/praise-record/PraiseRecordItem.js +2 -2
- package/lib/components/praise-record/index.js +2 -2
- package/lib/components/promise-confirm/index.js +3 -2
- package/lib/components/radio/index.css +4 -0
- package/lib/components/radio/radio.js +11 -4
- package/lib/components/range-picker-pop/index.js +3 -3
- package/lib/components/range-selector-pop/RangeList.js +2 -2
- package/lib/components/range-selector-pop/RangeSelectorPop.js +2 -2
- package/lib/components/rate/index.js +1 -1
- package/lib/components/rich-editor/models/schema.js +2 -2
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/heading/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/lists/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +2 -2
- package/lib/components/rich-editor/plugins/core/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
- package/lib/components/rich-editor/plugins/inline/color/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/em/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/link/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/strong/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +2 -2
- package/lib/components/rich-editor/react/reactNodeView.js +4 -4
- package/lib/components/rich-editor/react/uiProvider.js +2 -2
- package/lib/components/rich-editor/ui/Popup/index.js +2 -2
- package/lib/components/scroll-container/index.js +2 -2
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/scrollbar/simplebar-react.js +1 -1
- package/lib/components/search-dropdown/index.js +1 -1
- package/lib/components/select/Option.js +3 -3
- package/lib/components/select/index.js +3 -3
- package/lib/components/select-layer/index.js +1 -1
- package/lib/components/select-tags/index.js +6 -4
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +6 -2
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +8 -4
- package/lib/components/survey-model/request-api.js +6 -2
- package/lib/components/switch/index.js +1 -1
- package/lib/components/table/index.css +5 -10
- package/lib/components/table/index.js +55 -19
- package/lib/components/tabs/index.css +20 -0
- package/lib/components/tabs/index.js +5 -2
- package/lib/{pages/like-ranking/filter-buttons/name.js → components/tabs/tabBtns.js} +30 -36
- package/lib/components/tag/index.js +1 -1
- package/lib/components/task-relation-modal/index.js +7 -5
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +1 -1
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +1 -1
- package/lib/components/task-relation-modal/tree/category-tree/index.js +4 -2
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +4 -2
- package/lib/components/task-relation-modal/tree/work-tree/index.js +4 -2
- package/lib/components/task-relation-modal/tree-node/index.js +1 -1
- package/lib/components/task-relation-modal/work-relation/index.js +7 -5
- package/lib/components/task-tree/task-item-node/e-project.js +4 -2
- package/lib/components/task-tree/task-item-node/e-task.js +4 -2
- package/lib/components/task-tree/task-item-node/task-node-render.js +1 -1
- package/lib/components/task-tree/task-tree.js +1 -1
- package/lib/components/textarea/index.js +1 -1
- package/lib/components/time-picker/time-picker-selector.js +1 -1
- package/lib/components/time-picker/time-picker.js +1 -1
- package/lib/components/time-picker/timer-picker-input.js +1 -1
- package/lib/components/tita-chart/charts/liquid-ball.js +1 -1
- package/lib/components/tita-chart/charts/pie.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +2 -2
- package/lib/components/toast/index.js +12 -8
- package/lib/components/tooltip/error-tip.js +1 -1
- package/lib/components/tooltip/tooltip-text/index.js +2 -1
- package/lib/components/tooltip/tooltip.js +1 -1
- package/lib/components/tree/index.js +1 -1
- package/lib/components/upload/components/uploadedPreview.js +2 -2
- package/lib/components/upload/index.js +6 -4
- package/lib/components/upload/index2.js +4 -2
- package/lib/components/upvote/index.js +7 -5
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.js +1 -1
- package/lib/components/user-selector/request-apis.js +8 -3
- package/lib/components/user-selector/select-tree/choose-tree/index.js +1 -1
- package/lib/components/user-selector/select-tree/selected-tree/index.js +1 -1
- package/lib/components/version-change-modal/index.js +6 -4
- package/lib/components/version-change-modal/request-api.js +6 -2
- package/lib/components/viewer/ImageListRender.js +2 -2
- package/lib/components/viewer/index.js +2 -2
- package/lib/components/weekly-report/card.js +4 -12
- package/lib/components/weekly-report/common-painter/darwAvatar.js +10 -6
- package/lib/components/weekly-report/common-painter/drawName.js +6 -2
- package/lib/components/weekly-report/common-painter/openDataPainter.js +6 -2
- package/lib/components/weekly-report/index.js +6 -4
- package/lib/components-v1/animate/AnimateChild.js +2 -2
- package/lib/components-v1/animate/animate.js +2 -2
- package/lib/components-v1/avatar/index.js +2 -2
- package/lib/components-v1/buttonv2/ButtonOutlined.js +2 -2
- package/lib/components-v1/buttonv2/ButtonRounded.js +2 -2
- package/lib/components-v1/buttonv2/DefaultButton.js +2 -2
- package/lib/components-v1/confirm/index.js +2 -2
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +2 -2
- package/lib/components-v1/dropDownSelector/dropDownSelector.js +2 -2
- package/lib/components-v1/input/Input.js +3 -3
- package/lib/components-v1/input/InputNumber.js +2 -2
- package/lib/components-v1/placement/placement.js +2 -2
- package/lib/components-v1/placement/placementInner.js +2 -2
- package/lib/components-v1/pop/Pop.js +2 -2
- package/lib/components-v1/pop/PopInner.js +2 -2
- package/lib/components-v1/portals/Portals.js +2 -2
- package/lib/components-v1/progress/CircleProgress.js +2 -2
- package/lib/components-v1/progress/LineProgress.js +2 -2
- package/lib/components-v1/progress/index.js +2 -2
- package/lib/components-v1/radio/radio.js +2 -2
- package/lib/components-v1/radio/radioGroup.js +2 -2
- package/lib/components-v1/search/index.js +2 -2
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/select/index.js +3 -3
- package/lib/components-v1/tabs/index.js +2 -2
- package/lib/components-v1/textarea/index.js +2 -2
- package/lib/components-v1/transition/index.js +2 -2
- package/lib/components-v1/userSelector/UserSelectorPop.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/index.js +2 -2
- package/lib/components-v1/userSelector/components/SearchBar.js +2 -2
- package/lib/components-v1/userSelector/components/SingleMode.js +2 -2
- package/lib/components-v1/userSelector/components/UserItem.js +2 -2
- package/lib/components-v1/userSelector/index.js +2 -2
- package/lib/hooks/useTouch.js +167 -0
- package/lib/index.js +32 -0
- package/lib/pages/aha2021/index.css +0 -1
- package/lib/pages/aha2021/index.js +7 -4
- package/lib/pages/appointment-demo/drop-down-box/index.js +1 -1
- package/lib/pages/appointment-demo/input/index.js +3 -3
- package/lib/pages/appointment-demo/popup/index.js +1 -1
- package/lib/pages/group-management/components/input-form/index.js +3 -3
- package/lib/pages/group-management/components/radio/index.js +1 -1
- package/lib/pages/group-management/components/table/index.js +2 -2
- package/lib/pages/group-management/groupInterface.js +6 -2
- package/lib/pages/group-management/page-view/importGroupStaff/index.js +1 -1
- package/lib/pages/group-management/tree/index.js +1 -1
- package/lib/pages/like-ranking/index.js +1 -1
- package/lib/pages/new-okr-list/index.js +31 -23
- package/lib/pages/new-okr-list/request-api.js +18 -14
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +5 -3
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +1 -1
- package/lib/pages/okr-map/request-apis.js +6 -2
- package/lib/pages/okr-map/share-dialog/index.js +1 -1
- package/lib/utils/auth.js +7 -2
- package/lib/utils/helpers.js +6 -2
- package/lib/utils/open-data.js +6 -4
- package/lib/utils/request-v1.js +6 -2
- package/lib/utils/request.js +6 -2
- package/package.json +7 -4
- package/lib/pages/like-ranking/filter-buttons/index.js +0 -36
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.defaultRefObject = exports["default"] = exports.PAGE_SUMMARY_TONGJI = exports.PAGE_SUMMARY_SUBORDINATE = exports.PAGE_SUMMARY_SHARE = exports.PAGE_SUMMARY_ROLE = exports.PAGE_SUMMARY_MY = exports.PAGE_SUMMARY_DEPART = exports.PAGE_SUMMARY_DASHBOARD = exports.PAGE_SUMMARY_CHART = exports.PAGE_SUMMARY_ALl = void 0;
|
|
6
|
+
exports.defaultRefObject = exports["default"] = exports.PAGE_SUMMARY_TONGJI = exports.PAGE_SUMMARY_TEMPLATE = exports.PAGE_SUMMARY_SUBORDINATE = exports.PAGE_SUMMARY_SHARE = exports.PAGE_SUMMARY_ROLE = exports.PAGE_SUMMARY_MY = exports.PAGE_SUMMARY_DEPART = exports.PAGE_SUMMARY_DASHBOARD = exports.PAGE_SUMMARY_CHART = exports.PAGE_SUMMARY_ALl = void 0;
|
|
7
7
|
|
|
8
8
|
var _i18n = require("../../i18n");
|
|
9
9
|
|
|
@@ -57,6 +57,8 @@ var PAGE_SUMMARY_DASHBOARD = 'dashboard';
|
|
|
57
57
|
exports.PAGE_SUMMARY_DASHBOARD = PAGE_SUMMARY_DASHBOARD;
|
|
58
58
|
var PAGE_SUMMARY_TONGJI = 'tongji';
|
|
59
59
|
exports.PAGE_SUMMARY_TONGJI = PAGE_SUMMARY_TONGJI;
|
|
60
|
+
var PAGE_SUMMARY_TEMPLATE = 'template';
|
|
61
|
+
exports.PAGE_SUMMARY_TEMPLATE = PAGE_SUMMARY_TEMPLATE;
|
|
60
62
|
|
|
61
63
|
var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
62
64
|
IsLeader = _getUserInfo.IsLeader,
|
|
@@ -146,6 +148,13 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
146
148
|
type: _index.MENU_ITEM_NOE,
|
|
147
149
|
href: '#/summary/dashboard',
|
|
148
150
|
isShow: props.isShowDashboard
|
|
151
|
+
}, {
|
|
152
|
+
icon: 'template',
|
|
153
|
+
label: _i18n.locale.menu_summary_template,
|
|
154
|
+
key: PAGE_SUMMARY_TEMPLATE,
|
|
155
|
+
type: _index.MENU_ITEM_NOE,
|
|
156
|
+
href: '#/summary/template/page',
|
|
157
|
+
isShow: props.isShowTemplate
|
|
149
158
|
}, {
|
|
150
159
|
icon: "my-setup",
|
|
151
160
|
label: _i18n.locale.menu_summary_role,
|
|
@@ -255,14 +264,17 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
255
264
|
|
|
256
265
|
for (var i = 0; i < users.length; i++) {
|
|
257
266
|
var user = users[i];
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
267
|
+
|
|
268
|
+
if (user.jobState === 1) {
|
|
269
|
+
treeNodeUsers.push({
|
|
270
|
+
icon: "",
|
|
271
|
+
label: user.name,
|
|
272
|
+
key: "".concat(user.userId),
|
|
273
|
+
type: _index.USER_NODE,
|
|
274
|
+
href: "",
|
|
275
|
+
data: user
|
|
276
|
+
});
|
|
277
|
+
}
|
|
266
278
|
}
|
|
267
279
|
|
|
268
280
|
this.menus[4].children = treeNodeUsers;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getShareStatus = void 0;
|
|
6
|
+
exports.getTemplateUserRole = exports.getShareStatus = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("@titaui/request");
|
|
9
9
|
|
|
@@ -14,4 +14,10 @@ var getShareStatus = function getShareStatus() {
|
|
|
14
14
|
return (0, _request.rget)('v1')("summary/getShareUsers?toUserId=".concat(loginUser.Id));
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
exports.getShareStatus = getShareStatus;
|
|
17
|
+
exports.getShareStatus = getShareStatus;
|
|
18
|
+
|
|
19
|
+
var getTemplateUserRole = function getTemplateUserRole() {
|
|
20
|
+
return (0, _request.rget)('v1')('summaryTemplate/userRole');
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.getTemplateUserRole = getTemplateUserRole;
|
|
@@ -86,6 +86,11 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
86
86
|
isShowTongji = _useState10[0],
|
|
87
87
|
setIsShowTongji = _useState10[1];
|
|
88
88
|
|
|
89
|
+
var _useState11 = (0, _react.useState)(false),
|
|
90
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
91
|
+
isShowTemplate = _useState12[0],
|
|
92
|
+
setIsShowTemplate = _useState12[1];
|
|
93
|
+
|
|
89
94
|
var isShowDepartment = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isDepartmentLeader() || baseAuth.isHrbp();
|
|
90
95
|
var isShowDashboard = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isHrbp();
|
|
91
96
|
var flipRef = (0, _react.useRef)({
|
|
@@ -94,17 +99,18 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
94
99
|
});
|
|
95
100
|
var summaryMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
96
101
|
|
|
97
|
-
var
|
|
102
|
+
var _useState13 = (0, _react.useState)(function () {
|
|
98
103
|
summaryMenusData.current = new _menus["default"]({
|
|
99
104
|
isShowShare: false,
|
|
100
105
|
isShowTongji: false,
|
|
101
|
-
isShowDept: true
|
|
106
|
+
isShowDept: true,
|
|
107
|
+
isShowTemplate: false
|
|
102
108
|
});
|
|
103
109
|
return summaryMenusData.current.getMenus();
|
|
104
110
|
}),
|
|
105
|
-
|
|
106
|
-
menus =
|
|
107
|
-
setMenus =
|
|
111
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
112
|
+
menus = _useState14[0],
|
|
113
|
+
setMenus = _useState14[1]; // 判断路由高亮菜单
|
|
108
114
|
|
|
109
115
|
|
|
110
116
|
(0, _react.useEffect)(function () {
|
|
@@ -281,11 +287,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
281
287
|
isShowShare: isShowShare,
|
|
282
288
|
isShowTongji: isShowTongji,
|
|
283
289
|
isShowDept: isShowDepartment,
|
|
284
|
-
isShowDashboard: isShowDashboard
|
|
290
|
+
isShowDashboard: isShowDashboard,
|
|
291
|
+
isShowTemplate: isShowTemplate
|
|
285
292
|
});
|
|
286
293
|
summaryMenusData.current = newMenu;
|
|
287
294
|
setMenus(newMenu.getMenus());
|
|
288
|
-
}, [isShowShare, isShowDepartment, isShowDashboard, isShowTongji]);
|
|
295
|
+
}, [isShowShare, isShowDepartment, isShowDashboard, isShowTongji, isShowTemplate]);
|
|
289
296
|
(0, _react.useEffect)(function () {
|
|
290
297
|
(0, _requestApi.getShareStatus)().then(function (resp) {
|
|
291
298
|
if (resp.Code === 1) {
|
|
@@ -299,6 +306,18 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
299
306
|
setIsShowTongji(true);
|
|
300
307
|
}
|
|
301
308
|
});
|
|
309
|
+
(0, _requestApi.getTemplateUserRole)().then(function (res) {
|
|
310
|
+
//0普通人不可以查看,1超管老板助理,2总结管理员,3模板管理员
|
|
311
|
+
console.log(res);
|
|
312
|
+
|
|
313
|
+
if (res.Code === 1) {
|
|
314
|
+
if (res.Data.userTempRoles[0] === 0) {
|
|
315
|
+
setIsShowTemplate(false);
|
|
316
|
+
} else {
|
|
317
|
+
setIsShowTemplate(true);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
});
|
|
302
321
|
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
303
322
|
var _iterator = _createForOfIteratorHelper(entries),
|
|
304
323
|
_step;
|
|
@@ -0,0 +1,120 @@
|
|
|
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 _reactRouter = require("react-router");
|
|
15
|
+
|
|
16
|
+
var _flipMenuCard = _interopRequireDefault(require("../../components/flip-menu-card"));
|
|
17
|
+
|
|
18
|
+
var _surveyFrontMenus = _interopRequireDefault(require("./survey-front-menus"));
|
|
19
|
+
|
|
20
|
+
var _context = require("../../context");
|
|
21
|
+
|
|
22
|
+
var _precls = _interopRequireDefault(require("../../precls"));
|
|
23
|
+
|
|
24
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
25
|
+
|
|
26
|
+
require("../../index.css");
|
|
27
|
+
|
|
28
|
+
require("./index.css");
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
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."); }
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
function SurveyMenus(props) {
|
|
49
|
+
var _props$onSelect = props.onSelect,
|
|
50
|
+
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
|
|
51
|
+
history = props.history;
|
|
52
|
+
|
|
53
|
+
var _useState = (0, _react.useState)({}),
|
|
54
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
55
|
+
flipOptions = _useState2[0],
|
|
56
|
+
setFlipOptions = _useState2[1];
|
|
57
|
+
|
|
58
|
+
var _useState3 = (0, _react.useState)(""),
|
|
59
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
60
|
+
flipBackType = _useState4[0],
|
|
61
|
+
setFlipBackType = _useState4[1];
|
|
62
|
+
|
|
63
|
+
var surveyFrontMenu = (0, _react.useRef)();
|
|
64
|
+
var menuRef = (0, _react.useRef)();
|
|
65
|
+
var flipRef = (0, _react.useRef)({
|
|
66
|
+
next: function next() {},
|
|
67
|
+
goback: function goback() {}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
var flipGoNext = function flipGoNext(opt) {
|
|
71
|
+
setFlipBackType(opt.type);
|
|
72
|
+
setFlipOptions(opt.options);
|
|
73
|
+
flipRef.current.next();
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var collapseMenu = function collapseMenu(isHide) {
|
|
77
|
+
if (isHide) {
|
|
78
|
+
menuRef.current.style.width = "0px";
|
|
79
|
+
} else {
|
|
80
|
+
menuRef.current.style.width = "";
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var onFlipChangeHandler = function onFlipChangeHandler(isBack) {
|
|
85
|
+
if (!isBack) {
|
|
86
|
+
// 返回,取消菜单的高亮
|
|
87
|
+
surveyFrontMenu.current.setSelectedMenuKeys([]);
|
|
88
|
+
setTimeout(function () {
|
|
89
|
+
return (// 正面时销毁背面
|
|
90
|
+
setFlipBackType("")
|
|
91
|
+
);
|
|
92
|
+
}, 600);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return /*#__PURE__*/_react["default"].createElement(_context.FlipContext.Provider, {
|
|
97
|
+
value: {
|
|
98
|
+
flipGoNext: flipGoNext
|
|
99
|
+
}
|
|
100
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
101
|
+
ref: menuRef,
|
|
102
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "-survey-menus"))
|
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement(_flipMenuCard["default"], {
|
|
104
|
+
ref: flipRef,
|
|
105
|
+
collapseMenu: collapseMenu,
|
|
106
|
+
defaultWidth: _getLocale.isEn ? 210 : 180,
|
|
107
|
+
onChange: onFlipChangeHandler
|
|
108
|
+
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_surveyFrontMenus["default"], {
|
|
109
|
+
ref: surveyFrontMenu,
|
|
110
|
+
onSelect: onSelect,
|
|
111
|
+
history: history
|
|
112
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
113
|
+
className: (0, _classnames["default"])("tita-bootstrap__scrollbar")
|
|
114
|
+
}))));
|
|
115
|
+
} // @ts-ignore
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
var _default = (0, _reactRouter.withRouter)(SurveyMenus);
|
|
119
|
+
|
|
120
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _menus = require("./menus");
|
|
9
|
+
|
|
10
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
|
|
12
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
13
|
+
|
|
14
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
+
|
|
16
|
+
var _default = /*#__PURE__*/function () {
|
|
17
|
+
function _default(history) {
|
|
18
|
+
_classCallCheck(this, _default);
|
|
19
|
+
|
|
20
|
+
this.history = null;
|
|
21
|
+
this.history = history;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_createClass(_default, [{
|
|
25
|
+
key: "highlight",
|
|
26
|
+
value: function highlight(cb) {
|
|
27
|
+
if (this.isEvaluationManage()) {
|
|
28
|
+
cb(_menus.PAGE_SURVEY_MANAGE);
|
|
29
|
+
} else if (this.isMyInvolved()) {
|
|
30
|
+
cb(_menus.PAGE_SURVEY_MY_INVOLVED);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
key: "isMyInvolved",
|
|
37
|
+
value: function isMyInvolved() {
|
|
38
|
+
var pathname = this.history.location.pathname;
|
|
39
|
+
return pathname.match(/survey\/my-involved/);
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "isEvaluationManage",
|
|
43
|
+
value: function isEvaluationManage() {
|
|
44
|
+
var pathname = this.history.location.pathname;
|
|
45
|
+
return pathname.match(/survey\/manage/);
|
|
46
|
+
}
|
|
47
|
+
}]);
|
|
48
|
+
|
|
49
|
+
return _default;
|
|
50
|
+
}();
|
|
51
|
+
|
|
52
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultRefObject = exports["default"] = exports.PAGE_SURVEY_MY_INVOLVED = exports.PAGE_SURVEY_MANAGE = void 0;
|
|
7
|
+
|
|
8
|
+
var _index = require("../../components/menu-tree/tree-node/index");
|
|
9
|
+
|
|
10
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
11
|
+
|
|
12
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
+
|
|
14
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
15
|
+
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
|
|
18
|
+
var defaultRefObject = {
|
|
19
|
+
menus: [],
|
|
20
|
+
getMenus: function getMenus() {}
|
|
21
|
+
};
|
|
22
|
+
exports.defaultRefObject = defaultRefObject;
|
|
23
|
+
var PAGE_SURVEY_MANAGE = 'surveymanage';
|
|
24
|
+
exports.PAGE_SURVEY_MANAGE = PAGE_SURVEY_MANAGE;
|
|
25
|
+
var PAGE_SURVEY_MY_INVOLVED = 'surveymyinvolved';
|
|
26
|
+
exports.PAGE_SURVEY_MY_INVOLVED = PAGE_SURVEY_MY_INVOLVED;
|
|
27
|
+
|
|
28
|
+
var surveyMenus = /*#__PURE__*/function () {
|
|
29
|
+
function surveyMenus(props) {
|
|
30
|
+
_classCallCheck(this, surveyMenus);
|
|
31
|
+
|
|
32
|
+
this.menus = [{
|
|
33
|
+
icon: 'survey-manage',
|
|
34
|
+
label: (0, _getLocale.getLocale)('360_men_360revman'),
|
|
35
|
+
key: PAGE_SURVEY_MANAGE,
|
|
36
|
+
type: _index.MENU_ITEM_NOE,
|
|
37
|
+
href: '#/survey/manage',
|
|
38
|
+
isShow: props.isShowSurveyManage
|
|
39
|
+
}, {
|
|
40
|
+
icon: 'survey-involved',
|
|
41
|
+
label: (0, _getLocale.getLocale)('OKR_Menu_Title_Collaborator'),
|
|
42
|
+
key: PAGE_SURVEY_MY_INVOLVED,
|
|
43
|
+
type: _index.MENU_ITEM_NOE,
|
|
44
|
+
href: '#/survey/my-involved',
|
|
45
|
+
isShow: true
|
|
46
|
+
}];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
_createClass(surveyMenus, [{
|
|
50
|
+
key: "getMenus",
|
|
51
|
+
value: function getMenus() {
|
|
52
|
+
var menus = this.formateToTreeNodeData(this.menus.filter(function (it) {
|
|
53
|
+
return it.isShow == true;
|
|
54
|
+
}));
|
|
55
|
+
return menus;
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
key: "formateToTreeNodeData",
|
|
59
|
+
value: function formateToTreeNodeData(menus) {
|
|
60
|
+
var pid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
61
|
+
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
62
|
+
var treeNodes = [];
|
|
63
|
+
|
|
64
|
+
for (var i = 0; i < menus.length; i++) {
|
|
65
|
+
var menu = menus[i];
|
|
66
|
+
var hasChildren = !!(menu.children && menu.children.length);
|
|
67
|
+
var isLeaf = menu.isLeaf !== undefined ? menu.isLeaf : !hasChildren;
|
|
68
|
+
var nodeType = menu.type;
|
|
69
|
+
if (!nodeType) nodeType = !isLeaf ? _index.PARENT_MENU_NODE : _index.SUB_MENU_ITEM_NOE;
|
|
70
|
+
treeNodes.push({
|
|
71
|
+
key: "".concat(menu.key),
|
|
72
|
+
title: (0, _getLocale.getLocale)(menu.label) ? (0, _getLocale.getLocale)(menu.label) : menu.label,
|
|
73
|
+
data: menu.data || menu,
|
|
74
|
+
isLeaf: isLeaf,
|
|
75
|
+
children: this.formateToTreeNodeData(menu.children || [], level + 1, menu.key),
|
|
76
|
+
nodeType: nodeType
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return treeNodes;
|
|
81
|
+
}
|
|
82
|
+
}]);
|
|
83
|
+
|
|
84
|
+
return surveyMenus;
|
|
85
|
+
}();
|
|
86
|
+
|
|
87
|
+
exports["default"] = surveyMenus;
|
|
@@ -0,0 +1,178 @@
|
|
|
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 _menus = _interopRequireWildcard(require("./menus"));
|
|
19
|
+
|
|
20
|
+
var _menuHighlight = _interopRequireDefault(require("./menu-highlight"));
|
|
21
|
+
|
|
22
|
+
var _auth = require("../../../../utils/auth");
|
|
23
|
+
|
|
24
|
+
require("../../index.css");
|
|
25
|
+
|
|
26
|
+
require("./index.css");
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
|
+
|
|
30
|
+
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); }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; } } }; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
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."); }
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
49
|
+
var _props$onSelect = props.onSelect,
|
|
50
|
+
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
|
|
51
|
+
history = props.history;
|
|
52
|
+
var baseAuth = new _auth.BaseAuth();
|
|
53
|
+
var isShowSurveyManage = baseAuth.isBoss() || baseAuth.isSurveyManager();
|
|
54
|
+
|
|
55
|
+
var _useState = (0, _react.useState)(function () {
|
|
56
|
+
return document.body.offsetHeight - 198;
|
|
57
|
+
}),
|
|
58
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
+
maxHeight = _useState2[0],
|
|
60
|
+
setMaxHeight = _useState2[1];
|
|
61
|
+
|
|
62
|
+
var _useState3 = (0, _react.useState)(['myokr']),
|
|
63
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
64
|
+
expandedKeys = _useState4[0],
|
|
65
|
+
setExpandedKeys = _useState4[1];
|
|
66
|
+
|
|
67
|
+
var _useState5 = (0, _react.useState)([]),
|
|
68
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
69
|
+
selectedMenuKeys = _useState6[0],
|
|
70
|
+
setSelectedMenuKeys = _useState6[1];
|
|
71
|
+
|
|
72
|
+
var flipRef = (0, _react.useRef)({
|
|
73
|
+
next: function next() {},
|
|
74
|
+
goback: function goback() {}
|
|
75
|
+
});
|
|
76
|
+
var surveyMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
77
|
+
|
|
78
|
+
var _useState7 = (0, _react.useState)(function () {
|
|
79
|
+
surveyMenusData.current = new _menus["default"]({
|
|
80
|
+
isShowSurveyManage: isShowSurveyManage
|
|
81
|
+
});
|
|
82
|
+
return surveyMenusData.current.getMenus();
|
|
83
|
+
}),
|
|
84
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
85
|
+
menus = _useState8[0],
|
|
86
|
+
setMenus = _useState8[1]; // 判断路由高亮菜单
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
(0, _react.useEffect)(function () {
|
|
90
|
+
var menuHighlight = new _menuHighlight["default"](history);
|
|
91
|
+
menuHighlight.highlight(function (menu) {
|
|
92
|
+
return changeHighlightMenu([menu]);
|
|
93
|
+
});
|
|
94
|
+
var pathname = history.location.pathname;
|
|
95
|
+
var firstMenuHref = menus[0].data.href;
|
|
96
|
+
if (firstMenuHref.split('#')[1] === pathname) return; //当前路由与二级菜单第一项相同时直接return
|
|
97
|
+
|
|
98
|
+
var menusHrefArr = ['/survey/manage', '/survey/my-involved'];
|
|
99
|
+
var isIncludeMenu = menusHrefArr.find(function (item) {
|
|
100
|
+
//表示当前路由是否是左侧二级菜单的选项
|
|
101
|
+
return item.includes(pathname);
|
|
102
|
+
});
|
|
103
|
+
if (!isIncludeMenu) return; //如果不是二级菜单选项直接return
|
|
104
|
+
|
|
105
|
+
var isShowMenuItem = menus.find(function (item) {
|
|
106
|
+
//判断当前路由是否有权限被展示
|
|
107
|
+
return item.data.href.split('#')[1].includes(pathname);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
if (!isShowMenuItem) {
|
|
111
|
+
//如果当前路由没有权限展示的话,则跳转到有权限二级路由的第一项
|
|
112
|
+
window.location.href = firstMenuHref;
|
|
113
|
+
}
|
|
114
|
+
}, [history.location.pathname, history.location.search]);
|
|
115
|
+
|
|
116
|
+
var changeHighlightMenu = function changeHighlightMenu(menuKeys) {
|
|
117
|
+
setSelectedMenuKeys(menuKeys);
|
|
118
|
+
flipRef.current.goback();
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
|
|
122
|
+
var node = _ref.node;
|
|
123
|
+
onSelect(node); // 处理菜单选中
|
|
124
|
+
|
|
125
|
+
if (!selectedKyes.length) {
|
|
126
|
+
return;
|
|
127
|
+
} else {
|
|
128
|
+
setSelectedMenuKeys(selectedKyes);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
var onExpandHandler = function onExpandHandler(expandKeys, _ref2) {
|
|
133
|
+
var expanded = _ref2.expanded,
|
|
134
|
+
node = _ref2.node;
|
|
135
|
+
setExpandedKeys(expandKeys);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
139
|
+
return {
|
|
140
|
+
setSelectedMenuKeys: setSelectedMenuKeys
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
(0, _react.useEffect)(function () {
|
|
144
|
+
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
145
|
+
var _iterator = _createForOfIteratorHelper(entries),
|
|
146
|
+
_step;
|
|
147
|
+
|
|
148
|
+
try {
|
|
149
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
150
|
+
var entry = _step.value;
|
|
151
|
+
var cr = entry.contentRect;
|
|
152
|
+
setMaxHeight(cr.height - 198);
|
|
153
|
+
}
|
|
154
|
+
} catch (err) {
|
|
155
|
+
_iterator.e(err);
|
|
156
|
+
} finally {
|
|
157
|
+
_iterator.f();
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
obs.observe(document.body);
|
|
161
|
+
return function () {
|
|
162
|
+
obs.unobserve(document.body);
|
|
163
|
+
};
|
|
164
|
+
}, []);
|
|
165
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
166
|
+
style: {
|
|
167
|
+
maxHeight: maxHeight
|
|
168
|
+
}
|
|
169
|
+
}, /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|
|
170
|
+
data: menus,
|
|
171
|
+
selectedKeys: selectedMenuKeys,
|
|
172
|
+
expandedKeys: expandedKeys,
|
|
173
|
+
onSelect: onSelectHandler,
|
|
174
|
+
onExpand: onExpandHandler
|
|
175
|
+
})));
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
exports["default"] = _default;
|
|
@@ -60,6 +60,7 @@ var I18N = /*#__PURE__*/_createClass(function I18N() {
|
|
|
60
60
|
this.menu_summary = 'Rep_NewS_Management';
|
|
61
61
|
this.menu_summary_dashboard = 'Rep_Das_Dashboard';
|
|
62
62
|
this.menu_summary_tongji = 'HP_MyPeer';
|
|
63
|
+
this.menu_summary_template = 'Rep_Tab_SummTemplates';
|
|
63
64
|
});
|
|
64
65
|
|
|
65
66
|
var locale = new I18N();
|
|
@@ -23,6 +23,8 @@ var _demoMenus = _interopRequireDefault(require("./export-modules/demo-menus"));
|
|
|
23
23
|
|
|
24
24
|
var _summaryMenus = _interopRequireDefault(require("./export-modules/summary-menus"));
|
|
25
25
|
|
|
26
|
+
var _surveyMenu = _interopRequireDefault(require("./export-modules/survey-menu"));
|
|
27
|
+
|
|
26
28
|
var _excluded = ["type"];
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -62,6 +64,10 @@ var Menus = function Menus(props) {
|
|
|
62
64
|
return /*#__PURE__*/_react["default"].createElement(_summaryMenus["default"], restProps);
|
|
63
65
|
}
|
|
64
66
|
|
|
67
|
+
if (type === 'survey') {
|
|
68
|
+
return /*#__PURE__*/_react["default"].createElement(_surveyMenu["default"], restProps);
|
|
69
|
+
}
|
|
70
|
+
|
|
65
71
|
return undefined;
|
|
66
72
|
};
|
|
67
73
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.removeSummaryFollower = exports.removeFollower = exports.getTongjiUsersData = exports.getSummaryFollowerList = exports.getSubordinates = exports.getShareUsersData = exports.getMyDepartMent = exports.getFollowerList = exports.getDepsAndUsers = exports.addSummaryFollower = exports.addFollower = void 0;
|
|
6
|
+
exports.removeSummaryFollower = exports.removeFollower = exports.getUserGuidSetting = exports.getTongjiUsersData = exports.getSummaryFollowerList = exports.getSubordinates = exports.getShareUsersData = exports.getMyDepartMent = exports.getFollowerList = exports.getDepsAndUsers = exports.addSummaryFollower = exports.addFollower = void 0;
|
|
7
7
|
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
|
|
@@ -33,6 +33,12 @@ var requestDomain = function requestDomain() {
|
|
|
33
33
|
return "".concat(location.protocol, "//www.tita.gift");
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
var getUserGuidSetting = function getUserGuidSetting(moduleType) {
|
|
37
|
+
return (0, _request.rpost)("v1")("guidPage/getUserGuidSetting?moduleType=".concat(moduleType));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
exports.getUserGuidSetting = getUserGuidSetting;
|
|
41
|
+
|
|
36
42
|
var getFollowerList = function getFollowerList() {
|
|
37
43
|
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/follow/followerList")).then(function (res) {
|
|
38
44
|
return res.data.Data;
|