@titaui/pc 1.12.47 → 1.12.48-beta.3
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 +5 -0
- package/lib/components/avatar/icon-avatar/index.js +1 -1
- 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/button/default-button/index.js +1 -1
- package/lib/components/button/icon-btn/index.js +1 -1
- 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 +4 -6
- package/lib/components/common-share/publishMblog.js +2 -4
- 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 +2 -4
- package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +2 -4
- package/lib/components/create-okr-modal/index.js +2 -4
- package/lib/components/create-okr-modal/objectType.js +2 -2
- package/lib/components/create-okr-modal/request-api.js +12 -16
- package/lib/components/create-okr-modal/utils/helper.js +2 -6
- 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.js +1 -1
- package/lib/components/dialog-upload/index.js +2 -4
- package/lib/components/drawer/headerDrop.js +1 -1
- package/lib/components/drawer/index.js +1 -1
- package/lib/components/drawer-manager/drawerWrapper.js +3 -5
- package/lib/components/drawer-manager/index.js +1 -1
- package/lib/components/drop-selector/index.js +1 -1
- package/lib/components/dynamic/constant.js +5 -1
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +44 -2
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +24 -6
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +2 -4
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +61 -62
- package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +9 -3
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +91 -45
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +22 -8
- 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/components/evalute/index.css +13 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +5 -3
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +44 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +30 -11
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +39 -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 +2 -2
- 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.css +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/components/firework/index.js +2 -6
- package/lib/components/form/form-fields/date/index.js +5 -5
- package/lib/components/form/form-fields/dropdown/index.js +1 -1
- package/lib/components/form/form-fields/input/index.js +1 -1
- package/lib/components/form/form-fields/input-verification-code/index.js +2 -4
- package/lib/components/form/form-fields/user/index.js +1 -1
- package/lib/components/grid-layout/util/network.js +6 -10
- package/lib/components/guide-tip/index.css +1 -1
- package/lib/components/guide-tip/index.js +16 -28
- package/lib/components/help-card/index.js +1 -1
- package/lib/components/import-modal/import-task-modal/index.js +1 -1
- package/lib/components/import-modal/tree/okr-tree/index.js +2 -4
- package/lib/components/import-modal/tree-node/index.js +1 -1
- 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/interview-menu/setting.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.css +28 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/menu-item.js +5 -1
- package/lib/components/menus/export-modules/demo-menus/menus.js +5 -4
- package/lib/components/menus/export-modules/interview-menus/constant.js +33 -22
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +20 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +29 -28
- package/lib/components/menus/export-modules/interview-menus/menus.js +164 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +15 -5
- package/lib/components/menus/export-modules/summary-menus/index.js +1 -1
- package/lib/components/menus/export-modules/summary-menus/menus.js +57 -7
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +34 -27
- package/lib/components/menus/request-apis.js +16 -2
- package/lib/components/nav-top/components/app-center/images/new.svg +30 -0
- package/lib/components/nav-top/components/app-center/index.css +20 -1
- package/lib/components/nav-top/components/app-center/index.js +9 -1
- package/lib/components/nav-top/components/menu/index.css +11 -0
- package/lib/components/nav-top/components/menu/index.js +46 -54
- package/lib/components/nav-top/index.css +5 -0
- package/lib/components/nav-top/index.js +57 -20
- package/lib/components/okr-detail/auth.js +2 -2
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +2 -4
- package/lib/components/okr-detail/components/ao-nice/index.js +4 -6
- 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 +2 -4
- package/lib/components/okr-detail/components/header/index.js +1 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +2 -4
- package/lib/components/okr-detail/components/header/o-classify.js +2 -4
- 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 +2 -4
- package/lib/components/okr-detail/components/o-progress-update/index.js +2 -4
- 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 +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +2 -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 +2 -4
- 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 +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +6 -8
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +2 -4
- package/lib/components/okr-detail/detail-footer/index.js +2 -4
- package/lib/components/okr-detail/detail-header/index.js +10 -12
- package/lib/components/okr-detail/okr-list/index.js +2 -4
- package/lib/components/okr-detail/request-apis.js +2 -6
- package/lib/components/okr-flow/child-node/fields/creator.js +2 -4
- package/lib/components/okr-flow/child-node/work-node.js +2 -4
- package/lib/components/okr-flow/export-modal/index.js +43 -6
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +8 -10
- package/lib/components/okr-flow/okr-map/index.js +3 -1
- package/lib/components/okr-flow/request-apis.js +2 -6
- package/lib/components/okr-flow/root-node/index.js +2 -4
- package/lib/components/okr-progress/components/o-progress-update/index.js +2 -4
- package/lib/components/okr-progress-modal/index.js +2 -4
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +4 -6
- 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 +4 -8
- package/lib/components/okr-share/common-painter/openDataPainter.js +2 -6
- package/lib/components/okr-share/common-painter/utils.js +4 -8
- package/lib/components/okr-share/pink-card/drawDepartmentName.js +2 -6
- package/lib/components/okr-share/pink-card/drawKrs.js +2 -6
- package/lib/components/okr-share/pink-card/drawQuote.js +2 -6
- package/lib/components/okr-share/pink-card/drawUserName.js +2 -6
- package/lib/components/okr-share/pink-card/index.js +2 -6
- package/lib/components/okr-share/publishMblog.js +2 -4
- package/lib/components/okr-share/shareCardSelector.js +4 -6
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
- package/lib/components/okrcase-library/server/network.js +20 -24
- package/lib/components/open-data-painter/index.js +2 -6
- package/lib/components/operation-records/OperationRecordItem.js +2 -2
- package/lib/components/operation-records/index.js +2 -2
- package/lib/components/pagination/pagination.js +1 -1
- package/lib/components/period-selector/components/button/index.js +1 -1
- package/lib/components/period-selector/helper/index.js +2 -6
- 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 +4 -35
- 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/components/picker-trigger/index.css +2 -3
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +2 -2
- package/lib/components/picker/range-picker/index.js +12 -2
- package/lib/components/picker/utils.js +9 -2
- 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/praise-record/PraiseRecordItem.js +2 -2
- package/lib/components/praise-record/index.js +2 -2
- 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.css +1 -1
- package/lib/components/rate/index.js +30 -3
- 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/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 +7 -3
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +2 -6
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +4 -8
- package/lib/components/survey-model/request-api.js +2 -6
- package/lib/components/switch/index.js +1 -1
- package/lib/components/table/index.js +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/task-relation-modal/index.js +5 -7
- 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 +2 -4
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +2 -4
- package/lib/components/task-relation-modal/tree/work-tree/index.js +2 -4
- package/lib/components/task-relation-modal/tree-node/index.js +1 -1
- package/lib/components/task-relation-modal/work-relation/index.js +5 -7
- package/lib/components/task-tree/task-item-node/e-project.js +2 -4
- package/lib/components/task-tree/task-item-node/e-task.js +2 -4
- 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 +8 -12
- package/lib/components/tooltip/error-tip.js +1 -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 +2 -2
- package/lib/components/upvote/index.js +5 -7
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.js +1 -1
- 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 +4 -6
- package/lib/components/version-change-modal/request-api.js +2 -6
- package/lib/components/viewer/ImageListRender.js +2 -2
- package/lib/components/viewer/index.js +2 -2
- package/lib/components/weekly-report/card.js +12 -4
- package/lib/components/weekly-report/common-painter/darwAvatar.js +6 -10
- package/lib/components/weekly-report/common-painter/drawName.js +2 -6
- package/lib/components/weekly-report/common-painter/openDataPainter.js +2 -6
- package/lib/components/weekly-report/index.js +4 -6
- 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/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/groupInterface.js +2 -6
- 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/new-okr-list/request-api.js +14 -18
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +3 -5
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +1 -1
- package/lib/pages/okr-map/request-apis.js +2 -6
- package/lib/pages/okr-map/share-dialog/index.js +1 -1
- package/lib/utils/auth.js +7 -2
- package/lib/utils/open-data.js +5 -7
- package/lib/utils/request-v1.js +2 -6
- package/lib/utils/request.js +2 -6
- package/package.json +2 -2
|
@@ -21,7 +21,11 @@ function _default(props) {
|
|
|
21
21
|
|
|
22
22
|
var onNodeClickHandler = function onNodeClickHandler() {
|
|
23
23
|
if (data.href) {
|
|
24
|
-
|
|
24
|
+
if (data.openBlank) {
|
|
25
|
+
window.open(data.href, '_blank');
|
|
26
|
+
} else {
|
|
27
|
+
window.location.href = data.href;
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
};
|
|
27
31
|
|
|
@@ -21,6 +21,7 @@ var EManagerType;
|
|
|
21
21
|
EManagerType[EManagerType["Supervisor"] = 2] = "Supervisor";
|
|
22
22
|
EManagerType[EManagerType["ReCharge"] = 3] = "ReCharge";
|
|
23
23
|
EManagerType[EManagerType["DemoFreeReadOnly"] = 4] = "DemoFreeReadOnly";
|
|
24
|
+
EManagerType[EManagerType["ReadOnlyAll"] = 5] = "ReadOnlyAll";
|
|
24
25
|
})(EManagerType || (EManagerType = {}));
|
|
25
26
|
|
|
26
27
|
var defaultRefObject = {
|
|
@@ -104,7 +105,7 @@ var DemoMenuData = /*#__PURE__*/function () {
|
|
|
104
105
|
label: "公海资源",
|
|
105
106
|
key: "customer",
|
|
106
107
|
href: "#/demofree/customer/public",
|
|
107
|
-
isShow:
|
|
108
|
+
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager,
|
|
108
109
|
children: [{
|
|
109
110
|
icon: "",
|
|
110
111
|
label: "全部客户",
|
|
@@ -129,19 +130,19 @@ var DemoMenuData = /*#__PURE__*/function () {
|
|
|
129
130
|
label: "客户续费",
|
|
130
131
|
key: "recharge",
|
|
131
132
|
href: "#/demofree/recharge",
|
|
132
|
-
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager,
|
|
133
|
+
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager || this.isManager === EManagerType.ReadOnlyAll,
|
|
133
134
|
children: [{
|
|
134
135
|
icon: "",
|
|
135
136
|
label: "客户",
|
|
136
137
|
key: PAGE_RECHARGE_LIST,
|
|
137
138
|
href: "#/demofree/recharge/list",
|
|
138
|
-
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager
|
|
139
|
+
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager || this.isManager === EManagerType.ReadOnlyAll
|
|
139
140
|
}, {
|
|
140
141
|
icon: "",
|
|
141
142
|
label: "到期订单",
|
|
142
143
|
key: PAGE_DUEDATE_ORDER,
|
|
143
144
|
href: "#/demofree/recharge/order",
|
|
144
|
-
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager
|
|
145
|
+
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager || this.isManager === EManagerType.ReadOnlyAll
|
|
145
146
|
}]
|
|
146
147
|
}];
|
|
147
148
|
}
|
|
@@ -5,9 +5,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
|
|
8
|
+
var _bsGlobal = require("../../../../utils/bs-global");
|
|
9
|
+
|
|
8
10
|
var _getLocale = require("../../../../utils/getLocale");
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
var _treeNode = require("../../components/menu-tree/tree-node");
|
|
13
|
+
|
|
14
|
+
var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
15
|
+
IsLeader = _getUserInfo.IsLeader,
|
|
16
|
+
IsBoss = _getUserInfo.IsBoss,
|
|
17
|
+
IsRoot = _getUserInfo.IsRoot,
|
|
18
|
+
Role = _getUserInfo.Role,
|
|
19
|
+
IsHrbp = _getUserInfo.IsHrbp;
|
|
20
|
+
|
|
21
|
+
var mamagementAuthority = IsBoss || IsRoot && Role !== 4 || IsLeader || IsHrbp;
|
|
22
|
+
|
|
11
23
|
var getMenus = function getMenus() {
|
|
12
24
|
return [{
|
|
13
25
|
icon: 'my-interview',
|
|
@@ -24,27 +36,26 @@ var getMenus = function getMenus() {
|
|
|
24
36
|
label: (0, _getLocale.getLocale)('Ooo_Mo_Templates'),
|
|
25
37
|
key: 'template',
|
|
26
38
|
href: '#/interview?reactRouterName=template'
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
];
|
|
39
|
+
}, {
|
|
40
|
+
icon: '',
|
|
41
|
+
label: (0, _getLocale.getLocale)('Ooo_Mo_Administ'),
|
|
42
|
+
key: 'manage-interview-group',
|
|
43
|
+
type: _treeNode.GROUP_NAME_NODE,
|
|
44
|
+
href: '',
|
|
45
|
+
isShow: mamagementAuthority
|
|
46
|
+
}, {
|
|
47
|
+
icon: 'setting',
|
|
48
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_onManage'),
|
|
49
|
+
key: 'management',
|
|
50
|
+
href: '#/interview?reactRouterName=management',
|
|
51
|
+
isShow: mamagementAuthority
|
|
52
|
+
}, {
|
|
53
|
+
icon: 'yibiao',
|
|
54
|
+
label: (0, _getLocale.getLocale)('Ooo_Ddb_Dashboard'),
|
|
55
|
+
key: 'dashboard',
|
|
56
|
+
href: '#/interview?reactRouterName=dashboard',
|
|
57
|
+
isShow: mamagementAuthority
|
|
58
|
+
}];
|
|
48
59
|
};
|
|
49
60
|
|
|
50
61
|
var _default = getMenus;
|
|
@@ -14,6 +14,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
14
14
|
var MY_INTERVIEW = 'myInterview';
|
|
15
15
|
var TODOS = 'todos';
|
|
16
16
|
var TEMPLATE = 'template';
|
|
17
|
+
var MANAGEMENT = 'management';
|
|
18
|
+
var DASHBOARD = 'dashboard';
|
|
17
19
|
|
|
18
20
|
var JudgeManageHighLightMenu = /*#__PURE__*/function () {
|
|
19
21
|
function JudgeManageHighLightMenu(hash) {
|
|
@@ -38,6 +40,16 @@ var JudgeManageHighLightMenu = /*#__PURE__*/function () {
|
|
|
38
40
|
value: function isTemplate() {
|
|
39
41
|
return !!this.search.match(/\?reactRouterName=template/);
|
|
40
42
|
}
|
|
43
|
+
}, {
|
|
44
|
+
key: "isManagement",
|
|
45
|
+
value: function isManagement() {
|
|
46
|
+
return !!this.search.match(/\?reactRouterName=management/);
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
key: "isDashboard",
|
|
50
|
+
value: function isDashboard() {
|
|
51
|
+
return !!this.search.match(/\?reactRouterName=dashboard/);
|
|
52
|
+
}
|
|
41
53
|
}, {
|
|
42
54
|
key: "getHighLightMenu",
|
|
43
55
|
value: function getHighLightMenu() {
|
|
@@ -53,6 +65,14 @@ var JudgeManageHighLightMenu = /*#__PURE__*/function () {
|
|
|
53
65
|
return TEMPLATE;
|
|
54
66
|
}
|
|
55
67
|
|
|
68
|
+
if (this.isManagement()) {
|
|
69
|
+
return MANAGEMENT;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (this.isDashboard()) {
|
|
73
|
+
return DASHBOARD;
|
|
74
|
+
}
|
|
75
|
+
|
|
56
76
|
return '';
|
|
57
77
|
}
|
|
58
78
|
}]);
|
|
@@ -15,10 +15,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
15
15
|
|
|
16
16
|
var _menuTree = _interopRequireDefault(require("../../components/menu-tree"));
|
|
17
17
|
|
|
18
|
-
var _index = require("../../components/menu-tree/tree-node/index");
|
|
19
|
-
|
|
20
|
-
var _constant = _interopRequireDefault(require("./constant"));
|
|
21
|
-
|
|
22
18
|
var _handleHighlight = _interopRequireDefault(require("./handle-highlight"));
|
|
23
19
|
|
|
24
20
|
var _getLocale = require("../../../../utils/getLocale");
|
|
@@ -27,6 +23,10 @@ var _flipMenuCard = _interopRequireDefault(require("../../components/flip-menu-c
|
|
|
27
23
|
|
|
28
24
|
var _scrollbar = _interopRequireDefault(require("../../../scrollbar"));
|
|
29
25
|
|
|
26
|
+
var _tools = require("../../../../utils/tools");
|
|
27
|
+
|
|
28
|
+
var _menus = _interopRequireWildcard(require("./menus"));
|
|
29
|
+
|
|
30
30
|
require("./index.css");
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -58,34 +58,22 @@ function InterviewMenus(props) {
|
|
|
58
58
|
selectedMenuKeys = _useState2[0],
|
|
59
59
|
setSelectedMenuKeys = _useState2[1];
|
|
60
60
|
|
|
61
|
+
var interviewMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
62
|
+
|
|
63
|
+
var _useState3 = (0, _react.useState)(function () {
|
|
64
|
+
interviewMenusData.current = new _menus["default"]();
|
|
65
|
+
return interviewMenusData.current.getMenus();
|
|
66
|
+
}),
|
|
67
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
68
|
+
menus = _useState4[0],
|
|
69
|
+
setMenus = _useState4[1];
|
|
70
|
+
|
|
61
71
|
var flipRef = (0, _react.useRef)({
|
|
62
72
|
next: function next() {},
|
|
63
73
|
goback: function goback() {}
|
|
64
74
|
});
|
|
65
75
|
var menuRef = (0, _react.useRef)();
|
|
66
76
|
|
|
67
|
-
var formateToTreeNodeData = function formateToTreeNodeData(menus) {
|
|
68
|
-
var treeNodes = [];
|
|
69
|
-
|
|
70
|
-
for (var i = 0; i < menus.length; i = i + 1) {
|
|
71
|
-
var menu = menus[i];
|
|
72
|
-
var hasChildren = !!(menu.children && menu.children.length);
|
|
73
|
-
var isLeaf = menu.isLeaf !== undefined ? menu.isLeaf : !hasChildren;
|
|
74
|
-
var nodeType = menu.type;
|
|
75
|
-
if (!nodeType) nodeType = !isLeaf ? _index.PARENT_MENU_NODE : _index.SUB_MENU_ITEM_NOE;
|
|
76
|
-
treeNodes.push({
|
|
77
|
-
key: "".concat(menu.key),
|
|
78
|
-
title: (0, _getLocale.getLocale)(menu.label) ? (0, _getLocale.getLocale)(menu.label) : menu.label,
|
|
79
|
-
data: menu.data || menu,
|
|
80
|
-
isLeaf: isLeaf,
|
|
81
|
-
children: formateToTreeNodeData(menu.children || []),
|
|
82
|
-
nodeType: nodeType
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return treeNodes;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
77
|
var collapseMenu = function collapseMenu(isHide) {
|
|
90
78
|
if (isHide) {
|
|
91
79
|
menuRef.current.style.width = '0px';
|
|
@@ -94,11 +82,24 @@ function InterviewMenus(props) {
|
|
|
94
82
|
}
|
|
95
83
|
};
|
|
96
84
|
|
|
85
|
+
(0, _react.useEffect)(function () {
|
|
86
|
+
interviewMenusData.current = new _menus["default"]();
|
|
87
|
+
var newMenus = interviewMenusData.current.getMenus();
|
|
88
|
+
setMenus(newMenus);
|
|
89
|
+
|
|
90
|
+
var _getQueryString = (0, _tools.getQueryString)(),
|
|
91
|
+
_getQueryString$react = _getQueryString.reactRouterName,
|
|
92
|
+
reactRouterName = _getQueryString$react === void 0 ? '' : _getQueryString$react;
|
|
93
|
+
|
|
94
|
+
if (!reactRouterName) {
|
|
95
|
+
window.location.href = newMenus[0].data.href;
|
|
96
|
+
}
|
|
97
|
+
}, [history.location.pathname]);
|
|
97
98
|
(0, _react.useEffect)(function () {
|
|
98
99
|
var search = history.location.search;
|
|
99
100
|
var activeMenu = new _handleHighlight["default"](search).getHighLightMenu();
|
|
100
101
|
setSelectedMenuKeys([activeMenu]);
|
|
101
|
-
}, [history.location.
|
|
102
|
+
}, [history.location.search]);
|
|
102
103
|
|
|
103
104
|
var onSelectHandler = function onSelectHandler(selectedKyes) {
|
|
104
105
|
// 处理菜单选中
|
|
@@ -116,7 +117,7 @@ function InterviewMenus(props) {
|
|
|
116
117
|
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
118
|
className: (0, _classnames["default"])("".concat(preCls, "-interview-menus-tree"))
|
|
118
119
|
}, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], null, /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|
|
119
|
-
data:
|
|
120
|
+
data: menus,
|
|
120
121
|
selectedKeys: selectedMenuKeys,
|
|
121
122
|
expandedKeys: expandedKeys,
|
|
122
123
|
onSelect: onSelectHandler
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultRefObject = exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _bsGlobal = require("../../../../utils/bs-global");
|
|
9
|
+
|
|
10
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
11
|
+
|
|
12
|
+
var _treeNode = require("../../components/menu-tree/tree-node");
|
|
13
|
+
|
|
14
|
+
var _index = require("../../components/menu-tree/tree-node/index");
|
|
15
|
+
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
+
|
|
18
|
+
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); } }
|
|
19
|
+
|
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
+
|
|
22
|
+
var defaultRefObject = {
|
|
23
|
+
menus: [],
|
|
24
|
+
getMenus: function getMenus() {}
|
|
25
|
+
};
|
|
26
|
+
exports.defaultRefObject = defaultRefObject;
|
|
27
|
+
|
|
28
|
+
var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
29
|
+
IsLeader = _getUserInfo.IsLeader,
|
|
30
|
+
IsBoss = _getUserInfo.IsBoss,
|
|
31
|
+
IsRoot = _getUserInfo.IsRoot,
|
|
32
|
+
Role = _getUserInfo.Role,
|
|
33
|
+
IsHrbp = _getUserInfo.IsHrbp;
|
|
34
|
+
|
|
35
|
+
var mamagementAuthority = IsBoss || IsRoot && Role !== 4 || IsLeader || IsHrbp;
|
|
36
|
+
|
|
37
|
+
var InterviewMenus = /*#__PURE__*/function () {
|
|
38
|
+
function InterviewMenus() {
|
|
39
|
+
_classCallCheck(this, InterviewMenus);
|
|
40
|
+
|
|
41
|
+
this.menus = [{
|
|
42
|
+
icon: 'my-interview',
|
|
43
|
+
label: (0, _getLocale.getLocale)('Ooo_Mo_My1on1'),
|
|
44
|
+
key: 'myInterview',
|
|
45
|
+
href: '#/interview?reactRouterName=myInterview'
|
|
46
|
+
}, {
|
|
47
|
+
icon: 'todo',
|
|
48
|
+
label: (0, _getLocale.getLocale)('Ooo_Tas_ActionPlans'),
|
|
49
|
+
key: 'todos',
|
|
50
|
+
href: '#/interview?reactRouterName=todos'
|
|
51
|
+
}, {
|
|
52
|
+
icon: 'template',
|
|
53
|
+
label: (0, _getLocale.getLocale)('Ooo_Mo_Templates'),
|
|
54
|
+
key: 'template',
|
|
55
|
+
href: '#/interview?reactRouterName=template'
|
|
56
|
+
}, {
|
|
57
|
+
icon: '',
|
|
58
|
+
label: (0, _getLocale.getLocale)('Ooo_Mo_Administ'),
|
|
59
|
+
key: 'manage-interview-group',
|
|
60
|
+
type: _treeNode.GROUP_NAME_NODE,
|
|
61
|
+
href: '',
|
|
62
|
+
isShow: mamagementAuthority
|
|
63
|
+
}, {
|
|
64
|
+
icon: 'setting',
|
|
65
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_onManage'),
|
|
66
|
+
key: 'management',
|
|
67
|
+
href: '#/interview?reactRouterName=management',
|
|
68
|
+
isShow: mamagementAuthority
|
|
69
|
+
}, {
|
|
70
|
+
icon: 'yibiao',
|
|
71
|
+
label: (0, _getLocale.getLocale)('Ooo_Ddb_Dashboard'),
|
|
72
|
+
key: 'dashboard',
|
|
73
|
+
href: '#/interview?reactRouterName=dashboard',
|
|
74
|
+
isShow: mamagementAuthority
|
|
75
|
+
}];
|
|
76
|
+
this.newMenus = {
|
|
77
|
+
myInterview: [{
|
|
78
|
+
icon: 'my-interview',
|
|
79
|
+
label: (0, _getLocale.getLocale)('Ooo_Mo_My1on1'),
|
|
80
|
+
key: 'myInterview',
|
|
81
|
+
href: '#/interview/my?reactRouterName=myInterview'
|
|
82
|
+
}, {
|
|
83
|
+
icon: 'todo',
|
|
84
|
+
label: (0, _getLocale.getLocale)('Ooo_Tas_ActionPlans'),
|
|
85
|
+
key: 'todos',
|
|
86
|
+
href: '#/interview/my?reactRouterName=todos'
|
|
87
|
+
}, {
|
|
88
|
+
icon: 'template',
|
|
89
|
+
label: (0, _getLocale.getLocale)('Ooo_Mo_Templates'),
|
|
90
|
+
key: 'template',
|
|
91
|
+
href: '#/interview/my?reactRouterName=template'
|
|
92
|
+
}],
|
|
93
|
+
interviewManagement: [{
|
|
94
|
+
icon: 'setting',
|
|
95
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_onManage'),
|
|
96
|
+
key: 'management',
|
|
97
|
+
href: '#/interview/management?reactRouterName=management',
|
|
98
|
+
isShow: mamagementAuthority
|
|
99
|
+
}],
|
|
100
|
+
interviewDashboard: [{
|
|
101
|
+
icon: 'yibiao',
|
|
102
|
+
label: (0, _getLocale.getLocale)('Ooo_Ddb_Dashboard'),
|
|
103
|
+
key: 'dashboard',
|
|
104
|
+
href: '#/interview/dashboard?reactRouterName=dashboard',
|
|
105
|
+
isShow: mamagementAuthority
|
|
106
|
+
}]
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
_createClass(InterviewMenus, [{
|
|
111
|
+
key: "getMenus",
|
|
112
|
+
value: function getMenus() {
|
|
113
|
+
var isUseNewMenu = window.BSGlobal.isUseNewMenu;
|
|
114
|
+
var menus = this.menus;
|
|
115
|
+
|
|
116
|
+
if (isUseNewMenu) {
|
|
117
|
+
var hash = window.location.hash.split('?')[0] || '';
|
|
118
|
+
|
|
119
|
+
if (hash) {
|
|
120
|
+
if (hash.includes('interview/my')) {
|
|
121
|
+
menus = this.newMenus.myInterview;
|
|
122
|
+
} else if (hash.includes('interview/management')) {
|
|
123
|
+
menus = this.newMenus.interviewManagement;
|
|
124
|
+
} else if (hash.includes('interview/dashboard')) {
|
|
125
|
+
menus = this.newMenus.interviewDashboard;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return this.formateToTreeNodeData(menus);
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
key: "formateToTreeNodeData",
|
|
134
|
+
value: function formateToTreeNodeData(menus) {
|
|
135
|
+
var treeNodes = [];
|
|
136
|
+
|
|
137
|
+
for (var i = 0; i < menus.length; i = i + 1) {
|
|
138
|
+
var menu = menus[i];
|
|
139
|
+
var hasChildren = !!(menu.children && menu.children.length);
|
|
140
|
+
var isLeaf = menu.isLeaf !== undefined ? menu.isLeaf : !hasChildren;
|
|
141
|
+
var nodeType = menu.type;
|
|
142
|
+
if (!nodeType) nodeType = !isLeaf ? _index.PARENT_MENU_NODE : _index.SUB_MENU_ITEM_NOE;
|
|
143
|
+
|
|
144
|
+
if (menu.isShow !== false) {
|
|
145
|
+
treeNodes.push({
|
|
146
|
+
key: "".concat(menu.key),
|
|
147
|
+
title: (0, _getLocale.getLocale)(menu.label) ? (0, _getLocale.getLocale)(menu.label) : menu.label,
|
|
148
|
+
data: menu.data || menu,
|
|
149
|
+
isLeaf: isLeaf,
|
|
150
|
+
children: this.formateToTreeNodeData(menu.children || []),
|
|
151
|
+
nodeType: nodeType
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return treeNodes;
|
|
157
|
+
}
|
|
158
|
+
}]);
|
|
159
|
+
|
|
160
|
+
return InterviewMenus;
|
|
161
|
+
}();
|
|
162
|
+
|
|
163
|
+
var _default = InterviewMenus;
|
|
164
|
+
exports["default"] = _default;
|
|
@@ -100,7 +100,7 @@ var _default = function _default() {
|
|
|
100
100
|
var showCompanyAll = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager();
|
|
101
101
|
(0, _react.useEffect)(function () {
|
|
102
102
|
if (showCompanyAll) {
|
|
103
|
-
window.location.href = '#/summary/manage?departmentName=公司全部&departmentId=0';
|
|
103
|
+
window.location.href = '#/summary/manage?departmentName=公司全部&departmentId=0&modeType=date';
|
|
104
104
|
|
|
105
105
|
var allDepartmentText = window.getLocale && window.getLocale(_i18n.locale.menu_alldeparment) || _i18n.locale.menu_alldeparment;
|
|
106
106
|
|
|
@@ -124,8 +124,7 @@ var _default = function _default() {
|
|
|
124
124
|
});
|
|
125
125
|
} else {
|
|
126
126
|
(0, _requestApis.getMyDepartMent)().then(function (res) {
|
|
127
|
-
|
|
128
|
-
var rawTreeData = (0, _helper.translateDepartsToTreeNode)(res.Data);
|
|
127
|
+
var rawTreeData = (0, _helper.translateDepartsToTreeNode)(res.Data.departments);
|
|
129
128
|
var rootNode = {
|
|
130
129
|
async: true,
|
|
131
130
|
data: {
|
|
@@ -133,14 +132,20 @@ var _default = function _default() {
|
|
|
133
132
|
name: '全部管理部门'
|
|
134
133
|
},
|
|
135
134
|
pid: 0,
|
|
136
|
-
id:
|
|
135
|
+
id: -1,
|
|
137
136
|
key: -1,
|
|
137
|
+
isLeaf: true,
|
|
138
138
|
nodeType: _index.DEPART_NODE,
|
|
139
139
|
title: '全部管理部门'
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
if (rawTreeData.length > 1) {
|
|
143
|
+
location.href = "#/summary/manage?departmentName=".concat(res.Data.departments[0].name, "&departmentId=-1&modeType=date");
|
|
143
144
|
rawTreeData.unshift(rootNode);
|
|
145
|
+
setSelectedMenuKeys([-1]);
|
|
146
|
+
} else {
|
|
147
|
+
location.href = "#/summary/manage?departmentName=".concat(res.Data.departments[0].name, "&departmentId=").concat(res.Data.departments[0].id, "&modeType=date");
|
|
148
|
+
setSelectedMenuKeys([rawTreeData[0].id]);
|
|
144
149
|
}
|
|
145
150
|
|
|
146
151
|
setRawTreeData(_toConsumableArray(rawTreeData));
|
|
@@ -166,7 +171,12 @@ var _default = function _default() {
|
|
|
166
171
|
nodes.forEach(function (it) {
|
|
167
172
|
return rawTreeData.push(it);
|
|
168
173
|
});
|
|
169
|
-
|
|
174
|
+
var deWeightData = {};
|
|
175
|
+
rawTreeData.forEach(function (item) {
|
|
176
|
+
deWeightData[item.id] = item;
|
|
177
|
+
});
|
|
178
|
+
var result = Object.values(deWeightData);
|
|
179
|
+
setRawTreeData(_toConsumableArray(result));
|
|
170
180
|
setTreeData((0, _utils.toTree)(rawTreeData));
|
|
171
181
|
resolve(true);
|
|
172
182
|
});
|
|
@@ -74,7 +74,7 @@ function SummaryMenus(props) {
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
var onUserSelectHandler = function onUserSelectHandler(user) {
|
|
77
|
-
location.href = "#/summary/manage?toUserId=".concat(user.id);
|
|
77
|
+
location.href = "#/summary/manage?toUserId=".concat(user.id, "&modeType=date");
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
var flipGoNext = function flipGoNext(opt) {
|
|
@@ -58,7 +58,7 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
58
58
|
|
|
59
59
|
this.COMPANYALL = _index.COMPANY_ALL_NODE;
|
|
60
60
|
this.SHARE = _index.SHARE_NODE;
|
|
61
|
-
this.SUBORDINATES =
|
|
61
|
+
this.SUBORDINATES = _index.SUBORDINATES_NODE;
|
|
62
62
|
this.menus = [{
|
|
63
63
|
icon: "caidan-my",
|
|
64
64
|
label: _i18n.locale.menu_my_summary,
|
|
@@ -77,7 +77,7 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
77
77
|
icon: "caidan-xiashu",
|
|
78
78
|
label: _i18n.locale.menu_my_subordinates,
|
|
79
79
|
key: this.SUBORDINATES,
|
|
80
|
-
type:
|
|
80
|
+
type: this.SUBORDINATES,
|
|
81
81
|
isLeaf: false,
|
|
82
82
|
children: [],
|
|
83
83
|
href: "#/summary/subordinates",
|
|
@@ -85,8 +85,10 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
85
85
|
}, {
|
|
86
86
|
icon: "caidan-enjoy",
|
|
87
87
|
label: _i18n.locale.menu_my_share,
|
|
88
|
-
key:
|
|
89
|
-
type:
|
|
88
|
+
key: this.SHARE,
|
|
89
|
+
type: this.SHARE,
|
|
90
|
+
isLeaf: false,
|
|
91
|
+
children: [],
|
|
90
92
|
href: "#/summary/share",
|
|
91
93
|
isShow: props.isShowShare
|
|
92
94
|
}, {
|
|
@@ -109,17 +111,18 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
109
111
|
key: PAGE_SUMMARY_ROLE,
|
|
110
112
|
type: _index.MENU_ITEM_NOE,
|
|
111
113
|
href: "#/enterprise/manage?reactRouterName=daily",
|
|
112
|
-
isShow: isShowManage
|
|
114
|
+
isShow: isShowManage,
|
|
115
|
+
openBlank: true
|
|
113
116
|
}];
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
_createClass(summaryMenus, [{
|
|
117
120
|
key: "setSubordinatesLoading",
|
|
118
121
|
value: function setSubordinatesLoading(loading) {
|
|
119
|
-
this.menus[
|
|
122
|
+
this.menus[2].children = [];
|
|
120
123
|
|
|
121
124
|
if (loading) {
|
|
122
|
-
this.menus[
|
|
125
|
+
this.menus[2].children.push({
|
|
123
126
|
icon: "",
|
|
124
127
|
label: "loading",
|
|
125
128
|
key: "loading-subordinates",
|
|
@@ -160,6 +163,53 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
160
163
|
|
|
161
164
|
this.menus[2].children = treeNodeUsers;
|
|
162
165
|
}
|
|
166
|
+
}, {
|
|
167
|
+
key: "setShareLoading",
|
|
168
|
+
value: function setShareLoading(loading) {
|
|
169
|
+
this.menus[3].children = [];
|
|
170
|
+
|
|
171
|
+
if (loading) {
|
|
172
|
+
this.menus[3].children.push({
|
|
173
|
+
icon: "",
|
|
174
|
+
label: "loading",
|
|
175
|
+
key: "loading-subordinates",
|
|
176
|
+
type: _index.LOADING_NODE,
|
|
177
|
+
href: "",
|
|
178
|
+
data: {}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}, {
|
|
183
|
+
key: "insertShare",
|
|
184
|
+
value: function insertShare(users) {
|
|
185
|
+
if (!users || !users.length) {
|
|
186
|
+
this.menus[3].children = [{
|
|
187
|
+
icon: "",
|
|
188
|
+
label: "empty-subordinates",
|
|
189
|
+
key: "empty-subordinates",
|
|
190
|
+
type: _index.NO_SUBORDINATES_NODE,
|
|
191
|
+
href: "",
|
|
192
|
+
data: {}
|
|
193
|
+
}];
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
var treeNodeUsers = [];
|
|
198
|
+
|
|
199
|
+
for (var i = 0; i < users.length; i++) {
|
|
200
|
+
var user = users[i];
|
|
201
|
+
treeNodeUsers.push({
|
|
202
|
+
icon: "",
|
|
203
|
+
label: user.name,
|
|
204
|
+
key: "".concat(user.userId),
|
|
205
|
+
type: _index.USER_NODE,
|
|
206
|
+
href: "",
|
|
207
|
+
data: user
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
this.menus[3].children = treeNodeUsers;
|
|
212
|
+
}
|
|
163
213
|
}, {
|
|
164
214
|
key: "getMenus",
|
|
165
215
|
value: function getMenus() {
|